/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 3.0.12
 *
 * This file is not intended to be easily readable and contains a number of
 * coding conventions designed to improve portability and efficiency. Do not make
 * changes to this file unless you know what you are doing--modify the SWIG
 * interface file instead.
 * ----------------------------------------------------------------------------- */


#ifndef SWIGPERL
#define SWIGPERL
#endif

#define SWIG_CASTRANK_MODE


#ifdef __cplusplus
/* SwigValueWrapper is described in swig.swg */
template<typename T> class SwigValueWrapper {
  struct SwigMovePointer {
    T *ptr;
    SwigMovePointer(T *p) : ptr(p) { }
    ~SwigMovePointer() { delete ptr; }
    SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; }
  } pointer;
  SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
  SwigValueWrapper(const SwigValueWrapper<T>& rhs);
public:
  SwigValueWrapper() : pointer(0) { }
  SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; }
  operator T&() const { return *pointer.ptr; }
  T *operator&() { return pointer.ptr; }
};

template <typename T> T SwigValueInit() {
  return T();
}
#endif

/* -----------------------------------------------------------------------------
 *  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

/* -----------------------------------------------------------------------------
 * 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 "4"

/* 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

/* 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 to return 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)
#define SWIG_ERROR                 (-1)
#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 temporal 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 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 cast in linked list */
  struct swig_cast_info  *prev;			/* pointer to the previous cast */
} 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;
}

/*
  Check the typename
*/
SWIGRUNTIME swig_cast_info *
SWIG_TypeCheck(const char *c, swig_type_info *ty) {
  if (ty) {
    swig_cast_info *iter = ty->cast;
    while (iter) {
      if (strcmp(iter->type->name, c) == 0) {
        if (iter == ty->cast)
          return iter;
        /* Move iter to the top of the linked list */
        iter->prev->next = iter->next;
        if (iter->next)
          iter->next->prev = iter->prev;
        iter->next = ty->cast;
        iter->prev = 0;
        if (ty->cast) ty->cast->prev = iter;
        ty->cast = iter;
        return iter;
      }
      iter = iter->next;
    }
  }
  return 0;
}

/*
  Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
*/
SWIGRUNTIME swig_cast_info *
SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) {
  if (ty) {
    swig_cast_info *iter = ty->cast;
    while (iter) {
      if (iter->type == from) {
        if (iter == ty->cast)
          return iter;
        /* Move iter to the top of the linked list */
        iter->prev->next = iter->next;
        if (iter->next)
          iter->next->prev = iter->prev;
        iter->next = ty->cast;
        iter->prev = 0;
        if (ty->cast) ty->cast->prev = iter;
        ty->cast = iter;
        return iter;
      }
      iter = iter->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.  We choose
     to print the last name, as it is often (?) the most
     specific. */
  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 *cast = ti->cast;
  /* if (ti->clientdata == clientdata) return; */
  ti->clientdata = clientdata;

  while (cast) {
    if (!cast->converter) {
      swig_type_info *tc = cast->type;
      if (!tc->clientdata) {
	SWIG_TypeClientData(tc, clientdata);
      }
    }
    cast = cast->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

/*  Errors in SWIG */
#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



#ifdef __cplusplus
/* Needed on some windows machines---since MS plays funny games with the header files under C++ */
#include <math.h>
#include <stdlib.h>
extern "C" {
#endif
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"

/* Add in functionality missing in older versions of Perl. Much of this is based on Devel-PPPort on cpan. */

/* Add PERL_REVISION, PERL_VERSION, PERL_SUBVERSION if missing */
#ifndef PERL_REVISION
#  if !defined(__PATCHLEVEL_H_INCLUDED__) && !(defined(PATCHLEVEL) && defined(SUBVERSION))
#    define PERL_PATCHLEVEL_H_IMPLICIT
#    include <patchlevel.h>
#  endif
#  if !(defined(PERL_VERSION) || (defined(SUBVERSION) && defined(PATCHLEVEL)))
#    include <could_not_find_Perl_patchlevel.h>
#  endif
#  ifndef PERL_REVISION
#    define PERL_REVISION       (5)
#    define PERL_VERSION        PATCHLEVEL
#    define PERL_SUBVERSION     SUBVERSION
#  endif
#endif

#if defined(WIN32) && defined(PERL_OBJECT) && !defined(PerlIO_exportFILE)
#define PerlIO_exportFILE(fh,fl) (FILE*)(fh)
#endif

#ifndef SvIOK_UV
# define SvIOK_UV(sv)       (SvIOK(sv) && (SvUVX(sv) == SvIVX(sv)))
#endif

#ifndef SvUOK
# define SvUOK(sv)           SvIOK_UV(sv)
#endif

#if ((PERL_VERSION < 4) || ((PERL_VERSION == 4) && (PERL_SUBVERSION <= 5)))
#  define PL_sv_undef               sv_undef
#  define PL_na	                    na
#  define PL_errgv                  errgv
#  define PL_sv_no                  sv_no
#  define PL_sv_yes                 sv_yes
#  define PL_markstack_ptr          markstack_ptr
#endif

#ifndef IVSIZE
#  ifdef LONGSIZE
#    define IVSIZE LONGSIZE
#  else
#    define IVSIZE 4 /* A bold guess, but the best we can make. */
#  endif
#endif

#ifndef INT2PTR
#  if (IVSIZE == PTRSIZE) && (UVSIZE == PTRSIZE)
#    define PTRV                  UV
#    define INT2PTR(any,d)        (any)(d)
#  else
#    if PTRSIZE == LONGSIZE
#      define PTRV                unsigned long
#    else
#      define PTRV                unsigned
#    endif
#    define INT2PTR(any,d)        (any)(PTRV)(d)
#  endif

#  define NUM2PTR(any,d)  (any)(PTRV)(d)
#  define PTR2IV(p)       INT2PTR(IV,p)
#  define PTR2UV(p)       INT2PTR(UV,p)
#  define PTR2NV(p)       NUM2PTR(NV,p)

#  if PTRSIZE == LONGSIZE
#    define PTR2ul(p)     (unsigned long)(p)
#  else
#    define PTR2ul(p)     INT2PTR(unsigned long,p)
#  endif
#endif /* !INT2PTR */

#ifndef SvPV_nolen
# define SvPV_nolen(x) SvPV(x,PL_na)
#endif

#ifndef get_sv
#  define get_sv perl_get_sv
#endif

#ifndef ERRSV
#  define ERRSV get_sv("@",FALSE)
#endif

#ifndef pTHX_
#define pTHX_
#endif   

#include <string.h>
#ifdef __cplusplus
}
#endif

/* -----------------------------------------------------------------------------
 * error manipulation
 * ----------------------------------------------------------------------------- */

SWIGINTERN const char*
SWIG_Perl_ErrorType(int code) {
  switch(code) {
  case SWIG_MemoryError:
    return "MemoryError";
  case SWIG_IOError:
    return "IOError";
  case SWIG_RuntimeError:
    return "RuntimeError";
  case SWIG_IndexError:
    return "IndexError";
  case SWIG_TypeError:
    return "TypeError";
  case SWIG_DivisionByZero:
    return "ZeroDivisionError";
  case SWIG_OverflowError:
    return "OverflowError";
  case SWIG_SyntaxError:
    return "SyntaxError";
  case SWIG_ValueError:
    return "ValueError";
  case SWIG_SystemError:
    return "SystemError";
  case SWIG_AttributeError:
    return "AttributeError";
  default:
    return "RuntimeError";
  }
}


/* -----------------------------------------------------------------------------
 * perlrun.swg
 *
 * This file contains the runtime support for Perl modules
 * and includes code for managing global variables and pointer
 * type checking.
 * ----------------------------------------------------------------------------- */

#ifdef PERL_OBJECT
#define SWIG_PERL_OBJECT_DECL CPerlObj *SWIGUNUSEDPARM(pPerl),
#define SWIG_PERL_OBJECT_CALL pPerl,
#else
#define SWIG_PERL_OBJECT_DECL
#define SWIG_PERL_OBJECT_CALL
#endif

/* Common SWIG API */

/* for raw pointers */
#define SWIG_ConvertPtr(obj, pp, type, flags)           SWIG_Perl_ConvertPtr(SWIG_PERL_OBJECT_CALL obj, pp, type, flags)
#define SWIG_ConvertPtrAndOwn(obj, pp, type, flags,own) SWIG_Perl_ConvertPtrAndOwn(SWIG_PERL_OBJECT_CALL obj, pp, type, flags, own)
#define SWIG_NewPointerObj(p, type, flags)              SWIG_Perl_NewPointerObj(SWIG_PERL_OBJECT_CALL p, type, flags)
#define swig_owntype                                    int

/* for raw packed data */
#define SWIG_ConvertPacked(obj, p, s, type)             SWIG_Perl_ConvertPacked(SWIG_PERL_OBJECT_CALL obj, p, s, type)
#define SWIG_NewPackedObj(p, s, type)	                SWIG_Perl_NewPackedObj(SWIG_PERL_OBJECT_CALL p, s, type)

/* for class or struct pointers */
#define SWIG_ConvertInstance(obj, pptr, type, flags)    SWIG_ConvertPtr(obj, pptr, type, flags)
#define SWIG_NewInstanceObj(ptr, type, flags)           SWIG_NewPointerObj(ptr, type, flags)

/* for C or C++ function pointers */
#define SWIG_ConvertFunctionPtr(obj, pptr, type)        SWIG_ConvertPtr(obj, pptr, type, 0)
#define SWIG_NewFunctionPtrObj(ptr, type)               SWIG_NewPointerObj(ptr, type, 0)

/* for C++ member pointers, ie, member methods */
#define SWIG_ConvertMember(obj, ptr, sz, ty)            SWIG_ConvertPacked(obj, ptr, sz, ty)
#define SWIG_NewMemberObj(ptr, sz, type)                SWIG_NewPackedObj(ptr, sz, type)


/* Runtime API */

#define SWIG_GetModule(clientdata)                      SWIG_Perl_GetModule(clientdata)
#define SWIG_SetModule(clientdata, pointer)             SWIG_Perl_SetModule(pointer)


/* Error manipulation */

#define SWIG_ErrorType(code)                            SWIG_Perl_ErrorType(code)               
#define SWIG_Error(code, msg)            		sv_setpvf(get_sv("@", GV_ADD), "%s %s", SWIG_ErrorType(code), msg)
#define SWIG_fail                        		goto fail						    

/* Perl-specific SWIG API */

#define SWIG_MakePtr(sv, ptr, type, flags)              SWIG_Perl_MakePtr(SWIG_PERL_OBJECT_CALL sv, ptr, type, flags)
#define SWIG_MakePackedObj(sv, p, s, type)	        SWIG_Perl_MakePackedObj(SWIG_PERL_OBJECT_CALL sv, p, s, type)
#define SWIG_SetError(str)                              SWIG_Error(SWIG_RuntimeError, str)


#define SWIG_PERL_DECL_ARGS_1(arg1)                     (SWIG_PERL_OBJECT_DECL arg1)
#define SWIG_PERL_CALL_ARGS_1(arg1)                     (SWIG_PERL_OBJECT_CALL arg1)
#define SWIG_PERL_DECL_ARGS_2(arg1, arg2)               (SWIG_PERL_OBJECT_DECL arg1, arg2)
#define SWIG_PERL_CALL_ARGS_2(arg1, arg2)               (SWIG_PERL_OBJECT_CALL arg1, arg2)

/* -----------------------------------------------------------------------------
 * pointers/data manipulation
 * ----------------------------------------------------------------------------- */

/* For backward compatibility only */
#define SWIG_POINTER_EXCEPTION  0

#ifdef __cplusplus
extern "C" {
#endif

#define SWIG_OWNER   SWIG_POINTER_OWN
#define SWIG_SHADOW  SWIG_OWNER << 1

#define SWIG_MAYBE_PERL_OBJECT SWIG_PERL_OBJECT_DECL

/* SWIG Perl macros */

/* Macro to declare an XS function */
#ifndef XSPROTO
#   define XSPROTO(name) void name(pTHX_ CV* cv)
#endif

/* Macro to call an XS function */
#ifdef PERL_OBJECT 
#  define SWIG_CALLXS(_name) _name(cv,pPerl) 
#else 
#  ifndef MULTIPLICITY 
#    define SWIG_CALLXS(_name) _name(cv) 
#  else 
#    define SWIG_CALLXS(_name) _name(PERL_GET_THX, cv) 
#  endif 
#endif 

#ifdef PERL_OBJECT
#define MAGIC_PPERL  CPerlObj *pPerl = (CPerlObj *) this;

#ifdef __cplusplus
extern "C" {
#endif
typedef int (CPerlObj::*SwigMagicFunc)(SV *, MAGIC *);
#ifdef __cplusplus
}
#endif

#define SWIG_MAGIC(a,b) (SV *a, MAGIC *b)
#define SWIGCLASS_STATIC

#else /* PERL_OBJECT */

#define MAGIC_PPERL
#define SWIGCLASS_STATIC static SWIGUNUSED

#ifndef MULTIPLICITY
#define SWIG_MAGIC(a,b) (SV *a, MAGIC *b)

#ifdef __cplusplus
extern "C" {
#endif
typedef int (*SwigMagicFunc)(SV *, MAGIC *);
#ifdef __cplusplus
}
#endif

#else /* MULTIPLICITY */

#define SWIG_MAGIC(a,b) (struct interpreter *interp, SV *a, MAGIC *b)

#ifdef __cplusplus
extern "C" {
#endif
typedef int (*SwigMagicFunc)(struct interpreter *, SV *, MAGIC *);
#ifdef __cplusplus
}
#endif

#endif /* MULTIPLICITY */
#endif /* PERL_OBJECT */

#  ifdef PERL_OBJECT
#    define SWIG_croak_null() SWIG_Perl_croak_null(pPerl)
static void SWIGUNUSED SWIG_Perl_croak_null(CPerlObj *pPerl)
#  else
static void SWIGUNUSED SWIG_croak_null()
#  endif
{
  SV *err = get_sv("@", GV_ADD);
#  if (PERL_VERSION < 6)
  croak("%_", err);
#  else
  if (sv_isobject(err))
    croak(0);
  else
    croak("%s", SvPV_nolen(err));
#  endif
}


/* 
   Define how strict is the cast between strings and integers/doubles
   when overloading between these types occurs.
   
   The default is making it as strict as possible by using SWIG_AddCast
   when needed.
   
   You can use -DSWIG_PERL_NO_STRICT_STR2NUM at compilation time to
   disable the SWIG_AddCast, making the casting between string and
   numbers less strict.

   In the end, we try to solve the overloading between strings and
   numerical types in the more natural way, but if you can avoid it,
   well, avoid it using %rename, for example.
*/
#ifndef SWIG_PERL_NO_STRICT_STR2NUM
# ifndef SWIG_PERL_STRICT_STR2NUM
#  define SWIG_PERL_STRICT_STR2NUM
# endif
#endif
#ifdef SWIG_PERL_STRICT_STR2NUM
/* string takes precedence */
#define SWIG_Str2NumCast(x) SWIG_AddCast(x)  
#else
/* number takes precedence */
#define SWIG_Str2NumCast(x) x
#endif



#include <stdlib.h>

SWIGRUNTIME const char *
SWIG_Perl_TypeProxyName(const swig_type_info *type) {
  if (!type) return NULL;
  if (type->clientdata != NULL) {
    return (const char*) type->clientdata;
  } 
  else {
    return type->name;
  }
}

/* Identical to SWIG_TypeCheck, except for strcmp comparison */
SWIGRUNTIME swig_cast_info *
SWIG_TypeProxyCheck(const char *c, swig_type_info *ty) {
  if (ty) {
    swig_cast_info *iter = ty->cast;
    while (iter) {
      if (strcmp(SWIG_Perl_TypeProxyName(iter->type), c) == 0) {
        if (iter == ty->cast)
          return iter;
        /* Move iter to the top of the linked list */
        iter->prev->next = iter->next;
        if (iter->next)
          iter->next->prev = iter->prev;
        iter->next = ty->cast;
        iter->prev = 0;
        if (ty->cast) ty->cast->prev = iter;
        ty->cast = iter;
        return iter;
      }
      iter = iter->next;
    }
  }
  return 0;
}

/* Function for getting a pointer value */

SWIGRUNTIME int
SWIG_Perl_ConvertPtrAndOwn(SWIG_MAYBE_PERL_OBJECT SV *sv, void **ptr, swig_type_info *_t, int flags, int *own) {
  swig_cast_info *tc;
  void *voidptr = (void *)0;
  SV *tsv = 0;

  if (own)
    *own = 0;

  /* If magical, apply more magic */
  if (SvGMAGICAL(sv))
    mg_get(sv);

  /* Check to see if this is an object */
  if (sv_isobject(sv)) {
    IV tmp = 0;
    tsv = (SV*) SvRV(sv);
    if ((SvTYPE(tsv) == SVt_PVHV)) {
      MAGIC *mg;
      if (SvMAGICAL(tsv)) {
        mg = mg_find(tsv,'P');
        if (mg) {
          sv = mg->mg_obj;
          if (sv_isobject(sv)) {
	    tsv = (SV*)SvRV(sv);
            tmp = SvIV(tsv);
          }
        }
      } else {
        return SWIG_ERROR;
      }
    } else {
      tmp = SvIV(tsv);
    }
    voidptr = INT2PTR(void *,tmp);
  } else if (! SvOK(sv)) {            /* Check for undef */
    *(ptr) = (void *) 0;
    return SWIG_OK;
  } else if (SvTYPE(sv) == SVt_RV) {  /* Check for NULL pointer */
    if (!SvROK(sv)) {
      /* In Perl 5.12 and later, SVt_RV == SVt_IV, so sv could be a valid integer value.  */
      if (SvIOK(sv)) {
        return SWIG_ERROR;
      } else {
        /* NULL pointer (reference to undef). */
        *(ptr) = (void *) 0;
        return SWIG_OK;
      }
    } else {
      return SWIG_ERROR;
    }
  } else {                            /* Don't know what it is */
    return SWIG_ERROR;
  }
  if (_t) {
    /* Now see if the types match */
    char *_c = HvNAME(SvSTASH(SvRV(sv)));
    tc = SWIG_TypeProxyCheck(_c,_t);
#ifdef SWIG_DIRECTORS
    if (!tc && !sv_derived_from(sv,SWIG_Perl_TypeProxyName(_t))) {
#else
    if (!tc) {
#endif
      return SWIG_ERROR;
    }
    {
      int newmemory = 0;
      *ptr = SWIG_TypeCast(tc,voidptr,&newmemory);
      if (newmemory == SWIG_CAST_NEW_MEMORY) {
        assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */
        if (own)
          *own = *own | SWIG_CAST_NEW_MEMORY;
      }
    }
  } else {
    *ptr = voidptr;
  }

  /* 
   *  DISOWN implementation: we need a perl guru to check this one.
   */
  if (tsv && (flags & SWIG_POINTER_DISOWN)) {
    /* 
     *  almost copy paste code from below SWIG_POINTER_OWN setting
     */
    SV *obj = sv;
    HV *stash = SvSTASH(SvRV(obj));
    GV *gv = *(GV**)hv_fetch(stash, "OWNER", 5, TRUE);
    if (isGV(gv)) {
      HV *hv = GvHVn(gv);
      /*
       * To set ownership (see below), a newSViv(1) entry is added. 
       * Hence, to remove ownership, we delete the entry.
       */
      if (hv_exists_ent(hv, obj, 0)) {
	hv_delete_ent(hv, obj, 0, 0);
      }
    }
  }
  return SWIG_OK;
}

SWIGRUNTIME int
SWIG_Perl_ConvertPtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void **ptr, swig_type_info *_t, int flags) {
  return SWIG_Perl_ConvertPtrAndOwn(sv, ptr, _t, flags, 0);
}

SWIGRUNTIME void
SWIG_Perl_MakePtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void *ptr, swig_type_info *t, int flags) {
  if (ptr && (flags & (SWIG_SHADOW | SWIG_POINTER_OWN))) {
    SV *self;
    SV *obj=newSV(0);
    HV *hash=newHV();
    HV *stash;
    sv_setref_pv(obj, SWIG_Perl_TypeProxyName(t), ptr);
    stash=SvSTASH(SvRV(obj));
    if (flags & SWIG_POINTER_OWN) {
      HV *hv;
      GV *gv = *(GV**)hv_fetch(stash, "OWNER", 5, TRUE);
      if (!isGV(gv))
        gv_init(gv, stash, "OWNER", 5, FALSE);
      hv=GvHVn(gv);
      hv_store_ent(hv, obj, newSViv(1), 0);
    }
    sv_magic((SV *)hash, (SV *)obj, 'P', Nullch, 0);
    SvREFCNT_dec(obj);
    self=newRV_noinc((SV *)hash);
    sv_setsv(sv, self);
    SvREFCNT_dec((SV *)self);
    sv_bless(sv, stash);
  }
  else {
    sv_setref_pv(sv, SWIG_Perl_TypeProxyName(t), ptr);
  }
}

SWIGRUNTIMEINLINE SV *
SWIG_Perl_NewPointerObj(SWIG_MAYBE_PERL_OBJECT void *ptr, swig_type_info *t, int flags) {
  SV *result = sv_newmortal();
  SWIG_MakePtr(result, ptr, t, flags);
  return result;
}

SWIGRUNTIME void
SWIG_Perl_MakePackedObj(SWIG_MAYBE_PERL_OBJECT SV *sv, void *ptr, int sz, swig_type_info *type) {
  char result[1024];
  char *r = result;
  if ((2*sz + 1 + strlen(SWIG_Perl_TypeProxyName(type))) > 1000) return;
  *(r++) = '_';
  r = SWIG_PackData(r,ptr,sz);
  strcpy(r,SWIG_Perl_TypeProxyName(type));
  sv_setpv(sv, result);
}

SWIGRUNTIME SV *
SWIG_Perl_NewPackedObj(SWIG_MAYBE_PERL_OBJECT void *ptr, int sz, swig_type_info *type) {
  SV *result = sv_newmortal();
  SWIG_Perl_MakePackedObj(result, ptr, sz, type);
  return result;
}

/* Convert a packed value value */
SWIGRUNTIME int
SWIG_Perl_ConvertPacked(SWIG_MAYBE_PERL_OBJECT SV *obj, void *ptr, int sz, swig_type_info *ty) {
  swig_cast_info *tc;
  const char  *c = 0;

  if ((!obj) || (!SvOK(obj))) return SWIG_ERROR;
  c = SvPV_nolen(obj);
  /* Pointer values must start with leading underscore */
  if (*c != '_') return SWIG_ERROR;
  c++;
  c = SWIG_UnpackData(c,ptr,sz);
  if (ty) {
    tc = SWIG_TypeCheck(c,ty);
    if (!tc) return SWIG_ERROR;
  }
  return SWIG_OK;
}


/* Macros for low-level exception handling */
#define SWIG_croak(x)    { SWIG_Error(SWIG_RuntimeError, x); SWIG_fail; }


typedef XSPROTO(SwigPerlWrapper);
typedef SwigPerlWrapper *SwigPerlWrapperPtr;

/* Structure for command table */
typedef struct {
  const char         *name;
  SwigPerlWrapperPtr  wrapper;
} swig_command_info;

/* Information for constant table */

#define SWIG_INT     1
#define SWIG_FLOAT   2
#define SWIG_STRING  3
#define SWIG_POINTER 4
#define SWIG_BINARY  5

/* Constant information structure */
typedef struct swig_constant_info {
    int              type;
    const char      *name;
    long             lvalue;
    double           dvalue;
    void            *pvalue;
    swig_type_info **ptype;
} swig_constant_info;


/* Structure for variable table */
typedef struct {
  const char   *name;
  SwigMagicFunc   set;
  SwigMagicFunc   get;
  swig_type_info  **type;
} swig_variable_info;

/* Magic variable code */
#ifndef PERL_OBJECT
# ifdef __cplusplus
#  define swig_create_magic(s,a,b,c) _swig_create_magic(s,const_cast<char*>(a),b,c)
# else
#  define swig_create_magic(s,a,b,c) _swig_create_magic(s,(char*)(a),b,c)
# endif
# ifndef MULTIPLICITY
SWIGRUNTIME void _swig_create_magic(SV *sv, char *name, int (*set)(SV *, MAGIC *), int (*get)(SV *,MAGIC *)) 
# else
SWIGRUNTIME void _swig_create_magic(SV *sv, char *name, int (*set)(struct interpreter*, SV *, MAGIC *), int (*get)(struct interpreter*, SV *,MAGIC *)) 
# endif
#else
#  define swig_create_magic(s,a,b,c) _swig_create_magic(pPerl,s,a,b,c)
SWIGRUNTIME void _swig_create_magic(CPerlObj *pPerl, SV *sv, const char *name, int (CPerlObj::*set)(SV *, MAGIC *), int (CPerlObj::*get)(SV *, MAGIC *)) 
#endif
{
  MAGIC *mg;
  sv_magic(sv,sv,'U',name,strlen(name));
  mg = mg_find(sv,'U');
  mg->mg_virtual = (MGVTBL *) malloc(sizeof(MGVTBL));
  mg->mg_virtual->svt_get = (SwigMagicFunc) get;
  mg->mg_virtual->svt_set = (SwigMagicFunc) set;
  mg->mg_virtual->svt_len = 0;
  mg->mg_virtual->svt_clear = 0;
  mg->mg_virtual->svt_free = 0;
}


SWIGRUNTIME swig_module_info *
SWIG_Perl_GetModule(void *SWIGUNUSEDPARM(clientdata)) {
  static void *type_pointer = (void *)0;
  SV *pointer;

  /* first check if pointer already created */
  if (!type_pointer) {
    pointer = get_sv("swig_runtime_data::type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, FALSE | GV_ADDMULTI);
    if (pointer && SvOK(pointer)) {
      type_pointer = INT2PTR(swig_type_info **, SvIV(pointer));
    }
  }

  return (swig_module_info *) type_pointer;
}

SWIGRUNTIME void
SWIG_Perl_SetModule(swig_module_info *module) {
  SV *pointer;

  /* create a new pointer */
  pointer = get_sv("swig_runtime_data::type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, TRUE | GV_ADDMULTI);
  sv_setiv(pointer, PTR2IV(module));
}

#ifdef __cplusplus
}
#endif

/* Workaround perl5 global namespace pollution. Note that undefining library
 * functions like fopen will not solve the problem on all platforms as fopen
 * might be a macro on Windows but not necessarily on other operating systems. */
#ifdef do_open
  #undef do_open
#endif
#ifdef do_close
  #undef do_close
#endif
#ifdef do_exec
  #undef do_exec
#endif
#ifdef scalar
  #undef scalar
#endif
#ifdef list
  #undef list
#endif
#ifdef apply
  #undef apply
#endif
#ifdef convert
  #undef convert
#endif
#ifdef Error
  #undef Error
#endif
#ifdef form
  #undef form
#endif
#ifdef vform
  #undef vform
#endif
#ifdef LABEL
  #undef LABEL
#endif
#ifdef METHOD
  #undef METHOD
#endif
#ifdef Move
  #undef Move
#endif
#ifdef yylex
  #undef yylex
#endif
#ifdef yyparse
  #undef yyparse
#endif
#ifdef yyerror
  #undef yyerror
#endif
#ifdef invert
  #undef invert
#endif
#ifdef ref
  #undef ref
#endif
#ifdef read
  #undef read
#endif
#ifdef write
  #undef write
#endif
#ifdef eof
  #undef eof
#endif
#ifdef close
  #undef close
#endif
#ifdef rewind
  #undef rewind
#endif
#ifdef free
  #undef free
#endif
#ifdef malloc
  #undef malloc
#endif
#ifdef calloc
  #undef calloc
#endif
#ifdef Stat
  #undef Stat
#endif
#ifdef check
  #undef check
#endif
#ifdef seekdir
  #undef seekdir
#endif
#ifdef open
  #undef open
#endif
#ifdef readdir
  #undef readdir
#endif
#ifdef bind
  #undef bind
#endif
#ifdef access
  #undef access
#endif
#ifdef stat
  #undef stat
#endif
#ifdef seed
  #undef seed
#endif

#ifdef bool
  /* Leave if macro is from C99 stdbool.h */
  #ifndef __bool_true_false_are_defined
    #undef bool
  #endif
#endif




#define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0) 

#define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else 



  #define SWIG_exception(code, msg) do { SWIG_Error(code, msg); SWIG_fail;; } while(0) 


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

#define SWIGTYPE_p_ASX swig_types[0]
#define SWIGTYPE_p_AUDLiborPtr swig_types[1]
#define SWIGTYPE_p_AmericanExercisePtr swig_types[2]
#define SWIGTYPE_p_AmortizingPaymentPtr swig_types[3]
#define SWIGTYPE_p_AnalyticBarrierEnginePtr swig_types[4]
#define SWIGTYPE_p_AnalyticBinaryBarrierEnginePtr swig_types[5]
#define SWIGTYPE_p_AnalyticCapFloorEnginePtr swig_types[6]
#define SWIGTYPE_p_AnalyticContinuousGeometricAveragePriceAsianEnginePtr swig_types[7]
#define SWIGTYPE_p_AnalyticDigitalAmericanEnginePtr swig_types[8]
#define SWIGTYPE_p_AnalyticDigitalAmericanKOEnginePtr swig_types[9]
#define SWIGTYPE_p_AnalyticDiscreteGeometricAveragePriceAsianEnginePtr swig_types[10]
#define SWIGTYPE_p_AnalyticDiscreteGeometricAverageStrikeAsianEnginePtr swig_types[11]
#define SWIGTYPE_p_AnalyticDividendEuropeanEnginePtr swig_types[12]
#define SWIGTYPE_p_AnalyticDoubleBarrierBinaryEnginePtr swig_types[13]
#define SWIGTYPE_p_AnalyticDoubleBarrierEnginePtr swig_types[14]
#define SWIGTYPE_p_AnalyticEuropeanEnginePtr swig_types[15]
#define SWIGTYPE_p_AnalyticHaganPricerPtr swig_types[16]
#define SWIGTYPE_p_AnalyticHestonEnginePtr swig_types[17]
#define SWIGTYPE_p_AnalyticPTDHestonEnginePtr swig_types[18]
#define SWIGTYPE_p_AoniaPtr swig_types[19]
#define SWIGTYPE_p_Array swig_types[20]
#define SWIGTYPE_p_AssetOrNothingPayoffPtr swig_types[21]
#define SWIGTYPE_p_AssetSwapPtr swig_types[22]
#define SWIGTYPE_p_Average swig_types[23]
#define SWIGTYPE_p_AverageBasketPayoffPtr swig_types[24]
#define SWIGTYPE_p_BFGS swig_types[25]
#define SWIGTYPE_p_BachelierCapFloorEnginePtr swig_types[26]
#define SWIGTYPE_p_BachelierSwaptionEnginePtr swig_types[27]
#define SWIGTYPE_p_BackwardFlat swig_types[28]
#define SWIGTYPE_p_BackwardFlatZeroCurvePtr swig_types[29]
#define SWIGTYPE_p_BaroneAdesiWhaleyApproximationEnginePtr swig_types[30]
#define SWIGTYPE_p_Barrier swig_types[31]
#define SWIGTYPE_p_BarrierOptionPtr swig_types[32]
#define SWIGTYPE_p_BasketOptionPtr swig_types[33]
#define SWIGTYPE_p_BasketPayoffPtr swig_types[34]
#define SWIGTYPE_p_BatesEnginePtr swig_types[35]
#define SWIGTYPE_p_BatesModelPtr swig_types[36]
#define SWIGTYPE_p_BatesProcessPtr swig_types[37]
#define SWIGTYPE_p_Bbsw1MPtr swig_types[38]
#define SWIGTYPE_p_Bbsw2MPtr swig_types[39]
#define SWIGTYPE_p_Bbsw3MPtr swig_types[40]
#define SWIGTYPE_p_Bbsw4MPtr swig_types[41]
#define SWIGTYPE_p_Bbsw5MPtr swig_types[42]
#define SWIGTYPE_p_Bbsw6MPtr swig_types[43]
#define SWIGTYPE_p_BbswPtr swig_types[44]
#define SWIGTYPE_p_BermudanExercisePtr swig_types[45]
#define SWIGTYPE_p_BinomialBarrierEnginePtr swig_types[46]
#define SWIGTYPE_p_BinomialConvertibleEnginePtr swig_types[47]
#define SWIGTYPE_p_BinomialDistribution swig_types[48]
#define SWIGTYPE_p_BinomialDoubleBarrierEnginePtr swig_types[49]
#define SWIGTYPE_p_BinomialVanillaEnginePtr swig_types[50]
#define SWIGTYPE_p_Bisection swig_types[51]
#define SWIGTYPE_p_BivariateCumulativeNormalDistribution swig_types[52]
#define SWIGTYPE_p_BivariateCumulativeNormalDistributionDr78 swig_types[53]
#define SWIGTYPE_p_BivariateCumulativeNormalDistributionWe04DP swig_types[54]
#define SWIGTYPE_p_BjerksundStenslandApproximationEnginePtr swig_types[55]
#define SWIGTYPE_p_Bkbm1MPtr swig_types[56]
#define SWIGTYPE_p_Bkbm2MPtr swig_types[57]
#define SWIGTYPE_p_Bkbm3MPtr swig_types[58]
#define SWIGTYPE_p_Bkbm4MPtr swig_types[59]
#define SWIGTYPE_p_Bkbm5MPtr swig_types[60]
#define SWIGTYPE_p_Bkbm6MPtr swig_types[61]
#define SWIGTYPE_p_BkbmPtr swig_types[62]
#define SWIGTYPE_p_BlackCalculator swig_types[63]
#define SWIGTYPE_p_BlackCallableFixedRateBondEnginePtr swig_types[64]
#define SWIGTYPE_p_BlackCapFloorEnginePtr swig_types[65]
#define SWIGTYPE_p_BlackConstantVolPtr swig_types[66]
#define SWIGTYPE_p_BlackDeltaCalculator swig_types[67]
#define SWIGTYPE_p_BlackIborCouponPricerPtr swig_types[68]
#define SWIGTYPE_p_BlackKarasinskiPtr swig_types[69]
#define SWIGTYPE_p_BlackProcessPtr swig_types[70]
#define SWIGTYPE_p_BlackScholesMertonProcessPtr swig_types[71]
#define SWIGTYPE_p_BlackScholesProcessPtr swig_types[72]
#define SWIGTYPE_p_BlackSwaptionEnginePtr swig_types[73]
#define SWIGTYPE_p_BlackVarianceCurvePtr swig_types[74]
#define SWIGTYPE_p_BlackVarianceSurfacePtr swig_types[75]
#define SWIGTYPE_p_BlackVolTermStructure swig_types[76]
#define SWIGTYPE_p_BondFunctions swig_types[77]
#define SWIGTYPE_p_BondHelperPtr swig_types[78]
#define SWIGTYPE_p_BondPtr swig_types[79]
#define SWIGTYPE_p_BoundaryConstraint swig_types[80]
#define SWIGTYPE_p_BoxMullerGaussianRngT_KnuthUniformRng_t swig_types[81]
#define SWIGTYPE_p_BoxMullerGaussianRngT_LecuyerUniformRng_t swig_types[82]
#define SWIGTYPE_p_BoxMullerGaussianRngT_MersenneTwisterUniformRng_t swig_types[83]
#define SWIGTYPE_p_Brent swig_types[84]
#define SWIGTYPE_p_BrownianBridge swig_types[85]
#define SWIGTYPE_p_CADLiborPtr swig_types[86]
#define SWIGTYPE_p_CHFLiborPtr swig_types[87]
#define SWIGTYPE_p_CLGaussianRngT_KnuthUniformRng_t swig_types[88]
#define SWIGTYPE_p_CLGaussianRngT_LecuyerUniformRng_t swig_types[89]
#define SWIGTYPE_p_CLGaussianRngT_MersenneTwisterUniformRng_t swig_types[90]
#define SWIGTYPE_p_CPI swig_types[91]
#define SWIGTYPE_p_CPIBondPtr swig_types[92]
#define SWIGTYPE_p_Calendar swig_types[93]
#define SWIGTYPE_p_CalibratedModel swig_types[94]
#define SWIGTYPE_p_CalibrationHelper swig_types[95]
#define SWIGTYPE_p_Callability swig_types[96]
#define SWIGTYPE_p_CallabilityPrice swig_types[97]
#define SWIGTYPE_p_CallableFixedRateBondPtr swig_types[98]
#define SWIGTYPE_p_CapFloorPtr swig_types[99]
#define SWIGTYPE_p_CapFloorTermVolCurvePtr swig_types[100]
#define SWIGTYPE_p_CapFloorTermVolSurfacePtr swig_types[101]
#define SWIGTYPE_p_CapFloorTermVolatilityStructure swig_types[102]
#define SWIGTYPE_p_CapHelperPtr swig_types[103]
#define SWIGTYPE_p_CapPtr swig_types[104]
#define SWIGTYPE_p_CappedFlooredCmsCouponPtr swig_types[105]
#define SWIGTYPE_p_CappedFlooredCouponPtr swig_types[106]
#define SWIGTYPE_p_CashFlow swig_types[107]
#define SWIGTYPE_p_CashFlows swig_types[108]
#define SWIGTYPE_p_CashOrNothingPayoffPtr swig_types[109]
#define SWIGTYPE_p_CdorPtr swig_types[110]
#define SWIGTYPE_p_CeilingTruncation swig_types[111]
#define SWIGTYPE_p_ClosestRounding swig_types[112]
#define SWIGTYPE_p_CmsCouponPricerPtr swig_types[113]
#define SWIGTYPE_p_CmsCouponPtr swig_types[114]
#define SWIGTYPE_p_CmsRateBondPtr swig_types[115]
#define SWIGTYPE_p_CollarPtr swig_types[116]
#define SWIGTYPE_p_CompositeConstraint swig_types[117]
#define SWIGTYPE_p_CompositeInstrumentPtr swig_types[118]
#define SWIGTYPE_p_ConjugateGradient swig_types[119]
#define SWIGTYPE_p_ConstantEstimator swig_types[120]
#define SWIGTYPE_p_ConstantOptionletVolatilityPtr swig_types[121]
#define SWIGTYPE_p_ConstantParameter swig_types[122]
#define SWIGTYPE_p_ConstantSwaptionVolatilityPtr swig_types[123]
#define SWIGTYPE_p_Constraint swig_types[124]
#define SWIGTYPE_p_ContinuousArithmeticAsianLevyEnginePtr swig_types[125]
#define SWIGTYPE_p_ContinuousAveragingAsianOptionPtr swig_types[126]
#define SWIGTYPE_p_ConvertibleFixedCouponBondPtr swig_types[127]
#define SWIGTYPE_p_ConvertibleFloatingRateBondPtr swig_types[128]
#define SWIGTYPE_p_ConvertibleZeroCouponBondPtr swig_types[129]
#define SWIGTYPE_p_CouponPtr swig_types[130]
#define SWIGTYPE_p_CreditDefaultSwapPtr swig_types[131]
#define SWIGTYPE_p_Cubic swig_types[132]
#define SWIGTYPE_p_CubicBSplinesFitting swig_types[133]
#define SWIGTYPE_p_CubicZeroCurvePtr swig_types[134]
#define SWIGTYPE_p_CumulativeBinomialDistribution swig_types[135]
#define SWIGTYPE_p_CumulativeChiSquareDistribution swig_types[136]
#define SWIGTYPE_p_CumulativeGammaDistribution swig_types[137]
#define SWIGTYPE_p_CumulativeNormalDistribution swig_types[138]
#define SWIGTYPE_p_CumulativePoissonDistribution swig_types[139]
#define SWIGTYPE_p_CumulativeStudentDistribution swig_types[140]
#define SWIGTYPE_p_Currency swig_types[141]
#define SWIGTYPE_p_CustomRegion swig_types[142]
#define SWIGTYPE_p_DKKLiborPtr swig_types[143]
#define SWIGTYPE_p_DMinus swig_types[144]
#define SWIGTYPE_p_DPlus swig_types[145]
#define SWIGTYPE_p_DPlusDMinus swig_types[146]
#define SWIGTYPE_p_DZero swig_types[147]
#define SWIGTYPE_p_Date swig_types[148]
#define SWIGTYPE_p_DateGeneration swig_types[149]
#define SWIGTYPE_p_DateParser swig_types[150]
#define SWIGTYPE_p_DatedOISRateHelperPtr swig_types[151]
#define SWIGTYPE_p_DayCounter swig_types[152]
#define SWIGTYPE_p_DefaultBoundaryCondition swig_types[153]
#define SWIGTYPE_p_DefaultDensity swig_types[154]
#define SWIGTYPE_p_DefaultDensityCurvePtr swig_types[155]
#define SWIGTYPE_p_DefaultLexicographicalView swig_types[156]
#define SWIGTYPE_p_DefaultLogCubic swig_types[157]
#define SWIGTYPE_p_DefaultProbabilityHelper swig_types[158]
#define SWIGTYPE_p_DefaultProbabilityTermStructure swig_types[159]
#define SWIGTYPE_p_DeltaVolQuote swig_types[160]
#define SWIGTYPE_p_DepositRateHelperPtr swig_types[161]
#define SWIGTYPE_p_DifferentialEvolution swig_types[162]
#define SWIGTYPE_p_DirichletBCPtr swig_types[163]
#define SWIGTYPE_p_Discount swig_types[164]
#define SWIGTYPE_p_DiscountCurvePtr swig_types[165]
#define SWIGTYPE_p_DiscountingBondEnginePtr swig_types[166]
#define SWIGTYPE_p_DiscountingSwapEnginePtr swig_types[167]
#define SWIGTYPE_p_DiscreteAveragingAsianOptionPtr swig_types[168]
#define SWIGTYPE_p_Dividend swig_types[169]
#define SWIGTYPE_p_DividendVanillaOptionPtr swig_types[170]
#define SWIGTYPE_p_DoubleBarrier swig_types[171]
#define SWIGTYPE_p_DoubleBarrierOptionPtr swig_types[172]
#define SWIGTYPE_p_DownRounding swig_types[173]
#define SWIGTYPE_p_Duration swig_types[174]
#define SWIGTYPE_p_EUHICPPtr swig_types[175]
#define SWIGTYPE_p_EUHICPXTPtr swig_types[176]
#define SWIGTYPE_p_EURLibor10MPtr swig_types[177]
#define SWIGTYPE_p_EURLibor11MPtr swig_types[178]
#define SWIGTYPE_p_EURLibor1MPtr swig_types[179]
#define SWIGTYPE_p_EURLibor1YPtr swig_types[180]
#define SWIGTYPE_p_EURLibor2MPtr swig_types[181]
#define SWIGTYPE_p_EURLibor2WPtr swig_types[182]
#define SWIGTYPE_p_EURLibor3MPtr swig_types[183]
#define SWIGTYPE_p_EURLibor4MPtr swig_types[184]
#define SWIGTYPE_p_EURLibor5MPtr swig_types[185]
#define SWIGTYPE_p_EURLibor6MPtr swig_types[186]
#define SWIGTYPE_p_EURLibor7MPtr swig_types[187]
#define SWIGTYPE_p_EURLibor8MPtr swig_types[188]
#define SWIGTYPE_p_EURLibor9MPtr swig_types[189]
#define SWIGTYPE_p_EURLiborPtr swig_types[190]
#define SWIGTYPE_p_EURLiborSWPtr swig_types[191]
#define SWIGTYPE_p_EndCriteria swig_types[192]
#define SWIGTYPE_p_EndCriteria__Type swig_types[193]
#define SWIGTYPE_p_EoniaPtr swig_types[194]
#define SWIGTYPE_p_EurLiborSwapIfrFixPtr swig_types[195]
#define SWIGTYPE_p_EurLiborSwapIsdaFixAPtr swig_types[196]
#define SWIGTYPE_p_EurLiborSwapIsdaFixBPtr swig_types[197]
#define SWIGTYPE_p_Euribor10MPtr swig_types[198]
#define SWIGTYPE_p_Euribor11MPtr swig_types[199]
#define SWIGTYPE_p_Euribor1MPtr swig_types[200]
#define SWIGTYPE_p_Euribor1YPtr swig_types[201]
#define SWIGTYPE_p_Euribor2MPtr swig_types[202]
#define SWIGTYPE_p_Euribor2WPtr swig_types[203]
#define SWIGTYPE_p_Euribor365Ptr swig_types[204]
#define SWIGTYPE_p_Euribor365_10MPtr swig_types[205]
#define SWIGTYPE_p_Euribor365_11MPtr swig_types[206]
#define SWIGTYPE_p_Euribor365_1MPtr swig_types[207]
#define SWIGTYPE_p_Euribor365_1YPtr swig_types[208]
#define SWIGTYPE_p_Euribor365_2MPtr swig_types[209]
#define SWIGTYPE_p_Euribor365_2WPtr swig_types[210]
#define SWIGTYPE_p_Euribor365_3MPtr swig_types[211]
#define SWIGTYPE_p_Euribor365_3WPtr swig_types[212]
#define SWIGTYPE_p_Euribor365_4MPtr swig_types[213]
#define SWIGTYPE_p_Euribor365_5MPtr swig_types[214]
#define SWIGTYPE_p_Euribor365_6MPtr swig_types[215]
#define SWIGTYPE_p_Euribor365_7MPtr swig_types[216]
#define SWIGTYPE_p_Euribor365_8MPtr swig_types[217]
#define SWIGTYPE_p_Euribor365_9MPtr swig_types[218]
#define SWIGTYPE_p_Euribor365_SWPtr swig_types[219]
#define SWIGTYPE_p_Euribor3MPtr swig_types[220]
#define SWIGTYPE_p_Euribor3WPtr swig_types[221]
#define SWIGTYPE_p_Euribor4MPtr swig_types[222]
#define SWIGTYPE_p_Euribor5MPtr swig_types[223]
#define SWIGTYPE_p_Euribor6MPtr swig_types[224]
#define SWIGTYPE_p_Euribor7MPtr swig_types[225]
#define SWIGTYPE_p_Euribor8MPtr swig_types[226]
#define SWIGTYPE_p_Euribor9MPtr swig_types[227]
#define SWIGTYPE_p_EuriborPtr swig_types[228]
#define SWIGTYPE_p_EuriborSWPtr swig_types[229]
#define SWIGTYPE_p_EuriborSwapIfrFixPtr swig_types[230]
#define SWIGTYPE_p_EuriborSwapIsdaFixAPtr swig_types[231]
#define SWIGTYPE_p_EuriborSwapIsdaFixBPtr swig_types[232]
#define SWIGTYPE_p_EuropeanExercisePtr swig_types[233]
#define SWIGTYPE_p_EuropeanOptionPtr swig_types[234]
#define SWIGTYPE_p_EverestOptionPtr swig_types[235]
#define SWIGTYPE_p_ExchangeRate swig_types[236]
#define SWIGTYPE_p_ExchangeRateManager swig_types[237]
#define SWIGTYPE_p_Exercise swig_types[238]
#define SWIGTYPE_p_ExponentialSplinesFitting swig_types[239]
#define SWIGTYPE_p_Extrapolator swig_types[240]
#define SWIGTYPE_p_FDAmericanEnginePtr swig_types[241]
#define SWIGTYPE_p_FDBermudanEnginePtr swig_types[242]
#define SWIGTYPE_p_FDDividendAmericanEnginePtr swig_types[243]
#define SWIGTYPE_p_FDDividendEuropeanEnginePtr swig_types[244]
#define SWIGTYPE_p_FDEuropeanEnginePtr swig_types[245]
#define SWIGTYPE_p_FDShoutEnginePtr swig_types[246]
#define SWIGTYPE_p_FFTVarianceGammaEnginePtr swig_types[247]
#define SWIGTYPE_p_FRHICPPtr swig_types[248]
#define SWIGTYPE_p_FalsePosition swig_types[249]
#define SWIGTYPE_p_FdBatesVanillaEnginePtr swig_types[250]
#define SWIGTYPE_p_FdBlackScholesAsianEnginePtr swig_types[251]
#define SWIGTYPE_p_FdBlackScholesBarrierEnginePtr swig_types[252]
#define SWIGTYPE_p_FdBlackScholesVanillaEnginePtr swig_types[253]
#define SWIGTYPE_p_FdG2SwaptionEnginePtr swig_types[254]
#define SWIGTYPE_p_FdHullWhiteSwaptionEnginePtr swig_types[255]
#define SWIGTYPE_p_FdmSchemeDesc swig_types[256]
#define SWIGTYPE_p_FedFundsPtr swig_types[257]
#define SWIGTYPE_p_FittedBondDiscountCurvePtr swig_types[258]
#define SWIGTYPE_p_FittingMethod swig_types[259]
#define SWIGTYPE_p_FixedDividendPtr swig_types[260]
#define SWIGTYPE_p_FixedRateBondForwardPtr swig_types[261]
#define SWIGTYPE_p_FixedRateBondHelperPtr swig_types[262]
#define SWIGTYPE_p_FixedRateBondPtr swig_types[263]
#define SWIGTYPE_p_FixedRateCouponPtr swig_types[264]
#define SWIGTYPE_p_FlatForwardPtr swig_types[265]
#define SWIGTYPE_p_FlatHazardRatePtr swig_types[266]
#define SWIGTYPE_p_FloatFloatSwapPtr swig_types[267]
#define SWIGTYPE_p_FloatFloatSwaptionPtr swig_types[268]
#define SWIGTYPE_p_FloatingRateBondPtr swig_types[269]
#define SWIGTYPE_p_FloatingRateCouponPricer swig_types[270]
#define SWIGTYPE_p_FloatingRateCouponPtr swig_types[271]
#define SWIGTYPE_p_FloorPtr swig_types[272]
#define SWIGTYPE_p_FloorTruncation swig_types[273]
#define SWIGTYPE_p_ForwardCurvePtr swig_types[274]
#define SWIGTYPE_p_ForwardEuropeanEnginePtr swig_types[275]
#define SWIGTYPE_p_ForwardFlat swig_types[276]
#define SWIGTYPE_p_ForwardFlatZeroCurvePtr swig_types[277]
#define SWIGTYPE_p_ForwardPtr swig_types[278]
#define SWIGTYPE_p_ForwardRate swig_types[279]
#define SWIGTYPE_p_ForwardRateAgreementPtr swig_types[280]
#define SWIGTYPE_p_ForwardSpreadedTermStructurePtr swig_types[281]
#define SWIGTYPE_p_ForwardVanillaOptionPtr swig_types[282]
#define SWIGTYPE_p_FraRateHelperPtr swig_types[283]
#define SWIGTYPE_p_FractionalDividendPtr swig_types[284]
#define SWIGTYPE_p_Futures swig_types[285]
#define SWIGTYPE_p_FuturesRateHelperPtr swig_types[286]
#define SWIGTYPE_p_FxSwapRateHelperPtr swig_types[287]
#define SWIGTYPE_p_G2Ptr swig_types[288]
#define SWIGTYPE_p_G2SwaptionEnginePtr swig_types[289]
#define SWIGTYPE_p_GBPLiborPtr swig_types[290]
#define SWIGTYPE_p_GFunctionFactory swig_types[291]
#define SWIGTYPE_p_GammaFunction swig_types[292]
#define SWIGTYPE_p_GapPayoffPtr swig_types[293]
#define SWIGTYPE_p_GarmanKlassSigma1 swig_types[294]
#define SWIGTYPE_p_GarmanKlassSigma3 swig_types[295]
#define SWIGTYPE_p_GarmanKlassSigma4 swig_types[296]
#define SWIGTYPE_p_GarmanKlassSigma5 swig_types[297]
#define SWIGTYPE_p_GarmanKlassSigma6 swig_types[298]
#define SWIGTYPE_p_GarmanKohlagenProcessPtr swig_types[299]
#define SWIGTYPE_p_GaussChebyshev2ndIntegration swig_types[300]
#define SWIGTYPE_p_GaussChebyshevIntegration swig_types[301]
#define SWIGTYPE_p_GaussGegenbauerIntegration swig_types[302]
#define SWIGTYPE_p_GaussHermiteIntegration swig_types[303]
#define SWIGTYPE_p_GaussHyperbolicIntegration swig_types[304]
#define SWIGTYPE_p_GaussJacobiIntegration swig_types[305]
#define SWIGTYPE_p_GaussKronrodAdaptive swig_types[306]
#define SWIGTYPE_p_GaussKronrodNonAdaptive swig_types[307]
#define SWIGTYPE_p_GaussLaguerreIntegration swig_types[308]
#define SWIGTYPE_p_GaussLegendreIntegration swig_types[309]
#define SWIGTYPE_p_GaussLobattoIntegral swig_types[310]
#define SWIGTYPE_p_Gaussian1dFloatFloatSwaptionEnginePtr swig_types[311]
#define SWIGTYPE_p_Gaussian1dJamshidianSwaptionEnginePtr swig_types[312]
#define SWIGTYPE_p_Gaussian1dModel swig_types[313]
#define SWIGTYPE_p_Gaussian1dNonstandardSwaptionEnginePtr swig_types[314]
#define SWIGTYPE_p_Gaussian1dSwaptionEnginePtr swig_types[315]
#define SWIGTYPE_p_GaussianLowDiscrepancySequenceGenerator swig_types[316]
#define SWIGTYPE_p_GaussianMultiPathGenerator swig_types[317]
#define SWIGTYPE_p_GaussianPathGenerator swig_types[318]
#define SWIGTYPE_p_GaussianRandomGenerator swig_types[319]
#define SWIGTYPE_p_GaussianRandomSequenceGenerator swig_types[320]
#define SWIGTYPE_p_GaussianSimulatedAnnealing swig_types[321]
#define SWIGTYPE_p_GaussianSobolPathGenerator swig_types[322]
#define SWIGTYPE_p_GeneralizedBlackScholesProcessPtr swig_types[323]
#define SWIGTYPE_p_GenericSequenceStatisticsT_IncrementalStatistics_t swig_types[324]
#define SWIGTYPE_p_GenericSequenceStatisticsT_RiskStatistics_t swig_types[325]
#define SWIGTYPE_p_GenericSequenceStatisticsT_Statistics_t swig_types[326]
#define SWIGTYPE_p_GeometricBrownianMotionProcessPtr swig_types[327]
#define SWIGTYPE_p_GsrProcessPtr swig_types[328]
#define SWIGTYPE_p_GsrPtr swig_types[329]
#define SWIGTYPE_p_HaltonRsg swig_types[330]
#define SWIGTYPE_p_HandleT_BlackVolTermStructure_t swig_types[331]
#define SWIGTYPE_p_HandleT_CalibratedModel_t swig_types[332]
#define SWIGTYPE_p_HandleT_CapFloorTermVolatilityStructure_t swig_types[333]
#define SWIGTYPE_p_HandleT_DefaultProbabilityTermStructure_t swig_types[334]
#define SWIGTYPE_p_HandleT_DeltaVolQuote_t swig_types[335]
#define SWIGTYPE_p_HandleT_LocalVolTermStructure_t swig_types[336]
#define SWIGTYPE_p_HandleT_OptionletVolatilityStructure_t swig_types[337]
#define SWIGTYPE_p_HandleT_Quote_t swig_types[338]
#define SWIGTYPE_p_HandleT_ShortRateModel_t swig_types[339]
#define SWIGTYPE_p_HandleT_SwaptionVolatilityStructure_t swig_types[340]
#define SWIGTYPE_p_HandleT_YieldTermStructure_t swig_types[341]
#define SWIGTYPE_p_HandleT_YoYInflationTermStructure_t swig_types[342]
#define SWIGTYPE_p_HandleT_ZeroInflationTermStructure_t swig_types[343]
#define SWIGTYPE_p_HazardRate swig_types[344]
#define SWIGTYPE_p_HazardRateCurvePtr swig_types[345]
#define SWIGTYPE_p_HestonModelHelperPtr swig_types[346]
#define SWIGTYPE_p_HestonModelPtr swig_types[347]
#define SWIGTYPE_p_HestonProcessPtr swig_types[348]
#define SWIGTYPE_p_HimalayaOptionPtr swig_types[349]
#define SWIGTYPE_p_HullWhiteForwardProcessPtr swig_types[350]
#define SWIGTYPE_p_HullWhiteProcessPtr swig_types[351]
#define SWIGTYPE_p_HullWhitePtr swig_types[352]
#define SWIGTYPE_p_IMM swig_types[353]
#define SWIGTYPE_p_IborCouponPricerPtr swig_types[354]
#define SWIGTYPE_p_IborCouponPtr swig_types[355]
#define SWIGTYPE_p_IborIndexPtr swig_types[356]
#define SWIGTYPE_p_ImpliedTermStructurePtr swig_types[357]
#define SWIGTYPE_p_IncrementalStatistics swig_types[358]
#define SWIGTYPE_p_Index swig_types[359]
#define SWIGTYPE_p_IndexManager swig_types[360]
#define SWIGTYPE_p_InflationIndexPtr swig_types[361]
#define SWIGTYPE_p_InflationTermStructure swig_types[362]
#define SWIGTYPE_p_Instrument swig_types[363]
#define SWIGTYPE_p_IntegralCdsEnginePtr swig_types[364]
#define SWIGTYPE_p_IntegralEnginePtr swig_types[365]
#define SWIGTYPE_p_InterestRate swig_types[366]
#define SWIGTYPE_p_InterestRateIndexPtr swig_types[367]
#define SWIGTYPE_p_IntervalPrice swig_types[368]
#define SWIGTYPE_p_InverseCumulativeNormal swig_types[369]
#define SWIGTYPE_p_InverseCumulativePoisson swig_types[370]
#define SWIGTYPE_p_InverseCumulativeRngT_KnuthUniformRng_InverseCumulativeNormal_t swig_types[371]
#define SWIGTYPE_p_InverseCumulativeRngT_KnuthUniformRng_MoroInverseCumulativeNormal_t swig_types[372]
#define SWIGTYPE_p_InverseCumulativeRngT_LecuyerUniformRng_InverseCumulativeNormal_t swig_types[373]
#define SWIGTYPE_p_InverseCumulativeRngT_LecuyerUniformRng_MoroInverseCumulativeNormal_t swig_types[374]
#define SWIGTYPE_p_InverseCumulativeRngT_MersenneTwisterUniformRng_InverseCumulativeNormal_t swig_types[375]
#define SWIGTYPE_p_InverseCumulativeRngT_MersenneTwisterUniformRng_MoroInverseCumulativeNormal_t swig_types[376]
#define SWIGTYPE_p_InverseCumulativeRsgT_HaltonRsg_InverseCumulativeNormal_t swig_types[377]
#define SWIGTYPE_p_InverseCumulativeRsgT_HaltonRsg_MoroInverseCumulativeNormal_t swig_types[378]
#define SWIGTYPE_p_InverseCumulativeRsgT_RandomSequenceGeneratorT_KnuthUniformRng_t_InverseCumulativeNormal_t swig_types[379]
#define SWIGTYPE_p_InverseCumulativeRsgT_RandomSequenceGeneratorT_KnuthUniformRng_t_MoroInverseCumulativeNormal_t swig_types[380]
#define SWIGTYPE_p_InverseCumulativeRsgT_RandomSequenceGeneratorT_LecuyerUniformRng_t_InverseCumulativeNormal_t swig_types[381]
#define SWIGTYPE_p_InverseCumulativeRsgT_RandomSequenceGeneratorT_LecuyerUniformRng_t_MoroInverseCumulativeNormal_t swig_types[382]
#define SWIGTYPE_p_InverseCumulativeRsgT_RandomSequenceGeneratorT_MersenneTwisterUniformRng_t_InverseCumulativeNormal_t swig_types[383]
#define SWIGTYPE_p_InverseCumulativeRsgT_RandomSequenceGeneratorT_MersenneTwisterUniformRng_t_MoroInverseCumulativeNormal_t swig_types[384]
#define SWIGTYPE_p_InverseCumulativeRsgT_SobolRsg_InverseCumulativeNormal_t swig_types[385]
#define SWIGTYPE_p_InverseCumulativeRsgT_SobolRsg_MoroInverseCumulativeNormal_t swig_types[386]
#define SWIGTYPE_p_InverseCumulativeStudent swig_types[387]
#define SWIGTYPE_p_InverseNonCentralCumulativeChiSquareDistribution swig_types[388]
#define SWIGTYPE_p_JPYLiborPtr swig_types[389]
#define SWIGTYPE_p_JamshidianSwaptionEnginePtr swig_types[390]
#define SWIGTYPE_p_JibarPtr swig_types[391]
#define SWIGTYPE_p_KnuthUniformRng swig_types[392]
#define SWIGTYPE_p_LecuyerUniformRng swig_types[393]
#define SWIGTYPE_p_LevenbergMarquardt swig_types[394]
#define SWIGTYPE_p_LiborPtr swig_types[395]
#define SWIGTYPE_p_Linear swig_types[396]
#define SWIGTYPE_p_LinearTsrPricerPtr swig_types[397]
#define SWIGTYPE_p_LinearTsrPricer__Settings swig_types[398]
#define SWIGTYPE_p_LocalConstantVolPtr swig_types[399]
#define SWIGTYPE_p_LocalVolSurfacePtr swig_types[400]
#define SWIGTYPE_p_LocalVolTermStructure swig_types[401]
#define SWIGTYPE_p_LogCubicZeroCurvePtr swig_types[402]
#define SWIGTYPE_p_LogLinear swig_types[403]
#define SWIGTYPE_p_LogLinearZeroCurvePtr swig_types[404]
#define SWIGTYPE_p_LogNormalSimulatedAnnealing swig_types[405]
#define SWIGTYPE_p_MCAmericanBasketEnginePtr swig_types[406]
#define SWIGTYPE_p_MCBarrierEnginePtr swig_types[407]
#define SWIGTYPE_p_MCDiscreteArithmeticAPEnginePtr swig_types[408]
#define SWIGTYPE_p_MCDiscreteArithmeticASEnginePtr swig_types[409]
#define SWIGTYPE_p_MCDiscreteGeometricAPEnginePtr swig_types[410]
#define SWIGTYPE_p_MCEuropeanBasketEnginePtr swig_types[411]
#define SWIGTYPE_p_MCEuropeanEnginePtr swig_types[412]
#define SWIGTYPE_p_MCEverestEnginePtr swig_types[413]
#define SWIGTYPE_p_MCHimalayaEnginePtr swig_types[414]
#define SWIGTYPE_p_MarkovFunctionalPtr swig_types[415]
#define SWIGTYPE_p_MarkovFunctional__ModelSettings swig_types[416]
#define SWIGTYPE_p_Matrix swig_types[417]
#define SWIGTYPE_p_MaxBasketPayoffPtr swig_types[418]
#define SWIGTYPE_p_MersenneTwisterUniformRng swig_types[419]
#define SWIGTYPE_p_Merton76ProcessPtr swig_types[420]
#define SWIGTYPE_p_MidPointCdsEnginePtr swig_types[421]
#define SWIGTYPE_p_MinBasketPayoffPtr swig_types[422]
#define SWIGTYPE_p_MirrorGaussianSimulatedAnnealing swig_types[423]
#define SWIGTYPE_p_Money swig_types[424]
#define SWIGTYPE_p_MonotonicCubic swig_types[425]
#define SWIGTYPE_p_MonotonicCubicZeroCurvePtr swig_types[426]
#define SWIGTYPE_p_MonotonicLogCubic swig_types[427]
#define SWIGTYPE_p_MoroInverseCumulativeNormal swig_types[428]
#define SWIGTYPE_p_MultiAssetOptionPtr swig_types[429]
#define SWIGTYPE_p_MultiPath swig_types[430]
#define SWIGTYPE_p_MultiplicativePriceSeasonalityPtr swig_types[431]
#define SWIGTYPE_p_NZDLiborPtr swig_types[432]
#define SWIGTYPE_p_NelsonSiegelFitting swig_types[433]
#define SWIGTYPE_p_NeumannBCPtr swig_types[434]
#define SWIGTYPE_p_NoConstraint swig_types[435]
#define SWIGTYPE_p_NonCentralCumulativeChiSquareDistribution swig_types[436]
#define SWIGTYPE_p_NonhomogeneousBoundaryConstraint swig_types[437]
#define SWIGTYPE_p_NonstandardSwapPtr swig_types[438]
#define SWIGTYPE_p_NonstandardSwaptionPtr swig_types[439]
#define SWIGTYPE_p_NormalDistribution swig_types[440]
#define SWIGTYPE_p_NullParameter swig_types[441]
#define SWIGTYPE_p_NumericHaganPricerPtr swig_types[442]
#define SWIGTYPE_p_NzocrPtr swig_types[443]
#define SWIGTYPE_p_OISRateHelperPtr swig_types[444]
#define SWIGTYPE_p_Observable swig_types[445]
#define SWIGTYPE_p_OptimizationMethod swig_types[446]
#define SWIGTYPE_p_Optimizer swig_types[447]
#define SWIGTYPE_p_Option swig_types[448]
#define SWIGTYPE_p_OptionletStripper1Ptr swig_types[449]
#define SWIGTYPE_p_OptionletVolatilityStructure swig_types[450]
#define SWIGTYPE_p_OvernightIndexPtr swig_types[451]
#define SWIGTYPE_p_Parameter swig_types[452]
#define SWIGTYPE_p_ParkinsonSigma swig_types[453]
#define SWIGTYPE_p_Path swig_types[454]
#define SWIGTYPE_p_Payoff swig_types[455]
#define SWIGTYPE_p_PercentageStrikePayoffPtr swig_types[456]
#define SWIGTYPE_p_Period swig_types[457]
#define SWIGTYPE_p_PeriodParser swig_types[458]
#define SWIGTYPE_p_PiecewiseConstantParameter swig_types[459]
#define SWIGTYPE_p_PiecewiseCubicZeroPtr swig_types[460]
#define SWIGTYPE_p_PiecewiseFlatForwardPtr swig_types[461]
#define SWIGTYPE_p_PiecewiseFlatHazardRatePtr swig_types[462]
#define SWIGTYPE_p_PiecewiseLinearForwardPtr swig_types[463]
#define SWIGTYPE_p_PiecewiseLinearZeroPtr swig_types[464]
#define SWIGTYPE_p_PiecewiseLogCubicDiscountPtr swig_types[465]
#define SWIGTYPE_p_PiecewiseTimeDependentHestonModelPtr swig_types[466]
#define SWIGTYPE_p_PiecewiseYoYInflationPtr swig_types[467]
#define SWIGTYPE_p_PiecewiseZeroInflationPtr swig_types[468]
#define SWIGTYPE_p_Pillar swig_types[469]
#define SWIGTYPE_p_PlainVanillaPayoffPtr swig_types[470]
#define SWIGTYPE_p_PoissonDistribution swig_types[471]
#define SWIGTYPE_p_Position swig_types[472]
#define SWIGTYPE_p_PositiveConstraint swig_types[473]
#define SWIGTYPE_p_PricingEngine swig_types[474]
#define SWIGTYPE_p_ProbabilityBoltzmannDownhill swig_types[475]
#define SWIGTYPE_p_Protection swig_types[476]
#define SWIGTYPE_p_QuantLib__ARSCurrency swig_types[477]
#define SWIGTYPE_p_QuantLib__ATSCurrency swig_types[478]
#define SWIGTYPE_p_QuantLib__AUDCurrency swig_types[479]
#define SWIGTYPE_p_QuantLib__Actual360 swig_types[480]
#define SWIGTYPE_p_QuantLib__Actual365Fixed swig_types[481]
#define SWIGTYPE_p_QuantLib__ActualActual swig_types[482]
#define SWIGTYPE_p_QuantLib__Argentina swig_types[483]
#define SWIGTYPE_p_QuantLib__Australia swig_types[484]
#define SWIGTYPE_p_QuantLib__BDTCurrency swig_types[485]
#define SWIGTYPE_p_QuantLib__BEFCurrency swig_types[486]
#define SWIGTYPE_p_QuantLib__BGLCurrency swig_types[487]
#define SWIGTYPE_p_QuantLib__BRLCurrency swig_types[488]
#define SWIGTYPE_p_QuantLib__BYRCurrency swig_types[489]
#define SWIGTYPE_p_QuantLib__BespokeCalendar swig_types[490]
#define SWIGTYPE_p_QuantLib__Brazil swig_types[491]
#define SWIGTYPE_p_QuantLib__Business252 swig_types[492]
#define SWIGTYPE_p_QuantLib__CADCurrency swig_types[493]
#define SWIGTYPE_p_QuantLib__CHFCurrency swig_types[494]
#define SWIGTYPE_p_QuantLib__CLPCurrency swig_types[495]
#define SWIGTYPE_p_QuantLib__CNYCurrency swig_types[496]
#define SWIGTYPE_p_QuantLib__COPCurrency swig_types[497]
#define SWIGTYPE_p_QuantLib__CYPCurrency swig_types[498]
#define SWIGTYPE_p_QuantLib__CZKCurrency swig_types[499]
#define SWIGTYPE_p_QuantLib__Canada swig_types[500]
#define SWIGTYPE_p_QuantLib__China swig_types[501]
#define SWIGTYPE_p_QuantLib__CzechRepublic swig_types[502]
#define SWIGTYPE_p_QuantLib__DEMCurrency swig_types[503]
#define SWIGTYPE_p_QuantLib__DKKCurrency swig_types[504]
#define SWIGTYPE_p_QuantLib__Denmark swig_types[505]
#define SWIGTYPE_p_QuantLib__EEKCurrency swig_types[506]
#define SWIGTYPE_p_QuantLib__ESPCurrency swig_types[507]
#define SWIGTYPE_p_QuantLib__EURCurrency swig_types[508]
#define SWIGTYPE_p_QuantLib__FIMCurrency swig_types[509]
#define SWIGTYPE_p_QuantLib__FRFCurrency swig_types[510]
#define SWIGTYPE_p_QuantLib__Finland swig_types[511]
#define SWIGTYPE_p_QuantLib__GBPCurrency swig_types[512]
#define SWIGTYPE_p_QuantLib__GRDCurrency swig_types[513]
#define SWIGTYPE_p_QuantLib__Germany swig_types[514]
#define SWIGTYPE_p_QuantLib__HKDCurrency swig_types[515]
#define SWIGTYPE_p_QuantLib__HUFCurrency swig_types[516]
#define SWIGTYPE_p_QuantLib__HongKong swig_types[517]
#define SWIGTYPE_p_QuantLib__Hungary swig_types[518]
#define SWIGTYPE_p_QuantLib__IDRCurrency swig_types[519]
#define SWIGTYPE_p_QuantLib__IEPCurrency swig_types[520]
#define SWIGTYPE_p_QuantLib__ILSCurrency swig_types[521]
#define SWIGTYPE_p_QuantLib__INRCurrency swig_types[522]
#define SWIGTYPE_p_QuantLib__IQDCurrency swig_types[523]
#define SWIGTYPE_p_QuantLib__IRRCurrency swig_types[524]
#define SWIGTYPE_p_QuantLib__ISKCurrency swig_types[525]
#define SWIGTYPE_p_QuantLib__ITLCurrency swig_types[526]
#define SWIGTYPE_p_QuantLib__Iceland swig_types[527]
#define SWIGTYPE_p_QuantLib__India swig_types[528]
#define SWIGTYPE_p_QuantLib__Indonesia swig_types[529]
#define SWIGTYPE_p_QuantLib__Israel swig_types[530]
#define SWIGTYPE_p_QuantLib__Italy swig_types[531]
#define SWIGTYPE_p_QuantLib__JPYCurrency swig_types[532]
#define SWIGTYPE_p_QuantLib__Japan swig_types[533]
#define SWIGTYPE_p_QuantLib__JointCalendar swig_types[534]
#define SWIGTYPE_p_QuantLib__KRWCurrency swig_types[535]
#define SWIGTYPE_p_QuantLib__KWDCurrency swig_types[536]
#define SWIGTYPE_p_QuantLib__LTLCurrency swig_types[537]
#define SWIGTYPE_p_QuantLib__LUFCurrency swig_types[538]
#define SWIGTYPE_p_QuantLib__LVLCurrency swig_types[539]
#define SWIGTYPE_p_QuantLib__MTLCurrency swig_types[540]
#define SWIGTYPE_p_QuantLib__MXNCurrency swig_types[541]
#define SWIGTYPE_p_QuantLib__MYRCurrency swig_types[542]
#define SWIGTYPE_p_QuantLib__Mexico swig_types[543]
#define SWIGTYPE_p_QuantLib__NLGCurrency swig_types[544]
#define SWIGTYPE_p_QuantLib__NOKCurrency swig_types[545]
#define SWIGTYPE_p_QuantLib__NPRCurrency swig_types[546]
#define SWIGTYPE_p_QuantLib__NZDCurrency swig_types[547]
#define SWIGTYPE_p_QuantLib__NewZealand swig_types[548]
#define SWIGTYPE_p_QuantLib__Norway swig_types[549]
#define SWIGTYPE_p_QuantLib__NullCalendar swig_types[550]
#define SWIGTYPE_p_QuantLib__OneDayCounter swig_types[551]
#define SWIGTYPE_p_QuantLib__PEHCurrency swig_types[552]
#define SWIGTYPE_p_QuantLib__PEICurrency swig_types[553]
#define SWIGTYPE_p_QuantLib__PENCurrency swig_types[554]
#define SWIGTYPE_p_QuantLib__PKRCurrency swig_types[555]
#define SWIGTYPE_p_QuantLib__PLNCurrency swig_types[556]
#define SWIGTYPE_p_QuantLib__PTECurrency swig_types[557]
#define SWIGTYPE_p_QuantLib__Poland swig_types[558]
#define SWIGTYPE_p_QuantLib__ROLCurrency swig_types[559]
#define SWIGTYPE_p_QuantLib__RONCurrency swig_types[560]
#define SWIGTYPE_p_QuantLib__RUBCurrency swig_types[561]
#define SWIGTYPE_p_QuantLib__Romania swig_types[562]
#define SWIGTYPE_p_QuantLib__Russia swig_types[563]
#define SWIGTYPE_p_QuantLib__SARCurrency swig_types[564]
#define SWIGTYPE_p_QuantLib__SEKCurrency swig_types[565]
#define SWIGTYPE_p_QuantLib__SGDCurrency swig_types[566]
#define SWIGTYPE_p_QuantLib__SITCurrency swig_types[567]
#define SWIGTYPE_p_QuantLib__SKKCurrency swig_types[568]
#define SWIGTYPE_p_QuantLib__SaudiArabia swig_types[569]
#define SWIGTYPE_p_QuantLib__SimpleDayCounter swig_types[570]
#define SWIGTYPE_p_QuantLib__Singapore swig_types[571]
#define SWIGTYPE_p_QuantLib__Slovakia swig_types[572]
#define SWIGTYPE_p_QuantLib__SouthAfrica swig_types[573]
#define SWIGTYPE_p_QuantLib__SouthKorea swig_types[574]
#define SWIGTYPE_p_QuantLib__Sweden swig_types[575]
#define SWIGTYPE_p_QuantLib__Switzerland swig_types[576]
#define SWIGTYPE_p_QuantLib__TARGET swig_types[577]
#define SWIGTYPE_p_QuantLib__THBCurrency swig_types[578]
#define SWIGTYPE_p_QuantLib__TRLCurrency swig_types[579]
#define SWIGTYPE_p_QuantLib__TRYCurrency swig_types[580]
#define SWIGTYPE_p_QuantLib__TTDCurrency swig_types[581]
#define SWIGTYPE_p_QuantLib__TWDCurrency swig_types[582]
#define SWIGTYPE_p_QuantLib__Taiwan swig_types[583]
#define SWIGTYPE_p_QuantLib__Thirty360 swig_types[584]
#define SWIGTYPE_p_QuantLib__Turkey swig_types[585]
#define SWIGTYPE_p_QuantLib__USDCurrency swig_types[586]
#define SWIGTYPE_p_QuantLib__Ukraine swig_types[587]
#define SWIGTYPE_p_QuantLib__UnitedKingdom swig_types[588]
#define SWIGTYPE_p_QuantLib__UnitedStates swig_types[589]
#define SWIGTYPE_p_QuantLib__VEBCurrency swig_types[590]
#define SWIGTYPE_p_QuantLib__VNDCurrency swig_types[591]
#define SWIGTYPE_p_QuantLib__WeekendsOnly swig_types[592]
#define SWIGTYPE_p_QuantLib__ZARCurrency swig_types[593]
#define SWIGTYPE_p_QuantoDoubleBarrierOptionPtr swig_types[594]
#define SWIGTYPE_p_QuantoEuropeanEnginePtr swig_types[595]
#define SWIGTYPE_p_QuantoForwardEuropeanEnginePtr swig_types[596]
#define SWIGTYPE_p_QuantoForwardVanillaOptionPtr swig_types[597]
#define SWIGTYPE_p_QuantoVanillaOptionPtr swig_types[598]
#define SWIGTYPE_p_Quote swig_types[599]
#define SWIGTYPE_p_RandomSequenceGeneratorT_KnuthUniformRng_t swig_types[600]
#define SWIGTYPE_p_RandomSequenceGeneratorT_LecuyerUniformRng_t swig_types[601]
#define SWIGTYPE_p_RandomSequenceGeneratorT_MersenneTwisterUniformRng_t swig_types[602]
#define SWIGTYPE_p_RateHelper swig_types[603]
#define SWIGTYPE_p_RealTimeSeries swig_types[604]
#define SWIGTYPE_p_ReannealingTrivial swig_types[605]
#define SWIGTYPE_p_RebatedExercisePtr swig_types[606]
#define SWIGTYPE_p_RedemptionPtr swig_types[607]
#define SWIGTYPE_p_Region swig_types[608]
#define SWIGTYPE_p_RelinkableHandleT_BlackVolTermStructure_t swig_types[609]
#define SWIGTYPE_p_RelinkableHandleT_CalibratedModel_t swig_types[610]
#define SWIGTYPE_p_RelinkableHandleT_CapFloorTermVolatilityStructure_t swig_types[611]
#define SWIGTYPE_p_RelinkableHandleT_DefaultProbabilityTermStructure_t swig_types[612]
#define SWIGTYPE_p_RelinkableHandleT_DeltaVolQuote_t swig_types[613]
#define SWIGTYPE_p_RelinkableHandleT_LocalVolTermStructure_t swig_types[614]
#define SWIGTYPE_p_RelinkableHandleT_OptionletVolatilityStructure_t swig_types[615]
#define SWIGTYPE_p_RelinkableHandleT_Quote_t swig_types[616]
#define SWIGTYPE_p_RelinkableHandleT_ShortRateModel_t swig_types[617]
#define SWIGTYPE_p_RelinkableHandleT_SwaptionVolatilityStructure_t swig_types[618]
#define SWIGTYPE_p_RelinkableHandleT_YieldTermStructure_t swig_types[619]
#define SWIGTYPE_p_RelinkableHandleT_YoYInflationTermStructure_t swig_types[620]
#define SWIGTYPE_p_RelinkableHandleT_ZeroInflationTermStructure_t swig_types[621]
#define SWIGTYPE_p_Ridder swig_types[622]
#define SWIGTYPE_p_RiskStatistics swig_types[623]
#define SWIGTYPE_p_Rounding swig_types[624]
#define SWIGTYPE_p_SEKLiborPtr swig_types[625]
#define SWIGTYPE_p_SVD swig_types[626]
#define SWIGTYPE_p_SafeBackwardFlatInterpolation swig_types[627]
#define SWIGTYPE_p_SafeBicubicSpline swig_types[628]
#define SWIGTYPE_p_SafeBilinearInterpolation swig_types[629]
#define SWIGTYPE_p_SafeCubicNaturalSpline swig_types[630]
#define SWIGTYPE_p_SafeForwardFlatInterpolation swig_types[631]
#define SWIGTYPE_p_SafeFritschButlandCubic swig_types[632]
#define SWIGTYPE_p_SafeFritschButlandLogCubic swig_types[633]
#define SWIGTYPE_p_SafeKrugerCubic swig_types[634]
#define SWIGTYPE_p_SafeKrugerLogCubic swig_types[635]
#define SWIGTYPE_p_SafeLinearInterpolation swig_types[636]
#define SWIGTYPE_p_SafeLogCubicNaturalSpline swig_types[637]
#define SWIGTYPE_p_SafeLogLinearInterpolation swig_types[638]
#define SWIGTYPE_p_SafeLogParabolic swig_types[639]
#define SWIGTYPE_p_SafeMonotonicCubicNaturalSpline swig_types[640]
#define SWIGTYPE_p_SafeMonotonicLogCubicNaturalSpline swig_types[641]
#define SWIGTYPE_p_SafeMonotonicLogParabolic swig_types[642]
#define SWIGTYPE_p_SafeMonotonicParabolic swig_types[643]
#define SWIGTYPE_p_SafeParabolic swig_types[644]
#define SWIGTYPE_p_SalvagingAlgorithm swig_types[645]
#define SWIGTYPE_p_SampleT_Array_t swig_types[646]
#define SWIGTYPE_p_SampleT_MultiPath_t swig_types[647]
#define SWIGTYPE_p_SampleT_Path_t swig_types[648]
#define SWIGTYPE_p_SampleT_double_t swig_types[649]
#define SWIGTYPE_p_SampleT_std__vectorT_double_t_t swig_types[650]
#define SWIGTYPE_p_SampledCurve swig_types[651]
#define SWIGTYPE_p_SamplerGaussian swig_types[652]
#define SWIGTYPE_p_SamplerLogNormal swig_types[653]
#define SWIGTYPE_p_SamplerMirrorGaussian swig_types[654]
#define SWIGTYPE_p_Schedule swig_types[655]
#define SWIGTYPE_p_Seasonality swig_types[656]
#define SWIGTYPE_p_Secant swig_types[657]
#define SWIGTYPE_p_SegmentIntegral swig_types[658]
#define SWIGTYPE_p_Settings swig_types[659]
#define SWIGTYPE_p_Settlement swig_types[660]
#define SWIGTYPE_p_ShortRateModel swig_types[661]
#define SWIGTYPE_p_SimpleCashFlowPtr swig_types[662]
#define SWIGTYPE_p_SimplePolynomialFitting swig_types[663]
#define SWIGTYPE_p_SimpleQuotePtr swig_types[664]
#define SWIGTYPE_p_Simplex swig_types[665]
#define SWIGTYPE_p_SimpsonIntegral swig_types[666]
#define SWIGTYPE_p_SobolBrownianBridgeRsg swig_types[667]
#define SWIGTYPE_p_SobolRsg swig_types[668]
#define SWIGTYPE_p_SoftCallabilityPtr swig_types[669]
#define SWIGTYPE_p_SoniaPtr swig_types[670]
#define SWIGTYPE_p_SpreadCdsHelperPtr swig_types[671]
#define SWIGTYPE_p_SpreadedLinearZeroInterpolatedTermStructurePtr swig_types[672]
#define SWIGTYPE_p_Statistics swig_types[673]
#define SWIGTYPE_p_SteepestDescent swig_types[674]
#define SWIGTYPE_p_StochasticProcess swig_types[675]
#define SWIGTYPE_p_StochasticProcess1DPtr swig_types[676]
#define SWIGTYPE_p_StochasticProcessArrayPtr swig_types[677]
#define SWIGTYPE_p_StockPtr swig_types[678]
#define SWIGTYPE_p_StrippedOptionletAdapterPtr swig_types[679]
#define SWIGTYPE_p_StrippedOptionletBase swig_types[680]
#define SWIGTYPE_p_StudentDistribution swig_types[681]
#define SWIGTYPE_p_StulzEnginePtr swig_types[682]
#define SWIGTYPE_p_SuperSharePayoffPtr swig_types[683]
#define SWIGTYPE_p_SvenssonFitting swig_types[684]
#define SWIGTYPE_p_SwapIndexPtr swig_types[685]
#define SWIGTYPE_p_SwapPtr swig_types[686]
#define SWIGTYPE_p_SwapRateHelperPtr swig_types[687]
#define SWIGTYPE_p_SwaptionHelperPtr swig_types[688]
#define SWIGTYPE_p_SwaptionPtr swig_types[689]
#define SWIGTYPE_p_SwaptionVolCube1Ptr swig_types[690]
#define SWIGTYPE_p_SwaptionVolCube2Ptr swig_types[691]
#define SWIGTYPE_p_SwaptionVolatilityMatrixPtr swig_types[692]
#define SWIGTYPE_p_SwaptionVolatilityStructure swig_types[693]
#define SWIGTYPE_p_TRLiborPtr swig_types[694]
#define SWIGTYPE_p_TemperatureExponential swig_types[695]
#define SWIGTYPE_p_TiborPtr swig_types[696]
#define SWIGTYPE_p_TimeBasket swig_types[697]
#define SWIGTYPE_p_TimeGrid swig_types[698]
#define SWIGTYPE_p_TimeSeriesT_IntervalPrice_std__mapT_Date_IntervalPrice_t_t swig_types[699]
#define SWIGTYPE_p_TimeSeriesT_double_std__mapT_Date_double_t_t swig_types[700]
#define SWIGTYPE_p_TrapezoidIntegralT_Default_t swig_types[701]
#define SWIGTYPE_p_TrapezoidIntegralT_MidPoint_t swig_types[702]
#define SWIGTYPE_p_TreeCallableFixedRateBondEnginePtr swig_types[703]
#define SWIGTYPE_p_TreeCapFloorEnginePtr swig_types[704]
#define SWIGTYPE_p_TreeSwaptionEnginePtr swig_types[705]
#define SWIGTYPE_p_TridiagonalOperator swig_types[706]
#define SWIGTYPE_p_UKRPIPtr swig_types[707]
#define SWIGTYPE_p_USCPIPtr swig_types[708]
#define SWIGTYPE_p_USDLiborPtr swig_types[709]
#define SWIGTYPE_p_UniformLowDiscrepancySequenceGenerator swig_types[710]
#define SWIGTYPE_p_UniformRandomGenerator swig_types[711]
#define SWIGTYPE_p_UniformRandomSequenceGenerator swig_types[712]
#define SWIGTYPE_p_UpRounding swig_types[713]
#define SWIGTYPE_p_UpfrontCdsHelperPtr swig_types[714]
#define SWIGTYPE_p_VanillaOptionPtr swig_types[715]
#define SWIGTYPE_p_VanillaSwapPtr swig_types[716]
#define SWIGTYPE_p_VannaVolgaDoubleBarrierEnginePtr swig_types[717]
#define SWIGTYPE_p_VarianceGammaEnginePtr swig_types[718]
#define SWIGTYPE_p_VarianceGammaProcessPtr swig_types[719]
#define SWIGTYPE_p_VasicekPtr swig_types[720]
#define SWIGTYPE_p_WulinYongDoubleBarrierEnginePtr swig_types[721]
#define SWIGTYPE_p_YYEUHICPPtr swig_types[722]
#define SWIGTYPE_p_YYEUHICPXTPtr swig_types[723]
#define SWIGTYPE_p_YYFRHICPPtr swig_types[724]
#define SWIGTYPE_p_YYUKRPIPtr swig_types[725]
#define SWIGTYPE_p_YYUSCPIPtr swig_types[726]
#define SWIGTYPE_p_YYZACPIPtr swig_types[727]
#define SWIGTYPE_p_YearOnYearInflationSwapHelperPtr swig_types[728]
#define SWIGTYPE_p_YearOnYearInflationSwapPtr swig_types[729]
#define SWIGTYPE_p_YieldTermStructure swig_types[730]
#define SWIGTYPE_p_YoYHelper swig_types[731]
#define SWIGTYPE_p_YoYInflationCapFloorPtr swig_types[732]
#define SWIGTYPE_p_YoYInflationCapPtr swig_types[733]
#define SWIGTYPE_p_YoYInflationCollarPtr swig_types[734]
#define SWIGTYPE_p_YoYInflationFloorPtr swig_types[735]
#define SWIGTYPE_p_YoYInflationIndexPtr swig_types[736]
#define SWIGTYPE_p_YoYInflationTermStructure swig_types[737]
#define SWIGTYPE_p_ZACPIPtr swig_types[738]
#define SWIGTYPE_p_ZeroCouponBondPtr swig_types[739]
#define SWIGTYPE_p_ZeroCouponInflationSwapHelperPtr swig_types[740]
#define SWIGTYPE_p_ZeroCouponInflationSwapPtr swig_types[741]
#define SWIGTYPE_p_ZeroCurvePtr swig_types[742]
#define SWIGTYPE_p_ZeroHelper swig_types[743]
#define SWIGTYPE_p_ZeroInflationIndexPtr swig_types[744]
#define SWIGTYPE_p_ZeroInflationTermStructure swig_types[745]
#define SWIGTYPE_p_ZeroSpreadedTermStructurePtr swig_types[746]
#define SWIGTYPE_p_ZeroYield swig_types[747]
#define SWIGTYPE_p_ZiborPtr swig_types[748]
#define SWIGTYPE_p_boost__shared_ptrT_BlackVolTermStructure_t swig_types[749]
#define SWIGTYPE_p_boost__shared_ptrT_CalibratedModel_t swig_types[750]
#define SWIGTYPE_p_boost__shared_ptrT_CalibrationHelper_t swig_types[751]
#define SWIGTYPE_p_boost__shared_ptrT_Callability_t swig_types[752]
#define SWIGTYPE_p_boost__shared_ptrT_CapFloorTermVolatilityStructure_t swig_types[753]
#define SWIGTYPE_p_boost__shared_ptrT_CashFlow_t swig_types[754]
#define SWIGTYPE_p_boost__shared_ptrT_DefaultBoundaryCondition_t swig_types[755]
#define SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityHelper_t swig_types[756]
#define SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityTermStructure_t swig_types[757]
#define SWIGTYPE_p_boost__shared_ptrT_DeltaVolQuote_t swig_types[758]
#define SWIGTYPE_p_boost__shared_ptrT_Dividend_t swig_types[759]
#define SWIGTYPE_p_boost__shared_ptrT_EndCriteria_t swig_types[760]
#define SWIGTYPE_p_boost__shared_ptrT_Exercise_t swig_types[761]
#define SWIGTYPE_p_boost__shared_ptrT_FloatingRateCouponPricer_t swig_types[762]
#define SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t swig_types[763]
#define SWIGTYPE_p_boost__shared_ptrT_IborIndex_t swig_types[764]
#define SWIGTYPE_p_boost__shared_ptrT_Index_t swig_types[765]
#define SWIGTYPE_p_boost__shared_ptrT_Instrument_t swig_types[766]
#define SWIGTYPE_p_boost__shared_ptrT_LocalVolTermStructure_t swig_types[767]
#define SWIGTYPE_p_boost__shared_ptrT_Observable_t swig_types[768]
#define SWIGTYPE_p_boost__shared_ptrT_OptimizationMethod_t swig_types[769]
#define SWIGTYPE_p_boost__shared_ptrT_OptionletVolatilityStructure_t swig_types[770]
#define SWIGTYPE_p_boost__shared_ptrT_Payoff_t swig_types[771]
#define SWIGTYPE_p_boost__shared_ptrT_PricingEngine_t swig_types[772]
#define SWIGTYPE_p_boost__shared_ptrT_Quote_t swig_types[773]
#define SWIGTYPE_p_boost__shared_ptrT_RateHelper_t swig_types[774]
#define SWIGTYPE_p_boost__shared_ptrT_Seasonality_t swig_types[775]
#define SWIGTYPE_p_boost__shared_ptrT_ShortRateModel_t swig_types[776]
#define SWIGTYPE_p_boost__shared_ptrT_StochasticProcess_t swig_types[777]
#define SWIGTYPE_p_boost__shared_ptrT_StrippedOptionletBase_t swig_types[778]
#define SWIGTYPE_p_boost__shared_ptrT_SwapIndex_t swig_types[779]
#define SWIGTYPE_p_boost__shared_ptrT_SwaptionVolatilityStructure_t swig_types[780]
#define SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t swig_types[781]
#define SWIGTYPE_p_boost__shared_ptrT_YoYHelper_t swig_types[782]
#define SWIGTYPE_p_boost__shared_ptrT_YoYInflationTermStructure_t swig_types[783]
#define SWIGTYPE_p_boost__shared_ptrT_ZeroHelper_t swig_types[784]
#define SWIGTYPE_p_boost__shared_ptrT_ZeroInflationTermStructure_t swig_types[785]
#define SWIGTYPE_p_char swig_types[786]
#define SWIGTYPE_p_double swig_types[787]
#define SWIGTYPE_p_doubleOrNull swig_types[788]
#define SWIGTYPE_p_int swig_types[789]
#define SWIGTYPE_p_intOrNull swig_types[790]
#define SWIGTYPE_p_long swig_types[791]
#define SWIGTYPE_p_size_type swig_types[792]
#define SWIGTYPE_p_std__out_of_range swig_types[793]
#define SWIGTYPE_p_std__pairT_Date_double_t swig_types[794]
#define SWIGTYPE_p_std__size_t swig_types[795]
#define SWIGTYPE_p_std__vectorT_Date_t swig_types[796]
#define SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t swig_types[797]
#define SWIGTYPE_p_std__vectorT_InterestRate_t swig_types[798]
#define SWIGTYPE_p_std__vectorT_IntervalPrice_t swig_types[799]
#define SWIGTYPE_p_std__vectorT_Period_t swig_types[800]
#define SWIGTYPE_p_std__vectorT_RelinkableHandleT_Quote_t_t swig_types[801]
#define SWIGTYPE_p_std__vectorT_bool_t swig_types[802]
#define SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CalibrationHelper_t_t swig_types[803]
#define SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Callability_t_t swig_types[804]
#define SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t swig_types[805]
#define SWIGTYPE_p_std__vectorT_boost__shared_ptrT_DefaultProbabilityHelper_t_t swig_types[806]
#define SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Dividend_t_t swig_types[807]
#define SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Instrument_t_t swig_types[808]
#define SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Quote_t_t swig_types[809]
#define SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t swig_types[810]
#define SWIGTYPE_p_std__vectorT_boost__shared_ptrT_StochasticProcess_t_t swig_types[811]
#define SWIGTYPE_p_std__vectorT_boost__shared_ptrT_YoYHelper_t_t swig_types[812]
#define SWIGTYPE_p_std__vectorT_boost__shared_ptrT_ZeroHelper_t_t swig_types[813]
#define SWIGTYPE_p_std__vectorT_double_t swig_types[814]
#define SWIGTYPE_p_std__vectorT_int_t swig_types[815]
#define SWIGTYPE_p_std__vectorT_std__pairT_Date_double_t_t swig_types[816]
#define SWIGTYPE_p_std__vectorT_std__string_t swig_types[817]
#define SWIGTYPE_p_std__vectorT_std__vectorT_HandleT_Quote_t_t_t swig_types[818]
#define SWIGTYPE_p_std__vectorT_std__vectorT_RelinkableHandleT_Quote_t_t_t swig_types[819]
#define SWIGTYPE_p_std__vectorT_std__vectorT_boost__shared_ptrT_Quote_t_t_t swig_types[820]
#define SWIGTYPE_p_std__vectorT_std__vectorT_double_t_t swig_types[821]
#define SWIGTYPE_p_std__vectorT_unsigned_int_t swig_types[822]
#define SWIGTYPE_p_unsigned_int swig_types[823]
#define SWIGTYPE_p_unsigned_long swig_types[824]
#define SWIGTYPE_p_value_type swig_types[825]
static swig_type_info *swig_types[827];
static swig_module_info swig_module = {swig_types, 826, 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) -------- */

#define SWIG_init    boot_QuantLib

#define SWIG_name   "QuantLibc::boot_QuantLib"
#define SWIG_prefix "QuantLibc::"

#define SWIGVERSION 0x030012 
#define SWIG_VERSION SWIGVERSION


#define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a)) 
#define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a)) 


#include <stdexcept>


#ifdef __cplusplus
extern "C"
#endif
#ifndef PERL_OBJECT
#ifndef MULTIPLICITY
SWIGEXPORT void SWIG_init (CV* cv);
#else
SWIGEXPORT void SWIG_init (pTHXo_ CV* cv);
#endif
#else
SWIGEXPORT void SWIG_init (CV *cv, CPerlObj *);
#endif


#ifdef accept
#undef accept
#endif
#ifdef Null
#undef Null
#endif
#ifdef Nullch
#undef Nullch
#define Nullch ((char*) NULL)
#endif
#ifdef Stat
#undef Stat
#endif
#ifdef seed
#undef seed
#endif
#ifdef setbuf
#undef setbuf
#endif
#ifdef times
#undef times
#endif


#include <ql/quantlib.hpp>

#if QL_HEX_VERSION < 0x011200f0
    #error using an old version of QuantLib, please update
#endif

#ifdef BOOST_MSVC
#ifdef QL_ENABLE_THREAD_SAFE_OBSERVER_PATTERN
#define BOOST_LIB_NAME boost_thread
#include <boost/config/auto_link.hpp>
#undef BOOST_LIB_NAME
#define BOOST_LIB_NAME boost_system
#include <boost/config/auto_link.hpp>
#undef BOOST_LIB_NAME
#endif
#endif

#if defined (SWIGJAVA) || defined (SWIGCSHARP) 
  #ifndef QL_ENABLE_THREAD_SAFE_OBSERVER_PATTERN
    #ifdef BOOST_MSVC
      #pragma message(\
          "Quantlib has not been compiled with the thread-safe "           \
          "observer pattern being enabled. This can lead to spurious "     \
          "crashes or pure virtual function call within the JVM or .NET "  \
          "ecosystem due to the async garbage collector. Please consider " \
          "enabling QL_ENABLE_THREAD_SAFE_OBSERVER_PATTERN "               \
          "in ql/userconfig.hpp.")
    #else
      #warning \
          Quantlib has not been compiled with the thread-safe           \
          observer pattern being enabled. This can lead to spurious     \
          crashes or pure virtual function call within the JVM or .NET  \
          ecosystem due to the async garbage collector. Please consider \
          passing --enable-thread-safe-observer-pattern when using the  \
          GNU autoconf configure script.
    #endif
  #endif
#endif


// add here SWIG version check

#if defined(_MSC_VER)         // Microsoft Visual C++ 6.0
// disable Swig-dependent warnings

// 'identifier1' has C-linkage specified,
// but returns UDT 'identifier2' which is incompatible with C
#pragma warning(disable: 4190)

// 'int' : forcing value to bool 'true' or 'false' (performance warning)
#pragma warning(disable: 4800)

// debug info too long etc etc
#pragma warning(disable: 4786)
#endif


#include <typeinfo>
#include <stdexcept>


#include <string>


SWIGINTERN
double SwigSvToNumber(SV* sv) {
    return SvIOK(sv) ? double(SvIVX(sv)) : SvNVX(sv);
}
SWIGINTERN
std::string SwigSvToString(SV* sv) {
    STRLEN len;
    char *ptr = SvPV(sv, len);
    return std::string(ptr, len);
}
SWIGINTERN
void SwigSvFromString(SV* sv, const std::string& s) {
    sv_setpvn(sv,s.data(),s.size());
}


#include <vector>


#include <algorithm>


#include <map>


#include <utility>


// This is necessary to avoid compile failures on 
// GCC 4
// see http://svn.boost.org/trac/boost/ticket/1793

#if defined(NDEBUG)
#define BOOST_DISABLE_ASSERTS 1
#endif

#include <boost/algorithm/string/case_conv.hpp>


// generally useful classes
using QuantLib::Error;
using QuantLib::Handle;
using QuantLib::RelinkableHandle;


using QuantLib::Integer;
using QuantLib::BigInteger;
using QuantLib::Natural;
using QuantLib::BigNatural;
using QuantLib::Real;
using QuantLib::Decimal;
using QuantLib::Time;
using QuantLib::Rate;
using QuantLib::Spread;
using QuantLib::DiscountFactor;
using QuantLib::Volatility;
using QuantLib::Probability;
using QuantLib::Size;


#ifndef QL_HIGH_RESOLUTION_DATE
    // They are not defined in the library, so we define them here
    namespace QuantLib {
        typedef int Hour;
        typedef int Minute;
        typedef int Second;
        typedef int Millisecond;
        typedef int Microsecond;
    }
#endif

using QuantLib::Day;
using QuantLib::Year;
using QuantLib::Hour;
using QuantLib::Minute;
using QuantLib::Second;
using QuantLib::Millisecond;
using QuantLib::Microsecond;


using QuantLib::Weekday;
using QuantLib::Sunday;
using QuantLib::Monday;
using QuantLib::Tuesday;
using QuantLib::Wednesday;
using QuantLib::Thursday;
using QuantLib::Friday;
using QuantLib::Saturday;


SWIGINTERNINLINE SV *
SWIG_From_long  SWIG_PERL_DECL_ARGS_1(long value)
{
  SV *sv;
  if (IVSIZE >= sizeof(value) || (value >= IV_MIN && value <= IV_MAX))
    sv = newSViv(value);
  else
    sv = newSVpvf("%ld", value);
  return sv_2mortal(sv);
}


SWIGINTERNINLINE SV *
SWIG_From_int  SWIG_PERL_DECL_ARGS_1(int value)
{    
  return SWIG_From_long  SWIG_PERL_CALL_ARGS_1(value);
}


using QuantLib::Month;
using QuantLib::January;
using QuantLib::February;
using QuantLib::March;
using QuantLib::April;
using QuantLib::May;
using QuantLib::June;
using QuantLib::July;
using QuantLib::August;
using QuantLib::September;
using QuantLib::October;
using QuantLib::November;
using QuantLib::December;


using QuantLib::TimeUnit;
using QuantLib::Days;
using QuantLib::Weeks;
using QuantLib::Months;
using QuantLib::Years;
using QuantLib::Hours;
using QuantLib::Minutes;
using QuantLib::Seconds;
using QuantLib::Milliseconds;
using QuantLib::Microseconds;


using QuantLib::Frequency;
using QuantLib::NoFrequency;
using QuantLib::Once;
using QuantLib::Annual;
using QuantLib::Semiannual;
using QuantLib::EveryFourthMonth;
using QuantLib::Quarterly;
using QuantLib::Bimonthly;
using QuantLib::Monthly;
using QuantLib::EveryFourthWeek;
using QuantLib::Biweekly;
using QuantLib::Weekly;
using QuantLib::Daily;
using QuantLib::OtherFrequency;


using QuantLib::Period;
using QuantLib::PeriodParser;


#include <limits.h>
#if !defined(SWIG_NO_LLONG_MAX)
# if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
#   define LLONG_MAX __LONG_LONG_MAX__
#   define LLONG_MIN (-LLONG_MAX - 1LL)
#   define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
# endif
#endif


#include <stdlib.h>
#ifdef _MSC_VER
# ifndef strtoull
#  define strtoull _strtoui64
# endif
# ifndef strtoll
#  define strtoll _strtoi64
# endif
#endif


SWIGINTERN int
SWIG_AsVal_double SWIG_PERL_DECL_ARGS_2(SV *obj, double *val)
{
  if (SvNIOK(obj)) {
    if (val) *val = SvNV(obj);
    return SWIG_OK;
  } else if (SvIOK(obj)) {
    if (val) *val = (double) SvIV(obj);
    return SWIG_AddCast(SWIG_OK);
  } else {
    const char *nptr = SvPV_nolen(obj);
    if (nptr) {
      char *endptr;
      double v;
      errno = 0;
      v = strtod(nptr, &endptr);
      if (errno == ERANGE) {
	errno = 0;
	return SWIG_OverflowError;
      } else {
	if (*endptr == '\0') {
	  if (val) *val = v;
	  return SWIG_Str2NumCast(SWIG_OK);
	}
      }
    }
  }
  return SWIG_TypeError;
}


#include <float.h>


#include <math.h>


SWIGINTERNINLINE int
SWIG_CanCastAsInteger(double *d, double min, double max) {
  double x = *d;
  if ((min <= x && x <= max)) {
   double fx = floor(x);
   double cx = ceil(x);
   double rd =  ((x - fx) < 0.5) ? fx : cx; /* simple rint */
   if ((errno == EDOM) || (errno == ERANGE)) {
     errno = 0;
   } else {
     double summ, reps, diff;
     if (rd < x) {
       diff = x - rd;
     } else if (rd > x) {
       diff = rd - x;
     } else {
       return 1;
     }
     summ = rd + x;
     reps = diff/summ;
     if (reps < 8*DBL_EPSILON) {
       *d = rd;
       return 1;
     }
   }
  }
  return 0;
}


SWIGINTERN int
SWIG_AsVal_long SWIG_PERL_DECL_ARGS_2(SV *obj, long* val)
{
  if (SvUOK(obj)) {
    UV v = SvUV(obj);
    if (UVSIZE < sizeof(*val) || v <= LONG_MAX) {
      if (val) *val = v;
      return SWIG_OK;
    }
    return SWIG_OverflowError;
  } else if (SvIOK(obj)) {
    IV v = SvIV(obj);
    if (IVSIZE <= sizeof(*val) || (v >= LONG_MIN && v <= LONG_MAX)) {
      if(val) *val = v;
      return SWIG_OK;
    }
    return SWIG_OverflowError;
  } else {
    int dispatch = 0;
    const char *nptr = SvPV_nolen(obj);
    if (nptr) {
      char *endptr;
      long v;
      errno = 0;
      v = strtol(nptr, &endptr,0);
      if (errno == ERANGE) {
	errno = 0;
	return SWIG_OverflowError;
      } else {
	if (*endptr == '\0') {
	  if (val) *val = v;
	  return SWIG_Str2NumCast(SWIG_OK);
	}
      }
    }
    if (!dispatch) {
      double d;
      int res = SWIG_AddCast(SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(obj,&d));
      if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) {
	if (val) *val = (long)(d);
	return res;
      }
    }
  }
  return SWIG_TypeError;
}


SWIGINTERN int
SWIG_AsVal_int SWIG_PERL_DECL_ARGS_2(SV * obj, int *val)
{
  long v;
  int res = SWIG_AsVal_long SWIG_PERL_CALL_ARGS_2(obj, &v);
  if (SWIG_IsOK(res)) {
    if ((v < INT_MIN || v > INT_MAX)) {
      return SWIG_OverflowError;
    } else {
      if (val) *val = static_cast< int >(v);
    }
  }  
  return res;
}


SWIGINTERN swig_type_info*
SWIG_pchar_descriptor(void)
{
  static int init = 0;
  static swig_type_info* info = 0;
  if (!init) {
    info = SWIG_TypeQuery("_p_char");
    init = 1;
  }
  return info;
}


SWIGINTERN int
SWIG_AsCharPtrAndSize(SV *obj, char** cptr, size_t* psize, int *alloc)
{
  if (SvMAGICAL(obj)) {
     SV *tmp = sv_newmortal();
     SvSetSV(tmp, obj);
     obj = tmp;
  }
  if (SvPOK(obj)) {
    STRLEN len = 0;
    char *cstr = SvPV(obj, len); 
    size_t size = len + 1;
    if (cptr)  {
      if (alloc) {
	if (*alloc == SWIG_NEWOBJ) {
	  *cptr = reinterpret_cast< char* >(memcpy(new char[size], cstr, sizeof(char)*(size)));
	} else {
	  *cptr = cstr;
	  *alloc = SWIG_OLDOBJ;
	}
      }
    }
    if (psize) *psize = size;
    return SWIG_OK;
  } else {
    swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
    if (pchar_descriptor) {
      char* vptr = 0; 
      if (SWIG_ConvertPtr(obj, (void**)&vptr, pchar_descriptor, 0) == SWIG_OK) {
	if (cptr) *cptr = vptr;
	if (psize) *psize = vptr ? (strlen(vptr) + 1) : 0;
	if (alloc) *alloc = SWIG_OLDOBJ;
	return SWIG_OK;
      }
    }
  }
  return SWIG_TypeError;
}


SWIGINTERN int
SWIG_AsPtr_std_string SWIG_PERL_DECL_ARGS_2(SV * obj, std::string **val) 
{
  char* buf = 0 ; size_t size = 0; int alloc = SWIG_OLDOBJ;
  if (SWIG_IsOK((SWIG_AsCharPtrAndSize(obj, &buf, &size, &alloc)))) {
    if (buf) {
      if (val) *val = new std::string(buf, size - 1);
      if (alloc == SWIG_NEWOBJ) delete[] buf;
      return SWIG_NEWOBJ;
    } else {
      if (val) *val = 0;
      return SWIG_OLDOBJ;
    }
  } else {
    static int init = 0;
    static swig_type_info* descriptor = 0;
    if (!init) {
      descriptor = SWIG_TypeQuery("std::string" " *");
      init = 1;
    }
    if (descriptor) {
      std::string *vptr;
      int res = SWIG_ConvertPtr(obj, (void**)&vptr, descriptor, 0);
      if (SWIG_IsOK(res) && val) *val = vptr;
      return res;
    }
  }
  return SWIG_ERROR;
}

SWIGINTERN Period *new_Period__SWIG_3(std::string const &str){
            return new Period(PeriodParser::parse(str));
        }
SWIGINTERN std::string Period___str__(Period *self){
            std::ostringstream out;
            out << *self;
            return out.str();
        }

SWIGINTERNINLINE SV *
SWIG_FromCharPtrAndSize(const char* carray, size_t size)
{
  SV *obj = sv_newmortal();
  if (carray) {
    sv_setpvn(obj, carray, size);
  } else {
    sv_setsv(obj, &PL_sv_undef);
  }
  return obj;
}


SWIGINTERNINLINE SV *
SWIG_From_std_string  SWIG_PERL_DECL_ARGS_1(const std::string& s)
{
  return SWIG_FromCharPtrAndSize(s.data(), s.size());
}

SWIGINTERN std::string Period___repr__(Period *self){
            std::ostringstream out;
            out << "Period(\"" << QuantLib::io::short_period(*self) << "\")";
            return out.str();
        }

SWIGINTERN int
SWIG_AsVal_unsigned_SS_long SWIG_PERL_DECL_ARGS_2(SV *obj, unsigned long *val) 
{
  if (SvUOK(obj)) {
    UV v = SvUV(obj);
    if (UVSIZE <= sizeof(*val) || v <= ULONG_MAX) {
      if (val) *val = v;
      return SWIG_OK;
    }
    return SWIG_OverflowError;
  } else if (SvIOK(obj)) {
    IV v = SvIV(obj);
    if (v >= 0 && (IVSIZE <= sizeof(*val) || v <= ULONG_MAX)) {
      if (val) *val = v;
      return SWIG_OK;
    }
    return SWIG_OverflowError;
  } else {
    int dispatch = 0;
    const char *nptr = SvPV_nolen(obj);
    if (nptr) {
      char *endptr;
      unsigned long v;
      errno = 0;
      v = strtoul(nptr, &endptr,0);
      if (errno == ERANGE) {
	errno = 0;
	return SWIG_OverflowError;
      } else {
	if (*endptr == '\0') {
	  if (val) *val = v;
	  return SWIG_Str2NumCast(SWIG_OK);
	}
      }
    }
    if (!dispatch) {
      double d;
      int res = SWIG_AddCast(SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(obj,&d));
      if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, ULONG_MAX)) {
	if (val) *val = (unsigned long)(d);
	return res;
      }
    }
  }
  return SWIG_TypeError;
}


SWIGINTERN int
SWIG_AsVal_unsigned_SS_int SWIG_PERL_DECL_ARGS_2(SV * obj, unsigned int *val)
{
  unsigned long v;
  int res = SWIG_AsVal_unsigned_SS_long SWIG_PERL_CALL_ARGS_2(obj, &v);
  if (SWIG_IsOK(res)) {
    if ((v > UINT_MAX)) {
      return SWIG_OverflowError;
    } else {
      if (val) *val = static_cast< unsigned int >(v);
    }
  }  
  return res;
}


SWIGINTERNINLINE SV *
SWIG_From_unsigned_SS_long  SWIG_PERL_DECL_ARGS_1(unsigned long value)
{
  SV *sv;
  if (UVSIZE >= sizeof(value) || value <= UV_MAX)
    sv = newSVuv(value);
  else
    sv = newSVpvf("%lu", value);
  return sv_2mortal(sv);
}


SWIGINTERNINLINE SV *
SWIG_From_unsigned_SS_int  SWIG_PERL_DECL_ARGS_1(unsigned int value)
{    
  return SWIG_From_unsigned_SS_long  SWIG_PERL_CALL_ARGS_1(value);
}


SWIGINTERNINLINE SV *
SWIG_From_bool  SWIG_PERL_DECL_ARGS_1(bool value)
{
  return boolSV(value);
}

SWIGINTERN Period std_vector_Sl_Period_Sg__pop(std::vector< Period > *self){
                if (self->size() == 0)
                    throw std::out_of_range("pop from empty vector");
                Period x = self->back();
                self->pop_back();
                return x;
            }
SWIGINTERN Period &std_vector_Sl_Period_Sg__get(std::vector< Period > *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_Period_Sg__set(std::vector< Period > *self,int i,Period const &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");
            }

using QuantLib::Date;
using QuantLib::DateParser;


    // used in Date(string, string) defined below
    void _replace_format(std::string& s, const std::string& old_format,
                         const std::string& new_format) {
        std::string::size_type i = s.find(old_format);
        if (i != std::string::npos)
            s.replace(i, old_format.length(), new_format);
    }

SWIGINTERN Date *new_Date__SWIG_2(Day d,Month m,Year y,Hour hours,Minute minutes,Second seconds,Millisecond millisec=0,Microsecond microsec=0){
        #ifdef QL_HIGH_RESOLUTION_DATE
            return new Date(d, m, y, hours, minutes, seconds,
                            millisec, microsec);
        #else
            throw std::runtime_error("QuantLib was not compiled "
                                     "with intraday support");
        #endif
        }
SWIGINTERN Hour Date_hours(Date *self){
        #ifdef QL_HIGH_RESOLUTION_DATE
            return self->hours();
        #else
            throw std::runtime_error("QuantLib was not compiled "
                                     "with intraday support");
        #endif
        }
SWIGINTERN Minute Date_minutes(Date *self){
        #ifdef QL_HIGH_RESOLUTION_DATE
            return self->minutes();
        #else
            throw std::runtime_error("QuantLib was not compiled "
                                     "with intraday support");
        #endif
        }
SWIGINTERN Second Date_seconds(Date *self){
        #ifdef QL_HIGH_RESOLUTION_DATE
            return self->seconds();
        #else
            throw std::runtime_error("QuantLib was not compiled "
                                     "with intraday support");
        #endif
        }
SWIGINTERN Millisecond Date_milliseconds(Date *self){
        #ifdef QL_HIGH_RESOLUTION_DATE
            return self->milliseconds();
        #else
            throw std::runtime_error("QuantLib was not compiled "
                                     "with intraday support");
        #endif
        }
SWIGINTERN Microsecond Date_microseconds(Date *self){
        #ifdef QL_HIGH_RESOLUTION_DATE
            return self->microseconds();
        #else
            throw std::runtime_error("QuantLib was not compiled "
                                     "with intraday support");
        #endif
        }
SWIGINTERN Time Date_fractionOfDay(Date const *self){
        #ifdef QL_HIGH_RESOLUTION_DATE
            return self->fractionOfDay();
        #else
            throw std::runtime_error("QuantLib was not compiled "
                                     "with intraday support");
        #endif
        }

SWIGINTERNINLINE SV *
SWIG_From_double  SWIG_PERL_DECL_ARGS_1(double value)
{
  return sv_2mortal(newSVnv(value));
}

SWIGINTERN Time Date_fractionOfSecond(Date const *self){
        #ifdef QL_HIGH_RESOLUTION_DATE
            return self->fractionOfSecond();
        #else
            throw std::runtime_error("QuantLib was not compiled "
                                     "with intraday support");
        #endif
        }
SWIGINTERN Date Date_localDateTime(){
        #ifdef QL_HIGH_RESOLUTION_DATE
            return Date::localDateTime();
        #else
            throw std::runtime_error("QuantLib was not compiled "
                                     "with intraday support");
        #endif
        }
SWIGINTERN Date Date_universalDateTime(){
        #ifdef QL_HIGH_RESOLUTION_DATE
            return Date::universalDateTime();
        #else
            throw std::runtime_error("QuantLib was not compiled "
                                     "with intraday support");
        #endif
         }

#if defined(LLONG_MAX) && !defined(SWIG_LONG_LONG_AVAILABLE)
#  define SWIG_LONG_LONG_AVAILABLE
#endif


#ifdef SWIG_LONG_LONG_AVAILABLE
SWIGINTERN int
SWIG_AsVal_unsigned_SS_long_SS_long SWIG_PERL_DECL_ARGS_2(SV *obj, unsigned long long *val)
{
  if (SvUOK(obj)) {
    /* pretty sure this should be conditional on
     * (UVSIZE <= sizeof(*val) || v <= ULLONG_MAX) */
    if (val) *val = SvUV(obj);
    return SWIG_OK;
  } else  if (SvIOK(obj)) {
    IV v = SvIV(obj);
    if (v >= 0 && (IVSIZE <= sizeof(*val) || v <= ULLONG_MAX)) {
      if (val) *val = v;
      return SWIG_OK;
    } else {
      return SWIG_OverflowError;
    }
  } else {
    int dispatch = 0;
    const char *nptr = SvPV_nolen(obj);
    if (nptr) {
      char *endptr;
      unsigned long long v;
      errno = 0;
      v = strtoull(nptr, &endptr,0);
      if (errno == ERANGE) {
	errno = 0;
	return SWIG_OverflowError;
      } else {
	if (*endptr == '\0') {
	  if (val) *val = v;
	  return SWIG_Str2NumCast(SWIG_OK);
	}
      }
    }
    if (!dispatch) {
      const double mant_max = 1LL << DBL_MANT_DIG;
      double d;
      int res = SWIG_AddCast(SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(obj,&d));
      if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, mant_max)) {
	if (val) *val = (unsigned long long)(d);
	return res;
      }
    }
  }
  return SWIG_TypeError;
}
#endif


SWIGINTERNINLINE int
SWIG_AsVal_size_t SWIG_PERL_DECL_ARGS_2(SV * obj, size_t *val)
{
  int res = SWIG_TypeError;
#ifdef SWIG_LONG_LONG_AVAILABLE
  if (sizeof(size_t) <= sizeof(unsigned long)) {
#endif
    unsigned long v;
    res = SWIG_AsVal_unsigned_SS_long SWIG_PERL_CALL_ARGS_2(obj, val ? &v : 0);
    if (SWIG_IsOK(res) && val) *val = static_cast< size_t >(v);
#ifdef SWIG_LONG_LONG_AVAILABLE
  } else if (sizeof(size_t) <= sizeof(unsigned long long)) {
    unsigned long long v;
    res = SWIG_AsVal_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_2(obj, val ? &v : 0);
    if (SWIG_IsOK(res) && val) *val = static_cast< size_t >(v);
  }
#endif
  return res;
}

SWIGINTERN Date *new_Date__SWIG_6(std::string const &str,std::string fmt){
            // convert our old format into the corresponding Boost one
            _replace_format(fmt, "YYYY", "%Y");
            _replace_format(fmt, "yyyy", "%Y");
            _replace_format(fmt, "YY", "%y");
            _replace_format(fmt, "yy", "%y");
            _replace_format(fmt, "MM", "%m");
            _replace_format(fmt, "mm", "%m");
            _replace_format(fmt, "DD", "%d");
            _replace_format(fmt, "dd", "%d");
            return new Date(DateParser::parseFormatted(str,fmt));
        }
SWIGINTERN Integer Date_weekdayNumber(Date *self){
            return int(self->weekday());
        }
SWIGINTERN std::string Date___str__(Date *self){
            std::ostringstream out;
            out << *self;
            return out.str();
        }
SWIGINTERN std::string Date___repr__(Date *self){
            std::ostringstream out;
            if (*self == Date())
                out << "Date()";
            else
                out << "Date(" << self->dayOfMonth() << ","
                    << int(self->month()) << "," << self->year() << ")";
            return out.str();
        }
SWIGINTERN std::string Date_ISO(Date *self){
            std::ostringstream out;
            out << QuantLib::io::iso_date(*self);
            return out.str();
        }
SWIGINTERN Date DateParser_parse(std::string const &str,std::string fmt){
            // convert our old format into the corresponding Boost one
            _replace_format(fmt, "YYYY", "%Y");
            _replace_format(fmt, "yyyy", "%Y");
            _replace_format(fmt, "YY", "%y");
            _replace_format(fmt, "yy", "%y");
            _replace_format(fmt, "MM", "%m");
            _replace_format(fmt, "mm", "%m");
            _replace_format(fmt, "DD", "%d");
            _replace_format(fmt, "dd", "%d");
            return DateParser::parseFormatted(str,fmt);
        }
SWIGINTERN Date std_vector_Sl_Date_Sg__pop(std::vector< Date > *self){
                if (self->size() == 0)
                    throw std::out_of_range("pop from empty vector");
                Date x = self->back();
                self->pop_back();
                return x;
            }
SWIGINTERN Date &std_vector_Sl_Date_Sg__get(std::vector< Date > *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_Date_Sg__set(std::vector< Date > *self,int i,Date const &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");
            }

using QuantLib::IMM;


SWIGINTERN int
SWIG_AsVal_bool SWIG_PERL_DECL_ARGS_2(SV *obj, bool* val)
{
  if (obj == &PL_sv_yes) {
    if (val) *val = true;
    return SWIG_OK;
  } else if (obj == &PL_sv_no) { 
    if (val) *val = false;
    return SWIG_OK;
  } else {
    if (val) *val = SvTRUE(obj) ? true : false;
    return SWIG_AddCast(SWIG_OK);    
  }
}


using QuantLib::ASX;

SWIGINTERN int std_vector_Sl_int_Sg__pop(std::vector< int > *self){
                if (self->size() == 0)
                    throw std::out_of_range("pop from empty vector");
                int x = self->back();
                self->pop_back();
                return x;
            }
SWIGINTERN int std_vector_Sl_int_Sg__get(std::vector< int > *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_int_Sg__set(std::vector< int > *self,int i,int 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");
            }
SWIGINTERN unsigned int std_vector_Sl_unsigned_SS_int_Sg__pop(std::vector< unsigned int > *self){
                if (self->size() == 0)
                    throw std::out_of_range("pop from empty vector");
                unsigned int x = self->back();
                self->pop_back();
                return x;
            }
SWIGINTERN unsigned int std_vector_Sl_unsigned_SS_int_Sg__get(std::vector< unsigned int > *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_unsigned_SS_int_Sg__set(std::vector< unsigned int > *self,int i,unsigned int 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");
            }
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__get(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");
            }
SWIGINTERN std::string std_vector_Sl_std_string_Sg__pop(std::vector< std::string > *self){
                if (self->size() == 0)
                    throw std::out_of_range("pop from empty vector");
                std::string x = self->back();
                self->pop_back();
                return x;
            }
SWIGINTERN std::string std_vector_Sl_std_string_Sg__get(std::vector< std::string > *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_std_string_Sg__set(std::vector< std::string > *self,int i,std::string 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");
            }
SWIGINTERN bool std_vector_Sl_bool_Sg__pop(std::vector< bool > *self){
                if (self->size() == 0)
                    throw std::out_of_range("pop from empty vector");
                bool x = self->back();
                self->pop_back();
                return x;
            }
SWIGINTERN bool std_vector_Sl_bool_Sg__get(std::vector< bool > *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_bool_Sg__set(std::vector< bool > *self,int i,bool 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");
            }
SWIGINTERN std::pair< Date,double > std_vector_Sl_std_pair_Sl_Date_Sc_double_Sg__Sg__pop(std::vector< std::pair< Date,double > > *self){
                if (self->size() == 0)
                    throw std::out_of_range("pop from empty vector");
                std::pair< Date,double > x = self->back();
                self->pop_back();
                return x;
            }
SWIGINTERN std::pair< Date,double > &std_vector_Sl_std_pair_Sl_Date_Sc_double_Sg__Sg__get(std::vector< std::pair< Date,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_std_pair_Sl_Date_Sc_double_Sg__Sg__set(std::vector< std::pair< Date,double > > *self,int i,std::pair< Date,double > const &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");
            }

using QuantLib::Exercise;

SWIGINTERN bool boost_shared_ptr_Sl_Exercise_Sg__isNull(boost::shared_ptr< Exercise > *self){
                return !(*self);
            }
SWIGINTERN Exercise::Type boost_shared_ptr_Sl_Exercise_Sg__exerciseType(boost::shared_ptr< Exercise > *self){ 
		return boost::dynamic_pointer_cast<Exercise>(*self)->type(); 
	}

using QuantLib::EuropeanExercise;
using QuantLib::AmericanExercise;
using QuantLib::BermudanExercise;
using QuantLib::RebatedExercise;
typedef boost::shared_ptr<Exercise> EuropeanExercisePtr;
typedef boost::shared_ptr<Exercise> AmericanExercisePtr;
typedef boost::shared_ptr<Exercise> BermudanExercisePtr;
typedef boost::shared_ptr<Exercise> RebatedExercisePtr;

SWIGINTERN EuropeanExercisePtr *new_EuropeanExercisePtr(Date const &date){
            return new EuropeanExercisePtr(new EuropeanExercise(date));
        }
SWIGINTERN AmericanExercisePtr *new_AmericanExercisePtr__SWIG_0(Date const &earliestDate,Date const &latestDate,bool payoffAtExpiry=false){
            return new AmericanExercisePtr(
                                        new AmericanExercise(earliestDate,
                                                             latestDate,
                                                             payoffAtExpiry));

        }
SWIGINTERN BermudanExercisePtr *new_BermudanExercisePtr__SWIG_0(std::vector< Date > const &dates,bool payoffAtExpiry=false){
            return new BermudanExercisePtr(
                                        new BermudanExercise(dates,
                                                             payoffAtExpiry));
        }

using QuantLib::BusinessDayConvention;
using QuantLib::Calendar;
using QuantLib::Following;
using QuantLib::NullCalendar;

SWIGINTERN RebatedExercisePtr *new_RebatedExercisePtr__SWIG_0(boost::shared_ptr< Exercise > const exercise,std::vector< Real > const rebates,Natural rebateSettlementDays=0,Calendar const &rebatePaymentCalendar=NullCalendar(),BusinessDayConvention const rebatePaymentConvention=Following){
            return new RebatedExercisePtr(new RebatedExercise(*exercise, rebates,
                                                              rebateSettlementDays,
                                                              rebatePaymentCalendar,
                                                              rebatePaymentConvention));
        }

using QuantLib::Observer;
using QuantLib::Observable;

SWIGINTERN bool boost_shared_ptr_Sl_Observable_Sg__isNull(boost::shared_ptr< Observable > *self){
                return !(*self);
            }

using QuantLib::Array;
using QuantLib::Matrix;
using QuantLib::SampledCurve;


#include <stdio.h>
#if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM)
# ifndef snprintf
#  define snprintf _snprintf
# endif
#endif


#ifdef SWIG_LONG_LONG_AVAILABLE
SWIGINTERNINLINE SV *
SWIG_From_unsigned_SS_long_SS_long  SWIG_PERL_DECL_ARGS_1(unsigned long long value)
{
  SV *sv;
  if (UVSIZE >= sizeof(value) || value <= UV_MAX)
    sv = newSVuv((UV)(value));
  else {
    //sv = newSVpvf("%llu", value); doesn't work in non 64bit Perl
    char temp[256];
    sprintf(temp, "%llu", value);
    sv = newSVpv(temp, 0);
  }
  return sv_2mortal(sv);
}
#endif


SWIGINTERNINLINE SV *
SWIG_From_size_t  SWIG_PERL_DECL_ARGS_1(size_t value)
{    
#ifdef SWIG_LONG_LONG_AVAILABLE
  if (sizeof(size_t) <= sizeof(unsigned long)) {
#endif
    return SWIG_From_unsigned_SS_long  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned long >(value));
#ifdef SWIG_LONG_LONG_AVAILABLE
  } else {
    /* assume sizeof(size_t) <= sizeof(unsigned long long) */
    return SWIG_From_unsigned_SS_long_SS_long  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned long long >(value));
  }
#endif
}

SWIGINTERN std::string Array___str__(Array *self){
            std::ostringstream out;
            out << *self;
            return out.str();
        }
SWIGINTERN Real Array_get(Array *self,Size i){
            if (i<self->size())
                return (*self)[i];
            else
                throw std::out_of_range("array index out of range");
        }
SWIGINTERN void Array_set(Array *self,Size i,Real x){
            if (i<self->size())
                (*self)[i] = x;
            else
                throw std::out_of_range("array index out of range");
        }

typedef QuantLib::LexicographicalView<Array::iterator>
    DefaultLexicographicalView;
typedef QuantLib::LexicographicalView<Array::iterator>::y_iterator
    DefaultLexicographicalViewColumn;

SWIGINTERN DefaultLexicographicalView *new_DefaultLexicographicalView(Array &a,Size xSize){
            return new DefaultLexicographicalView(a.begin(),a.end(),xSize);
        }
SWIGINTERN std::string DefaultLexicographicalView___str__(DefaultLexicographicalView *self){
            std::ostringstream s;
            for (Size j=0; j<self->ySize(); j++) {
                s << "\n";
                for (Size i=0; i<self->xSize(); i++) {
                    if (i != 0)
                        s << ",";
                    Array::value_type value = (*self)[i][j];
                    s << value;
                }
            }
            s << "\n";
            return s.str();
        }

typedef QuantLib::Matrix::row_iterator MatrixRow;
using QuantLib::outerProduct;
using QuantLib::transpose;
using QuantLib::SVD;

SWIGINTERN std::string Matrix___str__(Matrix *self){
            std::ostringstream out;
            out << *self;
            return out.str();
        }
SWIGINTERN Real Matrix_get(Matrix *self,Size i,Size j){
            return (*self)[i][j];
        }
SWIGINTERN void Matrix_set(Matrix *self,Size i,Size j,Real x){
            (*self)[i][j] = x;
        }

using QuantLib::pseudoSqrt;
using QuantLib::SalvagingAlgorithm;


using QuantLib::CostFunction;
using QuantLib::Disposable;


using QuantLib::Quote;

SWIGINTERN bool boost_shared_ptr_Sl_Quote_Sg__isNull(boost::shared_ptr< Quote > *self){
                return !(*self);
            }
SWIGINTERN boost::shared_ptr< Observable > boost_shared_ptr_Sl_Quote_Sg__asObservable(boost::shared_ptr< Quote > *self){
        return boost::shared_ptr<Observable>(*self);
    }
SWIGINTERN boost::shared_ptr< Observable > Handle_Sl_Quote_Sg__asObservable(Handle< Quote > *self){
        return boost::shared_ptr<Observable>(*self);
    }

using QuantLib::SimpleQuote;
typedef boost::shared_ptr<Quote> SimpleQuotePtr;

SWIGINTERN SimpleQuotePtr *new_SimpleQuotePtr(Real value){
            return new SimpleQuotePtr(new SimpleQuote(value));
        }
SWIGINTERN void SimpleQuotePtr_setValue(SimpleQuotePtr *self,Real value){
            boost::dynamic_pointer_cast<SimpleQuote>(*self)->setValue(value);
        }
SWIGINTERN boost::shared_ptr< Quote > std_vector_Sl_boost_shared_ptr_Sl_Quote_Sg__Sg__pop(std::vector< boost::shared_ptr< Quote > > *self){
                if (self->size() == 0)
                    throw std::out_of_range("pop from empty vector");
                boost::shared_ptr< Quote > x = self->back();
                self->pop_back();
                return x;
            }
SWIGINTERN boost::shared_ptr< Quote > &std_vector_Sl_boost_shared_ptr_Sl_Quote_Sg__Sg__get(std::vector< boost::shared_ptr< Quote > > *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_boost_shared_ptr_Sl_Quote_Sg__Sg__set(std::vector< boost::shared_ptr< Quote > > *self,int i,boost::shared_ptr< Quote > const &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");
            }
SWIGINTERN std::vector< boost::shared_ptr< Quote > > std_vector_Sl_std_vector_Sl_boost_shared_ptr_Sl_Quote_Sg__Sg__Sg__pop(std::vector< std::vector< boost::shared_ptr< Quote > > > *self){
                if (self->size() == 0)
                    throw std::out_of_range("pop from empty vector");
                std::vector< boost::shared_ptr< Quote > > x = self->back();
                self->pop_back();
                return x;
            }
SWIGINTERN std::vector< boost::shared_ptr< Quote > > &std_vector_Sl_std_vector_Sl_boost_shared_ptr_Sl_Quote_Sg__Sg__Sg__get(std::vector< std::vector< boost::shared_ptr< Quote > > > *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_std_vector_Sl_boost_shared_ptr_Sl_Quote_Sg__Sg__Sg__set(std::vector< std::vector< boost::shared_ptr< Quote > > > *self,int i,std::vector< boost::shared_ptr< Quote > > const &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");
            }
SWIGINTERN Handle< Quote > std_vector_Sl_Handle_Sl_Quote_Sg__Sg__pop(std::vector< Handle< Quote > > *self){
                if (self->size() == 0)
                    throw std::out_of_range("pop from empty vector");
                Handle< Quote > x = self->back();
                self->pop_back();
                return x;
            }
SWIGINTERN Handle< Quote > &std_vector_Sl_Handle_Sl_Quote_Sg__Sg__get(std::vector< Handle< Quote > > *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_Handle_Sl_Quote_Sg__Sg__set(std::vector< Handle< Quote > > *self,int i,Handle< Quote > const &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");
            }
SWIGINTERN std::vector< Handle< Quote > > std_vector_Sl_std_vector_Sl_Handle_Sl_Quote_Sg__Sg__Sg__pop(std::vector< std::vector< Handle< Quote > > > *self){
                if (self->size() == 0)
                    throw std::out_of_range("pop from empty vector");
                std::vector< Handle< Quote > > x = self->back();
                self->pop_back();
                return x;
            }
SWIGINTERN std::vector< Handle< Quote > > &std_vector_Sl_std_vector_Sl_Handle_Sl_Quote_Sg__Sg__Sg__get(std::vector< std::vector< Handle< Quote > > > *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_std_vector_Sl_Handle_Sl_Quote_Sg__Sg__Sg__set(std::vector< std::vector< Handle< Quote > > > *self,int i,std::vector< Handle< Quote > > const &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");
            }
SWIGINTERN RelinkableHandle< Quote > std_vector_Sl_RelinkableHandle_Sl_Quote_Sg__Sg__pop(std::vector< RelinkableHandle< Quote > > *self){
                if (self->size() == 0)
                    throw std::out_of_range("pop from empty vector");
                RelinkableHandle< Quote > x = self->back();
                self->pop_back();
                return x;
            }
SWIGINTERN RelinkableHandle< Quote > &std_vector_Sl_RelinkableHandle_Sl_Quote_Sg__Sg__get(std::vector< RelinkableHandle< Quote > > *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_RelinkableHandle_Sl_Quote_Sg__Sg__set(std::vector< RelinkableHandle< Quote > > *self,int i,RelinkableHandle< Quote > const &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");
            }
SWIGINTERN std::vector< RelinkableHandle< Quote > > std_vector_Sl_std_vector_Sl_RelinkableHandle_Sl_Quote_Sg__Sg__Sg__pop(std::vector< std::vector< RelinkableHandle< Quote > > > *self){
                if (self->size() == 0)
                    throw std::out_of_range("pop from empty vector");
                std::vector< RelinkableHandle< Quote > > x = self->back();
                self->pop_back();
                return x;
            }
SWIGINTERN std::vector< RelinkableHandle< Quote > > &std_vector_Sl_std_vector_Sl_RelinkableHandle_Sl_Quote_Sg__Sg__Sg__get(std::vector< std::vector< RelinkableHandle< Quote > > > *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_std_vector_Sl_RelinkableHandle_Sl_Quote_Sg__Sg__Sg__set(std::vector< std::vector< RelinkableHandle< Quote > > > *self,int i,std::vector< RelinkableHandle< Quote > > const &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");
            }

using QuantLib::Calendar;


using QuantLib::BusinessDayConvention;
using QuantLib::Following;
using QuantLib::ModifiedFollowing;
using QuantLib::Preceding;
using QuantLib::ModifiedPreceding;
using QuantLib::Unadjusted;
using QuantLib::HalfMonthModifiedFollowing;


using QuantLib::JointCalendarRule;
using QuantLib::JoinHolidays;
using QuantLib::JoinBusinessDays;


using QuantLib::Null;
typedef int intOrNull;
typedef double doubleOrNull;


int nullInt() { return Null<int>(); }
double nullDouble() { return Null<double>(); }


using QuantLib::DayCounter;


    /* avoid deprecation warnings */
    DayCounter Actual365NoLeap() {
        return QuantLib::Actual365Fixed(QuantLib::Actual365Fixed::NoLeap);
    }


using QuantLib::Compounding;
using QuantLib::Simple;
using QuantLib::Compounded;
using QuantLib::Continuous;
using QuantLib::SimpleThenCompounded;
using QuantLib::CompoundedThenSimple;


using QuantLib::InterestRate;

SWIGINTERN std::string InterestRate___str__(InterestRate *self){
            std::ostringstream out;
            out << *self;
            return out.str();
        }
SWIGINTERN InterestRate std_vector_Sl_InterestRate_Sg__pop(std::vector< InterestRate > *self){
                if (self->size() == 0)
                    throw std::out_of_range("pop from empty vector");
                InterestRate x = self->back();
                self->pop_back();
                return x;
            }
SWIGINTERN InterestRate &std_vector_Sl_InterestRate_Sg__get(std::vector< InterestRate > *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_InterestRate_Sg__set(std::vector< InterestRate > *self,int i,InterestRate const &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");
            }

using QuantLib::Rounding;
using QuantLib::UpRounding;
using QuantLib::DownRounding;
using QuantLib::ClosestRounding;
using QuantLib::CeilingTruncation;
using QuantLib::FloorTruncation;


using QuantLib::Currency;
using QuantLib::Money;


using QuantLib::Extrapolator;


// safe versions which copy their arguments
template <class I>
class SafeInterpolation {
  public:
    SafeInterpolation(const Array& x, const Array& y)
    : x_(x), y_(y), f_(x_.begin(),x_.end(),y_.begin()) {}
    Real operator()(Real x, bool allowExtrapolation=false) {
        return f_(x, allowExtrapolation);
    }
    Array x_, y_;
    I f_;
};


typedef SafeInterpolation<QuantLib::LinearInterpolation> SafeLinearInterpolation;


typedef SafeInterpolation<QuantLib::LogLinearInterpolation> SafeLogLinearInterpolation;


typedef SafeInterpolation<QuantLib::BackwardFlatInterpolation> SafeBackwardFlatInterpolation;


typedef SafeInterpolation<QuantLib::ForwardFlatInterpolation> SafeForwardFlatInterpolation;


typedef SafeInterpolation<QuantLib::CubicNaturalSpline> SafeCubicNaturalSpline;

SWIGINTERN Real SafeCubicNaturalSpline_derivative__SWIG_0(SafeCubicNaturalSpline *self,Real x,bool extrapolate=false){
        return self->f_.derivative(x,extrapolate);
    }
SWIGINTERN Real SafeCubicNaturalSpline_secondDerivative__SWIG_0(SafeCubicNaturalSpline *self,Real x,bool extrapolate=false){
        return self->f_.secondDerivative(x,extrapolate);
    }
SWIGINTERN Real SafeCubicNaturalSpline_primitive__SWIG_0(SafeCubicNaturalSpline *self,Real x,bool extrapolate=false){
        return self->f_.primitive(x,extrapolate);
    }

typedef SafeInterpolation<QuantLib::LogCubicNaturalSpline> SafeLogCubicNaturalSpline;

SWIGINTERN Real SafeLogCubicNaturalSpline_derivative__SWIG_0(SafeLogCubicNaturalSpline *self,Real x,bool extrapolate=false){
        return self->f_.derivative(x,extrapolate);
    }
SWIGINTERN Real SafeLogCubicNaturalSpline_secondDerivative__SWIG_0(SafeLogCubicNaturalSpline *self,Real x,bool extrapolate=false){
        return self->f_.secondDerivative(x,extrapolate);
    }
SWIGINTERN Real SafeLogCubicNaturalSpline_primitive__SWIG_0(SafeLogCubicNaturalSpline *self,Real x,bool extrapolate=false){
        return self->f_.primitive(x,extrapolate);
    }

typedef SafeInterpolation<QuantLib::MonotonicCubicNaturalSpline> SafeMonotonicCubicNaturalSpline;

SWIGINTERN Real SafeMonotonicCubicNaturalSpline_derivative__SWIG_0(SafeMonotonicCubicNaturalSpline *self,Real x,bool extrapolate=false){
        return self->f_.derivative(x,extrapolate);
    }
SWIGINTERN Real SafeMonotonicCubicNaturalSpline_secondDerivative__SWIG_0(SafeMonotonicCubicNaturalSpline *self,Real x,bool extrapolate=false){
        return self->f_.secondDerivative(x,extrapolate);
    }
SWIGINTERN Real SafeMonotonicCubicNaturalSpline_primitive__SWIG_0(SafeMonotonicCubicNaturalSpline *self,Real x,bool extrapolate=false){
        return self->f_.primitive(x,extrapolate);
    }

typedef SafeInterpolation<QuantLib::MonotonicLogCubicNaturalSpline> SafeMonotonicLogCubicNaturalSpline;

SWIGINTERN Real SafeMonotonicLogCubicNaturalSpline_derivative__SWIG_0(SafeMonotonicLogCubicNaturalSpline *self,Real x,bool extrapolate=false){
        return self->f_.derivative(x,extrapolate);
    }
SWIGINTERN Real SafeMonotonicLogCubicNaturalSpline_secondDerivative__SWIG_0(SafeMonotonicLogCubicNaturalSpline *self,Real x,bool extrapolate=false){
        return self->f_.secondDerivative(x,extrapolate);
    }
SWIGINTERN Real SafeMonotonicLogCubicNaturalSpline_primitive__SWIG_0(SafeMonotonicLogCubicNaturalSpline *self,Real x,bool extrapolate=false){
        return self->f_.primitive(x,extrapolate);
    }

typedef SafeInterpolation<QuantLib::KrugerCubic> SafeKrugerCubic;

SWIGINTERN Real SafeKrugerCubic_derivative__SWIG_0(SafeKrugerCubic *self,Real x,bool extrapolate=false){
        return self->f_.derivative(x,extrapolate);
    }
SWIGINTERN Real SafeKrugerCubic_secondDerivative__SWIG_0(SafeKrugerCubic *self,Real x,bool extrapolate=false){
        return self->f_.secondDerivative(x,extrapolate);
    }
SWIGINTERN Real SafeKrugerCubic_primitive__SWIG_0(SafeKrugerCubic *self,Real x,bool extrapolate=false){
        return self->f_.primitive(x,extrapolate);
    }

typedef SafeInterpolation<QuantLib::KrugerLogCubic> SafeKrugerLogCubic;

SWIGINTERN Real SafeKrugerLogCubic_derivative__SWIG_0(SafeKrugerLogCubic *self,Real x,bool extrapolate=false){
        return self->f_.derivative(x,extrapolate);
    }
SWIGINTERN Real SafeKrugerLogCubic_secondDerivative__SWIG_0(SafeKrugerLogCubic *self,Real x,bool extrapolate=false){
        return self->f_.secondDerivative(x,extrapolate);
    }
SWIGINTERN Real SafeKrugerLogCubic_primitive__SWIG_0(SafeKrugerLogCubic *self,Real x,bool extrapolate=false){
        return self->f_.primitive(x,extrapolate);
    }

typedef SafeInterpolation<QuantLib::FritschButlandCubic> SafeFritschButlandCubic;

SWIGINTERN Real SafeFritschButlandCubic_derivative__SWIG_0(SafeFritschButlandCubic *self,Real x,bool extrapolate=false){
        return self->f_.derivative(x,extrapolate);
    }
SWIGINTERN Real SafeFritschButlandCubic_secondDerivative__SWIG_0(SafeFritschButlandCubic *self,Real x,bool extrapolate=false){
        return self->f_.secondDerivative(x,extrapolate);
    }
SWIGINTERN Real SafeFritschButlandCubic_primitive__SWIG_0(SafeFritschButlandCubic *self,Real x,bool extrapolate=false){
        return self->f_.primitive(x,extrapolate);
    }

typedef SafeInterpolation<QuantLib::FritschButlandLogCubic> SafeFritschButlandLogCubic;

SWIGINTERN Real SafeFritschButlandLogCubic_derivative__SWIG_0(SafeFritschButlandLogCubic *self,Real x,bool extrapolate=false){
        return self->f_.derivative(x,extrapolate);
    }
SWIGINTERN Real SafeFritschButlandLogCubic_secondDerivative__SWIG_0(SafeFritschButlandLogCubic *self,Real x,bool extrapolate=false){
        return self->f_.secondDerivative(x,extrapolate);
    }
SWIGINTERN Real SafeFritschButlandLogCubic_primitive__SWIG_0(SafeFritschButlandLogCubic *self,Real x,bool extrapolate=false){
        return self->f_.primitive(x,extrapolate);
    }

typedef SafeInterpolation<QuantLib::Parabolic> SafeParabolic;

SWIGINTERN Real SafeParabolic_derivative__SWIG_0(SafeParabolic *self,Real x,bool extrapolate=false){
        return self->f_.derivative(x,extrapolate);
    }
SWIGINTERN Real SafeParabolic_secondDerivative__SWIG_0(SafeParabolic *self,Real x,bool extrapolate=false){
        return self->f_.secondDerivative(x,extrapolate);
    }
SWIGINTERN Real SafeParabolic_primitive__SWIG_0(SafeParabolic *self,Real x,bool extrapolate=false){
        return self->f_.primitive(x,extrapolate);
    }

typedef SafeInterpolation<QuantLib::LogParabolic> SafeLogParabolic;

SWIGINTERN Real SafeLogParabolic_derivative__SWIG_0(SafeLogParabolic *self,Real x,bool extrapolate=false){
        return self->f_.derivative(x,extrapolate);
    }
SWIGINTERN Real SafeLogParabolic_secondDerivative__SWIG_0(SafeLogParabolic *self,Real x,bool extrapolate=false){
        return self->f_.secondDerivative(x,extrapolate);
    }
SWIGINTERN Real SafeLogParabolic_primitive__SWIG_0(SafeLogParabolic *self,Real x,bool extrapolate=false){
        return self->f_.primitive(x,extrapolate);
    }

typedef SafeInterpolation<QuantLib::MonotonicParabolic> SafeMonotonicParabolic;

SWIGINTERN Real SafeMonotonicParabolic_derivative__SWIG_0(SafeMonotonicParabolic *self,Real x,bool extrapolate=false){
        return self->f_.derivative(x,extrapolate);
    }
SWIGINTERN Real SafeMonotonicParabolic_secondDerivative__SWIG_0(SafeMonotonicParabolic *self,Real x,bool extrapolate=false){
        return self->f_.secondDerivative(x,extrapolate);
    }
SWIGINTERN Real SafeMonotonicParabolic_primitive__SWIG_0(SafeMonotonicParabolic *self,Real x,bool extrapolate=false){
        return self->f_.primitive(x,extrapolate);
    }

typedef SafeInterpolation<QuantLib::MonotonicLogParabolic> SafeMonotonicLogParabolic;

SWIGINTERN Real SafeMonotonicLogParabolic_derivative__SWIG_0(SafeMonotonicLogParabolic *self,Real x,bool extrapolate=false){
        return self->f_.derivative(x,extrapolate);
    }
SWIGINTERN Real SafeMonotonicLogParabolic_secondDerivative__SWIG_0(SafeMonotonicLogParabolic *self,Real x,bool extrapolate=false){
        return self->f_.secondDerivative(x,extrapolate);
    }
SWIGINTERN Real SafeMonotonicLogParabolic_primitive__SWIG_0(SafeMonotonicLogParabolic *self,Real x,bool extrapolate=false){
        return self->f_.primitive(x,extrapolate);
    }

// safe versions which copy their arguments
template <class I>
class SafeInterpolation2D {
  public:
    SafeInterpolation2D(const Array& x, const Array& y, const Matrix& m)
    : x_(x), y_(y), m_(m), f_(x_.begin(),x_.end(),y_.begin(),y_.end(),m_) {}
    Real operator()(Real x, Real y, bool allowExtrapolation=false) {
        return f_(x,y, allowExtrapolation);
    }
  protected:
    Array x_, y_;
    Matrix m_;
    I f_;
};


typedef SafeInterpolation2D<QuantLib::BilinearInterpolation> SafeBilinearInterpolation;


typedef SafeInterpolation2D<QuantLib::BicubicSpline> SafeBicubicSpline;


using QuantLib::BackwardFlat;
using QuantLib::ForwardFlat;
using QuantLib::Linear;
using QuantLib::LogLinear;
using QuantLib::Cubic;

class MonotonicCubic : public Cubic {
  public:
    MonotonicCubic()
    : Cubic(QuantLib::CubicInterpolation::Spline, true,
            QuantLib::CubicInterpolation::SecondDerivative, 0.0,
            QuantLib::CubicInterpolation::SecondDerivative, 0.0) {}
};

class DefaultLogCubic : public QuantLib::LogCubic {
  public:
    DefaultLogCubic()
    : QuantLib::LogCubic(QuantLib::CubicInterpolation::Kruger) {}
};

class MonotonicLogCubic : public QuantLib::LogCubic {
  public:
    MonotonicLogCubic()
    : QuantLib::LogCubic(QuantLib::CubicInterpolation::Spline, true,
                         QuantLib::CubicInterpolation::SecondDerivative, 0.0,
                         QuantLib::CubicInterpolation::SecondDerivative, 0.0) {}
};


using QuantLib::YieldTermStructure;

SWIGINTERN bool boost_shared_ptr_Sl_YieldTermStructure_Sg__isNull(boost::shared_ptr< YieldTermStructure > *self){
                return !(*self);
            }
SWIGINTERN boost::shared_ptr< Observable > boost_shared_ptr_Sl_YieldTermStructure_Sg__asObservable(boost::shared_ptr< YieldTermStructure > *self){
        return boost::shared_ptr<Observable>(*self);
    }
SWIGINTERN boost::shared_ptr< Observable > Handle_Sl_YieldTermStructure_Sg__asObservable(Handle< YieldTermStructure > *self){
        return boost::shared_ptr<Observable>(*self);
    }

using QuantLib::ImpliedTermStructure;
typedef boost::shared_ptr<YieldTermStructure> ImpliedTermStructurePtr;

SWIGINTERN ImpliedTermStructurePtr *new_ImpliedTermStructurePtr(Handle< YieldTermStructure > const &curveHandle,Date const &referenceDate){
            return new ImpliedTermStructurePtr(
                new ImpliedTermStructure(curveHandle, referenceDate));
        }

using QuantLib::ZeroSpreadedTermStructure;
using QuantLib::ForwardSpreadedTermStructure;
typedef boost::shared_ptr<YieldTermStructure> ZeroSpreadedTermStructurePtr;
typedef boost::shared_ptr<YieldTermStructure> ForwardSpreadedTermStructurePtr;

SWIGINTERN ZeroSpreadedTermStructurePtr *new_ZeroSpreadedTermStructurePtr__SWIG_0(Handle< YieldTermStructure > const &curveHandle,Handle< Quote > const &spreadHandle,Compounding comp=QuantLib::Continuous,Frequency freq=QuantLib::NoFrequency,DayCounter const &dc=DayCounter()){
            return new ZeroSpreadedTermStructurePtr(
                new ZeroSpreadedTermStructure(curveHandle,spreadHandle, comp, freq, dc));
        }
SWIGINTERN ForwardSpreadedTermStructurePtr *new_ForwardSpreadedTermStructurePtr(Handle< YieldTermStructure > const &curveHandle,Handle< Quote > const &spreadHandle){
            return new ForwardSpreadedTermStructurePtr(
                new ForwardSpreadedTermStructure(curveHandle,spreadHandle));
        }

using QuantLib::InterpolatedPiecewiseZeroSpreadedTermStructure;


typedef boost::shared_ptr<YieldTermStructure> SpreadedLinearZeroInterpolatedTermStructurePtr;

SWIGINTERN SpreadedLinearZeroInterpolatedTermStructurePtr *new_SpreadedLinearZeroInterpolatedTermStructurePtr__SWIG_0(Handle< YieldTermStructure > const &curveHandle,std::vector< Handle< Quote > > const &spreadHandles,std::vector< Date > const &dates,Compounding comp=QuantLib::Continuous,Frequency freq=QuantLib::NoFrequency,DayCounter const &dc=DayCounter(),Linear const &factory=Linear()){
            return new SpreadedLinearZeroInterpolatedTermStructurePtr(
                new InterpolatedPiecewiseZeroSpreadedTermStructure<Linear>(
                          curveHandle,spreadHandles,dates,comp,freq,dc,factory));
        }

using QuantLib::FlatForward;
typedef boost::shared_ptr<YieldTermStructure> FlatForwardPtr;

SWIGINTERN FlatForwardPtr *new_FlatForwardPtr__SWIG_0(Date const &referenceDate,Handle< Quote > const &forward,DayCounter const &dayCounter,Compounding compounding=QuantLib::Continuous,Frequency frequency=QuantLib::Annual){
            return new FlatForwardPtr(
                           new FlatForward(referenceDate,forward,dayCounter,
                                           compounding,frequency));
        }
SWIGINTERN FlatForwardPtr *new_FlatForwardPtr__SWIG_3(Date const &referenceDate,Rate forward,DayCounter const &dayCounter,Compounding compounding=QuantLib::Continuous,Frequency frequency=QuantLib::Annual){
            return new FlatForwardPtr(
                           new FlatForward(referenceDate,forward,dayCounter,
                                           compounding,frequency));
        }
SWIGINTERN FlatForwardPtr *new_FlatForwardPtr__SWIG_6(Integer settlementDays,Calendar const &calendar,Handle< Quote > const &forward,DayCounter const &dayCounter,Compounding compounding=QuantLib::Continuous,Frequency frequency=QuantLib::Annual){
            return new FlatForwardPtr(
                 new FlatForward(settlementDays,calendar,forward,dayCounter,
                                 compounding,frequency));
        }
SWIGINTERN FlatForwardPtr *new_FlatForwardPtr__SWIG_9(Integer settlementDays,Calendar const &calendar,Rate forward,DayCounter const &dayCounter,Compounding compounding=QuantLib::Continuous,Frequency frequency=QuantLib::Annual){
            return new FlatForwardPtr(
                 new FlatForward(settlementDays,calendar,forward,dayCounter,
                                 compounding,frequency));
        }

using QuantLib::TimeSeries;
using QuantLib::IntervalPrice;

SWIGINTERN TimeSeries< Real > *new_TimeSeries_Sl_Real_Sg___SWIG_1(std::vector< Date > const &d,std::vector< double > const &v){
            return new TimeSeries<double>(d.begin(), d.end(), v.begin());
        }
SWIGINTERN TimeSeries< IntervalPrice > *new_TimeSeries_Sl_IntervalPrice_Sg___SWIG_1(std::vector< Date > const &d,std::vector< IntervalPrice > const &v){
            return new TimeSeries<IntervalPrice>(d.begin(), d.end(), v.begin());
        }
SWIGINTERN IntervalPrice std_vector_Sl_IntervalPrice_Sg__pop(std::vector< IntervalPrice > *self){
                if (self->size() == 0)
                    throw std::out_of_range("pop from empty vector");
                IntervalPrice x = self->back();
                self->pop_back();
                return x;
            }
SWIGINTERN IntervalPrice &std_vector_Sl_IntervalPrice_Sg__get(std::vector< IntervalPrice > *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_IntervalPrice_Sg__set(std::vector< IntervalPrice > *self,int i,IntervalPrice const &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");
            }

using QuantLib::IndexManager;


using QuantLib::Index;

SWIGINTERN bool boost_shared_ptr_Sl_Index_Sg__isNull(boost::shared_ptr< Index > *self){
                return !(*self);
            }
SWIGINTERN void boost_shared_ptr_Sl_Index_Sg__addFixings(boost::shared_ptr< Index > *self,std::vector< Date > const &fixingDates,std::vector< Rate > const &fixings){
        (*self)->addFixings(fixingDates.begin(),fixingDates.end(),
                            fixings.begin());
    }
SWIGINTERN boost::shared_ptr< Observable > boost_shared_ptr_Sl_Index_Sg__asObservable(boost::shared_ptr< Index > *self){
        return boost::shared_ptr<Observable>(*self);
    }

using QuantLib::InterestRateIndex;
typedef boost::shared_ptr<Index> InterestRateIndexPtr;

SWIGINTERN std::string InterestRateIndexPtr_familyName(InterestRateIndexPtr *self){
            return boost::dynamic_pointer_cast<InterestRateIndex>(*self)
                ->familyName();
        }
SWIGINTERN Period InterestRateIndexPtr_tenor(InterestRateIndexPtr *self){
            return boost::dynamic_pointer_cast<InterestRateIndex>(*self)
                ->tenor();
        }
SWIGINTERN Natural InterestRateIndexPtr_fixingDays(InterestRateIndexPtr *self){
            return boost::dynamic_pointer_cast<InterestRateIndex>(*self)
                ->fixingDays();
        }
SWIGINTERN Date InterestRateIndexPtr_fixingDate(InterestRateIndexPtr *self,Date const &valueDate){
            return boost::dynamic_pointer_cast<InterestRateIndex>(*self)
                ->fixingDate(valueDate);
        }
SWIGINTERN Currency InterestRateIndexPtr_currency(InterestRateIndexPtr *self){
            return boost::dynamic_pointer_cast<InterestRateIndex>(*self)
                ->currency();
        }
SWIGINTERN DayCounter InterestRateIndexPtr_dayCounter(InterestRateIndexPtr *self){
            return boost::dynamic_pointer_cast<InterestRateIndex>(*self)
                ->dayCounter();
        }
SWIGINTERN Date InterestRateIndexPtr_maturityDate(InterestRateIndexPtr *self,Date const &valueDate){
            return boost::dynamic_pointer_cast<InterestRateIndex>(*self)
                ->maturityDate(valueDate);
        }
SWIGINTERN Date InterestRateIndexPtr_valueDate(InterestRateIndexPtr *self,Date const &fixingDate){
            return boost::dynamic_pointer_cast<InterestRateIndex>(*self)
                ->valueDate(fixingDate);
        }

using QuantLib::IborIndex;
using QuantLib::OvernightIndex;
typedef boost::shared_ptr<Index> IborIndexPtr;
typedef boost::shared_ptr<Index> OvernightIndexPtr;

SWIGINTERN IborIndexPtr *new_IborIndexPtr__SWIG_0(std::string const &familyName,Period const &tenor,Integer settlementDays,Currency const &currency,Calendar const &calendar,BusinessDayConvention convention,bool endOfMonth,DayCounter const &dayCounter,Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
            return new IborIndexPtr(new IborIndex(familyName, tenor,
                                                  settlementDays,
                                                  currency, calendar,
                                                  convention,
                                                  endOfMonth,
                                                  dayCounter, h));
        }
SWIGINTERN BusinessDayConvention IborIndexPtr_businessDayConvention(IborIndexPtr *self){
            return boost::dynamic_pointer_cast<IborIndex>(*self)
                ->businessDayConvention();
        }
SWIGINTERN bool IborIndexPtr_endOfMonth(IborIndexPtr *self){
            return boost::dynamic_pointer_cast<IborIndex>(*self)->endOfMonth();
        }
SWIGINTERN Handle< YieldTermStructure > IborIndexPtr_forwardingTermStructure(IborIndexPtr *self){
            return boost::dynamic_pointer_cast<IborIndex>(*self)
                ->forwardingTermStructure();
        }
SWIGINTERN IborIndexPtr IborIndexPtr_clone(IborIndexPtr *self,Handle< YieldTermStructure > const &h){
            return boost::dynamic_pointer_cast<IborIndex>(*self)
                ->clone(h);
    }

    IborIndexPtr as_iborindex(const InterestRateIndexPtr& index) {
        return boost::dynamic_pointer_cast<IborIndex>(index);
    }

SWIGINTERN OvernightIndexPtr *new_OvernightIndexPtr__SWIG_0(std::string const &familyName,Integer settlementDays,Currency const &currency,Calendar const &calendar,DayCounter const &dayCounter,Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
            return new OvernightIndexPtr(
                new OvernightIndex(familyName, settlementDays,
                                   currency, calendar,
                                   dayCounter, h));
        }

using QuantLib::Libor;
typedef boost::shared_ptr<Index> LiborPtr;

SWIGINTERN LiborPtr *new_LiborPtr__SWIG_0(std::string const &familyName,Period const &tenor,Natural settlementDays,Currency const &currency,Calendar const &financialCenterCalendar,DayCounter const &dayCounter,Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
            return new LiborPtr(
                new Libor(familyName,
                          tenor,
                          settlementDays,
                          currency,
                          financialCenterCalendar,
                          dayCounter,
                          h));
        }

using QuantLib::SwapIndex;
typedef boost::shared_ptr<Index> SwapIndexPtr;

SWIGINTERN SwapIndexPtr *new_SwapIndexPtr__SWIG_0(std::string const &familyName,Period const &tenor,Integer settlementDays,Currency const &currency,Calendar const &calendar,Period const &fixedLegTenor,BusinessDayConvention fixedLegConvention,DayCounter const &fixedLegDayCounter,IborIndexPtr const &iborIndex){
            boost::shared_ptr<IborIndex> xibor =
                boost::dynamic_pointer_cast<IborIndex>(iborIndex);
            return new SwapIndexPtr(new SwapIndex(familyName,
                                                  tenor, settlementDays,
                                                  currency, calendar,
                                                  fixedLegTenor,
                                                  fixedLegConvention,
                                                  fixedLegDayCounter,
                                                  xibor));
        }
SWIGINTERN SwapIndexPtr *new_SwapIndexPtr__SWIG_1(std::string const &familyName,Period const &tenor,Integer settlementDays,Currency const &currency,Calendar const &calendar,Period const &fixedLegTenor,BusinessDayConvention fixedLegConvention,DayCounter const &fixedLegDayCounter,IborIndexPtr const &iborIndex,Handle< YieldTermStructure > const &discountCurve){
            boost::shared_ptr<IborIndex> xibor =
                boost::dynamic_pointer_cast<IborIndex>(iborIndex);
            return new SwapIndexPtr(new SwapIndex(familyName,
                                                  tenor, settlementDays,
                                                  currency, calendar,
                                                  fixedLegTenor,
                                                  fixedLegConvention,
                                                  fixedLegDayCounter,
                                                  xibor, discountCurve));
        }
SWIGINTERN Period SwapIndexPtr_fixedLegTenor(SwapIndexPtr *self){
            return boost::dynamic_pointer_cast<SwapIndex>(*self)
                ->fixedLegTenor();
        }
SWIGINTERN BusinessDayConvention SwapIndexPtr_fixedLegConvention(SwapIndexPtr *self){
            return boost::dynamic_pointer_cast<SwapIndex>(*self)
                 ->fixedLegConvention();
        }
SWIGINTERN IborIndexPtr SwapIndexPtr_iborIndex(SwapIndexPtr *self){
            return boost::dynamic_pointer_cast<SwapIndex>(*self)
                ->iborIndex();
        }
SWIGINTERN Handle< YieldTermStructure > SwapIndexPtr_forwardingTermStructure(SwapIndexPtr *self){
            return boost::dynamic_pointer_cast<SwapIndex>(*self)
                ->forwardingTermStructure();
        }

using QuantLib::AUDLibor;
typedef boost::shared_ptr<Index> AUDLiborPtr;

SWIGINTERN AUDLiborPtr *new_AUDLiborPtr__SWIG_0(Period const &tenor,Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
          return new AUDLiborPtr(new AUDLibor(tenor,h));
      }

using QuantLib::CADLibor;
typedef boost::shared_ptr<Index> CADLiborPtr;

SWIGINTERN CADLiborPtr *new_CADLiborPtr__SWIG_0(Period const &tenor,Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
          return new CADLiborPtr(new CADLibor(tenor,h));
      }

using QuantLib::Cdor;
typedef boost::shared_ptr<Index> CdorPtr;

SWIGINTERN CdorPtr *new_CdorPtr__SWIG_0(Period const &tenor,Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
          return new CdorPtr(new Cdor(tenor,h));
      }

using QuantLib::CHFLibor;
typedef boost::shared_ptr<Index> CHFLiborPtr;

SWIGINTERN CHFLiborPtr *new_CHFLiborPtr__SWIG_0(Period const &tenor,Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
          return new CHFLiborPtr(new CHFLibor(tenor,h));
      }

using QuantLib::DKKLibor;
typedef boost::shared_ptr<Index> DKKLiborPtr;

SWIGINTERN DKKLiborPtr *new_DKKLiborPtr__SWIG_0(Period const &tenor,Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
          return new DKKLiborPtr(new DKKLibor(tenor,h));
      }

using QuantLib::Bbsw;
typedef boost::shared_ptr<Index> BbswPtr;

SWIGINTERN BbswPtr *new_BbswPtr__SWIG_0(Period const &tenor,Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
          return new BbswPtr(new Bbsw(tenor,h));
      }

using QuantLib::Bbsw1M;
typedef boost::shared_ptr<Index> Bbsw1MPtr;

SWIGINTERN Bbsw1MPtr *new_Bbsw1MPtr__SWIG_0(Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
          return new Bbsw1MPtr(new Bbsw1M(h));
      }

using QuantLib::Bbsw2M;
typedef boost::shared_ptr<Index> Bbsw2MPtr;

SWIGINTERN Bbsw2MPtr *new_Bbsw2MPtr__SWIG_0(Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
          return new Bbsw2MPtr(new Bbsw2M(h));
      }

using QuantLib::Bbsw3M;
typedef boost::shared_ptr<Index> Bbsw3MPtr;

SWIGINTERN Bbsw3MPtr *new_Bbsw3MPtr__SWIG_0(Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
          return new Bbsw3MPtr(new Bbsw3M(h));
      }

using QuantLib::Bbsw4M;
typedef boost::shared_ptr<Index> Bbsw4MPtr;

SWIGINTERN Bbsw4MPtr *new_Bbsw4MPtr__SWIG_0(Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
          return new Bbsw4MPtr(new Bbsw4M(h));
      }

using QuantLib::Bbsw5M;
typedef boost::shared_ptr<Index> Bbsw5MPtr;

SWIGINTERN Bbsw5MPtr *new_Bbsw5MPtr__SWIG_0(Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
          return new Bbsw5MPtr(new Bbsw5M(h));
      }

using QuantLib::Bbsw6M;
typedef boost::shared_ptr<Index> Bbsw6MPtr;

SWIGINTERN Bbsw6MPtr *new_Bbsw6MPtr__SWIG_0(Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
          return new Bbsw6MPtr(new Bbsw6M(h));
      }

using QuantLib::Bkbm;
typedef boost::shared_ptr<Index> BkbmPtr;

SWIGINTERN BkbmPtr *new_BkbmPtr__SWIG_0(Period const &tenor,Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
          return new BkbmPtr(new Bkbm(tenor,h));
      }

using QuantLib::Bkbm1M;
typedef boost::shared_ptr<Index> Bkbm1MPtr;

SWIGINTERN Bkbm1MPtr *new_Bkbm1MPtr__SWIG_0(Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
          return new Bkbm1MPtr(new Bkbm1M(h));
      }

using QuantLib::Bkbm2M;
typedef boost::shared_ptr<Index> Bkbm2MPtr;

SWIGINTERN Bkbm2MPtr *new_Bkbm2MPtr__SWIG_0(Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
          return new Bkbm2MPtr(new Bkbm2M(h));
      }

using QuantLib::Bkbm3M;
typedef boost::shared_ptr<Index> Bkbm3MPtr;

SWIGINTERN Bkbm3MPtr *new_Bkbm3MPtr__SWIG_0(Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
          return new Bkbm3MPtr(new Bkbm3M(h));
      }

using QuantLib::Bkbm4M;
typedef boost::shared_ptr<Index> Bkbm4MPtr;

SWIGINTERN Bkbm4MPtr *new_Bkbm4MPtr__SWIG_0(Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
          return new Bkbm4MPtr(new Bkbm4M(h));
      }

using QuantLib::Bkbm5M;
typedef boost::shared_ptr<Index> Bkbm5MPtr;

SWIGINTERN Bkbm5MPtr *new_Bkbm5MPtr__SWIG_0(Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
          return new Bkbm5MPtr(new Bkbm5M(h));
      }

using QuantLib::Bkbm6M;
typedef boost::shared_ptr<Index> Bkbm6MPtr;

SWIGINTERN Bkbm6MPtr *new_Bkbm6MPtr__SWIG_0(Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
          return new Bkbm6MPtr(new Bkbm6M(h));
      }

using QuantLib::Euribor;
typedef boost::shared_ptr<Index> EuriborPtr;

SWIGINTERN EuriborPtr *new_EuriborPtr__SWIG_0(Period const &tenor,Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
          return new EuriborPtr(new Euribor(tenor,h));
      }

using QuantLib::EuriborSW;
typedef boost::shared_ptr<Index> EuriborSWPtr;

SWIGINTERN EuriborSWPtr *new_EuriborSWPtr__SWIG_0(Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
          return new EuriborSWPtr(new EuriborSW(h));
      }

using QuantLib::Euribor2W;
typedef boost::shared_ptr<Index> Euribor2WPtr;

SWIGINTERN Euribor2WPtr *new_Euribor2WPtr__SWIG_0(Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
          return new Euribor2WPtr(new Euribor2W(h));
      }

using QuantLib::Euribor3W;
typedef boost::shared_ptr<Index> Euribor3WPtr;

SWIGINTERN Euribor3WPtr *new_Euribor3WPtr__SWIG_0(Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
          return new Euribor3WPtr(new Euribor3W(h));
      }

using QuantLib::Euribor1M;
typedef boost::shared_ptr<Index> Euribor1MPtr;

SWIGINTERN Euribor1MPtr *new_Euribor1MPtr__SWIG_0(Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
          return new Euribor1MPtr(new Euribor1M(h));
      }

using QuantLib::Euribor2M;
typedef boost::shared_ptr<Index> Euribor2MPtr;

SWIGINTERN Euribor2MPtr *new_Euribor2MPtr__SWIG_0(Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
          return new Euribor2MPtr(new Euribor2M(h));
      }

using QuantLib::Euribor3M;
typedef boost::shared_ptr<Index> Euribor3MPtr;

SWIGINTERN Euribor3MPtr *new_Euribor3MPtr__SWIG_0(Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
          return new Euribor3MPtr(new Euribor3M(h));
      }

using QuantLib::Euribor4M;
typedef boost::shared_ptr<Index> Euribor4MPtr;

SWIGINTERN Euribor4MPtr *new_Euribor4MPtr__SWIG_0(Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
          return new Euribor4MPtr(new Euribor4M(h));
      }

using QuantLib::Euribor5M;
typedef boost::shared_ptr<Index> Euribor5MPtr;

SWIGINTERN Euribor5MPtr *new_Euribor5MPtr__SWIG_0(Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
          return new Euribor5MPtr(new Euribor5M(h));
      }

using QuantLib::Euribor6M;
typedef boost::shared_ptr<Index> Euribor6MPtr;

SWIGINTERN Euribor6MPtr *new_Euribor6MPtr__SWIG_0(Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
          return new Euribor6MPtr(new Euribor6M(h));
      }

using QuantLib::Euribor7M;
typedef boost::shared_ptr<Index> Euribor7MPtr;

SWIGINTERN Euribor7MPtr *new_Euribor7MPtr__SWIG_0(Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
          return new Euribor7MPtr(new Euribor7M(h));
      }

using QuantLib::Euribor8M;
typedef boost::shared_ptr<Index> Euribor8MPtr;

SWIGINTERN Euribor8MPtr *new_Euribor8MPtr__SWIG_0(Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
          return new Euribor8MPtr(new Euribor8M(h));
      }

using QuantLib::Euribor9M;
typedef boost::shared_ptr<Index> Euribor9MPtr;

SWIGINTERN Euribor9MPtr *new_Euribor9MPtr__SWIG_0(Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
          return new Euribor9MPtr(new Euribor9M(h));
      }

using QuantLib::Euribor10M;
typedef boost::shared_ptr<Index> Euribor10MPtr;

SWIGINTERN Euribor10MPtr *new_Euribor10MPtr__SWIG_0(Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
          return new Euribor10MPtr(new Euribor10M(h));
      }

using QuantLib::Euribor11M;
typedef boost::shared_ptr<Index> Euribor11MPtr;

SWIGINTERN Euribor11MPtr *new_Euribor11MPtr__SWIG_0(Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
          return new Euribor11MPtr(new Euribor11M(h));
      }

using QuantLib::Euribor1Y;
typedef boost::shared_ptr<Index> Euribor1YPtr;

SWIGINTERN Euribor1YPtr *new_Euribor1YPtr__SWIG_0(Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
          return new Euribor1YPtr(new Euribor1Y(h));
      }

using QuantLib::Euribor365;
typedef boost::shared_ptr<Index> Euribor365Ptr;

SWIGINTERN Euribor365Ptr *new_Euribor365Ptr__SWIG_0(Period const &tenor,Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
          return new Euribor365Ptr(new Euribor365(tenor,h));
      }

using QuantLib::Euribor365_SW;
typedef boost::shared_ptr<Index> Euribor365_SWPtr;

SWIGINTERN Euribor365_SWPtr *new_Euribor365_SWPtr__SWIG_0(Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
          return new Euribor365_SWPtr(new Euribor365_SW(h));
      }

using QuantLib::Euribor365_2W;
typedef boost::shared_ptr<Index> Euribor365_2WPtr;

SWIGINTERN Euribor365_2WPtr *new_Euribor365_2WPtr__SWIG_0(Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
          return new Euribor365_2WPtr(new Euribor365_2W(h));
      }

using QuantLib::Euribor365_3W;
typedef boost::shared_ptr<Index> Euribor365_3WPtr;

SWIGINTERN Euribor365_3WPtr *new_Euribor365_3WPtr__SWIG_0(Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
          return new Euribor365_3WPtr(new Euribor365_3W(h));
      }

using QuantLib::Euribor365_1M;
typedef boost::shared_ptr<Index> Euribor365_1MPtr;

SWIGINTERN Euribor365_1MPtr *new_Euribor365_1MPtr__SWIG_0(Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
          return new Euribor365_1MPtr(new Euribor365_1M(h));
      }

using QuantLib::Euribor365_2M;
typedef boost::shared_ptr<Index> Euribor365_2MPtr;

SWIGINTERN Euribor365_2MPtr *new_Euribor365_2MPtr__SWIG_0(Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
          return new Euribor365_2MPtr(new Euribor365_2M(h));
      }

using QuantLib::Euribor365_3M;
typedef boost::shared_ptr<Index> Euribor365_3MPtr;

SWIGINTERN Euribor365_3MPtr *new_Euribor365_3MPtr__SWIG_0(Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
          return new Euribor365_3MPtr(new Euribor365_3M(h));
      }

using QuantLib::Euribor365_4M;
typedef boost::shared_ptr<Index> Euribor365_4MPtr;

SWIGINTERN Euribor365_4MPtr *new_Euribor365_4MPtr__SWIG_0(Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
          return new Euribor365_4MPtr(new Euribor365_4M(h));
      }

using QuantLib::Euribor365_5M;
typedef boost::shared_ptr<Index> Euribor365_5MPtr;

SWIGINTERN Euribor365_5MPtr *new_Euribor365_5MPtr__SWIG_0(Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
          return new Euribor365_5MPtr(new Euribor365_5M(h));
      }

using QuantLib::Euribor365_6M;
typedef boost::shared_ptr<Index> Euribor365_6MPtr;

SWIGINTERN Euribor365_6MPtr *new_Euribor365_6MPtr__SWIG_0(Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
          return new Euribor365_6MPtr(new Euribor365_6M(h));
      }

using QuantLib::Euribor365_7M;
typedef boost::shared_ptr<Index> Euribor365_7MPtr;

SWIGINTERN Euribor365_7MPtr *new_Euribor365_7MPtr__SWIG_0(Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
          return new Euribor365_7MPtr(new Euribor365_7M(h));
      }

using QuantLib::Euribor365_8M;
typedef boost::shared_ptr<Index> Euribor365_8MPtr;

SWIGINTERN Euribor365_8MPtr *new_Euribor365_8MPtr__SWIG_0(Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
          return new Euribor365_8MPtr(new Euribor365_8M(h));
      }

using QuantLib::Euribor365_9M;
typedef boost::shared_ptr<Index> Euribor365_9MPtr;

SWIGINTERN Euribor365_9MPtr *new_Euribor365_9MPtr__SWIG_0(Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
          return new Euribor365_9MPtr(new Euribor365_9M(h));
      }

using QuantLib::Euribor365_10M;
typedef boost::shared_ptr<Index> Euribor365_10MPtr;

SWIGINTERN Euribor365_10MPtr *new_Euribor365_10MPtr__SWIG_0(Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
          return new Euribor365_10MPtr(new Euribor365_10M(h));
      }

using QuantLib::Euribor365_11M;
typedef boost::shared_ptr<Index> Euribor365_11MPtr;

SWIGINTERN Euribor365_11MPtr *new_Euribor365_11MPtr__SWIG_0(Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
          return new Euribor365_11MPtr(new Euribor365_11M(h));
      }

using QuantLib::Euribor365_1Y;
typedef boost::shared_ptr<Index> Euribor365_1YPtr;

SWIGINTERN Euribor365_1YPtr *new_Euribor365_1YPtr__SWIG_0(Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
          return new Euribor365_1YPtr(new Euribor365_1Y(h));
      }

using QuantLib::EURLibor;
typedef boost::shared_ptr<Index> EURLiborPtr;

SWIGINTERN EURLiborPtr *new_EURLiborPtr__SWIG_0(Period const &tenor,Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
          return new EURLiborPtr(new EURLibor(tenor,h));
      }

using QuantLib::EURLiborSW;
typedef boost::shared_ptr<Index> EURLiborSWPtr;

SWIGINTERN EURLiborSWPtr *new_EURLiborSWPtr__SWIG_0(Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
          return new EURLiborSWPtr(new EURLiborSW(h));
      }

using QuantLib::EURLibor2W;
typedef boost::shared_ptr<Index> EURLibor2WPtr;

SWIGINTERN EURLibor2WPtr *new_EURLibor2WPtr__SWIG_0(Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
          return new EURLibor2WPtr(new EURLibor2W(h));
      }

using QuantLib::EURLibor1M;
typedef boost::shared_ptr<Index> EURLibor1MPtr;

SWIGINTERN EURLibor1MPtr *new_EURLibor1MPtr__SWIG_0(Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
          return new EURLibor1MPtr(new EURLibor1M(h));
      }

using QuantLib::EURLibor2M;
typedef boost::shared_ptr<Index> EURLibor2MPtr;

SWIGINTERN EURLibor2MPtr *new_EURLibor2MPtr__SWIG_0(Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
          return new EURLibor2MPtr(new EURLibor2M(h));
      }

using QuantLib::EURLibor3M;
typedef boost::shared_ptr<Index> EURLibor3MPtr;

SWIGINTERN EURLibor3MPtr *new_EURLibor3MPtr__SWIG_0(Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
          return new EURLibor3MPtr(new EURLibor3M(h));
      }

using QuantLib::EURLibor4M;
typedef boost::shared_ptr<Index> EURLibor4MPtr;

SWIGINTERN EURLibor4MPtr *new_EURLibor4MPtr__SWIG_0(Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
          return new EURLibor4MPtr(new EURLibor4M(h));
      }

using QuantLib::EURLibor5M;
typedef boost::shared_ptr<Index> EURLibor5MPtr;

SWIGINTERN EURLibor5MPtr *new_EURLibor5MPtr__SWIG_0(Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
          return new EURLibor5MPtr(new EURLibor5M(h));
      }

using QuantLib::EURLibor6M;
typedef boost::shared_ptr<Index> EURLibor6MPtr;

SWIGINTERN EURLibor6MPtr *new_EURLibor6MPtr__SWIG_0(Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
          return new EURLibor6MPtr(new EURLibor6M(h));
      }

using QuantLib::EURLibor7M;
typedef boost::shared_ptr<Index> EURLibor7MPtr;

SWIGINTERN EURLibor7MPtr *new_EURLibor7MPtr__SWIG_0(Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
          return new EURLibor7MPtr(new EURLibor7M(h));
      }

using QuantLib::EURLibor8M;
typedef boost::shared_ptr<Index> EURLibor8MPtr;

SWIGINTERN EURLibor8MPtr *new_EURLibor8MPtr__SWIG_0(Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
          return new EURLibor8MPtr(new EURLibor8M(h));
      }

using QuantLib::EURLibor9M;
typedef boost::shared_ptr<Index> EURLibor9MPtr;

SWIGINTERN EURLibor9MPtr *new_EURLibor9MPtr__SWIG_0(Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
          return new EURLibor9MPtr(new EURLibor9M(h));
      }

using QuantLib::EURLibor10M;
typedef boost::shared_ptr<Index> EURLibor10MPtr;

SWIGINTERN EURLibor10MPtr *new_EURLibor10MPtr__SWIG_0(Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
          return new EURLibor10MPtr(new EURLibor10M(h));
      }

using QuantLib::EURLibor11M;
typedef boost::shared_ptr<Index> EURLibor11MPtr;

SWIGINTERN EURLibor11MPtr *new_EURLibor11MPtr__SWIG_0(Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
          return new EURLibor11MPtr(new EURLibor11M(h));
      }

using QuantLib::EURLibor1Y;
typedef boost::shared_ptr<Index> EURLibor1YPtr;

SWIGINTERN EURLibor1YPtr *new_EURLibor1YPtr__SWIG_0(Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
          return new EURLibor1YPtr(new EURLibor1Y(h));
      }

using QuantLib::GBPLibor;
typedef boost::shared_ptr<Index> GBPLiborPtr;

SWIGINTERN GBPLiborPtr *new_GBPLiborPtr__SWIG_0(Period const &tenor,Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
          return new GBPLiborPtr(new GBPLibor(tenor,h));
      }

using QuantLib::Jibar;
typedef boost::shared_ptr<Index> JibarPtr;

SWIGINTERN JibarPtr *new_JibarPtr__SWIG_0(Period const &tenor,Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
          return new JibarPtr(new Jibar(tenor,h));
      }

using QuantLib::JPYLibor;
typedef boost::shared_ptr<Index> JPYLiborPtr;

SWIGINTERN JPYLiborPtr *new_JPYLiborPtr__SWIG_0(Period const &tenor,Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
          return new JPYLiborPtr(new JPYLibor(tenor,h));
      }

using QuantLib::NZDLibor;
typedef boost::shared_ptr<Index> NZDLiborPtr;

SWIGINTERN NZDLiborPtr *new_NZDLiborPtr__SWIG_0(Period const &tenor,Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
          return new NZDLiborPtr(new NZDLibor(tenor,h));
      }

using QuantLib::SEKLibor;
typedef boost::shared_ptr<Index> SEKLiborPtr;

SWIGINTERN SEKLiborPtr *new_SEKLiborPtr__SWIG_0(Period const &tenor,Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
          return new SEKLiborPtr(new SEKLibor(tenor,h));
      }

using QuantLib::Tibor;
typedef boost::shared_ptr<Index> TiborPtr;

SWIGINTERN TiborPtr *new_TiborPtr__SWIG_0(Period const &tenor,Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
          return new TiborPtr(new Tibor(tenor,h));
      }

using QuantLib::TRLibor;
typedef boost::shared_ptr<Index> TRLiborPtr;

SWIGINTERN TRLiborPtr *new_TRLiborPtr__SWIG_0(Period const &tenor,Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
          return new TRLiborPtr(new TRLibor(tenor,h));
      }

using QuantLib::USDLibor;
typedef boost::shared_ptr<Index> USDLiborPtr;

SWIGINTERN USDLiborPtr *new_USDLiborPtr__SWIG_0(Period const &tenor,Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
          return new USDLiborPtr(new USDLibor(tenor,h));
      }

using QuantLib::Zibor;
typedef boost::shared_ptr<Index> ZiborPtr;

SWIGINTERN ZiborPtr *new_ZiborPtr__SWIG_0(Period const &tenor,Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
          return new ZiborPtr(new Zibor(tenor,h));
      }

using QuantLib::Aonia;
typedef boost::shared_ptr<Index> AoniaPtr;

SWIGINTERN AoniaPtr *new_AoniaPtr__SWIG_0(Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
          return new AoniaPtr(new Aonia(h));
      }

using QuantLib::Eonia;
typedef boost::shared_ptr<Index> EoniaPtr;

SWIGINTERN EoniaPtr *new_EoniaPtr__SWIG_0(Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
          return new EoniaPtr(new Eonia(h));
      }

using QuantLib::Sonia;
typedef boost::shared_ptr<Index> SoniaPtr;

SWIGINTERN SoniaPtr *new_SoniaPtr__SWIG_0(Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
          return new SoniaPtr(new Sonia(h));
      }

using QuantLib::FedFunds;
typedef boost::shared_ptr<Index> FedFundsPtr;

SWIGINTERN FedFundsPtr *new_FedFundsPtr__SWIG_0(Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
          return new FedFundsPtr(new FedFunds(h));
      }

using QuantLib::Nzocr;
typedef boost::shared_ptr<Index> NzocrPtr;

SWIGINTERN NzocrPtr *new_NzocrPtr__SWIG_0(Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
          return new NzocrPtr(new Nzocr(h));
      }

using QuantLib::EuriborSwapIsdaFixA;
typedef boost::shared_ptr<Index> EuriborSwapIsdaFixAPtr;

SWIGINTERN EuriborSwapIsdaFixAPtr *new_EuriborSwapIsdaFixAPtr__SWIG_0(Period const &tenor,Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
          return new EuriborSwapIsdaFixAPtr(new EuriborSwapIsdaFixA(tenor,h));
      }
SWIGINTERN EuriborSwapIsdaFixAPtr *new_EuriborSwapIsdaFixAPtr__SWIG_2(Period const &tenor,Handle< YieldTermStructure > const &h1,Handle< YieldTermStructure > const &h2){
          return new EuriborSwapIsdaFixAPtr(new EuriborSwapIsdaFixA(tenor,h1,h2));
      }

using QuantLib::EuriborSwapIsdaFixB;
typedef boost::shared_ptr<Index> EuriborSwapIsdaFixBPtr;

SWIGINTERN EuriborSwapIsdaFixBPtr *new_EuriborSwapIsdaFixBPtr__SWIG_0(Period const &tenor,Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
          return new EuriborSwapIsdaFixBPtr(new EuriborSwapIsdaFixB(tenor,h));
      }
SWIGINTERN EuriborSwapIsdaFixBPtr *new_EuriborSwapIsdaFixBPtr__SWIG_2(Period const &tenor,Handle< YieldTermStructure > const &h1,Handle< YieldTermStructure > const &h2){
          return new EuriborSwapIsdaFixBPtr(new EuriborSwapIsdaFixB(tenor,h1,h2));
      }

using QuantLib::EuriborSwapIfrFix;
typedef boost::shared_ptr<Index> EuriborSwapIfrFixPtr;

SWIGINTERN EuriborSwapIfrFixPtr *new_EuriborSwapIfrFixPtr__SWIG_0(Period const &tenor,Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
          return new EuriborSwapIfrFixPtr(new EuriborSwapIfrFix(tenor,h));
      }
SWIGINTERN EuriborSwapIfrFixPtr *new_EuriborSwapIfrFixPtr__SWIG_2(Period const &tenor,Handle< YieldTermStructure > const &h1,Handle< YieldTermStructure > const &h2){
          return new EuriborSwapIfrFixPtr(new EuriborSwapIfrFix(tenor,h1,h2));
      }

using QuantLib::EurLiborSwapIsdaFixA;
typedef boost::shared_ptr<Index> EurLiborSwapIsdaFixAPtr;

SWIGINTERN EurLiborSwapIsdaFixAPtr *new_EurLiborSwapIsdaFixAPtr__SWIG_0(Period const &tenor,Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
          return new EurLiborSwapIsdaFixAPtr(new EurLiborSwapIsdaFixA(tenor,h));
      }
SWIGINTERN EurLiborSwapIsdaFixAPtr *new_EurLiborSwapIsdaFixAPtr__SWIG_2(Period const &tenor,Handle< YieldTermStructure > const &h1,Handle< YieldTermStructure > const &h2){
          return new EurLiborSwapIsdaFixAPtr(new EurLiborSwapIsdaFixA(tenor,h1,h2));
      }

using QuantLib::EurLiborSwapIsdaFixB;
typedef boost::shared_ptr<Index> EurLiborSwapIsdaFixBPtr;

SWIGINTERN EurLiborSwapIsdaFixBPtr *new_EurLiborSwapIsdaFixBPtr__SWIG_0(Period const &tenor,Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
          return new EurLiborSwapIsdaFixBPtr(new EurLiborSwapIsdaFixB(tenor,h));
      }
SWIGINTERN EurLiborSwapIsdaFixBPtr *new_EurLiborSwapIsdaFixBPtr__SWIG_2(Period const &tenor,Handle< YieldTermStructure > const &h1,Handle< YieldTermStructure > const &h2){
          return new EurLiborSwapIsdaFixBPtr(new EurLiborSwapIsdaFixB(tenor,h1,h2));
      }

using QuantLib::EurLiborSwapIfrFix;
typedef boost::shared_ptr<Index> EurLiborSwapIfrFixPtr;

SWIGINTERN EurLiborSwapIfrFixPtr *new_EurLiborSwapIfrFixPtr__SWIG_0(Period const &tenor,Handle< YieldTermStructure > const &h=Handle< YieldTermStructure >()){
          return new EurLiborSwapIfrFixPtr(new EurLiborSwapIfrFix(tenor,h));
      }
SWIGINTERN EurLiborSwapIfrFixPtr *new_EurLiborSwapIfrFixPtr__SWIG_2(Period const &tenor,Handle< YieldTermStructure > const &h1,Handle< YieldTermStructure > const &h2){
          return new EurLiborSwapIfrFixPtr(new EurLiborSwapIfrFix(tenor,h1,h2));
      }

using QuantLib::Bisection;
using QuantLib::Brent;
using QuantLib::FalsePosition;
using QuantLib::Newton;
using QuantLib::NewtonSafe;
using QuantLib::Ridder;
using QuantLib::Secant;


using QuantLib::Constraint;
using QuantLib::BoundaryConstraint;
using QuantLib::NoConstraint;
using QuantLib::PositiveConstraint;
using QuantLib::CompositeConstraint;
using QuantLib::NonhomogeneousBoundaryConstraint;


using QuantLib::EndCriteria;


using QuantLib::OptimizationMethod;
using QuantLib::ConjugateGradient;
using QuantLib::Simplex;
using QuantLib::SteepestDescent;
using QuantLib::BFGS;
using QuantLib::LevenbergMarquardt;
using QuantLib::DifferentialEvolution;
using QuantLib::SamplerGaussian;
using QuantLib::SamplerLogNormal;
using QuantLib::SamplerMirrorGaussian;
using QuantLib::ProbabilityBoltzmannDownhill;
using QuantLib::TemperatureExponential;
using QuantLib::ReannealingTrivial;
using QuantLib::GaussianSimulatedAnnealing;
using QuantLib::MirrorGaussianSimulatedAnnealing;
using QuantLib::LogNormalSimulatedAnnealing;



using QuantLib::Problem;


    class Optimizer {};


using QuantLib::VolatilityType;
using QuantLib::ShiftedLognormal;
using QuantLib::Normal;


using QuantLib::BlackVolTermStructure;
using QuantLib::LocalVolTermStructure;
using QuantLib::OptionletVolatilityStructure;
using QuantLib::SwaptionVolatilityStructure;

SWIGINTERN bool boost_shared_ptr_Sl_BlackVolTermStructure_Sg__isNull(boost::shared_ptr< BlackVolTermStructure > *self){
                return !(*self);
            }
SWIGINTERN boost::shared_ptr< Observable > boost_shared_ptr_Sl_BlackVolTermStructure_Sg__asObservable(boost::shared_ptr< BlackVolTermStructure > *self){
        return boost::shared_ptr<Observable>(*self);
    }
SWIGINTERN boost::shared_ptr< Observable > Handle_Sl_BlackVolTermStructure_Sg__asObservable(Handle< BlackVolTermStructure > *self){
        return boost::shared_ptr<Observable>(*self);
    }
SWIGINTERN bool boost_shared_ptr_Sl_LocalVolTermStructure_Sg__isNull(boost::shared_ptr< LocalVolTermStructure > *self){
                return !(*self);
            }
SWIGINTERN boost::shared_ptr< Observable > boost_shared_ptr_Sl_LocalVolTermStructure_Sg__asObservable(boost::shared_ptr< LocalVolTermStructure > *self){
        return boost::shared_ptr<Observable>(*self);
    }
SWIGINTERN boost::shared_ptr< Observable > Handle_Sl_LocalVolTermStructure_Sg__asObservable(Handle< LocalVolTermStructure > *self){
        return boost::shared_ptr<Observable>(*self);
    }
SWIGINTERN bool boost_shared_ptr_Sl_OptionletVolatilityStructure_Sg__isNull(boost::shared_ptr< OptionletVolatilityStructure > *self){
                return !(*self);
            }
SWIGINTERN boost::shared_ptr< Observable > boost_shared_ptr_Sl_OptionletVolatilityStructure_Sg__asObservable(boost::shared_ptr< OptionletVolatilityStructure > *self){
        return boost::shared_ptr<Observable>(*self);
    }
SWIGINTERN boost::shared_ptr< Observable > Handle_Sl_OptionletVolatilityStructure_Sg__asObservable(Handle< OptionletVolatilityStructure > *self){
        return boost::shared_ptr<Observable>(*self);
    }

using QuantLib::SwaptionVolatilityStructure;

SWIGINTERN bool boost_shared_ptr_Sl_SwaptionVolatilityStructure_Sg__isNull(boost::shared_ptr< SwaptionVolatilityStructure > *self){
                return !(*self);
            }
SWIGINTERN boost::shared_ptr< Observable > boost_shared_ptr_Sl_SwaptionVolatilityStructure_Sg__asObservable(boost::shared_ptr< SwaptionVolatilityStructure > *self){
        return boost::shared_ptr<Observable>(*self);
    }
SWIGINTERN boost::shared_ptr< Observable > Handle_Sl_SwaptionVolatilityStructure_Sg__asObservable(Handle< SwaptionVolatilityStructure > *self){
        return boost::shared_ptr<Observable>(*self);
    }

using QuantLib::BlackConstantVol;
typedef boost::shared_ptr<BlackVolTermStructure> BlackConstantVolPtr;

SWIGINTERN BlackConstantVolPtr *new_BlackConstantVolPtr__SWIG_0(Date const &referenceDate,Calendar const &c,Volatility volatility,DayCounter const &dayCounter){
            return new BlackConstantVolPtr(
                new BlackConstantVol(referenceDate, c,
                                     volatility, dayCounter));
        }
SWIGINTERN BlackConstantVolPtr *new_BlackConstantVolPtr__SWIG_1(Date const &referenceDate,Calendar const &c,Handle< Quote > const &volatility,DayCounter const &dayCounter){
            return new BlackConstantVolPtr(
                new BlackConstantVol(referenceDate, c,
                                     volatility, dayCounter));
        }
SWIGINTERN BlackConstantVolPtr *new_BlackConstantVolPtr__SWIG_2(Natural settlementDays,Calendar const &calendar,Volatility volatility,DayCounter const &dayCounter){
            return new BlackConstantVolPtr(
                new BlackConstantVol(settlementDays, calendar,
                                     volatility, dayCounter));
        }
SWIGINTERN BlackConstantVolPtr *new_BlackConstantVolPtr__SWIG_3(Natural settlementDays,Calendar const &calendar,Handle< Quote > const &volatility,DayCounter const &dayCounter){
            return new BlackConstantVolPtr(
                new BlackConstantVol(settlementDays, calendar,
                                     volatility, dayCounter));
        }

using QuantLib::BlackVarianceCurve;
typedef boost::shared_ptr<BlackVolTermStructure> BlackVarianceCurvePtr;

SWIGINTERN BlackVarianceCurvePtr *new_BlackVarianceCurvePtr__SWIG_0(Date const &referenceDate,std::vector< Date > const &dates,std::vector< Real > const &volatilities,DayCounter const &dayCounter,bool forceMonotoneVariance=true){
            return new BlackVarianceCurvePtr(
                new BlackVarianceCurve(referenceDate,
                                       dates, volatilities,
                                       dayCounter, forceMonotoneVariance));
        }

using QuantLib::BlackVarianceSurface;
typedef boost::shared_ptr<BlackVolTermStructure> BlackVarianceSurfacePtr;

SWIGINTERN BlackVarianceSurfacePtr *new_BlackVarianceSurfacePtr__SWIG_0(Date const &referenceDate,Calendar const &cal,std::vector< Date > const &dates,std::vector< Real > const &strikes,Matrix const &blackVols,DayCounter const &dayCounter,BlackVarianceSurface::Extrapolation lower=BlackVarianceSurface::InterpolatorDefaultExtrapolation,BlackVarianceSurface::Extrapolation upper=BlackVarianceSurface::InterpolatorDefaultExtrapolation,std::string const &interpolator=""){
            BlackVarianceSurface* surf =
                new BlackVarianceSurface(referenceDate,cal,
                                         dates,strikes,
                                         blackVols,dayCounter,lower,upper);
            std::string s = boost::algorithm::to_lower_copy(interpolator);
            if (s == "" || s == "bilinear") {
                surf->setInterpolation<QuantLib::Bilinear>();
            } else if (s == "bicubic") {
                surf->setInterpolation<QuantLib::Bicubic>();
            } else {
                QL_FAIL("Unknown interpolator: " << interpolator);
            }
            return new BlackVarianceSurfacePtr(surf);
        }
SWIGINTERN void BlackVarianceSurfacePtr_setInterpolation__SWIG_0(BlackVarianceSurfacePtr *self,std::string const &interpolator=""){
            std::string s = boost::algorithm::to_lower_copy(interpolator);
            boost::shared_ptr<BlackVarianceSurface> surf =
                boost::dynamic_pointer_cast<BlackVarianceSurface>(*self);
            if (s == "" || s == "bilinear") {
                surf->setInterpolation<QuantLib::Bilinear>();
            } else if (s == "bicubic") {
                surf->setInterpolation<QuantLib::Bicubic>();
            } else {
                QL_FAIL("Unknown interpolator: " << interpolator);
            }
            
        }

using QuantLib::LocalConstantVol;
typedef boost::shared_ptr<LocalVolTermStructure> LocalConstantVolPtr;

SWIGINTERN LocalConstantVolPtr *new_LocalConstantVolPtr__SWIG_0(Date const &referenceDate,Volatility volatility,DayCounter const &dayCounter){
            return new LocalConstantVolPtr(
                new LocalConstantVol(referenceDate, volatility, dayCounter));
        }
SWIGINTERN LocalConstantVolPtr *new_LocalConstantVolPtr__SWIG_1(Date const &referenceDate,Handle< Quote > const &volatility,DayCounter const &dayCounter){
            return new LocalConstantVolPtr(
                new LocalConstantVol(referenceDate, volatility, dayCounter));
        }
SWIGINTERN LocalConstantVolPtr *new_LocalConstantVolPtr__SWIG_2(Integer settlementDays,Calendar const &calendar,Volatility volatility,DayCounter const &dayCounter){
            return new LocalConstantVolPtr(
                new LocalConstantVol(settlementDays, calendar,
                                     volatility, dayCounter));
        }
SWIGINTERN LocalConstantVolPtr *new_LocalConstantVolPtr__SWIG_3(Integer settlementDays,Calendar const &calendar,Handle< Quote > const &volatility,DayCounter const &dayCounter){
            return new LocalConstantVolPtr(
                new LocalConstantVol(settlementDays, calendar,
                                     volatility, dayCounter));
        }

using QuantLib::LocalVolSurface;
typedef boost::shared_ptr<LocalVolTermStructure> LocalVolSurfacePtr;

SWIGINTERN LocalVolSurfacePtr *new_LocalVolSurfacePtr__SWIG_0(Handle< BlackVolTermStructure > const &blackTS,Handle< YieldTermStructure > const &riskFreeTS,Handle< YieldTermStructure > const &dividendTS,Handle< Quote > const &underlying){
            return new LocalVolSurfacePtr(
                new LocalVolSurface(blackTS, riskFreeTS, 
                    dividendTS, underlying));
        
        }
SWIGINTERN LocalVolSurfacePtr *new_LocalVolSurfacePtr__SWIG_1(Handle< BlackVolTermStructure > const &blackTS,Handle< YieldTermStructure > const &riskFreeTS,Handle< YieldTermStructure > const &dividendTS,Real underlying){
            return new LocalVolSurfacePtr(
                new LocalVolSurface(blackTS, riskFreeTS, 
                    dividendTS, underlying));
        }

using QuantLib::ConstantOptionletVolatility;
typedef boost::shared_ptr<OptionletVolatilityStructure>
    ConstantOptionletVolatilityPtr;

SWIGINTERN ConstantOptionletVolatilityPtr *new_ConstantOptionletVolatilityPtr__SWIG_0(Date const &referenceDate,Calendar const &cal,BusinessDayConvention bdc,Volatility volatility,DayCounter const &dayCounter,VolatilityType const type=ShiftedLognormal,Real const shift=0.0){
            return new ConstantOptionletVolatilityPtr(
                new ConstantOptionletVolatility(referenceDate,
                                                cal, bdc, volatility,
                                                dayCounter, type, shift));
        }
SWIGINTERN ConstantOptionletVolatilityPtr *new_ConstantOptionletVolatilityPtr__SWIG_3(Date const &referenceDate,Calendar const &cal,BusinessDayConvention bdc,Handle< Quote > const &volatility,DayCounter const &dayCounter,VolatilityType const type=ShiftedLognormal,Real const shift=0.0){
            return new ConstantOptionletVolatilityPtr(
                new ConstantOptionletVolatility(referenceDate,
                                                cal, bdc, volatility,
                                                dayCounter, type, shift));
        }
SWIGINTERN ConstantOptionletVolatilityPtr *new_ConstantOptionletVolatilityPtr__SWIG_6(Natural settlementDays,Calendar const &cal,BusinessDayConvention bdc,Volatility volatility,DayCounter const &dayCounter,VolatilityType const type=ShiftedLognormal,Real const shift=0.0){
            return new ConstantOptionletVolatilityPtr(
                new ConstantOptionletVolatility(settlementDays,
                                                cal, bdc, volatility,
                                                dayCounter, type, shift));
        }
SWIGINTERN ConstantOptionletVolatilityPtr *new_ConstantOptionletVolatilityPtr__SWIG_9(Natural settlementDays,Calendar const &cal,BusinessDayConvention bdc,Handle< Quote > const &volatility,DayCounter const &dayCounter,VolatilityType const type=ShiftedLognormal,Real const shift=0.0){
            return new ConstantOptionletVolatilityPtr(
                new ConstantOptionletVolatility(settlementDays,
                                                cal, bdc, volatility,
                                                dayCounter, type, shift));
        }

using QuantLib::ConstantSwaptionVolatility;
typedef boost::shared_ptr<SwaptionVolatilityStructure>
    ConstantSwaptionVolatilityPtr;

SWIGINTERN ConstantSwaptionVolatilityPtr *new_ConstantSwaptionVolatilityPtr__SWIG_0(Natural settlementDays,Calendar const &cal,BusinessDayConvention bdc,Handle< Quote > const &volatility,DayCounter const &dc,VolatilityType const type=ShiftedLognormal,Real const shift=0.0){
            return new ConstantSwaptionVolatilityPtr(
                new ConstantSwaptionVolatility(settlementDays, cal, bdc,
                                               volatility, dc, type, shift));
        }
SWIGINTERN ConstantSwaptionVolatilityPtr *new_ConstantSwaptionVolatilityPtr__SWIG_3(Date const &referenceDate,Calendar const &cal,BusinessDayConvention bdc,Handle< Quote > const &volatility,DayCounter const &dc,VolatilityType const type=ShiftedLognormal,Real const shift=0.0){
            return new ConstantSwaptionVolatilityPtr(
                new ConstantSwaptionVolatility(referenceDate, cal, bdc,
                                               volatility, dc, type, shift));
        }
SWIGINTERN ConstantSwaptionVolatilityPtr *new_ConstantSwaptionVolatilityPtr__SWIG_6(Natural settlementDays,Calendar const &cal,BusinessDayConvention bdc,Volatility volatility,DayCounter const &dc,VolatilityType const type=ShiftedLognormal,Real const shift=0.0){
            return new ConstantSwaptionVolatilityPtr(
                new ConstantSwaptionVolatility(settlementDays, cal, bdc,
                                               volatility, dc, type, shift));
        }
SWIGINTERN ConstantSwaptionVolatilityPtr *new_ConstantSwaptionVolatilityPtr__SWIG_9(Date const &referenceDate,Calendar const &cal,BusinessDayConvention bdc,Volatility volatility,DayCounter const &dc,VolatilityType const type=ShiftedLognormal,Real const shift=0.0){
            return new ConstantSwaptionVolatilityPtr(
                new ConstantSwaptionVolatility(referenceDate, cal, bdc,
                                               volatility, dc, type, shift));
        }

using QuantLib::SwaptionVolatilityMatrix;
typedef boost::shared_ptr<SwaptionVolatilityStructure>
    SwaptionVolatilityMatrixPtr;

SWIGINTERN SwaptionVolatilityMatrixPtr *new_SwaptionVolatilityMatrixPtr__SWIG_0(Date const &referenceDate,std::vector< Date > const &dates,std::vector< Period > const &lengths,Matrix const &vols,DayCounter const &dayCounter,bool const flatExtrapolation=false,VolatilityType const type=ShiftedLognormal,Matrix const &shifts=Matrix()){
            return new SwaptionVolatilityMatrixPtr(
                new SwaptionVolatilityMatrix(referenceDate,dates,lengths,
                                             vols,dayCounter,
                                             flatExtrapolation, type, shifts));
        }
SWIGINTERN SwaptionVolatilityMatrixPtr *new_SwaptionVolatilityMatrixPtr__SWIG_4(Calendar const &calendar,BusinessDayConvention bdc,std::vector< Period > const &optionTenors,std::vector< Period > const &swapTenors,std::vector< std::vector< Handle< Quote > > > const &vols,DayCounter const &dayCounter,bool const flatExtrapolation=false,VolatilityType const type=ShiftedLognormal,std::vector< std::vector< Real > > const &shifts=std::vector< std::vector< Real > >()){
            return new SwaptionVolatilityMatrixPtr(
                new SwaptionVolatilityMatrix(calendar,bdc,optionTenors,
                                             swapTenors,vols,dayCounter,
                                             flatExtrapolation, type, shifts));
        }
SWIGINTERN SwaptionVolatilityMatrixPtr *new_SwaptionVolatilityMatrixPtr__SWIG_8(Calendar const &calendar,BusinessDayConvention bdc,std::vector< Period > const &optionTenors,std::vector< Period > const &swapTenors,Matrix const &vols,DayCounter const &dayCounter,bool const flatExtrapolation=false,VolatilityType const type=ShiftedLognormal,Matrix const &shifts=Matrix()){
            return new SwaptionVolatilityMatrixPtr(
                new SwaptionVolatilityMatrix(calendar,bdc,optionTenors,
                                             swapTenors,vols,dayCounter,
                                             flatExtrapolation, type, shifts));
        }

using QuantLib::SwaptionVolCube1;
using QuantLib::SwaptionVolCube2;
typedef boost::shared_ptr<SwaptionVolatilityStructure> SwaptionVolCube1Ptr;
typedef boost::shared_ptr<SwaptionVolatilityStructure> SwaptionVolCube2Ptr;

SWIGINTERN SwaptionVolCube1Ptr *new_SwaptionVolCube1Ptr__SWIG_0(Handle< SwaptionVolatilityStructure > const &atmVolStructure,std::vector< Period > const &optionTenors,std::vector< Period > const &swapTenors,std::vector< Spread > const &strikeSpreads,std::vector< std::vector< Handle< Quote > > > const &volSpreads,SwapIndexPtr const &swapIndexBase,SwapIndexPtr const &shortSwapIndexBase,bool vegaWeightedSmileFit,std::vector< std::vector< Handle< Quote > > > const &parametersGuess,std::vector< bool > const &isParameterFixed,bool isAtmCalibrated,boost::shared_ptr< EndCriteria > const &endCriteria=boost::shared_ptr< EndCriteria >(),Real maxErrorTolerance=Null< Real >(),boost::shared_ptr< OptimizationMethod > const &optMethod=boost::shared_ptr< OptimizationMethod >()){
            const boost::shared_ptr<SwapIndex> swi =
                boost::dynamic_pointer_cast<SwapIndex>(swapIndexBase);
            const boost::shared_ptr<SwapIndex> shortSwi =
                boost::dynamic_pointer_cast<SwapIndex>(shortSwapIndexBase);
            return new SwaptionVolCube1Ptr(
                new SwaptionVolCube1(
                    atmVolStructure,optionTenors,swapTenors, strikeSpreads,
                    volSpreads, swi, shortSwi, vegaWeightedSmileFit,
                    parametersGuess,isParameterFixed,isAtmCalibrated,
                    endCriteria,maxErrorTolerance,optMethod));
        }
SWIGINTERN Matrix SwaptionVolCube1Ptr_sparseSabrParameters(SwaptionVolCube1Ptr const *self){
            return boost::dynamic_pointer_cast<SwaptionVolCube1>(*self)
                ->sparseSabrParameters();
        }
SWIGINTERN Matrix SwaptionVolCube1Ptr_denseSabrParameters(SwaptionVolCube1Ptr const *self){
            return boost::dynamic_pointer_cast<SwaptionVolCube1>(*self)
                ->denseSabrParameters();
        }
SWIGINTERN Matrix SwaptionVolCube1Ptr_marketVolCube(SwaptionVolCube1Ptr const *self){
            return boost::dynamic_pointer_cast<SwaptionVolCube1>(*self)
                ->marketVolCube();
        }
SWIGINTERN Matrix SwaptionVolCube1Ptr_volCubeAtmCalibrated(SwaptionVolCube1Ptr const *self){
            return boost::dynamic_pointer_cast<SwaptionVolCube1>(*self)
                ->volCubeAtmCalibrated();
        }
SWIGINTERN SwaptionVolCube2Ptr *new_SwaptionVolCube2Ptr(Handle< SwaptionVolatilityStructure > const &atmVolStructure,std::vector< Period > const &optionTenors,std::vector< Period > const &swapTenors,std::vector< Spread > const &strikeSpreads,std::vector< std::vector< Handle< Quote > > > const &volSpreads,SwapIndexPtr const &swapIndexBase,SwapIndexPtr const &shortSwapIndexBase,bool vegaWeightedSmileFit){
            const boost::shared_ptr<SwapIndex> swi =
                boost::dynamic_pointer_cast<SwapIndex>(swapIndexBase);
            const boost::shared_ptr<SwapIndex> shortSwi =
                boost::dynamic_pointer_cast<SwapIndex>(shortSwapIndexBase);
            return new SwaptionVolCube2Ptr(
                new SwaptionVolCube2(
                    atmVolStructure,optionTenors,swapTenors,strikeSpreads,
                    volSpreads, swi, shortSwi, vegaWeightedSmileFit));
        }

using QuantLib::StochasticProcess;

SWIGINTERN bool boost_shared_ptr_Sl_StochasticProcess_Sg__isNull(boost::shared_ptr< StochasticProcess > *self){
                return !(*self);
            }
SWIGINTERN boost::shared_ptr< Observable > boost_shared_ptr_Sl_StochasticProcess_Sg__asObservable(boost::shared_ptr< StochasticProcess > *self){
        return boost::shared_ptr<Observable>(*self);
    }
SWIGINTERN boost::shared_ptr< StochasticProcess > std_vector_Sl_boost_shared_ptr_Sl_StochasticProcess_Sg__Sg__pop(std::vector< boost::shared_ptr< StochasticProcess > > *self){
                if (self->size() == 0)
                    throw std::out_of_range("pop from empty vector");
                boost::shared_ptr< StochasticProcess > x = self->back();
                self->pop_back();
                return x;
            }
SWIGINTERN boost::shared_ptr< StochasticProcess > &std_vector_Sl_boost_shared_ptr_Sl_StochasticProcess_Sg__Sg__get(std::vector< boost::shared_ptr< StochasticProcess > > *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_boost_shared_ptr_Sl_StochasticProcess_Sg__Sg__set(std::vector< boost::shared_ptr< StochasticProcess > > *self,int i,boost::shared_ptr< StochasticProcess > const &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");
            }

using QuantLib::StochasticProcess1D;
typedef boost::shared_ptr<StochasticProcess> StochasticProcess1DPtr;

SWIGINTERN Real StochasticProcess1DPtr_x0(StochasticProcess1DPtr *self){
          return boost::dynamic_pointer_cast<StochasticProcess1D>(*self)->x0();
      }
SWIGINTERN Real StochasticProcess1DPtr_drift(StochasticProcess1DPtr *self,Time t,Real x){
          return boost::dynamic_pointer_cast<StochasticProcess1D>(*self)
              ->drift(t, x);
      }
SWIGINTERN Real StochasticProcess1DPtr_diffusion(StochasticProcess1DPtr *self,Time t,Real x){
          return boost::dynamic_pointer_cast<StochasticProcess1D>(*self)
              ->diffusion(t, x);
      }
SWIGINTERN Real StochasticProcess1DPtr_expectation(StochasticProcess1DPtr *self,Time t0,Real x0,Time dt){
          return boost::dynamic_pointer_cast<StochasticProcess1D>(*self)
              ->expectation(t0, x0, dt);
      }
SWIGINTERN Real StochasticProcess1DPtr_stdDeviation(StochasticProcess1DPtr *self,Time t0,Real x0,Time dt){
          return boost::dynamic_pointer_cast<StochasticProcess1D>(*self)
              ->stdDeviation(t0, x0, dt);
      }
SWIGINTERN Real StochasticProcess1DPtr_variance(StochasticProcess1DPtr *self,Time t0,Real x0,Time dt){
          return boost::dynamic_pointer_cast<StochasticProcess1D>(*self)
              ->variance(t0, x0, dt);
      }
SWIGINTERN Real StochasticProcess1DPtr_evolve(StochasticProcess1DPtr *self,Time t0,Real x0,Time dt,Real dw){
          return boost::dynamic_pointer_cast<StochasticProcess1D>(*self)
              ->evolve(t0, x0, dt, dw);
      }
SWIGINTERN Real StochasticProcess1DPtr_apply(StochasticProcess1DPtr *self,Real x0,Real dx){
          return boost::dynamic_pointer_cast<StochasticProcess1D>(*self)
              ->apply(x0, dx);
      }

using QuantLib::GeneralizedBlackScholesProcess;
typedef boost::shared_ptr<StochasticProcess> GeneralizedBlackScholesProcessPtr;

SWIGINTERN GeneralizedBlackScholesProcessPtr *new_GeneralizedBlackScholesProcessPtr(Handle< Quote > const &s0,Handle< YieldTermStructure > const &dividendTS,Handle< YieldTermStructure > const &riskFreeTS,Handle< BlackVolTermStructure > const &volTS){
          return new GeneralizedBlackScholesProcessPtr(
                       new GeneralizedBlackScholesProcess(s0, dividendTS,
                                                          riskFreeTS, volTS));
      }
SWIGINTERN Handle< Quote > GeneralizedBlackScholesProcessPtr_stateVariable(GeneralizedBlackScholesProcessPtr *self){
          return boost::dynamic_pointer_cast<
                      GeneralizedBlackScholesProcess>(*self)->stateVariable();
      }
SWIGINTERN Handle< YieldTermStructure > GeneralizedBlackScholesProcessPtr_dividendYield(GeneralizedBlackScholesProcessPtr *self){
          return boost::dynamic_pointer_cast<
                      GeneralizedBlackScholesProcess>(*self)->dividendYield();
      }
SWIGINTERN Handle< YieldTermStructure > GeneralizedBlackScholesProcessPtr_riskFreeRate(GeneralizedBlackScholesProcessPtr *self){
          return boost::dynamic_pointer_cast<
                      GeneralizedBlackScholesProcess>(*self)->riskFreeRate();
      }
SWIGINTERN Handle< BlackVolTermStructure > GeneralizedBlackScholesProcessPtr_blackVolatility(GeneralizedBlackScholesProcessPtr const *self){
          return boost::dynamic_pointer_cast<
                      GeneralizedBlackScholesProcess>(*self)->blackVolatility();
      }

using QuantLib::BlackScholesProcess;
typedef boost::shared_ptr<StochasticProcess> BlackScholesProcessPtr;

SWIGINTERN BlackScholesProcessPtr *new_BlackScholesProcessPtr(Handle< Quote > const &s0,Handle< YieldTermStructure > const &riskFreeTS,Handle< BlackVolTermStructure > const &volTS){
          return new BlackScholesProcessPtr(
                            new BlackScholesProcess(s0, riskFreeTS, volTS));
      }

using QuantLib::BlackScholesMertonProcess;
typedef boost::shared_ptr<StochasticProcess> BlackScholesMertonProcessPtr;

SWIGINTERN BlackScholesMertonProcessPtr *new_BlackScholesMertonProcessPtr(Handle< Quote > const &s0,Handle< YieldTermStructure > const &dividendTS,Handle< YieldTermStructure > const &riskFreeTS,Handle< BlackVolTermStructure > const &volTS){
          return new BlackScholesMertonProcessPtr(
                            new BlackScholesMertonProcess(s0, dividendTS,
                                                          riskFreeTS, volTS));
      }

using QuantLib::BlackProcess;
typedef boost::shared_ptr<StochasticProcess> BlackProcessPtr;

SWIGINTERN BlackProcessPtr *new_BlackProcessPtr(Handle< Quote > const &s0,Handle< YieldTermStructure > const &riskFreeTS,Handle< BlackVolTermStructure > const &volTS){
          return new BlackProcessPtr(new BlackProcess(s0, riskFreeTS, volTS));
      }

using QuantLib::GarmanKohlagenProcess;
typedef boost::shared_ptr<StochasticProcess> GarmanKohlagenProcessPtr;

SWIGINTERN GarmanKohlagenProcessPtr *new_GarmanKohlagenProcessPtr(Handle< Quote > const &s0,Handle< YieldTermStructure > const &foreignRiskFreeTS,Handle< YieldTermStructure > const &domesticRiskFreeTS,Handle< BlackVolTermStructure > const &volTS){
          return new GarmanKohlagenProcessPtr(
                        new GarmanKohlagenProcess(s0, foreignRiskFreeTS,
                                                  domesticRiskFreeTS, volTS));
      }

using QuantLib::Merton76Process;
typedef boost::shared_ptr<StochasticProcess> Merton76ProcessPtr;

SWIGINTERN Merton76ProcessPtr *new_Merton76ProcessPtr(Handle< Quote > const &stateVariable,Handle< YieldTermStructure > const &dividendTS,Handle< YieldTermStructure > const &riskFreeTS,Handle< BlackVolTermStructure > const &volTS,Handle< Quote > const &jumpIntensity,Handle< Quote > const &meanLogJump,Handle< Quote > const &jumpVolatility){
            return new Merton76ProcessPtr(
                              new Merton76Process(stateVariable, dividendTS,
                                                  riskFreeTS, volTS,
                                                  jumpIntensity, meanLogJump,
                                                  jumpVolatility));
      }

using QuantLib::StochasticProcessArray;
typedef boost::shared_ptr<StochasticProcess> StochasticProcessArrayPtr;

SWIGINTERN StochasticProcessArrayPtr *new_StochasticProcessArrayPtr(std::vector< boost::shared_ptr< StochasticProcess > > const &array,Matrix const &correlation){
          std::vector<boost::shared_ptr<StochasticProcess1D> > in_array;
          for (Size j=0; j < array.size(); j++)
              in_array.push_back(
                  boost::dynamic_pointer_cast<StochasticProcess1D>(array[j]));
          return new StochasticProcessArrayPtr(
                           new StochasticProcessArray(in_array, correlation));
      }

using QuantLib::GeometricBrownianMotionProcess;
typedef boost::shared_ptr<StochasticProcess> GeometricBrownianMotionProcessPtr;

SWIGINTERN GeometricBrownianMotionProcessPtr *new_GeometricBrownianMotionProcessPtr(Real initialValue,Real mu,Real sigma){
          return new GeometricBrownianMotionProcessPtr(
                 new GeometricBrownianMotionProcess(initialValue, mu, sigma));
      }

using QuantLib::VarianceGammaProcess;
typedef boost::shared_ptr<StochasticProcess> VarianceGammaProcessPtr;

SWIGINTERN VarianceGammaProcessPtr *new_VarianceGammaProcessPtr(Handle< Quote > const &s0,Handle< YieldTermStructure > const &dividendYield,Handle< YieldTermStructure > const &riskFreeRate,Real sigma,Real nu,Real theta){
          return new VarianceGammaProcessPtr(
                 new VarianceGammaProcess(s0,dividendYield,riskFreeRate,sigma,nu,theta));
      }

using QuantLib::HestonProcess;
typedef boost::shared_ptr<StochasticProcess> HestonProcessPtr;

SWIGINTERN HestonProcessPtr *new_HestonProcessPtr(Handle< YieldTermStructure > const &riskFreeTS,Handle< YieldTermStructure > const &dividendTS,Handle< Quote > const &s0,Real v0,Real kappa,Real theta,Real sigma,Real rho){
		return new HestonProcessPtr(
			new HestonProcess(riskFreeTS, dividendTS, s0, v0, 
						      kappa, theta, sigma, rho));	
      }
SWIGINTERN Handle< Quote > HestonProcessPtr_s0(HestonProcessPtr *self){
          return boost::dynamic_pointer_cast<
                      HestonProcess>(*self)->s0();
      }
SWIGINTERN Handle< YieldTermStructure > HestonProcessPtr_dividendYield(HestonProcessPtr *self){
          return boost::dynamic_pointer_cast<
                      HestonProcess>(*self)->dividendYield();
      }
SWIGINTERN Handle< YieldTermStructure > HestonProcessPtr_riskFreeRate(HestonProcessPtr *self){
          return boost::dynamic_pointer_cast<
                      HestonProcess>(*self)->riskFreeRate();
      }

using QuantLib::BatesProcess;
typedef boost::shared_ptr<StochasticProcess> BatesProcessPtr;

SWIGINTERN BatesProcessPtr *new_BatesProcessPtr(Handle< YieldTermStructure > const &riskFreeRate,Handle< YieldTermStructure > const &dividendYield,Handle< Quote > const &s0,Real v0,Real kappa,Real theta,Real sigma,Real rho,Real lambda,Real nu,Real delta){
		return new BatesProcessPtr(
			new BatesProcess(riskFreeRate, dividendYield, s0, v0, 
							 kappa, theta, sigma, rho, 
							 lambda, nu, delta));
	  }

using QuantLib::HullWhiteProcess;
typedef boost::shared_ptr<StochasticProcess> HullWhiteProcessPtr;

SWIGINTERN HullWhiteProcessPtr *new_HullWhiteProcessPtr(Handle< YieldTermStructure > const &riskFreeTS,Real a,Real sigma){
            return new HullWhiteProcessPtr(new HullWhiteProcess(riskFreeTS, a, sigma));	
        }

using QuantLib::HullWhiteForwardProcess;
typedef boost::shared_ptr<StochasticProcess> HullWhiteForwardProcessPtr;

SWIGINTERN HullWhiteForwardProcessPtr *new_HullWhiteForwardProcessPtr(Handle< YieldTermStructure > const &riskFreeTS,Real a,Real sigma){
            return new HullWhiteForwardProcessPtr(
                new HullWhiteForwardProcess(riskFreeTS, a, sigma));
        }
SWIGINTERN Real HullWhiteForwardProcessPtr_alpha(HullWhiteForwardProcessPtr const *self,Time t){
            return boost::dynamic_pointer_cast<HullWhiteForwardProcess>(*self)      ->alpha(t);
        }
SWIGINTERN Real HullWhiteForwardProcessPtr_M_T(HullWhiteForwardProcessPtr const *self,Real s,Real t,Real T){
            return boost::dynamic_pointer_cast<HullWhiteForwardProcess>(*self)      ->M_T(s, t, T);
        }
SWIGINTERN Real HullWhiteForwardProcessPtr_B(HullWhiteForwardProcessPtr const *self,Time t,Time T){
            return boost::dynamic_pointer_cast<HullWhiteForwardProcess>(*self)      ->B(t, T);
        }
SWIGINTERN void HullWhiteForwardProcessPtr_setForwardMeasureTime(HullWhiteForwardProcessPtr *self,Time t){
            boost::dynamic_pointer_cast<HullWhiteForwardProcess>(*self)             ->setForwardMeasureTime(t);
        }

using QuantLib::GsrProcess;
typedef boost::shared_ptr<StochasticProcess> GsrProcessPtr;

SWIGINTERN GsrProcessPtr *new_GsrProcessPtr__SWIG_0(Array const &times,Array const &vols,Array const &reversions,Real const T=60.0){
            return new GsrProcessPtr(new GsrProcess(times, vols, reversions, T));
        }
SWIGINTERN Real GsrProcessPtr_sigma(GsrProcessPtr *self,Time t){
            return boost::dynamic_pointer_cast<GsrProcess>(*self)->sigma(t);
        }
SWIGINTERN Real GsrProcessPtr_reversion(GsrProcessPtr *self,Time t){
            return boost::dynamic_pointer_cast<GsrProcess>(*self)->reversion(t);
        }
SWIGINTERN Real GsrProcessPtr_y(GsrProcessPtr *self,Time t){
            return boost::dynamic_pointer_cast<GsrProcess>(*self)->y(t);
        }
SWIGINTERN Real GsrProcessPtr_G(GsrProcessPtr *self,Time t,Time T,Real x){
            return boost::dynamic_pointer_cast<GsrProcess>(*self)->G(t, T, x);
        }
SWIGINTERN void GsrProcessPtr_setForwardMeasureTime(GsrProcessPtr *self,Time t){
            boost::dynamic_pointer_cast<GsrProcess>(*self)->setForwardMeasureTime(t);
        }

    GsrProcessPtr as_gsr_process(
                           const boost::shared_ptr<StochasticProcess>& proc) {
        return boost::dynamic_pointer_cast<GsrProcess>(proc);
    }


using QuantLib::PricingEngine;

SWIGINTERN bool boost_shared_ptr_Sl_PricingEngine_Sg__isNull(boost::shared_ptr< PricingEngine > *self){
                return !(*self);
            }

using QuantLib::Instrument;

SWIGINTERN bool boost_shared_ptr_Sl_Instrument_Sg__isNull(boost::shared_ptr< Instrument > *self){
                return !(*self);
            }
SWIGINTERN boost::shared_ptr< Observable > boost_shared_ptr_Sl_Instrument_Sg__asObservable(boost::shared_ptr< Instrument > *self){
        return boost::shared_ptr<Observable>(*self);
    }
SWIGINTERN boost::shared_ptr< Instrument > std_vector_Sl_boost_shared_ptr_Sl_Instrument_Sg__Sg__pop(std::vector< boost::shared_ptr< Instrument > > *self){
                if (self->size() == 0)
                    throw std::out_of_range("pop from empty vector");
                boost::shared_ptr< Instrument > x = self->back();
                self->pop_back();
                return x;
            }
SWIGINTERN boost::shared_ptr< Instrument > &std_vector_Sl_boost_shared_ptr_Sl_Instrument_Sg__Sg__get(std::vector< boost::shared_ptr< Instrument > > *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_boost_shared_ptr_Sl_Instrument_Sg__Sg__set(std::vector< boost::shared_ptr< Instrument > > *self,int i,boost::shared_ptr< Instrument > const &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");
            }

using QuantLib::Stock;
typedef boost::shared_ptr<Instrument> StockPtr;

SWIGINTERN StockPtr *new_StockPtr(Handle< Quote > const &quote){
            return new StockPtr(new Stock(quote));
        }

using QuantLib::CompositeInstrument;
typedef boost::shared_ptr<Instrument> CompositeInstrumentPtr;

SWIGINTERN CompositeInstrumentPtr *new_CompositeInstrumentPtr(){
            return new CompositeInstrumentPtr(new CompositeInstrument);
        }
SWIGINTERN void CompositeInstrumentPtr_add__SWIG_0(CompositeInstrumentPtr *self,boost::shared_ptr< Instrument > const &instrument,Real multiplier=1.0){
            boost::dynamic_pointer_cast<CompositeInstrument>(*self)
                ->add(instrument, multiplier);
        }
SWIGINTERN void CompositeInstrumentPtr_subtract__SWIG_0(CompositeInstrumentPtr *self,boost::shared_ptr< Instrument > const &instrument,Real multiplier=1.0){
            boost::dynamic_pointer_cast<CompositeInstrument>(*self)
                ->subtract(instrument, multiplier);
        }

using QuantLib::Schedule;
using QuantLib::DateGeneration;


using QuantLib::CashFlow;

SWIGINTERN bool boost_shared_ptr_Sl_CashFlow_Sg__isNull(boost::shared_ptr< CashFlow > *self){
                return !(*self);
            }
SWIGINTERN boost::shared_ptr< Observable > boost_shared_ptr_Sl_CashFlow_Sg__asObservable(boost::shared_ptr< CashFlow > *self){
        return boost::shared_ptr<Observable>(*self);
    }
SWIGINTERN boost::shared_ptr< CashFlow > std_vector_Sl_boost_shared_ptr_Sl_CashFlow_Sg__Sg__pop(std::vector< boost::shared_ptr< CashFlow > > *self){
                if (self->size() == 0)
                    throw std::out_of_range("pop from empty vector");
                boost::shared_ptr< CashFlow > x = self->back();
                self->pop_back();
                return x;
            }
SWIGINTERN boost::shared_ptr< CashFlow > &std_vector_Sl_boost_shared_ptr_Sl_CashFlow_Sg__Sg__get(std::vector< boost::shared_ptr< CashFlow > > *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_boost_shared_ptr_Sl_CashFlow_Sg__Sg__set(std::vector< boost::shared_ptr< CashFlow > > *self,int i,boost::shared_ptr< CashFlow > const &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");
            }

using QuantLib::SimpleCashFlow;
using QuantLib::Redemption;
using QuantLib::AmortizingPayment;
using QuantLib::Coupon;
using QuantLib::FixedRateCoupon;
using QuantLib::IborCoupon;
using QuantLib::Leg;
using QuantLib::FloatingRateCoupon;

typedef boost::shared_ptr<CashFlow> SimpleCashFlowPtr;
typedef boost::shared_ptr<CashFlow> RedemptionPtr;
typedef boost::shared_ptr<CashFlow> AmortizingPaymentPtr;
typedef boost::shared_ptr<CashFlow> CouponPtr;
typedef boost::shared_ptr<CashFlow> IborCouponPtr;
typedef boost::shared_ptr<CashFlow> FixedRateCouponPtr;
typedef boost::shared_ptr<CashFlow> FloatingRateCouponPtr;

SWIGINTERN SimpleCashFlowPtr *new_SimpleCashFlowPtr(Real amount,Date const &date){
            return new SimpleCashFlowPtr(new SimpleCashFlow(amount,date));
        }
SWIGINTERN RedemptionPtr *new_RedemptionPtr(Real amount,Date const &date){
            return new RedemptionPtr(new Redemption(amount,date));
        }
SWIGINTERN AmortizingPaymentPtr *new_AmortizingPaymentPtr(Real amount,Date const &date){
            return new AmortizingPaymentPtr(new AmortizingPayment(amount,date));
        }
SWIGINTERN Real CouponPtr_nominal(CouponPtr *self){
            return boost::dynamic_pointer_cast<Coupon>(*self)->nominal();
        }
SWIGINTERN Date CouponPtr_accrualStartDate(CouponPtr *self){
            return boost::dynamic_pointer_cast<Coupon>(*self)
                ->accrualStartDate();
        }
SWIGINTERN Date CouponPtr_accrualEndDate(CouponPtr *self){
            return boost::dynamic_pointer_cast<Coupon>(*self)
                ->accrualEndDate();
        }
SWIGINTERN Date CouponPtr_referencePeriodStart(CouponPtr *self){
            return boost::dynamic_pointer_cast<Coupon>(*self)
                ->referencePeriodStart();
        }
SWIGINTERN Date CouponPtr_referencePeriodEnd(CouponPtr *self){
            return boost::dynamic_pointer_cast<Coupon>(*self)
                ->referencePeriodEnd();
        }
SWIGINTERN Date CouponPtr_exCouponDate(CouponPtr *self){
            return boost::dynamic_pointer_cast<Coupon>(*self)
                ->exCouponDate();
        }
SWIGINTERN Real CouponPtr_rate(CouponPtr *self){
            return boost::dynamic_pointer_cast<Coupon>(*self)->rate();
        }
SWIGINTERN Time CouponPtr_accrualPeriod(CouponPtr *self){
            return boost::dynamic_pointer_cast<Coupon>(*self)
                ->accrualPeriod();
        }
SWIGINTERN BigInteger CouponPtr_accrualDays(CouponPtr *self){
            return boost::dynamic_pointer_cast<Coupon>(*self)
                ->accrualDays();
        }
SWIGINTERN DayCounter CouponPtr_dayCounter(CouponPtr const *self){
            return boost::dynamic_pointer_cast<Coupon>(*self)
                ->dayCounter();
        }
SWIGINTERN Real CouponPtr_accruedAmount(CouponPtr *self,Date const &date){
            return boost::dynamic_pointer_cast<Coupon>(*self)
                ->accruedAmount(date);
        }

    CouponPtr as_coupon(const boost::shared_ptr<CashFlow>& cf) {
        return boost::dynamic_pointer_cast<Coupon>(cf);
    }

SWIGINTERN FixedRateCouponPtr *new_FixedRateCouponPtr__SWIG_0(Date const &paymentDate,Real nominal,Rate rate,DayCounter const &dayCounter,Date const &startDate,Date const &endDate,Date const &refPeriodStart=Date(),Date const &refPeriodEnd=Date(),Date const &exCouponDate=Date()){
            return new FixedRateCouponPtr(
                new FixedRateCoupon(paymentDate, nominal, rate,
                                    dayCounter, startDate, endDate,
                                    refPeriodStart, refPeriodEnd,
                                    exCouponDate));
        }
SWIGINTERN InterestRate FixedRateCouponPtr_interestRate(FixedRateCouponPtr *self){
            return boost::dynamic_pointer_cast<FixedRateCoupon>(*self)
                ->interestRate();
        }

    FixedRateCouponPtr as_fixed_rate_coupon(
                                      const boost::shared_ptr<CashFlow>& cf) {
        return boost::dynamic_pointer_cast<FixedRateCoupon>(cf);
    }


using QuantLib::FloatingRateCouponPricer;

SWIGINTERN bool boost_shared_ptr_Sl_FloatingRateCouponPricer_Sg__isNull(boost::shared_ptr< FloatingRateCouponPricer > *self){
                return !(*self);
            }
SWIGINTERN Date FloatingRateCouponPtr_fixingDate(FloatingRateCouponPtr *self){
            return boost::dynamic_pointer_cast<FloatingRateCoupon>(*self)
                ->fixingDate();
        }
SWIGINTERN Integer FloatingRateCouponPtr_fixingDays(FloatingRateCouponPtr *self){
            return boost::dynamic_pointer_cast<FloatingRateCoupon>(*self)
                ->fixingDays();
        }
SWIGINTERN bool FloatingRateCouponPtr_isInArrears(FloatingRateCouponPtr *self){
            return boost::dynamic_pointer_cast<FloatingRateCoupon>(*self)
                ->isInArrears();
        }
SWIGINTERN Real FloatingRateCouponPtr_gearing(FloatingRateCouponPtr *self){
            return boost::dynamic_pointer_cast<FloatingRateCoupon>(*self)
                ->gearing();
        }
SWIGINTERN Rate FloatingRateCouponPtr_spread(FloatingRateCouponPtr *self){
            return boost::dynamic_pointer_cast<FloatingRateCoupon>(*self)
                ->spread();
        }
SWIGINTERN Rate FloatingRateCouponPtr_indexFixing(FloatingRateCouponPtr *self){
            return boost::dynamic_pointer_cast<FloatingRateCoupon>(*self)
                ->indexFixing();
        }
SWIGINTERN Rate FloatingRateCouponPtr_adjustedFixing(FloatingRateCouponPtr *self){
            return boost::dynamic_pointer_cast<FloatingRateCoupon>(*self)
                ->adjustedFixing();
        }
SWIGINTERN Rate FloatingRateCouponPtr_convexityAdjustment(FloatingRateCouponPtr *self){
            return boost::dynamic_pointer_cast<FloatingRateCoupon>(*self)
                ->convexityAdjustment();
        }
SWIGINTERN Real FloatingRateCouponPtr_price(FloatingRateCouponPtr *self,Handle< YieldTermStructure > const &discountCurve){
            return boost::dynamic_pointer_cast<FloatingRateCoupon>(*self)
                ->price(discountCurve);
        }
SWIGINTERN InterestRateIndexPtr FloatingRateCouponPtr_index(FloatingRateCouponPtr const *self){
            return boost::dynamic_pointer_cast<FloatingRateCoupon>(*self)
                ->index();
        }
SWIGINTERN void FloatingRateCouponPtr_setPricer(FloatingRateCouponPtr *self,boost::shared_ptr< FloatingRateCouponPricer > const &p){
            boost::dynamic_pointer_cast<FloatingRateCoupon>(*self)
                ->setPricer(p);
        }

    FloatingRateCouponPtr as_floating_rate_coupon(
                                      const boost::shared_ptr<CashFlow>& cf) {
        return boost::dynamic_pointer_cast<FloatingRateCoupon>(cf);
    }


using QuantLib::CappedFlooredCoupon;
typedef boost::shared_ptr<CashFlow> CappedFlooredCouponPtr;

SWIGINTERN CappedFlooredCouponPtr *new_CappedFlooredCouponPtr__SWIG_0(FloatingRateCouponPtr const &underlying,Rate cap=Null< Rate >(),Rate floor=Null< Rate >()){
            boost::shared_ptr<FloatingRateCoupon> u =
                boost::dynamic_pointer_cast<FloatingRateCoupon>(underlying);
            return new CappedFlooredCouponPtr(
                new CappedFlooredCoupon(u,cap,floor));
        }
SWIGINTERN Rate CappedFlooredCouponPtr_cap(CappedFlooredCouponPtr *self){
           return boost::dynamic_pointer_cast<CappedFlooredCoupon>(*self)
                ->cap();
        }
SWIGINTERN Rate CappedFlooredCouponPtr_floor(CappedFlooredCouponPtr *self){
           return boost::dynamic_pointer_cast<CappedFlooredCoupon>(*self)
                ->floor();
        }
SWIGINTERN Rate CappedFlooredCouponPtr_effectiveCap(CappedFlooredCouponPtr *self){
           return boost::dynamic_pointer_cast<CappedFlooredCoupon>(*self)
                ->effectiveCap();
        }
SWIGINTERN Rate CappedFlooredCouponPtr_effectiveFloor(CappedFlooredCouponPtr *self){
           return boost::dynamic_pointer_cast<CappedFlooredCoupon>(*self)
                ->effectiveFloor();
        }
SWIGINTERN bool CappedFlooredCouponPtr_isCapped(CappedFlooredCouponPtr *self){
           return boost::dynamic_pointer_cast<CappedFlooredCoupon>(*self)
                ->isCapped();
        }
SWIGINTERN bool CappedFlooredCouponPtr_isFloored(CappedFlooredCouponPtr *self){
           return boost::dynamic_pointer_cast<CappedFlooredCoupon>(*self)
                ->isFloored();
        }
SWIGINTERN void CappedFlooredCouponPtr_setPricer(CappedFlooredCouponPtr *self,boost::shared_ptr< FloatingRateCouponPricer > const &p){
            boost::dynamic_pointer_cast<CappedFlooredCoupon>(*self)
                ->setPricer(p);
        }
SWIGINTERN IborCouponPtr *new_IborCouponPtr__SWIG_0(Date const &paymentDate,Real nominal,Date const &startDate,Date const &endDate,Integer fixingDays,InterestRateIndexPtr &index,Real gearing=1.0,Spread spread=0.0,Date const &refPeriodStart=Date(),Date const &refPeriodEnd=Date(),DayCounter const &dayCounter=DayCounter()){
            const boost::shared_ptr<IborIndex> iri =
                boost::dynamic_pointer_cast<IborIndex>(index);
            return new IborCouponPtr(
                new IborCoupon(paymentDate, nominal, startDate, endDate,
                               fixingDays, iri, gearing, spread,
                               refPeriodStart, refPeriodEnd, dayCounter));
        }

using QuantLib::IborCouponPricer;
using QuantLib::BlackIborCouponPricer;
typedef boost::shared_ptr<FloatingRateCouponPricer> IborCouponPricerPtr;
typedef boost::shared_ptr<FloatingRateCouponPricer> BlackIborCouponPricerPtr;

SWIGINTERN Handle< OptionletVolatilityStructure > IborCouponPricerPtr_capletVolatility(IborCouponPricerPtr *self){
            return boost::dynamic_pointer_cast<IborCouponPricer>(*self)
                ->capletVolatility();
        }
SWIGINTERN void IborCouponPricerPtr_setCapletVolatility__SWIG_0(IborCouponPricerPtr *self,Handle< OptionletVolatilityStructure > const &v=Handle< OptionletVolatilityStructure >()){
            boost::dynamic_pointer_cast<IborCouponPricer>(*self)
                ->setCapletVolatility(v);
        }
SWIGINTERN BlackIborCouponPricerPtr *new_BlackIborCouponPricerPtr__SWIG_0(Handle< OptionletVolatilityStructure > const &v=Handle< OptionletVolatilityStructure >()){
            return new BlackIborCouponPricerPtr(new BlackIborCouponPricer(v));
        }

using QuantLib::CmsCoupon;
using QuantLib::CappedFlooredCmsCoupon;
typedef boost::shared_ptr<CashFlow> CmsCouponPtr;
typedef boost::shared_ptr<CashFlow> CappedFlooredCmsCouponPtr;

SWIGINTERN CmsCouponPtr *new_CmsCouponPtr__SWIG_0(Date const &paymentDate,Real nominal,Date const &startDate,Date const &endDate,Integer fixingDays,SwapIndexPtr const &index,Real gearing=1.0,Spread spread=0.0,Date const &refPeriodStart=Date(),Date const &refPeriodEnd=Date(),DayCounter const &dayCounter=DayCounter(),bool isInArrears=false){
            const boost::shared_ptr<SwapIndex> swi =
                boost::dynamic_pointer_cast<SwapIndex>(index);
            return new CmsCouponPtr(
                new CmsCoupon(paymentDate,nominal,startDate,endDate,
                              fixingDays,swi,gearing,spread,
                              refPeriodStart,refPeriodEnd,
                              dayCounter,isInArrears));
        }

using QuantLib::CmsCouponPricer;
using QuantLib::AnalyticHaganPricer;
using QuantLib::NumericHaganPricer;
using QuantLib::GFunctionFactory;
using QuantLib::LinearTsrPricer;
typedef boost::shared_ptr<FloatingRateCouponPricer> CmsCouponPricerPtr;
typedef boost::shared_ptr<FloatingRateCouponPricer> AnalyticHaganPricerPtr;
typedef boost::shared_ptr<FloatingRateCouponPricer> NumericHaganPricerPtr;
typedef boost::shared_ptr<FloatingRateCouponPricer> LinearTsrPricerPtr;

SWIGINTERN Handle< SwaptionVolatilityStructure > CmsCouponPricerPtr_swaptionVolatility(CmsCouponPricerPtr *self){
            return boost::dynamic_pointer_cast<CmsCouponPricer>(*self)
                ->swaptionVolatility();
        }
SWIGINTERN void CmsCouponPricerPtr_setSwaptionVolatility__SWIG_0(CmsCouponPricerPtr *self,Handle< SwaptionVolatilityStructure > const &v=Handle< SwaptionVolatilityStructure >()){
            boost::dynamic_pointer_cast<CmsCouponPricer>(*self)
                ->setSwaptionVolatility(v);
        }
SWIGINTERN AnalyticHaganPricerPtr *new_AnalyticHaganPricerPtr(Handle< SwaptionVolatilityStructure > const &v,GFunctionFactory::YieldCurveModel model,Handle< Quote > const &meanReversion){
            return new AnalyticHaganPricerPtr(
                            new AnalyticHaganPricer(v, model, meanReversion));
        }
SWIGINTERN NumericHaganPricerPtr *new_NumericHaganPricerPtr__SWIG_0(Handle< SwaptionVolatilityStructure > const &v,GFunctionFactory::YieldCurveModel model,Handle< Quote > const &meanReversion,Rate lowerLimit=0.0,Rate upperLimit=1.0,Real precision=1.0e-6){
             return new NumericHaganPricerPtr(
                 new NumericHaganPricer(v, model, meanReversion,
                                        lowerLimit, upperLimit, precision));
        }
SWIGINTERN CappedFlooredCmsCouponPtr *new_CappedFlooredCmsCouponPtr__SWIG_0(Date const &paymentDate,Real nominal,Date const &startDate,Date const &endDate,Natural fixingDays,SwapIndexPtr const &index,Real gearing=1.0,Spread spread=0.0,Rate const cap=Null< Rate >(),Rate const floor=Null< Rate >(),Date const &refPeriodStart=Date(),Date const &refPeriodEnd=Date(),DayCounter const &dayCounter=DayCounter(),bool isInArrears=false){
            const boost::shared_ptr<SwapIndex> swi =
                boost::dynamic_pointer_cast<SwapIndex>(index);
            return new CappedFlooredCmsCouponPtr(
                new CappedFlooredCmsCoupon(
                      paymentDate, nominal, startDate, endDate, fixingDays,
                      swi, gearing, spread, cap, floor, refPeriodStart,
                      refPeriodEnd, dayCounter, isInArrears));
        }
SWIGINTERN LinearTsrPricerPtr *new_LinearTsrPricerPtr__SWIG_0(Handle< SwaptionVolatilityStructure > const &swaptionVol,Handle< Quote > const &meanReversion,Handle< YieldTermStructure > const &couponDiscountCurve=Handle< YieldTermStructure >(),LinearTsrPricer::Settings const &settings=LinearTsrPricer::Settings()){
            return new LinearTsrPricerPtr(
                          new LinearTsrPricer(swaptionVol, meanReversion,
                                              couponDiscountCurve, settings));
        }

Leg _FixedRateLeg(const Schedule& schedule,
                  const DayCounter& dayCount,
                  const std::vector<Real>& nominals,
                  const std::vector<Rate>& couponRates,
                  BusinessDayConvention paymentAdjustment = Following,
                  const DayCounter& firstPeriodDayCount = DayCounter()) {
    return QuantLib::FixedRateLeg(schedule)
        .withNotionals(nominals)
        .withCouponRates(couponRates,dayCount)
        .withPaymentAdjustment(paymentAdjustment)
        .withFirstPeriodDayCounter(firstPeriodDayCount);
}


Leg _IborLeg(const std::vector<Real>& nominals,
             const Schedule& schedule,
             const boost::shared_ptr<Index>& index,
             const DayCounter& paymentDayCounter = DayCounter(),
             const BusinessDayConvention paymentConvention = Following,
             const std::vector<Natural>& fixingDays = std::vector<Natural>(),
             const std::vector<Real>& gearings = std::vector<Real>(),
             const std::vector<Spread>& spreads = std::vector<Spread>(),
             const std::vector<Rate>& caps = std::vector<Rate>(),
             const std::vector<Rate>& floors = std::vector<Rate>(),
             bool isInArrears = false) {
    boost::shared_ptr<IborIndex> libor =
        boost::dynamic_pointer_cast<IborIndex>(index);
    return QuantLib::IborLeg(schedule, libor)
        .withNotionals(nominals)
        .withPaymentDayCounter(paymentDayCounter)
        .withPaymentAdjustment(paymentConvention)
        .withFixingDays(fixingDays)
        .withGearings(gearings)
        .withSpreads(spreads)
        .withCaps(caps)
        .withFloors(floors)
        .inArrears(isInArrears);
}


Leg _CmsLeg(const std::vector<Real>& nominals,
            const Schedule& schedule,
            const boost::shared_ptr<Index>& index,
            const DayCounter& paymentDayCounter = DayCounter(),
            const BusinessDayConvention paymentConvention = Following,
            const std::vector<Natural>& fixingDays = std::vector<Natural>(),
            const std::vector<Real>& gearings = std::vector<Real>(),
            const std::vector<Spread>& spreads = std::vector<Spread>(),
            const std::vector<Rate>& caps = std::vector<Rate>(),
            const std::vector<Rate>& floors = std::vector<Rate>(),
            bool isInArrears = false) {
    boost::shared_ptr<SwapIndex> swapIndex =
        boost::dynamic_pointer_cast<SwapIndex>(index);
    return QuantLib::CmsLeg(schedule, swapIndex)
        .withNotionals(nominals)
        .withPaymentDayCounter(paymentDayCounter)
        .withPaymentAdjustment(paymentConvention)
        .withFixingDays(fixingDays)
        .withGearings(gearings)
        .withSpreads(spreads)
        .withCaps(caps)
        .withFloors(floors)
        .inArrears(isInArrears);
}


Leg _CmsZeroLeg(const std::vector<Real>& nominals,
                const Schedule& schedule,
                const boost::shared_ptr<Index>& index,
                const DayCounter& paymentDayCounter = DayCounter(),
                const BusinessDayConvention paymentConvention = Following,
                const std::vector<Natural>& fixingDays = std::vector<Natural>(),
                const std::vector<Real>& gearings = std::vector<Real>(),
                const std::vector<Spread>& spreads = std::vector<Spread>(),
                const std::vector<Rate>& caps = std::vector<Rate>(),
                const std::vector<Rate>& floors = std::vector<Rate>()) {
    boost::shared_ptr<SwapIndex> swapIndex =
        boost::dynamic_pointer_cast<SwapIndex>(index);
    return QuantLib::CmsLeg(schedule, swapIndex)
        .withNotionals(nominals)
        .withPaymentDayCounter(paymentDayCounter)
        .withPaymentAdjustment(paymentConvention)
        .withFixingDays(fixingDays)
        .withGearings(gearings)
        .withSpreads(spreads)
        .withCaps(caps)
        .withFloors(floors)
        .withZeroPayments();
}


using QuantLib::CashFlows;
using QuantLib::Duration;

SWIGINTERN Real CashFlows_npv__SWIG_0(Leg const &leg,boost::shared_ptr< YieldTermStructure > const &discountCurve,Spread zSpread,DayCounter const &dayCounter,Compounding compounding,Frequency frequency,bool includeSettlementDateFlows,Date const &settlementDate=Date(),Date const &npvDate=Date()){
            return QuantLib::CashFlows::npv(leg, discountCurve,
                                            zSpread,
                                            dayCounter,
                                            compounding,
                                            frequency,
                                            includeSettlementDateFlows,
                                            settlementDate,
                                            npvDate);
        }
SWIGINTERN Real CashFlows_npv__SWIG_3(Leg const &leg,Handle< YieldTermStructure > const &discountCurve,bool includeSettlementDateFlows,Date const &settlementDate=Date(),Date const &npvDate=Date()){
            return QuantLib::CashFlows::npv(leg, **discountCurve,
                                            includeSettlementDateFlows,
                                            settlementDate, npvDate);
        }
SWIGINTERN Real CashFlows_bps__SWIG_0(Leg const &leg,boost::shared_ptr< YieldTermStructure > const &discountCurve,bool includeSettlementDateFlows,Date const &settlementDate=Date(),Date const &npvDate=Date()){
            return QuantLib::CashFlows::bps(leg, *discountCurve,
                                            includeSettlementDateFlows,
                                            settlementDate, npvDate);
        }
SWIGINTERN Real CashFlows_bps__SWIG_3(Leg const &leg,Handle< YieldTermStructure > const &discountCurve,bool includeSettlementDateFlows,Date const &settlementDate=Date(),Date const &npvDate=Date()){
            return QuantLib::CashFlows::bps(leg, **discountCurve,
                                            includeSettlementDateFlows,
                                            settlementDate, npvDate);
        }
SWIGINTERN Rate CashFlows_atmRate__SWIG_0(Leg const &leg,boost::shared_ptr< YieldTermStructure > const &discountCurve,bool includeSettlementDateFlows,Date const &settlementDate=Date(),Date const &npvDate=Date(),Real npv=Null< Real >()){
            return QuantLib::CashFlows::atmRate(leg, *discountCurve,
                                                includeSettlementDateFlows,
                                                settlementDate, npvDate,
                                                npv);
        }

using QuantLib::CalibrationHelper;
using QuantLib::SwaptionHelper;
using QuantLib::CapHelper;
using QuantLib::HestonModelHelper;
typedef boost::shared_ptr<CalibrationHelper> SwaptionHelperPtr;
typedef boost::shared_ptr<CalibrationHelper> CapHelperPtr;
typedef boost::shared_ptr<CalibrationHelper> HestonModelHelperPtr;

SWIGINTERN bool boost_shared_ptr_Sl_CalibrationHelper_Sg__isNull(boost::shared_ptr< CalibrationHelper > *self){
                return !(*self);
            }
SWIGINTERN Date boost_shared_ptr_Sl_CalibrationHelper_Sg__swaptionExpiryDate(boost::shared_ptr< CalibrationHelper > *self){
        boost::shared_ptr<SwaptionHelper> s = boost::dynamic_pointer_cast<SwaptionHelper>(*self);
        return s ? s->swaption()->exercise()->date(0) : Null<Date>();
    }
SWIGINTERN Real boost_shared_ptr_Sl_CalibrationHelper_Sg__swaptionStrike(boost::shared_ptr< CalibrationHelper > *self){
        boost::shared_ptr<SwaptionHelper> s = boost::dynamic_pointer_cast<SwaptionHelper>(*self);
        return s ? s->swaption()->underlyingSwap()->fixedRate() : Null<Real>();
    }
SWIGINTERN Real boost_shared_ptr_Sl_CalibrationHelper_Sg__swaptionNominal(boost::shared_ptr< CalibrationHelper > *self){
        boost::shared_ptr<SwaptionHelper> s = boost::dynamic_pointer_cast<SwaptionHelper>(*self);
        return s ? s->swaption()->underlyingSwap()->nominal() : Null<Real>();
    }
SWIGINTERN Date boost_shared_ptr_Sl_CalibrationHelper_Sg__swaptionMaturityDate(boost::shared_ptr< CalibrationHelper > *self){
        boost::shared_ptr<SwaptionHelper> s = boost::dynamic_pointer_cast<SwaptionHelper>(*self);
        return s ? s->swaption()->underlyingSwap()->fixedSchedule().dates().back() : Null<Date>();
    }
SWIGINTERN SwaptionHelperPtr *new_SwaptionHelperPtr__SWIG_0(Period const &maturity,Period const &length,Handle< Quote > const &volatility,IborIndexPtr const &index,Period const &fixedLegTenor,DayCounter const &fixedLegDayCounter,DayCounter const &floatingLegDayCounter,Handle< YieldTermStructure > const &termStructure,CalibrationHelper::CalibrationErrorType errorType=CalibrationHelper::RelativePriceError,Real const strike=Null< Real >(),Real const nominal=1.0,VolatilityType const type=ShiftedLognormal,Real const shift=0.0){
            boost::shared_ptr<IborIndex> libor =
                boost::dynamic_pointer_cast<IborIndex>(index);
            return new SwaptionHelperPtr(
                new SwaptionHelper(maturity,length,volatility,
                                   libor,fixedLegTenor,
                                   fixedLegDayCounter,
                                   floatingLegDayCounter,
                                   termStructure,
                                   errorType,
                                   strike, nominal, 
                                   type, shift));
        }
SWIGINTERN SwaptionHelperPtr *new_SwaptionHelperPtr__SWIG_6(Date const &exerciseDate,Period const &length,Handle< Quote > const &volatility,IborIndexPtr const &index,Period const &fixedLegTenor,DayCounter const &fixedLegDayCounter,DayCounter const &floatingLegDayCounter,Handle< YieldTermStructure > const &termStructure,CalibrationHelper::CalibrationErrorType errorType=CalibrationHelper::RelativePriceError,Real const strike=Null< Real >(),Real const nominal=1.0,VolatilityType const type=ShiftedLognormal,Real const shift=0.0){
            boost::shared_ptr<IborIndex> libor =
                boost::dynamic_pointer_cast<IborIndex>(index);
            return new SwaptionHelperPtr(
                new SwaptionHelper(exerciseDate,length,volatility,
                                   libor,fixedLegTenor,
                                   fixedLegDayCounter,
                                   floatingLegDayCounter,
                                   termStructure,
                                   errorType,
                                   strike, nominal, 
                                   type, shift));
        }
SWIGINTERN SwaptionHelperPtr *new_SwaptionHelperPtr__SWIG_12(Date const &exerciseDate,Date const &endDate,Handle< Quote > const &volatility,IborIndexPtr const &index,Period const &fixedLegTenor,DayCounter const &fixedLegDayCounter,DayCounter const &floatingLegDayCounter,Handle< YieldTermStructure > const &termStructure,CalibrationHelper::CalibrationErrorType errorType=CalibrationHelper::RelativePriceError,Real const strike=Null< Real >(),Real const nominal=1.0,VolatilityType const type=ShiftedLognormal,Real const shift=0.0){
            boost::shared_ptr<IborIndex> libor =
                boost::dynamic_pointer_cast<IborIndex>(index);
            return new SwaptionHelperPtr(
                new SwaptionHelper(exerciseDate,endDate,volatility,
                                   libor,fixedLegTenor,
                                   fixedLegDayCounter,
                                   floatingLegDayCounter,
                                   termStructure,
                                   errorType,
                                   strike, nominal, 
                                   type, shift));
        }
SWIGINTERN std::vector< Time > SwaptionHelperPtr_times(SwaptionHelperPtr *self){
            std::list<Time> l;
            (*self)->addTimesTo(l);
            std::vector<Time> v;
            std::copy(l.begin(),l.end(),std::back_inserter(v));
            return v;
        }
SWIGINTERN CapHelperPtr *new_CapHelperPtr__SWIG_0(Period const &length,Handle< Quote > const &volatility,IborIndexPtr const &index,Frequency fixedLegFrequency,DayCounter const &fixedLegDayCounter,bool includeFirstSwaplet,Handle< YieldTermStructure > const &termStructure,CalibrationHelper::CalibrationErrorType errorType=CalibrationHelper::RelativePriceError){
            boost::shared_ptr<IborIndex> libor =
                boost::dynamic_pointer_cast<IborIndex>(index);
            return new CapHelperPtr(
                new CapHelper(length,volatility,libor,fixedLegFrequency,
                              fixedLegDayCounter,includeFirstSwaplet,
                              termStructure));
        }
SWIGINTERN std::vector< Time > CapHelperPtr_times(CapHelperPtr *self){
            std::list<Time> l;
            (*self)->addTimesTo(l);
            std::vector<Time> v;
            std::copy(l.begin(),l.end(),std::back_inserter(v));
            return v;
        }
SWIGINTERN HestonModelHelperPtr *new_HestonModelHelperPtr__SWIG_0(Period const &maturity,Calendar const &calendar,Real const s0,Real const strikePrice,Handle< Quote > const &volatility,Handle< YieldTermStructure > const &riskFreeRate,Handle< YieldTermStructure > const &dividendYield,CalibrationHelper::CalibrationErrorType errorType=CalibrationHelper::RelativePriceError){
			return new HestonModelHelperPtr(
				new HestonModelHelper(maturity, calendar, s0, strikePrice,
									  volatility, riskFreeRate, dividendYield,
									  errorType)); 
		}
SWIGINTERN boost::shared_ptr< CalibrationHelper > std_vector_Sl_boost_shared_ptr_Sl_CalibrationHelper_Sg__Sg__pop(std::vector< boost::shared_ptr< CalibrationHelper > > *self){
                if (self->size() == 0)
                    throw std::out_of_range("pop from empty vector");
                boost::shared_ptr< CalibrationHelper > x = self->back();
                self->pop_back();
                return x;
            }
SWIGINTERN boost::shared_ptr< CalibrationHelper > &std_vector_Sl_boost_shared_ptr_Sl_CalibrationHelper_Sg__Sg__get(std::vector< boost::shared_ptr< CalibrationHelper > > *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_boost_shared_ptr_Sl_CalibrationHelper_Sg__Sg__set(std::vector< boost::shared_ptr< CalibrationHelper > > *self,int i,boost::shared_ptr< CalibrationHelper > const &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");
            }

using QuantLib::CalibratedModel;

SWIGINTERN bool boost_shared_ptr_Sl_CalibratedModel_Sg__isNull(boost::shared_ptr< CalibratedModel > *self){
                return !(*self);
            }
SWIGINTERN boost::shared_ptr< Observable > boost_shared_ptr_Sl_CalibratedModel_Sg__asObservable(boost::shared_ptr< CalibratedModel > *self){
        return boost::shared_ptr<Observable>(*self);
    }
SWIGINTERN boost::shared_ptr< Observable > Handle_Sl_CalibratedModel_Sg__asObservable(Handle< CalibratedModel > *self){
        return boost::shared_ptr<Observable>(*self);
    }

using QuantLib::TimeGrid;

SWIGINTERN TimeGrid *new_TimeGrid__SWIG_2(std::vector< Time > const &times){
            return new TimeGrid(times.begin(), times.end());
        }
SWIGINTERN TimeGrid *new_TimeGrid__SWIG_3(std::vector< Time > const &times,Size steps){
            return new TimeGrid(times.begin(), times.end(), steps);
        }

using QuantLib::Parameter;
using QuantLib::ConstantParameter;
using QuantLib::NullParameter;
using QuantLib::PiecewiseConstantParameter;


using QuantLib::Option;
using QuantLib::Barrier;


using QuantLib::Payoff;
using QuantLib::StrikedTypePayoff;

SWIGINTERN bool boost_shared_ptr_Sl_Payoff_Sg__isNull(boost::shared_ptr< Payoff > *self){
                return !(*self);
            }

using QuantLib::VanillaOption;
using QuantLib::ForwardVanillaOption;
typedef boost::shared_ptr<Instrument> VanillaOptionPtr;
typedef boost::shared_ptr<Instrument> MultiAssetOptionPtr;

SWIGINTERN VanillaOptionPtr *new_VanillaOptionPtr(boost::shared_ptr< Payoff > const &payoff,boost::shared_ptr< Exercise > const &exercise){
            boost::shared_ptr<StrikedTypePayoff> stPayoff =
                 boost::dynamic_pointer_cast<StrikedTypePayoff>(payoff);
            QL_REQUIRE(stPayoff, "wrong payoff given");
            return new VanillaOptionPtr(new VanillaOption(stPayoff,exercise));
        }
SWIGINTERN SampledCurve VanillaOptionPtr_priceCurve(VanillaOptionPtr *self){
            return boost::dynamic_pointer_cast<VanillaOption>(*self)
                ->result<SampledCurve>("priceCurve");
        }
SWIGINTERN Volatility VanillaOptionPtr_impliedVolatility__SWIG_0(VanillaOptionPtr *self,Real targetValue,GeneralizedBlackScholesProcessPtr const &process,Real accuracy=1.0e-4,Size maxEvaluations=100,Volatility minVol=1.0e-4,Volatility maxVol=4.0){
            boost::shared_ptr<GeneralizedBlackScholesProcess> bsProcess =
                 boost::dynamic_pointer_cast<GeneralizedBlackScholesProcess>(
                                                                     process);
            QL_REQUIRE(bsProcess, "Black-Scholes process required");
            return boost::dynamic_pointer_cast<VanillaOption>(*self)
                ->impliedVolatility(targetValue, bsProcess, accuracy,
                                    maxEvaluations, minVol, maxVol);
        }
SWIGINTERN Real VanillaOptionPtr_delta(VanillaOptionPtr *self){
        return boost::dynamic_pointer_cast<VanillaOption>(*self)->delta();
    }
SWIGINTERN Real VanillaOptionPtr_gamma(VanillaOptionPtr *self){
        return boost::dynamic_pointer_cast<VanillaOption>(*self)->gamma();
    }
SWIGINTERN Real VanillaOptionPtr_theta(VanillaOptionPtr *self){
        return boost::dynamic_pointer_cast<VanillaOption>(*self)->theta();
    }
SWIGINTERN Real VanillaOptionPtr_thetaPerDay(VanillaOptionPtr *self){
        return boost::dynamic_pointer_cast<VanillaOption>(*self)->thetaPerDay();
    }
SWIGINTERN Real VanillaOptionPtr_vega(VanillaOptionPtr *self){
        return boost::dynamic_pointer_cast<VanillaOption>(*self)->vega();
    }
SWIGINTERN Real VanillaOptionPtr_rho(VanillaOptionPtr *self){
        return boost::dynamic_pointer_cast<VanillaOption>(*self)->rho();
    }
SWIGINTERN Real VanillaOptionPtr_dividendRho(VanillaOptionPtr *self){
        return boost::dynamic_pointer_cast<VanillaOption>(*self)->dividendRho();
    }
SWIGINTERN Real VanillaOptionPtr_strikeSensitivity(VanillaOptionPtr *self){
        return boost::dynamic_pointer_cast<VanillaOption>(*self)->strikeSensitivity();
    }

using QuantLib::EuropeanOption;
typedef boost::shared_ptr<Instrument> EuropeanOptionPtr;

SWIGINTERN EuropeanOptionPtr *new_EuropeanOptionPtr(boost::shared_ptr< Payoff > const &payoff,boost::shared_ptr< Exercise > const &exercise){
            boost::shared_ptr<StrikedTypePayoff> stPayoff =
                 boost::dynamic_pointer_cast<StrikedTypePayoff>(payoff);
            QL_REQUIRE(stPayoff, "wrong payoff given");
            return new EuropeanOptionPtr(new EuropeanOption(stPayoff,exercise));
        }

using QuantLib::ForwardVanillaOption;
typedef boost::shared_ptr<Instrument> ForwardVanillaOptionPtr;

SWIGINTERN ForwardVanillaOptionPtr *new_ForwardVanillaOptionPtr(Real moneyness,Date resetDate,boost::shared_ptr< Payoff > const &payoff,boost::shared_ptr< Exercise > const &exercise){
            boost::shared_ptr<StrikedTypePayoff> stPayoff =
                 boost::dynamic_pointer_cast<StrikedTypePayoff>(payoff);
            QL_REQUIRE(stPayoff, "wrong payoff given");
            return new ForwardVanillaOptionPtr(
                                new ForwardVanillaOption(moneyness, resetDate,
                                                         stPayoff, exercise));
        }

using QuantLib::QuantoVanillaOption;
typedef boost::shared_ptr<Instrument> QuantoVanillaOptionPtr;

SWIGINTERN QuantoVanillaOptionPtr *new_QuantoVanillaOptionPtr(boost::shared_ptr< Payoff > const &payoff,boost::shared_ptr< Exercise > const &exercise){
            boost::shared_ptr<StrikedTypePayoff> stPayoff =
                 boost::dynamic_pointer_cast<StrikedTypePayoff>(payoff);
            QL_REQUIRE(stPayoff, "wrong payoff given");
            return new QuantoVanillaOptionPtr(
                                 new QuantoVanillaOption(stPayoff, exercise));
        }
SWIGINTERN Real QuantoVanillaOptionPtr_qvega(QuantoVanillaOptionPtr *self){
            return boost::dynamic_pointer_cast<QuantoVanillaOption>(*self)
                ->qvega();
        }
SWIGINTERN Real QuantoVanillaOptionPtr_qrho(QuantoVanillaOptionPtr *self){
            return boost::dynamic_pointer_cast<QuantoVanillaOption>(*self)
                ->qrho();
        }
SWIGINTERN Real QuantoVanillaOptionPtr_qlambda(QuantoVanillaOptionPtr *self){
            return boost::dynamic_pointer_cast<QuantoVanillaOption>(*self)
                ->qlambda();
        }

using QuantLib::QuantoForwardVanillaOption;
typedef boost::shared_ptr<Instrument> QuantoForwardVanillaOptionPtr;

SWIGINTERN QuantoForwardVanillaOptionPtr *new_QuantoForwardVanillaOptionPtr(Real moneyness,Date resetDate,boost::shared_ptr< Payoff > const &payoff,boost::shared_ptr< Exercise > const &exercise){
            boost::shared_ptr<StrikedTypePayoff> stPayoff =
                 boost::dynamic_pointer_cast<StrikedTypePayoff>(payoff);
            QL_REQUIRE(stPayoff, "wrong payoff given");
            return new QuantoForwardVanillaOptionPtr(
                          new QuantoForwardVanillaOption(moneyness, resetDate,
                                                         stPayoff, exercise));
        }

using QuantLib::MultiAssetOption;

SWIGINTERN Real MultiAssetOptionPtr_delta(MultiAssetOptionPtr *self){
            return boost::dynamic_pointer_cast<MultiAssetOption>(*self)
                ->delta();
        }
SWIGINTERN Real MultiAssetOptionPtr_gamma(MultiAssetOptionPtr *self){
            return boost::dynamic_pointer_cast<MultiAssetOption>(*self)
                ->gamma();
        }
SWIGINTERN Real MultiAssetOptionPtr_theta(MultiAssetOptionPtr *self){
            return boost::dynamic_pointer_cast<MultiAssetOption>(*self)
                ->theta();
        }
SWIGINTERN Real MultiAssetOptionPtr_vega(MultiAssetOptionPtr *self){
            return boost::dynamic_pointer_cast<MultiAssetOption>(*self)->vega();
        }
SWIGINTERN Real MultiAssetOptionPtr_rho(MultiAssetOptionPtr *self){
            return boost::dynamic_pointer_cast<MultiAssetOption>(*self)->rho();
        }
SWIGINTERN Real MultiAssetOptionPtr_dividendRho(MultiAssetOptionPtr *self){
            return boost::dynamic_pointer_cast<MultiAssetOption>(*self)
                ->dividendRho();
        }

using QuantLib::AnalyticEuropeanEngine;
typedef boost::shared_ptr<PricingEngine> AnalyticEuropeanEnginePtr;

SWIGINTERN AnalyticEuropeanEnginePtr *new_AnalyticEuropeanEnginePtr(GeneralizedBlackScholesProcessPtr const &process){
            boost::shared_ptr<GeneralizedBlackScholesProcess> bsProcess =
                 boost::dynamic_pointer_cast<GeneralizedBlackScholesProcess>(
                                                                     process);
            QL_REQUIRE(bsProcess, "Black-Scholes process required");
            return new AnalyticEuropeanEnginePtr(
                                       new AnalyticEuropeanEngine(bsProcess));
        }

using QuantLib::HestonModel;
typedef boost::shared_ptr<CalibratedModel> HestonModelPtr;

SWIGINTERN HestonModelPtr *new_HestonModelPtr(HestonProcessPtr const &process){

            boost::shared_ptr<HestonProcess> hProcess =
                 boost::dynamic_pointer_cast<HestonProcess>(process);
            QL_REQUIRE(hProcess, "Heston process required");

            return new HestonModelPtr(new HestonModel(hProcess));
        }
SWIGINTERN Real HestonModelPtr_theta(HestonModelPtr const *self){
            return boost::dynamic_pointer_cast<HestonModel>(*self)->theta();
        }
SWIGINTERN Real HestonModelPtr_kappa(HestonModelPtr const *self){
            return boost::dynamic_pointer_cast<HestonModel>(*self)->kappa();
        }
SWIGINTERN Real HestonModelPtr_sigma(HestonModelPtr const *self){
            return boost::dynamic_pointer_cast<HestonModel>(*self)->sigma();
        }
SWIGINTERN Real HestonModelPtr_rho(HestonModelPtr const *self){
            return boost::dynamic_pointer_cast<HestonModel>(*self)->rho();
        }
SWIGINTERN Real HestonModelPtr_v0(HestonModelPtr const *self){
            return boost::dynamic_pointer_cast<HestonModel>(*self)->v0();
        }

using QuantLib::PiecewiseTimeDependentHestonModel;
typedef boost::shared_ptr<CalibratedModel> PiecewiseTimeDependentHestonModelPtr;

SWIGINTERN PiecewiseTimeDependentHestonModelPtr *new_PiecewiseTimeDependentHestonModelPtr(Handle< YieldTermStructure > const &riskFreeRate,Handle< YieldTermStructure > const &dividendYield,Handle< Quote > const &s0,Real v0,Parameter const &theta,Parameter const &kappa,Parameter const &sigma,Parameter const &rho,TimeGrid const &timeGrid){
            return new PiecewiseTimeDependentHestonModelPtr (
                new PiecewiseTimeDependentHestonModel(riskFreeRate,
                    dividendYield, s0, v0, theta, kappa, 
                    sigma, rho, timeGrid));
        }
SWIGINTERN Real PiecewiseTimeDependentHestonModelPtr_theta(PiecewiseTimeDependentHestonModelPtr const *self,Time t){ 
            return boost::dynamic_pointer_cast<PiecewiseTimeDependentHestonModel>(*self)->theta(t);
        }
SWIGINTERN Real PiecewiseTimeDependentHestonModelPtr_kappa(PiecewiseTimeDependentHestonModelPtr const *self,Time t){
            return boost::dynamic_pointer_cast<PiecewiseTimeDependentHestonModel>(*self)->kappa(t);
        }
SWIGINTERN Real PiecewiseTimeDependentHestonModelPtr_sigma(PiecewiseTimeDependentHestonModelPtr const *self,Time t){
            return boost::dynamic_pointer_cast<PiecewiseTimeDependentHestonModel>(*self)->sigma(t);
        }
SWIGINTERN Real PiecewiseTimeDependentHestonModelPtr_rho(PiecewiseTimeDependentHestonModelPtr const *self,Time t){ 
            return boost::dynamic_pointer_cast<PiecewiseTimeDependentHestonModel>(*self)->rho(t);
        }
SWIGINTERN Real PiecewiseTimeDependentHestonModelPtr_v0(PiecewiseTimeDependentHestonModelPtr const *self){ 
            return boost::dynamic_pointer_cast<PiecewiseTimeDependentHestonModel>(*self)->v0();
        }
SWIGINTERN Real PiecewiseTimeDependentHestonModelPtr_s0(PiecewiseTimeDependentHestonModelPtr const *self){ 
            return boost::dynamic_pointer_cast<PiecewiseTimeDependentHestonModel>(*self)->s0();
        }
SWIGINTERN TimeGrid const &PiecewiseTimeDependentHestonModelPtr_timeGrid(PiecewiseTimeDependentHestonModelPtr const *self){
            return boost::dynamic_pointer_cast<PiecewiseTimeDependentHestonModel>(*self)->timeGrid();
        }
SWIGINTERN Handle< YieldTermStructure > const &PiecewiseTimeDependentHestonModelPtr_dividendYield(PiecewiseTimeDependentHestonModelPtr const *self){
            return boost::dynamic_pointer_cast<PiecewiseTimeDependentHestonModel>(*self)->dividendYield();
        }
SWIGINTERN Handle< YieldTermStructure > const &PiecewiseTimeDependentHestonModelPtr_riskFreeRate(PiecewiseTimeDependentHestonModelPtr const *self){
            return boost::dynamic_pointer_cast<PiecewiseTimeDependentHestonModel>(*self)->riskFreeRate();
        }

using QuantLib::AnalyticHestonEngine;
typedef boost::shared_ptr<PricingEngine> AnalyticHestonEnginePtr;

SWIGINTERN AnalyticHestonEnginePtr *new_AnalyticHestonEnginePtr__SWIG_0(HestonModelPtr const &model,Size integrationOrder=144){
            boost::shared_ptr<HestonModel> hModel =
                 boost::dynamic_pointer_cast<HestonModel>(model);
            QL_REQUIRE(hModel, "Heston model required");

            return new AnalyticHestonEnginePtr(
                new AnalyticHestonEngine(hModel, integrationOrder));
        }
SWIGINTERN AnalyticHestonEnginePtr *new_AnalyticHestonEnginePtr__SWIG_2(HestonModelPtr const &model,Real relTolerance,Size maxEvaluations){
            boost::shared_ptr<HestonModel> hModel =
                 boost::dynamic_pointer_cast<HestonModel>(model);
            QL_REQUIRE(hModel, "Heston model required");

            return new AnalyticHestonEnginePtr(
                new AnalyticHestonEngine(hModel, relTolerance,maxEvaluations));
        }

using QuantLib::AnalyticPTDHestonEngine;
typedef boost::shared_ptr<PricingEngine> AnalyticPTDHestonEnginePtr;

SWIGINTERN AnalyticPTDHestonEnginePtr *new_AnalyticPTDHestonEnginePtr__SWIG_0(PiecewiseTimeDependentHestonModelPtr const &model,Real relTolerance,Size maxEvaluations){
                const boost::shared_ptr<PiecewiseTimeDependentHestonModel> hmodel = 
                    boost::dynamic_pointer_cast<PiecewiseTimeDependentHestonModel>(model);
                return new AnalyticPTDHestonEnginePtr(
                    new AnalyticPTDHestonEngine(hmodel, relTolerance, maxEvaluations)
            );
        }
SWIGINTERN AnalyticPTDHestonEnginePtr *new_AnalyticPTDHestonEnginePtr__SWIG_1(PiecewiseTimeDependentHestonModelPtr const &model,Size integrationOrder=144){
                const boost::shared_ptr<PiecewiseTimeDependentHestonModel> hmodel = 
                    boost::dynamic_pointer_cast<PiecewiseTimeDependentHestonModel>(model);
                return new AnalyticPTDHestonEnginePtr(
                    new AnalyticPTDHestonEngine(hmodel, integrationOrder)
            );
        }

using QuantLib::BatesModel;
typedef boost::shared_ptr<CalibratedModel> BatesModelPtr;

SWIGINTERN BatesModelPtr *new_BatesModelPtr(BatesProcessPtr const &process){

            boost::shared_ptr<BatesProcess> bProcess =
                 boost::dynamic_pointer_cast<BatesProcess>(process);
            QL_REQUIRE(bProcess, "Bates process required");

            return new BatesModelPtr(new BatesModel(bProcess));
        }
SWIGINTERN Real BatesModelPtr_nu(BatesModelPtr const *self){
            return boost::dynamic_pointer_cast<BatesModel>(*self)->nu();
        }
SWIGINTERN Real BatesModelPtr_delta(BatesModelPtr const *self){
            return boost::dynamic_pointer_cast<BatesModel>(*self)->delta();
        }
SWIGINTERN Real BatesModelPtr_lambda(BatesModelPtr const *self){
            return boost::dynamic_pointer_cast<BatesModel>(*self)->lambda();
        }

using QuantLib::BatesEngine;
typedef boost::shared_ptr<PricingEngine> BatesEnginePtr;

SWIGINTERN BatesEnginePtr *new_BatesEnginePtr__SWIG_0(BatesModelPtr const &model,Size integrationOrder=144){
            boost::shared_ptr<BatesModel> bModel =
                 boost::dynamic_pointer_cast<BatesModel>(model);
            QL_REQUIRE(bModel, "Bates model required");

            return new BatesEnginePtr(
                new BatesEngine(bModel, integrationOrder));
        }
SWIGINTERN BatesEnginePtr *new_BatesEnginePtr__SWIG_2(BatesModelPtr const &model,Real relTolerance,Size maxEvaluations){
            boost::shared_ptr<BatesModel> bModel =
                 boost::dynamic_pointer_cast<BatesModel>(model);
            QL_REQUIRE(bModel, "Bates model required");

            return new BatesEnginePtr(
                new BatesEngine(bModel, relTolerance,maxEvaluations));
        }

using QuantLib::IntegralEngine;
typedef boost::shared_ptr<PricingEngine> IntegralEnginePtr;

SWIGINTERN IntegralEnginePtr *new_IntegralEnginePtr(GeneralizedBlackScholesProcessPtr const &process){
            boost::shared_ptr<GeneralizedBlackScholesProcess> bsProcess =
                 boost::dynamic_pointer_cast<GeneralizedBlackScholesProcess>(
                                                                     process);
            QL_REQUIRE(bsProcess, "Black-Scholes process required");
            return new IntegralEnginePtr(new IntegralEngine(bsProcess));
        }

using QuantLib::FDBermudanEngine;
typedef boost::shared_ptr<PricingEngine> FDBermudanEnginePtr;

SWIGINTERN FDBermudanEnginePtr *new_FDBermudanEnginePtr__SWIG_0(GeneralizedBlackScholesProcessPtr const &process,Size timeSteps=100,Size gridPoints=100,bool timeDependent=false){
            boost::shared_ptr<GeneralizedBlackScholesProcess> bsProcess =
                 boost::dynamic_pointer_cast<GeneralizedBlackScholesProcess>(
                                                                     process);
            QL_REQUIRE(bsProcess, "Black-Scholes process required");
            return new FDBermudanEnginePtr(
                            new FDBermudanEngine<>(bsProcess,timeSteps,
                                                   gridPoints,timeDependent));
        }

using QuantLib::FDEuropeanEngine;
typedef boost::shared_ptr<PricingEngine> FDEuropeanEnginePtr;

SWIGINTERN FDEuropeanEnginePtr *new_FDEuropeanEnginePtr__SWIG_0(GeneralizedBlackScholesProcessPtr const &process,Size timeSteps=100,Size gridPoints=100,bool timeDependent=false){
            boost::shared_ptr<GeneralizedBlackScholesProcess> bsProcess =
                 boost::dynamic_pointer_cast<GeneralizedBlackScholesProcess>(
                                                                     process);
            QL_REQUIRE(bsProcess, "Black-Scholes process required");
            return new FDEuropeanEnginePtr(
                            new FDEuropeanEngine<>(bsProcess,timeSteps,
                                                   gridPoints,timeDependent));
        }

using QuantLib::BinomialVanillaEngine;
using QuantLib::CoxRossRubinstein;
using QuantLib::JarrowRudd;
using QuantLib::AdditiveEQPBinomialTree;
using QuantLib::Trigeorgis;
using QuantLib::Tian;
using QuantLib::LeisenReimer;
using QuantLib::Joshi4;
typedef boost::shared_ptr<PricingEngine> BinomialVanillaEnginePtr;

SWIGINTERN BinomialVanillaEnginePtr *new_BinomialVanillaEnginePtr(GeneralizedBlackScholesProcessPtr const &process,std::string const &type,Size steps){
            boost::shared_ptr<GeneralizedBlackScholesProcess> bsProcess =
                 boost::dynamic_pointer_cast<GeneralizedBlackScholesProcess>(
                                                                     process);
            QL_REQUIRE(bsProcess, "Black-Scholes process required");
            std::string s = boost::algorithm::to_lower_copy(type);
            if (s == "crr" || s == "coxrossrubinstein")
                return new BinomialVanillaEnginePtr(
                    new BinomialVanillaEngine<CoxRossRubinstein>(
                                                            bsProcess,steps));
            else if (s == "jr" || s == "jarrowrudd")
                return new BinomialVanillaEnginePtr(
                    new BinomialVanillaEngine<JarrowRudd>(bsProcess,steps));
            else if (s == "eqp" || s == "additiveeqpbinomialtree")
                return new BinomialVanillaEnginePtr(
                    new BinomialVanillaEngine<AdditiveEQPBinomialTree>(
                                                            bsProcess,steps));
            else if (s == "trigeorgis")
                return new BinomialVanillaEnginePtr(
                    new BinomialVanillaEngine<Trigeorgis>(bsProcess,steps));
            else if (s == "tian")
                return new BinomialVanillaEnginePtr(
                    new BinomialVanillaEngine<Tian>(bsProcess,steps));
            else if (s == "lr" || s == "leisenreimer")
                return new BinomialVanillaEnginePtr(
                    new BinomialVanillaEngine<LeisenReimer>(bsProcess,steps));
            else if (s == "j4" || s == "joshi4")
                return new BinomialVanillaEnginePtr(
                    new BinomialVanillaEngine<Joshi4>(bsProcess,steps));
            else
                QL_FAIL("unknown binomial engine type: "+s);
        }

using QuantLib::MCEuropeanEngine;
using QuantLib::PseudoRandom;
using QuantLib::LowDiscrepancy;
typedef boost::shared_ptr<PricingEngine> MCEuropeanEnginePtr;

SWIGINTERN MCEuropeanEnginePtr *new_MCEuropeanEnginePtr__SWIG_0(GeneralizedBlackScholesProcessPtr const &process,std::string const &traits,intOrNull timeSteps=Null< Size >(),intOrNull timeStepsPerYear=Null< Size >(),bool brownianBridge=false,bool antitheticVariate=false,intOrNull requiredSamples=Null< Size >(),doubleOrNull requiredTolerance=Null< Real >(),intOrNull maxSamples=Null< Size >(),BigInteger seed=0){
            boost::shared_ptr<GeneralizedBlackScholesProcess> bsProcess =
                 boost::dynamic_pointer_cast<GeneralizedBlackScholesProcess>(
                                                                     process);
            QL_REQUIRE(bsProcess, "Black-Scholes process required");
            std::string s = boost::algorithm::to_lower_copy(traits);
            QL_REQUIRE(Size(timeSteps) != Null<Size>() ||
                       Size(timeStepsPerYear) != Null<Size>(),
                       "number of steps not specified");
            if (s == "pseudorandom" || s == "pr")
                return new MCEuropeanEnginePtr(
                         new MCEuropeanEngine<PseudoRandom>(bsProcess,
                                                            timeSteps,
                                                            timeStepsPerYear,
                                                            brownianBridge,
                                                            antitheticVariate,
                                                            requiredSamples,
                                                            requiredTolerance,
                                                            maxSamples,
                                                            seed));
            else if (s == "lowdiscrepancy" || s == "ld")
                return new MCEuropeanEnginePtr(
                       new MCEuropeanEngine<LowDiscrepancy>(bsProcess,
                                                            timeSteps,
                                                            timeStepsPerYear,
                                                            brownianBridge,
                                                            antitheticVariate,
                                                            requiredSamples,
                                                            requiredTolerance,
                                                            maxSamples,
                                                            seed));
            else
                QL_FAIL("unknown Monte Carlo engine type: "+s);
        }

using QuantLib::FDAmericanEngine;
using QuantLib::FDShoutEngine;
typedef boost::shared_ptr<PricingEngine> FDAmericanEnginePtr;
typedef boost::shared_ptr<PricingEngine> FDShoutEnginePtr;

SWIGINTERN FDAmericanEnginePtr *new_FDAmericanEnginePtr__SWIG_0(GeneralizedBlackScholesProcessPtr const &process,Size timeSteps=100,Size gridPoints=100,bool timeDependent=false){
            boost::shared_ptr<GeneralizedBlackScholesProcess> bsProcess =
                 boost::dynamic_pointer_cast<GeneralizedBlackScholesProcess>(
                                                                     process);
            QL_REQUIRE(bsProcess, "Black-Scholes process required");
            return new FDAmericanEnginePtr(
                            new FDAmericanEngine<>(bsProcess,timeSteps,
                                                   gridPoints,timeDependent));
        }

using QuantLib::FdBlackScholesVanillaEngine;
typedef boost::shared_ptr<PricingEngine> FdBlackScholesVanillaEnginePtr;

SWIGINTERN FdBlackScholesVanillaEnginePtr *new_FdBlackScholesVanillaEnginePtr__SWIG_0(GeneralizedBlackScholesProcessPtr const &process,Size tGrid=100,Size xGrid=100,Size dampingSteps=0){
            boost::shared_ptr<GeneralizedBlackScholesProcess> bsProcess =
                 boost::dynamic_pointer_cast<GeneralizedBlackScholesProcess>(
                                                                     process);
            QL_REQUIRE(bsProcess, "Black-Scholes process required");
            return new FdBlackScholesVanillaEnginePtr(
                            new FdBlackScholesVanillaEngine( bsProcess,tGrid, xGrid, dampingSteps));
        }

using QuantLib::FdBatesVanillaEngine;
typedef boost::shared_ptr<PricingEngine> FdBatesVanillaEnginePtr;

SWIGINTERN FdBatesVanillaEnginePtr *new_FdBatesVanillaEnginePtr__SWIG_0(BatesModelPtr const &model,Size tGrid=100,Size xGrid=100,Size vGrid=50,Size dampingSteps=0){
            boost::shared_ptr<BatesModel> bModel =
                 boost::dynamic_pointer_cast<BatesModel>(model);
            QL_REQUIRE(bModel, "Bates model required");
            return new FdBatesVanillaEnginePtr(
                               new FdBatesVanillaEngine(bModel, tGrid, xGrid,
                                                        vGrid, dampingSteps));
        }

using QuantLib::ContinuousArithmeticAsianLevyEngine;
typedef boost::shared_ptr<PricingEngine> ContinuousArithmeticAsianLevyEnginePtr;

SWIGINTERN ContinuousArithmeticAsianLevyEnginePtr *new_ContinuousArithmeticAsianLevyEnginePtr(GeneralizedBlackScholesProcessPtr const &process,Handle< Quote > const &runningAverage,Date const &startDate){
            boost::shared_ptr<GeneralizedBlackScholesProcess> bsProcess =
                 boost::dynamic_pointer_cast<GeneralizedBlackScholesProcess>(
                                                                     process);
            QL_REQUIRE(bsProcess, "Black-Scholes process required");
            return new ContinuousArithmeticAsianLevyEnginePtr(
                            new ContinuousArithmeticAsianLevyEngine(bsProcess,runningAverage, startDate));
        }

using QuantLib::FdBlackScholesAsianEngine;
typedef boost::shared_ptr<PricingEngine> FdBlackScholesAsianEnginePtr;

SWIGINTERN FdBlackScholesAsianEnginePtr *new_FdBlackScholesAsianEnginePtr(GeneralizedBlackScholesProcessPtr const &process,Size tGrid,Size xGrid,Size aGrid){
            boost::shared_ptr<GeneralizedBlackScholesProcess> bsProcess =
                 boost::dynamic_pointer_cast<GeneralizedBlackScholesProcess>(
                                                                     process);
            QL_REQUIRE(bsProcess, "Black-Scholes process required");
            return new FdBlackScholesAsianEnginePtr(
                            new FdBlackScholesAsianEngine(bsProcess,tGrid, xGrid, aGrid));
        }
SWIGINTERN FDShoutEnginePtr *new_FDShoutEnginePtr__SWIG_0(GeneralizedBlackScholesProcessPtr const &process,Size timeSteps=100,Size gridPoints=100,bool timeDependent=false){
            boost::shared_ptr<GeneralizedBlackScholesProcess> bsProcess =
                 boost::dynamic_pointer_cast<GeneralizedBlackScholesProcess>(
                                                                     process);
            QL_REQUIRE(bsProcess, "Black-Scholes process required");
            return new FDShoutEnginePtr(
                               new FDShoutEngine<>(bsProcess,timeSteps,
                                                   gridPoints,timeDependent));
        }

using QuantLib::BaroneAdesiWhaleyApproximationEngine;
typedef boost::shared_ptr<PricingEngine>
    BaroneAdesiWhaleyApproximationEnginePtr;

SWIGINTERN BaroneAdesiWhaleyApproximationEnginePtr *new_BaroneAdesiWhaleyApproximationEnginePtr(GeneralizedBlackScholesProcessPtr const &process){
            boost::shared_ptr<GeneralizedBlackScholesProcess> bsProcess =
                 boost::dynamic_pointer_cast<GeneralizedBlackScholesProcess>(
                                                                     process);
            QL_REQUIRE(bsProcess, "Black-Scholes process required");
            return new BaroneAdesiWhaleyApproximationEnginePtr(
                         new BaroneAdesiWhaleyApproximationEngine(bsProcess));
        }

using QuantLib::BjerksundStenslandApproximationEngine;
typedef boost::shared_ptr<PricingEngine>
    BjerksundStenslandApproximationEnginePtr;

SWIGINTERN BjerksundStenslandApproximationEnginePtr *new_BjerksundStenslandApproximationEnginePtr(GeneralizedBlackScholesProcessPtr const &process){
            boost::shared_ptr<GeneralizedBlackScholesProcess> bsProcess =
                 boost::dynamic_pointer_cast<GeneralizedBlackScholesProcess>(
                                                                     process);
            QL_REQUIRE(bsProcess, "Black-Scholes process required");
            return new BjerksundStenslandApproximationEnginePtr(
                        new BjerksundStenslandApproximationEngine(bsProcess));
        }

using QuantLib::AnalyticDigitalAmericanEngine;
typedef boost::shared_ptr<PricingEngine> AnalyticDigitalAmericanEnginePtr;

SWIGINTERN AnalyticDigitalAmericanEnginePtr *new_AnalyticDigitalAmericanEnginePtr(GeneralizedBlackScholesProcessPtr const &process){
            boost::shared_ptr<GeneralizedBlackScholesProcess> bsProcess =
                 boost::dynamic_pointer_cast<GeneralizedBlackScholesProcess>(
                                                                     process);
            QL_REQUIRE(bsProcess, "Black-Scholes process required");
            return new AnalyticDigitalAmericanEnginePtr(
                                new AnalyticDigitalAmericanEngine(bsProcess));
        }

using QuantLib::AnalyticDigitalAmericanKOEngine;
typedef boost::shared_ptr<PricingEngine> AnalyticDigitalAmericanKOEnginePtr;

SWIGINTERN AnalyticDigitalAmericanKOEnginePtr *new_AnalyticDigitalAmericanKOEnginePtr(GeneralizedBlackScholesProcessPtr const &process){
            boost::shared_ptr<GeneralizedBlackScholesProcess> bsProcess =
                 boost::dynamic_pointer_cast<GeneralizedBlackScholesProcess>(
                                                                     process);
            QL_REQUIRE(bsProcess, "Black-Scholes process required");
            return new AnalyticDigitalAmericanKOEnginePtr(
                                new AnalyticDigitalAmericanKOEngine(bsProcess));
        }

using QuantLib::DividendVanillaOption;
typedef boost::shared_ptr<Instrument> DividendVanillaOptionPtr;

SWIGINTERN DividendVanillaOptionPtr *new_DividendVanillaOptionPtr(boost::shared_ptr< Payoff > const &payoff,boost::shared_ptr< Exercise > const &exercise,std::vector< Date > const &dividendDates,std::vector< Real > const &dividends){
            boost::shared_ptr<StrikedTypePayoff> stPayoff =
                 boost::dynamic_pointer_cast<StrikedTypePayoff>(payoff);
            QL_REQUIRE(stPayoff, "wrong payoff given");
            return new DividendVanillaOptionPtr(
                          new DividendVanillaOption(stPayoff,exercise,
                                                    dividendDates,dividends));
        }
SWIGINTERN SampledCurve DividendVanillaOptionPtr_priceCurve(DividendVanillaOptionPtr *self){
            return boost::dynamic_pointer_cast<DividendVanillaOption>(*self)
                ->result<SampledCurve>("priceCurve");
        }
SWIGINTERN Volatility DividendVanillaOptionPtr_impliedVolatility__SWIG_0(DividendVanillaOptionPtr *self,Real targetValue,GeneralizedBlackScholesProcessPtr const &process,Real accuracy=1.0e-4,Size maxEvaluations=100,Volatility minVol=1.0e-4,Volatility maxVol=4.0){
            boost::shared_ptr<GeneralizedBlackScholesProcess> bsProcess =
                 boost::dynamic_pointer_cast<GeneralizedBlackScholesProcess>(
                                                                     process);
            QL_REQUIRE(bsProcess, "Black-Scholes process required");
            return boost::dynamic_pointer_cast<DividendVanillaOption>(*self)
                ->impliedVolatility(targetValue, bsProcess, accuracy,
                                    maxEvaluations, minVol, maxVol);
        }
SWIGINTERN Real DividendVanillaOptionPtr_delta(DividendVanillaOptionPtr *self){
        return boost::dynamic_pointer_cast<DividendVanillaOption>(*self)->delta();
    }
SWIGINTERN Real DividendVanillaOptionPtr_gamma(DividendVanillaOptionPtr *self){
        return boost::dynamic_pointer_cast<DividendVanillaOption>(*self)->gamma();
    }
SWIGINTERN Real DividendVanillaOptionPtr_theta(DividendVanillaOptionPtr *self){
        return boost::dynamic_pointer_cast<DividendVanillaOption>(*self)->theta();
    }
SWIGINTERN Real DividendVanillaOptionPtr_thetaPerDay(DividendVanillaOptionPtr *self){
        return boost::dynamic_pointer_cast<DividendVanillaOption>(*self)->thetaPerDay();
    }
SWIGINTERN Real DividendVanillaOptionPtr_vega(DividendVanillaOptionPtr *self){
        return boost::dynamic_pointer_cast<DividendVanillaOption>(*self)->vega();
    }
SWIGINTERN Real DividendVanillaOptionPtr_rho(DividendVanillaOptionPtr *self){
        return boost::dynamic_pointer_cast<DividendVanillaOption>(*self)->rho();
    }
SWIGINTERN Real DividendVanillaOptionPtr_dividendRho(DividendVanillaOptionPtr *self){
        return boost::dynamic_pointer_cast<DividendVanillaOption>(*self)->dividendRho();
    }
SWIGINTERN Real DividendVanillaOptionPtr_strikeSensitivity(DividendVanillaOptionPtr *self){
        return boost::dynamic_pointer_cast<DividendVanillaOption>(*self)->strikeSensitivity();
    }

using QuantLib::AnalyticDividendEuropeanEngine;
typedef boost::shared_ptr<PricingEngine> AnalyticDividendEuropeanEnginePtr;

SWIGINTERN AnalyticDividendEuropeanEnginePtr *new_AnalyticDividendEuropeanEnginePtr(GeneralizedBlackScholesProcessPtr const &process){
            boost::shared_ptr<GeneralizedBlackScholesProcess> bsProcess =
                 boost::dynamic_pointer_cast<GeneralizedBlackScholesProcess>(
                                                                     process);
            QL_REQUIRE(bsProcess, "Black-Scholes process required");
            return new AnalyticDividendEuropeanEnginePtr(
                               new AnalyticDividendEuropeanEngine(bsProcess));
        }

using QuantLib::FDDividendEuropeanEngine;
using QuantLib::FDDividendAmericanEngine;
typedef boost::shared_ptr<PricingEngine> FDDividendEuropeanEnginePtr;
typedef boost::shared_ptr<PricingEngine> FDDividendAmericanEnginePtr;

SWIGINTERN FDDividendEuropeanEnginePtr *new_FDDividendEuropeanEnginePtr__SWIG_0(GeneralizedBlackScholesProcessPtr const &process,Size timeSteps=100,Size gridPoints=100,bool timeDependent=false){
            boost::shared_ptr<GeneralizedBlackScholesProcess> bsProcess =
                 boost::dynamic_pointer_cast<GeneralizedBlackScholesProcess>(
                                                                     process);
            QL_REQUIRE(bsProcess, "Black-Scholes process required");
            return new FDDividendEuropeanEnginePtr(
                   new FDDividendEuropeanEngine<>(bsProcess,timeSteps,
                                                  gridPoints, timeDependent));
        }
SWIGINTERN FDDividendAmericanEnginePtr *new_FDDividendAmericanEnginePtr__SWIG_0(GeneralizedBlackScholesProcessPtr const &process,Size timeSteps=100,Size gridPoints=100,bool timeDependent=false){
            boost::shared_ptr<GeneralizedBlackScholesProcess> bsProcess =
                 boost::dynamic_pointer_cast<GeneralizedBlackScholesProcess>(
                                                                     process);
            QL_REQUIRE(bsProcess, "Black-Scholes process required");
            return new FDDividendAmericanEnginePtr(
                   new FDDividendAmericanEngine<>(bsProcess,timeSteps,
                                                  gridPoints, timeDependent));
        }

using QuantLib::BarrierOption;
typedef boost::shared_ptr<Instrument> BarrierOptionPtr;

SWIGINTERN BarrierOptionPtr *new_BarrierOptionPtr(Barrier::Type barrierType,Real barrier,Real rebate,boost::shared_ptr< Payoff > const &payoff,boost::shared_ptr< Exercise > const &exercise){
            boost::shared_ptr<StrikedTypePayoff> stPayoff =
                 boost::dynamic_pointer_cast<StrikedTypePayoff>(payoff);
            QL_REQUIRE(stPayoff, "wrong payoff given");
            return new BarrierOptionPtr(
                               new BarrierOption(barrierType, barrier, rebate,
                                                 stPayoff,exercise));
        }
SWIGINTERN SampledCurve BarrierOptionPtr_priceCurve(BarrierOptionPtr *self){
            return boost::dynamic_pointer_cast<BarrierOption>(*self)
                ->result<SampledCurve>("priceCurve");
        }
SWIGINTERN Volatility BarrierOptionPtr_impliedVolatility__SWIG_0(BarrierOptionPtr *self,Real targetValue,GeneralizedBlackScholesProcessPtr const &process,Real accuracy=1.0e-4,Size maxEvaluations=100,Volatility minVol=1.0e-4,Volatility maxVol=4.0){
            boost::shared_ptr<GeneralizedBlackScholesProcess> bsProcess =
                 boost::dynamic_pointer_cast<GeneralizedBlackScholesProcess>(
                                                                     process);
            QL_REQUIRE(bsProcess, "Black-Scholes process required");
            return boost::dynamic_pointer_cast<BarrierOption>(*self)
                 ->impliedVolatility(targetValue, bsProcess, accuracy,
                                     maxEvaluations, minVol, maxVol);
        }
SWIGINTERN Real BarrierOptionPtr_delta(BarrierOptionPtr *self){
        return boost::dynamic_pointer_cast<BarrierOption>(*self)->delta();
    }
SWIGINTERN Real BarrierOptionPtr_gamma(BarrierOptionPtr *self){
        return boost::dynamic_pointer_cast<BarrierOption>(*self)->gamma();
    }
SWIGINTERN Real BarrierOptionPtr_theta(BarrierOptionPtr *self){
        return boost::dynamic_pointer_cast<BarrierOption>(*self)->theta();
    }
SWIGINTERN Real BarrierOptionPtr_thetaPerDay(BarrierOptionPtr *self){
        return boost::dynamic_pointer_cast<BarrierOption>(*self)->thetaPerDay();
    }
SWIGINTERN Real BarrierOptionPtr_vega(BarrierOptionPtr *self){
        return boost::dynamic_pointer_cast<BarrierOption>(*self)->vega();
    }
SWIGINTERN Real BarrierOptionPtr_rho(BarrierOptionPtr *self){
        return boost::dynamic_pointer_cast<BarrierOption>(*self)->rho();
    }
SWIGINTERN Real BarrierOptionPtr_dividendRho(BarrierOptionPtr *self){
        return boost::dynamic_pointer_cast<BarrierOption>(*self)->dividendRho();
    }
SWIGINTERN Real BarrierOptionPtr_strikeSensitivity(BarrierOptionPtr *self){
        return boost::dynamic_pointer_cast<BarrierOption>(*self)->strikeSensitivity();
    }

using QuantLib::AnalyticBarrierEngine;
typedef boost::shared_ptr<PricingEngine> AnalyticBarrierEnginePtr;

SWIGINTERN AnalyticBarrierEnginePtr *new_AnalyticBarrierEnginePtr(GeneralizedBlackScholesProcessPtr const &process){
            boost::shared_ptr<GeneralizedBlackScholesProcess> bsProcess =
                 boost::dynamic_pointer_cast<GeneralizedBlackScholesProcess>(
                                                                     process);
            QL_REQUIRE(bsProcess, "Black-Scholes process required");
            return new AnalyticBarrierEnginePtr(
                                        new AnalyticBarrierEngine(bsProcess));
        }

using QuantLib::MCBarrierEngine;
typedef boost::shared_ptr<PricingEngine> MCBarrierEnginePtr;

SWIGINTERN MCBarrierEnginePtr *new_MCBarrierEnginePtr__SWIG_0(GeneralizedBlackScholesProcessPtr const &process,std::string const &traits,Size timeSteps=Null< Size >(),Size timeStepsPerYear=Null< Size >(),bool brownianBridge=false,bool antitheticVariate=false,intOrNull requiredSamples=Null< Size >(),doubleOrNull requiredTolerance=Null< Real >(),intOrNull maxSamples=Null< Size >(),bool isBiased=false,BigInteger seed=0){
            boost::shared_ptr<GeneralizedBlackScholesProcess> bsProcess =
                 boost::dynamic_pointer_cast<GeneralizedBlackScholesProcess>(
                                                                     process);
            QL_REQUIRE(bsProcess, "Black-Scholes process required");
            std::string s = boost::algorithm::to_lower_copy(traits);
            if (s == "pseudorandom" || s == "pr")
                return new MCBarrierEnginePtr(
                         new MCBarrierEngine<PseudoRandom>(bsProcess,
                                                           timeSteps,
                                                           timeStepsPerYear,
                                                           brownianBridge,
                                                           antitheticVariate,
                                                           requiredSamples,
                                                           requiredTolerance,
                                                           maxSamples,
                                                           isBiased,
                                                           seed));
            else if (s == "lowdiscrepancy" || s == "ld")
                return new MCBarrierEnginePtr(
                       new MCBarrierEngine<LowDiscrepancy>(bsProcess,
                                                           timeSteps,
                                                           timeStepsPerYear,
                                                           brownianBridge,
                                                           antitheticVariate,
                                                           requiredSamples,
                                                           requiredTolerance,
                                                           maxSamples,
                                                           isBiased,
                                                           seed));
            else
                QL_FAIL("unknown Monte Carlo engine type: "+s);
        }

using QuantLib::FdmSchemeDesc;


using QuantLib::FdBlackScholesBarrierEngine;
typedef boost::shared_ptr<PricingEngine> FdBlackScholesBarrierEnginePtr;

SWIGINTERN FdBlackScholesBarrierEnginePtr *new_FdBlackScholesBarrierEnginePtr__SWIG_0(GeneralizedBlackScholesProcessPtr const &process,Size tGrid=100,Size xGrid=100,Size dampingSteps=0,FdmSchemeDesc const &schemeDesc=FdmSchemeDesc::Douglas(),bool localVol=false,Real illegalLocalVolOverwrite=-Null< Real >()){
            boost::shared_ptr<GeneralizedBlackScholesProcess> bsProcess =
                 boost::dynamic_pointer_cast<GeneralizedBlackScholesProcess>(
                                                                     process);
            QL_REQUIRE(bsProcess, "Black-Scholes process required");
            return new FdBlackScholesBarrierEnginePtr(
                            new FdBlackScholesBarrierEngine(bsProcess,
                                                              tGrid,  xGrid, dampingSteps, 
                                                              schemeDesc, localVol,
                                                              illegalLocalVolOverwrite));
        }

using QuantLib::AnalyticBinaryBarrierEngine;
typedef boost::shared_ptr<PricingEngine> AnalyticBinaryBarrierEnginePtr;

SWIGINTERN AnalyticBinaryBarrierEnginePtr *new_AnalyticBinaryBarrierEnginePtr(GeneralizedBlackScholesProcessPtr const &process){
            boost::shared_ptr<GeneralizedBlackScholesProcess> bsProcess =
                 boost::dynamic_pointer_cast<GeneralizedBlackScholesProcess>(
                                                                     process);
            QL_REQUIRE(bsProcess, "Black-Scholes process required");
            return new AnalyticBinaryBarrierEnginePtr(
                                        new AnalyticBinaryBarrierEngine(bsProcess));
        }

using QuantLib::BinomialBarrierEngine;
using QuantLib::DiscretizedDermanKaniBarrierOption;
typedef boost::shared_ptr<PricingEngine> BinomialBarrierEnginePtr;

SWIGINTERN BinomialBarrierEnginePtr *new_BinomialBarrierEnginePtr__SWIG_0(GeneralizedBlackScholesProcessPtr const &process,std::string const &type,Size steps,Size max_steps=0){
            boost::shared_ptr<GeneralizedBlackScholesProcess> bsProcess =
                 boost::dynamic_pointer_cast<GeneralizedBlackScholesProcess>(
                                                                     process);
            QL_REQUIRE(bsProcess, "Black-Scholes process required");
            std::string s = boost::algorithm::to_lower_copy(type);
            if (s == "crr" || s == "coxrossrubinstein")
                return new BinomialBarrierEnginePtr(
                    new BinomialBarrierEngine<CoxRossRubinstein,
                                          DiscretizedDermanKaniBarrierOption>(
                                                  bsProcess,steps,max_steps));
            else if (s == "jr" || s == "jarrowrudd")
                return new BinomialBarrierEnginePtr(
                    new BinomialBarrierEngine<JarrowRudd,
                                          DiscretizedDermanKaniBarrierOption>(
                                                  bsProcess,steps,max_steps));
            else if (s == "eqp" || s == "additiveeqpbinomialtree")
                return new BinomialBarrierEnginePtr(
                    new BinomialBarrierEngine<AdditiveEQPBinomialTree,
                                          DiscretizedDermanKaniBarrierOption>(
                                                  bsProcess,steps,max_steps));
            else if (s == "trigeorgis")
                return new BinomialBarrierEnginePtr(
                    new BinomialBarrierEngine<Trigeorgis,
                                          DiscretizedDermanKaniBarrierOption>(
                                                  bsProcess,steps,max_steps));
            else if (s == "tian")
                return new BinomialBarrierEnginePtr(
                    new BinomialBarrierEngine<Tian,
                                          DiscretizedDermanKaniBarrierOption>(
                                                  bsProcess,steps,max_steps));
            else if (s == "lr" || s == "leisenreimer")
                return new BinomialBarrierEnginePtr(
                    new BinomialBarrierEngine<LeisenReimer,
                                          DiscretizedDermanKaniBarrierOption>(
                                                  bsProcess,steps,max_steps));
            else if (s == "j4" || s == "joshi4")
                return new BinomialBarrierEnginePtr(
                    new BinomialBarrierEngine<Joshi4,
                                          DiscretizedDermanKaniBarrierOption>(
                                                  bsProcess,steps,max_steps));
            else
                QL_FAIL("unknown binomial barrier engine type: "+s);
        }

using QuantLib::QuantoEngine;
using QuantLib::ForwardVanillaEngine;
typedef boost::shared_ptr<PricingEngine> ForwardEuropeanEnginePtr;
typedef boost::shared_ptr<PricingEngine> QuantoEuropeanEnginePtr;
typedef boost::shared_ptr<PricingEngine> QuantoForwardEuropeanEnginePtr;

SWIGINTERN ForwardEuropeanEnginePtr *new_ForwardEuropeanEnginePtr(GeneralizedBlackScholesProcessPtr const &process){
            boost::shared_ptr<GeneralizedBlackScholesProcess> bsProcess =
                 boost::dynamic_pointer_cast<GeneralizedBlackScholesProcess>(
                                                                     process);
            QL_REQUIRE(bsProcess, "Black-Scholes process required");
            return new ForwardEuropeanEnginePtr(
                 new ForwardVanillaEngine<AnalyticEuropeanEngine>(bsProcess));
        }
SWIGINTERN QuantoEuropeanEnginePtr *new_QuantoEuropeanEnginePtr(GeneralizedBlackScholesProcessPtr const &process,Handle< YieldTermStructure > const &foreignRiskFreeRate,Handle< BlackVolTermStructure > const &exchangeRateVolatility,Handle< Quote > const &correlation){
            boost::shared_ptr<GeneralizedBlackScholesProcess> bsProcess =
                 boost::dynamic_pointer_cast<GeneralizedBlackScholesProcess>(
                                                                     process);
            QL_REQUIRE(bsProcess, "Black-Scholes process required");
            return new QuantoEuropeanEnginePtr(
                new QuantoEngine<VanillaOption,AnalyticEuropeanEngine>(
                                                       bsProcess,
                                                       foreignRiskFreeRate,
                                                       exchangeRateVolatility,
                                                       correlation));
        }
SWIGINTERN QuantoForwardEuropeanEnginePtr *new_QuantoForwardEuropeanEnginePtr(GeneralizedBlackScholesProcessPtr const &process,Handle< YieldTermStructure > const &foreignRiskFreeRate,Handle< BlackVolTermStructure > const &exchangeRateVolatility,Handle< Quote > const &correlation){
            boost::shared_ptr<GeneralizedBlackScholesProcess> bsProcess =
                 boost::dynamic_pointer_cast<GeneralizedBlackScholesProcess>(
                                                                     process);
            QL_REQUIRE(bsProcess, "Black-Scholes process required");
            return new QuantoForwardEuropeanEnginePtr(
                new QuantoEngine<ForwardVanillaOption,AnalyticEuropeanEngine>(
                                                       bsProcess,
                                                       foreignRiskFreeRate,
                                                       exchangeRateVolatility,
                                                       correlation));
        }

using QuantLib::BlackCalculator;

SWIGINTERN BlackCalculator *new_BlackCalculator__SWIG_0(boost::shared_ptr< Payoff > const &payoff,Real forward,Real stdDev,Real discount=1.0){

            boost::shared_ptr<StrikedTypePayoff> stPayoff =
                boost::dynamic_pointer_cast<StrikedTypePayoff>(payoff);

            QL_REQUIRE(stPayoff, "wrong payoff given");

            return new BlackCalculator(stPayoff,forward,stdDev,discount);
        }

using QuantLib::Average;
using QuantLib::ContinuousAveragingAsianOption;
using QuantLib::DiscreteAveragingAsianOption;
typedef boost::shared_ptr<Instrument> ContinuousAveragingAsianOptionPtr;
typedef boost::shared_ptr<Instrument> DiscreteAveragingAsianOptionPtr;

SWIGINTERN ContinuousAveragingAsianOptionPtr *new_ContinuousAveragingAsianOptionPtr(Average::Type averageType,boost::shared_ptr< Payoff > const &payoff,boost::shared_ptr< Exercise > const &exercise){
            boost::shared_ptr<StrikedTypePayoff> stPayoff =
                 boost::dynamic_pointer_cast<StrikedTypePayoff>(payoff);
            QL_REQUIRE(stPayoff, "wrong payoff given");
            return new ContinuousAveragingAsianOptionPtr(
                       new ContinuousAveragingAsianOption(averageType,
                                                          stPayoff,exercise));
        }
SWIGINTERN Real ContinuousAveragingAsianOptionPtr_delta(ContinuousAveragingAsianOptionPtr *self){
        return boost::dynamic_pointer_cast<ContinuousAveragingAsianOption>(*self)->delta();
    }
SWIGINTERN Real ContinuousAveragingAsianOptionPtr_gamma(ContinuousAveragingAsianOptionPtr *self){
        return boost::dynamic_pointer_cast<ContinuousAveragingAsianOption>(*self)->gamma();
    }
SWIGINTERN Real ContinuousAveragingAsianOptionPtr_theta(ContinuousAveragingAsianOptionPtr *self){
        return boost::dynamic_pointer_cast<ContinuousAveragingAsianOption>(*self)->theta();
    }
SWIGINTERN Real ContinuousAveragingAsianOptionPtr_thetaPerDay(ContinuousAveragingAsianOptionPtr *self){
        return boost::dynamic_pointer_cast<ContinuousAveragingAsianOption>(*self)->thetaPerDay();
    }
SWIGINTERN Real ContinuousAveragingAsianOptionPtr_vega(ContinuousAveragingAsianOptionPtr *self){
        return boost::dynamic_pointer_cast<ContinuousAveragingAsianOption>(*self)->vega();
    }
SWIGINTERN Real ContinuousAveragingAsianOptionPtr_rho(ContinuousAveragingAsianOptionPtr *self){
        return boost::dynamic_pointer_cast<ContinuousAveragingAsianOption>(*self)->rho();
    }
SWIGINTERN Real ContinuousAveragingAsianOptionPtr_dividendRho(ContinuousAveragingAsianOptionPtr *self){
        return boost::dynamic_pointer_cast<ContinuousAveragingAsianOption>(*self)->dividendRho();
    }
SWIGINTERN Real ContinuousAveragingAsianOptionPtr_strikeSensitivity(ContinuousAveragingAsianOptionPtr *self){
        return boost::dynamic_pointer_cast<ContinuousAveragingAsianOption>(*self)->strikeSensitivity();
    }
SWIGINTERN DiscreteAveragingAsianOptionPtr *new_DiscreteAveragingAsianOptionPtr(Average::Type averageType,Real runningAccumulator,Size pastFixings,std::vector< Date > const &fixingDates,boost::shared_ptr< Payoff > const &payoff,boost::shared_ptr< Exercise > const &exercise){
            boost::shared_ptr<StrikedTypePayoff> stPayoff =
                 boost::dynamic_pointer_cast<StrikedTypePayoff>(payoff);
            QL_REQUIRE(stPayoff, "wrong payoff given");
            return new DiscreteAveragingAsianOptionPtr(
                          new DiscreteAveragingAsianOption(averageType,
                                                           runningAccumulator,
                                                           pastFixings,
                                                           fixingDates,
                                                           stPayoff,
                                                           exercise));
        }
SWIGINTERN Real DiscreteAveragingAsianOptionPtr_delta(DiscreteAveragingAsianOptionPtr *self){
        return boost::dynamic_pointer_cast<DiscreteAveragingAsianOption>(*self)->delta();
    }
SWIGINTERN Real DiscreteAveragingAsianOptionPtr_gamma(DiscreteAveragingAsianOptionPtr *self){
        return boost::dynamic_pointer_cast<DiscreteAveragingAsianOption>(*self)->gamma();
    }
SWIGINTERN Real DiscreteAveragingAsianOptionPtr_theta(DiscreteAveragingAsianOptionPtr *self){
        return boost::dynamic_pointer_cast<DiscreteAveragingAsianOption>(*self)->theta();
    }
SWIGINTERN Real DiscreteAveragingAsianOptionPtr_thetaPerDay(DiscreteAveragingAsianOptionPtr *self){
        return boost::dynamic_pointer_cast<DiscreteAveragingAsianOption>(*self)->thetaPerDay();
    }
SWIGINTERN Real DiscreteAveragingAsianOptionPtr_vega(DiscreteAveragingAsianOptionPtr *self){
        return boost::dynamic_pointer_cast<DiscreteAveragingAsianOption>(*self)->vega();
    }
SWIGINTERN Real DiscreteAveragingAsianOptionPtr_rho(DiscreteAveragingAsianOptionPtr *self){
        return boost::dynamic_pointer_cast<DiscreteAveragingAsianOption>(*self)->rho();
    }
SWIGINTERN Real DiscreteAveragingAsianOptionPtr_dividendRho(DiscreteAveragingAsianOptionPtr *self){
        return boost::dynamic_pointer_cast<DiscreteAveragingAsianOption>(*self)->dividendRho();
    }
SWIGINTERN Real DiscreteAveragingAsianOptionPtr_strikeSensitivity(DiscreteAveragingAsianOptionPtr *self){
        return boost::dynamic_pointer_cast<DiscreteAveragingAsianOption>(*self)->strikeSensitivity();
    }

using QuantLib::AnalyticContinuousGeometricAveragePriceAsianEngine;
typedef boost::shared_ptr<PricingEngine>
    AnalyticContinuousGeometricAveragePriceAsianEnginePtr;

SWIGINTERN AnalyticContinuousGeometricAveragePriceAsianEnginePtr *new_AnalyticContinuousGeometricAveragePriceAsianEnginePtr(GeneralizedBlackScholesProcessPtr const &process){
            boost::shared_ptr<GeneralizedBlackScholesProcess> bsProcess =
                 boost::dynamic_pointer_cast<GeneralizedBlackScholesProcess>(
                                                                     process);
            QL_REQUIRE(bsProcess, "Black-Scholes process required");
            return new AnalyticContinuousGeometricAveragePriceAsianEnginePtr(
                new AnalyticContinuousGeometricAveragePriceAsianEngine(
                                                                  bsProcess));
        }

using QuantLib::AnalyticDiscreteGeometricAveragePriceAsianEngine;
typedef boost::shared_ptr<PricingEngine>
    AnalyticDiscreteGeometricAveragePriceAsianEnginePtr;

SWIGINTERN AnalyticDiscreteGeometricAveragePriceAsianEnginePtr *new_AnalyticDiscreteGeometricAveragePriceAsianEnginePtr(GeneralizedBlackScholesProcessPtr const &process){
            boost::shared_ptr<GeneralizedBlackScholesProcess> bsProcess =
                 boost::dynamic_pointer_cast<GeneralizedBlackScholesProcess>(
                                                                     process);
            QL_REQUIRE(bsProcess, "Black-Scholes process required");
            return new AnalyticDiscreteGeometricAveragePriceAsianEnginePtr(
                new AnalyticDiscreteGeometricAveragePriceAsianEngine(
                                                                  bsProcess));
        }

using QuantLib::AnalyticDiscreteGeometricAverageStrikeAsianEngine;
typedef boost::shared_ptr<PricingEngine>
    AnalyticDiscreteGeometricAverageStrikeAsianEnginePtr;

SWIGINTERN AnalyticDiscreteGeometricAverageStrikeAsianEnginePtr *new_AnalyticDiscreteGeometricAverageStrikeAsianEnginePtr(GeneralizedBlackScholesProcessPtr const &process){
            boost::shared_ptr<GeneralizedBlackScholesProcess> bsProcess =
                 boost::dynamic_pointer_cast<GeneralizedBlackScholesProcess>(
                                                                     process);
            QL_REQUIRE(bsProcess, "Black-Scholes process required");
            return new AnalyticDiscreteGeometricAverageStrikeAsianEnginePtr(
                new AnalyticDiscreteGeometricAverageStrikeAsianEngine(
                                                                  bsProcess));
        }

using QuantLib::MCDiscreteArithmeticAPEngine;
typedef boost::shared_ptr<PricingEngine> MCDiscreteArithmeticAPEnginePtr;

SWIGINTERN MCDiscreteArithmeticAPEnginePtr *new_MCDiscreteArithmeticAPEnginePtr__SWIG_0(GeneralizedBlackScholesProcessPtr const &process,std::string const &traits,bool brownianBridge=false,bool antitheticVariate=false,bool controlVariate=false,intOrNull requiredSamples=Null< Size >(),doubleOrNull requiredTolerance=Null< Real >(),intOrNull maxSamples=Null< Size >(),BigInteger seed=0){
            boost::shared_ptr<GeneralizedBlackScholesProcess> bsProcess =
                 boost::dynamic_pointer_cast<GeneralizedBlackScholesProcess>(
                                                                     process);
            QL_REQUIRE(bsProcess, "Black-Scholes process required");
            std::string s = boost::algorithm::to_lower_copy(traits);
            if (s == "pseudorandom" || s == "pr")
                return new MCDiscreteArithmeticAPEnginePtr(
                         new MCDiscreteArithmeticAPEngine<PseudoRandom>(
                                                            bsProcess,
                                                            brownianBridge,
                                                            antitheticVariate,
                                                            controlVariate,
                                                            requiredSamples,
                                                            requiredTolerance,
                                                            maxSamples,
                                                            seed));
            else if (s == "lowdiscrepancy" || s == "ld")
                return new MCDiscreteArithmeticAPEnginePtr(
                       new MCDiscreteArithmeticAPEngine<LowDiscrepancy>(
                                                            bsProcess,
                                                            brownianBridge,
                                                            antitheticVariate,
                                                            controlVariate,
                                                            requiredSamples,
                                                            requiredTolerance,
                                                            maxSamples,
                                                            seed));
            else
                QL_FAIL("unknown Monte Carlo engine type: "+s);
        }

using QuantLib::MCDiscreteArithmeticASEngine;
typedef boost::shared_ptr<PricingEngine> MCDiscreteArithmeticASEnginePtr;

SWIGINTERN MCDiscreteArithmeticASEnginePtr *new_MCDiscreteArithmeticASEnginePtr__SWIG_0(GeneralizedBlackScholesProcessPtr const &process,std::string const &traits,bool brownianBridge=false,bool antitheticVariate=false,intOrNull requiredSamples=Null< Size >(),doubleOrNull requiredTolerance=Null< Real >(),intOrNull maxSamples=Null< Size >(),BigInteger seed=0){
            boost::shared_ptr<GeneralizedBlackScholesProcess> bsProcess =
                 boost::dynamic_pointer_cast<GeneralizedBlackScholesProcess>(
                                                                     process);
            QL_REQUIRE(bsProcess, "Black-Scholes process required");
            std::string s = boost::algorithm::to_lower_copy(traits);
            if (s == "pseudorandom" || s == "pr")
                return new MCDiscreteArithmeticASEnginePtr(
                         new MCDiscreteArithmeticASEngine<PseudoRandom>(
                                                            bsProcess,
                                                            brownianBridge,
                                                            antitheticVariate,
                                                            requiredSamples,
                                                            requiredTolerance,
                                                            maxSamples,
                                                            seed));
            else if (s == "lowdiscrepancy" || s == "ld")
                return new MCDiscreteArithmeticASEnginePtr(
                       new MCDiscreteArithmeticASEngine<LowDiscrepancy>(
                                                            bsProcess,
                                                            brownianBridge,
                                                            antitheticVariate,
                                                            requiredSamples,
                                                            requiredTolerance,
                                                            maxSamples,
                                                            seed));
            else
                QL_FAIL("unknown Monte Carlo engine type: "+s);
        }

using QuantLib::MCDiscreteGeometricAPEngine;
typedef boost::shared_ptr<PricingEngine> MCDiscreteGeometricAPEnginePtr;

SWIGINTERN MCDiscreteGeometricAPEnginePtr *new_MCDiscreteGeometricAPEnginePtr__SWIG_0(GeneralizedBlackScholesProcessPtr const &process,std::string const &traits,bool brownianBridge=false,bool antitheticVariate=false,intOrNull requiredSamples=Null< Size >(),doubleOrNull requiredTolerance=Null< Real >(),intOrNull maxSamples=Null< Size >(),BigInteger seed=0){
            boost::shared_ptr<GeneralizedBlackScholesProcess> bsProcess =
                 boost::dynamic_pointer_cast<GeneralizedBlackScholesProcess>(
                                                                     process);
            QL_REQUIRE(bsProcess, "Black-Scholes process required");
            std::string s = boost::algorithm::to_lower_copy(traits);
            if (s == "pseudorandom" || s == "pr")
                return new MCDiscreteGeometricAPEnginePtr(
                         new MCDiscreteGeometricAPEngine<PseudoRandom>(
                                                            bsProcess,
                                                            brownianBridge,
                                                            antitheticVariate,
                                                            requiredSamples,
                                                            requiredTolerance,
                                                            maxSamples,
                                                            seed));
            else if (s == "lowdiscrepancy" || s == "ld")
                return new MCDiscreteGeometricAPEnginePtr(
                       new MCDiscreteGeometricAPEngine<LowDiscrepancy>(
                                                            bsProcess,
                                                            brownianBridge,
                                                            antitheticVariate,
                                                            requiredSamples,
                                                            requiredTolerance,
                                                            maxSamples,
                                                            seed));
            else
                QL_FAIL("unknown Monte Carlo engine type: "+s);
        }

using QuantLib::VarianceGammaEngine;
typedef boost::shared_ptr<PricingEngine>
    VarianceGammaEnginePtr;

SWIGINTERN VarianceGammaEnginePtr *new_VarianceGammaEnginePtr(VarianceGammaProcessPtr const &process){
            boost::shared_ptr<VarianceGammaProcess> vgProcess =
                boost::dynamic_pointer_cast<VarianceGammaProcess>(process);
            QL_REQUIRE(vgProcess, "Variance-Gamma process required");
            return new VarianceGammaEnginePtr(new VarianceGammaEngine(vgProcess));
        }

using QuantLib::FFTVarianceGammaEngine;
typedef boost::shared_ptr<PricingEngine>
    FFTVarianceGammaEnginePtr;

SWIGINTERN FFTVarianceGammaEnginePtr *new_FFTVarianceGammaEnginePtr__SWIG_0(VarianceGammaProcessPtr const &process,Real logStrikeSpacing=0.001){
            boost::shared_ptr<VarianceGammaProcess> vgProcess =
                boost::dynamic_pointer_cast<VarianceGammaProcess>(process);
            QL_REQUIRE(vgProcess, "Variance Gamma process required");
            return new FFTVarianceGammaEnginePtr(new FFTVarianceGammaEngine(vgProcess, logStrikeSpacing));
        }
SWIGINTERN void FFTVarianceGammaEnginePtr_precalculate(FFTVarianceGammaEnginePtr *self,std::vector< boost::shared_ptr< Instrument > > const &optionList){
            boost::dynamic_pointer_cast<FFTVarianceGammaEngine>(*self)->precalculate(optionList);
        }

using QuantLib::DoubleBarrierOption;
using QuantLib::DoubleBarrier;


using QuantLib::DoubleBarrierOption;
typedef boost::shared_ptr<Instrument> DoubleBarrierOptionPtr;

SWIGINTERN DoubleBarrierOptionPtr *new_DoubleBarrierOptionPtr(DoubleBarrier::Type barrierType,Real barrier_lo,Real barrier_hi,Real rebate,boost::shared_ptr< Payoff > const &payoff,boost::shared_ptr< Exercise > const &exercise){
            boost::shared_ptr<StrikedTypePayoff> stPayoff =
                 boost::dynamic_pointer_cast<StrikedTypePayoff>(payoff);
            QL_REQUIRE(stPayoff, "wrong payoff given");
            return new DoubleBarrierOptionPtr(
                               new DoubleBarrierOption(barrierType, barrier_lo, 
                                                 barrier_hi, rebate,
                                                 stPayoff,exercise));
        }
SWIGINTERN Real DoubleBarrierOptionPtr_delta(DoubleBarrierOptionPtr *self){
        return boost::dynamic_pointer_cast<DoubleBarrierOption>(*self)->delta();
    }
SWIGINTERN Real DoubleBarrierOptionPtr_gamma(DoubleBarrierOptionPtr *self){
        return boost::dynamic_pointer_cast<DoubleBarrierOption>(*self)->gamma();
    }
SWIGINTERN Real DoubleBarrierOptionPtr_theta(DoubleBarrierOptionPtr *self){
        return boost::dynamic_pointer_cast<DoubleBarrierOption>(*self)->theta();
    }
SWIGINTERN Real DoubleBarrierOptionPtr_thetaPerDay(DoubleBarrierOptionPtr *self){
        return boost::dynamic_pointer_cast<DoubleBarrierOption>(*self)->thetaPerDay();
    }
SWIGINTERN Real DoubleBarrierOptionPtr_vega(DoubleBarrierOptionPtr *self){
        return boost::dynamic_pointer_cast<DoubleBarrierOption>(*self)->vega();
    }
SWIGINTERN Real DoubleBarrierOptionPtr_rho(DoubleBarrierOptionPtr *self){
        return boost::dynamic_pointer_cast<DoubleBarrierOption>(*self)->rho();
    }
SWIGINTERN Real DoubleBarrierOptionPtr_dividendRho(DoubleBarrierOptionPtr *self){
        return boost::dynamic_pointer_cast<DoubleBarrierOption>(*self)->dividendRho();
    }
SWIGINTERN Real DoubleBarrierOptionPtr_strikeSensitivity(DoubleBarrierOptionPtr *self){
        return boost::dynamic_pointer_cast<DoubleBarrierOption>(*self)->strikeSensitivity();
    }

using QuantLib::QuantoDoubleBarrierOption;
typedef boost::shared_ptr<Instrument> QuantoDoubleBarrierOptionPtr;

SWIGINTERN QuantoDoubleBarrierOptionPtr *new_QuantoDoubleBarrierOptionPtr(DoubleBarrier::Type barrierType,Real barrier_lo,Real barrier_hi,Real rebate,boost::shared_ptr< Payoff > const &payoff,boost::shared_ptr< Exercise > const &exercise){
            boost::shared_ptr<StrikedTypePayoff> stPayoff =
                 boost::dynamic_pointer_cast<StrikedTypePayoff>(payoff);
            QL_REQUIRE(stPayoff, "wrong payoff given");
            return new QuantoDoubleBarrierOptionPtr(
                         new QuantoDoubleBarrierOption(barrierType, barrier_lo, 
                                      barrier_hi, rebate, stPayoff, exercise));
        }
SWIGINTERN Real QuantoDoubleBarrierOptionPtr_qvega(QuantoDoubleBarrierOptionPtr *self){
            return boost::dynamic_pointer_cast<QuantoDoubleBarrierOption>(*self)
                ->qvega();
        }
SWIGINTERN Real QuantoDoubleBarrierOptionPtr_qrho(QuantoDoubleBarrierOptionPtr *self){
            return boost::dynamic_pointer_cast<QuantoDoubleBarrierOption>(*self)
                ->qrho();
        }
SWIGINTERN Real QuantoDoubleBarrierOptionPtr_qlambda(QuantoDoubleBarrierOptionPtr *self){
            return boost::dynamic_pointer_cast<QuantoDoubleBarrierOption>(*self)
                ->qlambda();
        }

using QuantLib::AnalyticDoubleBarrierEngine;
typedef boost::shared_ptr<PricingEngine> AnalyticDoubleBarrierEnginePtr;

SWIGINTERN AnalyticDoubleBarrierEnginePtr *new_AnalyticDoubleBarrierEnginePtr__SWIG_0(GeneralizedBlackScholesProcessPtr const &process,int series=5){
            boost::shared_ptr<GeneralizedBlackScholesProcess> bsProcess =
                 boost::dynamic_pointer_cast<GeneralizedBlackScholesProcess>(
                                                                     process);
            QL_REQUIRE(bsProcess, "Black-Scholes process required");
            return new AnalyticDoubleBarrierEnginePtr(
                            new AnalyticDoubleBarrierEngine(bsProcess, series));
        }

using QuantLib::WulinYongDoubleBarrierEngine;
typedef boost::shared_ptr<PricingEngine> WulinYongDoubleBarrierEnginePtr;

SWIGINTERN WulinYongDoubleBarrierEnginePtr *new_WulinYongDoubleBarrierEnginePtr__SWIG_0(GeneralizedBlackScholesProcessPtr const &process,int series=5){
            boost::shared_ptr<GeneralizedBlackScholesProcess> bsProcess =
                 boost::dynamic_pointer_cast<GeneralizedBlackScholesProcess>(
                                                                     process);
            QL_REQUIRE(bsProcess, "Black-Scholes process required");
            return new WulinYongDoubleBarrierEnginePtr(
                            new WulinYongDoubleBarrierEngine(bsProcess, series));
        }

using QuantLib::VannaVolgaDoubleBarrierEngine;
using QuantLib::DeltaVolQuote;
typedef boost::shared_ptr<PricingEngine> VannaVolgaDoubleBarrierEnginePtr;

SWIGINTERN bool boost_shared_ptr_Sl_DeltaVolQuote_Sg__isNull(boost::shared_ptr< DeltaVolQuote > *self){
                return !(*self);
            }
SWIGINTERN boost::shared_ptr< Observable > boost_shared_ptr_Sl_DeltaVolQuote_Sg__asObservable(boost::shared_ptr< DeltaVolQuote > *self){
        return boost::shared_ptr<Observable>(*self);
    }
SWIGINTERN boost::shared_ptr< DeltaVolQuote > *new_boost_shared_ptr_Sl_DeltaVolQuote_Sg___SWIG_0(Real delta,Handle< Quote > const &vol,Time maturity,DeltaVolQuote::DeltaType deltaType){
        return new boost::shared_ptr<DeltaVolQuote>(
                          new DeltaVolQuote(delta, vol, maturity, deltaType));
    }
SWIGINTERN boost::shared_ptr< DeltaVolQuote > *new_boost_shared_ptr_Sl_DeltaVolQuote_Sg___SWIG_1(Handle< Quote > const &vol,DeltaVolQuote::DeltaType deltaType,Time maturity,DeltaVolQuote::AtmType atmType){
        return new boost::shared_ptr<DeltaVolQuote>(
                        new DeltaVolQuote(vol, deltaType, maturity, atmType));
    }
SWIGINTERN boost::shared_ptr< Observable > Handle_Sl_DeltaVolQuote_Sg__asObservable(Handle< DeltaVolQuote > *self){
        return boost::shared_ptr<Observable>(*self);
    }
SWIGINTERN VannaVolgaDoubleBarrierEnginePtr *new_VannaVolgaDoubleBarrierEnginePtr__SWIG_0(Handle< DeltaVolQuote > const atmVol,Handle< DeltaVolQuote > const vol25Put,Handle< DeltaVolQuote > const vol25Call,Handle< Quote > const spotFX,Handle< YieldTermStructure > const domesticTS,Handle< YieldTermStructure > const foreignTS,std::string const &type="ik",bool const adaptVanDelta=false,Real const bsPriceWithSmile=0.0,int series=5){
            std::string s = boost::algorithm::to_lower_copy(type);
            if (s == "ik" || s == "analytic")
                return new VannaVolgaDoubleBarrierEnginePtr(
                   new VannaVolgaDoubleBarrierEngine<AnalyticDoubleBarrierEngine>(
                                        atmVol, vol25Put, vol25Call, spotFX, 
                                        domesticTS, foreignTS, adaptVanDelta, 
                                        bsPriceWithSmile, series));
            else if (s == "wo")
                return new VannaVolgaDoubleBarrierEnginePtr(
                   new VannaVolgaDoubleBarrierEngine<WulinYongDoubleBarrierEngine>(
                                        atmVol, vol25Put, vol25Call, spotFX, 
                                        domesticTS, foreignTS, adaptVanDelta, 
                                        bsPriceWithSmile, series));
            else
                QL_FAIL("unknown binomial engine type: "+s);
        }

using QuantLib::AnalyticDoubleBarrierBinaryEngine;
typedef boost::shared_ptr<PricingEngine> AnalyticDoubleBarrierBinaryEnginePtr;

SWIGINTERN AnalyticDoubleBarrierBinaryEnginePtr *new_AnalyticDoubleBarrierBinaryEnginePtr(GeneralizedBlackScholesProcessPtr const &process){
            boost::shared_ptr<GeneralizedBlackScholesProcess> bsProcess =
                 boost::dynamic_pointer_cast<GeneralizedBlackScholesProcess>(
                                                                     process);
            QL_REQUIRE(bsProcess, "Black-Scholes process required");
            return new AnalyticDoubleBarrierBinaryEnginePtr(
                            new AnalyticDoubleBarrierBinaryEngine(bsProcess));
        }

using QuantLib::BinomialDoubleBarrierEngine;
using QuantLib::DiscretizedDermanKaniDoubleBarrierOption;
typedef boost::shared_ptr<PricingEngine> BinomialDoubleBarrierEnginePtr;

SWIGINTERN BinomialDoubleBarrierEnginePtr *new_BinomialDoubleBarrierEnginePtr(GeneralizedBlackScholesProcessPtr const &process,std::string const &type,Size steps){
            boost::shared_ptr<GeneralizedBlackScholesProcess> bsProcess =
                 boost::dynamic_pointer_cast<GeneralizedBlackScholesProcess>(
                                                                     process);
            QL_REQUIRE(bsProcess, "Black-Scholes process required");
            std::string s = boost::algorithm::to_lower_copy(type);
            if (s == "crr" || s == "coxrossrubinstein")
                return new BinomialDoubleBarrierEnginePtr(
                    new BinomialDoubleBarrierEngine<CoxRossRubinstein,
                                     DiscretizedDermanKaniDoubleBarrierOption>(
                                                  bsProcess,steps));
            else if (s == "jr" || s == "jarrowrudd")
                return new BinomialDoubleBarrierEnginePtr(
                    new BinomialDoubleBarrierEngine<JarrowRudd,
                                     DiscretizedDermanKaniDoubleBarrierOption>(
                                                  bsProcess,steps));
            else if (s == "eqp" || s == "additiveeqpbinomialtree")
                return new BinomialDoubleBarrierEnginePtr(
                    new BinomialDoubleBarrierEngine<AdditiveEQPBinomialTree,
                                     DiscretizedDermanKaniDoubleBarrierOption>(
                                                  bsProcess,steps));
            else if (s == "trigeorgis")
                return new BinomialDoubleBarrierEnginePtr(
                    new BinomialDoubleBarrierEngine<Trigeorgis,
                                     DiscretizedDermanKaniDoubleBarrierOption>(
                                                  bsProcess,steps));
            else if (s == "tian")
                return new BinomialDoubleBarrierEnginePtr(
                    new BinomialDoubleBarrierEngine<Tian,
                                     DiscretizedDermanKaniDoubleBarrierOption>(
                                                  bsProcess,steps));
            else if (s == "lr" || s == "leisenreimer")
                return new BinomialDoubleBarrierEnginePtr(
                    new BinomialDoubleBarrierEngine<LeisenReimer,
                                     DiscretizedDermanKaniDoubleBarrierOption>(
                                                  bsProcess,steps));
            else if (s == "j4" || s == "joshi4")
                return new BinomialDoubleBarrierEnginePtr(
                    new BinomialDoubleBarrierEngine<Joshi4,
                                     DiscretizedDermanKaniDoubleBarrierOption>(
                                                  bsProcess,steps));
            else
                QL_FAIL("unknown binomial double barrier engine type: "+s);
        }

using QuantLib::PlainVanillaPayoff;
using QuantLib::PercentageStrikePayoff;
using QuantLib::CashOrNothingPayoff;
using QuantLib::AssetOrNothingPayoff;
using QuantLib::SuperSharePayoff;
using QuantLib::GapPayoff;
typedef boost::shared_ptr<Payoff> PlainVanillaPayoffPtr;
typedef boost::shared_ptr<Payoff> PercentageStrikePayoffPtr;
typedef boost::shared_ptr<Payoff> CashOrNothingPayoffPtr;
typedef boost::shared_ptr<Payoff> AssetOrNothingPayoffPtr;
typedef boost::shared_ptr<Payoff> SuperSharePayoffPtr;
typedef boost::shared_ptr<Payoff> GapPayoffPtr;

SWIGINTERN PlainVanillaPayoffPtr *new_PlainVanillaPayoffPtr(Option::Type type,Real strike){
            return new PlainVanillaPayoffPtr(
                                        new PlainVanillaPayoff(type, strike));
        }
SWIGINTERN Option::Type PlainVanillaPayoffPtr_optionType(PlainVanillaPayoffPtr *self){
          	return boost::dynamic_pointer_cast<
									PlainVanillaPayoff>(*self)->optionType();
		}
SWIGINTERN Real PlainVanillaPayoffPtr_strike(PlainVanillaPayoffPtr *self){
          	return boost::dynamic_pointer_cast<
									PlainVanillaPayoff>(*self)->strike();
		}
SWIGINTERN PercentageStrikePayoffPtr *new_PercentageStrikePayoffPtr(Option::Type type,Real moneyness){
            return new PercentageStrikePayoffPtr(
                                 new PercentageStrikePayoff(type, moneyness));
        }
SWIGINTERN CashOrNothingPayoffPtr *new_CashOrNothingPayoffPtr(Option::Type type,Real strike,Real payoff){
            return new CashOrNothingPayoffPtr(
                               new CashOrNothingPayoff(type, strike, payoff));
        }
SWIGINTERN AssetOrNothingPayoffPtr *new_AssetOrNothingPayoffPtr(Option::Type type,Real strike){
            return new AssetOrNothingPayoffPtr(
                                      new AssetOrNothingPayoff(type, strike));
        }
SWIGINTERN SuperSharePayoffPtr *new_SuperSharePayoffPtr(Option::Type type,Real strike,Real increment){
            return new SuperSharePayoffPtr(
                               new SuperSharePayoff(type, strike, increment));
        }
SWIGINTERN GapPayoffPtr *new_GapPayoffPtr(Option::Type type,Real strike,Real strikePayoff){
            return new GapPayoffPtr(
                               new GapPayoff(type, strike, strikePayoff));
        }

using QuantLib::BasketOption;
using QuantLib::BasketPayoff;
using QuantLib::MinBasketPayoff;
using QuantLib::MaxBasketPayoff;
using QuantLib::AverageBasketPayoff;
typedef boost::shared_ptr<Instrument> BasketOptionPtr;
typedef boost::shared_ptr<Payoff> BasketPayoffPtr;
typedef boost::shared_ptr<Payoff> MinBasketPayoffPtr;
typedef boost::shared_ptr<Payoff> MaxBasketPayoffPtr;
typedef boost::shared_ptr<Payoff> AverageBasketPayoffPtr;

SWIGINTERN MinBasketPayoffPtr *new_MinBasketPayoffPtr(boost::shared_ptr< Payoff > const p){
            return new MinBasketPayoffPtr(new MinBasketPayoff(p));
        }
SWIGINTERN MaxBasketPayoffPtr *new_MaxBasketPayoffPtr(boost::shared_ptr< Payoff > const p){
            return new MaxBasketPayoffPtr(new MaxBasketPayoff(p));
        }
SWIGINTERN AverageBasketPayoffPtr *new_AverageBasketPayoffPtr__SWIG_0(boost::shared_ptr< Payoff > const p,Array const &a){
            return new AverageBasketPayoffPtr(new AverageBasketPayoff(p, a));
        }
SWIGINTERN AverageBasketPayoffPtr *new_AverageBasketPayoffPtr__SWIG_1(boost::shared_ptr< Payoff > const p,Size n){
            return new AverageBasketPayoffPtr(new AverageBasketPayoff(p, n));
        }
SWIGINTERN BasketOptionPtr *new_BasketOptionPtr(boost::shared_ptr< Payoff > const &payoff,boost::shared_ptr< Exercise > const &exercise){
            boost::shared_ptr<BasketPayoff> stPayoff =
                 boost::dynamic_pointer_cast<BasketPayoff>(payoff);
            QL_REQUIRE(stPayoff, "wrong payoff given");
            return new BasketOptionPtr(new BasketOption(stPayoff,exercise));
        }

using QuantLib::MCEuropeanBasketEngine;
typedef boost::shared_ptr<PricingEngine> MCEuropeanBasketEnginePtr;

SWIGINTERN MCEuropeanBasketEnginePtr *new_MCEuropeanBasketEnginePtr__SWIG_0(StochasticProcessArrayPtr const &process,std::string const &traits,Size timeSteps=Null< Size >(),Size timeStepsPerYear=Null< Size >(),bool brownianBridge=false,bool antitheticVariate=false,intOrNull requiredSamples=Null< Size >(),doubleOrNull requiredTolerance=Null< Real >(),intOrNull maxSamples=Null< Size >(),BigInteger seed=0){
            boost::shared_ptr<StochasticProcessArray> processes =
                 boost::dynamic_pointer_cast<StochasticProcessArray>(process);
            QL_REQUIRE(processes, "stochastic-process array required");
            std::string s = boost::algorithm::to_lower_copy(traits);
            if (s == "pseudorandom" || s == "pr")
                return new MCEuropeanBasketEnginePtr(
                   new MCEuropeanBasketEngine<PseudoRandom>(processes,
                                                            timeSteps,
                                                            timeStepsPerYear,
                                                            brownianBridge,
                                                            antitheticVariate,
                                                            requiredSamples,
                                                            requiredTolerance,
                                                            maxSamples,
                                                            seed));
            else if (s == "lowdiscrepancy" || s == "ld")
                return new MCEuropeanBasketEnginePtr(
                   new MCEuropeanBasketEngine<LowDiscrepancy>(processes,
                                                              timeSteps,
                                                              timeStepsPerYear,
                                                              brownianBridge,
                                                              antitheticVariate,
                                                              requiredSamples,
                                                              requiredTolerance,
                                                              maxSamples,
                                                              seed));
            else
                QL_FAIL("unknown Monte Carlo engine type: "+s);
        }

using QuantLib::MCAmericanBasketEngine;
typedef boost::shared_ptr<PricingEngine> MCAmericanBasketEnginePtr;

SWIGINTERN MCAmericanBasketEnginePtr *new_MCAmericanBasketEnginePtr__SWIG_0(StochasticProcessArrayPtr const &process,std::string const &traits,Size timeSteps=Null< Size >(),Size timeStepsPerYear=Null< Size >(),bool brownianBridge=false,bool antitheticVariate=false,intOrNull requiredSamples=Null< Size >(),doubleOrNull requiredTolerance=Null< Real >(),intOrNull maxSamples=Null< Size >(),BigInteger seed=0){
            boost::shared_ptr<StochasticProcessArray> processes =
                 boost::dynamic_pointer_cast<StochasticProcessArray>(process);
            QL_REQUIRE(processes, "stochastic-process array required");
            std::string s = boost::algorithm::to_lower_copy(traits);
            if (s == "pseudorandom" || s == "pr")
                  return new MCAmericanBasketEnginePtr(
                  new MCAmericanBasketEngine<PseudoRandom>(processes,
                                                           timeSteps,
                                                           timeStepsPerYear,
                                                           brownianBridge,
                                                           antitheticVariate,
                                                           requiredSamples,
                                                           requiredTolerance,
                                                           maxSamples,
                                                           seed));
            else if (s == "lowdiscrepancy" || s == "ld")
                return new MCAmericanBasketEnginePtr(
                new MCAmericanBasketEngine<LowDiscrepancy>(processes,
                                                           timeSteps,
                                                           timeStepsPerYear,
                                                           brownianBridge,
                                                           antitheticVariate,
                                                           requiredSamples,
                                                           requiredTolerance,
                                                           maxSamples,
                                                           seed));
            else
                QL_FAIL("unknown Monte Carlo engine type: "+s);
        }

using QuantLib::StulzEngine;
typedef boost::shared_ptr<PricingEngine> StulzEnginePtr;

SWIGINTERN StulzEnginePtr *new_StulzEnginePtr(GeneralizedBlackScholesProcessPtr const &process1,GeneralizedBlackScholesProcessPtr const &process2,Real correlation){
            boost::shared_ptr<GeneralizedBlackScholesProcess> bsProcess1 =
                 boost::dynamic_pointer_cast<GeneralizedBlackScholesProcess>(
                                                                    process1);
            QL_REQUIRE(bsProcess1, "Black-Scholes process required");
            boost::shared_ptr<GeneralizedBlackScholesProcess> bsProcess2 =
                 boost::dynamic_pointer_cast<GeneralizedBlackScholesProcess>(
                                                                    process2);
            QL_REQUIRE(bsProcess2, "Black-Scholes process required");
            return new StulzEnginePtr(
                          new StulzEngine(bsProcess1,bsProcess2,correlation));
        }

using QuantLib::EverestOption;
typedef boost::shared_ptr<Instrument> EverestOptionPtr;
using QuantLib::MCEverestEngine;
typedef boost::shared_ptr<PricingEngine> MCEverestEnginePtr;

SWIGINTERN EverestOptionPtr *new_EverestOptionPtr(Real notional,Rate guarantee,boost::shared_ptr< Exercise > const &exercise){
            return new EverestOptionPtr(new EverestOption(notional,guarantee,
                                                          exercise));
        }
SWIGINTERN MCEverestEnginePtr *new_MCEverestEnginePtr__SWIG_0(StochasticProcessArrayPtr const &process,std::string const &traits,Size timeSteps=Null< Size >(),Size timeStepsPerYear=Null< Size >(),bool brownianBridge=false,bool antitheticVariate=false,intOrNull requiredSamples=Null< Size >(),doubleOrNull requiredTolerance=Null< Real >(),intOrNull maxSamples=Null< Size >(),BigInteger seed=0){
            boost::shared_ptr<StochasticProcessArray> processes =
                 boost::dynamic_pointer_cast<StochasticProcessArray>(process);
            QL_REQUIRE(processes, "stochastic-process array required");
            std::string s = boost::algorithm::to_lower_copy(traits);
            if (s == "pseudorandom" || s == "pr")
                return new MCEverestEnginePtr(
                        new MCEverestEngine<PseudoRandom>(processes,
                                                          timeSteps,
                                                          timeStepsPerYear,
                                                          brownianBridge,
                                                          antitheticVariate,
                                                          requiredSamples,
                                                          requiredTolerance,
                                                          maxSamples,
                                                          seed));
            else if (s == "lowdiscrepancy" || s == "ld")
                return new MCEverestEnginePtr(
                      new MCEverestEngine<LowDiscrepancy>(processes,
                                                          timeSteps,
                                                          timeStepsPerYear,
                                                          brownianBridge,
                                                          antitheticVariate,
                                                          requiredSamples,
                                                          requiredTolerance,
                                                          maxSamples,
                                                          seed));
            else
                QL_FAIL("unknown Monte Carlo engine type: "+s);
        }

using QuantLib::HimalayaOption;
typedef boost::shared_ptr<Instrument> HimalayaOptionPtr;
using QuantLib::MCHimalayaEngine;
typedef boost::shared_ptr<PricingEngine> MCHimalayaEnginePtr;

SWIGINTERN HimalayaOptionPtr *new_HimalayaOptionPtr(std::vector< Date > const &fixingDates,Real strike){
            return new HimalayaOptionPtr(new HimalayaOption(fixingDates,
                                                            strike));
        }
SWIGINTERN MCHimalayaEnginePtr *new_MCHimalayaEnginePtr__SWIG_0(StochasticProcessArrayPtr const &process,std::string const &traits,bool brownianBridge=false,bool antitheticVariate=false,intOrNull requiredSamples=Null< Size >(),doubleOrNull requiredTolerance=Null< Real >(),intOrNull maxSamples=Null< Size >(),BigInteger seed=0){
            boost::shared_ptr<StochasticProcessArray> processes =
                 boost::dynamic_pointer_cast<StochasticProcessArray>(process);
            QL_REQUIRE(processes, "stochastic-process array required");
            std::string s = boost::algorithm::to_lower_copy(traits);
            if (s == "pseudorandom" || s == "pr")
                return new MCHimalayaEnginePtr(
                       new MCHimalayaEngine<PseudoRandom>(processes,
                                                          brownianBridge,
                                                          antitheticVariate,
                                                          requiredSamples,
                                                          requiredTolerance,
                                                          maxSamples,
                                                          seed));
            else if (s == "lowdiscrepancy" || s == "ld")
                return new MCHimalayaEnginePtr(
                     new MCHimalayaEngine<LowDiscrepancy>(processes,
                                                          brownianBridge,
                                                          antitheticVariate,
                                                          requiredSamples,
                                                          requiredTolerance,
                                                          maxSamples,
                                                          seed));
            else
                QL_FAIL("unknown Monte Carlo engine type: "+s);
        }

using QuantLib::blackFormula;
using QuantLib::blackFormulaImpliedStdDev;
using QuantLib::blackFormulaCashItmProbability;
using QuantLib::bachelierBlackFormula;
using QuantLib::bachelierBlackFormulaImpliedVol;


using QuantLib::BlackDeltaCalculator;


using QuantLib::Callability;
using QuantLib::SoftCallability;
typedef boost::shared_ptr<Callability> CallabilityPtr;
typedef boost::shared_ptr<Callability> SoftCallabilityPtr;
typedef Callability::Price CallabilityPrice;
using QuantLib::CallabilitySchedule;

SWIGINTERN bool boost_shared_ptr_Sl_Callability_Sg__isNull(boost::shared_ptr< Callability > *self){
                return !(*self);
            }
SWIGINTERN boost::shared_ptr< Callability > *new_boost_shared_ptr_Sl_Callability_Sg_(CallabilityPrice const &price,Callability::Type type,Date const &date){
        return new boost::shared_ptr<Callability>(
                                            new Callability(price,type,date));
    }

using QuantLib::SoftCallability;
typedef boost::shared_ptr<Callability> SoftCallabilityPtr;

SWIGINTERN SoftCallabilityPtr *new_SoftCallabilityPtr(CallabilityPrice const &price,Date const &date,Real trigger){
            return new SoftCallabilityPtr(new SoftCallability(price,date,
                                                              trigger));
        }
SWIGINTERN boost::shared_ptr< Callability > std_vector_Sl_boost_shared_ptr_Sl_Callability_Sg__Sg__pop(std::vector< boost::shared_ptr< Callability > > *self){
                if (self->size() == 0)
                    throw std::out_of_range("pop from empty vector");
                boost::shared_ptr< Callability > x = self->back();
                self->pop_back();
                return x;
            }
SWIGINTERN boost::shared_ptr< Callability > &std_vector_Sl_boost_shared_ptr_Sl_Callability_Sg__Sg__get(std::vector< boost::shared_ptr< Callability > > *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_boost_shared_ptr_Sl_Callability_Sg__Sg__set(std::vector< boost::shared_ptr< Callability > > *self,int i,boost::shared_ptr< Callability > const &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");
            }

  using QuantLib::Seasonality;
  using QuantLib::MultiplicativePriceSeasonality;
  typedef boost::shared_ptr<Seasonality> MultiplicativePriceSeasonalityPtr;

SWIGINTERN bool boost_shared_ptr_Sl_Seasonality_Sg__isNull(boost::shared_ptr< Seasonality > *self){
                return !(*self);
            }
SWIGINTERN MultiplicativePriceSeasonalityPtr *new_MultiplicativePriceSeasonalityPtr(Date const &seasonalityBaseDate,Frequency frequency,std::vector< Rate > const &seasonalityFactors){
            return new MultiplicativePriceSeasonalityPtr(
                       new MultiplicativePriceSeasonality(seasonalityBaseDate,
                                                          frequency,
                                                          seasonalityFactors));
        }

  using QuantLib::InflationTermStructure;
  using QuantLib::YoYInflationTermStructure;
  using QuantLib::ZeroInflationTermStructure;

SWIGINTERN bool boost_shared_ptr_Sl_YoYInflationTermStructure_Sg__isNull(boost::shared_ptr< YoYInflationTermStructure > *self){
                return !(*self);
            }
SWIGINTERN boost::shared_ptr< Observable > boost_shared_ptr_Sl_YoYInflationTermStructure_Sg__asObservable(boost::shared_ptr< YoYInflationTermStructure > *self){
        return boost::shared_ptr<Observable>(*self);
    }
SWIGINTERN boost::shared_ptr< Observable > Handle_Sl_YoYInflationTermStructure_Sg__asObservable(Handle< YoYInflationTermStructure > *self){
        return boost::shared_ptr<Observable>(*self);
    }
SWIGINTERN bool boost_shared_ptr_Sl_ZeroInflationTermStructure_Sg__isNull(boost::shared_ptr< ZeroInflationTermStructure > *self){
                return !(*self);
            }
SWIGINTERN boost::shared_ptr< Observable > boost_shared_ptr_Sl_ZeroInflationTermStructure_Sg__asObservable(boost::shared_ptr< ZeroInflationTermStructure > *self){
        return boost::shared_ptr<Observable>(*self);
    }
SWIGINTERN boost::shared_ptr< Observable > Handle_Sl_ZeroInflationTermStructure_Sg__asObservable(Handle< ZeroInflationTermStructure > *self){
        return boost::shared_ptr<Observable>(*self);
    }

#include <ql/indexes/inflationindex.hpp>
#include <ql/indexes/inflation/all.hpp>
using QuantLib::Region;
using QuantLib::CustomRegion;
using QuantLib::InflationIndex;
using QuantLib::ZeroInflationIndex;
using QuantLib::YoYInflationIndex;
typedef boost::shared_ptr<Index> InflationIndexPtr;
typedef boost::shared_ptr<Index> ZeroInflationIndexPtr;
typedef boost::shared_ptr<Index> YoYInflationIndexPtr;

SWIGINTERN bool InflationIndexPtr_interpolated(InflationIndexPtr const *self){
            return boost::dynamic_pointer_cast<InflationIndex>(*self)
                ->interpolated();
        }
SWIGINTERN Frequency InflationIndexPtr_frequency(InflationIndexPtr const *self){
            return boost::dynamic_pointer_cast<InflationIndex>(*self)
                ->frequency();
        }
SWIGINTERN Period InflationIndexPtr_availabilityLag(InflationIndexPtr const *self){
            return boost::dynamic_pointer_cast<InflationIndex>(*self)
                ->availabilityLag();
        }
SWIGINTERN Currency InflationIndexPtr_currency(InflationIndexPtr const *self){
            return boost::dynamic_pointer_cast<InflationIndex>(*self)
                ->currency();
        }
SWIGINTERN ZeroInflationIndexPtr *new_ZeroInflationIndexPtr__SWIG_0(std::string const &familyName,Region const &region,bool revised,bool interpolated,Frequency frequency,Period const &availabilityLag,Currency const &currency,Handle< ZeroInflationTermStructure > const &h=Handle< ZeroInflationTermStructure >()){
          return new ZeroInflationIndexPtr(
              new ZeroInflationIndex(familyName, region, revised, interpolated,
                                     frequency, availabilityLag, currency, h));
      }

using QuantLib::EUHICP;
typedef boost::shared_ptr<Index> EUHICPPtr;

SWIGINTERN EUHICPPtr *new_EUHICPPtr__SWIG_0(bool interpolated,Handle< ZeroInflationTermStructure > const &h=Handle< ZeroInflationTermStructure >()){
          return new EUHICPPtr(new EUHICP(interpolated,h));
      }

using QuantLib::EUHICPXT;
typedef boost::shared_ptr<Index> EUHICPXTPtr;

SWIGINTERN EUHICPXTPtr *new_EUHICPXTPtr__SWIG_0(bool interpolated,Handle< ZeroInflationTermStructure > const &h=Handle< ZeroInflationTermStructure >()){
          return new EUHICPXTPtr(new EUHICPXT(interpolated,h));
      }

using QuantLib::FRHICP;
typedef boost::shared_ptr<Index> FRHICPPtr;

SWIGINTERN FRHICPPtr *new_FRHICPPtr__SWIG_0(bool interpolated,Handle< ZeroInflationTermStructure > const &h=Handle< ZeroInflationTermStructure >()){
          return new FRHICPPtr(new FRHICP(interpolated,h));
      }

using QuantLib::UKRPI;
typedef boost::shared_ptr<Index> UKRPIPtr;

SWIGINTERN UKRPIPtr *new_UKRPIPtr__SWIG_0(bool interpolated,Handle< ZeroInflationTermStructure > const &h=Handle< ZeroInflationTermStructure >()){
          return new UKRPIPtr(new UKRPI(interpolated,h));
      }

using QuantLib::USCPI;
typedef boost::shared_ptr<Index> USCPIPtr;

SWIGINTERN USCPIPtr *new_USCPIPtr__SWIG_0(bool interpolated,Handle< ZeroInflationTermStructure > const &h=Handle< ZeroInflationTermStructure >()){
          return new USCPIPtr(new USCPI(interpolated,h));
      }

using QuantLib::ZACPI;
typedef boost::shared_ptr<Index> ZACPIPtr;

SWIGINTERN ZACPIPtr *new_ZACPIPtr__SWIG_0(bool interpolated,Handle< ZeroInflationTermStructure > const &h=Handle< ZeroInflationTermStructure >()){
          return new ZACPIPtr(new ZACPI(interpolated,h));
      }

using QuantLib::YYEUHICP;
typedef boost::shared_ptr<Index> YYEUHICPPtr;

SWIGINTERN YYEUHICPPtr *new_YYEUHICPPtr__SWIG_0(bool interpolated,Handle< YoYInflationTermStructure > const &h=Handle< YoYInflationTermStructure >()){
          return new YYEUHICPPtr(new YYEUHICP(interpolated,h));
      }

using QuantLib::YYEUHICPXT;
typedef boost::shared_ptr<Index> YYEUHICPXTPtr;

SWIGINTERN YYEUHICPXTPtr *new_YYEUHICPXTPtr__SWIG_0(bool interpolated,Handle< YoYInflationTermStructure > const &h=Handle< YoYInflationTermStructure >()){
          return new YYEUHICPXTPtr(new YYEUHICPXT(interpolated,h));
      }

using QuantLib::YYFRHICP;
typedef boost::shared_ptr<Index> YYFRHICPPtr;

SWIGINTERN YYFRHICPPtr *new_YYFRHICPPtr__SWIG_0(bool interpolated,Handle< YoYInflationTermStructure > const &h=Handle< YoYInflationTermStructure >()){
          return new YYFRHICPPtr(new YYFRHICP(interpolated,h));
      }

using QuantLib::YYUKRPI;
typedef boost::shared_ptr<Index> YYUKRPIPtr;

SWIGINTERN YYUKRPIPtr *new_YYUKRPIPtr__SWIG_0(bool interpolated,Handle< YoYInflationTermStructure > const &h=Handle< YoYInflationTermStructure >()){
          return new YYUKRPIPtr(new YYUKRPI(interpolated,h));
      }

using QuantLib::YYUSCPI;
typedef boost::shared_ptr<Index> YYUSCPIPtr;

SWIGINTERN YYUSCPIPtr *new_YYUSCPIPtr__SWIG_0(bool interpolated,Handle< YoYInflationTermStructure > const &h=Handle< YoYInflationTermStructure >()){
          return new YYUSCPIPtr(new YYUSCPI(interpolated,h));
      }

using QuantLib::YYZACPI;
typedef boost::shared_ptr<Index> YYZACPIPtr;

SWIGINTERN YYZACPIPtr *new_YYZACPIPtr__SWIG_0(bool interpolated,Handle< YoYInflationTermStructure > const &h=Handle< YoYInflationTermStructure >()){
          return new YYZACPIPtr(new YYZACPI(interpolated,h));
      }

    using QuantLib::CPI;


typedef QuantLib::BootstrapHelper<ZeroInflationTermStructure> ZeroHelper;
typedef QuantLib::BootstrapHelper<YoYInflationTermStructure> YoYHelper;

using QuantLib::ZeroCouponInflationSwapHelper;
typedef boost::shared_ptr<ZeroHelper> ZeroCouponInflationSwapHelperPtr;

using QuantLib::YearOnYearInflationSwapHelper;
typedef boost::shared_ptr<YoYHelper> YearOnYearInflationSwapHelperPtr;

SWIGINTERN bool boost_shared_ptr_Sl_ZeroHelper_Sg__isNull(boost::shared_ptr< ZeroHelper > *self){
                return !(*self);
            }
SWIGINTERN bool boost_shared_ptr_Sl_YoYHelper_Sg__isNull(boost::shared_ptr< YoYHelper > *self){
                return !(*self);
            }
SWIGINTERN boost::shared_ptr< ZeroHelper > std_vector_Sl_boost_shared_ptr_Sl_ZeroHelper_Sg__Sg__pop(std::vector< boost::shared_ptr< ZeroHelper > > *self){
                if (self->size() == 0)
                    throw std::out_of_range("pop from empty vector");
                boost::shared_ptr< ZeroHelper > x = self->back();
                self->pop_back();
                return x;
            }
SWIGINTERN boost::shared_ptr< ZeroHelper > &std_vector_Sl_boost_shared_ptr_Sl_ZeroHelper_Sg__Sg__get(std::vector< boost::shared_ptr< ZeroHelper > > *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_boost_shared_ptr_Sl_ZeroHelper_Sg__Sg__set(std::vector< boost::shared_ptr< ZeroHelper > > *self,int i,boost::shared_ptr< ZeroHelper > const &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");
            }
SWIGINTERN boost::shared_ptr< YoYHelper > std_vector_Sl_boost_shared_ptr_Sl_YoYHelper_Sg__Sg__pop(std::vector< boost::shared_ptr< YoYHelper > > *self){
                if (self->size() == 0)
                    throw std::out_of_range("pop from empty vector");
                boost::shared_ptr< YoYHelper > x = self->back();
                self->pop_back();
                return x;
            }
SWIGINTERN boost::shared_ptr< YoYHelper > &std_vector_Sl_boost_shared_ptr_Sl_YoYHelper_Sg__Sg__get(std::vector< boost::shared_ptr< YoYHelper > > *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_boost_shared_ptr_Sl_YoYHelper_Sg__Sg__set(std::vector< boost::shared_ptr< YoYHelper > > *self,int i,boost::shared_ptr< YoYHelper > const &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");
            }
SWIGINTERN ZeroCouponInflationSwapHelperPtr *new_ZeroCouponInflationSwapHelperPtr(Rate rate,Period const &lag,Date const &maturity,Calendar const &calendar,BusinessDayConvention bdc,DayCounter const &dayCounter,ZeroInflationIndexPtr const &index){
            Handle<Quote> quote(
                boost::shared_ptr<Quote>(new SimpleQuote(rate)));
            boost::shared_ptr<ZeroInflationIndex> zeroIndex =
                boost::dynamic_pointer_cast<ZeroInflationIndex>(index);
            return new ZeroCouponInflationSwapHelperPtr(
                new ZeroCouponInflationSwapHelper(quote,lag,maturity,
                                                  calendar,bdc,
                                                  dayCounter,zeroIndex));
        }
SWIGINTERN YearOnYearInflationSwapHelperPtr *new_YearOnYearInflationSwapHelperPtr(Rate rate,Period const &lag,Date const &maturity,Calendar const &calendar,BusinessDayConvention bdc,DayCounter const &dayCounter,YoYInflationIndexPtr const &index){
            Handle<Quote> quote(
                boost::shared_ptr<Quote>(new SimpleQuote(rate)));
            boost::shared_ptr<YoYInflationIndex> yoyIndex =
                boost::dynamic_pointer_cast<YoYInflationIndex>(index);
            return new YearOnYearInflationSwapHelperPtr(
                new YearOnYearInflationSwapHelper(quote,lag,maturity,
                                                  calendar,bdc,
                                                  dayCounter,yoyIndex));
        }

using QuantLib::PiecewiseZeroInflationCurve;
using QuantLib::PiecewiseYoYInflationCurve;


typedef boost::shared_ptr<ZeroInflationTermStructure> PiecewiseZeroInflationPtr;

SWIGINTERN PiecewiseZeroInflationPtr *new_PiecewiseZeroInflationPtr__SWIG_0(Date const &referenceDate,Calendar const &calendar,DayCounter const &dayCounter,Period const &lag,Frequency frequency,bool indexIsInterpolated,Rate baseRate,Handle< YieldTermStructure > const &nominalTS,std::vector< boost::shared_ptr< ZeroHelper > > const &instruments,Real accuracy=1.0e-12,Linear const &i=Linear()){
            return new PiecewiseZeroInflationPtr(
                new PiecewiseZeroInflationCurve<Linear>(
                                        referenceDate, calendar, dayCounter,
                                        lag, frequency, indexIsInterpolated,
                                        baseRate, nominalTS, instruments,
                                        accuracy, i));
        }
SWIGINTERN std::vector< Date > const &PiecewiseZeroInflationPtr_dates(PiecewiseZeroInflationPtr *self){
            typedef PiecewiseZeroInflationCurve<Linear> PiecewiseZeroInflation;
            return boost::dynamic_pointer_cast<PiecewiseZeroInflation>(*self)->dates();
        }
SWIGINTERN std::vector< Time > const &PiecewiseZeroInflationPtr_times(PiecewiseZeroInflationPtr *self){
            typedef PiecewiseZeroInflationCurve<Linear> PiecewiseZeroInflation;
            return boost::dynamic_pointer_cast<PiecewiseZeroInflation>(*self)->times();
        }
SWIGINTERN std::vector< std::pair< Date,Real > > PiecewiseZeroInflationPtr_nodes(PiecewiseZeroInflationPtr *self){
            typedef PiecewiseZeroInflationCurve<Linear> PiecewiseZeroInflation;
            return boost::dynamic_pointer_cast<PiecewiseZeroInflation>(*self)->nodes();
        }

typedef boost::shared_ptr<YoYInflationTermStructure> PiecewiseYoYInflationPtr;

SWIGINTERN PiecewiseYoYInflationPtr *new_PiecewiseYoYInflationPtr__SWIG_0(Date const &referenceDate,Calendar const &calendar,DayCounter const &dayCounter,Period const &lag,Frequency frequency,bool indexIsInterpolated,Rate baseRate,Handle< YieldTermStructure > const &nominalTS,std::vector< boost::shared_ptr< YoYHelper > > const &instruments,Real accuracy=1.0e-12,Linear const &i=Linear()){
            return new PiecewiseYoYInflationPtr(
                new PiecewiseYoYInflationCurve<Linear>(
                                        referenceDate, calendar, dayCounter,
                                        lag, frequency, indexIsInterpolated,
                                        baseRate, nominalTS, instruments,
                                        accuracy, i));
        }
SWIGINTERN std::vector< Date > const &PiecewiseYoYInflationPtr_dates(PiecewiseYoYInflationPtr *self){
            typedef PiecewiseYoYInflationCurve<Linear> PiecewiseYoYInflation;
            return boost::dynamic_pointer_cast<PiecewiseYoYInflation>(*self)->dates();
        }
SWIGINTERN std::vector< Time > const &PiecewiseYoYInflationPtr_times(PiecewiseYoYInflationPtr *self){
            typedef PiecewiseYoYInflationCurve<Linear> PiecewiseYoYInflation;
            return boost::dynamic_pointer_cast<PiecewiseYoYInflation>(*self)->times();
        }
SWIGINTERN std::vector< std::pair< Date,Real > > PiecewiseYoYInflationPtr_nodes(PiecewiseYoYInflationPtr *self){
            typedef PiecewiseYoYInflationCurve<Linear> PiecewiseYoYInflation;
            return boost::dynamic_pointer_cast<PiecewiseYoYInflation>(*self)->nodes();
        }


    Date inflationBaseDate(const Date& referenceDate,
                           const Period& observationLag,
                           Frequency frequency,
                           bool indexIsInterpolated) {
        if (indexIsInterpolated) {
            return referenceDate - observationLag;
        } else {
            return QuantLib::inflationPeriod(referenceDate - observationLag,
                                             frequency).first;
        }
    }



using QuantLib::ZeroCouponInflationSwap;
using QuantLib::YearOnYearInflationSwap;
typedef boost::shared_ptr<Instrument> ZeroCouponInflationSwapPtr;
typedef boost::shared_ptr<Instrument> YearOnYearInflationSwapPtr;

SWIGINTERN ZeroCouponInflationSwapPtr *new_ZeroCouponInflationSwapPtr__SWIG_0(ZeroCouponInflationSwap::Type type,Real nominal,Date const &start,Date const &maturity,Calendar const &calendar,BusinessDayConvention convention,DayCounter const &dayCounter,Rate fixedRate,ZeroInflationIndexPtr const &index,Period const &lag,bool adjustInfObsDates=false,Calendar infCalendar=Calendar(),BusinessDayConvention infConvention=Following){
            boost::shared_ptr<ZeroInflationIndex> zeroIndex =
                boost::dynamic_pointer_cast<ZeroInflationIndex>(index);
            return new ZeroCouponInflationSwapPtr(
                new ZeroCouponInflationSwap(type, nominal, start, maturity,
                                            calendar, convention, dayCounter,
                                            fixedRate, zeroIndex, lag,
                                            adjustInfObsDates,
                                            infCalendar, infConvention));
        }
SWIGINTERN Rate ZeroCouponInflationSwapPtr_fairRate(ZeroCouponInflationSwapPtr *self){
            return boost::dynamic_pointer_cast<ZeroCouponInflationSwap>(*self)
                ->fairRate();
        }
SWIGINTERN std::vector< boost::shared_ptr< CashFlow > > ZeroCouponInflationSwapPtr_fixedLeg(ZeroCouponInflationSwapPtr *self){
            return boost::dynamic_pointer_cast<ZeroCouponInflationSwap>(*self)
                ->fixedLeg();
        }
SWIGINTERN std::vector< boost::shared_ptr< CashFlow > > ZeroCouponInflationSwapPtr_inflationLeg(ZeroCouponInflationSwapPtr *self){
            return boost::dynamic_pointer_cast<ZeroCouponInflationSwap>(*self)
                ->inflationLeg();
        }
SWIGINTERN ZeroCouponInflationSwap::Type ZeroCouponInflationSwapPtr_type(ZeroCouponInflationSwapPtr *self){
            return boost::dynamic_pointer_cast<ZeroCouponInflationSwap>(*self)
                ->type();
        }
SWIGINTERN YearOnYearInflationSwapPtr *new_YearOnYearInflationSwapPtr__SWIG_0(YearOnYearInflationSwap::Type type,Real nominal,Schedule const &fixedSchedule,Rate fixedRate,DayCounter const &fixedDayCounter,Schedule const &yoySchedule,YoYInflationIndexPtr const &index,Period const &lag,Spread spread,DayCounter const &yoyDayCounter,Calendar const &paymentCalendar,BusinessDayConvention paymentConvention=Following){
            boost::shared_ptr<YoYInflationIndex> yoyIndex =
                boost::dynamic_pointer_cast<YoYInflationIndex>(index);
            return new YearOnYearInflationSwapPtr(
                new YearOnYearInflationSwap(type, nominal, fixedSchedule,
                                            fixedRate, fixedDayCounter,
                                            yoySchedule, yoyIndex, lag, spread,
                                            yoyDayCounter, paymentCalendar,
                                            paymentConvention));
        }
SWIGINTERN Rate YearOnYearInflationSwapPtr_fairRate(YearOnYearInflationSwapPtr *self){
            return boost::dynamic_pointer_cast<YearOnYearInflationSwap>(*self)
                ->fairRate();
        }

using QuantLib::YoYInflationCapFloor;
using QuantLib::YoYInflationCap;
using QuantLib::YoYInflationFloor;
using QuantLib::YoYInflationCollar;

typedef boost::shared_ptr<Instrument> YoYInflationCapFloorPtr;
typedef boost::shared_ptr<Instrument> YoYInflationCapPtr;
typedef boost::shared_ptr<Instrument> YoYInflationFloorPtr;
typedef boost::shared_ptr<Instrument> YoYInflationCollarPtr;

SWIGINTERN Volatility YoYInflationCapFloorPtr_impliedVolatility__SWIG_0(YoYInflationCapFloorPtr const *self,Real price,Handle< YoYInflationTermStructure > const &curve,Volatility guess,Real accuracy=1.0e-4,Size maxEvaluations=100,Volatility minVol=1.0e-7,Volatility maxVol=4.0){
             return boost::dynamic_pointer_cast<YoYInflationCapFloor>(*self)->
                 impliedVolatility(price, curve, guess, accuracy,
                                   maxEvaluations, minVol, maxVol);
         }
SWIGINTERN YoYInflationCapPtr *new_YoYInflationCapPtr(std::vector< boost::shared_ptr< CashFlow > > const &leg,std::vector< Rate > const &capRates){
            return new YoYInflationCapPtr(new YoYInflationCap(leg,capRates));
        }
SWIGINTERN YoYInflationFloorPtr *new_YoYInflationFloorPtr(std::vector< boost::shared_ptr< CashFlow > > const &leg,std::vector< Rate > const &floorRates){
            return new YoYInflationFloorPtr(
                                       new YoYInflationFloor(leg,floorRates));
        }
SWIGINTERN YoYInflationCollarPtr *new_YoYInflationCollarPtr(std::vector< boost::shared_ptr< CashFlow > > const &leg,std::vector< Rate > const &capRates,std::vector< Rate > const &floorRates){
            return new YoYInflationCollarPtr(
                             new YoYInflationCollar(leg,capRates,floorRates));
        }

using QuantLib::ShortRateModel;

SWIGINTERN bool boost_shared_ptr_Sl_ShortRateModel_Sg__isNull(boost::shared_ptr< ShortRateModel > *self){
                return !(*self);
            }
SWIGINTERN boost::shared_ptr< Observable > boost_shared_ptr_Sl_ShortRateModel_Sg__asObservable(boost::shared_ptr< ShortRateModel > *self){
        return boost::shared_ptr<Observable>(*self);
    }
SWIGINTERN boost::shared_ptr< Observable > Handle_Sl_ShortRateModel_Sg__asObservable(Handle< ShortRateModel > *self){
        return boost::shared_ptr<Observable>(*self);
    }

    using QuantLib::Vasicek;
    using QuantLib::HullWhite;
    using QuantLib::BlackKarasinski;
    using QuantLib::G2;
    typedef boost::shared_ptr<ShortRateModel> VasicekPtr;
    typedef boost::shared_ptr<ShortRateModel> HullWhitePtr;
    typedef boost::shared_ptr<ShortRateModel> BlackKarasinskiPtr;
    typedef boost::shared_ptr<ShortRateModel> G2Ptr;

SWIGINTERN VasicekPtr *new_VasicekPtr__SWIG_0(Rate r0=0.05,Real a=0.1,Real b=0.05,Real sigma=0.01,Real lambda=0.0){
            return new VasicekPtr(new Vasicek(r0, a, b, sigma, lambda));
        }
SWIGINTERN DiscountFactor VasicekPtr_discount(VasicekPtr const *self,Time t){
            return boost::dynamic_pointer_cast<Vasicek>(*self)->discount(t);
        }
SWIGINTERN Real VasicekPtr_discountBond(VasicekPtr const *self,Time now,Time maturity,Rate rate){
            return boost::dynamic_pointer_cast<Vasicek>(*self)->discountBond(now, maturity, rate);
        }
SWIGINTERN HullWhitePtr *new_HullWhitePtr__SWIG_0(Handle< YieldTermStructure > const &termStructure,Real a=0.1,Real sigma=0.01){
            return new HullWhitePtr(
                new HullWhite(termStructure, a, sigma));
        }
SWIGINTERN DiscountFactor HullWhitePtr_discount(HullWhitePtr const *self,Time t){
            return boost::dynamic_pointer_cast<HullWhite>(*self)->discount(t);
        }
SWIGINTERN Real HullWhitePtr_discountBond(HullWhitePtr const *self,Time now,Time maturity,Rate rate){
            return boost::dynamic_pointer_cast<HullWhite>(*self)->
                                            discountBond(now, maturity, rate);  
        }
SWIGINTERN Rate HullWhitePtr_convexityBias(Real futurePrice,Time t,Time T,Real sigma,Real a){
            return QuantLib::HullWhite::convexityBias(futurePrice, t, T, 
                                                      sigma, a);
        }
SWIGINTERN BlackKarasinskiPtr *new_BlackKarasinskiPtr__SWIG_0(Handle< YieldTermStructure > const &termStructure,Real a=0.1,Real sigma=0.1){
            return new BlackKarasinskiPtr(
                new BlackKarasinski(termStructure, a, sigma));
        }
SWIGINTERN G2Ptr *new_G2Ptr__SWIG_0(Handle< YieldTermStructure > const &termStructure,Real a=0.1,Real sigma=0.01,Real b=0.1,Real eta=0.01,Real rho=-0.75){
            return new G2Ptr(new G2(termStructure, a, sigma, b, eta, rho));
        }
SWIGINTERN DiscountFactor G2Ptr_discount(G2Ptr const *self,Time t){
            return boost::dynamic_pointer_cast<G2>(*self)->discount(t);
        }
SWIGINTERN Real G2Ptr_discountBond(G2Ptr const *self,Time t,Time T,Rate x,Rate y){
            return boost::dynamic_pointer_cast<G2>(*self)->discountBond(t, T, x, y);
        }

using QuantLib::JamshidianSwaptionEngine;
using QuantLib::TreeSwaptionEngine;
using QuantLib::AnalyticCapFloorEngine;
using QuantLib::TreeCapFloorEngine;
using QuantLib::G2SwaptionEngine;
using QuantLib::FdG2SwaptionEngine;
using QuantLib::FdHullWhiteSwaptionEngine;
typedef boost::shared_ptr<PricingEngine> JamshidianSwaptionEnginePtr;
typedef boost::shared_ptr<PricingEngine> TreeSwaptionEnginePtr;
typedef boost::shared_ptr<PricingEngine> AnalyticCapFloorEnginePtr;
typedef boost::shared_ptr<PricingEngine> TreeCapFloorEnginePtr;
typedef boost::shared_ptr<PricingEngine> G2SwaptionEnginePtr;
typedef boost::shared_ptr<PricingEngine> FdG2SwaptionEnginePtr;
typedef boost::shared_ptr<PricingEngine> FdHullWhiteSwaptionEnginePtr;

SWIGINTERN JamshidianSwaptionEnginePtr *new_JamshidianSwaptionEnginePtr__SWIG_0(boost::shared_ptr< ShortRateModel > const &model,Handle< YieldTermStructure > const &termStructure=Handle< YieldTermStructure >()){
            using QuantLib::OneFactorAffineModel;
            boost::shared_ptr<OneFactorAffineModel> m =
                 boost::dynamic_pointer_cast<OneFactorAffineModel>(model);
            QL_REQUIRE(model, "affine model required");
            return new JamshidianSwaptionEnginePtr(
                               new JamshidianSwaptionEngine(m,termStructure));
        }
SWIGINTERN TreeSwaptionEnginePtr *new_TreeSwaptionEnginePtr__SWIG_0(boost::shared_ptr< ShortRateModel > const &model,Size timeSteps,Handle< YieldTermStructure > const &termStructure=Handle< YieldTermStructure >()){
            return new TreeSwaptionEnginePtr(
                       new TreeSwaptionEngine(model,timeSteps,termStructure));
        }
SWIGINTERN TreeSwaptionEnginePtr *new_TreeSwaptionEnginePtr__SWIG_2(boost::shared_ptr< ShortRateModel > const &model,TimeGrid const &grid,Handle< YieldTermStructure > const &termStructure=Handle< YieldTermStructure >()){
            return new TreeSwaptionEnginePtr(
                            new TreeSwaptionEngine(model,grid,termStructure));
        }
SWIGINTERN TreeSwaptionEnginePtr *new_TreeSwaptionEnginePtr__SWIG_4(Handle< ShortRateModel > const &model,Size timeSteps,Handle< YieldTermStructure > const &termStructure=Handle< YieldTermStructure >()){
            return new TreeSwaptionEnginePtr(
                       new TreeSwaptionEngine(model,timeSteps,termStructure));
        }
SWIGINTERN AnalyticCapFloorEnginePtr *new_AnalyticCapFloorEnginePtr__SWIG_0(boost::shared_ptr< ShortRateModel > const &model,Handle< YieldTermStructure > const &termStructure=Handle< YieldTermStructure >()){
            using QuantLib::OneFactorAffineModel;
            boost::shared_ptr<OneFactorAffineModel> m =
                 boost::dynamic_pointer_cast<OneFactorAffineModel>(model);
            QL_REQUIRE(model, "affine model required");
            return new AnalyticCapFloorEnginePtr(
                                 new AnalyticCapFloorEngine(m,termStructure));
        }
SWIGINTERN TreeCapFloorEnginePtr *new_TreeCapFloorEnginePtr__SWIG_0(boost::shared_ptr< ShortRateModel > const &model,Size timeSteps,Handle< YieldTermStructure > const &termStructure=Handle< YieldTermStructure >()){
            return new TreeCapFloorEnginePtr(
                       new TreeCapFloorEngine(model,timeSteps,termStructure));
        }
SWIGINTERN TreeCapFloorEnginePtr *new_TreeCapFloorEnginePtr__SWIG_2(boost::shared_ptr< ShortRateModel > const &model,TimeGrid const &grid,Handle< YieldTermStructure > const &termStructure=Handle< YieldTermStructure >()){
            return new TreeCapFloorEnginePtr(
                            new TreeCapFloorEngine(model,grid,termStructure));
        }
SWIGINTERN G2SwaptionEnginePtr *new_G2SwaptionEnginePtr(boost::shared_ptr< ShortRateModel > const &model,Real range,Size intervals){
            boost::shared_ptr<G2> g2 =
                boost::dynamic_pointer_cast<G2>(model);
            return new G2SwaptionEnginePtr(
                                    new G2SwaptionEngine(g2,range,intervals));
        }
SWIGINTERN FdG2SwaptionEnginePtr *new_FdG2SwaptionEnginePtr__SWIG_0(boost::shared_ptr< ShortRateModel > const &model,Size tGrid=100,Size xGrid=50,Size yGrid=50,Size dampingSteps=0,Real invEps=1e-5,FdmSchemeDesc const &schemeDesc=FdmSchemeDesc::Hundsdorfer()){
            boost::shared_ptr<G2> g2 =
                boost::dynamic_pointer_cast<G2>(model);
            return new FdG2SwaptionEnginePtr(
                                    new FdG2SwaptionEngine(g2,tGrid,xGrid,yGrid,dampingSteps,invEps,schemeDesc));
        }
SWIGINTERN FdHullWhiteSwaptionEnginePtr *new_FdHullWhiteSwaptionEnginePtr__SWIG_0(boost::shared_ptr< ShortRateModel > const &model,Size tGrid=100,Size xGrid=100,Size dampingSteps=0,Real invEps=1e-5,FdmSchemeDesc const &schemeDesc=FdmSchemeDesc::Douglas()){
            boost::shared_ptr<HullWhite> hw =
                boost::dynamic_pointer_cast<HullWhite>(model);
            return new FdHullWhiteSwaptionEnginePtr(
                                    new FdHullWhiteSwaptionEngine(hw,tGrid,xGrid,dampingSteps,invEps,schemeDesc));
        }

using QuantLib::Bond;
using QuantLib::ZeroCouponBond;
using QuantLib::FixedRateBond;
using QuantLib::FloatingRateBond;
using QuantLib::DiscountingBondEngine;

typedef boost::shared_ptr<Instrument> BondPtr;
typedef boost::shared_ptr<Instrument> ZeroCouponBondPtr;
typedef boost::shared_ptr<Instrument> FixedRateBondPtr;
typedef boost::shared_ptr<Instrument> FloatingRateBondPtr;
typedef boost::shared_ptr<PricingEngine> DiscountingBondEnginePtr;

SWIGINTERN BondPtr *new_BondPtr__SWIG_0(Natural settlementDays,Calendar const &calendar,Real faceAmount,Date const &maturityDate,Date const &issueDate=Date(),Leg const &cashflows=Leg()){
            return new BondPtr(new Bond(settlementDays,
                                        calendar,
                                        faceAmount,
                                        maturityDate,
                                        issueDate,
                                        cashflows));
        }
SWIGINTERN Rate BondPtr_nextCouponRate__SWIG_0(BondPtr *self,Date const &d=Date()){
            return boost::dynamic_pointer_cast<Bond>(*self)
                ->nextCouponRate();
        }
SWIGINTERN Rate BondPtr_previousCouponRate__SWIG_0(BondPtr *self,Date const &d=Date()){
            return boost::dynamic_pointer_cast<Bond>(*self)
                ->previousCouponRate();
        }
SWIGINTERN Natural BondPtr_settlementDays(BondPtr const *self){
            return boost::dynamic_pointer_cast<Bond>(*self)
                ->settlementDays();
        }
SWIGINTERN Date BondPtr_settlementDate__SWIG_0(BondPtr *self,Date d=Date()){
            return boost::dynamic_pointer_cast<Bond>(*self)->settlementDate(d);
        }
SWIGINTERN Date BondPtr_startDate(BondPtr const *self){
            return boost::dynamic_pointer_cast<Bond>(*self)->startDate();
        }
SWIGINTERN Date BondPtr_maturityDate(BondPtr const *self){
            return boost::dynamic_pointer_cast<Bond>(*self)->maturityDate();
        }
SWIGINTERN Date BondPtr_issueDate(BondPtr const *self){
            return boost::dynamic_pointer_cast<Bond>(*self)->issueDate();
        }
SWIGINTERN std::vector< boost::shared_ptr< CashFlow > > BondPtr_cashflows(BondPtr const *self){
            return boost::dynamic_pointer_cast<Bond>(*self)->cashflows();
        }
SWIGINTERN std::vector< boost::shared_ptr< CashFlow > > BondPtr_redemptions(BondPtr const *self){
            return boost::dynamic_pointer_cast<Bond>(*self)->redemptions();
        }
SWIGINTERN boost::shared_ptr< CashFlow > BondPtr_redemption(BondPtr const *self){
            return boost::dynamic_pointer_cast<Bond>(*self)->redemption();
        }
SWIGINTERN Calendar BondPtr_calendar(BondPtr const *self){
            return boost::dynamic_pointer_cast<Bond>(*self)->calendar();
        }
SWIGINTERN std::vector< Real > BondPtr_notionals(BondPtr const *self){
            return boost::dynamic_pointer_cast<Bond>(*self)->notionals();
        }
SWIGINTERN Real BondPtr_notional__SWIG_0(BondPtr const *self,Date d=Date()){
            return boost::dynamic_pointer_cast<Bond>(*self)->notional(d);
        }
SWIGINTERN Real BondPtr_cleanPrice__SWIG_0(BondPtr *self){
            return boost::dynamic_pointer_cast<Bond>(*self)->cleanPrice();
        }
SWIGINTERN Real BondPtr_cleanPrice__SWIG_1(BondPtr *self,Rate yield,DayCounter const &dc,Compounding compounding,Frequency frequency,Date const &settlement=Date()){
            return boost::dynamic_pointer_cast<Bond>(*self)
                ->cleanPrice(yield,dc, compounding, frequency, settlement);
        }
SWIGINTERN Real BondPtr_dirtyPrice__SWIG_0(BondPtr *self){
            return boost::dynamic_pointer_cast<Bond>(*self)->dirtyPrice();
        }
SWIGINTERN Real BondPtr_dirtyPrice__SWIG_1(BondPtr *self,Rate yield,DayCounter const &dc,Compounding compounding,Frequency frequency,Date const &settlement=Date()){
            return boost::dynamic_pointer_cast<Bond>(*self)
                ->dirtyPrice(yield,dc, compounding,
                             frequency, settlement);
        }
SWIGINTERN Real BondPtr_yield__SWIG_0(BondPtr *self,DayCounter const &dc,Compounding compounding,Frequency freq,Real accuracy=1.0e-8,Size maxEvaluations=100){
            return boost::dynamic_pointer_cast<Bond>(*self)
                ->yield(dc,compounding,freq,accuracy,maxEvaluations);
        }
SWIGINTERN Real BondPtr_yield__SWIG_3(BondPtr *self,Real cleanPrice,DayCounter const &dc,Compounding compounding,Frequency freq,Date const &settlement=Date(),Real accuracy=1.0e-8,Size maxEvaluations=100){
            return boost::dynamic_pointer_cast<Bond>(*self)
                ->yield(cleanPrice,dc,compounding,freq,
                        settlement,accuracy,maxEvaluations);
        }
SWIGINTERN Real BondPtr_accruedAmount__SWIG_0(BondPtr *self,Date const &settlement=Date()){
            return boost::dynamic_pointer_cast<Bond>(*self)
                ->accruedAmount(settlement);
        }
SWIGINTERN Real BondPtr_settlementValue__SWIG_0(BondPtr const *self){
            return boost::dynamic_pointer_cast<Bond>(*self)
                ->settlementValue();
        }
SWIGINTERN Real BondPtr_settlementValue__SWIG_1(BondPtr const *self,Real cleanPrice){
            return boost::dynamic_pointer_cast<Bond>(*self)
                ->settlementValue(cleanPrice);
        }


    Real cleanPriceFromZSpread(
                   const BondPtr& bond,
                   const boost::shared_ptr<YieldTermStructure>& discountCurve,
                   Spread zSpread,
                   const DayCounter& dc,
                   Compounding compounding,
                   Frequency freq,
                   const Date& settlementDate = Date()) {
        return QuantLib::BondFunctions::cleanPrice(
                                  *(boost::dynamic_pointer_cast<Bond>(bond)),
                                  discountCurve,
                                  zSpread, dc, compounding,
                                  freq, settlementDate);
    }


SWIGINTERN ZeroCouponBondPtr *new_ZeroCouponBondPtr__SWIG_0(Natural settlementDays,Calendar const &calendar,Real faceAmount,Date const &maturityDate,BusinessDayConvention paymentConvention=QuantLib::Following,Real redemption=100.0,Date const &issueDate=Date()){
            return new ZeroCouponBondPtr(
                new ZeroCouponBond(settlementDays, calendar, faceAmount,
                                   maturityDate,
                                   paymentConvention, redemption,
                                   issueDate));
        }
SWIGINTERN FixedRateBondPtr *new_FixedRateBondPtr__SWIG_0(Integer settlementDays,Real faceAmount,Schedule const &schedule,std::vector< Rate > const &coupons,DayCounter const &paymentDayCounter,BusinessDayConvention paymentConvention=QuantLib::Following,Real redemption=100.0,Date issueDate=Date(),Calendar const &paymentCalendar=Calendar(),Period const &exCouponPeriod=Period(),Calendar const &exCouponCalendar=Calendar(),BusinessDayConvention exCouponConvention=Unadjusted,bool exCouponEndOfMonth=false){
            return new FixedRateBondPtr(
                new FixedRateBond(settlementDays, faceAmount,
                                  schedule, coupons, paymentDayCounter,
                                  paymentConvention, redemption,
                                  issueDate, paymentCalendar,
                                  exCouponPeriod, exCouponCalendar,
                                  exCouponConvention, exCouponEndOfMonth));
        }
SWIGINTERN FixedRateBondPtr *new_FixedRateBondPtr__SWIG_9(Integer settlementDays,Real faceAmount,Schedule const &schedule,std::vector< InterestRate > const &coupons,BusinessDayConvention paymentConvention=Following,Real redemption=100.0,Date const &issueDate=Date(),Calendar const &paymentCalendar=Calendar(),Period const &exCouponPeriod=Period(),Calendar const &exCouponCalendar=Calendar(),BusinessDayConvention exCouponConvention=Unadjusted,bool exCouponEndOfMonth=false){
	       return new FixedRateBondPtr(
		      new FixedRateBond(settlementDays, faceAmount,
		                  schedule, coupons, paymentConvention,
		                  redemption, issueDate, paymentCalendar,
		                  exCouponPeriod, exCouponCalendar,
		                  exCouponConvention, exCouponEndOfMonth));
		}
SWIGINTERN Frequency FixedRateBondPtr_frequency(FixedRateBondPtr const *self){
            return boost::dynamic_pointer_cast<FixedRateBond>(*self)
                ->frequency();
        }
SWIGINTERN DayCounter FixedRateBondPtr_dayCounter(FixedRateBondPtr const *self){
            return boost::dynamic_pointer_cast<FixedRateBond>(*self)
                ->dayCounter();
        }
SWIGINTERN FloatingRateBondPtr *new_FloatingRateBondPtr__SWIG_0(Size settlementDays,Real faceAmount,Schedule const &schedule,IborIndexPtr const &index,DayCounter const &paymentDayCounter,BusinessDayConvention paymentConvention=Following,Size fixingDays=Null< Size >(),std::vector< Real > const &gearings=std::vector< Real >(),std::vector< Spread > const &spreads=std::vector< Spread >(),std::vector< Rate > const &caps=std::vector< Rate >(),std::vector< Rate > const &floors=std::vector< Rate >(),bool inArrears=false,Real redemption=100.0,Date const &issueDate=Date()){
            boost::shared_ptr<IborIndex> libor =
                boost::dynamic_pointer_cast<IborIndex>(index);
            return new FloatingRateBondPtr(
                new FloatingRateBond(settlementDays,
                                     faceAmount,
                                     schedule,
                                     libor,
                                     paymentDayCounter,
                                     paymentConvention,
                                     fixingDays,
                                     gearings,
                                     spreads,
                                     caps,
                                     floors,
                                     inArrears,
                                     redemption,
                                     issueDate));
        }

using QuantLib::CmsRateBond;
typedef boost::shared_ptr<Instrument> CmsRateBondPtr;

SWIGINTERN CmsRateBondPtr *new_CmsRateBondPtr__SWIG_0(Size settlementDays,Real faceAmount,Schedule const &schedule,SwapIndexPtr const &index,DayCounter const &paymentDayCounter,BusinessDayConvention paymentConvention,Natural fixingDays,std::vector< Real > const &gearings,std::vector< Spread > const &spreads,std::vector< Rate > const &caps,std::vector< Rate > const &floors,bool inArrears=false,Real redemption=100.0,Date const &issueDate=Date()){
            boost::shared_ptr<SwapIndex> swap =
                boost::dynamic_pointer_cast<SwapIndex>(index);
            return new CmsRateBondPtr(
                new CmsRateBond(settlementDays,
                                faceAmount,
                                schedule,
                                swap,
                                paymentDayCounter,
                                paymentConvention,
                                fixingDays,
                                gearings,
                                spreads,
                                caps,
                                floors,
                                inArrears,
                                redemption,
                                issueDate));
        }
SWIGINTERN DiscountingBondEnginePtr *new_DiscountingBondEnginePtr(Handle< YieldTermStructure > const &discountCurve){
            return new DiscountingBondEnginePtr(
                                    new DiscountingBondEngine(discountCurve));
        }

using QuantLib::CallableBond;
using QuantLib::CallableFixedRateBond;
using QuantLib::TreeCallableFixedRateBondEngine;
using QuantLib::BlackCallableFixedRateBondEngine;
typedef boost::shared_ptr<Instrument> CallableFixedRateBondPtr;
typedef boost::shared_ptr<PricingEngine> TreeCallableFixedRateBondEnginePtr;
typedef boost::shared_ptr<PricingEngine> BlackCallableFixedRateBondEnginePtr;

SWIGINTERN CallableFixedRateBondPtr *new_CallableFixedRateBondPtr(Integer settlementDays,Real faceAmount,Schedule const &schedule,std::vector< Rate > const &coupons,DayCounter const &accrualDayCounter,BusinessDayConvention paymentConvention,Real redemption,Date issueDate,std::vector< boost::shared_ptr< Callability > > const &putCallSchedule){
            return new CallableFixedRateBondPtr(
                new CallableFixedRateBond(settlementDays, faceAmount,
                                          schedule, coupons, accrualDayCounter,
                                          paymentConvention, redemption,
                                          issueDate, putCallSchedule));
        }
SWIGINTERN Real CallableFixedRateBondPtr_OAS__SWIG_0(CallableFixedRateBondPtr *self,Real cleanPrice,Handle< YieldTermStructure > const &engineTS,DayCounter const &dc,Compounding compounding,Frequency freq,Date const &settlementDate=Date(),Real accuracy=1e-10,Size maxIterations=100,Spread guess=0.0){
            return boost::dynamic_pointer_cast<CallableBond>(*self)
                ->OAS(cleanPrice,
                      engineTS,
                      dc, compounding, freq, settlementDate,
                      accuracy,
                      maxIterations,
                      guess);
        }
SWIGINTERN Real CallableFixedRateBondPtr_cleanPriceOAS__SWIG_0(CallableFixedRateBondPtr *self,Real oas,Handle< YieldTermStructure > const &engineTS,DayCounter const &dayCounter,Compounding compounding,Frequency frequency,Date settlementDate=Date()){
            return boost::dynamic_pointer_cast<CallableBond>(*self)
                ->cleanPriceOAS(oas,
                                engineTS,
                                dayCounter,
                                compounding,
                                frequency,
                                settlementDate);
        }
SWIGINTERN Real CallableFixedRateBondPtr_effectiveDuration__SWIG_0(CallableFixedRateBondPtr *self,Real oas,Handle< YieldTermStructure > const &engineTS,DayCounter const &dayCounter,Compounding compounding,Frequency frequency,Real bump=2e-4){
            return boost::dynamic_pointer_cast<CallableBond>(*self)
                ->effectiveDuration(oas,
                                    engineTS,
                                    dayCounter,
                                    compounding,
                                    frequency,
                                    bump);
        }
SWIGINTERN Real CallableFixedRateBondPtr_effectiveConvexity__SWIG_0(CallableFixedRateBondPtr *self,Real oas,Handle< YieldTermStructure > const &engineTS,DayCounter const &dayCounter,Compounding compounding,Frequency frequency,Real bump=2e-4){
            return boost::dynamic_pointer_cast<CallableBond>(*self)
                ->effectiveConvexity(oas,
                                     engineTS,
                                     dayCounter,
                                     compounding,
                                     frequency,
                                     bump);
        }
SWIGINTERN TreeCallableFixedRateBondEnginePtr *new_TreeCallableFixedRateBondEnginePtr__SWIG_0(boost::shared_ptr< ShortRateModel > const &model,Size timeSteps,Handle< YieldTermStructure > const &termStructure=Handle< YieldTermStructure >()){
            return new TreeCallableFixedRateBondEnginePtr(
                new TreeCallableFixedRateBondEngine(model, timeSteps,
                                                    termStructure));
        }
SWIGINTERN TreeCallableFixedRateBondEnginePtr *new_TreeCallableFixedRateBondEnginePtr__SWIG_2(boost::shared_ptr< ShortRateModel > const &model,TimeGrid const &grid,Handle< YieldTermStructure > const &termStructure=Handle< YieldTermStructure >()){
            return new TreeCallableFixedRateBondEnginePtr(
                new TreeCallableFixedRateBondEngine(model, grid,
                                                    termStructure));
        }
SWIGINTERN BlackCallableFixedRateBondEnginePtr *new_BlackCallableFixedRateBondEnginePtr(Handle< Quote > const &fwdYieldVol,Handle< YieldTermStructure > const &discountCurve){
            return new BlackCallableFixedRateBondEnginePtr(
                new BlackCallableFixedRateBondEngine(fwdYieldVol, discountCurve));
        }

using QuantLib::CPIBond;
typedef boost::shared_ptr<Instrument> CPIBondPtr;

SWIGINTERN CPIBondPtr *new_CPIBondPtr__SWIG_0(Natural settlementDays,Real faceAmount,bool growthOnly,Real baseCPI,Period const &observationLag,ZeroInflationIndexPtr const &cpiIndex,CPI::InterpolationType observationInterpolation,Schedule const &schedule,std::vector< Rate > const &coupons,DayCounter const &accrualDayCounter,BusinessDayConvention paymentConvention=ModifiedFollowing,Date const &issueDate=Date(),Calendar const &paymentCalendar=Calendar(),Period const &exCouponPeriod=Period(),Calendar const &exCouponCalendar=Calendar(),BusinessDayConvention exCouponConvention=Unadjusted,bool exCouponEndOfMonth=false){
            boost::shared_ptr<ZeroInflationIndex> zeroIndex =
                boost::dynamic_pointer_cast<ZeroInflationIndex>(cpiIndex);
            return new CPIBondPtr(
                new CPIBond(settlementDays, faceAmount, growthOnly, baseCPI,
                            observationLag, zeroIndex, observationInterpolation,
                            schedule, coupons, accrualDayCounter,
                            paymentConvention, issueDate, paymentCalendar,
                            exCouponPeriod, exCouponCalendar,
                            exCouponConvention, exCouponEndOfMonth));
        }

using QuantLib::BondFunctions;

SWIGINTERN Date BondFunctions_startDate(BondPtr const &bond){
            return QuantLib::BondFunctions::startDate(
                    *(boost::dynamic_pointer_cast<Bond>(bond)));
        }
SWIGINTERN Date BondFunctions_maturityDate(BondPtr const &bond){
            return QuantLib::BondFunctions::maturityDate(
                    *(boost::dynamic_pointer_cast<Bond>(bond)));
        }
SWIGINTERN bool BondFunctions_isTradable__SWIG_0(BondPtr const &bond,Date settlementDate=Date()){
            return QuantLib::BondFunctions::isTradable(
                    *(boost::dynamic_pointer_cast<Bond>(bond)),
                    settlementDate);
        }
SWIGINTERN Date BondFunctions_previousCashFlowDate__SWIG_0(BondPtr const &bond,Date refDate=Date()){
            return QuantLib::BondFunctions::previousCashFlowDate(
                    *(boost::dynamic_pointer_cast<Bond>(bond)),
                    refDate);
        }
SWIGINTERN Date BondFunctions_nextCashFlowDate__SWIG_0(BondPtr const &bond,Date refDate=Date()){
            return QuantLib::BondFunctions::nextCashFlowDate(
                    *(boost::dynamic_pointer_cast<Bond>(bond)),
                    refDate);
        }
SWIGINTERN Real BondFunctions_previousCashFlowAmount__SWIG_0(BondPtr const &bond,Date refDate=Date()){
            return QuantLib::BondFunctions::previousCashFlowAmount(
                    *(boost::dynamic_pointer_cast<Bond>(bond)),
                    refDate);
        }
SWIGINTERN Real BondFunctions_nextCashFlowAmount__SWIG_0(BondPtr const &bond,Date refDate=Date()){
            return QuantLib::BondFunctions::nextCashFlowAmount(
                    *(boost::dynamic_pointer_cast<Bond>(bond)),
                    refDate);
        }
SWIGINTERN Rate BondFunctions_previousCouponRate__SWIG_0(BondPtr const &bond,Date settlementDate=Date()){
            return QuantLib::BondFunctions::previousCouponRate(
                    *(boost::dynamic_pointer_cast<Bond>(bond)),
                    settlementDate);
        }
SWIGINTERN Rate BondFunctions_nextCouponRate__SWIG_0(BondPtr const &bond,Date settlementDate=Date()){
            return QuantLib::BondFunctions::nextCouponRate(
                    *(boost::dynamic_pointer_cast<Bond>(bond)),
                    settlementDate);
        }
SWIGINTERN Date BondFunctions_accrualStartDate__SWIG_0(BondPtr const &bond,Date settlementDate=Date()){
            return QuantLib::BondFunctions::accrualStartDate(
                    *(boost::dynamic_pointer_cast<Bond>(bond)),
                    settlementDate);
        }
SWIGINTERN Date BondFunctions_accrualEndDate__SWIG_0(BondPtr const &bond,Date settlementDate=Date()){
            return QuantLib::BondFunctions::accrualEndDate(
                    *(boost::dynamic_pointer_cast<Bond>(bond)),
                    settlementDate);
        }
SWIGINTERN Time BondFunctions_accrualPeriod__SWIG_0(BondPtr const &bond,Date settlementDate=Date()){
            return QuantLib::BondFunctions::accrualPeriod(
                    *(boost::dynamic_pointer_cast<Bond>(bond)),
                    settlementDate);
        }
SWIGINTERN BigInteger BondFunctions_accrualDays__SWIG_0(BondPtr const &bond,Date settlementDate=Date()){
            return QuantLib::BondFunctions::accrualDays(
                    *(boost::dynamic_pointer_cast<Bond>(bond)),
                    settlementDate);
        }
SWIGINTERN Time BondFunctions_accruedPeriod__SWIG_0(BondPtr const &bond,Date settlementDate=Date()){
            return QuantLib::BondFunctions::accruedPeriod(
                *(boost::dynamic_pointer_cast<Bond>(bond)),
                settlementDate);
        }
SWIGINTERN BigInteger BondFunctions_accruedDays__SWIG_0(BondPtr const &bond,Date settlementDate=Date()){
            return QuantLib::BondFunctions::accruedDays(
                *(boost::dynamic_pointer_cast<Bond>(bond)),
                settlementDate);
        }
SWIGINTERN Real BondFunctions_accruedAmount__SWIG_0(BondPtr const &bond,Date settlementDate=Date()){

            return QuantLib::BondFunctions::accruedAmount(
                *(boost::dynamic_pointer_cast<Bond>(bond)), 
                settlementDate);
        }
SWIGINTERN Real BondFunctions_cleanPrice__SWIG_0(BondPtr const &bond,boost::shared_ptr< YieldTermStructure > const &discountCurve,Date settlementDate=Date()){
            return QuantLib::BondFunctions::cleanPrice(
                    *(boost::dynamic_pointer_cast<Bond>(bond)),
                    *discountCurve,
                    settlementDate);
        }
SWIGINTERN Real BondFunctions_bps__SWIG_0(BondPtr const &bond,boost::shared_ptr< YieldTermStructure > const &discountCurve,Date settlementDate=Date()){
            return QuantLib::BondFunctions::bps(
                    *(boost::dynamic_pointer_cast<Bond>(bond)),
                    *discountCurve,
                    settlementDate);
        }
SWIGINTERN Rate BondFunctions_atmRate__SWIG_0(BondPtr const &bond,boost::shared_ptr< YieldTermStructure > const &discountCurve,Date settlementDate=Date(),Real cleanPrice=Null< Real >()){
            return QuantLib::BondFunctions::atmRate(
                    *(boost::dynamic_pointer_cast<Bond>(bond)),
                    *discountCurve,
                    settlementDate,
                    cleanPrice);
        }
SWIGINTERN Real BondFunctions_cleanPrice__SWIG_2(BondPtr const &bond,InterestRate const &yield,Date settlementDate=Date()){
            return QuantLib::BondFunctions::cleanPrice(
                    *(boost::dynamic_pointer_cast<Bond>(bond)),
                    yield,
                    settlementDate);
        }
SWIGINTERN Real BondFunctions_cleanPrice__SWIG_4(BondPtr const &bond,Rate yield,DayCounter const &dayCounter,Compounding compounding,Frequency frequency,Date settlementDate=Date()){
            return QuantLib::BondFunctions::cleanPrice(
                    *(boost::dynamic_pointer_cast<Bond>(bond)),
                    yield,
                    dayCounter,
                    compounding,
                    frequency,
                    settlementDate);
        }
SWIGINTERN Real BondFunctions_bps__SWIG_2(BondPtr const &bond,InterestRate const &yield,Date settlementDate=Date()){
            return QuantLib::BondFunctions::bps(
                        *(boost::dynamic_pointer_cast<Bond>(bond)),
                        yield,
                        settlementDate);
        }
SWIGINTERN Real BondFunctions_bps__SWIG_4(BondPtr const &bond,Rate yield,DayCounter const &dayCounter,Compounding compounding,Frequency frequency,Date settlementDate=Date()){
            return QuantLib::BondFunctions::bps(
                        *(boost::dynamic_pointer_cast<Bond>(bond)),
                        yield,
                        dayCounter,
                        compounding,
                        frequency,
                        settlementDate);
        }
SWIGINTERN Rate BondFunctions_yield__SWIG_0(BondPtr const &bond,Real cleanPrice,DayCounter const &dayCounter,Compounding compounding,Frequency frequency,Date settlementDate=Date(),Real accuracy=1.0e-10,Size maxIterations=100,Rate guess=0.05){
            return QuantLib::BondFunctions::yield(
                        *(boost::dynamic_pointer_cast<Bond>(bond)),
                        cleanPrice,
                        dayCounter,
                        compounding,
                        frequency,
                        settlementDate,
                        accuracy,
                        maxIterations,
                        guess);
        }
SWIGINTERN Rate BondFunctions_yieldBrent__SWIG_0(Brent solver,BondPtr const &bond,Real cleanPrice,DayCounter const &dayCounter,Compounding compounding,Frequency frequency,Date settlementDate=Date(),Real accuracy=1.0e-10,Rate guess=0.05){
            return QuantLib::BondFunctions::yield<Brent>(
                        solver,
                        *(boost::dynamic_pointer_cast<Bond>(bond)),
                        cleanPrice,
                        dayCounter,
                        compounding,
                        frequency,
                        settlementDate,
                        accuracy,
                        guess);
        }
SWIGINTERN Rate BondFunctions_yieldBisection__SWIG_0(Bisection solver,BondPtr const &bond,Real cleanPrice,DayCounter const &dayCounter,Compounding compounding,Frequency frequency,Date settlementDate=Date(),Real accuracy=1.0e-10,Rate guess=0.05){
            return QuantLib::BondFunctions::yield<Bisection>(
                        solver,
                        *(boost::dynamic_pointer_cast<Bond>(bond)),
                        cleanPrice,
                        dayCounter,
                        compounding,
                        frequency,
                        settlementDate,
                        accuracy,
                        guess);
        }
SWIGINTERN Rate BondFunctions_yieldFalsePosition__SWIG_0(FalsePosition solver,BondPtr const &bond,Real cleanPrice,DayCounter const &dayCounter,Compounding compounding,Frequency frequency,Date settlementDate=Date(),Real accuracy=1.0e-10,Rate guess=0.05){
            return QuantLib::BondFunctions::yield<FalsePosition>(
                        solver,
                        *(boost::dynamic_pointer_cast<Bond>(bond)),
                        cleanPrice,
                        dayCounter,
                        compounding,
                        frequency,
                        settlementDate,
                        accuracy,
                        guess);
        }
SWIGINTERN Rate BondFunctions_yieldRidder__SWIG_0(Ridder solver,BondPtr const &bond,Real cleanPrice,DayCounter const &dayCounter,Compounding compounding,Frequency frequency,Date settlementDate=Date(),Real accuracy=1.0e-10,Rate guess=0.05){
            return QuantLib::BondFunctions::yield<Ridder>(
                        solver,
                        *(boost::dynamic_pointer_cast<Bond>(bond)),
                        cleanPrice,
                        dayCounter,
                        compounding,
                        frequency,
                        settlementDate,
                        accuracy,
                        guess);
        }
SWIGINTERN Rate BondFunctions_yieldSecant__SWIG_0(Secant solver,BondPtr const &bond,Real cleanPrice,DayCounter const &dayCounter,Compounding compounding,Frequency frequency,Date settlementDate=Date(),Real accuracy=1.0e-10,Rate guess=0.05){
            return QuantLib::BondFunctions::yield<Secant>(
                        solver,
                        *(boost::dynamic_pointer_cast<Bond>(bond)),
                        cleanPrice,
                        dayCounter,
                        compounding,
                        frequency,
                        settlementDate,
                        accuracy,
                        guess);
        }
SWIGINTERN Time BondFunctions_duration__SWIG_0(BondPtr const &bond,InterestRate const &yield,Duration::Type type=Duration::Modified,Date settlementDate=Date()){
            return QuantLib::BondFunctions::duration(
                        *(boost::dynamic_pointer_cast<Bond>(bond)),
                        yield,
                        type,
                        settlementDate);
        }
SWIGINTERN Time BondFunctions_duration__SWIG_3(BondPtr const &bond,Rate yield,DayCounter const &dayCounter,Compounding compounding,Frequency frequency,Duration::Type type=Duration::Modified,Date settlementDate=Date()){
            return QuantLib::BondFunctions::duration(
                        *(boost::dynamic_pointer_cast<Bond>(bond)),
                        yield,
                        dayCounter,
                        compounding,
                        frequency,
                        type,
                        settlementDate);
        }
SWIGINTERN Real BondFunctions_convexity__SWIG_0(BondPtr const &bond,InterestRate const &yield,Date settlementDate=Date()){
            return QuantLib::BondFunctions::convexity(
                        *(boost::dynamic_pointer_cast<Bond>(bond)),
                        yield,
                        settlementDate);
        }
SWIGINTERN Real BondFunctions_convexity__SWIG_2(BondPtr const &bond,Rate yield,DayCounter const &dayCounter,Compounding compounding,Frequency frequency,Date settlementDate=Date()){
            return QuantLib::BondFunctions::convexity(
                        *(boost::dynamic_pointer_cast<Bond>(bond)),
                        yield,
                        dayCounter,
                        compounding,
                        frequency,
                        settlementDate);
        }
SWIGINTERN Real BondFunctions_basisPointValue__SWIG_0(BondPtr const &bond,InterestRate const &yield,Date settlementDate=Date()){
            return QuantLib::BondFunctions::basisPointValue(
                        *(boost::dynamic_pointer_cast<Bond>(bond)),
                        yield,
                        settlementDate);
        }
SWIGINTERN Real BondFunctions_basisPointValue__SWIG_2(BondPtr const &bond,Rate yield,DayCounter const &dayCounter,Compounding compounding,Frequency frequency,Date settlementDate=Date()){
            return QuantLib::BondFunctions::basisPointValue(
                        *(boost::dynamic_pointer_cast<Bond>(bond)),
                        yield,
                        dayCounter,
                        compounding,
                        frequency,
                        settlementDate);
        }
SWIGINTERN Real BondFunctions_yieldValueBasisPoint__SWIG_0(BondPtr const &bond,InterestRate const &yield,Date settlementDate=Date()){
            return QuantLib::BondFunctions::yieldValueBasisPoint(
                        *(boost::dynamic_pointer_cast<Bond>(bond)),
                        yield,
                        settlementDate);
        }
SWIGINTERN Real BondFunctions_yieldValueBasisPoint__SWIG_2(BondPtr const &bond,Rate yield,DayCounter const &dayCounter,Compounding compounding,Frequency frequency,Date settlementDate=Date()){
            return QuantLib::BondFunctions::yieldValueBasisPoint(
                        *(boost::dynamic_pointer_cast<Bond>(bond)),
                        yield,
                        dayCounter,
                        compounding,
                        frequency,
                        settlementDate);
        }
SWIGINTERN Spread BondFunctions_zSpread__SWIG_0(BondPtr const &bond,Real cleanPrice,boost::shared_ptr< YieldTermStructure > const &discountCurve,DayCounter const &dayCounter,Compounding compounding,Frequency frequency,Date settlementDate=Date(),Real accuracy=1.0e-10,Size maxIterations=100,Rate guess=0.0){
            return QuantLib::BondFunctions::zSpread(
                        *(boost::dynamic_pointer_cast<Bond>(bond)),
                        cleanPrice,
                        discountCurve,
                        dayCounter,
                        compounding,
                        frequency,
                        settlementDate,
                        accuracy,
                        maxIterations,
                        guess);

        }

using QuantLib::CapFloor;
using QuantLib::Cap;
using QuantLib::Floor;
using QuantLib::Collar;

typedef boost::shared_ptr<Instrument> CapFloorPtr;
typedef boost::shared_ptr<Instrument> CapPtr;
typedef boost::shared_ptr<Instrument> FloorPtr;
typedef boost::shared_ptr<Instrument> CollarPtr;

SWIGINTERN Volatility CapFloorPtr_impliedVolatility__SWIG_0(CapFloorPtr const *self,Real price,Handle< YieldTermStructure > const &disc,Volatility guess,Real accuracy=1.0e-4,Natural maxEvaluations=100,Volatility minVol=1.0e-7,Volatility maxVol=4.0,VolatilityType type=ShiftedLognormal,Real displacement=0.0){
            return boost::dynamic_pointer_cast<CapFloor>(*self)->
                impliedVolatility(price, disc, guess, accuracy,
                                  maxEvaluations, minVol, maxVol,
                                  type, displacement);
        }
SWIGINTERN Leg const &CapFloorPtr_floatingLeg(CapFloorPtr const *self){
            return boost::dynamic_pointer_cast<CapFloor>(*self)->floatingLeg();
        }
SWIGINTERN std::vector< Rate > const &CapFloorPtr_capRates(CapFloorPtr const *self){
            return boost::dynamic_pointer_cast<CapFloor>(*self)->capRates();
        }
SWIGINTERN std::vector< Rate > const &CapFloorPtr_floorRates(CapFloorPtr const *self){
            return boost::dynamic_pointer_cast<CapFloor>(*self)->floorRates();
        }
SWIGINTERN Date CapFloorPtr_startDate(CapFloorPtr const *self){
            return boost::dynamic_pointer_cast<CapFloor>(*self)->startDate();
        }
SWIGINTERN Date CapFloorPtr_maturityDate(CapFloorPtr const *self){
            return boost::dynamic_pointer_cast<CapFloor>(*self)->maturityDate();
        }
SWIGINTERN Rate CapFloorPtr_atmRate(CapFloorPtr const *self,boost::shared_ptr< YieldTermStructure > const &discountCurve){
            return boost::dynamic_pointer_cast<CapFloor>(*self)->atmRate(*discountCurve);
        }
SWIGINTERN CapPtr *new_CapPtr(std::vector< boost::shared_ptr< CashFlow > > const &leg,std::vector< Rate > const &capRates){
            return new CapPtr(new Cap(leg,capRates));
        }
SWIGINTERN FloorPtr *new_FloorPtr(std::vector< boost::shared_ptr< CashFlow > > const &leg,std::vector< Rate > const &floorRates){
            return new FloorPtr(new Floor(leg,floorRates));
        }
SWIGINTERN CollarPtr *new_CollarPtr(std::vector< boost::shared_ptr< CashFlow > > const &leg,std::vector< Rate > const &capRates,std::vector< Rate > const &floorRates){
            return new CollarPtr(new Collar(leg,capRates,floorRates));
        }

using QuantLib::BlackCapFloorEngine;
typedef boost::shared_ptr<PricingEngine> BlackCapFloorEnginePtr;

SWIGINTERN BlackCapFloorEnginePtr *new_BlackCapFloorEnginePtr__SWIG_0(Handle< YieldTermStructure > const &termStructure,Handle< Quote > const &vol){
            return new BlackCapFloorEnginePtr(
                                  new BlackCapFloorEngine(termStructure,vol));
        }
SWIGINTERN BlackCapFloorEnginePtr *new_BlackCapFloorEnginePtr__SWIG_1(Handle< YieldTermStructure > const &termStructure,Handle< OptionletVolatilityStructure > const &vol){
            return new BlackCapFloorEnginePtr(
                                  new BlackCapFloorEngine(termStructure,vol));
        }

using QuantLib::BachelierCapFloorEngine;
typedef boost::shared_ptr<PricingEngine> BachelierCapFloorEnginePtr;

SWIGINTERN BachelierCapFloorEnginePtr *new_BachelierCapFloorEnginePtr__SWIG_0(Handle< YieldTermStructure > const &termStructure,Handle< Quote > const &vol){
            return new BachelierCapFloorEnginePtr(
                                new BachelierCapFloorEngine(termStructure,vol));
        }
SWIGINTERN BachelierCapFloorEnginePtr *new_BachelierCapFloorEnginePtr__SWIG_1(Handle< YieldTermStructure > const &termStructure,Handle< OptionletVolatilityStructure > const &vol){
            return new BachelierCapFloorEnginePtr(
                                new BachelierCapFloorEngine(termStructure,vol));
        }

using QuantLib::Dividend;

SWIGINTERN bool boost_shared_ptr_Sl_Dividend_Sg__isNull(boost::shared_ptr< Dividend > *self){
                return !(*self);
            }

using QuantLib::FixedDividend;
using QuantLib::FractionalDividend;

typedef boost::shared_ptr<Dividend> FixedDividendPtr;
typedef boost::shared_ptr<Dividend> FractionalDividendPtr;

SWIGINTERN FixedDividendPtr *new_FixedDividendPtr(Real amount,Date const &date){
            return new FixedDividendPtr(new FixedDividend(amount,date));
        }
SWIGINTERN FractionalDividendPtr *new_FractionalDividendPtr(Rate rate,Date const &date){
            return new FractionalDividendPtr(
                                     new FractionalDividend(rate,date));
        }
SWIGINTERN boost::shared_ptr< Dividend > std_vector_Sl_boost_shared_ptr_Sl_Dividend_Sg__Sg__pop(std::vector< boost::shared_ptr< Dividend > > *self){
                if (self->size() == 0)
                    throw std::out_of_range("pop from empty vector");
                boost::shared_ptr< Dividend > x = self->back();
                self->pop_back();
                return x;
            }
SWIGINTERN boost::shared_ptr< Dividend > &std_vector_Sl_boost_shared_ptr_Sl_Dividend_Sg__Sg__get(std::vector< boost::shared_ptr< Dividend > > *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_boost_shared_ptr_Sl_Dividend_Sg__Sg__set(std::vector< boost::shared_ptr< Dividend > > *self,int i,boost::shared_ptr< Dividend > const &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");
            }

using QuantLib::ConvertibleZeroCouponBond;
using QuantLib::ConvertibleFixedCouponBond;
using QuantLib::ConvertibleFloatingRateBond;
using QuantLib::BinomialConvertibleEngine;
typedef boost::shared_ptr<Instrument> ConvertibleZeroCouponBondPtr;
typedef boost::shared_ptr<Instrument> ConvertibleFixedCouponBondPtr;
typedef boost::shared_ptr<Instrument> ConvertibleFloatingRateBondPtr;
typedef boost::shared_ptr<PricingEngine> BinomialConvertibleEnginePtr;

SWIGINTERN ConvertibleZeroCouponBondPtr *new_ConvertibleZeroCouponBondPtr__SWIG_0(boost::shared_ptr< Exercise > const &exercise,Real conversionRatio,std::vector< boost::shared_ptr< Dividend > > const &dividends,std::vector< boost::shared_ptr< Callability > > const &callability,Handle< Quote > const &creditSpread,Date const &issueDate,Integer settlementDays,DayCounter const &dayCounter,Schedule const &schedule,Real redemption=100.0){
            return new ConvertibleZeroCouponBondPtr(
                     new ConvertibleZeroCouponBond(exercise, conversionRatio,
                                                   dividends, callability,
                                                   creditSpread,
                                                   issueDate, settlementDays,
                                                   dayCounter, schedule,
                                                   redemption));
        }
SWIGINTERN ConvertibleFixedCouponBondPtr *new_ConvertibleFixedCouponBondPtr__SWIG_0(boost::shared_ptr< Exercise > const &exercise,Real conversionRatio,std::vector< boost::shared_ptr< Dividend > > const &dividends,std::vector< boost::shared_ptr< Callability > > const &callability,Handle< Quote > const &creditSpread,Date const &issueDate,Integer settlementDays,std::vector< Rate > const &coupons,DayCounter const &dayCounter,Schedule const &schedule,Real redemption=100.0){
            return new ConvertibleFixedCouponBondPtr(
                    new ConvertibleFixedCouponBond(exercise, conversionRatio,
                                                   dividends, callability,
                                                   creditSpread,
                                                   issueDate, settlementDays,
                                                   coupons, dayCounter,
                                                   schedule, redemption));
        }
SWIGINTERN ConvertibleFloatingRateBondPtr *new_ConvertibleFloatingRateBondPtr__SWIG_0(boost::shared_ptr< Exercise > const &exercise,Real conversionRatio,std::vector< boost::shared_ptr< Dividend > > const &dividends,std::vector< boost::shared_ptr< Callability > > const &callability,Handle< Quote > const &creditSpread,Date const &issueDate,Integer settlementDays,IborIndexPtr const &index,Integer fixingDays,std::vector< Spread > const &spreads,DayCounter const &dayCounter,Schedule const &schedule,Real redemption=100.0){
            boost::shared_ptr<IborIndex> libor =
                boost::dynamic_pointer_cast<IborIndex>(index);
            return new ConvertibleFloatingRateBondPtr(
                   new ConvertibleFloatingRateBond(exercise, conversionRatio,
                                                   dividends, callability,
                                                   creditSpread,
                                                   issueDate, settlementDays,
                                                   libor, fixingDays, spreads,
                                                   dayCounter, schedule,
                                                   redemption));
        }
SWIGINTERN BinomialConvertibleEnginePtr *new_BinomialConvertibleEnginePtr(GeneralizedBlackScholesProcessPtr const &process,std::string const &type,Size steps){
            boost::shared_ptr<GeneralizedBlackScholesProcess> bsProcess =
                 boost::dynamic_pointer_cast<GeneralizedBlackScholesProcess>(
                                                                     process);
            QL_REQUIRE(bsProcess, "Black-Scholes process required");
            std::string s = boost::algorithm::to_lower_copy(type);
            if (s == "crr" || s == "coxrossrubinstein")
                return new BinomialConvertibleEnginePtr(
                    new BinomialConvertibleEngine<CoxRossRubinstein>(
                                                            bsProcess,steps));
            else if (s == "jr" || s == "jarrowrudd")
                return new BinomialConvertibleEnginePtr(
                    new BinomialConvertibleEngine<JarrowRudd>(
                                                            bsProcess,steps));
            else if (s == "eqp")
                return new BinomialConvertibleEnginePtr(
                    new BinomialConvertibleEngine<AdditiveEQPBinomialTree>(
                                                            bsProcess,steps));
            else if (s == "trigeorgis")
                return new BinomialConvertibleEnginePtr(
                    new BinomialConvertibleEngine<Trigeorgis>(
                                                            bsProcess,steps));
            else if (s == "tian")
                return new BinomialConvertibleEnginePtr(
                    new BinomialConvertibleEngine<Tian>(bsProcess,steps));
            else if (s == "lr" || s == "leisenreimer")
                return new BinomialConvertibleEnginePtr(
                    new BinomialConvertibleEngine<LeisenReimer>(
                                                            bsProcess,steps));
            else if (s == "j4" || s == "joshi4")
                return new BinomialConvertibleEnginePtr(
                    new BinomialConvertibleEngine<Joshi4>(bsProcess,steps));
            else
                QL_FAIL("unknown binomial engine type: "+s);
        }

using QuantLib::DefaultProbabilityTermStructure;

SWIGINTERN bool boost_shared_ptr_Sl_DefaultProbabilityTermStructure_Sg__isNull(boost::shared_ptr< DefaultProbabilityTermStructure > *self){
                return !(*self);
            }
SWIGINTERN boost::shared_ptr< Observable > boost_shared_ptr_Sl_DefaultProbabilityTermStructure_Sg__asObservable(boost::shared_ptr< DefaultProbabilityTermStructure > *self){
        return boost::shared_ptr<Observable>(*self);
    }
SWIGINTERN boost::shared_ptr< Observable > Handle_Sl_DefaultProbabilityTermStructure_Sg__asObservable(Handle< DefaultProbabilityTermStructure > *self){
        return boost::shared_ptr<Observable>(*self);
    }

using QuantLib::FlatHazardRate;
typedef boost::shared_ptr<DefaultProbabilityTermStructure> FlatHazardRatePtr;

SWIGINTERN FlatHazardRatePtr *new_FlatHazardRatePtr__SWIG_0(Integer settlementDays,Calendar const &calendar,Handle< Quote > const &hazardRate,DayCounter const &dayCounter){
            return new FlatHazardRatePtr(
                           new FlatHazardRate(settlementDays,calendar,
                                              hazardRate,dayCounter));
        }
SWIGINTERN FlatHazardRatePtr *new_FlatHazardRatePtr__SWIG_1(Date const &todaysDate,Handle< Quote > const &hazardRate,DayCounter const &dayCounter){
            return new FlatHazardRatePtr(
                        new FlatHazardRate(todaysDate,hazardRate,dayCounter));
        }

using QuantLib::InterpolatedHazardRateCurve;


typedef boost::shared_ptr<DefaultProbabilityTermStructure> HazardRateCurvePtr;

SWIGINTERN HazardRateCurvePtr *new_HazardRateCurvePtr__SWIG_0(std::vector< Date > const &dates,std::vector< Real > const &hazardRates,DayCounter const &dayCounter,Calendar const &calendar=Calendar(),BackwardFlat const &i=BackwardFlat()){
            return new HazardRateCurvePtr(
                new InterpolatedHazardRateCurve<BackwardFlat>(dates,hazardRates,
                                                              dayCounter,
                                                              calendar,i));
        }
SWIGINTERN std::vector< Date > const &HazardRateCurvePtr_dates(HazardRateCurvePtr *self){
            typedef InterpolatedHazardRateCurve<BackwardFlat> HazardRateCurve;
            return boost::dynamic_pointer_cast<HazardRateCurve>(*self)->dates();
        }
SWIGINTERN std::vector< Real > const &HazardRateCurvePtr_hazardRates(HazardRateCurvePtr *self){
            typedef InterpolatedHazardRateCurve<BackwardFlat> HazardRateCurve;
            return boost::dynamic_pointer_cast<HazardRateCurve>(*self)->hazardRates();
        }
SWIGINTERN std::vector< std::pair< Date,Real > > HazardRateCurvePtr_nodes(HazardRateCurvePtr *self){
            typedef InterpolatedHazardRateCurve<BackwardFlat> HazardRateCurve;
            return boost::dynamic_pointer_cast<HazardRateCurve>(*self)->nodes();
        }

using QuantLib::InterpolatedDefaultDensityCurve;


typedef boost::shared_ptr<DefaultProbabilityTermStructure> DefaultDensityCurvePtr;

SWIGINTERN DefaultDensityCurvePtr *new_DefaultDensityCurvePtr__SWIG_0(std::vector< Date > const &dates,std::vector< Real > const &densities,DayCounter const &dayCounter,Calendar const &calendar=Calendar(),Linear const &i=Linear()){
            return new DefaultDensityCurvePtr(
                new InterpolatedDefaultDensityCurve<Linear>(dates,
                                                                  densities,
                                                                  dayCounter,
                                                                  calendar,i));
        }
SWIGINTERN std::vector< Date > const &DefaultDensityCurvePtr_dates(DefaultDensityCurvePtr *self){
            typedef InterpolatedDefaultDensityCurve<Linear> DefaultDensityCurve;
            return boost::dynamic_pointer_cast<DefaultDensityCurve>(*self)->dates();
        }
SWIGINTERN std::vector< Real > const &DefaultDensityCurvePtr_defaultDensities(DefaultDensityCurvePtr *self){
            typedef InterpolatedDefaultDensityCurve<Linear> DefaultDensityCurve;
            return boost::dynamic_pointer_cast<DefaultDensityCurve>(*self)->defaultDensities();
        }
SWIGINTERN std::vector< std::pair< Date,Real > > DefaultDensityCurvePtr_nodes(DefaultDensityCurvePtr *self){
            typedef InterpolatedDefaultDensityCurve<Linear> DefaultDensityCurve;
            return boost::dynamic_pointer_cast<DefaultDensityCurve>(*self)->nodes();
        }

using QuantLib::DefaultProbabilityHelper;
using QuantLib::SpreadCdsHelper;
typedef boost::shared_ptr<DefaultProbabilityHelper> SpreadCdsHelperPtr;
using QuantLib::UpfrontCdsHelper;
typedef boost::shared_ptr<DefaultProbabilityHelper> UpfrontCdsHelperPtr;

SWIGINTERN bool boost_shared_ptr_Sl_DefaultProbabilityHelper_Sg__isNull(boost::shared_ptr< DefaultProbabilityHelper > *self){
                return !(*self);
            }
SWIGINTERN boost::shared_ptr< DefaultProbabilityHelper > std_vector_Sl_boost_shared_ptr_Sl_DefaultProbabilityHelper_Sg__Sg__pop(std::vector< boost::shared_ptr< DefaultProbabilityHelper > > *self){
                if (self->size() == 0)
                    throw std::out_of_range("pop from empty vector");
                boost::shared_ptr< DefaultProbabilityHelper > x = self->back();
                self->pop_back();
                return x;
            }
SWIGINTERN boost::shared_ptr< DefaultProbabilityHelper > &std_vector_Sl_boost_shared_ptr_Sl_DefaultProbabilityHelper_Sg__Sg__get(std::vector< boost::shared_ptr< DefaultProbabilityHelper > > *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_boost_shared_ptr_Sl_DefaultProbabilityHelper_Sg__Sg__set(std::vector< boost::shared_ptr< DefaultProbabilityHelper > > *self,int i,boost::shared_ptr< DefaultProbabilityHelper > const &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");
            }
SWIGINTERN SpreadCdsHelperPtr *new_SpreadCdsHelperPtr__SWIG_0(Handle< Quote > const &spread,Period const &tenor,Integer settlementDays,Calendar const &calendar,Frequency frequency,BusinessDayConvention convention,DateGeneration::Rule rule,DayCounter const &dayCounter,Real recoveryRate,Handle< YieldTermStructure > const &discountCurve,bool settlesAccrual=true,bool paysAtDefaultTime=true){
            return new SpreadCdsHelperPtr(
                new SpreadCdsHelper(spread,tenor,settlementDays,calendar,
                                    frequency,convention,rule,dayCounter,
                                    recoveryRate,discountCurve,
                                    settlesAccrual,paysAtDefaultTime));
        }
SWIGINTERN SpreadCdsHelperPtr *new_SpreadCdsHelperPtr__SWIG_3(Rate spread,Period const &tenor,Integer settlementDays,Calendar const &calendar,Frequency frequency,BusinessDayConvention convention,DateGeneration::Rule rule,DayCounter const &dayCounter,Real recoveryRate,Handle< YieldTermStructure > const &discountCurve,bool settlesAccrual=true,bool paysAtDefaultTime=true){
            return new SpreadCdsHelperPtr(
                new SpreadCdsHelper(spread,tenor,settlementDays,calendar,
                                    frequency,convention,rule,dayCounter,
                                    recoveryRate,discountCurve,
                                    settlesAccrual,paysAtDefaultTime));
        }
SWIGINTERN UpfrontCdsHelperPtr *new_UpfrontCdsHelperPtr__SWIG_0(Handle< Quote > const &upfront,Rate spread,Period const &tenor,Integer settlementDays,Calendar const &calendar,Frequency frequency,BusinessDayConvention convention,DateGeneration::Rule rule,DayCounter const &dayCounter,Real recoveryRate,Handle< YieldTermStructure > const &discountCurve,Natural upfrontSettlementDays=0,bool settlesAccrual=true,bool paysAtDefaultTime=true){
            return new UpfrontCdsHelperPtr(
                new UpfrontCdsHelper(upfront,spread,tenor,
                                     settlementDays,calendar,
                                     frequency,convention,rule,dayCounter,
                                     recoveryRate,discountCurve,upfrontSettlementDays,
                                     settlesAccrual,paysAtDefaultTime));
        }
SWIGINTERN UpfrontCdsHelperPtr *new_UpfrontCdsHelperPtr__SWIG_4(Rate upfront,Rate spread,Period const &tenor,Integer settlementDays,Calendar const &calendar,Frequency frequency,BusinessDayConvention convention,DateGeneration::Rule rule,DayCounter const &dayCounter,Real recoveryRate,Handle< YieldTermStructure > const &discountCurve,Natural upfrontSettlementDays=0,bool settlesAccrual=true,bool paysAtDefaultTime=true){
            return new UpfrontCdsHelperPtr(
                new UpfrontCdsHelper(upfront,spread,tenor,
                                     settlementDays,calendar,
                                     frequency,convention,rule,dayCounter,
                                     recoveryRate,discountCurve,upfrontSettlementDays,
                                     settlesAccrual,paysAtDefaultTime));
        }

using QuantLib::HazardRate;
using QuantLib::DefaultDensity;


using QuantLib::PiecewiseDefaultCurve;


typedef boost::shared_ptr<DefaultProbabilityTermStructure> PiecewiseFlatHazardRatePtr;

SWIGINTERN PiecewiseFlatHazardRatePtr *new_PiecewiseFlatHazardRatePtr__SWIG_0(Date const &referenceDate,std::vector< boost::shared_ptr< DefaultProbabilityHelper > > const &instruments,DayCounter const &dayCounter,Real accuracy=1.0e-12,BackwardFlat const &i=BackwardFlat()){
            return new PiecewiseFlatHazardRatePtr(
                new PiecewiseDefaultCurve<HazardRate,BackwardFlat>(
                                                 referenceDate,instruments,
                                                 dayCounter, accuracy, i));
        }
SWIGINTERN PiecewiseFlatHazardRatePtr *new_PiecewiseFlatHazardRatePtr__SWIG_3(Integer settlementDays,Calendar const &calendar,std::vector< boost::shared_ptr< DefaultProbabilityHelper > > const &instruments,DayCounter const &dayCounter,Real accuracy=1.0e-12,BackwardFlat const &i=BackwardFlat()){
            return new PiecewiseFlatHazardRatePtr(
                new PiecewiseDefaultCurve<HazardRate,BackwardFlat>(
                                        settlementDays, calendar, instruments,
                                        dayCounter, accuracy, i));
        }
SWIGINTERN std::vector< Date > const &PiecewiseFlatHazardRatePtr_dates(PiecewiseFlatHazardRatePtr *self){
            typedef PiecewiseDefaultCurve<HazardRate,BackwardFlat> PiecewiseFlatHazardRate;
            return boost::dynamic_pointer_cast<PiecewiseFlatHazardRate>(*self)->dates();
        }
SWIGINTERN std::vector< Time > const &PiecewiseFlatHazardRatePtr_times(PiecewiseFlatHazardRatePtr *self){
            typedef PiecewiseDefaultCurve<HazardRate,BackwardFlat> PiecewiseFlatHazardRate;
            return boost::dynamic_pointer_cast<PiecewiseFlatHazardRate>(*self)->times();
        }
SWIGINTERN std::vector< std::pair< Date,Real > > PiecewiseFlatHazardRatePtr_nodes(PiecewiseFlatHazardRatePtr *self){
            typedef PiecewiseDefaultCurve<HazardRate,BackwardFlat> PiecewiseFlatHazardRate;
            return boost::dynamic_pointer_cast<PiecewiseFlatHazardRate>(*self)->nodes();
        }

using QuantLib::Protection;


using QuantLib::CreditDefaultSwap;
using QuantLib::MidPointCdsEngine;
using QuantLib::IntegralCdsEngine;

typedef boost::shared_ptr<Instrument> CreditDefaultSwapPtr;
typedef boost::shared_ptr<PricingEngine> MidPointCdsEnginePtr;
typedef boost::shared_ptr<PricingEngine> IntegralCdsEnginePtr;

SWIGINTERN CreditDefaultSwapPtr *new_CreditDefaultSwapPtr__SWIG_0(Protection::Side side,Real notional,Rate spread,Schedule const &schedule,BusinessDayConvention paymentConvention,DayCounter const &dayCounter,bool settlesAccrual=true,bool paysAtDefaultTime=true){
            return new CreditDefaultSwapPtr(
                    new CreditDefaultSwap(side, notional, spread, schedule,
                                          paymentConvention, dayCounter,
                                          settlesAccrual, paysAtDefaultTime));
        }
SWIGINTERN CreditDefaultSwapPtr *new_CreditDefaultSwapPtr__SWIG_3(Protection::Side side,Real notional,Rate upfront,Rate spread,Schedule const &schedule,BusinessDayConvention paymentConvention,DayCounter const &dayCounter,bool settlesAccrual=true,bool paysAtDefaultTime=true){
            return new CreditDefaultSwapPtr(
                    new CreditDefaultSwap(side, notional, upfront, spread,
                                          schedule, paymentConvention,
                                          dayCounter, settlesAccrual,
                                          paysAtDefaultTime));
        }
SWIGINTERN Protection::Side CreditDefaultSwapPtr_side(CreditDefaultSwapPtr const *self){
            return boost::dynamic_pointer_cast<CreditDefaultSwap>(*self)
                ->side();
        }
SWIGINTERN Real CreditDefaultSwapPtr_notional(CreditDefaultSwapPtr const *self){
            return boost::dynamic_pointer_cast<CreditDefaultSwap>(*self)
                ->notional();
        }
SWIGINTERN Rate CreditDefaultSwapPtr_runningSpread(CreditDefaultSwapPtr const *self){
            return boost::dynamic_pointer_cast<CreditDefaultSwap>(*self)
                ->runningSpread();
        }
SWIGINTERN doubleOrNull CreditDefaultSwapPtr_upfront(CreditDefaultSwapPtr const *self){
            boost::optional<Rate> result =
                boost::dynamic_pointer_cast<CreditDefaultSwap>(*self)
                ->upfront();
            if (result)
                return *result;
            else
                return Null<double>();
        }
SWIGINTERN bool CreditDefaultSwapPtr_settlesAccrual(CreditDefaultSwapPtr const *self){
            return boost::dynamic_pointer_cast<CreditDefaultSwap>(*self)
                ->settlesAccrual();
        }
SWIGINTERN bool CreditDefaultSwapPtr_paysAtDefaultTime(CreditDefaultSwapPtr const *self){
            return boost::dynamic_pointer_cast<CreditDefaultSwap>(*self)
                ->paysAtDefaultTime();
        }
SWIGINTERN Rate CreditDefaultSwapPtr_fairSpread(CreditDefaultSwapPtr const *self){
            return boost::dynamic_pointer_cast<CreditDefaultSwap>(*self)
                ->fairSpread();
        }
SWIGINTERN Rate CreditDefaultSwapPtr_fairUpfront(CreditDefaultSwapPtr const *self){
            return boost::dynamic_pointer_cast<CreditDefaultSwap>(*self)
                ->fairUpfront();
        }
SWIGINTERN Real CreditDefaultSwapPtr_couponLegBPS(CreditDefaultSwapPtr const *self){
            return boost::dynamic_pointer_cast<CreditDefaultSwap>(*self)
                ->couponLegBPS();
        }
SWIGINTERN Real CreditDefaultSwapPtr_couponLegNPV(CreditDefaultSwapPtr const *self){
            return boost::dynamic_pointer_cast<CreditDefaultSwap>(*self)
                ->couponLegNPV();
        }
SWIGINTERN Real CreditDefaultSwapPtr_defaultLegNPV(CreditDefaultSwapPtr const *self){
            return boost::dynamic_pointer_cast<CreditDefaultSwap>(*self)
                ->defaultLegNPV();
        }
SWIGINTERN Real CreditDefaultSwapPtr_upfrontBPS(CreditDefaultSwapPtr const *self){
            return boost::dynamic_pointer_cast<CreditDefaultSwap>(*self)
                ->upfrontBPS();
        }
SWIGINTERN Real CreditDefaultSwapPtr_upfrontNPV(CreditDefaultSwapPtr const *self){
            return boost::dynamic_pointer_cast<CreditDefaultSwap>(*self)
                ->upfrontNPV();
        }
SWIGINTERN Rate CreditDefaultSwapPtr_impliedHazardRate__SWIG_0(CreditDefaultSwapPtr const *self,Real targetNPV,Handle< YieldTermStructure > const &discountCurve,DayCounter const &dayCounter,Real recoveryRate=0.4,Real accuracy=1.0e-6){
            return boost::dynamic_pointer_cast<CreditDefaultSwap>(*self)
                ->impliedHazardRate(targetNPV, discountCurve, dayCounter,
                                    recoveryRate, accuracy);
        }
SWIGINTERN std::vector< boost::shared_ptr< CashFlow > > CreditDefaultSwapPtr_coupons(CreditDefaultSwapPtr *self){
            return boost::dynamic_pointer_cast<CreditDefaultSwap>(*self)
                ->coupons();
        }
SWIGINTERN MidPointCdsEnginePtr *new_MidPointCdsEnginePtr(Handle< DefaultProbabilityTermStructure > const &probability,Real recoveryRate,Handle< YieldTermStructure > const &discountCurve){
            return new MidPointCdsEnginePtr(
                              new MidPointCdsEngine(probability, recoveryRate,
                                                    discountCurve));
        }
SWIGINTERN IntegralCdsEnginePtr *new_IntegralCdsEnginePtr__SWIG_0(Period const &integrationStep,Handle< DefaultProbabilityTermStructure > const &probability,Real recoveryRate,Handle< YieldTermStructure > const &discountCurve,bool includeSettlementDateFlows=false){
            return new IntegralCdsEnginePtr(
                              new IntegralCdsEngine(integrationStep, probability,
                                                    recoveryRate, discountCurve,
													includeSettlementDateFlows));
        }

using QuantLib::InterpolatedDiscountCurve;


typedef boost::shared_ptr<YieldTermStructure> DiscountCurvePtr;

SWIGINTERN DiscountCurvePtr *new_DiscountCurvePtr__SWIG_0(std::vector< Date > const &dates,std::vector< DiscountFactor > const &discounts,DayCounter const &dayCounter,Calendar const &calendar=Calendar(),LogLinear const &i=LogLinear()){
            return new DiscountCurvePtr(
                new InterpolatedDiscountCurve<LogLinear>(dates,discounts,
                                                            dayCounter,
                                                            calendar,i));
        }
SWIGINTERN std::vector< Time > const &DiscountCurvePtr_times(DiscountCurvePtr *self){
            typedef InterpolatedDiscountCurve<LogLinear> DiscountCurve;
            return boost::dynamic_pointer_cast<DiscountCurve>(*self)->times();
        }
SWIGINTERN std::vector< Real > const &DiscountCurvePtr_data(DiscountCurvePtr *self){
            typedef InterpolatedDiscountCurve<LogLinear> DiscountCurve;
            return boost::dynamic_pointer_cast<DiscountCurve>(*self)->data();
        }
SWIGINTERN std::vector< Date > const &DiscountCurvePtr_dates(DiscountCurvePtr *self){
            typedef InterpolatedDiscountCurve<LogLinear> DiscountCurve;
            return boost::dynamic_pointer_cast<DiscountCurve>(*self)->dates();
        }
SWIGINTERN std::vector< DiscountFactor > const &DiscountCurvePtr_discounts(DiscountCurvePtr *self){
            typedef InterpolatedDiscountCurve<LogLinear> DiscountCurve;
            return boost::dynamic_pointer_cast<DiscountCurve>(*self)->discounts();
        }
SWIGINTERN std::vector< std::pair< Date,DiscountFactor > > DiscountCurvePtr_nodes(DiscountCurvePtr *self){
            typedef InterpolatedDiscountCurve<LogLinear> DiscountCurve;
            return boost::dynamic_pointer_cast<DiscountCurve>(*self)->nodes();
        }

using QuantLib::NormalDistribution;
using QuantLib::CumulativeNormalDistribution;
using QuantLib::MoroInverseCumulativeNormal;
using QuantLib::InverseCumulativeNormal;
using QuantLib::BivariateCumulativeNormalDistribution;
using QuantLib::BinomialDistribution;
using QuantLib::CumulativeBinomialDistribution;
using QuantLib::BivariateCumulativeNormalDistributionDr78;
using QuantLib::BivariateCumulativeNormalDistributionWe04DP;
using QuantLib::CumulativeChiSquareDistribution;
using QuantLib::NonCentralCumulativeChiSquareDistribution;
using QuantLib::InverseNonCentralCumulativeChiSquareDistribution;
using QuantLib::CumulativeGammaDistribution;
using QuantLib::GammaFunction;
using QuantLib::PoissonDistribution;
using QuantLib::CumulativePoissonDistribution;
using QuantLib::InverseCumulativePoisson;
using QuantLib::StudentDistribution;
using QuantLib::CumulativeStudentDistribution;
using QuantLib::InverseCumulativeStudent;


using QuantLib::Money;

SWIGINTERN void Money_setConversionType(Money::ConversionType type){
            Money::conversionType = type;
        }
SWIGINTERN void Money_setBaseCurrency(Currency const &c){
            Money::baseCurrency = c;
        }

using QuantLib::ExchangeRate;
using QuantLib::ExchangeRateManager;


using QuantLib::Futures;


using QuantLib::TimeBasket;


using QuantLib::Swap;
using QuantLib::VanillaSwap;
using QuantLib::NonstandardSwap;
using QuantLib::DiscountingSwapEngine;
using QuantLib::FloatFloatSwap;

typedef boost::shared_ptr<Instrument> SwapPtr;
typedef boost::shared_ptr<Instrument> VanillaSwapPtr;
typedef boost::shared_ptr<Instrument> NonstandardSwapPtr;
typedef boost::shared_ptr<PricingEngine> DiscountingSwapEnginePtr;
typedef boost::shared_ptr<Instrument> FloatFloatSwapPtr;

SWIGINTERN SwapPtr *new_SwapPtr(std::vector< boost::shared_ptr< CashFlow > > const &firstLeg,std::vector< boost::shared_ptr< CashFlow > > const &secondLeg){
            return new SwapPtr(new Swap(firstLeg, secondLeg));
        }
SWIGINTERN Date SwapPtr_startDate(SwapPtr *self){
            return boost::dynamic_pointer_cast<Swap>(*self)->startDate();
        }
SWIGINTERN Date SwapPtr_maturityDate(SwapPtr *self){
            return boost::dynamic_pointer_cast<Swap>(*self)->maturityDate();
        }
SWIGINTERN Leg const &SwapPtr_leg(SwapPtr *self,Size i){
            return boost::dynamic_pointer_cast<Swap>(*self)->leg(i);
        }
SWIGINTERN Real SwapPtr_legNPV(SwapPtr const *self,Size j){
            return boost::dynamic_pointer_cast<Swap>(*self)->legNPV(j);
        }
SWIGINTERN VanillaSwapPtr *new_VanillaSwapPtr(VanillaSwap::Type type,Real nominal,Schedule const &fixedSchedule,Rate fixedRate,DayCounter const &fixedDayCount,Schedule const &floatSchedule,IborIndexPtr const &index,Spread spread,DayCounter const &floatingDayCount){
            boost::shared_ptr<IborIndex> libor =
                boost::dynamic_pointer_cast<IborIndex>(index);
            return new VanillaSwapPtr(
                    new VanillaSwap(type, nominal,fixedSchedule,fixedRate,
                                    fixedDayCount,floatSchedule,libor,
                                    spread, floatingDayCount));
        }
SWIGINTERN Rate VanillaSwapPtr_fairRate(VanillaSwapPtr *self){
            return boost::dynamic_pointer_cast<VanillaSwap>(*self)->fairRate();
        }
SWIGINTERN Spread VanillaSwapPtr_fairSpread(VanillaSwapPtr *self){
            return boost::dynamic_pointer_cast<VanillaSwap>(*self)
                 ->fairSpread();
        }
SWIGINTERN Real VanillaSwapPtr_fixedLegBPS(VanillaSwapPtr *self){
            return boost::dynamic_pointer_cast<VanillaSwap>(*self)
                 ->fixedLegBPS();
        }
SWIGINTERN Real VanillaSwapPtr_floatingLegBPS(VanillaSwapPtr *self){
            return boost::dynamic_pointer_cast<VanillaSwap>(*self)
                 ->floatingLegBPS();
        }
SWIGINTERN Real VanillaSwapPtr_fixedLegNPV(VanillaSwapPtr *self){
            return boost::dynamic_pointer_cast<VanillaSwap> (*self)
                ->fixedLegNPV();
        }
SWIGINTERN Real VanillaSwapPtr_floatingLegNPV(VanillaSwapPtr *self){
            return boost::dynamic_pointer_cast<VanillaSwap> (*self)
                ->floatingLegNPV();
        }
SWIGINTERN Leg const &VanillaSwapPtr_fixedLeg(VanillaSwapPtr *self){
            return boost::dynamic_pointer_cast<VanillaSwap> (*self)
                ->fixedLeg();
        }
SWIGINTERN Leg const &VanillaSwapPtr_floatingLeg(VanillaSwapPtr *self){
            return boost::dynamic_pointer_cast<VanillaSwap> (*self)
                ->floatingLeg();
        }
SWIGINTERN Real VanillaSwapPtr_nominal(VanillaSwapPtr *self){
            return boost::dynamic_pointer_cast<VanillaSwap> (*self)
                ->nominal();
        }
SWIGINTERN Schedule const &VanillaSwapPtr_fixedSchedule(VanillaSwapPtr *self){
            return boost::dynamic_pointer_cast<VanillaSwap> (*self)
                ->fixedSchedule();
        }
SWIGINTERN Schedule const &VanillaSwapPtr_floatingSchedule(VanillaSwapPtr *self){
            return boost::dynamic_pointer_cast<VanillaSwap> (*self)
                ->floatingSchedule();
        }
SWIGINTERN Rate VanillaSwapPtr_fixedRate(VanillaSwapPtr *self){
            return boost::dynamic_pointer_cast<VanillaSwap> (*self)
                ->fixedRate();
        }
SWIGINTERN Spread VanillaSwapPtr_spread(VanillaSwapPtr *self){
            return boost::dynamic_pointer_cast<VanillaSwap> (*self)
                ->spread();
        }
SWIGINTERN DayCounter const &VanillaSwapPtr_floatingDayCount(VanillaSwapPtr *self){
            return boost::dynamic_pointer_cast<VanillaSwap> (*self)
                ->floatingDayCount();
        }
SWIGINTERN DayCounter const &VanillaSwapPtr_fixedDayCount(VanillaSwapPtr *self){
            return boost::dynamic_pointer_cast<VanillaSwap> (*self)
                ->fixedDayCount();
        }
SWIGINTERN NonstandardSwapPtr *new_NonstandardSwapPtr__SWIG_0(VanillaSwap::Type type,std::vector< Real > const &fixedNominal,std::vector< Real > const &floatingNominal,Schedule const &fixedSchedule,std::vector< Real > const &fixedRate,DayCounter const &fixedDayCount,Schedule const &floatSchedule,IborIndexPtr const &index,std::vector< Real > const &gearing,std::vector< Spread > const &spread,DayCounter const &floatDayCount,bool const intermediateCapitalExchange=false,bool const finalCapitalExchange=false,BusinessDayConvention paymentConvention=Following){
            boost::shared_ptr<IborIndex> libor =
                boost::dynamic_pointer_cast<IborIndex>(index);
            return new NonstandardSwapPtr(
                new NonstandardSwap(type,fixedNominal,floatingNominal,fixedSchedule,fixedRate,
                                    fixedDayCount,floatSchedule,libor,gearing,
                                    spread,floatDayCount,intermediateCapitalExchange,
                                    finalCapitalExchange, paymentConvention));
        }
SWIGINTERN Leg const &NonstandardSwapPtr_fixedLeg(NonstandardSwapPtr *self){
            return boost::dynamic_pointer_cast<NonstandardSwap> (*self)
                ->fixedLeg();
        }
SWIGINTERN Leg const &NonstandardSwapPtr_floatingLeg(NonstandardSwapPtr *self){
            return boost::dynamic_pointer_cast<NonstandardSwap> (*self)
                ->floatingLeg();
        }
SWIGINTERN std::vector< Real > NonstandardSwapPtr_fixedNominals(NonstandardSwapPtr *self){
            return boost::dynamic_pointer_cast<NonstandardSwap> (*self)
                ->fixedNominal();
        }
SWIGINTERN std::vector< Real > NonstandardSwapPtr_floatingNominals(NonstandardSwapPtr *self){
            return boost::dynamic_pointer_cast<NonstandardSwap> (*self)
                ->floatingNominal();
        }
SWIGINTERN Schedule const &NonstandardSwapPtr_fixedSchedule(NonstandardSwapPtr *self){
            return boost::dynamic_pointer_cast<NonstandardSwap> (*self)
                ->fixedSchedule();
        }
SWIGINTERN Schedule const &NonstandardSwapPtr_floatingSchedule(NonstandardSwapPtr *self){
            return boost::dynamic_pointer_cast<NonstandardSwap> (*self)
                ->floatingSchedule();
        }
SWIGINTERN std::vector< Rate > NonstandardSwapPtr_fixedRate(NonstandardSwapPtr *self){
            return boost::dynamic_pointer_cast<NonstandardSwap> (*self)
                ->fixedRate();
        }
SWIGINTERN std::vector< Spread > NonstandardSwapPtr_spreads(NonstandardSwapPtr *self){
            return boost::dynamic_pointer_cast<NonstandardSwap> (*self)
                ->spreads();
        }
SWIGINTERN std::vector< Spread > NonstandardSwapPtr_gearings(NonstandardSwapPtr *self){
            return boost::dynamic_pointer_cast<NonstandardSwap> (*self)
                ->gearings();
        }
SWIGINTERN DayCounter const &NonstandardSwapPtr_floatingDayCount(NonstandardSwapPtr *self){
            return boost::dynamic_pointer_cast<NonstandardSwap> (*self)
                ->floatingDayCount();
        }
SWIGINTERN DayCounter const &NonstandardSwapPtr_fixedDayCount(NonstandardSwapPtr *self){
            return boost::dynamic_pointer_cast<NonstandardSwap> (*self)
                ->fixedDayCount();
        }
SWIGINTERN DiscountingSwapEnginePtr *new_DiscountingSwapEnginePtr__SWIG_0(Handle< YieldTermStructure > const &discountCurve,Date const &settlementDate=Date(),Date const &npvDate=Date()){
            return new DiscountingSwapEnginePtr(
                                    new DiscountingSwapEngine(discountCurve,
                                                              boost::none,
                                                              settlementDate,
                                                              npvDate));
        }
SWIGINTERN DiscountingSwapEnginePtr *new_DiscountingSwapEnginePtr__SWIG_3(Handle< YieldTermStructure > const &discountCurve,bool includeSettlementDateFlows,Date const &settlementDate=Date(),Date const &npvDate=Date()){
            return new DiscountingSwapEnginePtr(
                         new DiscountingSwapEngine(discountCurve,
                                                   includeSettlementDateFlows,
                                                   settlementDate,
                                                   npvDate));
        }

using QuantLib::AssetSwap;
typedef boost::shared_ptr<Instrument> AssetSwapPtr;

SWIGINTERN AssetSwapPtr *new_AssetSwapPtr__SWIG_0(bool payFixedRate,BondPtr const &bond,Real bondCleanPrice,InterestRateIndexPtr const &index,Spread spread,Schedule const &floatSchedule=Schedule(),DayCounter const &floatingDayCount=DayCounter(),bool parAssetSwap=true){
            const boost::shared_ptr<Bond> b =
                boost::dynamic_pointer_cast<Bond>(bond);
            const boost::shared_ptr<IborIndex> i =
                boost::dynamic_pointer_cast<IborIndex>(index);
            return new AssetSwapPtr(
                new AssetSwap(payFixedRate,b,bondCleanPrice,i,spread,
                              floatSchedule,floatingDayCount,parAssetSwap));
        }
SWIGINTERN Real AssetSwapPtr_fairCleanPrice(AssetSwapPtr *self){
            return boost::dynamic_pointer_cast<AssetSwap>(*self)
                ->fairCleanPrice();
        }
SWIGINTERN Spread AssetSwapPtr_fairSpread(AssetSwapPtr *self){
            return boost::dynamic_pointer_cast<AssetSwap>(*self)
                ->fairSpread();
        }
SWIGINTERN FloatFloatSwapPtr *new_FloatFloatSwapPtr__SWIG_0(VanillaSwap::Type type,std::vector< Real > const &nominal1,std::vector< Real > const &nominal2,Schedule const &schedule1,InterestRateIndexPtr const &indexPtr1,DayCounter const &dayCount1,Schedule const &schedule2,InterestRateIndexPtr const &indexPtr2,DayCounter const &dayCount2,bool const intermediateCapitalExchange=false,bool const finalCapitalExchange=false,std::vector< Real > const &gearing1=std::vector< Real >(),std::vector< Real > const &spread1=std::vector< Real >(),std::vector< Real > const &cappedRate1=std::vector< Real >(),std::vector< Real > const &flooredRate1=std::vector< Real >(),std::vector< Real > const &gearing2=std::vector< Real >(),std::vector< Real > const &spread2=std::vector< Real >(),std::vector< Real > const &cappedRate2=std::vector< Real >(),std::vector< Real > const &flooredRate2=std::vector< Real >(),BusinessDayConvention paymentConvention1=Following,BusinessDayConvention paymentConvention2=Following){
            boost::shared_ptr<InterestRateIndex> index1 =
                boost::dynamic_pointer_cast<InterestRateIndex>(indexPtr1);
            boost::shared_ptr<InterestRateIndex> index2 =
                boost::dynamic_pointer_cast<InterestRateIndex>(indexPtr2);
            return new FloatFloatSwapPtr(
                    new FloatFloatSwap(type, nominal1,nominal2,schedule1,
                                    index1,dayCount1,schedule2,
                                    index2, dayCount2,
                                    intermediateCapitalExchange, finalCapitalExchange,
                                    gearing1, spread1, cappedRate1,
                                    flooredRate1, gearing2, spread2,
                                    cappedRate2, flooredRate2,
                                    paymentConvention1, paymentConvention2));
        }

using QuantLib::Pillar;
using QuantLib::RateHelper;
using QuantLib::DepositRateHelper;
using QuantLib::FraRateHelper;
using QuantLib::FuturesRateHelper;
using QuantLib::SwapRateHelper;
using QuantLib::BondHelper;
using QuantLib::FixedRateBondHelper;
using QuantLib::OISRateHelper;
using QuantLib::DatedOISRateHelper;
using QuantLib::FxSwapRateHelper;
typedef boost::shared_ptr<RateHelper> DepositRateHelperPtr;
typedef boost::shared_ptr<RateHelper> FraRateHelperPtr;
typedef boost::shared_ptr<RateHelper> FuturesRateHelperPtr;
typedef boost::shared_ptr<RateHelper> SwapRateHelperPtr;
typedef boost::shared_ptr<RateHelper> BondHelperPtr;
typedef boost::shared_ptr<RateHelper> FixedRateBondHelperPtr;
typedef boost::shared_ptr<RateHelper> OISRateHelperPtr;
typedef boost::shared_ptr<RateHelper> DatedOISRateHelperPtr;
typedef boost::shared_ptr<RateHelper> FxSwapRateHelperPtr;

SWIGINTERN bool boost_shared_ptr_Sl_RateHelper_Sg__isNull(boost::shared_ptr< RateHelper > *self){
                return !(*self);
            }
SWIGINTERN DepositRateHelperPtr *new_DepositRateHelperPtr__SWIG_0(Handle< Quote > const &rate,Period const &tenor,Natural fixingDays,Calendar const &calendar,BusinessDayConvention convention,bool endOfMonth,DayCounter const &dayCounter){
            return new DepositRateHelperPtr(
                new DepositRateHelper(rate,tenor,fixingDays,
                                      calendar,convention,
                                      endOfMonth, dayCounter));
        }
SWIGINTERN DepositRateHelperPtr *new_DepositRateHelperPtr__SWIG_1(Rate rate,Period const &tenor,Natural fixingDays,Calendar const &calendar,BusinessDayConvention convention,bool endOfMonth,DayCounter const &dayCounter){
            return new DepositRateHelperPtr(
                new DepositRateHelper(rate, tenor, fixingDays,
                                      calendar, convention,
                                      endOfMonth, dayCounter));
        }
SWIGINTERN DepositRateHelperPtr *new_DepositRateHelperPtr__SWIG_2(Handle< Quote > const &rate,IborIndexPtr const &index){
            boost::shared_ptr<IborIndex> libor =
                boost::dynamic_pointer_cast<IborIndex>(index);
            return new DepositRateHelperPtr(
                new DepositRateHelper(rate, libor));
        }
SWIGINTERN DepositRateHelperPtr *new_DepositRateHelperPtr__SWIG_3(Rate rate,IborIndexPtr const &index){
            boost::shared_ptr<IborIndex> libor =
                boost::dynamic_pointer_cast<IborIndex>(index);
            return new DepositRateHelperPtr(
                new DepositRateHelper(rate, libor));
        }
SWIGINTERN FraRateHelperPtr *new_FraRateHelperPtr__SWIG_0(Handle< Quote > const &rate,Natural monthsToStart,Natural monthsToEnd,Natural fixingDays,Calendar const &calendar,BusinessDayConvention convention,bool endOfMonth,DayCounter const &dayCounter){
            return new FraRateHelperPtr(
                new FraRateHelper(rate,monthsToStart,monthsToEnd,
                                  fixingDays,calendar,convention,
                                  endOfMonth,dayCounter));
        }
SWIGINTERN FraRateHelperPtr *new_FraRateHelperPtr__SWIG_1(Rate rate,Natural monthsToStart,Natural monthsToEnd,Natural fixingDays,Calendar const &calendar,BusinessDayConvention convention,bool endOfMonth,DayCounter const &dayCounter){
            return new FraRateHelperPtr(
                new FraRateHelper(rate,monthsToStart,monthsToEnd,
                                  fixingDays,calendar,convention,
                                  endOfMonth,dayCounter));
        }
SWIGINTERN FraRateHelperPtr *new_FraRateHelperPtr__SWIG_2(Handle< Quote > const &rate,Natural monthsToStart,IborIndexPtr const &index){
            boost::shared_ptr<IborIndex> libor =
                boost::dynamic_pointer_cast<IborIndex>(index);
            return new FraRateHelperPtr(
                new FraRateHelper(rate,monthsToStart,libor));
        }
SWIGINTERN FraRateHelperPtr *new_FraRateHelperPtr__SWIG_3(Rate rate,Natural monthsToStart,IborIndexPtr const &index){
            boost::shared_ptr<IborIndex> libor =
                boost::dynamic_pointer_cast<IborIndex>(index);
            return new FraRateHelperPtr(
                new FraRateHelper(rate,monthsToStart,libor));
        }
SWIGINTERN FuturesRateHelperPtr *new_FuturesRateHelperPtr__SWIG_0(Handle< Quote > const &price,Date const &iborStartDate,Natural nMonths,Calendar const &calendar,BusinessDayConvention convention,bool endOfMonth,DayCounter const &dayCounter,Handle< Quote > const &convexityAdjustment,Futures::Type type=Futures::IMM){
            return new FuturesRateHelperPtr(
                new FuturesRateHelper(price,iborStartDate,nMonths,
                                      calendar,convention,endOfMonth,
                                      dayCounter,convexityAdjustment,type));
        }
SWIGINTERN FuturesRateHelperPtr *new_FuturesRateHelperPtr__SWIG_2(Real price,Date const &iborStartDate,Natural nMonths,Calendar const &calendar,BusinessDayConvention convention,bool endOfMonth,DayCounter const &dayCounter,Rate convexityAdjustment=0.0,Futures::Type type=Futures::IMM){
            return new FuturesRateHelperPtr(
                new FuturesRateHelper(price,iborStartDate,nMonths,
                                      calendar,convention,endOfMonth,
                                      dayCounter,convexityAdjustment,type));
        }
SWIGINTERN FuturesRateHelperPtr *new_FuturesRateHelperPtr__SWIG_5(Handle< Quote > const &price,Date const &iborStartDate,Date const &iborEndDate,DayCounter const &dayCounter,Handle< Quote > const &convexityAdjustment,Futures::Type type=Futures::IMM){
            return new FuturesRateHelperPtr(
                new FuturesRateHelper(price,iborStartDate,iborEndDate,
                                      dayCounter,convexityAdjustment,type));
        }
SWIGINTERN FuturesRateHelperPtr *new_FuturesRateHelperPtr__SWIG_7(Real price,Date const &iborStartDate,Date const &iborEndDate,DayCounter const &dayCounter,Rate convexityAdjustment=0.0,Futures::Type type=Futures::IMM){
            return new FuturesRateHelperPtr(
                new FuturesRateHelper(price,iborStartDate,iborEndDate,
                                      dayCounter,convexityAdjustment,type));
        }
SWIGINTERN FuturesRateHelperPtr *new_FuturesRateHelperPtr__SWIG_10(Handle< Quote > const &price,Date const &iborStartDate,IborIndexPtr const &index,Handle< Quote > const &convexityAdjustment,Futures::Type type=Futures::IMM){
            boost::shared_ptr<IborIndex> libor =
                boost::dynamic_pointer_cast<IborIndex>(index);
            return new FuturesRateHelperPtr(
                new FuturesRateHelper(price,iborStartDate,libor,
                                      convexityAdjustment,type));
        }
SWIGINTERN FuturesRateHelperPtr *new_FuturesRateHelperPtr__SWIG_12(Real price,Date const &iborStartDate,IborIndexPtr const &index,Real convexityAdjustment=0.0,Futures::Type type=Futures::IMM){
            boost::shared_ptr<IborIndex> libor =
                boost::dynamic_pointer_cast<IborIndex>(index);
            return new FuturesRateHelperPtr(
                new FuturesRateHelper(price,iborStartDate,libor,
                                      convexityAdjustment,type));
        }
SWIGINTERN SwapRateHelperPtr *new_SwapRateHelperPtr__SWIG_0(Handle< Quote > const &rate,Period const &tenor,Calendar const &calendar,Frequency fixedFrequency,BusinessDayConvention fixedConvention,DayCounter const &fixedDayCount,IborIndexPtr const &index,Handle< Quote > const &spread=Handle< Quote >(),Period const &fwdStart=0*Days,Handle< YieldTermStructure > const &discountingCurve=Handle< YieldTermStructure >(),Natural settlementDays=Null< Natural >(),Pillar::Choice pillar=Pillar::LastRelevantDate,Date customPillarDate=Date()){
            boost::shared_ptr<IborIndex> libor =
                boost::dynamic_pointer_cast<IborIndex>(index);
            return new SwapRateHelperPtr(
                new SwapRateHelper(rate, tenor, calendar,
                                   fixedFrequency, fixedConvention,
                                   fixedDayCount, libor,
                                   spread, fwdStart,
                                   discountingCurve, settlementDays,
                                   pillar, customPillarDate));
        }
SWIGINTERN SwapRateHelperPtr *new_SwapRateHelperPtr__SWIG_7(Rate rate,Period const &tenor,Calendar const &calendar,Frequency fixedFrequency,BusinessDayConvention fixedConvention,DayCounter const &fixedDayCount,IborIndexPtr const &index,Handle< Quote > const &spread=Handle< Quote >(),Period const &fwdStart=0*Days,Handle< YieldTermStructure > const &discountingCurve=Handle< YieldTermStructure >(),Natural settlementDays=Null< Natural >(),Pillar::Choice pillar=Pillar::LastRelevantDate,Date customPillarDate=Date()){
            boost::shared_ptr<IborIndex> libor =
                boost::dynamic_pointer_cast<IborIndex>(index);
            return new SwapRateHelperPtr(
                new SwapRateHelper(rate, tenor, calendar,
                                   fixedFrequency, fixedConvention,
                                   fixedDayCount, libor,
                                   spread, fwdStart,
                                   discountingCurve, settlementDays,
                                   pillar, customPillarDate));
        }
SWIGINTERN SwapRateHelperPtr *new_SwapRateHelperPtr__SWIG_14(Handle< Quote > const &rate,SwapIndexPtr const &index,Handle< Quote > const &spread=Handle< Quote >(),Period const &fwdStart=0*Days,Handle< YieldTermStructure > const &discountingCurve=Handle< YieldTermStructure >(),Pillar::Choice pillar=Pillar::LastRelevantDate,Date customPillarDate=Date()){
            boost::shared_ptr<SwapIndex> swapIndex =
                boost::dynamic_pointer_cast<SwapIndex>(index);
            return new SwapRateHelperPtr(
                new SwapRateHelper(rate, swapIndex,
                                   spread, fwdStart,
                                   discountingCurve,
                                   pillar, customPillarDate));
        }
SWIGINTERN SwapRateHelperPtr *new_SwapRateHelperPtr__SWIG_20(Rate rate,SwapIndexPtr const &index,Handle< Quote > const &spread=Handle< Quote >(),Period const &fwdStart=0*Days,Handle< YieldTermStructure > const &discountingCurve=Handle< YieldTermStructure >(),Pillar::Choice pillar=Pillar::LastRelevantDate,Date customPillarDate=Date()){
            boost::shared_ptr<SwapIndex> swapIndex =
                boost::dynamic_pointer_cast<SwapIndex>(index);
            return new SwapRateHelperPtr(
                new SwapRateHelper(rate, swapIndex,
                                   spread, fwdStart,
                                   discountingCurve,
                                   pillar, customPillarDate));
        }
SWIGINTERN VanillaSwapPtr SwapRateHelperPtr_swap(SwapRateHelperPtr *self){
            return boost::dynamic_pointer_cast<SwapRateHelper>(*self)->swap();
        }
SWIGINTERN BondHelperPtr *new_BondHelperPtr__SWIG_0(Handle< Quote > const &cleanPrice,BondPtr const &bond,bool useCleanPrice=true){
            boost::shared_ptr<Bond> b = boost::dynamic_pointer_cast<Bond>(bond);
            return new BondHelperPtr(
                new BondHelper(cleanPrice, b, useCleanPrice));
        }
SWIGINTERN BondPtr BondHelperPtr_bond(BondHelperPtr *self){
            return BondPtr(boost::dynamic_pointer_cast<BondHelper>(*self)->bond());
        }
SWIGINTERN FixedRateBondHelperPtr *new_FixedRateBondHelperPtr__SWIG_0(Handle< Quote > const &cleanPrice,Size settlementDays,Real faceAmount,Schedule const &schedule,std::vector< Rate > const &coupons,DayCounter const &paymentDayCounter,BusinessDayConvention paymentConvention=Following,Real redemption=100.0,Date const &issueDate=Date(),Calendar const &paymentCalendar=Calendar(),Period const &exCouponPeriod=Period(),Calendar const &exCouponCalendar=Calendar(),BusinessDayConvention exCouponConvention=Unadjusted,bool exCouponEndOfMonth=false,bool useCleanPrice=true){
            return new FixedRateBondHelperPtr(
                new FixedRateBondHelper(cleanPrice, settlementDays, faceAmount,
                                        schedule, coupons, paymentDayCounter,
                                        paymentConvention, redemption,
                                        issueDate, paymentCalendar,
                                        exCouponPeriod, exCouponCalendar,
                                        exCouponConvention, exCouponEndOfMonth,
                                        useCleanPrice));
        }
SWIGINTERN FixedRateBondPtr FixedRateBondHelperPtr_bond(FixedRateBondHelperPtr *self){
            return FixedRateBondPtr(boost::dynamic_pointer_cast<FixedRateBondHelper>(*self)->bond());
        }
SWIGINTERN OISRateHelperPtr *new_OISRateHelperPtr__SWIG_0(Natural settlementDays,Period const &tenor,Handle< Quote > const &rate,OvernightIndexPtr const &index,Handle< YieldTermStructure > const &discountingCurve=Handle< YieldTermStructure >(),bool telescopicValueDates=false,Natural paymentLag=0,BusinessDayConvention paymentConvention=Following,Frequency paymentFrequency=Annual,Calendar const &paymentCalendar=Calendar(),Period const &forwardStart=0*Days,Spread const overnightSpread=0.0){
            boost::shared_ptr<OvernightIndex> overnight =
                boost::dynamic_pointer_cast<OvernightIndex>(index);
            return new OISRateHelperPtr(
                new OISRateHelper(settlementDays,tenor,rate,
                                  overnight,discountingCurve,
                                  telescopicValueDates, paymentLag,
                                  paymentConvention, paymentFrequency,
                                  paymentCalendar, forwardStart,
                                  overnightSpread));
        }
SWIGINTERN DatedOISRateHelperPtr *new_DatedOISRateHelperPtr__SWIG_0(Date const &startDate,Date const &endDate,Handle< Quote > const &rate,OvernightIndexPtr const &index,Handle< YieldTermStructure > const &discountingCurve=Handle< YieldTermStructure >()){
            boost::shared_ptr<OvernightIndex> overnight =
                boost::dynamic_pointer_cast<OvernightIndex>(index);
            return new DatedOISRateHelperPtr(
                new DatedOISRateHelper(startDate,endDate,rate,
                                       overnight,discountingCurve));
        }
SWIGINTERN FxSwapRateHelperPtr *new_FxSwapRateHelperPtr__SWIG_0(Handle< Quote > const &fwdPoint,Handle< Quote > const &spotFx,Period const &tenor,Natural fixingDays,Calendar const &calendar,BusinessDayConvention convention,bool endOfMonth,bool isFxBaseCurrencyCollateralCurrency,Handle< YieldTermStructure > const &coll=Handle< YieldTermStructure >(),Calendar const &tradingCalendar=Calendar()){
            return new FxSwapRateHelperPtr(
                new FxSwapRateHelper(fwdPoint, spotFx, tenor,
                                     fixingDays, calendar, convention,
                                     endOfMonth,
                                     isFxBaseCurrencyCollateralCurrency,
                                     coll, tradingCalendar));
        }
SWIGINTERN boost::shared_ptr< RateHelper > std_vector_Sl_boost_shared_ptr_Sl_RateHelper_Sg__Sg__pop(std::vector< boost::shared_ptr< RateHelper > > *self){
                if (self->size() == 0)
                    throw std::out_of_range("pop from empty vector");
                boost::shared_ptr< RateHelper > x = self->back();
                self->pop_back();
                return x;
            }
SWIGINTERN boost::shared_ptr< RateHelper > &std_vector_Sl_boost_shared_ptr_Sl_RateHelper_Sg__Sg__get(std::vector< boost::shared_ptr< RateHelper > > *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_boost_shared_ptr_Sl_RateHelper_Sg__Sg__set(std::vector< boost::shared_ptr< RateHelper > > *self,int i,boost::shared_ptr< RateHelper > const &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");
            }

using QuantLib::FittedBondDiscountCurve;

typedef boost::shared_ptr<YieldTermStructure> FittedBondDiscountCurvePtr;
typedef QuantLib::FittedBondDiscountCurve::FittingMethod FittingMethod;

std::vector<boost::shared_ptr<BondHelper> > convert_bond_helpers(
                 const std::vector<boost::shared_ptr<RateHelper> >& helpers) {
    std::vector<boost::shared_ptr<BondHelper> > result(helpers.size());
    for (Size i=0; i<helpers.size(); ++i)
        result[i] = boost::dynamic_pointer_cast<BondHelper>(helpers[i]);
    return result;
}

SWIGINTERN FittedBondDiscountCurvePtr *new_FittedBondDiscountCurvePtr__SWIG_0(Natural settlementDays,Calendar const &calendar,std::vector< boost::shared_ptr< RateHelper > > const &helpers,DayCounter const &dayCounter,FittingMethod const &fittingMethod,Real accuracy=1.0e-10,Size maxEvaluations=10000,Array const &guess=Array(),Real simplexLambda=1.0){
            return new FittedBondDiscountCurvePtr(
                new FittedBondDiscountCurve(settlementDays,
                                            calendar,
                                            convert_bond_helpers(helpers),
                                            dayCounter,
                                            fittingMethod,
                                            accuracy,
                                            maxEvaluations,
                                            guess,
                                            simplexLambda));
        }
SWIGINTERN FittedBondDiscountCurvePtr *new_FittedBondDiscountCurvePtr__SWIG_5(Date const &referenceDate,std::vector< boost::shared_ptr< RateHelper > > const &helpers,DayCounter const &dayCounter,FittingMethod const &fittingMethod,Real accuracy=1.0e-10,Size maxEvaluations=10000,Array const &guess=Array(),Real simplexLambda=1.0){
            return new FittedBondDiscountCurvePtr(
                new FittedBondDiscountCurve(referenceDate,
                                            convert_bond_helpers(helpers),
                                            dayCounter,
                                            fittingMethod,
                                            accuracy,
                                            maxEvaluations,
                                            guess,
                                            simplexLambda));
        }
SWIGINTERN FittingMethod const &FittedBondDiscountCurvePtr_fitResults(FittedBondDiscountCurvePtr const *self){
            return boost::dynamic_pointer_cast<FittedBondDiscountCurve>(*self)
                ->fitResults();
        }

using QuantLib::ExponentialSplinesFitting;
using QuantLib::NelsonSiegelFitting;
using QuantLib::SvenssonFitting;
using QuantLib::CubicBSplinesFitting;
using QuantLib::SimplePolynomialFitting;


using QuantLib::InterpolatedForwardCurve;


typedef boost::shared_ptr<YieldTermStructure> ForwardCurvePtr;

SWIGINTERN ForwardCurvePtr *new_ForwardCurvePtr__SWIG_0(std::vector< Date > const &dates,std::vector< Rate > const &forwards,DayCounter const &dayCounter,Calendar const &calendar=Calendar(),BackwardFlat const &i=BackwardFlat()){
            return new ForwardCurvePtr(
                new InterpolatedForwardCurve<BackwardFlat>(dates,forwards,
                                                           dayCounter,
                                                           calendar,i));
        }
SWIGINTERN std::vector< Date > const &ForwardCurvePtr_dates(ForwardCurvePtr *self){
            typedef InterpolatedForwardCurve<BackwardFlat> ForwardCurve;
            return boost::dynamic_pointer_cast<ForwardCurve>(*self)->dates();
        }
SWIGINTERN std::vector< Rate > const &ForwardCurvePtr_forwards(ForwardCurvePtr *self){
            typedef InterpolatedForwardCurve<BackwardFlat> ForwardCurve;
            return boost::dynamic_pointer_cast<ForwardCurve>(*self)->forwards();
        }
SWIGINTERN std::vector< std::pair< Date,Rate > > ForwardCurvePtr_nodes(ForwardCurvePtr *self){
            typedef InterpolatedForwardCurve<BackwardFlat> ForwardCurve;
            return boost::dynamic_pointer_cast<ForwardCurve>(*self)->nodes();
        }

using QuantLib::Position;
using QuantLib::ForwardRateAgreement;
typedef boost::shared_ptr<Instrument> ForwardRateAgreementPtr;

SWIGINTERN ForwardRateAgreementPtr *new_ForwardRateAgreementPtr__SWIG_0(Date const &valueDate,Date const &maturityDate,Position::Type type,Rate strikeForwardRate,Real notionalAmount,IborIndexPtr const &index,Handle< YieldTermStructure > const &discountCurve=Handle< YieldTermStructure >()){
             
            boost::shared_ptr<IborIndex> libor =
                boost::dynamic_pointer_cast<IborIndex>(index);

            return new ForwardRateAgreementPtr(
                   new ForwardRateAgreement(valueDate, maturityDate, type,
                                            strikeForwardRate, notionalAmount,
                                            libor, discountCurve));
        }
SWIGINTERN Real ForwardRateAgreementPtr_spotIncome(ForwardRateAgreementPtr const *self,Handle< YieldTermStructure > const &discount){
            return boost::dynamic_pointer_cast<ForwardRateAgreement>(*self)
                ->spotIncome(discount);
        }
SWIGINTERN Real ForwardRateAgreementPtr_spotValue(ForwardRateAgreementPtr const *self){
            return boost::dynamic_pointer_cast<ForwardRateAgreement>(*self)
                ->spotValue();
        }
SWIGINTERN InterestRate ForwardRateAgreementPtr_forwardRate(ForwardRateAgreementPtr const *self){
            return boost::dynamic_pointer_cast<ForwardRateAgreement>(*self)
                ->forwardRate();
        }

using QuantLib::Gaussian1dModel;


SWIGINTERN bool boost_shared_ptr_Sl_Gaussian1dModel_Sg__isNull(boost::shared_ptr< Gaussian1dModel > *self){
                return !(*self);
            }

using QuantLib::Gsr;
using QuantLib::MarkovFunctional;

typedef boost::shared_ptr<Gaussian1dModel> GsrPtr;
typedef boost::shared_ptr<Gaussian1dModel> MarkovFunctionalPtr;

SWIGINTERN GsrPtr *new_GsrPtr__SWIG_0(Handle< YieldTermStructure > const &termStructure,std::vector< Date > const &volstepdates,std::vector< Handle< Quote > > const &volatilities,std::vector< Handle< Quote > > const &reversions,Real const T=60.0){
            return new GsrPtr(new Gsr(termStructure, volstepdates,
                                      volatilities, reversions, T));
        }
SWIGINTERN void GsrPtr_calibrateVolatilitiesIterative__SWIG_0(GsrPtr *self,std::vector< boost::shared_ptr< CalibrationHelper > > const &helpers,OptimizationMethod &method,EndCriteria const &endCriteria,Constraint const &constraint=Constraint(),std::vector< Real > const &weights=std::vector< Real >()){
            boost::dynamic_pointer_cast<Gsr>(*self)
                ->calibrateVolatilitiesIterative(helpers, method, endCriteria,
                                                 constraint, weights);
        }
SWIGINTERN void GsrPtr_calibrate__SWIG_0(GsrPtr *self,std::vector< boost::shared_ptr< CalibrationHelper > > const &helpers,OptimizationMethod &method,EndCriteria const &endCriteria,Constraint const &constraint=Constraint(),std::vector< Real > const &weights=std::vector< Real >(),std::vector< bool > const &fixParameters=std::vector< bool >()){
            boost::dynamic_pointer_cast<Gsr>(*self)
                ->calibrate(helpers, method, endCriteria,
                            constraint, weights, fixParameters);
        }
SWIGINTERN Array GsrPtr_params(GsrPtr const *self){
            return boost::dynamic_pointer_cast<Gsr>(*self)->params();
        }
SWIGINTERN Real GsrPtr_value(GsrPtr *self,Array const &params,std::vector< boost::shared_ptr< CalibrationHelper > > const &helpers){
            return boost::dynamic_pointer_cast<Gsr>(*self)->value(params, helpers);
        }
SWIGINTERN EndCriteria::Type GsrPtr_endCriteria(GsrPtr const *self){
            return boost::dynamic_pointer_cast<Gsr>(*self)->endCriteria();
        }
SWIGINTERN void GsrPtr_setParams(GsrPtr *self,Array const &params){
            boost::dynamic_pointer_cast<Gsr>(*self)->setParams(params);
        }
SWIGINTERN Integer GsrPtr_functionEvaluation(GsrPtr const *self){
            return boost::dynamic_pointer_cast<Gsr>(*self)->functionEvaluation();
        }
SWIGINTERN Array const &GsrPtr_reversion(GsrPtr const *self){
            return boost::dynamic_pointer_cast<Gsr>(*self)->reversion();
        }
SWIGINTERN Array const &GsrPtr_volatility(GsrPtr const *self){
            return boost::dynamic_pointer_cast<Gsr>(*self)->volatility();
        }
SWIGINTERN MarkovFunctionalPtr *new_MarkovFunctionalPtr__SWIG_0(Handle< YieldTermStructure > const &termStructure,Real const reversion,std::vector< Date > const &volstepdates,std::vector< Real > const &volatilities,Handle< SwaptionVolatilityStructure > const &swaptionVol,std::vector< Date > const &swaptionExpiries,std::vector< Period > const &swaptionTenors,SwapIndexPtr const &swapIndexBase,Size const yGridPoints=64,Real const yStdDevs=7.0,Size const gaussHermitePoints=32,Real const digitalGap=1E-5,Real const marketRateAccuracy=1E-7,Real const lowerRateBound=0.0,Real const upperRateBound=2.0,int const adjustments=MarkovFunctional::ModelSettings::KahaleSmile|MarkovFunctional::ModelSettings::SmileExponentialExtrapolation,std::vector< Real > const &smileMoneyCheckpoints=std::vector< Real >()){
            const boost::shared_ptr<SwapIndex> swapIndex =
                boost::dynamic_pointer_cast<SwapIndex>(swapIndexBase);
            MarkovFunctional::ModelSettings modelSettings =
                MarkovFunctional::ModelSettings(yGridPoints, yStdDevs,
                                                gaussHermitePoints, digitalGap,
                                                marketRateAccuracy,
                                                lowerRateBound,
                                                upperRateBound,
                                                adjustments,
                                                smileMoneyCheckpoints);
            return new MarkovFunctionalPtr(
                new MarkovFunctional(termStructure, reversion,
                                     volstepdates, volatilities,
                                     swaptionVol, swaptionExpiries,
                                     swaptionTenors, swapIndex,
                                     modelSettings));
        }
SWIGINTERN void MarkovFunctionalPtr_calibrate__SWIG_0(MarkovFunctionalPtr *self,std::vector< boost::shared_ptr< CalibrationHelper > > const &helper,OptimizationMethod &method,EndCriteria const &endCriteria,Constraint const &constraint=Constraint(),std::vector< Real > const &weights=std::vector< Real >(),std::vector< bool > const &fixParameters=std::vector< bool >()){
            boost::dynamic_pointer_cast<MarkovFunctional>(*self)->calibrate(helper, method, 
                                                                            endCriteria, constraint, weights, fixParameters);
        }
SWIGINTERN Array const &MarkovFunctionalPtr_volatility(MarkovFunctionalPtr const *self){
            return boost::dynamic_pointer_cast<MarkovFunctional>(*self)
                ->volatility();
        }

using QuantLib::Gaussian1dSwaptionEngine;
using QuantLib::Gaussian1dJamshidianSwaptionEngine;
using QuantLib::Gaussian1dNonstandardSwaptionEngine;
using QuantLib::Gaussian1dFloatFloatSwaptionEngine;
 
typedef boost::shared_ptr<PricingEngine> Gaussian1dSwaptionEnginePtr;
typedef boost::shared_ptr<PricingEngine> Gaussian1dJamshidianSwaptionEnginePtr;
typedef boost::shared_ptr<PricingEngine> Gaussian1dNonstandardSwaptionEnginePtr;
typedef boost::shared_ptr<PricingEngine> Gaussian1dFloatFloatSwaptionEnginePtr;

SWIGINTERN Gaussian1dSwaptionEnginePtr *new_Gaussian1dSwaptionEnginePtr__SWIG_0(boost::shared_ptr< Gaussian1dModel > const &model,int const integrationPoints=64,Real const stddevs=7.0,bool const extrapolatePayoff=true,bool const flatPayoffExtrapolation=false,Handle< YieldTermStructure > const &discountCurve=Handle< YieldTermStructure >()){
            return new Gaussian1dSwaptionEnginePtr(new Gaussian1dSwaptionEngine(model, integrationPoints, 
                    stddevs, extrapolatePayoff, flatPayoffExtrapolation, discountCurve));
        }
SWIGINTERN Gaussian1dJamshidianSwaptionEnginePtr *new_Gaussian1dJamshidianSwaptionEnginePtr(boost::shared_ptr< Gaussian1dModel > const &model){
            return new Gaussian1dJamshidianSwaptionEnginePtr(new Gaussian1dJamshidianSwaptionEngine(model));
        }
SWIGINTERN Gaussian1dNonstandardSwaptionEnginePtr *new_Gaussian1dNonstandardSwaptionEnginePtr__SWIG_0(boost::shared_ptr< Gaussian1dModel > const &model,int const integrationPoints=64,Real const stddevs=7.0,bool const extrapolatePayoff=true,bool const flatPayoffExtrapolation=false,Handle< Quote > const &oas=Handle< Quote >(),Handle< YieldTermStructure > const &discountCurve=Handle< YieldTermStructure >()){
            return new Gaussian1dNonstandardSwaptionEnginePtr(new Gaussian1dNonstandardSwaptionEngine(model, integrationPoints, 
                    stddevs, extrapolatePayoff, flatPayoffExtrapolation, oas, discountCurve));
        }
SWIGINTERN Gaussian1dFloatFloatSwaptionEnginePtr *new_Gaussian1dFloatFloatSwaptionEnginePtr__SWIG_0(boost::shared_ptr< Gaussian1dModel > const &model,int const integrationPoints=64,Real const stddevs=7.0,bool const extrapolatePayoff=true,bool const flatPayoffExtrapolation=false,Handle< Quote > const &oas=Handle< Quote >(),Handle< YieldTermStructure > const &discountCurve=Handle< YieldTermStructure >(),bool const includeTodaysExercise=false,Gaussian1dFloatFloatSwaptionEngine::Probabilities const probabilities=Gaussian1dFloatFloatSwaptionEngine::None){
            return new Gaussian1dFloatFloatSwaptionEnginePtr(
                new Gaussian1dFloatFloatSwaptionEngine(model,
                                                       integrationPoints,
                                                       stddevs,
                                                       extrapolatePayoff,
                                                       flatPayoffExtrapolation,
                                                       oas,
                                                       discountCurve,
                                                       includeTodaysExercise,
                                                       probabilities));
        }

using QuantLib::SegmentIntegral;
using QuantLib::TrapezoidIntegral;
using QuantLib::Default;
using QuantLib::MidPoint;
using QuantLib::SimpsonIntegral;
using QuantLib::GaussKronrodAdaptive;
using QuantLib::GaussKronrodNonAdaptive;
using QuantLib::GaussLobattoIntegral;
using QuantLib::GaussLaguerreIntegration;
using QuantLib::GaussHermiteIntegration;
using QuantLib::GaussJacobiIntegration;
using QuantLib::GaussHyperbolicIntegration;
using QuantLib::GaussLegendreIntegration;
using QuantLib::GaussChebyshevIntegration;
using QuantLib::GaussChebyshev2ndIntegration;
using QuantLib::GaussGegenbauerIntegration;


using QuantLib::Sample;

using QuantLib::LecuyerUniformRng;
using QuantLib::KnuthUniformRng;
using QuantLib::MersenneTwisterUniformRng;

typedef QuantLib::PseudoRandom::urng_type UniformRandomGenerator;

using QuantLib::CLGaussianRng;
using QuantLib::BoxMullerGaussianRng;
using QuantLib::InverseCumulativeRng;

typedef QuantLib::PseudoRandom::rng_type GaussianRandomGenerator;

using QuantLib::RandomSequenceGenerator;

typedef QuantLib::PseudoRandom::ursg_type UniformRandomSequenceGenerator;
using QuantLib::SobolBrownianGenerator;

using QuantLib::HaltonRsg;
using QuantLib::SobolRsg;
using QuantLib::SobolBrownianBridgeRsg;

typedef QuantLib::LowDiscrepancy::ursg_type
    UniformLowDiscrepancySequenceGenerator;

using QuantLib::InverseCumulativeRsg;

typedef QuantLib::PseudoRandom::rsg_type GaussianRandomSequenceGenerator;
typedef QuantLib::LowDiscrepancy::rsg_type
    GaussianLowDiscrepancySequenceGenerator;

SWIGINTERN double Sample_Sl_Real_Sg__value(Sample< Real > *self){ return self->value; }
SWIGINTERN Real Sample_Sl_Real_Sg__weight(Sample< Real > *self){ return self->weight; }
SWIGINTERN Array Sample_Sl_Array_Sg__value(Sample< Array > *self){ return self->value; }
SWIGINTERN Real Sample_Sl_Array_Sg__weight(Sample< Array > *self){ return self->weight; }
SWIGINTERN std::vector< double > Sample_Sl_std_vector_Sl_Real_Sg__Sg__value(Sample< std::vector< Real > > *self){ return self->value; }
SWIGINTERN Real Sample_Sl_std_vector_Sl_Real_Sg__Sg__weight(Sample< std::vector< Real > > *self){ return self->weight; }
SWIGINTERN Real UniformRandomGenerator_nextValue(UniformRandomGenerator const *self){
			return (*self).next().value;
		}
SWIGINTERN Real GaussianRandomGenerator_nextValue(GaussianRandomGenerator const *self){
			return (*self).next().value;
		}
SWIGINTERN std::vector< unsigned int > SobolRsg_nextInt32Sequence(SobolRsg *self){
        const std::vector<boost::uint_least32_t> &tmp = self->nextInt32Sequence();
        std::vector<unsigned int> outp(tmp.size());
        std::copy(tmp.begin(),tmp.end(),outp.begin());
        return outp;
      }

Matrix getCovariance(const Array& volatilities, const Matrix& correlations) {
    return QuantLib::getCovariance(volatilities.begin(),
                                   volatilities.end(),
                                   correlations);
}


using QuantLib::Path;


typedef QuantLib::PathGenerator<GaussianRandomSequenceGenerator>
    GaussianPathGenerator;

SWIGINTERN Path Sample_Sl_Path_Sg__value(Sample< Path > *self){ return self->value; }
SWIGINTERN Real Sample_Sl_Path_Sg__weight(Sample< Path > *self){ return self->weight; }
SWIGINTERN GaussianPathGenerator *new_GaussianPathGenerator(StochasticProcess1DPtr const &process,Time length,Size steps,GaussianRandomSequenceGenerator const &rsg,bool brownianBridge){
            boost::shared_ptr<StochasticProcess1D> process1d =
                boost::dynamic_pointer_cast<StochasticProcess1D>(process);
            return new GaussianPathGenerator(process1d,length,steps,
                                             rsg,brownianBridge);
        }

typedef QuantLib::PathGenerator<GaussianLowDiscrepancySequenceGenerator>
    GaussianSobolPathGenerator;

SWIGINTERN GaussianSobolPathGenerator *new_GaussianSobolPathGenerator(StochasticProcess1DPtr const &process,Time length,Size steps,GaussianLowDiscrepancySequenceGenerator const &rsg,bool brownianBridge){
            boost::shared_ptr<StochasticProcess1D> process1d =
                boost::dynamic_pointer_cast<StochasticProcess1D>(process);
            return new GaussianSobolPathGenerator(process1d,length,steps,
                                                  rsg,brownianBridge);
        }

using QuantLib::MultiPath;


typedef QuantLib::MultiPathGenerator<GaussianRandomSequenceGenerator>
    GaussianMultiPathGenerator;

SWIGINTERN MultiPath Sample_Sl_MultiPath_Sg__value(Sample< MultiPath > *self){ return self->value; }
SWIGINTERN Real Sample_Sl_MultiPath_Sg__weight(Sample< MultiPath > *self){ return self->weight; }
SWIGINTERN GaussianMultiPathGenerator *new_GaussianMultiPathGenerator__SWIG_0(boost::shared_ptr< StochasticProcess > const &process,std::vector< Time > const &times,GaussianRandomSequenceGenerator const &generator,bool brownianBridge=false){
          return new GaussianMultiPathGenerator(process,
                                                QuantLib::TimeGrid(
                                                    times.begin(),
                                                    times.end()),
                                                generator,
                                                brownianBridge);
      }

using QuantLib::BrownianBridge;

SWIGINTERN std::vector< Real > BrownianBridge_transform(BrownianBridge *self,std::vector< Real > const &input){
      std::vector<Real> outp(input.size());
      self->transform(input.begin(),input.end(),outp.begin());
      return outp;
    }
SWIGINTERN std::vector< unsigned int > BrownianBridge_bridgeIndex(BrownianBridge const *self){
    	const std::vector<Size> &tmp = self->bridgeIndex();
    	std::vector<unsigned int> outp(tmp.size());
    	std::copy(tmp.begin(), tmp.end(), outp.begin());
    	return outp;
    }
SWIGINTERN std::vector< unsigned int > BrownianBridge_leftIndex(BrownianBridge const *self){
    	const std::vector<Size> &tmp = self->leftIndex();
    	std::vector<unsigned int> outp(tmp.size());
    	std::copy(tmp.begin(), tmp.end(), outp.begin());
    	return outp;
    }
SWIGINTERN std::vector< unsigned int > BrownianBridge_rightIndex(BrownianBridge const *self){
    	const std::vector<Size> &tmp = self->rightIndex();
    	std::vector<unsigned int> outp(tmp.size());
    	std::copy(tmp.begin(), tmp.end(), outp.begin());
    	return outp;
    }

typedef QuantLib::BoundaryCondition<QuantLib::TridiagonalOperator>
        DefaultBoundaryCondition;

SWIGINTERN bool boost_shared_ptr_Sl_DefaultBoundaryCondition_Sg__isNull(boost::shared_ptr< DefaultBoundaryCondition > *self){
                return !(*self);
            }

using QuantLib::NeumannBC;
using QuantLib::DirichletBC;
typedef boost::shared_ptr<DefaultBoundaryCondition> NeumannBCPtr;
typedef boost::shared_ptr<DefaultBoundaryCondition> DirichletBCPtr;

SWIGINTERN NeumannBCPtr *new_NeumannBCPtr(Real value,DefaultBoundaryCondition::Side side){
            return new NeumannBCPtr(new NeumannBC(value, side));
        }
SWIGINTERN DirichletBCPtr *new_DirichletBCPtr(Real value,DefaultBoundaryCondition::Side side){
            return new DirichletBCPtr(new DirichletBC(value, side));
        }

using QuantLib::TridiagonalOperator;


using QuantLib::DPlus;
using QuantLib::DMinus;
using QuantLib::DZero;
using QuantLib::DPlusDMinus;


using QuantLib::Discount;
using QuantLib::ZeroYield;
using QuantLib::ForwardRate;


using QuantLib::PiecewiseYieldCurve;


typedef boost::shared_ptr<YieldTermStructure> PiecewiseFlatForwardPtr;

SWIGINTERN PiecewiseFlatForwardPtr *new_PiecewiseFlatForwardPtr__SWIG_0(Date const &referenceDate,std::vector< boost::shared_ptr< RateHelper > > const &instruments,DayCounter const &dayCounter,std::vector< Handle< Quote > > const &jumps=std::vector< Handle< Quote > >(),std::vector< Date > const &jumpDates=std::vector< Date >(),Real accuracy=1.0e-12,BackwardFlat const &i=BackwardFlat()){
            return new PiecewiseFlatForwardPtr(
                new PiecewiseYieldCurve<ForwardRate,BackwardFlat>(
                                                 referenceDate,instruments,
                                                 dayCounter, jumps, jumpDates,
                                                 accuracy,i));
        }
SWIGINTERN PiecewiseFlatForwardPtr *new_PiecewiseFlatForwardPtr__SWIG_5(Integer settlementDays,Calendar const &calendar,std::vector< boost::shared_ptr< RateHelper > > const &instruments,DayCounter const &dayCounter,std::vector< Handle< Quote > > const &jumps=std::vector< Handle< Quote > >(),std::vector< Date > const &jumpDates=std::vector< Date >(),Real accuracy=1.0e-12,BackwardFlat const &i=BackwardFlat()){
            return new PiecewiseFlatForwardPtr(
                new PiecewiseYieldCurve<ForwardRate,BackwardFlat>(
                                        settlementDays, calendar, instruments,
                                        dayCounter, jumps, jumpDates,
                                        accuracy, i));
        }
SWIGINTERN std::vector< Date > const &PiecewiseFlatForwardPtr_dates(PiecewiseFlatForwardPtr *self){
            typedef PiecewiseYieldCurve<ForwardRate,BackwardFlat> PiecewiseFlatForward;
            return boost::dynamic_pointer_cast<PiecewiseFlatForward>(*self)->dates();
        }
SWIGINTERN std::vector< Time > const &PiecewiseFlatForwardPtr_times(PiecewiseFlatForwardPtr *self){
            typedef PiecewiseYieldCurve<ForwardRate,BackwardFlat> PiecewiseFlatForward;
            return boost::dynamic_pointer_cast<PiecewiseFlatForward>(*self)->times();
        }
SWIGINTERN std::vector< std::pair< Date,Real > > PiecewiseFlatForwardPtr_nodes(PiecewiseFlatForwardPtr *self){
            typedef PiecewiseYieldCurve<ForwardRate,BackwardFlat> PiecewiseFlatForward;
            return boost::dynamic_pointer_cast<PiecewiseFlatForward>(*self)->nodes();
        }

typedef boost::shared_ptr<YieldTermStructure> PiecewiseLinearForwardPtr;

SWIGINTERN PiecewiseLinearForwardPtr *new_PiecewiseLinearForwardPtr__SWIG_0(Date const &referenceDate,std::vector< boost::shared_ptr< RateHelper > > const &instruments,DayCounter const &dayCounter,std::vector< Handle< Quote > > const &jumps=std::vector< Handle< Quote > >(),std::vector< Date > const &jumpDates=std::vector< Date >(),Real accuracy=1.0e-12,Linear const &i=Linear()){
            return new PiecewiseLinearForwardPtr(
                new PiecewiseYieldCurve<ForwardRate,Linear>(
                                                 referenceDate,instruments,
                                                 dayCounter, jumps, jumpDates,
                                                 accuracy,i));
        }
SWIGINTERN PiecewiseLinearForwardPtr *new_PiecewiseLinearForwardPtr__SWIG_5(Integer settlementDays,Calendar const &calendar,std::vector< boost::shared_ptr< RateHelper > > const &instruments,DayCounter const &dayCounter,std::vector< Handle< Quote > > const &jumps=std::vector< Handle< Quote > >(),std::vector< Date > const &jumpDates=std::vector< Date >(),Real accuracy=1.0e-12,Linear const &i=Linear()){
            return new PiecewiseLinearForwardPtr(
                new PiecewiseYieldCurve<ForwardRate,Linear>(
                                        settlementDays, calendar, instruments,
                                        dayCounter, jumps, jumpDates,
                                        accuracy, i));
        }
SWIGINTERN std::vector< Date > const &PiecewiseLinearForwardPtr_dates(PiecewiseLinearForwardPtr *self){
            typedef PiecewiseYieldCurve<ForwardRate,Linear> PiecewiseLinearForward;
            return boost::dynamic_pointer_cast<PiecewiseLinearForward>(*self)->dates();
        }
SWIGINTERN std::vector< Time > const &PiecewiseLinearForwardPtr_times(PiecewiseLinearForwardPtr *self){
            typedef PiecewiseYieldCurve<ForwardRate,Linear> PiecewiseLinearForward;
            return boost::dynamic_pointer_cast<PiecewiseLinearForward>(*self)->times();
        }
SWIGINTERN std::vector< std::pair< Date,Real > > PiecewiseLinearForwardPtr_nodes(PiecewiseLinearForwardPtr *self){
            typedef PiecewiseYieldCurve<ForwardRate,Linear> PiecewiseLinearForward;
            return boost::dynamic_pointer_cast<PiecewiseLinearForward>(*self)->nodes();
        }

typedef boost::shared_ptr<YieldTermStructure> PiecewiseLinearZeroPtr;

SWIGINTERN PiecewiseLinearZeroPtr *new_PiecewiseLinearZeroPtr__SWIG_0(Date const &referenceDate,std::vector< boost::shared_ptr< RateHelper > > const &instruments,DayCounter const &dayCounter,std::vector< Handle< Quote > > const &jumps=std::vector< Handle< Quote > >(),std::vector< Date > const &jumpDates=std::vector< Date >(),Real accuracy=1.0e-12,Linear const &i=Linear()){
            return new PiecewiseLinearZeroPtr(
                new PiecewiseYieldCurve<ZeroYield,Linear>(
                                                 referenceDate,instruments,
                                                 dayCounter, jumps, jumpDates,
                                                 accuracy,i));
        }
SWIGINTERN PiecewiseLinearZeroPtr *new_PiecewiseLinearZeroPtr__SWIG_5(Integer settlementDays,Calendar const &calendar,std::vector< boost::shared_ptr< RateHelper > > const &instruments,DayCounter const &dayCounter,std::vector< Handle< Quote > > const &jumps=std::vector< Handle< Quote > >(),std::vector< Date > const &jumpDates=std::vector< Date >(),Real accuracy=1.0e-12,Linear const &i=Linear()){
            return new PiecewiseLinearZeroPtr(
                new PiecewiseYieldCurve<ZeroYield,Linear>(
                                        settlementDays, calendar, instruments,
                                        dayCounter, jumps, jumpDates,
                                        accuracy, i));
        }
SWIGINTERN std::vector< Date > const &PiecewiseLinearZeroPtr_dates(PiecewiseLinearZeroPtr *self){
            typedef PiecewiseYieldCurve<ZeroYield,Linear> PiecewiseLinearZero;
            return boost::dynamic_pointer_cast<PiecewiseLinearZero>(*self)->dates();
        }
SWIGINTERN std::vector< Time > const &PiecewiseLinearZeroPtr_times(PiecewiseLinearZeroPtr *self){
            typedef PiecewiseYieldCurve<ZeroYield,Linear> PiecewiseLinearZero;
            return boost::dynamic_pointer_cast<PiecewiseLinearZero>(*self)->times();
        }
SWIGINTERN std::vector< std::pair< Date,Real > > PiecewiseLinearZeroPtr_nodes(PiecewiseLinearZeroPtr *self){
            typedef PiecewiseYieldCurve<ZeroYield,Linear> PiecewiseLinearZero;
            return boost::dynamic_pointer_cast<PiecewiseLinearZero>(*self)->nodes();
        }

typedef boost::shared_ptr<YieldTermStructure> PiecewiseCubicZeroPtr;

SWIGINTERN PiecewiseCubicZeroPtr *new_PiecewiseCubicZeroPtr__SWIG_0(Date const &referenceDate,std::vector< boost::shared_ptr< RateHelper > > const &instruments,DayCounter const &dayCounter,std::vector< Handle< Quote > > const &jumps=std::vector< Handle< Quote > >(),std::vector< Date > const &jumpDates=std::vector< Date >(),Real accuracy=1.0e-12,Cubic const &i=Cubic()){
            return new PiecewiseCubicZeroPtr(
                new PiecewiseYieldCurve<ZeroYield,Cubic>(
                                                 referenceDate,instruments,
                                                 dayCounter, jumps, jumpDates,
                                                 accuracy,i));
        }
SWIGINTERN PiecewiseCubicZeroPtr *new_PiecewiseCubicZeroPtr__SWIG_5(Integer settlementDays,Calendar const &calendar,std::vector< boost::shared_ptr< RateHelper > > const &instruments,DayCounter const &dayCounter,std::vector< Handle< Quote > > const &jumps=std::vector< Handle< Quote > >(),std::vector< Date > const &jumpDates=std::vector< Date >(),Real accuracy=1.0e-12,Cubic const &i=Cubic()){
            return new PiecewiseCubicZeroPtr(
                new PiecewiseYieldCurve<ZeroYield,Cubic>(
                                        settlementDays, calendar, instruments,
                                        dayCounter, jumps, jumpDates,
                                        accuracy, i));
        }
SWIGINTERN std::vector< Date > const &PiecewiseCubicZeroPtr_dates(PiecewiseCubicZeroPtr *self){
            typedef PiecewiseYieldCurve<ZeroYield,Cubic> PiecewiseCubicZero;
            return boost::dynamic_pointer_cast<PiecewiseCubicZero>(*self)->dates();
        }
SWIGINTERN std::vector< Time > const &PiecewiseCubicZeroPtr_times(PiecewiseCubicZeroPtr *self){
            typedef PiecewiseYieldCurve<ZeroYield,Cubic> PiecewiseCubicZero;
            return boost::dynamic_pointer_cast<PiecewiseCubicZero>(*self)->times();
        }
SWIGINTERN std::vector< std::pair< Date,Real > > PiecewiseCubicZeroPtr_nodes(PiecewiseCubicZeroPtr *self){
            typedef PiecewiseYieldCurve<ZeroYield,Cubic> PiecewiseCubicZero;
            return boost::dynamic_pointer_cast<PiecewiseCubicZero>(*self)->nodes();
        }

typedef boost::shared_ptr<YieldTermStructure> PiecewiseLogCubicDiscountPtr;

SWIGINTERN PiecewiseLogCubicDiscountPtr *new_PiecewiseLogCubicDiscountPtr__SWIG_0(Date const &referenceDate,std::vector< boost::shared_ptr< RateHelper > > const &instruments,DayCounter const &dayCounter,std::vector< Handle< Quote > > const &jumps=std::vector< Handle< Quote > >(),std::vector< Date > const &jumpDates=std::vector< Date >(),Real accuracy=1.0e-12,MonotonicLogCubic const &i=MonotonicLogCubic()){
            return new PiecewiseLogCubicDiscountPtr(
                new PiecewiseYieldCurve<Discount,MonotonicLogCubic>(
                                                 referenceDate,instruments,
                                                 dayCounter, jumps, jumpDates,
                                                 accuracy,i));
        }
SWIGINTERN PiecewiseLogCubicDiscountPtr *new_PiecewiseLogCubicDiscountPtr__SWIG_5(Integer settlementDays,Calendar const &calendar,std::vector< boost::shared_ptr< RateHelper > > const &instruments,DayCounter const &dayCounter,std::vector< Handle< Quote > > const &jumps=std::vector< Handle< Quote > >(),std::vector< Date > const &jumpDates=std::vector< Date >(),Real accuracy=1.0e-12,MonotonicLogCubic const &i=MonotonicLogCubic()){
            return new PiecewiseLogCubicDiscountPtr(
                new PiecewiseYieldCurve<Discount,MonotonicLogCubic>(
                                        settlementDays, calendar, instruments,
                                        dayCounter, jumps, jumpDates,
                                        accuracy, i));
        }
SWIGINTERN std::vector< Date > const &PiecewiseLogCubicDiscountPtr_dates(PiecewiseLogCubicDiscountPtr *self){
            typedef PiecewiseYieldCurve<Discount,MonotonicLogCubic> PiecewiseLogCubicDiscount;
            return boost::dynamic_pointer_cast<PiecewiseLogCubicDiscount>(*self)->dates();
        }
SWIGINTERN std::vector< Time > const &PiecewiseLogCubicDiscountPtr_times(PiecewiseLogCubicDiscountPtr *self){
            typedef PiecewiseYieldCurve<Discount,MonotonicLogCubic> PiecewiseLogCubicDiscount;
            return boost::dynamic_pointer_cast<PiecewiseLogCubicDiscount>(*self)->times();
        }
SWIGINTERN std::vector< std::pair< Date,Real > > PiecewiseLogCubicDiscountPtr_nodes(PiecewiseLogCubicDiscountPtr *self){
            typedef PiecewiseYieldCurve<Discount,MonotonicLogCubic> PiecewiseLogCubicDiscount;
            return boost::dynamic_pointer_cast<PiecewiseLogCubicDiscount>(*self)->nodes();
        }

using QuantLib::Settings;

SWIGINTERN Date Settings_getEvaluationDate(Settings *self){
            return self->evaluationDate();
        }
SWIGINTERN void Settings_setEvaluationDate(Settings *self,Date const &d){
            self->evaluationDate() = d;
        }
SWIGINTERN void Settings_includeReferenceDateEvents(Settings *self,bool b){
            self->includeReferenceDateEvents() = b;
        }
SWIGINTERN void Settings_includeTodaysCashFlows(Settings *self,bool b){
            self->includeTodaysCashFlows() = b;
        }

using QuantLib::Statistics;
using QuantLib::IncrementalStatistics;
using QuantLib::RiskStatistics;
using QuantLib::GenericSequenceStatistics;

SWIGINTERN void Statistics_add__SWIG_2(Statistics *self,std::vector< Real > const &values){
            self->addSequence(values.begin(), values.end());
        }
SWIGINTERN void Statistics_add__SWIG_3(Statistics *self,std::vector< Real > const &values,std::vector< Real > const &weights){
            self->addSequence(values.begin(), values.end(), weights.begin());
        }
SWIGINTERN void IncrementalStatistics_add__SWIG_2(IncrementalStatistics *self,std::vector< Real > const &values){
            self->addSequence(values.begin(), values.end());
        }
SWIGINTERN void IncrementalStatistics_add__SWIG_3(IncrementalStatistics *self,std::vector< Real > const &values,std::vector< Real > const &weights){
            self->addSequence(values.begin(), values.end(), weights.begin());
        }

using QuantLib::CapFloorTermVolatilityStructure;

SWIGINTERN bool boost_shared_ptr_Sl_CapFloorTermVolatilityStructure_Sg__isNull(boost::shared_ptr< CapFloorTermVolatilityStructure > *self){
                return !(*self);
            }
SWIGINTERN boost::shared_ptr< Observable > boost_shared_ptr_Sl_CapFloorTermVolatilityStructure_Sg__asObservable(boost::shared_ptr< CapFloorTermVolatilityStructure > *self){
        return boost::shared_ptr<Observable>(*self);
    }
SWIGINTERN boost::shared_ptr< Observable > Handle_Sl_CapFloorTermVolatilityStructure_Sg__asObservable(Handle< CapFloorTermVolatilityStructure > *self){
        return boost::shared_ptr<Observable>(*self);
    }

using QuantLib::CapFloorTermVolCurve;
typedef boost::shared_ptr<CapFloorTermVolatilityStructure> CapFloorTermVolCurvePtr;

SWIGINTERN CapFloorTermVolCurvePtr *new_CapFloorTermVolCurvePtr__SWIG_0(Date const &referenceDate,Calendar const &calendar,BusinessDayConvention bdc,std::vector< Period > const &lengths,std::vector< Volatility > const &vols,DayCounter const &dc=QuantLib::Actual365Fixed()){
            return new CapFloorTermVolCurvePtr(
                new CapFloorTermVolCurve(referenceDate,calendar,bdc,
                                         lengths,vols,dc));
        }
SWIGINTERN CapFloorTermVolCurvePtr *new_CapFloorTermVolCurvePtr__SWIG_2(Natural settlementDays,Calendar const &calendar,BusinessDayConvention bdc,std::vector< Period > const &lengths,std::vector< Volatility > const &vols,DayCounter const &dc=QuantLib::Actual365Fixed()){
            return new CapFloorTermVolCurvePtr(
                new CapFloorTermVolCurve(settlementDays,calendar,bdc,
                                         lengths,vols,dc));
        }

using QuantLib::CapFloorTermVolSurface;
typedef boost::shared_ptr<CapFloorTermVolatilityStructure> CapFloorTermVolSurfacePtr;

SWIGINTERN CapFloorTermVolSurfacePtr *new_CapFloorTermVolSurfacePtr__SWIG_0(Natural settlementDays,Calendar const &calendar,BusinessDayConvention bdc,std::vector< Period > const &optionTenors,std::vector< Rate > const &strikes,std::vector< std::vector< Handle< Quote > > > const &quotes,DayCounter const &dc=QuantLib::Actual365Fixed()){
            return new CapFloorTermVolSurfacePtr(new CapFloorTermVolSurface(settlementDays, 
            calendar,
            bdc,
            optionTenors,
            strikes,
            quotes,
            dc));
        }
SWIGINTERN CapFloorTermVolSurfacePtr *new_CapFloorTermVolSurfacePtr__SWIG_2(Date const &settlementDate,Calendar const &calendar,BusinessDayConvention bdc,std::vector< Period > const &optionTenors,std::vector< Rate > const &strikes,std::vector< std::vector< Handle< Quote > > > const &quotes,DayCounter const &dc=QuantLib::Actual365Fixed()){
            return new CapFloorTermVolSurfacePtr(new CapFloorTermVolSurface(settlementDate, 
            calendar,
            bdc,
            optionTenors,
            strikes,
            quotes,
            dc));
        }
SWIGINTERN CapFloorTermVolSurfacePtr *new_CapFloorTermVolSurfacePtr__SWIG_4(Date const &settlementDate,Calendar const &calendar,BusinessDayConvention bdc,std::vector< Period > const &optionTenors,std::vector< Rate > const &strikes,Matrix const &volatilities,DayCounter const &dc=QuantLib::Actual365Fixed()){
            return new CapFloorTermVolSurfacePtr(new CapFloorTermVolSurface(settlementDate, 
            calendar,
            bdc,
            optionTenors,
            strikes,
            volatilities,
            dc));
        }
SWIGINTERN CapFloorTermVolSurfacePtr *new_CapFloorTermVolSurfacePtr__SWIG_6(Natural settlementDays,Calendar const &calendar,BusinessDayConvention bdc,std::vector< Period > const &optionTenors,std::vector< Rate > const &strikes,Matrix const &volatilities,DayCounter const &dc=QuantLib::Actual365Fixed()){ 
            return new CapFloorTermVolSurfacePtr(new CapFloorTermVolSurface(settlementDays, 
            calendar,
            bdc,
            optionTenors,
            strikes,
            volatilities,
            dc));
        }

using QuantLib::StrippedOptionletBase;
using QuantLib::VolatilityType;

SWIGINTERN bool boost_shared_ptr_Sl_StrippedOptionletBase_Sg__isNull(boost::shared_ptr< StrippedOptionletBase > *self){
                return !(*self);
            }

using QuantLib::OptionletStripper1;
typedef boost::shared_ptr<StrippedOptionletBase> OptionletStripper1Ptr;

SWIGINTERN OptionletStripper1Ptr *new_OptionletStripper1Ptr__SWIG_0(CapFloorTermVolSurfacePtr const &parVolSurface,IborIndexPtr const &index,Rate switchStrikes=Null< Rate >(),Real accuracy=1.0e-6,Natural maxIter=100,Handle< YieldTermStructure > const &discount=Handle< YieldTermStructure >(),VolatilityType type=ShiftedLognormal,Real displacement=0.0,bool dontThrow=false){
            boost::shared_ptr<CapFloorTermVolSurface> surface = 
                boost::dynamic_pointer_cast<CapFloorTermVolSurface>(parVolSurface);
            boost::shared_ptr<IborIndex> idx =
                boost::dynamic_pointer_cast<IborIndex>(index);
            return new OptionletStripper1Ptr(new OptionletStripper1(surface,
                                                                    idx,
                                                                    switchStrikes,
                                                                    accuracy,
                                                                    maxIter,
                                                                    discount,
                                                                    type,
                                                                    displacement,
                                                                    dontThrow));
        }
SWIGINTERN Matrix const &OptionletStripper1Ptr_capFloorPrices(OptionletStripper1Ptr const *self){
            return boost::dynamic_pointer_cast<OptionletStripper1>(*self)
                ->capFloorPrices();
        }
SWIGINTERN Matrix const &OptionletStripper1Ptr_capFloorVolatilities(OptionletStripper1Ptr const *self){
            return boost::dynamic_pointer_cast<OptionletStripper1>(*self)
                ->capFloorVolatilities();
        }
SWIGINTERN Matrix const &OptionletStripper1Ptr_optionletPrices(OptionletStripper1Ptr const *self){
            return boost::dynamic_pointer_cast<OptionletStripper1>(*self)
                ->optionletPrices();
        }
SWIGINTERN Rate OptionletStripper1Ptr_switchStrike(OptionletStripper1Ptr const *self){
            return boost::dynamic_pointer_cast<OptionletStripper1>(*self)
                ->switchStrike();
        }

using QuantLib::StrippedOptionletAdapter;
typedef boost::shared_ptr<OptionletVolatilityStructure>
   StrippedOptionletAdapterPtr;

SWIGINTERN StrippedOptionletAdapterPtr *new_StrippedOptionletAdapterPtr(boost::shared_ptr< StrippedOptionletBase > const &stripper){
            return new StrippedOptionletAdapterPtr(
                new StrippedOptionletAdapter(stripper));
        }

using QuantLib::Actual365Fixed;
using QuantLib::Swaption;
using QuantLib::NonstandardSwaption;
using QuantLib::Settlement;
using QuantLib::FloatFloatSwaption;
typedef boost::shared_ptr<Instrument> SwaptionPtr;
typedef boost::shared_ptr<Instrument> NonstandardSwaptionPtr;
typedef boost::shared_ptr<Instrument> FloatFloatSwaptionPtr;

SWIGINTERN SwaptionPtr *new_SwaptionPtr__SWIG_0(VanillaSwapPtr const &simpleSwap,boost::shared_ptr< Exercise > const &exercise,Settlement::Type type=Settlement::Physical){
            boost::shared_ptr<VanillaSwap> swap =
                 boost::dynamic_pointer_cast<VanillaSwap>(simpleSwap);
            QL_REQUIRE(swap, "simple swap required");
            return new SwaptionPtr(new Swaption(swap,exercise,type));
        }

using QuantLib::BasketGeneratingEngine;

SWIGINTERN NonstandardSwaptionPtr *new_NonstandardSwaptionPtr__SWIG_0(NonstandardSwapPtr const &nonstandardSwap,boost::shared_ptr< Exercise > const &exercise,Settlement::Type type=Settlement::Physical){
            boost::shared_ptr<NonstandardSwap> swap =
                 boost::dynamic_pointer_cast<NonstandardSwap>(nonstandardSwap);
            QL_REQUIRE(swap, "nonstandard swap required");
            return new NonstandardSwaptionPtr(new NonstandardSwaption(swap,exercise,type));
        }
SWIGINTERN std::vector< boost::shared_ptr< CalibrationHelper > > NonstandardSwaptionPtr_calibrationBasket(NonstandardSwaptionPtr *self,boost::shared_ptr< Index > standardSwapBase,boost::shared_ptr< SwaptionVolatilityStructure > swaptionVolatility,std::string typeStr){

            BasketGeneratingEngine::CalibrationBasketType type;
            if(typeStr == "Naive")
                type = BasketGeneratingEngine::Naive;
            else if(typeStr == "MaturityStrikeByDeltaGamma")
                type = BasketGeneratingEngine::MaturityStrikeByDeltaGamma;
            else
                QL_FAIL("type " << typeStr << "unknown.");
            boost::shared_ptr<SwapIndex> swapIndex =
                boost::dynamic_pointer_cast<SwapIndex>(standardSwapBase);
            return boost::dynamic_pointer_cast<NonstandardSwaption>(*self)->
                calibrationBasket(swapIndex, swaptionVolatility, type);
        }
SWIGINTERN FloatFloatSwaptionPtr *new_FloatFloatSwaptionPtr(FloatFloatSwapPtr const &simpleSwap,boost::shared_ptr< Exercise > const &exercise){
            boost::shared_ptr<FloatFloatSwap> swap =
                 boost::dynamic_pointer_cast<FloatFloatSwap>(simpleSwap);
            QL_REQUIRE(swap, "floatfloat swap required");
            return new FloatFloatSwaptionPtr(new FloatFloatSwaption(swap,exercise));
        }
SWIGINTERN std::vector< boost::shared_ptr< CalibrationHelper > > FloatFloatSwaptionPtr_calibrationBasket(FloatFloatSwaptionPtr *self,boost::shared_ptr< Index > standardSwapBase,boost::shared_ptr< SwaptionVolatilityStructure > swaptionVolatility,std::string typeStr){

            BasketGeneratingEngine::CalibrationBasketType type;
            if(typeStr == "Naive")
                type = BasketGeneratingEngine::Naive;
            else if(typeStr == "MaturityStrikeByDeltaGamma")
                type = BasketGeneratingEngine::MaturityStrikeByDeltaGamma;
            else
                QL_FAIL("type " << typeStr << "unknown.");
            boost::shared_ptr<SwapIndex> swapIndex =
                boost::dynamic_pointer_cast<SwapIndex>(standardSwapBase);
            return boost::dynamic_pointer_cast<FloatFloatSwaption>(*self)->
                calibrationBasket(swapIndex, swaptionVolatility, type);
        }
SWIGINTERN Real FloatFloatSwaptionPtr_underlyingValue(FloatFloatSwaptionPtr *self){
            return boost::dynamic_pointer_cast<FloatFloatSwaption>(*self)->result<Real>("underlyingValue");
        }

using QuantLib::BlackSwaptionEngine;
using QuantLib::BachelierSwaptionEngine;
typedef boost::shared_ptr<PricingEngine> BlackSwaptionEnginePtr;
typedef boost::shared_ptr<PricingEngine> BachelierSwaptionEnginePtr;

SWIGINTERN BlackSwaptionEnginePtr *new_BlackSwaptionEnginePtr__SWIG_0(Handle< YieldTermStructure > const &discountCurve,Handle< Quote > const &vol,DayCounter const &dc=Actual365Fixed(),Real displacement=0.0){
            return new BlackSwaptionEnginePtr(
                          new BlackSwaptionEngine(discountCurve, vol, dc, displacement));
        }
SWIGINTERN BlackSwaptionEnginePtr *new_BlackSwaptionEnginePtr__SWIG_3(Handle< YieldTermStructure > const &discountCurve,Handle< SwaptionVolatilityStructure > const &v){
            return new BlackSwaptionEnginePtr(
                                   new BlackSwaptionEngine(discountCurve, v));
        }
SWIGINTERN Real BlackSwaptionEnginePtr_vega(BlackSwaptionEnginePtr *self){
                return boost::dynamic_pointer_cast<Swaption>(*self)->result<Real>("vega");
        }
SWIGINTERN BachelierSwaptionEnginePtr *new_BachelierSwaptionEnginePtr__SWIG_0(Handle< YieldTermStructure > const &discountCurve,Handle< Quote > const &vol,DayCounter const &dc=Actual365Fixed()){
            return new BlackSwaptionEnginePtr(
                          new BachelierSwaptionEngine(discountCurve, vol, dc));
        }
SWIGINTERN BachelierSwaptionEnginePtr *new_BachelierSwaptionEnginePtr__SWIG_2(Handle< YieldTermStructure > const &discountCurve,Handle< SwaptionVolatilityStructure > const &v){
            return new BlackSwaptionEnginePtr(
                                   new BachelierSwaptionEngine(discountCurve, v));
        }


void enableTracing() { 
    QL_TRACE_ENABLE;
}

void disableTracing() {
    QL_TRACE_DISABLE;
}



using QuantLib::ConstantEstimator;
using QuantLib::SimpleLocalEstimator;
using QuantLib::GarmanKlassSigma1;
using QuantLib::ParkinsonSigma;
using QuantLib::GarmanKlassSigma3;
using QuantLib::GarmanKlassSigma4;
using QuantLib::GarmanKlassSigma5;
using QuantLib::GarmanKlassSigma6;


using QuantLib::InterpolatedZeroCurve;


typedef boost::shared_ptr<YieldTermStructure> ZeroCurvePtr;

SWIGINTERN ZeroCurvePtr *new_ZeroCurvePtr__SWIG_0(std::vector< Date > const &dates,std::vector< Rate > const &yields,DayCounter const &dayCounter,Calendar const &calendar=Calendar(),Linear const &i=Linear(),Compounding compounding=Continuous,Frequency frequency=Annual){
            return new ZeroCurvePtr(
                new InterpolatedZeroCurve<Linear>(dates,yields,
                                                        dayCounter,
                                                        calendar,i,
                                                        compounding,
                                                        frequency));
        }
SWIGINTERN std::vector< Time > const &ZeroCurvePtr_times(ZeroCurvePtr *self){
            typedef InterpolatedZeroCurve<Linear> ZeroCurve;
            return boost::dynamic_pointer_cast<ZeroCurve>(*self)->times();
        }
SWIGINTERN std::vector< Real > const &ZeroCurvePtr_data(ZeroCurvePtr *self){
            typedef InterpolatedZeroCurve<Linear> ZeroCurve;
            return boost::dynamic_pointer_cast<ZeroCurve>(*self)->data();
        }
SWIGINTERN std::vector< Date > const &ZeroCurvePtr_dates(ZeroCurvePtr *self){
            typedef InterpolatedZeroCurve<Linear> ZeroCurve;
            return boost::dynamic_pointer_cast<ZeroCurve>(*self)->dates();
        }
SWIGINTERN std::vector< Rate > const &ZeroCurvePtr_zeroRates(ZeroCurvePtr *self){
            typedef InterpolatedZeroCurve<Linear> ZeroCurve;
            return boost::dynamic_pointer_cast<ZeroCurve>(*self)->zeroRates();
        }
SWIGINTERN std::vector< std::pair< Date,Rate > > ZeroCurvePtr_nodes(ZeroCurvePtr *self){
            typedef InterpolatedZeroCurve<Linear> ZeroCurve;
            return boost::dynamic_pointer_cast<ZeroCurve>(*self)->nodes();
        }

typedef boost::shared_ptr<YieldTermStructure> LogLinearZeroCurvePtr;

SWIGINTERN LogLinearZeroCurvePtr *new_LogLinearZeroCurvePtr__SWIG_0(std::vector< Date > const &dates,std::vector< Rate > const &yields,DayCounter const &dayCounter,Calendar const &calendar=Calendar(),LogLinear const &i=LogLinear(),Compounding compounding=Continuous,Frequency frequency=Annual){
            return new LogLinearZeroCurvePtr(
                new InterpolatedZeroCurve<LogLinear>(dates,yields,
                                                        dayCounter,
                                                        calendar,i,
                                                        compounding,
                                                        frequency));
        }
SWIGINTERN std::vector< Time > const &LogLinearZeroCurvePtr_times(LogLinearZeroCurvePtr *self){
            typedef InterpolatedZeroCurve<LogLinear> LogLinearZeroCurve;
            return boost::dynamic_pointer_cast<LogLinearZeroCurve>(*self)->times();
        }
SWIGINTERN std::vector< Real > const &LogLinearZeroCurvePtr_data(LogLinearZeroCurvePtr *self){
            typedef InterpolatedZeroCurve<LogLinear> LogLinearZeroCurve;
            return boost::dynamic_pointer_cast<LogLinearZeroCurve>(*self)->data();
        }
SWIGINTERN std::vector< Date > const &LogLinearZeroCurvePtr_dates(LogLinearZeroCurvePtr *self){
            typedef InterpolatedZeroCurve<LogLinear> LogLinearZeroCurve;
            return boost::dynamic_pointer_cast<LogLinearZeroCurve>(*self)->dates();
        }
SWIGINTERN std::vector< Rate > const &LogLinearZeroCurvePtr_zeroRates(LogLinearZeroCurvePtr *self){
            typedef InterpolatedZeroCurve<LogLinear> LogLinearZeroCurve;
            return boost::dynamic_pointer_cast<LogLinearZeroCurve>(*self)->zeroRates();
        }
SWIGINTERN std::vector< std::pair< Date,Rate > > LogLinearZeroCurvePtr_nodes(LogLinearZeroCurvePtr *self){
            typedef InterpolatedZeroCurve<LogLinear> LogLinearZeroCurve;
            return boost::dynamic_pointer_cast<LogLinearZeroCurve>(*self)->nodes();
        }

typedef boost::shared_ptr<YieldTermStructure> CubicZeroCurvePtr;

SWIGINTERN CubicZeroCurvePtr *new_CubicZeroCurvePtr__SWIG_0(std::vector< Date > const &dates,std::vector< Rate > const &yields,DayCounter const &dayCounter,Calendar const &calendar=Calendar(),Cubic const &i=Cubic(),Compounding compounding=Continuous,Frequency frequency=Annual){
            return new CubicZeroCurvePtr(
                new InterpolatedZeroCurve<Cubic>(dates,yields,
                                                        dayCounter,
                                                        calendar,i,
                                                        compounding,
                                                        frequency));
        }
SWIGINTERN std::vector< Time > const &CubicZeroCurvePtr_times(CubicZeroCurvePtr *self){
            typedef InterpolatedZeroCurve<Cubic> CubicZeroCurve;
            return boost::dynamic_pointer_cast<CubicZeroCurve>(*self)->times();
        }
SWIGINTERN std::vector< Real > const &CubicZeroCurvePtr_data(CubicZeroCurvePtr *self){
            typedef InterpolatedZeroCurve<Cubic> CubicZeroCurve;
            return boost::dynamic_pointer_cast<CubicZeroCurve>(*self)->data();
        }
SWIGINTERN std::vector< Date > const &CubicZeroCurvePtr_dates(CubicZeroCurvePtr *self){
            typedef InterpolatedZeroCurve<Cubic> CubicZeroCurve;
            return boost::dynamic_pointer_cast<CubicZeroCurve>(*self)->dates();
        }
SWIGINTERN std::vector< Rate > const &CubicZeroCurvePtr_zeroRates(CubicZeroCurvePtr *self){
            typedef InterpolatedZeroCurve<Cubic> CubicZeroCurve;
            return boost::dynamic_pointer_cast<CubicZeroCurve>(*self)->zeroRates();
        }
SWIGINTERN std::vector< std::pair< Date,Rate > > CubicZeroCurvePtr_nodes(CubicZeroCurvePtr *self){
            typedef InterpolatedZeroCurve<Cubic> CubicZeroCurve;
            return boost::dynamic_pointer_cast<CubicZeroCurve>(*self)->nodes();
        }

typedef boost::shared_ptr<YieldTermStructure> LogCubicZeroCurvePtr;

SWIGINTERN LogCubicZeroCurvePtr *new_LogCubicZeroCurvePtr__SWIG_0(std::vector< Date > const &dates,std::vector< Rate > const &yields,DayCounter const &dayCounter,Calendar const &calendar=Calendar(),DefaultLogCubic const &i=DefaultLogCubic(),Compounding compounding=Continuous,Frequency frequency=Annual){
            return new LogCubicZeroCurvePtr(
                new InterpolatedZeroCurve<DefaultLogCubic>(dates,yields,
                                                        dayCounter,
                                                        calendar,i,
                                                        compounding,
                                                        frequency));
        }
SWIGINTERN std::vector< Time > const &LogCubicZeroCurvePtr_times(LogCubicZeroCurvePtr *self){
            typedef InterpolatedZeroCurve<DefaultLogCubic> LogCubicZeroCurve;
            return boost::dynamic_pointer_cast<LogCubicZeroCurve>(*self)->times();
        }
SWIGINTERN std::vector< Real > const &LogCubicZeroCurvePtr_data(LogCubicZeroCurvePtr *self){
            typedef InterpolatedZeroCurve<DefaultLogCubic> LogCubicZeroCurve;
            return boost::dynamic_pointer_cast<LogCubicZeroCurve>(*self)->data();
        }
SWIGINTERN std::vector< Date > const &LogCubicZeroCurvePtr_dates(LogCubicZeroCurvePtr *self){
            typedef InterpolatedZeroCurve<DefaultLogCubic> LogCubicZeroCurve;
            return boost::dynamic_pointer_cast<LogCubicZeroCurve>(*self)->dates();
        }
SWIGINTERN std::vector< Rate > const &LogCubicZeroCurvePtr_zeroRates(LogCubicZeroCurvePtr *self){
            typedef InterpolatedZeroCurve<DefaultLogCubic> LogCubicZeroCurve;
            return boost::dynamic_pointer_cast<LogCubicZeroCurve>(*self)->zeroRates();
        }
SWIGINTERN std::vector< std::pair< Date,Rate > > LogCubicZeroCurvePtr_nodes(LogCubicZeroCurvePtr *self){
            typedef InterpolatedZeroCurve<DefaultLogCubic> LogCubicZeroCurve;
            return boost::dynamic_pointer_cast<LogCubicZeroCurve>(*self)->nodes();
        }

typedef boost::shared_ptr<YieldTermStructure> ForwardFlatZeroCurvePtr;

SWIGINTERN ForwardFlatZeroCurvePtr *new_ForwardFlatZeroCurvePtr__SWIG_0(std::vector< Date > const &dates,std::vector< Rate > const &yields,DayCounter const &dayCounter,Calendar const &calendar=Calendar(),ForwardFlat const &i=ForwardFlat(),Compounding compounding=Continuous,Frequency frequency=Annual){
            return new ForwardFlatZeroCurvePtr(
                new InterpolatedZeroCurve<ForwardFlat>(dates,yields,
                                                        dayCounter,
                                                        calendar,i,
                                                        compounding,
                                                        frequency));
        }
SWIGINTERN std::vector< Time > const &ForwardFlatZeroCurvePtr_times(ForwardFlatZeroCurvePtr *self){
            typedef InterpolatedZeroCurve<ForwardFlat> ForwardFlatZeroCurve;
            return boost::dynamic_pointer_cast<ForwardFlatZeroCurve>(*self)->times();
        }
SWIGINTERN std::vector< Real > const &ForwardFlatZeroCurvePtr_data(ForwardFlatZeroCurvePtr *self){
            typedef InterpolatedZeroCurve<ForwardFlat> ForwardFlatZeroCurve;
            return boost::dynamic_pointer_cast<ForwardFlatZeroCurve>(*self)->data();
        }
SWIGINTERN std::vector< Date > const &ForwardFlatZeroCurvePtr_dates(ForwardFlatZeroCurvePtr *self){
            typedef InterpolatedZeroCurve<ForwardFlat> ForwardFlatZeroCurve;
            return boost::dynamic_pointer_cast<ForwardFlatZeroCurve>(*self)->dates();
        }
SWIGINTERN std::vector< Rate > const &ForwardFlatZeroCurvePtr_zeroRates(ForwardFlatZeroCurvePtr *self){
            typedef InterpolatedZeroCurve<ForwardFlat> ForwardFlatZeroCurve;
            return boost::dynamic_pointer_cast<ForwardFlatZeroCurve>(*self)->zeroRates();
        }
SWIGINTERN std::vector< std::pair< Date,Rate > > ForwardFlatZeroCurvePtr_nodes(ForwardFlatZeroCurvePtr *self){
            typedef InterpolatedZeroCurve<ForwardFlat> ForwardFlatZeroCurve;
            return boost::dynamic_pointer_cast<ForwardFlatZeroCurve>(*self)->nodes();
        }

typedef boost::shared_ptr<YieldTermStructure> BackwardFlatZeroCurvePtr;

SWIGINTERN BackwardFlatZeroCurvePtr *new_BackwardFlatZeroCurvePtr__SWIG_0(std::vector< Date > const &dates,std::vector< Rate > const &yields,DayCounter const &dayCounter,Calendar const &calendar=Calendar(),BackwardFlat const &i=BackwardFlat(),Compounding compounding=Continuous,Frequency frequency=Annual){
            return new BackwardFlatZeroCurvePtr(
                new InterpolatedZeroCurve<BackwardFlat>(dates,yields,
                                                        dayCounter,
                                                        calendar,i,
                                                        compounding,
                                                        frequency));
        }
SWIGINTERN std::vector< Time > const &BackwardFlatZeroCurvePtr_times(BackwardFlatZeroCurvePtr *self){
            typedef InterpolatedZeroCurve<BackwardFlat> BackwardFlatZeroCurve;
            return boost::dynamic_pointer_cast<BackwardFlatZeroCurve>(*self)->times();
        }
SWIGINTERN std::vector< Real > const &BackwardFlatZeroCurvePtr_data(BackwardFlatZeroCurvePtr *self){
            typedef InterpolatedZeroCurve<BackwardFlat> BackwardFlatZeroCurve;
            return boost::dynamic_pointer_cast<BackwardFlatZeroCurve>(*self)->data();
        }
SWIGINTERN std::vector< Date > const &BackwardFlatZeroCurvePtr_dates(BackwardFlatZeroCurvePtr *self){
            typedef InterpolatedZeroCurve<BackwardFlat> BackwardFlatZeroCurve;
            return boost::dynamic_pointer_cast<BackwardFlatZeroCurve>(*self)->dates();
        }
SWIGINTERN std::vector< Rate > const &BackwardFlatZeroCurvePtr_zeroRates(BackwardFlatZeroCurvePtr *self){
            typedef InterpolatedZeroCurve<BackwardFlat> BackwardFlatZeroCurve;
            return boost::dynamic_pointer_cast<BackwardFlatZeroCurve>(*self)->zeroRates();
        }
SWIGINTERN std::vector< std::pair< Date,Rate > > BackwardFlatZeroCurvePtr_nodes(BackwardFlatZeroCurvePtr *self){
            typedef InterpolatedZeroCurve<BackwardFlat> BackwardFlatZeroCurve;
            return boost::dynamic_pointer_cast<BackwardFlatZeroCurve>(*self)->nodes();
        }

typedef boost::shared_ptr<YieldTermStructure> MonotonicCubicZeroCurvePtr;

SWIGINTERN MonotonicCubicZeroCurvePtr *new_MonotonicCubicZeroCurvePtr__SWIG_0(std::vector< Date > const &dates,std::vector< Rate > const &yields,DayCounter const &dayCounter,Calendar const &calendar=Calendar(),MonotonicCubic const &i=MonotonicCubic(),Compounding compounding=Continuous,Frequency frequency=Annual){
            return new MonotonicCubicZeroCurvePtr(
                new InterpolatedZeroCurve<MonotonicCubic>(dates,yields,
                                                        dayCounter,
                                                        calendar,i,
                                                        compounding,
                                                        frequency));
        }
SWIGINTERN std::vector< Time > const &MonotonicCubicZeroCurvePtr_times(MonotonicCubicZeroCurvePtr *self){
            typedef InterpolatedZeroCurve<MonotonicCubic> MonotonicCubicZeroCurve;
            return boost::dynamic_pointer_cast<MonotonicCubicZeroCurve>(*self)->times();
        }
SWIGINTERN std::vector< Real > const &MonotonicCubicZeroCurvePtr_data(MonotonicCubicZeroCurvePtr *self){
            typedef InterpolatedZeroCurve<MonotonicCubic> MonotonicCubicZeroCurve;
            return boost::dynamic_pointer_cast<MonotonicCubicZeroCurve>(*self)->data();
        }
SWIGINTERN std::vector< Date > const &MonotonicCubicZeroCurvePtr_dates(MonotonicCubicZeroCurvePtr *self){
            typedef InterpolatedZeroCurve<MonotonicCubic> MonotonicCubicZeroCurve;
            return boost::dynamic_pointer_cast<MonotonicCubicZeroCurve>(*self)->dates();
        }
SWIGINTERN std::vector< Rate > const &MonotonicCubicZeroCurvePtr_zeroRates(MonotonicCubicZeroCurvePtr *self){
            typedef InterpolatedZeroCurve<MonotonicCubic> MonotonicCubicZeroCurve;
            return boost::dynamic_pointer_cast<MonotonicCubicZeroCurve>(*self)->zeroRates();
        }
SWIGINTERN std::vector< std::pair< Date,Rate > > MonotonicCubicZeroCurvePtr_nodes(MonotonicCubicZeroCurvePtr *self){
            typedef InterpolatedZeroCurve<MonotonicCubic> MonotonicCubicZeroCurve;
            return boost::dynamic_pointer_cast<MonotonicCubicZeroCurve>(*self)->nodes();
        }

    ZeroCurvePtr as_zerocurve(const boost::shared_ptr<YieldTermStructure> & curve) {
        return boost::dynamic_pointer_cast<QuantLib::ZeroCurve>(curve);
    }


using QuantLib::Forward;
typedef boost::shared_ptr<Instrument> ForwardPtr;

SWIGINTERN Real ForwardPtr_forwardValue(ForwardPtr *self){
                return boost::dynamic_pointer_cast<Forward>(*self)
                    -> forwardValue();
            }
SWIGINTERN InterestRate ForwardPtr_impliedYield(ForwardPtr *self,Real underlyingSpotValue,Real forwardValue,Date settlementDate,Compounding compoundingConvention,DayCounter dayCounter){
                    return boost::dynamic_pointer_cast<Forward>(*self)
                        -> impliedYield(underlyingSpotValue, forwardValue,
                                        settlementDate, compoundingConvention, 
                                        dayCounter);
                }

using QuantLib::FixedRateBondForward;
using QuantLib::FixedRateBond;
using QuantLib::BusinessDayConvention;
using QuantLib::Position;
typedef boost::shared_ptr<Instrument> FixedRateBondForwardPtr;

SWIGINTERN FixedRateBondForwardPtr *new_FixedRateBondForwardPtr__SWIG_0(Date const &valueDate,Date const &maturityDate,Position::Type type,Real strike,Natural settlementDays,DayCounter const &dayCounter,Calendar const &calendar,BusinessDayConvention businessDayConvention,FixedRateBondPtr const &fixedBond,Handle< YieldTermStructure > const &discountCurve=Handle< YieldTermStructure >(),Handle< YieldTermStructure > const &incomeDiscountCurve=Handle< YieldTermStructure >()){
                const boost::shared_ptr<FixedRateBond>& fixedCouponBond = 
                    boost::dynamic_pointer_cast<FixedRateBond>(fixedBond);
                return new FixedRateBondForwardPtr(
                       new FixedRateBondForward(
                            valueDate, maturityDate, type, strike,
                            settlementDays, dayCounter, calendar,
                            businessDayConvention, fixedCouponBond,
                            discountCurve,  incomeDiscountCurve));
            }
SWIGINTERN Real FixedRateBondForwardPtr_forwardPrice(FixedRateBondForwardPtr *self){
                return boost::dynamic_pointer_cast<FixedRateBondForward>(*self)
                    -> forwardPrice();
            }
SWIGINTERN Real FixedRateBondForwardPtr_cleanForwardPrice(FixedRateBondForwardPtr *self){
                return boost::dynamic_pointer_cast<FixedRateBondForward>(*self)
                    -> cleanForwardPrice();
            }
SWIGINTERN Real FixedRateBondForwardPtr_spotIncome(FixedRateBondForwardPtr *self,Handle< YieldTermStructure > const &incomeDiscountCurve){
                return boost::dynamic_pointer_cast<FixedRateBondForward>(*self)
                    -> spotIncome(incomeDiscountCurve);
            }
SWIGINTERN Real FixedRateBondForwardPtr_spotValue(FixedRateBondForwardPtr *self){
                return boost::dynamic_pointer_cast<FixedRateBondForward>(*self)
                    -> spotValue();
            }
#ifdef __cplusplus
extern "C" {
#endif

#ifdef PERL_OBJECT
#define MAGIC_CLASS _wrap_QuantLib_var::
class _wrap_QuantLib_var : public CPerlObj {
public:
#else
#define MAGIC_CLASS
#endif
SWIGCLASS_STATIC int swig_magic_readonly(pTHX_ SV *SWIGUNUSEDPARM(sv), MAGIC *SWIGUNUSEDPARM(mg)) {
    MAGIC_PPERL
    croak("Value is read-only.");
    return 0;
}


#ifdef PERL_OBJECT
};
#endif

#ifdef __cplusplus
}
#endif

#ifdef __cplusplus
extern "C" {
#endif
XS(_wrap_new_Period__SWIG_0) {
  {
    int argvi = 0;
    Period *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Period();");
    }
    {
      try {
        result = (Period *)new Period();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Period, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_Period__SWIG_1) {
  {
    Integer arg1 ;
    TimeUnit arg2 ;
    int val1 ;
    int ecode1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Period *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_Period(n,units);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Period" "', argument " "1"" of type '" "Integer""'");
    } 
    arg1 = static_cast< Integer >(val1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Period" "', argument " "2"" of type '" "TimeUnit""'");
    } 
    arg2 = static_cast< TimeUnit >(val2);
    {
      try {
        result = (Period *)new Period(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Period, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Period__SWIG_2) {
  {
    Frequency arg1 ;
    int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    Period *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Period(Frequency);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Period" "', argument " "1"" of type '" "Frequency""'");
    } 
    arg1 = static_cast< Frequency >(val1);
    {
      try {
        result = (Period *)new Period(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Period, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Period_length) {
  {
    Period *arg1 = (Period *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Integer result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Period_length(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Period, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Period_length" "', argument " "1"" of type '" "Period const *""'"); 
    }
    arg1 = reinterpret_cast< Period * >(argp1);
    {
      try {
        result = (Integer)((Period const *)arg1)->length();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Period_units) {
  {
    Period *arg1 = (Period *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    TimeUnit result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Period_units(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Period, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Period_units" "', argument " "1"" of type '" "Period const *""'"); 
    }
    arg1 = reinterpret_cast< Period * >(argp1);
    {
      try {
        result = (TimeUnit)((Period const *)arg1)->units();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Period_frequency) {
  {
    Period *arg1 = (Period *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Frequency result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Period_frequency(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Period, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Period_frequency" "', argument " "1"" of type '" "Period const *""'"); 
    }
    arg1 = reinterpret_cast< Period * >(argp1);
    {
      try {
        result = (Frequency)((Period const *)arg1)->frequency();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Period__SWIG_3) {
  {
    std::string *arg1 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    int argvi = 0;
    Period *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Period(str);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Period" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Period" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      try {
        result = (Period *)new_Period__SWIG_3((std::string const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Period, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    SWIG_croak_null();
  }
}


XS(_wrap_new_Period) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Period__SWIG_0); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Period__SWIG_2); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Period__SWIG_3); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Period__SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Period'");
  XSRETURN(0);
}


XS(_wrap_Period_to_string) {
  {
    Period *arg1 = (Period *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Period_to_string(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Period, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Period_to_string" "', argument " "1"" of type '" "Period *""'"); 
    }
    arg1 = reinterpret_cast< Period * >(argp1);
    {
      try {
        result = Period___str__(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Period___repr__) {
  {
    Period *arg1 = (Period *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Period___repr__(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Period, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Period___repr__" "', argument " "1"" of type '" "Period *""'"); 
    }
    arg1 = reinterpret_cast< Period * >(argp1);
    {
      try {
        result = Period___repr__(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_Period) {
  {
    Period *arg1 = (Period *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Period(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Period, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Period" "', argument " "1"" of type '" "Period *""'"); 
    }
    arg1 = reinterpret_cast< Period * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PeriodVector__SWIG_0) {
  {
    unsigned int arg1 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    std::vector< Period > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_PeriodVector(size);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_PeriodVector" "', argument " "1"" of type '" "unsigned int""'");
    } 
    arg1 = static_cast< unsigned int >(val1);
    {
      try {
        result = (std::vector< Period > *)new std::vector< Period >(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_Period_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PeriodVector__SWIG_1) {
  {
    int argvi = 0;
    std::vector< Period > *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_PeriodVector();");
    }
    {
      try {
        result = (std::vector< Period > *)new std::vector< Period >();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_Period_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_PeriodVector__SWIG_2) {
  {
    unsigned int arg1 ;
    Period *arg2 = 0 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    std::vector< Period > *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_PeriodVector(size,value);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_PeriodVector" "', argument " "1"" of type '" "unsigned int""'");
    } 
    arg1 = static_cast< unsigned int >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_PeriodVector" "', argument " "2"" of type '" "Period const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PeriodVector" "', argument " "2"" of type '" "Period const &""'"); 
    }
    arg2 = reinterpret_cast< Period * >(argp2);
    {
      try {
        result = (std::vector< Period > *)new std::vector< Period >(arg1,(Period const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_Period_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PeriodVector__SWIG_3) {
  {
    std::vector< Period > *arg1 = 0 ;
    std::vector< Period > temp1 ;
    std::vector< Period > *v1 ;
    int argvi = 0;
    std::vector< Period > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_PeriodVector(std::vector< Period > const &);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_Period_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_PeriodVector. "
          "Expected an array of " "Period");
        SV **tv;
        I32 len = av_len(av) + 1;
        Period* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Period,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_PeriodVector. "
              "Expected an array of " "Period");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_PeriodVector. "
          "Expected an array of " "Period");
      }
    }
    {
      try {
        result = (std::vector< Period > *)new std::vector< Period >((std::vector< Period > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_Period_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PeriodVector) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Period >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Period_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Period* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Period,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_PeriodVector__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_PeriodVector__SWIG_0); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_PeriodVector__SWIG_3); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_PeriodVector__SWIG_2); return;
    }
  }
  
  croak("No matching function for overloaded 'new_PeriodVector'");
  XSRETURN(0);
}


XS(_wrap_PeriodVector_size) {
  {
    std::vector< Period > *arg1 = (std::vector< Period > *) 0 ;
    std::vector< Period > temp1 ;
    std::vector< Period > *v1 ;
    int argvi = 0;
    unsigned int result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: PeriodVector_size(self);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_Period_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of PeriodVector_size. "
          "Expected an array of " "Period");
        SV **tv;
        I32 len = av_len(av) + 1;
        Period* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Period,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "PeriodVector_size. "
              "Expected an array of " "Period");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of PeriodVector_size. "
          "Expected an array of " "Period");
      }
    }
    {
      try {
        result = (unsigned int)((std::vector< Period > const *)arg1)->size();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_PeriodVector_empty) {
  {
    std::vector< Period > *arg1 = (std::vector< Period > *) 0 ;
    std::vector< Period > temp1 ;
    std::vector< Period > *v1 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: PeriodVector_empty(self);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_Period_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of PeriodVector_empty. "
          "Expected an array of " "Period");
        SV **tv;
        I32 len = av_len(av) + 1;
        Period* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Period,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "PeriodVector_empty. "
              "Expected an array of " "Period");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of PeriodVector_empty. "
          "Expected an array of " "Period");
      }
    }
    {
      try {
        result = (bool)((std::vector< Period > const *)arg1)->empty();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_PeriodVector_clear) {
  {
    std::vector< Period > *arg1 = (std::vector< Period > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: PeriodVector_clear(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_Period_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PeriodVector_clear" "', argument " "1"" of type '" "std::vector< Period > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< Period > * >(argp1);
    {
      try {
        (arg1)->clear();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_PeriodVector_push) {
  {
    std::vector< Period > *arg1 = (std::vector< Period > *) 0 ;
    Period *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: PeriodVector_push(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_Period_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PeriodVector_push" "', argument " "1"" of type '" "std::vector< Period > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< Period > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "PeriodVector_push" "', argument " "2"" of type '" "Period const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "PeriodVector_push" "', argument " "2"" of type '" "Period const &""'"); 
    }
    arg2 = reinterpret_cast< Period * >(argp2);
    {
      try {
        (arg1)->push_back((Period const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_PeriodVector_pop) {
  {
    std::vector< Period > *arg1 = (std::vector< Period > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Period result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: PeriodVector_pop(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_Period_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PeriodVector_pop" "', argument " "1"" of type '" "std::vector< Period > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< Period > * >(argp1);
    {
      try {
        try {
          result = std_vector_Sl_Period_Sg__pop(arg1);
        }
        catch(std::out_of_range &_e) {
          sv_setsv(get_sv("@", GV_ADD), SWIG_NewPointerObj((new std::out_of_range(static_cast< const std::out_of_range& >(_e))),SWIGTYPE_p_std__out_of_range,SWIG_POINTER_OWN)); SWIG_fail ;
        }
        
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Period(static_cast< const Period& >(result))), SWIGTYPE_p_Period, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_PeriodVector_get) {
  {
    std::vector< Period > *arg1 = (std::vector< Period > *) 0 ;
    int arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Period *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: PeriodVector_get(self,i);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_Period_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PeriodVector_get" "', argument " "1"" of type '" "std::vector< Period > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< Period > * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "PeriodVector_get" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    {
      try {
        try {
          result = (Period *) &std_vector_Sl_Period_Sg__get(arg1,arg2);
        }
        catch(std::out_of_range &_e) {
          sv_setsv(get_sv("@", GV_ADD), SWIG_NewPointerObj((new std::out_of_range(static_cast< const std::out_of_range& >(_e))),SWIGTYPE_p_std__out_of_range,SWIG_POINTER_OWN)); SWIG_fail ;
        }
        
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Period, 0 | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_PeriodVector_set) {
  {
    std::vector< Period > *arg1 = (std::vector< Period > *) 0 ;
    int arg2 ;
    Period *arg3 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: PeriodVector_set(self,i,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_Period_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PeriodVector_set" "', argument " "1"" of type '" "std::vector< Period > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< Period > * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "PeriodVector_set" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "PeriodVector_set" "', argument " "3"" of type '" "Period const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "PeriodVector_set" "', argument " "3"" of type '" "Period const &""'"); 
    }
    arg3 = reinterpret_cast< Period * >(argp3);
    {
      try {
        try {
          std_vector_Sl_Period_Sg__set(arg1,arg2,(Period const &)*arg3);
        }
        catch(std::out_of_range &_e) {
          sv_setsv(get_sv("@", GV_ADD), SWIG_NewPointerObj((new std::out_of_range(static_cast< const std::out_of_range& >(_e))),SWIGTYPE_p_std__out_of_range,SWIG_POINTER_OWN)); SWIG_fail ;
        }
        
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_PeriodVector) {
  {
    std::vector< Period > *arg1 = (std::vector< Period > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_PeriodVector(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_Period_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_PeriodVector" "', argument " "1"" of type '" "std::vector< Period > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< Period > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Date__SWIG_0) {
  {
    int argvi = 0;
    Date *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Date();");
    }
    {
      try {
        result = (Date *)new Date();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Date, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_Date__SWIG_1) {
  {
    Day arg1 ;
    Month arg2 ;
    Year arg3 ;
    int val1 ;
    int ecode1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Date *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_Date(d,m,y);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Date" "', argument " "1"" of type '" "Day""'");
    } 
    arg1 = static_cast< Day >(val1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Date" "', argument " "2"" of type '" "Month""'");
    } 
    arg2 = static_cast< Month >(val2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Date" "', argument " "3"" of type '" "Year""'");
    } 
    arg3 = static_cast< Year >(val3);
    {
      try {
        result = (Date *)new Date(arg1,arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Date, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Date__SWIG_2) {
  {
    Day arg1 ;
    Month arg2 ;
    Year arg3 ;
    Hour arg4 ;
    Minute arg5 ;
    Second arg6 ;
    Millisecond arg7 ;
    Microsecond arg8 ;
    int val1 ;
    int ecode1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    int val7 ;
    int ecode7 = 0 ;
    int val8 ;
    int ecode8 = 0 ;
    int argvi = 0;
    Date *result = 0 ;
    dXSARGS;
    
    if ((items < 8) || (items > 8)) {
      SWIG_croak("Usage: new_Date(d,m,y,hours,minutes,seconds,millisec,microsec);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Date" "', argument " "1"" of type '" "Day""'");
    } 
    arg1 = static_cast< Day >(val1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Date" "', argument " "2"" of type '" "Month""'");
    } 
    arg2 = static_cast< Month >(val2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Date" "', argument " "3"" of type '" "Year""'");
    } 
    arg3 = static_cast< Year >(val3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_Date" "', argument " "4"" of type '" "Hour""'");
    } 
    arg4 = static_cast< Hour >(val4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_Date" "', argument " "5"" of type '" "Minute""'");
    } 
    arg5 = static_cast< Minute >(val5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_Date" "', argument " "6"" of type '" "Second""'");
    } 
    arg6 = static_cast< Second >(val6);
    ecode7 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_Date" "', argument " "7"" of type '" "Millisecond""'");
    } 
    arg7 = static_cast< Millisecond >(val7);
    ecode8 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_Date" "', argument " "8"" of type '" "Microsecond""'");
    } 
    arg8 = static_cast< Microsecond >(val8);
    {
      try {
        result = (Date *)new_Date__SWIG_2(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Date, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Date__SWIG_3) {
  {
    Day arg1 ;
    Month arg2 ;
    Year arg3 ;
    Hour arg4 ;
    Minute arg5 ;
    Second arg6 ;
    Millisecond arg7 ;
    int val1 ;
    int ecode1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    int val7 ;
    int ecode7 = 0 ;
    int argvi = 0;
    Date *result = 0 ;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: new_Date(d,m,y,hours,minutes,seconds,millisec);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Date" "', argument " "1"" of type '" "Day""'");
    } 
    arg1 = static_cast< Day >(val1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Date" "', argument " "2"" of type '" "Month""'");
    } 
    arg2 = static_cast< Month >(val2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Date" "', argument " "3"" of type '" "Year""'");
    } 
    arg3 = static_cast< Year >(val3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_Date" "', argument " "4"" of type '" "Hour""'");
    } 
    arg4 = static_cast< Hour >(val4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_Date" "', argument " "5"" of type '" "Minute""'");
    } 
    arg5 = static_cast< Minute >(val5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_Date" "', argument " "6"" of type '" "Second""'");
    } 
    arg6 = static_cast< Second >(val6);
    ecode7 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_Date" "', argument " "7"" of type '" "Millisecond""'");
    } 
    arg7 = static_cast< Millisecond >(val7);
    {
      try {
        result = (Date *)new_Date__SWIG_2(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Date, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Date__SWIG_4) {
  {
    Day arg1 ;
    Month arg2 ;
    Year arg3 ;
    Hour arg4 ;
    Minute arg5 ;
    Second arg6 ;
    int val1 ;
    int ecode1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    Date *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_Date(d,m,y,hours,minutes,seconds);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Date" "', argument " "1"" of type '" "Day""'");
    } 
    arg1 = static_cast< Day >(val1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Date" "', argument " "2"" of type '" "Month""'");
    } 
    arg2 = static_cast< Month >(val2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Date" "', argument " "3"" of type '" "Year""'");
    } 
    arg3 = static_cast< Year >(val3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_Date" "', argument " "4"" of type '" "Hour""'");
    } 
    arg4 = static_cast< Hour >(val4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_Date" "', argument " "5"" of type '" "Minute""'");
    } 
    arg5 = static_cast< Minute >(val5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_Date" "', argument " "6"" of type '" "Second""'");
    } 
    arg6 = static_cast< Second >(val6);
    {
      try {
        result = (Date *)new_Date__SWIG_2(arg1,arg2,arg3,arg4,arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Date, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Date__SWIG_5) {
  {
    BigInteger arg1 ;
    long val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    Date *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Date(serialNumber);");
    }
    ecode1 = SWIG_AsVal_long SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Date" "', argument " "1"" of type '" "BigInteger""'");
    } 
    arg1 = static_cast< BigInteger >(val1);
    {
      try {
        result = (Date *)new Date(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Date, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Date_weekday) {
  {
    Date *arg1 = (Date *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Weekday result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Date_weekday(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Date, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Date_weekday" "', argument " "1"" of type '" "Date const *""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    {
      try {
        result = (Weekday)((Date const *)arg1)->weekday();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Date_dayOfMonth) {
  {
    Date *arg1 = (Date *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Day result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Date_dayOfMonth(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Date, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Date_dayOfMonth" "', argument " "1"" of type '" "Date const *""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    {
      try {
        result = (Day)((Date const *)arg1)->dayOfMonth();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Date_dayOfYear) {
  {
    Date *arg1 = (Date *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Day result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Date_dayOfYear(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Date, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Date_dayOfYear" "', argument " "1"" of type '" "Date const *""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    {
      try {
        result = (Day)((Date const *)arg1)->dayOfYear();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Date_month) {
  {
    Date *arg1 = (Date *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Month result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Date_month(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Date, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Date_month" "', argument " "1"" of type '" "Date const *""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    {
      try {
        result = (Month)((Date const *)arg1)->month();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Date_year) {
  {
    Date *arg1 = (Date *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Year result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Date_year(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Date, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Date_year" "', argument " "1"" of type '" "Date const *""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    {
      try {
        result = (Year)((Date const *)arg1)->year();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Date_hours) {
  {
    Date *arg1 = (Date *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Hour result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Date_hours(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Date, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Date_hours" "', argument " "1"" of type '" "Date *""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    {
      try {
        result = (Hour)Date_hours(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Date_minutes) {
  {
    Date *arg1 = (Date *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Minute result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Date_minutes(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Date, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Date_minutes" "', argument " "1"" of type '" "Date *""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    {
      try {
        result = (Minute)Date_minutes(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Date_seconds) {
  {
    Date *arg1 = (Date *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Second result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Date_seconds(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Date, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Date_seconds" "', argument " "1"" of type '" "Date *""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    {
      try {
        result = (Second)Date_seconds(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Date_milliseconds) {
  {
    Date *arg1 = (Date *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Millisecond result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Date_milliseconds(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Date, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Date_milliseconds" "', argument " "1"" of type '" "Date *""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    {
      try {
        result = (Millisecond)Date_milliseconds(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Date_microseconds) {
  {
    Date *arg1 = (Date *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Microsecond result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Date_microseconds(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Date, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Date_microseconds" "', argument " "1"" of type '" "Date *""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    {
      try {
        result = (Microsecond)Date_microseconds(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Date_fractionOfDay) {
  {
    Date *arg1 = (Date *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Time result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Date_fractionOfDay(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Date, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Date_fractionOfDay" "', argument " "1"" of type '" "Date const *""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    {
      try {
        result = (Time)Date_fractionOfDay((Date const *)arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Date_fractionOfSecond) {
  {
    Date *arg1 = (Date *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Time result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Date_fractionOfSecond(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Date, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Date_fractionOfSecond" "', argument " "1"" of type '" "Date const *""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    {
      try {
        result = (Time)Date_fractionOfSecond((Date const *)arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Date_serialNumber) {
  {
    Date *arg1 = (Date *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    BigInteger result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Date_serialNumber(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Date, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Date_serialNumber" "', argument " "1"" of type '" "Date const *""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    {
      try {
        result = (BigInteger)((Date const *)arg1)->serialNumber();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_long  SWIG_PERL_CALL_ARGS_1(static_cast< long >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Date_isLeap) {
  {
    Year arg1 ;
    int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Date_isLeap(y);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "Date_isLeap" "', argument " "1"" of type '" "Year""'");
    } 
    arg1 = static_cast< Year >(val1);
    {
      try {
        result = (bool)Date::isLeap(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Date_minDate) {
  {
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: Date_minDate();");
    }
    {
      try {
        result = Date::minDate();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_Date_maxDate) {
  {
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: Date_maxDate();");
    }
    {
      try {
        result = Date::maxDate();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_Date_todaysDate) {
  {
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: Date_todaysDate();");
    }
    {
      try {
        result = Date::todaysDate();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_Date_localDateTime) {
  {
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: Date_localDateTime();");
    }
    {
      try {
        result = Date_localDateTime();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_Date_universalDateTime) {
  {
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: Date_universalDateTime();");
    }
    {
      try {
        result = Date_universalDateTime();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_Date_endOfMonth) {
  {
    Date *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Date_endOfMonth(Date const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Date_endOfMonth" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Date_endOfMonth" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    {
      try {
        result = Date::endOfMonth((Date const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Date_isEndOfMonth) {
  {
    Date *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Date_isEndOfMonth(Date const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Date_isEndOfMonth" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Date_isEndOfMonth" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    {
      try {
        result = (bool)Date::isEndOfMonth((Date const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Date_nextWeekday) {
  {
    Date *arg1 = 0 ;
    Weekday arg2 ;
    void *argp1 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Date_nextWeekday(Date const &,Weekday);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Date_nextWeekday" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Date_nextWeekday" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Date_nextWeekday" "', argument " "2"" of type '" "Weekday""'");
    } 
    arg2 = static_cast< Weekday >(val2);
    {
      try {
        result = Date::nextWeekday((Date const &)*arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Date_nthWeekday) {
  {
    Size arg1 ;
    Weekday arg2 ;
    Month arg3 ;
    Year arg4 ;
    size_t val1 ;
    int ecode1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: Date_nthWeekday(n,Weekday,m,y);");
    }
    ecode1 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "Date_nthWeekday" "', argument " "1"" of type '" "Size""'");
    } 
    arg1 = static_cast< Size >(val1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Date_nthWeekday" "', argument " "2"" of type '" "Weekday""'");
    } 
    arg2 = static_cast< Weekday >(val2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Date_nthWeekday" "', argument " "3"" of type '" "Month""'");
    } 
    arg3 = static_cast< Month >(val3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Date_nthWeekday" "', argument " "4"" of type '" "Year""'");
    } 
    arg4 = static_cast< Year >(val4);
    {
      try {
        result = Date::nthWeekday(arg1,arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Date__SWIG_6) {
  {
    std::string *arg1 = 0 ;
    std::string arg2 ;
    int res1 = SWIG_OLDOBJ ;
    int argvi = 0;
    Date *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_Date(str,fmt);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Date" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Date" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      std::string *ptr = (std::string *)0;
      int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res) || !ptr) {
        SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "new_Date" "', argument " "2"" of type '" "std::string""'"); 
      }
      arg2 = *ptr;
      if (SWIG_IsNewObj(res)) delete ptr;
    }
    {
      try {
        result = (Date *)new_Date__SWIG_6((std::string const &)*arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Date, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Date) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_long SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
    if (items == 8) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 7;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_7:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Date__SWIG_0); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Date__SWIG_5); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Date__SWIG_6); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Date__SWIG_1); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Date__SWIG_4); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Date__SWIG_3); return;
    case 7:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Date__SWIG_2); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Date'");
  XSRETURN(0);
}


XS(_wrap_Date_weekdayNumber) {
  {
    Date *arg1 = (Date *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Integer result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Date_weekdayNumber(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Date, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Date_weekdayNumber" "', argument " "1"" of type '" "Date *""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    {
      try {
        result = (Integer)Date_weekdayNumber(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Date_to_string) {
  {
    Date *arg1 = (Date *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Date_to_string(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Date, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Date_to_string" "', argument " "1"" of type '" "Date *""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    {
      try {
        result = Date___str__(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Date___repr__) {
  {
    Date *arg1 = (Date *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Date___repr__(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Date, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Date___repr__" "', argument " "1"" of type '" "Date *""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    {
      try {
        result = Date___repr__(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Date_ISO) {
  {
    Date *arg1 = (Date *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Date_ISO(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Date, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Date_ISO" "', argument " "1"" of type '" "Date *""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    {
      try {
        result = Date_ISO(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_Date) {
  {
    Date *arg1 = (Date *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Date(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Date, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Date" "', argument " "1"" of type '" "Date *""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_DateParser_parseFormatted) {
  {
    std::string *arg1 = 0 ;
    std::string *arg2 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: DateParser_parseFormatted(str,fmt);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DateParser_parseFormatted" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DateParser_parseFormatted" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DateParser_parseFormatted" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DateParser_parseFormatted" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      try {
        result = DateParser::parseFormatted((std::string const &)*arg1,(std::string const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_DateParser_parseISO) {
  {
    std::string *arg1 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DateParser_parseISO(str);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DateParser_parseISO" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DateParser_parseISO" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      try {
        result = DateParser::parseISO((std::string const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    SWIG_croak_null();
  }
}


XS(_wrap_DateParser_parse) {
  {
    std::string *arg1 = 0 ;
    std::string arg2 ;
    int res1 = SWIG_OLDOBJ ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: DateParser_parse(str,fmt);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DateParser_parse" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DateParser_parse" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      std::string *ptr = (std::string *)0;
      int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res) || !ptr) {
        SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "DateParser_parse" "', argument " "2"" of type '" "std::string""'"); 
      }
      arg2 = *ptr;
      if (SWIG_IsNewObj(res)) delete ptr;
    }
    {
      try {
        result = DateParser_parse((std::string const &)*arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DateParser) {
  {
    int argvi = 0;
    DateParser *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_DateParser();");
    }
    {
      try {
        result = (DateParser *)new DateParser();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DateParser, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_DateParser) {
  {
    DateParser *arg1 = (DateParser *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_DateParser(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_DateParser, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DateParser" "', argument " "1"" of type '" "DateParser *""'"); 
    }
    arg1 = reinterpret_cast< DateParser * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_PeriodParser_parse) {
  {
    std::string *arg1 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    int argvi = 0;
    Period result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: PeriodParser_parse(str);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PeriodParser_parse" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "PeriodParser_parse" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      try {
        result = PeriodParser::parse((std::string const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Period(static_cast< const Period& >(result))), SWIGTYPE_p_Period, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    SWIG_croak_null();
  }
}


XS(_wrap_new_PeriodParser) {
  {
    int argvi = 0;
    PeriodParser *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_PeriodParser();");
    }
    {
      try {
        result = (PeriodParser *)new PeriodParser();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PeriodParser, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_PeriodParser) {
  {
    PeriodParser *arg1 = (PeriodParser *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_PeriodParser(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PeriodParser, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_PeriodParser" "', argument " "1"" of type '" "PeriodParser *""'"); 
    }
    arg1 = reinterpret_cast< PeriodParser * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DateVector__SWIG_0) {
  {
    unsigned int arg1 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    std::vector< Date > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_DateVector(size);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_DateVector" "', argument " "1"" of type '" "unsigned int""'");
    } 
    arg1 = static_cast< unsigned int >(val1);
    {
      try {
        result = (std::vector< Date > *)new std::vector< Date >(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_Date_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DateVector__SWIG_1) {
  {
    int argvi = 0;
    std::vector< Date > *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_DateVector();");
    }
    {
      try {
        result = (std::vector< Date > *)new std::vector< Date >();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_Date_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_DateVector__SWIG_2) {
  {
    unsigned int arg1 ;
    Date *arg2 = 0 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    std::vector< Date > *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_DateVector(size,value);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_DateVector" "', argument " "1"" of type '" "unsigned int""'");
    } 
    arg1 = static_cast< unsigned int >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_DateVector" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DateVector" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    {
      try {
        result = (std::vector< Date > *)new std::vector< Date >(arg1,(Date const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_Date_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DateVector__SWIG_3) {
  {
    std::vector< Date > *arg1 = 0 ;
    std::vector< Date > temp1 ;
    std::vector< Date > *v1 ;
    int argvi = 0;
    std::vector< Date > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_DateVector(std::vector< Date > const &);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_DateVector. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_DateVector. "
              "Expected an array of " "Date");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_DateVector. "
          "Expected an array of " "Date");
      }
    }
    {
      try {
        result = (std::vector< Date > *)new std::vector< Date >((std::vector< Date > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_Date_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DateVector) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DateVector__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DateVector__SWIG_0); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DateVector__SWIG_3); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DateVector__SWIG_2); return;
    }
  }
  
  croak("No matching function for overloaded 'new_DateVector'");
  XSRETURN(0);
}


XS(_wrap_DateVector_size) {
  {
    std::vector< Date > *arg1 = (std::vector< Date > *) 0 ;
    std::vector< Date > temp1 ;
    std::vector< Date > *v1 ;
    int argvi = 0;
    unsigned int result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DateVector_size(self);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of DateVector_size. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "DateVector_size. "
              "Expected an array of " "Date");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of DateVector_size. "
          "Expected an array of " "Date");
      }
    }
    {
      try {
        result = (unsigned int)((std::vector< Date > const *)arg1)->size();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_DateVector_empty) {
  {
    std::vector< Date > *arg1 = (std::vector< Date > *) 0 ;
    std::vector< Date > temp1 ;
    std::vector< Date > *v1 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DateVector_empty(self);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of DateVector_empty. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "DateVector_empty. "
              "Expected an array of " "Date");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of DateVector_empty. "
          "Expected an array of " "Date");
      }
    }
    {
      try {
        result = (bool)((std::vector< Date > const *)arg1)->empty();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_DateVector_clear) {
  {
    std::vector< Date > *arg1 = (std::vector< Date > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DateVector_clear(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_Date_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DateVector_clear" "', argument " "1"" of type '" "std::vector< Date > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< Date > * >(argp1);
    {
      try {
        (arg1)->clear();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_DateVector_push) {
  {
    std::vector< Date > *arg1 = (std::vector< Date > *) 0 ;
    Date *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: DateVector_push(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_Date_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DateVector_push" "', argument " "1"" of type '" "std::vector< Date > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< Date > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DateVector_push" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DateVector_push" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    {
      try {
        (arg1)->push_back((Date const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_DateVector_pop) {
  {
    std::vector< Date > *arg1 = (std::vector< Date > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DateVector_pop(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_Date_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DateVector_pop" "', argument " "1"" of type '" "std::vector< Date > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< Date > * >(argp1);
    {
      try {
        try {
          result = std_vector_Sl_Date_Sg__pop(arg1);
        }
        catch(std::out_of_range &_e) {
          sv_setsv(get_sv("@", GV_ADD), SWIG_NewPointerObj((new std::out_of_range(static_cast< const std::out_of_range& >(_e))),SWIGTYPE_p_std__out_of_range,SWIG_POINTER_OWN)); SWIG_fail ;
        }
        
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_DateVector_get) {
  {
    std::vector< Date > *arg1 = (std::vector< Date > *) 0 ;
    int arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Date *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: DateVector_get(self,i);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_Date_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DateVector_get" "', argument " "1"" of type '" "std::vector< Date > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< Date > * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DateVector_get" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    {
      try {
        try {
          result = (Date *) &std_vector_Sl_Date_Sg__get(arg1,arg2);
        }
        catch(std::out_of_range &_e) {
          sv_setsv(get_sv("@", GV_ADD), SWIG_NewPointerObj((new std::out_of_range(static_cast< const std::out_of_range& >(_e))),SWIGTYPE_p_std__out_of_range,SWIG_POINTER_OWN)); SWIG_fail ;
        }
        
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Date, 0 | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_DateVector_set) {
  {
    std::vector< Date > *arg1 = (std::vector< Date > *) 0 ;
    int arg2 ;
    Date *arg3 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: DateVector_set(self,i,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_Date_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DateVector_set" "', argument " "1"" of type '" "std::vector< Date > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< Date > * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DateVector_set" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "DateVector_set" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DateVector_set" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    {
      try {
        try {
          std_vector_Sl_Date_Sg__set(arg1,arg2,(Date const &)*arg3);
        }
        catch(std::out_of_range &_e) {
          sv_setsv(get_sv("@", GV_ADD), SWIG_NewPointerObj((new std::out_of_range(static_cast< const std::out_of_range& >(_e))),SWIGTYPE_p_std__out_of_range,SWIG_POINTER_OWN)); SWIG_fail ;
        }
        
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_DateVector) {
  {
    std::vector< Date > *arg1 = (std::vector< Date > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_DateVector(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_Date_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DateVector" "', argument " "1"" of type '" "std::vector< Date > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< Date > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_IMM_isIMMdate__SWIG_0) {
  {
    Date *arg1 = 0 ;
    bool arg2 ;
    void *argp1 ;
    int res1 = 0 ;
    bool val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: IMM_isIMMdate(d,mainCycle);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IMM_isIMMdate" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IMM_isIMMdate" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    ecode2 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IMM_isIMMdate" "', argument " "2"" of type '" "bool""'");
    } 
    arg2 = static_cast< bool >(val2);
    {
      try {
        result = (bool)IMM::isIMMdate((Date const &)*arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_IMM_isIMMdate__SWIG_1) {
  {
    Date *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: IMM_isIMMdate(d);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IMM_isIMMdate" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IMM_isIMMdate" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    {
      try {
        result = (bool)IMM::isIMMdate((Date const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_IMM_isIMMdate) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_IMM_isIMMdate__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_IMM_isIMMdate__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'IMM_isIMMdate'");
  XSRETURN(0);
}


XS(_wrap_IMM_isIMMcode__SWIG_0) {
  {
    std::string *arg1 = 0 ;
    bool arg2 ;
    int res1 = SWIG_OLDOBJ ;
    bool val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: IMM_isIMMcode(code,mainCycle);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IMM_isIMMcode" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IMM_isIMMcode" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    ecode2 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IMM_isIMMcode" "', argument " "2"" of type '" "bool""'");
    } 
    arg2 = static_cast< bool >(val2);
    {
      try {
        result = (bool)IMM::isIMMcode((std::string const &)*arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    SWIG_croak_null();
  }
}


XS(_wrap_IMM_isIMMcode__SWIG_1) {
  {
    std::string *arg1 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: IMM_isIMMcode(code);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IMM_isIMMcode" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IMM_isIMMcode" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      try {
        result = (bool)IMM::isIMMcode((std::string const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    SWIG_croak_null();
  }
}


XS(_wrap_IMM_isIMMcode) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_IMM_isIMMcode__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_IMM_isIMMcode__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'IMM_isIMMcode'");
  XSRETURN(0);
}


XS(_wrap_IMM_code) {
  {
    Date *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: IMM_code(immDate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IMM_code" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IMM_code" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    {
      try {
        result = IMM::code((Date const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_IMM_date__SWIG_0) {
  {
    std::string *arg1 = 0 ;
    Date *arg2 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: IMM_date(immCode,referenceDate);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IMM_date" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IMM_date" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IMM_date" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IMM_date" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    {
      try {
        result = IMM::date((std::string const &)*arg1,(Date const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    SWIG_croak_null();
  }
}


XS(_wrap_IMM_date__SWIG_1) {
  {
    std::string *arg1 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: IMM_date(immCode);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IMM_date" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IMM_date" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      try {
        result = IMM::date((std::string const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    SWIG_croak_null();
  }
}


XS(_wrap_IMM_date) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_IMM_date__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_IMM_date__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'IMM_date'");
  XSRETURN(0);
}


XS(_wrap_IMM_nextDate__SWIG_0) {
  {
    Date *arg1 = 0 ;
    bool arg2 ;
    void *argp1 ;
    int res1 = 0 ;
    bool val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: IMM_nextDate(d,mainCycle);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IMM_nextDate" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IMM_nextDate" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    ecode2 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IMM_nextDate" "', argument " "2"" of type '" "bool""'");
    } 
    arg2 = static_cast< bool >(val2);
    {
      try {
        result = IMM::nextDate((Date const &)*arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_IMM_nextDate__SWIG_1) {
  {
    Date *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: IMM_nextDate(d);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IMM_nextDate" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IMM_nextDate" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    {
      try {
        result = IMM::nextDate((Date const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_IMM_nextDate__SWIG_2) {
  {
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: IMM_nextDate();");
    }
    {
      try {
        result = IMM::nextDate();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_IMM_nextDate__SWIG_3) {
  {
    std::string *arg1 = 0 ;
    bool arg2 ;
    Date *arg3 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    bool val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: IMM_nextDate(immCode,mainCycle,referenceDate);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IMM_nextDate" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IMM_nextDate" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    ecode2 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IMM_nextDate" "', argument " "2"" of type '" "bool""'");
    } 
    arg2 = static_cast< bool >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IMM_nextDate" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IMM_nextDate" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    {
      try {
        result = IMM::nextDate((std::string const &)*arg1,arg2,(Date const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_IMM_nextDate__SWIG_4) {
  {
    std::string *arg1 = 0 ;
    bool arg2 ;
    int res1 = SWIG_OLDOBJ ;
    bool val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: IMM_nextDate(immCode,mainCycle);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IMM_nextDate" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IMM_nextDate" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    ecode2 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IMM_nextDate" "', argument " "2"" of type '" "bool""'");
    } 
    arg2 = static_cast< bool >(val2);
    {
      try {
        result = IMM::nextDate((std::string const &)*arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    SWIG_croak_null();
  }
}


XS(_wrap_IMM_nextDate__SWIG_5) {
  {
    std::string *arg1 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: IMM_nextDate(immCode);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IMM_nextDate" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IMM_nextDate" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      try {
        result = IMM::nextDate((std::string const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    SWIG_croak_null();
  }
}


XS(_wrap_IMM_nextDate) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_IMM_nextDate__SWIG_2); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_IMM_nextDate__SWIG_1); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_IMM_nextDate__SWIG_5); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_IMM_nextDate__SWIG_0); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_IMM_nextDate__SWIG_4); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_IMM_nextDate__SWIG_3); return;
    }
  }
  
  croak("No matching function for overloaded 'IMM_nextDate'");
  XSRETURN(0);
}


XS(_wrap_IMM_nextCode__SWIG_0) {
  {
    Date *arg1 = 0 ;
    bool arg2 ;
    void *argp1 ;
    int res1 = 0 ;
    bool val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: IMM_nextCode(d,mainCycle);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IMM_nextCode" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IMM_nextCode" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    ecode2 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IMM_nextCode" "', argument " "2"" of type '" "bool""'");
    } 
    arg2 = static_cast< bool >(val2);
    {
      try {
        result = IMM::nextCode((Date const &)*arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_IMM_nextCode__SWIG_1) {
  {
    Date *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: IMM_nextCode(d);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IMM_nextCode" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IMM_nextCode" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    {
      try {
        result = IMM::nextCode((Date const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_IMM_nextCode__SWIG_2) {
  {
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: IMM_nextCode();");
    }
    {
      try {
        result = IMM::nextCode();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_IMM_nextCode__SWIG_3) {
  {
    std::string *arg1 = 0 ;
    bool arg2 ;
    Date *arg3 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    bool val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: IMM_nextCode(immCode,mainCycle,referenceDate);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IMM_nextCode" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IMM_nextCode" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    ecode2 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IMM_nextCode" "', argument " "2"" of type '" "bool""'");
    } 
    arg2 = static_cast< bool >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IMM_nextCode" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IMM_nextCode" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    {
      try {
        result = IMM::nextCode((std::string const &)*arg1,arg2,(Date const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_IMM_nextCode__SWIG_4) {
  {
    std::string *arg1 = 0 ;
    bool arg2 ;
    int res1 = SWIG_OLDOBJ ;
    bool val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: IMM_nextCode(immCode,mainCycle);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IMM_nextCode" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IMM_nextCode" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    ecode2 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IMM_nextCode" "', argument " "2"" of type '" "bool""'");
    } 
    arg2 = static_cast< bool >(val2);
    {
      try {
        result = IMM::nextCode((std::string const &)*arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    SWIG_croak_null();
  }
}


XS(_wrap_IMM_nextCode__SWIG_5) {
  {
    std::string *arg1 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: IMM_nextCode(immCode);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IMM_nextCode" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IMM_nextCode" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      try {
        result = IMM::nextCode((std::string const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    SWIG_croak_null();
  }
}


XS(_wrap_IMM_nextCode) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_IMM_nextCode__SWIG_2); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_IMM_nextCode__SWIG_1); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_IMM_nextCode__SWIG_5); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_IMM_nextCode__SWIG_0); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_IMM_nextCode__SWIG_4); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_IMM_nextCode__SWIG_3); return;
    }
  }
  
  croak("No matching function for overloaded 'IMM_nextCode'");
  XSRETURN(0);
}


XS(_wrap_new_IMM) {
  {
    int argvi = 0;
    IMM *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_IMM();");
    }
    {
      try {
        result = (IMM *)new IMM();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IMM, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_IMM) {
  {
    IMM *arg1 = (IMM *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_IMM(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_IMM, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IMM" "', argument " "1"" of type '" "IMM *""'"); 
    }
    arg1 = reinterpret_cast< IMM * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ASX_isASXdate__SWIG_0) {
  {
    Date *arg1 = 0 ;
    bool arg2 ;
    void *argp1 ;
    int res1 = 0 ;
    bool val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: ASX_isASXdate(d,mainCycle);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ASX_isASXdate" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ASX_isASXdate" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    ecode2 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ASX_isASXdate" "', argument " "2"" of type '" "bool""'");
    } 
    arg2 = static_cast< bool >(val2);
    {
      try {
        result = (bool)ASX::isASXdate((Date const &)*arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_ASX_isASXdate__SWIG_1) {
  {
    Date *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ASX_isASXdate(d);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ASX_isASXdate" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ASX_isASXdate" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    {
      try {
        result = (bool)ASX::isASXdate((Date const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ASX_isASXdate) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_ASX_isASXdate__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_ASX_isASXdate__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'ASX_isASXdate'");
  XSRETURN(0);
}


XS(_wrap_ASX_isASXcode__SWIG_0) {
  {
    std::string *arg1 = 0 ;
    bool arg2 ;
    int res1 = SWIG_OLDOBJ ;
    bool val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: ASX_isASXcode(code,mainCycle);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ASX_isASXcode" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ASX_isASXcode" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    ecode2 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ASX_isASXcode" "', argument " "2"" of type '" "bool""'");
    } 
    arg2 = static_cast< bool >(val2);
    {
      try {
        result = (bool)ASX::isASXcode((std::string const &)*arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    SWIG_croak_null();
  }
}


XS(_wrap_ASX_isASXcode__SWIG_1) {
  {
    std::string *arg1 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ASX_isASXcode(code);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ASX_isASXcode" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ASX_isASXcode" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      try {
        result = (bool)ASX::isASXcode((std::string const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    SWIG_croak_null();
  }
}


XS(_wrap_ASX_isASXcode) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_ASX_isASXcode__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_ASX_isASXcode__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'ASX_isASXcode'");
  XSRETURN(0);
}


XS(_wrap_ASX_code) {
  {
    Date *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ASX_code(asxDate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ASX_code" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ASX_code" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    {
      try {
        result = ASX::code((Date const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ASX_date__SWIG_0) {
  {
    std::string *arg1 = 0 ;
    Date *arg2 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: ASX_date(asxCode,referenceDate);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ASX_date" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ASX_date" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ASX_date" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ASX_date" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    {
      try {
        result = ASX::date((std::string const &)*arg1,(Date const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    SWIG_croak_null();
  }
}


XS(_wrap_ASX_date__SWIG_1) {
  {
    std::string *arg1 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ASX_date(asxCode);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ASX_date" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ASX_date" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      try {
        result = ASX::date((std::string const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    SWIG_croak_null();
  }
}


XS(_wrap_ASX_date) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_ASX_date__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_ASX_date__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'ASX_date'");
  XSRETURN(0);
}


XS(_wrap_ASX_nextDate__SWIG_0) {
  {
    Date *arg1 = 0 ;
    bool arg2 ;
    void *argp1 ;
    int res1 = 0 ;
    bool val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: ASX_nextDate(d,mainCycle);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ASX_nextDate" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ASX_nextDate" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    ecode2 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ASX_nextDate" "', argument " "2"" of type '" "bool""'");
    } 
    arg2 = static_cast< bool >(val2);
    {
      try {
        result = ASX::nextDate((Date const &)*arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_ASX_nextDate__SWIG_1) {
  {
    Date *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ASX_nextDate(d);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ASX_nextDate" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ASX_nextDate" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    {
      try {
        result = ASX::nextDate((Date const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ASX_nextDate__SWIG_2) {
  {
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: ASX_nextDate();");
    }
    {
      try {
        result = ASX::nextDate();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_ASX_nextDate__SWIG_3) {
  {
    std::string *arg1 = 0 ;
    bool arg2 ;
    Date *arg3 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    bool val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: ASX_nextDate(asxCode,mainCycle,referenceDate);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ASX_nextDate" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ASX_nextDate" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    ecode2 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ASX_nextDate" "', argument " "2"" of type '" "bool""'");
    } 
    arg2 = static_cast< bool >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ASX_nextDate" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ASX_nextDate" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    {
      try {
        result = ASX::nextDate((std::string const &)*arg1,arg2,(Date const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_ASX_nextDate__SWIG_4) {
  {
    std::string *arg1 = 0 ;
    bool arg2 ;
    int res1 = SWIG_OLDOBJ ;
    bool val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: ASX_nextDate(asxCode,mainCycle);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ASX_nextDate" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ASX_nextDate" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    ecode2 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ASX_nextDate" "', argument " "2"" of type '" "bool""'");
    } 
    arg2 = static_cast< bool >(val2);
    {
      try {
        result = ASX::nextDate((std::string const &)*arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    SWIG_croak_null();
  }
}


XS(_wrap_ASX_nextDate__SWIG_5) {
  {
    std::string *arg1 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ASX_nextDate(asxCode);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ASX_nextDate" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ASX_nextDate" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      try {
        result = ASX::nextDate((std::string const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    SWIG_croak_null();
  }
}


XS(_wrap_ASX_nextDate) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_ASX_nextDate__SWIG_2); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_ASX_nextDate__SWIG_1); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_ASX_nextDate__SWIG_5); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_ASX_nextDate__SWIG_0); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_ASX_nextDate__SWIG_4); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_ASX_nextDate__SWIG_3); return;
    }
  }
  
  croak("No matching function for overloaded 'ASX_nextDate'");
  XSRETURN(0);
}


XS(_wrap_ASX_nextCode__SWIG_0) {
  {
    Date *arg1 = 0 ;
    bool arg2 ;
    void *argp1 ;
    int res1 = 0 ;
    bool val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: ASX_nextCode(d,mainCycle);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ASX_nextCode" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ASX_nextCode" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    ecode2 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ASX_nextCode" "', argument " "2"" of type '" "bool""'");
    } 
    arg2 = static_cast< bool >(val2);
    {
      try {
        result = ASX::nextCode((Date const &)*arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_ASX_nextCode__SWIG_1) {
  {
    Date *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ASX_nextCode(d);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ASX_nextCode" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ASX_nextCode" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    {
      try {
        result = ASX::nextCode((Date const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ASX_nextCode__SWIG_2) {
  {
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: ASX_nextCode();");
    }
    {
      try {
        result = ASX::nextCode();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_ASX_nextCode__SWIG_3) {
  {
    std::string *arg1 = 0 ;
    bool arg2 ;
    Date *arg3 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    bool val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: ASX_nextCode(asxCode,mainCycle,referenceDate);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ASX_nextCode" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ASX_nextCode" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    ecode2 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ASX_nextCode" "', argument " "2"" of type '" "bool""'");
    } 
    arg2 = static_cast< bool >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ASX_nextCode" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ASX_nextCode" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    {
      try {
        result = ASX::nextCode((std::string const &)*arg1,arg2,(Date const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_ASX_nextCode__SWIG_4) {
  {
    std::string *arg1 = 0 ;
    bool arg2 ;
    int res1 = SWIG_OLDOBJ ;
    bool val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: ASX_nextCode(asxCode,mainCycle);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ASX_nextCode" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ASX_nextCode" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    ecode2 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ASX_nextCode" "', argument " "2"" of type '" "bool""'");
    } 
    arg2 = static_cast< bool >(val2);
    {
      try {
        result = ASX::nextCode((std::string const &)*arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    SWIG_croak_null();
  }
}


XS(_wrap_ASX_nextCode__SWIG_5) {
  {
    std::string *arg1 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ASX_nextCode(asxCode);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ASX_nextCode" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ASX_nextCode" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      try {
        result = ASX::nextCode((std::string const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    SWIG_croak_null();
  }
}


XS(_wrap_ASX_nextCode) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_ASX_nextCode__SWIG_2); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_ASX_nextCode__SWIG_1); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_ASX_nextCode__SWIG_5); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_ASX_nextCode__SWIG_0); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_ASX_nextCode__SWIG_4); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_ASX_nextCode__SWIG_3); return;
    }
  }
  
  croak("No matching function for overloaded 'ASX_nextCode'");
  XSRETURN(0);
}


XS(_wrap_new_ASX) {
  {
    int argvi = 0;
    ASX *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_ASX();");
    }
    {
      try {
        result = (ASX *)new ASX();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ASX, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_ASX) {
  {
    ASX *arg1 = (ASX *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_ASX(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ASX, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ASX" "', argument " "1"" of type '" "ASX *""'"); 
    }
    arg1 = reinterpret_cast< ASX * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_IntVector__SWIG_0) {
  {
    unsigned int arg1 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    std::vector< int > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_IntVector(size);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IntVector" "', argument " "1"" of type '" "unsigned int""'");
    } 
    arg1 = static_cast< unsigned int >(val1);
    {
      try {
        result = (std::vector< int > *)new std::vector< int >(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_IntVector__SWIG_1) {
  {
    int argvi = 0;
    std::vector< int > *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_IntVector();");
    }
    {
      try {
        result = (std::vector< int > *)new std::vector< int >();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_IntVector__SWIG_2) {
  {
    unsigned int arg1 ;
    int arg2 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    std::vector< int > *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_IntVector(size,value);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IntVector" "', argument " "1"" of type '" "unsigned int""'");
    } 
    arg1 = static_cast< unsigned int >(val1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_IntVector" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    {
      try {
        result = (std::vector< int > *)new std::vector< int >(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_IntVector__SWIG_3) {
  {
    std::vector< int > *arg1 = 0 ;
    std::vector< int > temp1 ;
    std::vector< int > *v1 ;
    int argvi = 0;
    std::vector< int > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_IntVector(std::vector< int > const &);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_int_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_IntVector. "
          "Expected an array of ""int");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvIOK(*tv)) {
            temp1.push_back((int)SvIVX(*tv));
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_IntVector. "
              "Expected an array of ""int");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_IntVector. "
          "Expected an array of ""int");
      }
    }
    {
      try {
        result = (std::vector< int > *)new std::vector< int >((std::vector< int > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_IntVector) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< int >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_int_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_IntVector__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_IntVector__SWIG_0); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_IntVector__SWIG_3); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_IntVector__SWIG_2); return;
    }
  }
  
  croak("No matching function for overloaded 'new_IntVector'");
  XSRETURN(0);
}


XS(_wrap_IntVector_size) {
  {
    std::vector< int > *arg1 = (std::vector< int > *) 0 ;
    std::vector< int > temp1 ;
    std::vector< int > *v1 ;
    int argvi = 0;
    unsigned int result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: IntVector_size(self);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_int_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of IntVector_size. "
          "Expected an array of ""int");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvIOK(*tv)) {
            temp1.push_back((int)SvIVX(*tv));
          } else {
            SWIG_croak("Type error in argument 1 of "
              "IntVector_size. "
              "Expected an array of ""int");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of IntVector_size. "
          "Expected an array of ""int");
      }
    }
    {
      try {
        result = (unsigned int)((std::vector< int > const *)arg1)->size();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_IntVector_empty) {
  {
    std::vector< int > *arg1 = (std::vector< int > *) 0 ;
    std::vector< int > temp1 ;
    std::vector< int > *v1 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: IntVector_empty(self);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_int_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of IntVector_empty. "
          "Expected an array of ""int");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvIOK(*tv)) {
            temp1.push_back((int)SvIVX(*tv));
          } else {
            SWIG_croak("Type error in argument 1 of "
              "IntVector_empty. "
              "Expected an array of ""int");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of IntVector_empty. "
          "Expected an array of ""int");
      }
    }
    {
      try {
        result = (bool)((std::vector< int > const *)arg1)->empty();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_IntVector_clear) {
  {
    std::vector< int > *arg1 = (std::vector< int > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: IntVector_clear(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_int_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_clear" "', argument " "1"" of type '" "std::vector< int > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< int > * >(argp1);
    {
      try {
        (arg1)->clear();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_IntVector_push) {
  {
    std::vector< int > *arg1 = (std::vector< int > *) 0 ;
    int arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: IntVector_push(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_int_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_push" "', argument " "1"" of type '" "std::vector< int > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< int > * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntVector_push" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    {
      try {
        (arg1)->push_back(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_IntVector_pop) {
  {
    std::vector< int > *arg1 = (std::vector< int > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    int result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: IntVector_pop(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_int_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_pop" "', argument " "1"" of type '" "std::vector< int > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< int > * >(argp1);
    {
      try {
        try {
          result = (int)std_vector_Sl_int_Sg__pop(arg1);
        }
        catch(std::out_of_range &_e) {
          sv_setsv(get_sv("@", GV_ADD), SWIG_NewPointerObj((new std::out_of_range(static_cast< const std::out_of_range& >(_e))),SWIGTYPE_p_std__out_of_range,SWIG_POINTER_OWN)); SWIG_fail ;
        }
        
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_IntVector_get) {
  {
    std::vector< int > *arg1 = (std::vector< int > *) 0 ;
    int arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    int result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: IntVector_get(self,i);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_int_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_get" "', argument " "1"" of type '" "std::vector< int > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< int > * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntVector_get" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    {
      try {
        try {
          result = (int)std_vector_Sl_int_Sg__get(arg1,arg2);
        }
        catch(std::out_of_range &_e) {
          sv_setsv(get_sv("@", GV_ADD), SWIG_NewPointerObj((new std::out_of_range(static_cast< const std::out_of_range& >(_e))),SWIGTYPE_p_std__out_of_range,SWIG_POINTER_OWN)); SWIG_fail ;
        }
        
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_IntVector_set) {
  {
    std::vector< int > *arg1 = (std::vector< int > *) 0 ;
    int arg2 ;
    int arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: IntVector_set(self,i,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_int_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_set" "', argument " "1"" of type '" "std::vector< int > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< int > * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntVector_set" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IntVector_set" "', argument " "3"" of type '" "int""'");
    } 
    arg3 = static_cast< int >(val3);
    {
      try {
        try {
          std_vector_Sl_int_Sg__set(arg1,arg2,arg3);
        }
        catch(std::out_of_range &_e) {
          sv_setsv(get_sv("@", GV_ADD), SWIG_NewPointerObj((new std::out_of_range(static_cast< const std::out_of_range& >(_e))),SWIGTYPE_p_std__out_of_range,SWIG_POINTER_OWN)); SWIG_fail ;
        }
        
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_IntVector) {
  {
    std::vector< int > *arg1 = (std::vector< int > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_IntVector(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_int_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IntVector" "', argument " "1"" of type '" "std::vector< int > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< int > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_UnsignedIntVector__SWIG_0) {
  {
    unsigned int arg1 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    std::vector< unsigned int > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_UnsignedIntVector(size);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_UnsignedIntVector" "', argument " "1"" of type '" "unsigned int""'");
    } 
    arg1 = static_cast< unsigned int >(val1);
    {
      try {
        result = (std::vector< unsigned int > *)new std::vector< unsigned int >(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_unsigned_int_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_UnsignedIntVector__SWIG_1) {
  {
    int argvi = 0;
    std::vector< unsigned int > *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_UnsignedIntVector();");
    }
    {
      try {
        result = (std::vector< unsigned int > *)new std::vector< unsigned int >();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_unsigned_int_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_UnsignedIntVector__SWIG_2) {
  {
    unsigned int arg1 ;
    unsigned int arg2 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    std::vector< unsigned int > *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_UnsignedIntVector(size,value);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_UnsignedIntVector" "', argument " "1"" of type '" "unsigned int""'");
    } 
    arg1 = static_cast< unsigned int >(val1);
    ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_UnsignedIntVector" "', argument " "2"" of type '" "unsigned int""'");
    } 
    arg2 = static_cast< unsigned int >(val2);
    {
      try {
        result = (std::vector< unsigned int > *)new std::vector< unsigned int >(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_unsigned_int_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_UnsignedIntVector__SWIG_3) {
  {
    std::vector< unsigned int > *arg1 = 0 ;
    std::vector< unsigned int > temp1 ;
    std::vector< unsigned int > *v1 ;
    int argvi = 0;
    std::vector< unsigned int > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_UnsignedIntVector(std::vector< unsigned int > const &);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_unsigned_int_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_UnsignedIntVector. "
          "Expected an array of ""unsigned int");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvIOK(*tv)) {
            temp1.push_back((unsigned int)SvIVX(*tv));
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_UnsignedIntVector. "
              "Expected an array of ""unsigned int");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_UnsignedIntVector. "
          "Expected an array of ""unsigned int");
      }
    }
    {
      try {
        result = (std::vector< unsigned int > *)new std::vector< unsigned int >((std::vector< unsigned int > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_unsigned_int_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_UnsignedIntVector) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< unsigned int >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_unsigned_int_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_UnsignedIntVector__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_UnsignedIntVector__SWIG_0); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_UnsignedIntVector__SWIG_3); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_UnsignedIntVector__SWIG_2); return;
    }
  }
  
  croak("No matching function for overloaded 'new_UnsignedIntVector'");
  XSRETURN(0);
}


XS(_wrap_UnsignedIntVector_size) {
  {
    std::vector< unsigned int > *arg1 = (std::vector< unsigned int > *) 0 ;
    std::vector< unsigned int > temp1 ;
    std::vector< unsigned int > *v1 ;
    int argvi = 0;
    unsigned int result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: UnsignedIntVector_size(self);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_unsigned_int_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of UnsignedIntVector_size. "
          "Expected an array of ""unsigned int");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvIOK(*tv)) {
            temp1.push_back((unsigned int)SvIVX(*tv));
          } else {
            SWIG_croak("Type error in argument 1 of "
              "UnsignedIntVector_size. "
              "Expected an array of ""unsigned int");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of UnsignedIntVector_size. "
          "Expected an array of ""unsigned int");
      }
    }
    {
      try {
        result = (unsigned int)((std::vector< unsigned int > const *)arg1)->size();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_UnsignedIntVector_empty) {
  {
    std::vector< unsigned int > *arg1 = (std::vector< unsigned int > *) 0 ;
    std::vector< unsigned int > temp1 ;
    std::vector< unsigned int > *v1 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: UnsignedIntVector_empty(self);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_unsigned_int_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of UnsignedIntVector_empty. "
          "Expected an array of ""unsigned int");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvIOK(*tv)) {
            temp1.push_back((unsigned int)SvIVX(*tv));
          } else {
            SWIG_croak("Type error in argument 1 of "
              "UnsignedIntVector_empty. "
              "Expected an array of ""unsigned int");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of UnsignedIntVector_empty. "
          "Expected an array of ""unsigned int");
      }
    }
    {
      try {
        result = (bool)((std::vector< unsigned int > const *)arg1)->empty();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_UnsignedIntVector_clear) {
  {
    std::vector< unsigned int > *arg1 = (std::vector< unsigned int > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: UnsignedIntVector_clear(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_unsigned_int_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnsignedIntVector_clear" "', argument " "1"" of type '" "std::vector< unsigned int > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< unsigned int > * >(argp1);
    {
      try {
        (arg1)->clear();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_UnsignedIntVector_push) {
  {
    std::vector< unsigned int > *arg1 = (std::vector< unsigned int > *) 0 ;
    unsigned int arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: UnsignedIntVector_push(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_unsigned_int_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnsignedIntVector_push" "', argument " "1"" of type '" "std::vector< unsigned int > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< unsigned int > * >(argp1);
    ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "UnsignedIntVector_push" "', argument " "2"" of type '" "unsigned int""'");
    } 
    arg2 = static_cast< unsigned int >(val2);
    {
      try {
        (arg1)->push_back(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_UnsignedIntVector_pop) {
  {
    std::vector< unsigned int > *arg1 = (std::vector< unsigned int > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    unsigned int result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: UnsignedIntVector_pop(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_unsigned_int_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnsignedIntVector_pop" "', argument " "1"" of type '" "std::vector< unsigned int > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< unsigned int > * >(argp1);
    {
      try {
        try {
          result = (unsigned int)std_vector_Sl_unsigned_SS_int_Sg__pop(arg1);
        }
        catch(std::out_of_range &_e) {
          sv_setsv(get_sv("@", GV_ADD), SWIG_NewPointerObj((new std::out_of_range(static_cast< const std::out_of_range& >(_e))),SWIGTYPE_p_std__out_of_range,SWIG_POINTER_OWN)); SWIG_fail ;
        }
        
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_UnsignedIntVector_get) {
  {
    std::vector< unsigned int > *arg1 = (std::vector< unsigned int > *) 0 ;
    int arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    unsigned int result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: UnsignedIntVector_get(self,i);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_unsigned_int_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnsignedIntVector_get" "', argument " "1"" of type '" "std::vector< unsigned int > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< unsigned int > * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "UnsignedIntVector_get" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    {
      try {
        try {
          result = (unsigned int)std_vector_Sl_unsigned_SS_int_Sg__get(arg1,arg2);
        }
        catch(std::out_of_range &_e) {
          sv_setsv(get_sv("@", GV_ADD), SWIG_NewPointerObj((new std::out_of_range(static_cast< const std::out_of_range& >(_e))),SWIGTYPE_p_std__out_of_range,SWIG_POINTER_OWN)); SWIG_fail ;
        }
        
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_UnsignedIntVector_set) {
  {
    std::vector< unsigned int > *arg1 = (std::vector< unsigned int > *) 0 ;
    int arg2 ;
    unsigned int arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    unsigned int val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: UnsignedIntVector_set(self,i,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_unsigned_int_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UnsignedIntVector_set" "', argument " "1"" of type '" "std::vector< unsigned int > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< unsigned int > * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "UnsignedIntVector_set" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    ecode3 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "UnsignedIntVector_set" "', argument " "3"" of type '" "unsigned int""'");
    } 
    arg3 = static_cast< unsigned int >(val3);
    {
      try {
        try {
          std_vector_Sl_unsigned_SS_int_Sg__set(arg1,arg2,arg3);
        }
        catch(std::out_of_range &_e) {
          sv_setsv(get_sv("@", GV_ADD), SWIG_NewPointerObj((new std::out_of_range(static_cast< const std::out_of_range& >(_e))),SWIGTYPE_p_std__out_of_range,SWIG_POINTER_OWN)); SWIG_fail ;
        }
        
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_UnsignedIntVector) {
  {
    std::vector< unsigned int > *arg1 = (std::vector< unsigned int > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_UnsignedIntVector(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_unsigned_int_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnsignedIntVector" "', argument " "1"" of type '" "std::vector< unsigned int > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< unsigned int > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DoubleVector__SWIG_0) {
  {
    unsigned int arg1 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    std::vector< double > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_DoubleVector(size);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_DoubleVector" "', argument " "1"" of type '" "unsigned int""'");
    } 
    arg1 = static_cast< unsigned int >(val1);
    {
      try {
        result = (std::vector< double > *)new std::vector< double >(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DoubleVector__SWIG_1) {
  {
    int argvi = 0;
    std::vector< double > *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_DoubleVector();");
    }
    {
      try {
        result = (std::vector< double > *)new std::vector< double >();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_DoubleVector__SWIG_2) {
  {
    unsigned int arg1 ;
    double arg2 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    std::vector< double > *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_DoubleVector(size,value);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_DoubleVector" "', argument " "1"" of type '" "unsigned int""'");
    } 
    arg1 = static_cast< unsigned int >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_DoubleVector" "', argument " "2"" of type '" "double""'");
    } 
    arg2 = static_cast< double >(val2);
    {
      try {
        result = (std::vector< double > *)new std::vector< double >(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DoubleVector__SWIG_3) {
  {
    std::vector< double > *arg1 = 0 ;
    std::vector< double > temp1 ;
    std::vector< double > *v1 ;
    int argvi = 0;
    std::vector< double > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_DoubleVector(std::vector< double > const &);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_DoubleVector. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp1.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_DoubleVector. "
              "Expected an array of ""double");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_DoubleVector. "
          "Expected an array of ""double");
      }
    }
    {
      try {
        result = (std::vector< double > *)new std::vector< double >((std::vector< double > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DoubleVector) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DoubleVector__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DoubleVector__SWIG_0); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DoubleVector__SWIG_3); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DoubleVector__SWIG_2); return;
    }
  }
  
  croak("No matching function for overloaded 'new_DoubleVector'");
  XSRETURN(0);
}


XS(_wrap_DoubleVector_size) {
  {
    std::vector< double > *arg1 = (std::vector< double > *) 0 ;
    std::vector< double > temp1 ;
    std::vector< double > *v1 ;
    int argvi = 0;
    unsigned int result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DoubleVector_size(self);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of DoubleVector_size. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp1.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 1 of "
              "DoubleVector_size. "
              "Expected an array of ""double");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of DoubleVector_size. "
          "Expected an array of ""double");
      }
    }
    {
      try {
        result = (unsigned int)((std::vector< double > const *)arg1)->size();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_DoubleVector_empty) {
  {
    std::vector< double > *arg1 = (std::vector< double > *) 0 ;
    std::vector< double > temp1 ;
    std::vector< double > *v1 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DoubleVector_empty(self);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of DoubleVector_empty. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp1.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 1 of "
              "DoubleVector_empty. "
              "Expected an array of ""double");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of DoubleVector_empty. "
          "Expected an array of ""double");
      }
    }
    {
      try {
        result = (bool)((std::vector< double > const *)arg1)->empty();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_DoubleVector_clear) {
  {
    std::vector< double > *arg1 = (std::vector< double > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DoubleVector_clear(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_double_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_clear" "', argument " "1"" of type '" "std::vector< double > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< double > * >(argp1);
    {
      try {
        (arg1)->clear();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_DoubleVector_push) {
  {
    std::vector< double > *arg1 = (std::vector< double > *) 0 ;
    double arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: DoubleVector_push(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_double_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_push" "', argument " "1"" of type '" "std::vector< double > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< double > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleVector_push" "', argument " "2"" of type '" "double""'");
    } 
    arg2 = static_cast< double >(val2);
    {
      try {
        (arg1)->push_back(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_DoubleVector_pop) {
  {
    std::vector< double > *arg1 = (std::vector< double > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    double result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DoubleVector_pop(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_double_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_pop" "', argument " "1"" of type '" "std::vector< double > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< double > * >(argp1);
    {
      try {
        try {
          result = (double)std_vector_Sl_double_Sg__pop(arg1);
        }
        catch(std::out_of_range &_e) {
          sv_setsv(get_sv("@", GV_ADD), SWIG_NewPointerObj((new std::out_of_range(static_cast< const std::out_of_range& >(_e))),SWIGTYPE_p_std__out_of_range,SWIG_POINTER_OWN)); SWIG_fail ;
        }
        
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_DoubleVector_get) {
  {
    std::vector< double > *arg1 = (std::vector< double > *) 0 ;
    int arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    double result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: DoubleVector_get(self,i);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_double_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_get" "', argument " "1"" of type '" "std::vector< double > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< double > * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleVector_get" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    {
      try {
        try {
          result = (double)std_vector_Sl_double_Sg__get(arg1,arg2);
        }
        catch(std::out_of_range &_e) {
          sv_setsv(get_sv("@", GV_ADD), SWIG_NewPointerObj((new std::out_of_range(static_cast< const std::out_of_range& >(_e))),SWIGTYPE_p_std__out_of_range,SWIG_POINTER_OWN)); SWIG_fail ;
        }
        
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_DoubleVector_set) {
  {
    std::vector< double > *arg1 = (std::vector< double > *) 0 ;
    int arg2 ;
    double arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: DoubleVector_set(self,i,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_double_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_set" "', argument " "1"" of type '" "std::vector< double > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< double > * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleVector_set" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DoubleVector_set" "', argument " "3"" of type '" "double""'");
    } 
    arg3 = static_cast< double >(val3);
    {
      try {
        try {
          std_vector_Sl_double_Sg__set(arg1,arg2,arg3);
        }
        catch(std::out_of_range &_e) {
          sv_setsv(get_sv("@", GV_ADD), SWIG_NewPointerObj((new std::out_of_range(static_cast< const std::out_of_range& >(_e))),SWIGTYPE_p_std__out_of_range,SWIG_POINTER_OWN)); SWIG_fail ;
        }
        
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_DoubleVector) {
  {
    std::vector< double > *arg1 = (std::vector< double > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_DoubleVector(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_double_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DoubleVector" "', argument " "1"" of type '" "std::vector< double > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< double > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_StrVector__SWIG_0) {
  {
    unsigned int arg1 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    std::vector< std::string > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_StrVector(size);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_StrVector" "', argument " "1"" of type '" "unsigned int""'");
    } 
    arg1 = static_cast< unsigned int >(val1);
    {
      try {
        result = (std::vector< std::string > *)new std::vector< std::string >(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__string_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_StrVector__SWIG_1) {
  {
    int argvi = 0;
    std::vector< std::string > *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_StrVector();");
    }
    {
      try {
        result = (std::vector< std::string > *)new std::vector< std::string >();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__string_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_StrVector__SWIG_2) {
  {
    unsigned int arg1 ;
    std::string arg2 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    std::vector< std::string > *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_StrVector(size,value);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_StrVector" "', argument " "1"" of type '" "unsigned int""'");
    } 
    arg1 = static_cast< unsigned int >(val1);
    {
      std::string *ptr = (std::string *)0;
      int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res) || !ptr) {
        SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "new_StrVector" "', argument " "2"" of type '" "std::string""'"); 
      }
      arg2 = *ptr;
      if (SWIG_IsNewObj(res)) delete ptr;
    }
    {
      try {
        result = (std::vector< std::string > *)new std::vector< std::string >(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__string_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_StrVector__SWIG_3) {
  {
    std::vector< std::string > *arg1 = 0 ;
    std::vector< std::string > temp1 ;
    std::vector< std::string > *v1 ;
    int argvi = 0;
    std::vector< std::string > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_StrVector(std::vector< std::string > const &);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_std__string_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_StrVector. "
          "Expected an array of ""std::string");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvPOK(*tv)) {
            temp1.push_back((std::string)SwigSvToString(*tv));
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_StrVector. "
              "Expected an array of ""std::string");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_StrVector. "
          "Expected an array of ""std::string");
      }
    }
    {
      try {
        result = (std::vector< std::string > *)new std::vector< std::string >((std::vector< std::string > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__string_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_StrVector) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< std::string >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_std__string_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvPOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_StrVector__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_StrVector__SWIG_0); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_StrVector__SWIG_3); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_StrVector__SWIG_2); return;
    }
  }
  
  croak("No matching function for overloaded 'new_StrVector'");
  XSRETURN(0);
}


XS(_wrap_StrVector_size) {
  {
    std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ;
    std::vector< std::string > temp1 ;
    std::vector< std::string > *v1 ;
    int argvi = 0;
    unsigned int result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: StrVector_size(self);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_std__string_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of StrVector_size. "
          "Expected an array of ""std::string");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvPOK(*tv)) {
            temp1.push_back((std::string)SwigSvToString(*tv));
          } else {
            SWIG_croak("Type error in argument 1 of "
              "StrVector_size. "
              "Expected an array of ""std::string");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of StrVector_size. "
          "Expected an array of ""std::string");
      }
    }
    {
      try {
        result = (unsigned int)((std::vector< std::string > const *)arg1)->size();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_StrVector_empty) {
  {
    std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ;
    std::vector< std::string > temp1 ;
    std::vector< std::string > *v1 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: StrVector_empty(self);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_std__string_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of StrVector_empty. "
          "Expected an array of ""std::string");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvPOK(*tv)) {
            temp1.push_back((std::string)SwigSvToString(*tv));
          } else {
            SWIG_croak("Type error in argument 1 of "
              "StrVector_empty. "
              "Expected an array of ""std::string");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of StrVector_empty. "
          "Expected an array of ""std::string");
      }
    }
    {
      try {
        result = (bool)((std::vector< std::string > const *)arg1)->empty();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_StrVector_clear) {
  {
    std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: StrVector_clear(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_std__string_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrVector_clear" "', argument " "1"" of type '" "std::vector< std::string > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< std::string > * >(argp1);
    {
      try {
        (arg1)->clear();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_StrVector_push) {
  {
    std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ;
    std::string arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: StrVector_push(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_std__string_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrVector_push" "', argument " "1"" of type '" "std::vector< std::string > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< std::string > * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res) || !ptr) {
        SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "StrVector_push" "', argument " "2"" of type '" "std::string""'"); 
      }
      arg2 = *ptr;
      if (SWIG_IsNewObj(res)) delete ptr;
    }
    {
      try {
        (arg1)->push_back(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_StrVector_pop) {
  {
    std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: StrVector_pop(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_std__string_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrVector_pop" "', argument " "1"" of type '" "std::vector< std::string > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< std::string > * >(argp1);
    {
      try {
        try {
          result = std_vector_Sl_std_string_Sg__pop(arg1);
        }
        catch(std::out_of_range &_e) {
          sv_setsv(get_sv("@", GV_ADD), SWIG_NewPointerObj((new std::out_of_range(static_cast< const std::out_of_range& >(_e))),SWIGTYPE_p_std__out_of_range,SWIG_POINTER_OWN)); SWIG_fail ;
        }
        
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_StrVector_get) {
  {
    std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ;
    int arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: StrVector_get(self,i);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_std__string_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrVector_get" "', argument " "1"" of type '" "std::vector< std::string > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< std::string > * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StrVector_get" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    {
      try {
        try {
          result = std_vector_Sl_std_string_Sg__get(arg1,arg2);
        }
        catch(std::out_of_range &_e) {
          sv_setsv(get_sv("@", GV_ADD), SWIG_NewPointerObj((new std::out_of_range(static_cast< const std::out_of_range& >(_e))),SWIGTYPE_p_std__out_of_range,SWIG_POINTER_OWN)); SWIG_fail ;
        }
        
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_StrVector_set) {
  {
    std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ;
    int arg2 ;
    std::string arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: StrVector_set(self,i,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_std__string_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrVector_set" "', argument " "1"" of type '" "std::vector< std::string > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< std::string > * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StrVector_set" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    {
      std::string *ptr = (std::string *)0;
      int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr);
      if (!SWIG_IsOK(res) || !ptr) {
        SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "StrVector_set" "', argument " "3"" of type '" "std::string""'"); 
      }
      arg3 = *ptr;
      if (SWIG_IsNewObj(res)) delete ptr;
    }
    {
      try {
        try {
          std_vector_Sl_std_string_Sg__set(arg1,arg2,arg3);
        }
        catch(std::out_of_range &_e) {
          sv_setsv(get_sv("@", GV_ADD), SWIG_NewPointerObj((new std::out_of_range(static_cast< const std::out_of_range& >(_e))),SWIGTYPE_p_std__out_of_range,SWIG_POINTER_OWN)); SWIG_fail ;
        }
        
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_StrVector) {
  {
    std::vector< std::string > *arg1 = (std::vector< std::string > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_StrVector(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_std__string_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_StrVector" "', argument " "1"" of type '" "std::vector< std::string > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< std::string > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BoolVector__SWIG_0) {
  {
    unsigned int arg1 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    std::vector< bool > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_BoolVector(size);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_BoolVector" "', argument " "1"" of type '" "unsigned int""'");
    } 
    arg1 = static_cast< unsigned int >(val1);
    {
      try {
        result = (std::vector< bool > *)new std::vector< bool >(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_bool_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BoolVector__SWIG_1) {
  {
    int argvi = 0;
    std::vector< bool > *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_BoolVector();");
    }
    {
      try {
        result = (std::vector< bool > *)new std::vector< bool >();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_bool_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_BoolVector__SWIG_2) {
  {
    unsigned int arg1 ;
    bool arg2 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    bool val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    std::vector< bool > *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_BoolVector(size,value);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_BoolVector" "', argument " "1"" of type '" "unsigned int""'");
    } 
    arg1 = static_cast< unsigned int >(val1);
    ecode2 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_BoolVector" "', argument " "2"" of type '" "bool""'");
    } 
    arg2 = static_cast< bool >(val2);
    {
      try {
        result = (std::vector< bool > *)new std::vector< bool >(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_bool_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BoolVector__SWIG_3) {
  {
    std::vector< bool > *arg1 = 0 ;
    std::vector< bool > temp1 ;
    std::vector< bool > *v1 ;
    int argvi = 0;
    std::vector< bool > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_BoolVector(std::vector< bool > const &);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_bool_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_BoolVector. "
          "Expected an array of ""bool");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvIOK(*tv)) {
            temp1.push_back((bool)SvIVX(*tv));
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_BoolVector. "
              "Expected an array of ""bool");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_BoolVector. "
          "Expected an array of ""bool");
      }
    }
    {
      try {
        result = (std::vector< bool > *)new std::vector< bool >((std::vector< bool > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_bool_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BoolVector) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< bool >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_bool_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_BoolVector__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_BoolVector__SWIG_0); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_BoolVector__SWIG_3); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_BoolVector__SWIG_2); return;
    }
  }
  
  croak("No matching function for overloaded 'new_BoolVector'");
  XSRETURN(0);
}


XS(_wrap_BoolVector_size) {
  {
    std::vector< bool > *arg1 = (std::vector< bool > *) 0 ;
    std::vector< bool > temp1 ;
    std::vector< bool > *v1 ;
    int argvi = 0;
    unsigned int result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BoolVector_size(self);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_bool_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of BoolVector_size. "
          "Expected an array of ""bool");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvIOK(*tv)) {
            temp1.push_back((bool)SvIVX(*tv));
          } else {
            SWIG_croak("Type error in argument 1 of "
              "BoolVector_size. "
              "Expected an array of ""bool");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of BoolVector_size. "
          "Expected an array of ""bool");
      }
    }
    {
      try {
        result = (unsigned int)((std::vector< bool > const *)arg1)->size();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BoolVector_empty) {
  {
    std::vector< bool > *arg1 = (std::vector< bool > *) 0 ;
    std::vector< bool > temp1 ;
    std::vector< bool > *v1 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BoolVector_empty(self);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_bool_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of BoolVector_empty. "
          "Expected an array of ""bool");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvIOK(*tv)) {
            temp1.push_back((bool)SvIVX(*tv));
          } else {
            SWIG_croak("Type error in argument 1 of "
              "BoolVector_empty. "
              "Expected an array of ""bool");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of BoolVector_empty. "
          "Expected an array of ""bool");
      }
    }
    {
      try {
        result = (bool)((std::vector< bool > const *)arg1)->empty();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BoolVector_clear) {
  {
    std::vector< bool > *arg1 = (std::vector< bool > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BoolVector_clear(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_bool_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoolVector_clear" "', argument " "1"" of type '" "std::vector< bool > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< bool > * >(argp1);
    {
      try {
        (arg1)->clear();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BoolVector_push) {
  {
    std::vector< bool > *arg1 = (std::vector< bool > *) 0 ;
    bool arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    bool val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: BoolVector_push(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_bool_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoolVector_push" "', argument " "1"" of type '" "std::vector< bool > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< bool > * >(argp1);
    ecode2 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BoolVector_push" "', argument " "2"" of type '" "bool""'");
    } 
    arg2 = static_cast< bool >(val2);
    {
      try {
        (arg1)->push_back(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BoolVector_pop) {
  {
    std::vector< bool > *arg1 = (std::vector< bool > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BoolVector_pop(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_bool_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoolVector_pop" "', argument " "1"" of type '" "std::vector< bool > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< bool > * >(argp1);
    {
      try {
        try {
          result = (bool)std_vector_Sl_bool_Sg__pop(arg1);
        }
        catch(std::out_of_range &_e) {
          sv_setsv(get_sv("@", GV_ADD), SWIG_NewPointerObj((new std::out_of_range(static_cast< const std::out_of_range& >(_e))),SWIGTYPE_p_std__out_of_range,SWIG_POINTER_OWN)); SWIG_fail ;
        }
        
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BoolVector_get) {
  {
    std::vector< bool > *arg1 = (std::vector< bool > *) 0 ;
    int arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: BoolVector_get(self,i);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_bool_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoolVector_get" "', argument " "1"" of type '" "std::vector< bool > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< bool > * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BoolVector_get" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    {
      try {
        try {
          result = (bool)std_vector_Sl_bool_Sg__get(arg1,arg2);
        }
        catch(std::out_of_range &_e) {
          sv_setsv(get_sv("@", GV_ADD), SWIG_NewPointerObj((new std::out_of_range(static_cast< const std::out_of_range& >(_e))),SWIGTYPE_p_std__out_of_range,SWIG_POINTER_OWN)); SWIG_fail ;
        }
        
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BoolVector_set) {
  {
    std::vector< bool > *arg1 = (std::vector< bool > *) 0 ;
    int arg2 ;
    bool arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: BoolVector_set(self,i,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_bool_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoolVector_set" "', argument " "1"" of type '" "std::vector< bool > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< bool > * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BoolVector_set" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "BoolVector_set" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        try {
          std_vector_Sl_bool_Sg__set(arg1,arg2,arg3);
        }
        catch(std::out_of_range &_e) {
          sv_setsv(get_sv("@", GV_ADD), SWIG_NewPointerObj((new std::out_of_range(static_cast< const std::out_of_range& >(_e))),SWIGTYPE_p_std__out_of_range,SWIG_POINTER_OWN)); SWIG_fail ;
        }
        
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_BoolVector) {
  {
    std::vector< bool > *arg1 = (std::vector< bool > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_BoolVector(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_bool_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_BoolVector" "', argument " "1"" of type '" "std::vector< bool > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< bool > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_NodePair__SWIG_0) {
  {
    int argvi = 0;
    std::pair< Date,double > *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_NodePair();");
    }
    {
      try {
        result = (std::pair< Date,double > *)new std::pair< Date,double >();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__pairT_Date_double_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_NodePair__SWIG_1) {
  {
    Date arg1 ;
    double arg2 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    std::pair< Date,double > *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_NodePair(t,u);");
    }
    {
      res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_NodePair" "', argument " "1"" of type '" "Date""'"); 
      }  
      if (!argp1) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NodePair" "', argument " "1"" of type '" "Date""'");
      } else {
        arg1 = *(reinterpret_cast< Date * >(argp1));
      }
    }
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_NodePair" "', argument " "2"" of type '" "double""'");
    } 
    arg2 = static_cast< double >(val2);
    {
      try {
        result = (std::pair< Date,double > *)new std::pair< Date,double >(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__pairT_Date_double_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_NodePair__SWIG_2) {
  {
    std::pair< Date,double > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    std::pair< Date,double > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_NodePair(p);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_std__pairT_Date_double_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_NodePair" "', argument " "1"" of type '" "std::pair< Date,double > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NodePair" "', argument " "1"" of type '" "std::pair< Date,double > const &""'"); 
    }
    arg1 = reinterpret_cast< std::pair< Date,double > * >(argp1);
    {
      try {
        result = (std::pair< Date,double > *)new std::pair< Date,double >((std::pair< Date,double > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__pairT_Date_double_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_NodePair) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_std__pairT_Date_double_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_NodePair__SWIG_0); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_NodePair__SWIG_2); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_NodePair__SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded 'new_NodePair'");
  XSRETURN(0);
}


XS(_wrap_NodePair_first_set) {
  {
    std::pair< Date,double > *arg1 = (std::pair< Date,double > *) 0 ;
    Date *arg2 = (Date *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: NodePair_first_set(self,first);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__pairT_Date_double_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NodePair_first_set" "', argument " "1"" of type '" "std::pair< Date,double > *""'"); 
    }
    arg1 = reinterpret_cast< std::pair< Date,double > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_Date, 0 |  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "NodePair_first_set" "', argument " "2"" of type '" "Date *""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    if (arg1) (arg1)->first = *arg2;
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_NodePair_first_get) {
  {
    std::pair< Date,double > *arg1 = (std::pair< Date,double > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Date *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: NodePair_first_get(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__pairT_Date_double_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NodePair_first_get" "', argument " "1"" of type '" "std::pair< Date,double > *""'"); 
    }
    arg1 = reinterpret_cast< std::pair< Date,double > * >(argp1);
    result = (Date *)& ((arg1)->first);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Date, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_NodePair_second_set) {
  {
    std::pair< Date,double > *arg1 = (std::pair< Date,double > *) 0 ;
    double arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: NodePair_second_set(self,second);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__pairT_Date_double_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NodePair_second_set" "', argument " "1"" of type '" "std::pair< Date,double > *""'"); 
    }
    arg1 = reinterpret_cast< std::pair< Date,double > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "NodePair_second_set" "', argument " "2"" of type '" "double""'");
    } 
    arg2 = static_cast< double >(val2);
    if (arg1) (arg1)->second = arg2;
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_NodePair_second_get) {
  {
    std::pair< Date,double > *arg1 = (std::pair< Date,double > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    double result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: NodePair_second_get(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__pairT_Date_double_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NodePair_second_get" "', argument " "1"" of type '" "std::pair< Date,double > *""'"); 
    }
    arg1 = reinterpret_cast< std::pair< Date,double > * >(argp1);
    result = (double) ((arg1)->second);
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_NodePair) {
  {
    std::pair< Date,double > *arg1 = (std::pair< Date,double > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_NodePair(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__pairT_Date_double_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_NodePair" "', argument " "1"" of type '" "std::pair< Date,double > *""'"); 
    }
    arg1 = reinterpret_cast< std::pair< Date,double > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_NodeVector__SWIG_0) {
  {
    unsigned int arg1 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    std::vector< std::pair< Date,double > > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_NodeVector(size);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_NodeVector" "', argument " "1"" of type '" "unsigned int""'");
    } 
    arg1 = static_cast< unsigned int >(val1);
    {
      try {
        result = (std::vector< std::pair< Date,double > > *)new std::vector< std::pair< Date,double > >(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__pairT_Date_double_t_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_NodeVector__SWIG_1) {
  {
    int argvi = 0;
    std::vector< std::pair< Date,double > > *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_NodeVector();");
    }
    {
      try {
        result = (std::vector< std::pair< Date,double > > *)new std::vector< std::pair< Date,double > >();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__pairT_Date_double_t_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_NodeVector__SWIG_2) {
  {
    unsigned int arg1 ;
    std::pair< Date,double > *arg2 = 0 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    std::vector< std::pair< Date,double > > *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_NodeVector(size,value);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_NodeVector" "', argument " "1"" of type '" "unsigned int""'");
    } 
    arg1 = static_cast< unsigned int >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_std__pairT_Date_double_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_NodeVector" "', argument " "2"" of type '" "std::pair< Date,double > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NodeVector" "', argument " "2"" of type '" "std::pair< Date,double > const &""'"); 
    }
    arg2 = reinterpret_cast< std::pair< Date,double > * >(argp2);
    {
      try {
        result = (std::vector< std::pair< Date,double > > *)new std::vector< std::pair< Date,double > >(arg1,(std::pair< Date,double > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__pairT_Date_double_t_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_NodeVector__SWIG_3) {
  {
    std::vector< std::pair< Date,double > > *arg1 = 0 ;
    std::vector< std::pair< Date,double > > temp1 ;
    std::vector< std::pair< Date,double > > *v1 ;
    int argvi = 0;
    std::vector< std::pair< Date,double > > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_NodeVector(std::vector< std::pair< Date,double > > const &);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_std__pairT_Date_double_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_NodeVector. "
          "Expected an array of " "std::pair< Date,double >");
        SV **tv;
        I32 len = av_len(av) + 1;
        std::pair< Date,double >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_std__pairT_Date_double_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_NodeVector. "
              "Expected an array of " "std::pair< Date,double >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_NodeVector. "
          "Expected an array of " "std::pair< Date,double >");
      }
    }
    {
      try {
        result = (std::vector< std::pair< Date,double > > *)new std::vector< std::pair< Date,double > >((std::vector< std::pair< Date,double > > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__pairT_Date_double_t_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_NodeVector) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< std::pair< Date,double > >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_std__pairT_Date_double_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  std::pair< Date,double >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_std__pairT_Date_double_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_std__pairT_Date_double_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_NodeVector__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_NodeVector__SWIG_0); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_NodeVector__SWIG_3); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_NodeVector__SWIG_2); return;
    }
  }
  
  croak("No matching function for overloaded 'new_NodeVector'");
  XSRETURN(0);
}


XS(_wrap_NodeVector_size) {
  {
    std::vector< std::pair< Date,double > > *arg1 = (std::vector< std::pair< Date,double > > *) 0 ;
    std::vector< std::pair< Date,double > > temp1 ;
    std::vector< std::pair< Date,double > > *v1 ;
    int argvi = 0;
    unsigned int result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: NodeVector_size(self);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_std__pairT_Date_double_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of NodeVector_size. "
          "Expected an array of " "std::pair< Date,double >");
        SV **tv;
        I32 len = av_len(av) + 1;
        std::pair< Date,double >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_std__pairT_Date_double_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "NodeVector_size. "
              "Expected an array of " "std::pair< Date,double >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of NodeVector_size. "
          "Expected an array of " "std::pair< Date,double >");
      }
    }
    {
      try {
        result = (unsigned int)((std::vector< std::pair< Date,double > > const *)arg1)->size();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_NodeVector_empty) {
  {
    std::vector< std::pair< Date,double > > *arg1 = (std::vector< std::pair< Date,double > > *) 0 ;
    std::vector< std::pair< Date,double > > temp1 ;
    std::vector< std::pair< Date,double > > *v1 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: NodeVector_empty(self);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_std__pairT_Date_double_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of NodeVector_empty. "
          "Expected an array of " "std::pair< Date,double >");
        SV **tv;
        I32 len = av_len(av) + 1;
        std::pair< Date,double >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_std__pairT_Date_double_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "NodeVector_empty. "
              "Expected an array of " "std::pair< Date,double >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of NodeVector_empty. "
          "Expected an array of " "std::pair< Date,double >");
      }
    }
    {
      try {
        result = (bool)((std::vector< std::pair< Date,double > > const *)arg1)->empty();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_NodeVector_clear) {
  {
    std::vector< std::pair< Date,double > > *arg1 = (std::vector< std::pair< Date,double > > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: NodeVector_clear(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_std__pairT_Date_double_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NodeVector_clear" "', argument " "1"" of type '" "std::vector< std::pair< Date,double > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< std::pair< Date,double > > * >(argp1);
    {
      try {
        (arg1)->clear();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_NodeVector_push) {
  {
    std::vector< std::pair< Date,double > > *arg1 = (std::vector< std::pair< Date,double > > *) 0 ;
    std::pair< Date,double > *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: NodeVector_push(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_std__pairT_Date_double_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NodeVector_push" "', argument " "1"" of type '" "std::vector< std::pair< Date,double > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< std::pair< Date,double > > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_std__pairT_Date_double_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "NodeVector_push" "', argument " "2"" of type '" "std::pair< Date,double > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "NodeVector_push" "', argument " "2"" of type '" "std::pair< Date,double > const &""'"); 
    }
    arg2 = reinterpret_cast< std::pair< Date,double > * >(argp2);
    {
      try {
        (arg1)->push_back((std::pair< Date,double > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_NodeVector_pop) {
  {
    std::vector< std::pair< Date,double > > *arg1 = (std::vector< std::pair< Date,double > > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::pair< Date,double > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: NodeVector_pop(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_std__pairT_Date_double_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NodeVector_pop" "', argument " "1"" of type '" "std::vector< std::pair< Date,double > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< std::pair< Date,double > > * >(argp1);
    {
      try {
        try {
          result = std_vector_Sl_std_pair_Sl_Date_Sc_double_Sg__Sg__pop(arg1);
        }
        catch(std::out_of_range &_e) {
          sv_setsv(get_sv("@", GV_ADD), SWIG_NewPointerObj((new std::out_of_range(static_cast< const std::out_of_range& >(_e))),SWIGTYPE_p_std__out_of_range,SWIG_POINTER_OWN)); SWIG_fail ;
        }
        
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new std::pair< Date,double >(static_cast< const std::pair< Date,double >& >(result))), SWIGTYPE_p_std__pairT_Date_double_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_NodeVector_get) {
  {
    std::vector< std::pair< Date,double > > *arg1 = (std::vector< std::pair< Date,double > > *) 0 ;
    int arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    std::pair< Date,double > *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: NodeVector_get(self,i);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_std__pairT_Date_double_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NodeVector_get" "', argument " "1"" of type '" "std::vector< std::pair< Date,double > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< std::pair< Date,double > > * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "NodeVector_get" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    {
      try {
        try {
          result = (std::pair< Date,double > *) &std_vector_Sl_std_pair_Sl_Date_Sc_double_Sg__Sg__get(arg1,arg2);
        }
        catch(std::out_of_range &_e) {
          sv_setsv(get_sv("@", GV_ADD), SWIG_NewPointerObj((new std::out_of_range(static_cast< const std::out_of_range& >(_e))),SWIGTYPE_p_std__out_of_range,SWIG_POINTER_OWN)); SWIG_fail ;
        }
        
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__pairT_Date_double_t, 0 | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_NodeVector_set) {
  {
    std::vector< std::pair< Date,double > > *arg1 = (std::vector< std::pair< Date,double > > *) 0 ;
    int arg2 ;
    std::pair< Date,double > *arg3 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: NodeVector_set(self,i,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_std__pairT_Date_double_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NodeVector_set" "', argument " "1"" of type '" "std::vector< std::pair< Date,double > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< std::pair< Date,double > > * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "NodeVector_set" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_std__pairT_Date_double_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "NodeVector_set" "', argument " "3"" of type '" "std::pair< Date,double > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "NodeVector_set" "', argument " "3"" of type '" "std::pair< Date,double > const &""'"); 
    }
    arg3 = reinterpret_cast< std::pair< Date,double > * >(argp3);
    {
      try {
        try {
          std_vector_Sl_std_pair_Sl_Date_Sc_double_Sg__Sg__set(arg1,arg2,(std::pair< Date,double > const &)*arg3);
        }
        catch(std::out_of_range &_e) {
          sv_setsv(get_sv("@", GV_ADD), SWIG_NewPointerObj((new std::out_of_range(static_cast< const std::out_of_range& >(_e))),SWIGTYPE_p_std__out_of_range,SWIG_POINTER_OWN)); SWIG_fail ;
        }
        
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_NodeVector) {
  {
    std::vector< std::pair< Date,double > > *arg1 = (std::vector< std::pair< Date,double > > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_NodeVector(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_std__pairT_Date_double_t_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_NodeVector" "', argument " "1"" of type '" "std::vector< std::pair< Date,double > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< std::pair< Date,double > > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Exercise___deref__) {
  {
    boost::shared_ptr< Exercise > *arg1 = (boost::shared_ptr< Exercise > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Exercise *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Exercise___deref__(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Exercise_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Exercise___deref__" "', argument " "1"" of type '" "boost::shared_ptr< Exercise > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Exercise > * >(argp1);
    {
      try {
        result = (Exercise *)(arg1)->operator ->();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Exercise, 0 | 0); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Exercise_isNull) {
  {
    boost::shared_ptr< Exercise > *arg1 = (boost::shared_ptr< Exercise > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Exercise_isNull(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Exercise_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Exercise_isNull" "', argument " "1"" of type '" "boost::shared_ptr< Exercise > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Exercise > * >(argp1);
    {
      try {
        result = (bool)boost_shared_ptr_Sl_Exercise_Sg__isNull(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Exercise_exerciseType) {
  {
    boost::shared_ptr< Exercise > *arg1 = (boost::shared_ptr< Exercise > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Exercise::Type result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Exercise_exerciseType(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Exercise_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Exercise_exerciseType" "', argument " "1"" of type '" "boost::shared_ptr< Exercise > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Exercise > * >(argp1);
    {
      try {
        result = (Exercise::Type)boost_shared_ptr_Sl_Exercise_Sg__exerciseType(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Exercise) {
  {
    int argvi = 0;
    boost::shared_ptr< Exercise > *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Exercise();");
    }
    {
      try {
        result = (boost::shared_ptr< Exercise > *)new boost::shared_ptr< Exercise >();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_boost__shared_ptrT_Exercise_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_Exercise) {
  {
    boost::shared_ptr< Exercise > *arg1 = (boost::shared_ptr< Exercise > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Exercise(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Exercise_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Exercise" "', argument " "1"" of type '" "boost::shared_ptr< Exercise > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Exercise > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Exercise_type) {
  {
    boost::shared_ptr< Exercise > *arg1 = (boost::shared_ptr< Exercise > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Exercise::Type result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Exercise_type(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Exercise_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Exercise_type" "', argument " "1"" of type '" "boost::shared_ptr< Exercise > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Exercise > * >(argp1);
    {
      try {
        result = (Exercise::Type)(*arg1)->type();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Exercise_dates) {
  {
    boost::shared_ptr< Exercise > *arg1 = (boost::shared_ptr< Exercise > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Date > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Exercise_dates(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Exercise_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Exercise_dates" "', argument " "1"" of type '" "boost::shared_ptr< Exercise > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Exercise > * >(argp1);
    {
      try {
        result = (std::vector< Date > *) &(*arg1)->dates();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_Date_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Exercise_lastDate) {
  {
    boost::shared_ptr< Exercise > *arg1 = (boost::shared_ptr< Exercise > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Exercise_lastDate(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Exercise_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Exercise_lastDate" "', argument " "1"" of type '" "boost::shared_ptr< Exercise > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Exercise > * >(argp1);
    {
      try {
        result = (*arg1)->lastDate();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_EuropeanExercise) {
  {
    Date *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    EuropeanExercisePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_EuropeanExercise(date);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_EuropeanExercise" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EuropeanExercise" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    {
      try {
        result = (EuropeanExercisePtr *)new_EuropeanExercisePtr((Date const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EuropeanExercisePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_EuropeanExercise) {
  {
    EuropeanExercisePtr *arg1 = (EuropeanExercisePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_EuropeanExercise(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_EuropeanExercisePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_EuropeanExercise" "', argument " "1"" of type '" "EuropeanExercisePtr *""'"); 
    }
    arg1 = reinterpret_cast< EuropeanExercisePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_AmericanExercise__SWIG_0) {
  {
    Date *arg1 = 0 ;
    Date *arg2 = 0 ;
    bool arg3 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    AmericanExercisePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_AmericanExercise(earliestDate,latestDate,payoffAtExpiry);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_AmericanExercise" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AmericanExercise" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_AmericanExercise" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AmericanExercise" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_AmericanExercise" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (AmericanExercisePtr *)new_AmericanExercisePtr__SWIG_0((Date const &)*arg1,(Date const &)*arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_AmericanExercisePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_AmericanExercise__SWIG_1) {
  {
    Date *arg1 = 0 ;
    Date *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    AmericanExercisePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_AmericanExercise(earliestDate,latestDate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_AmericanExercise" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AmericanExercise" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_AmericanExercise" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AmericanExercise" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    {
      try {
        result = (AmericanExercisePtr *)new_AmericanExercisePtr__SWIG_0((Date const &)*arg1,(Date const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_AmericanExercisePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_AmericanExercise) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_AmericanExercise__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_AmericanExercise__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_AmericanExercise'");
  XSRETURN(0);
}


XS(_wrap_delete_AmericanExercise) {
  {
    AmericanExercisePtr *arg1 = (AmericanExercisePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_AmericanExercise(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_AmericanExercisePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_AmericanExercise" "', argument " "1"" of type '" "AmericanExercisePtr *""'"); 
    }
    arg1 = reinterpret_cast< AmericanExercisePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BermudanExercise__SWIG_0) {
  {
    std::vector< Date > *arg1 = 0 ;
    bool arg2 ;
    std::vector< Date > temp1 ;
    std::vector< Date > *v1 ;
    bool val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    BermudanExercisePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_BermudanExercise(dates,payoffAtExpiry);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_BermudanExercise. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_BermudanExercise. "
              "Expected an array of " "Date");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_BermudanExercise. "
          "Expected an array of " "Date");
      }
    }
    ecode2 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_BermudanExercise" "', argument " "2"" of type '" "bool""'");
    } 
    arg2 = static_cast< bool >(val2);
    {
      try {
        result = (BermudanExercisePtr *)new_BermudanExercisePtr__SWIG_0((std::vector< Date > const &)*arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BermudanExercisePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BermudanExercise__SWIG_1) {
  {
    std::vector< Date > *arg1 = 0 ;
    std::vector< Date > temp1 ;
    std::vector< Date > *v1 ;
    int argvi = 0;
    BermudanExercisePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_BermudanExercise(dates);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_BermudanExercise. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_BermudanExercise. "
              "Expected an array of " "Date");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_BermudanExercise. "
          "Expected an array of " "Date");
      }
    }
    {
      try {
        result = (BermudanExercisePtr *)new_BermudanExercisePtr__SWIG_0((std::vector< Date > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BermudanExercisePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BermudanExercise) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_BermudanExercise__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_BermudanExercise__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_BermudanExercise'");
  XSRETURN(0);
}


XS(_wrap_delete_BermudanExercise) {
  {
    BermudanExercisePtr *arg1 = (BermudanExercisePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_BermudanExercise(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BermudanExercisePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_BermudanExercise" "', argument " "1"" of type '" "BermudanExercisePtr *""'"); 
    }
    arg1 = reinterpret_cast< BermudanExercisePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_RebatedExercise__SWIG_0) {
  {
    boost::shared_ptr< Exercise > arg1 ;
    std::vector< Real > arg2 ;
    Natural arg3 ;
    Calendar *arg4 = 0 ;
    BusinessDayConvention arg5 ;
    void *argp1 ;
    int res1 = 0 ;
    std::vector< double > *v2 ;
    unsigned int val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    RebatedExercisePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_RebatedExercise(exercise,rebates,rebateSettlementDays,rebatePaymentCalendar,rebatePaymentConvention);");
    }
    {
      res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_Exercise_t,  0 );
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_RebatedExercise" "', argument " "1"" of type '" "boost::shared_ptr< Exercise > const""'"); 
      }  
      if (!argp1) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_RebatedExercise" "', argument " "1"" of type '" "boost::shared_ptr< Exercise > const""'");
      } else {
        arg1 = *(reinterpret_cast< boost::shared_ptr< Exercise > * >(argp1));
      }
    }
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1){
        arg2 = *v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_RebatedExercise. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            (&arg2)->push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_RebatedExercise. "
              "Expected an array of ""double");
          }
        }
      } else {
        SWIG_croak("Type error in argument 2 of new_RebatedExercise. "
          "Expected an array of ""double");
      }
    }
    ecode3 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_RebatedExercise" "', argument " "3"" of type '" "Natural""'");
    } 
    arg3 = static_cast< Natural >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_RebatedExercise" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_RebatedExercise" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    arg4 = reinterpret_cast< Calendar * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_RebatedExercise" "', argument " "5"" of type '" "BusinessDayConvention""'");
    } 
    arg5 = static_cast< BusinessDayConvention >(val5);
    {
      try {
        result = (RebatedExercisePtr *)new_RebatedExercisePtr__SWIG_0(arg1,arg2,arg3,(Calendar const &)*arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_RebatedExercisePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_RebatedExercise__SWIG_1) {
  {
    boost::shared_ptr< Exercise > arg1 ;
    std::vector< Real > arg2 ;
    Natural arg3 ;
    Calendar *arg4 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    std::vector< double > *v2 ;
    unsigned int val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int argvi = 0;
    RebatedExercisePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_RebatedExercise(exercise,rebates,rebateSettlementDays,rebatePaymentCalendar);");
    }
    {
      res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_Exercise_t,  0 );
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_RebatedExercise" "', argument " "1"" of type '" "boost::shared_ptr< Exercise > const""'"); 
      }  
      if (!argp1) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_RebatedExercise" "', argument " "1"" of type '" "boost::shared_ptr< Exercise > const""'");
      } else {
        arg1 = *(reinterpret_cast< boost::shared_ptr< Exercise > * >(argp1));
      }
    }
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1){
        arg2 = *v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_RebatedExercise. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            (&arg2)->push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_RebatedExercise. "
              "Expected an array of ""double");
          }
        }
      } else {
        SWIG_croak("Type error in argument 2 of new_RebatedExercise. "
          "Expected an array of ""double");
      }
    }
    ecode3 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_RebatedExercise" "', argument " "3"" of type '" "Natural""'");
    } 
    arg3 = static_cast< Natural >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_RebatedExercise" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_RebatedExercise" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    arg4 = reinterpret_cast< Calendar * >(argp4);
    {
      try {
        result = (RebatedExercisePtr *)new_RebatedExercisePtr__SWIG_0(arg1,arg2,arg3,(Calendar const &)*arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_RebatedExercisePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_RebatedExercise__SWIG_2) {
  {
    boost::shared_ptr< Exercise > arg1 ;
    std::vector< Real > arg2 ;
    Natural arg3 ;
    void *argp1 ;
    int res1 = 0 ;
    std::vector< double > *v2 ;
    unsigned int val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    RebatedExercisePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_RebatedExercise(exercise,rebates,rebateSettlementDays);");
    }
    {
      res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_Exercise_t,  0 );
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_RebatedExercise" "', argument " "1"" of type '" "boost::shared_ptr< Exercise > const""'"); 
      }  
      if (!argp1) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_RebatedExercise" "', argument " "1"" of type '" "boost::shared_ptr< Exercise > const""'");
      } else {
        arg1 = *(reinterpret_cast< boost::shared_ptr< Exercise > * >(argp1));
      }
    }
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1){
        arg2 = *v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_RebatedExercise. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            (&arg2)->push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_RebatedExercise. "
              "Expected an array of ""double");
          }
        }
      } else {
        SWIG_croak("Type error in argument 2 of new_RebatedExercise. "
          "Expected an array of ""double");
      }
    }
    ecode3 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_RebatedExercise" "', argument " "3"" of type '" "Natural""'");
    } 
    arg3 = static_cast< Natural >(val3);
    {
      try {
        result = (RebatedExercisePtr *)new_RebatedExercisePtr__SWIG_0(arg1,arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_RebatedExercisePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_RebatedExercise__SWIG_3) {
  {
    boost::shared_ptr< Exercise > arg1 ;
    std::vector< Real > arg2 ;
    void *argp1 ;
    int res1 = 0 ;
    std::vector< double > *v2 ;
    int argvi = 0;
    RebatedExercisePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_RebatedExercise(exercise,rebates);");
    }
    {
      res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_Exercise_t,  0 );
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_RebatedExercise" "', argument " "1"" of type '" "boost::shared_ptr< Exercise > const""'"); 
      }  
      if (!argp1) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_RebatedExercise" "', argument " "1"" of type '" "boost::shared_ptr< Exercise > const""'");
      } else {
        arg1 = *(reinterpret_cast< boost::shared_ptr< Exercise > * >(argp1));
      }
    }
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1){
        arg2 = *v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_RebatedExercise. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            (&arg2)->push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_RebatedExercise. "
              "Expected an array of ""double");
          }
        }
      } else {
        SWIG_croak("Type error in argument 2 of new_RebatedExercise. "
          "Expected an array of ""double");
      }
    }
    {
      try {
        result = (RebatedExercisePtr *)new_RebatedExercisePtr__SWIG_0(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_RebatedExercisePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_RebatedExercise) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_Exercise_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_Exercise_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_Exercise_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_Exercise_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_RebatedExercise__SWIG_3); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_RebatedExercise__SWIG_2); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_RebatedExercise__SWIG_1); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_RebatedExercise__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_RebatedExercise'");
  XSRETURN(0);
}


XS(_wrap_delete_RebatedExercise) {
  {
    RebatedExercisePtr *arg1 = (RebatedExercisePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_RebatedExercise(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_RebatedExercisePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_RebatedExercise" "', argument " "1"" of type '" "RebatedExercisePtr *""'"); 
    }
    arg1 = reinterpret_cast< RebatedExercisePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Observable___deref__) {
  {
    boost::shared_ptr< Observable > *arg1 = (boost::shared_ptr< Observable > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Observable *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Observable___deref__(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Observable_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Observable___deref__" "', argument " "1"" of type '" "boost::shared_ptr< Observable > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Observable > * >(argp1);
    {
      try {
        result = (Observable *)(arg1)->operator ->();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Observable, 0 | 0); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Observable_isNull) {
  {
    boost::shared_ptr< Observable > *arg1 = (boost::shared_ptr< Observable > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Observable_isNull(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Observable_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Observable_isNull" "', argument " "1"" of type '" "boost::shared_ptr< Observable > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Observable > * >(argp1);
    {
      try {
        result = (bool)boost_shared_ptr_Sl_Observable_Sg__isNull(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Observable) {
  {
    int argvi = 0;
    boost::shared_ptr< Observable > *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Observable();");
    }
    {
      try {
        result = (boost::shared_ptr< Observable > *)new boost::shared_ptr< Observable >();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_boost__shared_ptrT_Observable_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_Observable) {
  {
    boost::shared_ptr< Observable > *arg1 = (boost::shared_ptr< Observable > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Observable(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Observable_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Observable" "', argument " "1"" of type '" "boost::shared_ptr< Observable > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Observable > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Array__SWIG_0) {
  {
    int argvi = 0;
    Array *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Array();");
    }
    {
      try {
        result = (Array *)new Array();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Array, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_Array__SWIG_1) {
  {
    Size arg1 ;
    Real arg2 ;
    size_t val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Array *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_Array(n,fill);");
    }
    ecode1 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Array" "', argument " "1"" of type '" "Size""'");
    } 
    arg1 = static_cast< Size >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Array" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (Array *)new Array(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Array, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Array__SWIG_2) {
  {
    Size arg1 ;
    size_t val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    Array *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Array(n);");
    }
    ecode1 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Array" "', argument " "1"" of type '" "Size""'");
    } 
    arg1 = static_cast< Size >(val1);
    {
      try {
        result = (Array *)new Array(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Array, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Array__SWIG_3) {
  {
    Array *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Array *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Array(Array const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Array" "', argument " "1"" of type '" "Array const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Array" "', argument " "1"" of type '" "Array const &""'"); 
    }
    arg1 = reinterpret_cast< Array * >(argp1);
    {
      try {
        result = (Array *)new Array((Array const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Array, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Array) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Array, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Array__SWIG_0); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Array__SWIG_3); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Array__SWIG_2); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Array__SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Array'");
  XSRETURN(0);
}


XS(_wrap_Array_size) {
  {
    Array *arg1 = (Array *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Size result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Array_size(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Array, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Array_size" "', argument " "1"" of type '" "Array const *""'"); 
    }
    arg1 = reinterpret_cast< Array * >(argp1);
    {
      try {
        result = ((Array const *)arg1)->size();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_size_t  SWIG_PERL_CALL_ARGS_1(static_cast< size_t >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Array_to_string) {
  {
    Array *arg1 = (Array *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Array_to_string(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Array, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Array_to_string" "', argument " "1"" of type '" "Array *""'"); 
    }
    arg1 = reinterpret_cast< Array * >(argp1);
    {
      try {
        result = Array___str__(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Array_get) {
  {
    Array *arg1 = (Array *) 0 ;
    Size arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Array_get(self,i);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Array, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Array_get" "', argument " "1"" of type '" "Array *""'"); 
    }
    arg1 = reinterpret_cast< Array * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Array_get" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    {
      try {
        result = (Real)Array_get(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Array_set) {
  {
    Array *arg1 = (Array *) 0 ;
    Size arg2 ;
    Real arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: Array_set(self,i,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Array, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Array_set" "', argument " "1"" of type '" "Array *""'"); 
    }
    arg1 = reinterpret_cast< Array * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Array_set" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Array_set" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    {
      try {
        Array_set(arg1,arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_Array) {
  {
    Array *arg1 = (Array *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Array(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Array, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Array" "', argument " "1"" of type '" "Array *""'"); 
    }
    arg1 = reinterpret_cast< Array * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_LexicographicalView_xSize) {
  {
    DefaultLexicographicalView *arg1 = (DefaultLexicographicalView *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Size result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: LexicographicalView_xSize(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_DefaultLexicographicalView, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LexicographicalView_xSize" "', argument " "1"" of type '" "DefaultLexicographicalView const *""'"); 
    }
    arg1 = reinterpret_cast< DefaultLexicographicalView * >(argp1);
    {
      try {
        result = ((DefaultLexicographicalView const *)arg1)->xSize();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_size_t  SWIG_PERL_CALL_ARGS_1(static_cast< size_t >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_LexicographicalView_ySize) {
  {
    DefaultLexicographicalView *arg1 = (DefaultLexicographicalView *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Size result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: LexicographicalView_ySize(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_DefaultLexicographicalView, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LexicographicalView_ySize" "', argument " "1"" of type '" "DefaultLexicographicalView const *""'"); 
    }
    arg1 = reinterpret_cast< DefaultLexicographicalView * >(argp1);
    {
      try {
        result = ((DefaultLexicographicalView const *)arg1)->ySize();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_size_t  SWIG_PERL_CALL_ARGS_1(static_cast< size_t >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_LexicographicalView) {
  {
    Array *arg1 = 0 ;
    Size arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    DefaultLexicographicalView *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_LexicographicalView(a,xSize);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_LexicographicalView" "', argument " "1"" of type '" "Array &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LexicographicalView" "', argument " "1"" of type '" "Array &""'"); 
    }
    arg1 = reinterpret_cast< Array * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_LexicographicalView" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    {
      try {
        result = (DefaultLexicographicalView *)new_DefaultLexicographicalView(*arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DefaultLexicographicalView, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_LexicographicalView_to_string) {
  {
    DefaultLexicographicalView *arg1 = (DefaultLexicographicalView *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: LexicographicalView_to_string(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_DefaultLexicographicalView, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LexicographicalView_to_string" "', argument " "1"" of type '" "DefaultLexicographicalView *""'"); 
    }
    arg1 = reinterpret_cast< DefaultLexicographicalView * >(argp1);
    {
      try {
        result = DefaultLexicographicalView___str__(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_LexicographicalView) {
  {
    DefaultLexicographicalView *arg1 = (DefaultLexicographicalView *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_LexicographicalView(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_DefaultLexicographicalView, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_LexicographicalView" "', argument " "1"" of type '" "DefaultLexicographicalView *""'"); 
    }
    arg1 = reinterpret_cast< DefaultLexicographicalView * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Matrix__SWIG_0) {
  {
    int argvi = 0;
    Matrix *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Matrix();");
    }
    {
      try {
        result = (Matrix *)new Matrix();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Matrix, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_Matrix__SWIG_1) {
  {
    Size arg1 ;
    Size arg2 ;
    Real arg3 ;
    size_t val1 ;
    int ecode1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Matrix *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_Matrix(rows,columns,fill);");
    }
    ecode1 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Matrix" "', argument " "1"" of type '" "Size""'");
    } 
    arg1 = static_cast< Size >(val1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Matrix" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Matrix" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    {
      try {
        result = (Matrix *)new Matrix(arg1,arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Matrix, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Matrix__SWIG_2) {
  {
    Size arg1 ;
    Size arg2 ;
    size_t val1 ;
    int ecode1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Matrix *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_Matrix(rows,columns);");
    }
    ecode1 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Matrix" "', argument " "1"" of type '" "Size""'");
    } 
    arg1 = static_cast< Size >(val1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Matrix" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    {
      try {
        result = (Matrix *)new Matrix(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Matrix, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Matrix__SWIG_3) {
  {
    Matrix *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Matrix *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Matrix(Matrix const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Matrix,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Matrix" "', argument " "1"" of type '" "Matrix const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Matrix" "', argument " "1"" of type '" "Matrix const &""'"); 
    }
    arg1 = reinterpret_cast< Matrix * >(argp1);
    {
      try {
        result = (Matrix *)new Matrix((Matrix const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Matrix, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Matrix) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Matrix, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Matrix__SWIG_0); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Matrix__SWIG_3); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Matrix__SWIG_2); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Matrix__SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Matrix'");
  XSRETURN(0);
}


XS(_wrap_Matrix_rows) {
  {
    Matrix *arg1 = (Matrix *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Size result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Matrix_rows(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Matrix, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Matrix_rows" "', argument " "1"" of type '" "Matrix const *""'"); 
    }
    arg1 = reinterpret_cast< Matrix * >(argp1);
    {
      try {
        result = ((Matrix const *)arg1)->rows();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_size_t  SWIG_PERL_CALL_ARGS_1(static_cast< size_t >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Matrix_columns) {
  {
    Matrix *arg1 = (Matrix *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Size result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Matrix_columns(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Matrix, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Matrix_columns" "', argument " "1"" of type '" "Matrix const *""'"); 
    }
    arg1 = reinterpret_cast< Matrix * >(argp1);
    {
      try {
        result = ((Matrix const *)arg1)->columns();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_size_t  SWIG_PERL_CALL_ARGS_1(static_cast< size_t >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Matrix_to_string) {
  {
    Matrix *arg1 = (Matrix *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Matrix_to_string(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Matrix, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Matrix_to_string" "', argument " "1"" of type '" "Matrix *""'"); 
    }
    arg1 = reinterpret_cast< Matrix * >(argp1);
    {
      try {
        result = Matrix___str__(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Matrix_get) {
  {
    Matrix *arg1 = (Matrix *) 0 ;
    Size arg2 ;
    Size arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    size_t val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: Matrix_get(self,i,j);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Matrix, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Matrix_get" "', argument " "1"" of type '" "Matrix *""'"); 
    }
    arg1 = reinterpret_cast< Matrix * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Matrix_get" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Matrix_get" "', argument " "3"" of type '" "Size""'");
    } 
    arg3 = static_cast< Size >(val3);
    {
      try {
        result = (Real)Matrix_get(arg1,arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Matrix_set) {
  {
    Matrix *arg1 = (Matrix *) 0 ;
    Size arg2 ;
    Size arg3 ;
    Real arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    size_t val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: Matrix_set(self,i,j,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Matrix, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Matrix_set" "', argument " "1"" of type '" "Matrix *""'"); 
    }
    arg1 = reinterpret_cast< Matrix * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Matrix_set" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Matrix_set" "', argument " "3"" of type '" "Size""'");
    } 
    arg3 = static_cast< Size >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Matrix_set" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    {
      try {
        Matrix_set(arg1,arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_Matrix) {
  {
    Matrix *arg1 = (Matrix *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Matrix(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Matrix, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Matrix" "', argument " "1"" of type '" "Matrix *""'"); 
    }
    arg1 = reinterpret_cast< Matrix * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SalvagingAlgorithm) {
  {
    int argvi = 0;
    SalvagingAlgorithm *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_SalvagingAlgorithm();");
    }
    {
      try {
        result = (SalvagingAlgorithm *)new SalvagingAlgorithm();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SalvagingAlgorithm, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_SalvagingAlgorithm) {
  {
    SalvagingAlgorithm *arg1 = (SalvagingAlgorithm *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_SalvagingAlgorithm(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SalvagingAlgorithm, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SalvagingAlgorithm" "', argument " "1"" of type '" "SalvagingAlgorithm *""'"); 
    }
    arg1 = reinterpret_cast< SalvagingAlgorithm * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_transpose) {
  {
    Matrix *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Matrix result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: transpose(m);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Matrix,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "transpose" "', argument " "1"" of type '" "Matrix const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "transpose" "', argument " "1"" of type '" "Matrix const &""'"); 
    }
    arg1 = reinterpret_cast< Matrix * >(argp1);
    {
      try {
        result = transpose((Matrix const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Matrix(static_cast< const Matrix& >(result))), SWIGTYPE_p_Matrix, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_outerProduct) {
  {
    Array *arg1 = 0 ;
    Array *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    Matrix result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: outerProduct(v1,v2);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "outerProduct" "', argument " "1"" of type '" "Array const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "outerProduct" "', argument " "1"" of type '" "Array const &""'"); 
    }
    arg1 = reinterpret_cast< Array * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "outerProduct" "', argument " "2"" of type '" "Array const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "outerProduct" "', argument " "2"" of type '" "Array const &""'"); 
    }
    arg2 = reinterpret_cast< Array * >(argp2);
    {
      try {
        result = outerProduct((Array const &)*arg1,(Array const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Matrix(static_cast< const Matrix& >(result))), SWIGTYPE_p_Matrix, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_pseudoSqrt) {
  {
    Matrix *arg1 = 0 ;
    SalvagingAlgorithm::Type arg2 ;
    void *argp1 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Matrix result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: pseudoSqrt(m,a);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Matrix,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pseudoSqrt" "', argument " "1"" of type '" "Matrix const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "pseudoSqrt" "', argument " "1"" of type '" "Matrix const &""'"); 
    }
    arg1 = reinterpret_cast< Matrix * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "pseudoSqrt" "', argument " "2"" of type '" "SalvagingAlgorithm::Type""'");
    } 
    arg2 = static_cast< SalvagingAlgorithm::Type >(val2);
    {
      try {
        result = pseudoSqrt((Matrix const &)*arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Matrix(static_cast< const Matrix& >(result))), SWIGTYPE_p_Matrix, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SVD) {
  {
    Matrix *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    SVD *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_SVD(Matrix const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Matrix,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SVD" "', argument " "1"" of type '" "Matrix const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SVD" "', argument " "1"" of type '" "Matrix const &""'"); 
    }
    arg1 = reinterpret_cast< Matrix * >(argp1);
    {
      try {
        result = (SVD *)new SVD((Matrix const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SVD, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_SVD_U) {
  {
    SVD *arg1 = (SVD *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Matrix *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: SVD_U(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SVD, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVD_U" "', argument " "1"" of type '" "SVD const *""'"); 
    }
    arg1 = reinterpret_cast< SVD * >(argp1);
    {
      try {
        result = (Matrix *) &((SVD const *)arg1)->U();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Matrix, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_SVD_V) {
  {
    SVD *arg1 = (SVD *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Matrix *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: SVD_V(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SVD, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVD_V" "', argument " "1"" of type '" "SVD const *""'"); 
    }
    arg1 = reinterpret_cast< SVD * >(argp1);
    {
      try {
        result = (Matrix *) &((SVD const *)arg1)->V();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Matrix, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_SVD_S) {
  {
    SVD *arg1 = (SVD *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Matrix result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: SVD_S(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SVD, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVD_S" "', argument " "1"" of type '" "SVD const *""'"); 
    }
    arg1 = reinterpret_cast< SVD * >(argp1);
    {
      try {
        result = ((SVD const *)arg1)->S();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Matrix(static_cast< const Matrix& >(result))), SWIGTYPE_p_Matrix, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_SVD_singularValues) {
  {
    SVD *arg1 = (SVD *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Array *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: SVD_singularValues(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SVD, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SVD_singularValues" "', argument " "1"" of type '" "SVD const *""'"); 
    }
    arg1 = reinterpret_cast< SVD * >(argp1);
    {
      try {
        result = (Array *) &((SVD const *)arg1)->singularValues();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Array, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_SVD) {
  {
    SVD *arg1 = (SVD *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_SVD(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SVD, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SVD" "', argument " "1"" of type '" "SVD *""'"); 
    }
    arg1 = reinterpret_cast< SVD * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Quote___deref__) {
  {
    boost::shared_ptr< Quote > *arg1 = (boost::shared_ptr< Quote > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Quote *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Quote___deref__(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Quote_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Quote___deref__" "', argument " "1"" of type '" "boost::shared_ptr< Quote > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Quote > * >(argp1);
    {
      try {
        result = (Quote *)(arg1)->operator ->();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Quote, 0 | 0); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Quote_isNull) {
  {
    boost::shared_ptr< Quote > *arg1 = (boost::shared_ptr< Quote > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Quote_isNull(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Quote_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Quote_isNull" "', argument " "1"" of type '" "boost::shared_ptr< Quote > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Quote > * >(argp1);
    {
      try {
        result = (bool)boost_shared_ptr_Sl_Quote_Sg__isNull(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Quote_asObservable) {
  {
    boost::shared_ptr< Quote > *arg1 = (boost::shared_ptr< Quote > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    boost::shared_ptr< Observable > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Quote_asObservable(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Quote_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Quote_asObservable" "', argument " "1"" of type '" "boost::shared_ptr< Quote > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Quote > * >(argp1);
    {
      try {
        result = boost_shared_ptr_Sl_Quote_Sg__asObservable(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new boost::shared_ptr< Observable >(static_cast< const boost::shared_ptr< Observable >& >(result))), SWIGTYPE_p_boost__shared_ptrT_Observable_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Quote) {
  {
    int argvi = 0;
    boost::shared_ptr< Quote > *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Quote();");
    }
    {
      try {
        result = (boost::shared_ptr< Quote > *)new boost::shared_ptr< Quote >();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_boost__shared_ptrT_Quote_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_Quote) {
  {
    boost::shared_ptr< Quote > *arg1 = (boost::shared_ptr< Quote > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Quote(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Quote_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Quote" "', argument " "1"" of type '" "boost::shared_ptr< Quote > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Quote > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Quote_value) {
  {
    boost::shared_ptr< Quote > *arg1 = (boost::shared_ptr< Quote > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Quote_value(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Quote_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Quote_value" "', argument " "1"" of type '" "boost::shared_ptr< Quote > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Quote > * >(argp1);
    {
      try {
        result = (Real)(*arg1)->value();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_QuoteHandle__SWIG_0) {
  {
    boost::shared_ptr< Quote > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Handle< Quote > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_QuoteHandle(boost::shared_ptr< Quote > const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_Quote_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_QuoteHandle" "', argument " "1"" of type '" "boost::shared_ptr< Quote > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_QuoteHandle" "', argument " "1"" of type '" "boost::shared_ptr< Quote > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Quote > * >(argp1);
    {
      try {
        result = (Handle< Quote > *)new Handle< Quote >((boost::shared_ptr< Quote > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_HandleT_Quote_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_QuoteHandle__SWIG_1) {
  {
    int argvi = 0;
    Handle< Quote > *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_QuoteHandle();");
    }
    {
      try {
        result = (Handle< Quote > *)new Handle< Quote >();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_HandleT_Quote_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_QuoteHandle) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_QuoteHandle__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_QuoteHandle__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_QuoteHandle'");
  XSRETURN(0);
}


XS(_wrap_QuoteHandle___deref__) {
  {
    Handle< Quote > *arg1 = (Handle< Quote > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    boost::shared_ptr< Quote > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: QuoteHandle___deref__(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_Quote_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "QuoteHandle___deref__" "', argument " "1"" of type '" "Handle< Quote > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< Quote > * >(argp1);
    {
      try {
        result = (arg1)->operator ->();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new boost::shared_ptr< Quote >(static_cast< const boost::shared_ptr< Quote >& >(result))), SWIGTYPE_p_boost__shared_ptrT_Quote_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_QuoteHandle_empty) {
  {
    Handle< Quote > *arg1 = (Handle< Quote > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: QuoteHandle_empty(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_Quote_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "QuoteHandle_empty" "', argument " "1"" of type '" "Handle< Quote > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< Quote > * >(argp1);
    {
      try {
        result = (bool)(arg1)->empty();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_QuoteHandle_asObservable) {
  {
    Handle< Quote > *arg1 = (Handle< Quote > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    boost::shared_ptr< Observable > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: QuoteHandle_asObservable(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_Quote_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "QuoteHandle_asObservable" "', argument " "1"" of type '" "Handle< Quote > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< Quote > * >(argp1);
    {
      try {
        result = Handle_Sl_Quote_Sg__asObservable(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new boost::shared_ptr< Observable >(static_cast< const boost::shared_ptr< Observable >& >(result))), SWIGTYPE_p_boost__shared_ptrT_Observable_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_QuoteHandle) {
  {
    Handle< Quote > *arg1 = (Handle< Quote > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_QuoteHandle(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_Quote_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_QuoteHandle" "', argument " "1"" of type '" "Handle< Quote > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< Quote > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_QuoteHandle_value) {
  {
    Handle< Quote > *arg1 = (Handle< Quote > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: QuoteHandle_value(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_Quote_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "QuoteHandle_value" "', argument " "1"" of type '" "Handle< Quote > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< Quote > * >(argp1);
    {
      try {
        result = (Real)(*arg1)->value();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_RelinkableQuoteHandle__SWIG_0) {
  {
    boost::shared_ptr< Quote > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    RelinkableHandle< Quote > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_RelinkableQuoteHandle(boost::shared_ptr< Quote > const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_Quote_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_RelinkableQuoteHandle" "', argument " "1"" of type '" "boost::shared_ptr< Quote > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_RelinkableQuoteHandle" "', argument " "1"" of type '" "boost::shared_ptr< Quote > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Quote > * >(argp1);
    {
      try {
        result = (RelinkableHandle< Quote > *)new RelinkableHandle< Quote >((boost::shared_ptr< Quote > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_RelinkableHandleT_Quote_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_RelinkableQuoteHandle__SWIG_1) {
  {
    int argvi = 0;
    RelinkableHandle< Quote > *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_RelinkableQuoteHandle();");
    }
    {
      try {
        result = (RelinkableHandle< Quote > *)new RelinkableHandle< Quote >();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_RelinkableHandleT_Quote_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_RelinkableQuoteHandle) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_RelinkableQuoteHandle__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_RelinkableQuoteHandle__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_RelinkableQuoteHandle'");
  XSRETURN(0);
}


XS(_wrap_RelinkableQuoteHandle_linkTo) {
  {
    RelinkableHandle< Quote > *arg1 = (RelinkableHandle< Quote > *) 0 ;
    boost::shared_ptr< Quote > *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: RelinkableQuoteHandle_linkTo(self,boost::shared_ptr< Quote > const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_RelinkableHandleT_Quote_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RelinkableQuoteHandle_linkTo" "', argument " "1"" of type '" "RelinkableHandle< Quote > *""'"); 
    }
    arg1 = reinterpret_cast< RelinkableHandle< Quote > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_boost__shared_ptrT_Quote_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "RelinkableQuoteHandle_linkTo" "', argument " "2"" of type '" "boost::shared_ptr< Quote > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "RelinkableQuoteHandle_linkTo" "', argument " "2"" of type '" "boost::shared_ptr< Quote > const &""'"); 
    }
    arg2 = reinterpret_cast< boost::shared_ptr< Quote > * >(argp2);
    {
      try {
        (arg1)->linkTo((boost::shared_ptr< Quote > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_RelinkableQuoteHandle) {
  {
    RelinkableHandle< Quote > *arg1 = (RelinkableHandle< Quote > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_RelinkableQuoteHandle(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_RelinkableHandleT_Quote_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_RelinkableQuoteHandle" "', argument " "1"" of type '" "RelinkableHandle< Quote > *""'"); 
    }
    arg1 = reinterpret_cast< RelinkableHandle< Quote > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SimpleQuote) {
  {
    Real arg1 ;
    double val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    SimpleQuotePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_SimpleQuote(value);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_SimpleQuote" "', argument " "1"" of type '" "Real""'");
    } 
    arg1 = static_cast< Real >(val1);
    {
      try {
        result = (SimpleQuotePtr *)new_SimpleQuotePtr(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SimpleQuotePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_SimpleQuote_setValue) {
  {
    SimpleQuotePtr *arg1 = (SimpleQuotePtr *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: SimpleQuote_setValue(self,value);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SimpleQuotePtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimpleQuote_setValue" "', argument " "1"" of type '" "SimpleQuotePtr *""'"); 
    }
    arg1 = reinterpret_cast< SimpleQuotePtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SimpleQuote_setValue" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        SimpleQuotePtr_setValue(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_SimpleQuote) {
  {
    SimpleQuotePtr *arg1 = (SimpleQuotePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_SimpleQuote(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SimpleQuotePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SimpleQuote" "', argument " "1"" of type '" "SimpleQuotePtr *""'"); 
    }
    arg1 = reinterpret_cast< SimpleQuotePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_QuoteVector__SWIG_0) {
  {
    unsigned int arg1 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    std::vector< boost::shared_ptr< Quote > > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_QuoteVector(size);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_QuoteVector" "', argument " "1"" of type '" "unsigned int""'");
    } 
    arg1 = static_cast< unsigned int >(val1);
    {
      try {
        result = (std::vector< boost::shared_ptr< Quote > > *)new std::vector< boost::shared_ptr< Quote > >(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Quote_t_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_QuoteVector__SWIG_1) {
  {
    int argvi = 0;
    std::vector< boost::shared_ptr< Quote > > *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_QuoteVector();");
    }
    {
      try {
        result = (std::vector< boost::shared_ptr< Quote > > *)new std::vector< boost::shared_ptr< Quote > >();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Quote_t_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_QuoteVector__SWIG_2) {
  {
    unsigned int arg1 ;
    boost::shared_ptr< Quote > *arg2 = 0 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    std::vector< boost::shared_ptr< Quote > > *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_QuoteVector(size,value);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_QuoteVector" "', argument " "1"" of type '" "unsigned int""'");
    } 
    arg1 = static_cast< unsigned int >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_boost__shared_ptrT_Quote_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_QuoteVector" "', argument " "2"" of type '" "boost::shared_ptr< Quote > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_QuoteVector" "', argument " "2"" of type '" "boost::shared_ptr< Quote > const &""'"); 
    }
    arg2 = reinterpret_cast< boost::shared_ptr< Quote > * >(argp2);
    {
      try {
        result = (std::vector< boost::shared_ptr< Quote > > *)new std::vector< boost::shared_ptr< Quote > >(arg1,(boost::shared_ptr< Quote > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Quote_t_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_QuoteVector__SWIG_3) {
  {
    std::vector< boost::shared_ptr< Quote > > *arg1 = 0 ;
    std::vector< boost::shared_ptr< Quote > > temp1 ;
    std::vector< boost::shared_ptr< Quote > > *v1 ;
    int argvi = 0;
    std::vector< boost::shared_ptr< Quote > > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_QuoteVector(std::vector< boost::shared_ptr< Quote > > const &);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Quote_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_QuoteVector. "
          "Expected an array of " "boost::shared_ptr< Quote >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< Quote >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_Quote_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_QuoteVector. "
              "Expected an array of " "boost::shared_ptr< Quote >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_QuoteVector. "
          "Expected an array of " "boost::shared_ptr< Quote >");
      }
    }
    {
      try {
        result = (std::vector< boost::shared_ptr< Quote > > *)new std::vector< boost::shared_ptr< Quote > >((std::vector< boost::shared_ptr< Quote > > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Quote_t_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_QuoteVector) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< Quote > >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Quote_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< Quote >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_Quote_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_boost__shared_ptrT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_QuoteVector__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_QuoteVector__SWIG_0); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_QuoteVector__SWIG_3); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_QuoteVector__SWIG_2); return;
    }
  }
  
  croak("No matching function for overloaded 'new_QuoteVector'");
  XSRETURN(0);
}


XS(_wrap_QuoteVector_size) {
  {
    std::vector< boost::shared_ptr< Quote > > *arg1 = (std::vector< boost::shared_ptr< Quote > > *) 0 ;
    std::vector< boost::shared_ptr< Quote > > temp1 ;
    std::vector< boost::shared_ptr< Quote > > *v1 ;
    int argvi = 0;
    unsigned int result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: QuoteVector_size(self);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Quote_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of QuoteVector_size. "
          "Expected an array of " "boost::shared_ptr< Quote >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< Quote >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_Quote_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "QuoteVector_size. "
              "Expected an array of " "boost::shared_ptr< Quote >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of QuoteVector_size. "
          "Expected an array of " "boost::shared_ptr< Quote >");
      }
    }
    {
      try {
        result = (unsigned int)((std::vector< boost::shared_ptr< Quote > > const *)arg1)->size();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_QuoteVector_empty) {
  {
    std::vector< boost::shared_ptr< Quote > > *arg1 = (std::vector< boost::shared_ptr< Quote > > *) 0 ;
    std::vector< boost::shared_ptr< Quote > > temp1 ;
    std::vector< boost::shared_ptr< Quote > > *v1 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: QuoteVector_empty(self);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Quote_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of QuoteVector_empty. "
          "Expected an array of " "boost::shared_ptr< Quote >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< Quote >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_Quote_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "QuoteVector_empty. "
              "Expected an array of " "boost::shared_ptr< Quote >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of QuoteVector_empty. "
          "Expected an array of " "boost::shared_ptr< Quote >");
      }
    }
    {
      try {
        result = (bool)((std::vector< boost::shared_ptr< Quote > > const *)arg1)->empty();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_QuoteVector_clear) {
  {
    std::vector< boost::shared_ptr< Quote > > *arg1 = (std::vector< boost::shared_ptr< Quote > > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: QuoteVector_clear(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Quote_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "QuoteVector_clear" "', argument " "1"" of type '" "std::vector< boost::shared_ptr< Quote > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< boost::shared_ptr< Quote > > * >(argp1);
    {
      try {
        (arg1)->clear();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_QuoteVector_push) {
  {
    std::vector< boost::shared_ptr< Quote > > *arg1 = (std::vector< boost::shared_ptr< Quote > > *) 0 ;
    boost::shared_ptr< Quote > *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: QuoteVector_push(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Quote_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "QuoteVector_push" "', argument " "1"" of type '" "std::vector< boost::shared_ptr< Quote > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< boost::shared_ptr< Quote > > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_boost__shared_ptrT_Quote_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "QuoteVector_push" "', argument " "2"" of type '" "boost::shared_ptr< Quote > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "QuoteVector_push" "', argument " "2"" of type '" "boost::shared_ptr< Quote > const &""'"); 
    }
    arg2 = reinterpret_cast< boost::shared_ptr< Quote > * >(argp2);
    {
      try {
        (arg1)->push_back((boost::shared_ptr< Quote > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_QuoteVector_pop) {
  {
    std::vector< boost::shared_ptr< Quote > > *arg1 = (std::vector< boost::shared_ptr< Quote > > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    boost::shared_ptr< Quote > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: QuoteVector_pop(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Quote_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "QuoteVector_pop" "', argument " "1"" of type '" "std::vector< boost::shared_ptr< Quote > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< boost::shared_ptr< Quote > > * >(argp1);
    {
      try {
        try {
          result = std_vector_Sl_boost_shared_ptr_Sl_Quote_Sg__Sg__pop(arg1);
        }
        catch(std::out_of_range &_e) {
          sv_setsv(get_sv("@", GV_ADD), SWIG_NewPointerObj((new std::out_of_range(static_cast< const std::out_of_range& >(_e))),SWIGTYPE_p_std__out_of_range,SWIG_POINTER_OWN)); SWIG_fail ;
        }
        
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new boost::shared_ptr< Quote >(static_cast< const boost::shared_ptr< Quote >& >(result))), SWIGTYPE_p_boost__shared_ptrT_Quote_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_QuoteVector_get) {
  {
    std::vector< boost::shared_ptr< Quote > > *arg1 = (std::vector< boost::shared_ptr< Quote > > *) 0 ;
    int arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    boost::shared_ptr< Quote > *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: QuoteVector_get(self,i);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Quote_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "QuoteVector_get" "', argument " "1"" of type '" "std::vector< boost::shared_ptr< Quote > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< boost::shared_ptr< Quote > > * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "QuoteVector_get" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    {
      try {
        try {
          result = (boost::shared_ptr< Quote > *) &std_vector_Sl_boost_shared_ptr_Sl_Quote_Sg__Sg__get(arg1,arg2);
        }
        catch(std::out_of_range &_e) {
          sv_setsv(get_sv("@", GV_ADD), SWIG_NewPointerObj((new std::out_of_range(static_cast< const std::out_of_range& >(_e))),SWIGTYPE_p_std__out_of_range,SWIG_POINTER_OWN)); SWIG_fail ;
        }
        
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_boost__shared_ptrT_Quote_t, 0 | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_QuoteVector_set) {
  {
    std::vector< boost::shared_ptr< Quote > > *arg1 = (std::vector< boost::shared_ptr< Quote > > *) 0 ;
    int arg2 ;
    boost::shared_ptr< Quote > *arg3 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: QuoteVector_set(self,i,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Quote_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "QuoteVector_set" "', argument " "1"" of type '" "std::vector< boost::shared_ptr< Quote > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< boost::shared_ptr< Quote > > * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "QuoteVector_set" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_boost__shared_ptrT_Quote_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "QuoteVector_set" "', argument " "3"" of type '" "boost::shared_ptr< Quote > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "QuoteVector_set" "', argument " "3"" of type '" "boost::shared_ptr< Quote > const &""'"); 
    }
    arg3 = reinterpret_cast< boost::shared_ptr< Quote > * >(argp3);
    {
      try {
        try {
          std_vector_Sl_boost_shared_ptr_Sl_Quote_Sg__Sg__set(arg1,arg2,(boost::shared_ptr< Quote > const &)*arg3);
        }
        catch(std::out_of_range &_e) {
          sv_setsv(get_sv("@", GV_ADD), SWIG_NewPointerObj((new std::out_of_range(static_cast< const std::out_of_range& >(_e))),SWIGTYPE_p_std__out_of_range,SWIG_POINTER_OWN)); SWIG_fail ;
        }
        
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_QuoteVector) {
  {
    std::vector< boost::shared_ptr< Quote > > *arg1 = (std::vector< boost::shared_ptr< Quote > > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_QuoteVector(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Quote_t_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_QuoteVector" "', argument " "1"" of type '" "std::vector< boost::shared_ptr< Quote > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< boost::shared_ptr< Quote > > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_QuoteVectorVector__SWIG_0) {
  {
    unsigned int arg1 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    std::vector< std::vector< boost::shared_ptr< Quote > > > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_QuoteVectorVector(size);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_QuoteVectorVector" "', argument " "1"" of type '" "unsigned int""'");
    } 
    arg1 = static_cast< unsigned int >(val1);
    {
      try {
        result = (std::vector< std::vector< boost::shared_ptr< Quote > > > *)new std::vector< std::vector< boost::shared_ptr< Quote > > >(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__vectorT_boost__shared_ptrT_Quote_t_t_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_QuoteVectorVector__SWIG_1) {
  {
    int argvi = 0;
    std::vector< std::vector< boost::shared_ptr< Quote > > > *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_QuoteVectorVector();");
    }
    {
      try {
        result = (std::vector< std::vector< boost::shared_ptr< Quote > > > *)new std::vector< std::vector< boost::shared_ptr< Quote > > >();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__vectorT_boost__shared_ptrT_Quote_t_t_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_QuoteVectorVector__SWIG_2) {
  {
    unsigned int arg1 ;
    std::vector< boost::shared_ptr< Quote > > *arg2 = 0 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    std::vector< boost::shared_ptr< Quote > > temp2 ;
    std::vector< boost::shared_ptr< Quote > > *v2 ;
    int argvi = 0;
    std::vector< std::vector< boost::shared_ptr< Quote > > > *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_QuoteVectorVector(size,value);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_QuoteVectorVector" "', argument " "1"" of type '" "unsigned int""'");
    } 
    arg1 = static_cast< unsigned int >(val1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Quote_t_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_QuoteVectorVector. "
          "Expected an array of " "boost::shared_ptr< Quote >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< Quote >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_Quote_t,0) != -1) {
            temp2.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_QuoteVectorVector. "
              "Expected an array of " "boost::shared_ptr< Quote >");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_QuoteVectorVector. "
          "Expected an array of " "boost::shared_ptr< Quote >");
      }
    }
    {
      try {
        result = (std::vector< std::vector< boost::shared_ptr< Quote > > > *)new std::vector< std::vector< boost::shared_ptr< Quote > > >(arg1,(std::vector< boost::shared_ptr< Quote > > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__vectorT_boost__shared_ptrT_Quote_t_t_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_QuoteVectorVector__SWIG_3) {
  {
    std::vector< std::vector< boost::shared_ptr< Quote > > > *arg1 = 0 ;
    std::vector< std::vector< boost::shared_ptr< Quote > > > temp1 ;
    std::vector< std::vector< boost::shared_ptr< Quote > > > *v1 ;
    int argvi = 0;
    std::vector< std::vector< boost::shared_ptr< Quote > > > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_QuoteVectorVector(std::vector< std::vector< boost::shared_ptr< Quote > > > const &);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_std__vectorT_boost__shared_ptrT_Quote_t_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_QuoteVectorVector. "
          "Expected an array of " "std::vector< boost::shared_ptr< Quote > >");
        SV **tv;
        I32 len = av_len(av) + 1;
        std::vector< boost::shared_ptr< Quote > >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Quote_t_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_QuoteVectorVector. "
              "Expected an array of " "std::vector< boost::shared_ptr< Quote > >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_QuoteVectorVector. "
          "Expected an array of " "std::vector< boost::shared_ptr< Quote > >");
      }
    }
    {
      try {
        result = (std::vector< std::vector< boost::shared_ptr< Quote > > > *)new std::vector< std::vector< boost::shared_ptr< Quote > > >((std::vector< std::vector< boost::shared_ptr< Quote > > > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__vectorT_boost__shared_ptrT_Quote_t_t_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_QuoteVectorVector) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< std::vector< boost::shared_ptr< Quote > > >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_std__vectorT_boost__shared_ptrT_Quote_t_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  std::vector< boost::shared_ptr< Quote > >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Quote_t_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< Quote > >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Quote_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< Quote >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_Quote_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_QuoteVectorVector__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_QuoteVectorVector__SWIG_0); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_QuoteVectorVector__SWIG_3); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_QuoteVectorVector__SWIG_2); return;
    }
  }
  
  croak("No matching function for overloaded 'new_QuoteVectorVector'");
  XSRETURN(0);
}


XS(_wrap_QuoteVectorVector_size) {
  {
    std::vector< std::vector< boost::shared_ptr< Quote > > > *arg1 = (std::vector< std::vector< boost::shared_ptr< Quote > > > *) 0 ;
    std::vector< std::vector< boost::shared_ptr< Quote > > > temp1 ;
    std::vector< std::vector< boost::shared_ptr< Quote > > > *v1 ;
    int argvi = 0;
    unsigned int result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: QuoteVectorVector_size(self);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_std__vectorT_boost__shared_ptrT_Quote_t_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of QuoteVectorVector_size. "
          "Expected an array of " "std::vector< boost::shared_ptr< Quote > >");
        SV **tv;
        I32 len = av_len(av) + 1;
        std::vector< boost::shared_ptr< Quote > >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Quote_t_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "QuoteVectorVector_size. "
              "Expected an array of " "std::vector< boost::shared_ptr< Quote > >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of QuoteVectorVector_size. "
          "Expected an array of " "std::vector< boost::shared_ptr< Quote > >");
      }
    }
    {
      try {
        result = (unsigned int)((std::vector< std::vector< boost::shared_ptr< Quote > > > const *)arg1)->size();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_QuoteVectorVector_empty) {
  {
    std::vector< std::vector< boost::shared_ptr< Quote > > > *arg1 = (std::vector< std::vector< boost::shared_ptr< Quote > > > *) 0 ;
    std::vector< std::vector< boost::shared_ptr< Quote > > > temp1 ;
    std::vector< std::vector< boost::shared_ptr< Quote > > > *v1 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: QuoteVectorVector_empty(self);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_std__vectorT_boost__shared_ptrT_Quote_t_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of QuoteVectorVector_empty. "
          "Expected an array of " "std::vector< boost::shared_ptr< Quote > >");
        SV **tv;
        I32 len = av_len(av) + 1;
        std::vector< boost::shared_ptr< Quote > >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Quote_t_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "QuoteVectorVector_empty. "
              "Expected an array of " "std::vector< boost::shared_ptr< Quote > >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of QuoteVectorVector_empty. "
          "Expected an array of " "std::vector< boost::shared_ptr< Quote > >");
      }
    }
    {
      try {
        result = (bool)((std::vector< std::vector< boost::shared_ptr< Quote > > > const *)arg1)->empty();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_QuoteVectorVector_clear) {
  {
    std::vector< std::vector< boost::shared_ptr< Quote > > > *arg1 = (std::vector< std::vector< boost::shared_ptr< Quote > > > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: QuoteVectorVector_clear(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_boost__shared_ptrT_Quote_t_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "QuoteVectorVector_clear" "', argument " "1"" of type '" "std::vector< std::vector< boost::shared_ptr< Quote > > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< std::vector< boost::shared_ptr< Quote > > > * >(argp1);
    {
      try {
        (arg1)->clear();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_QuoteVectorVector_push) {
  {
    std::vector< std::vector< boost::shared_ptr< Quote > > > *arg1 = (std::vector< std::vector< boost::shared_ptr< Quote > > > *) 0 ;
    std::vector< boost::shared_ptr< Quote > > *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    std::vector< boost::shared_ptr< Quote > > temp2 ;
    std::vector< boost::shared_ptr< Quote > > *v2 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: QuoteVectorVector_push(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_boost__shared_ptrT_Quote_t_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "QuoteVectorVector_push" "', argument " "1"" of type '" "std::vector< std::vector< boost::shared_ptr< Quote > > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< std::vector< boost::shared_ptr< Quote > > > * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Quote_t_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of QuoteVectorVector_push. "
          "Expected an array of " "boost::shared_ptr< Quote >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< Quote >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_Quote_t,0) != -1) {
            temp2.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 2 of "
              "QuoteVectorVector_push. "
              "Expected an array of " "boost::shared_ptr< Quote >");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of QuoteVectorVector_push. "
          "Expected an array of " "boost::shared_ptr< Quote >");
      }
    }
    {
      try {
        (arg1)->push_back((std::vector< boost::shared_ptr< Quote > > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_QuoteVectorVector_pop) {
  {
    std::vector< std::vector< boost::shared_ptr< Quote > > > *arg1 = (std::vector< std::vector< boost::shared_ptr< Quote > > > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< boost::shared_ptr< Quote > > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: QuoteVectorVector_pop(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_boost__shared_ptrT_Quote_t_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "QuoteVectorVector_pop" "', argument " "1"" of type '" "std::vector< std::vector< boost::shared_ptr< Quote > > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< std::vector< boost::shared_ptr< Quote > > > * >(argp1);
    {
      try {
        try {
          result = std_vector_Sl_std_vector_Sl_boost_shared_ptr_Sl_Quote_Sg__Sg__Sg__pop(arg1);
        }
        catch(std::out_of_range &_e) {
          sv_setsv(get_sv("@", GV_ADD), SWIG_NewPointerObj((new std::out_of_range(static_cast< const std::out_of_range& >(_e))),SWIGTYPE_p_std__out_of_range,SWIG_POINTER_OWN)); SWIG_fail ;
        }
        
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        boost::shared_ptr< Quote >* ptr = new boost::shared_ptr< Quote >(result[i]);
        svs[i] = sv_newmortal();
        SWIG_MakePtr(svs[i], (void*) ptr, 
          SWIGTYPE_p_boost__shared_ptrT_Quote_t, SWIG_SHADOW|0);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_QuoteVectorVector_get) {
  {
    std::vector< std::vector< boost::shared_ptr< Quote > > > *arg1 = (std::vector< std::vector< boost::shared_ptr< Quote > > > *) 0 ;
    int arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    std::vector< boost::shared_ptr< Quote > > *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: QuoteVectorVector_get(self,i);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_boost__shared_ptrT_Quote_t_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "QuoteVectorVector_get" "', argument " "1"" of type '" "std::vector< std::vector< boost::shared_ptr< Quote > > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< std::vector< boost::shared_ptr< Quote > > > * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "QuoteVectorVector_get" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    {
      try {
        try {
          result = (std::vector< boost::shared_ptr< Quote > > *) &std_vector_Sl_std_vector_Sl_boost_shared_ptr_Sl_Quote_Sg__Sg__Sg__get(arg1,arg2);
        }
        catch(std::out_of_range &_e) {
          sv_setsv(get_sv("@", GV_ADD), SWIG_NewPointerObj((new std::out_of_range(static_cast< const std::out_of_range& >(_e))),SWIGTYPE_p_std__out_of_range,SWIG_POINTER_OWN)); SWIG_fail ;
        }
        
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Quote_t_t, 0 | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_QuoteVectorVector_set) {
  {
    std::vector< std::vector< boost::shared_ptr< Quote > > > *arg1 = (std::vector< std::vector< boost::shared_ptr< Quote > > > *) 0 ;
    int arg2 ;
    std::vector< boost::shared_ptr< Quote > > *arg3 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    std::vector< boost::shared_ptr< Quote > > temp3 ;
    std::vector< boost::shared_ptr< Quote > > *v3 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: QuoteVectorVector_set(self,i,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_boost__shared_ptrT_Quote_t_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "QuoteVectorVector_set" "', argument " "1"" of type '" "std::vector< std::vector< boost::shared_ptr< Quote > > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< std::vector< boost::shared_ptr< Quote > > > * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "QuoteVectorVector_set" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Quote_t_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of QuoteVectorVector_set. "
          "Expected an array of " "boost::shared_ptr< Quote >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< Quote >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_Quote_t,0) != -1) {
            temp3.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 3 of "
              "QuoteVectorVector_set. "
              "Expected an array of " "boost::shared_ptr< Quote >");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of QuoteVectorVector_set. "
          "Expected an array of " "boost::shared_ptr< Quote >");
      }
    }
    {
      try {
        try {
          std_vector_Sl_std_vector_Sl_boost_shared_ptr_Sl_Quote_Sg__Sg__Sg__set(arg1,arg2,(std::vector< boost::shared_ptr< Quote > > const &)*arg3);
        }
        catch(std::out_of_range &_e) {
          sv_setsv(get_sv("@", GV_ADD), SWIG_NewPointerObj((new std::out_of_range(static_cast< const std::out_of_range& >(_e))),SWIGTYPE_p_std__out_of_range,SWIG_POINTER_OWN)); SWIG_fail ;
        }
        
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_QuoteVectorVector) {
  {
    std::vector< std::vector< boost::shared_ptr< Quote > > > *arg1 = (std::vector< std::vector< boost::shared_ptr< Quote > > > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_QuoteVectorVector(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_boost__shared_ptrT_Quote_t_t_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_QuoteVectorVector" "', argument " "1"" of type '" "std::vector< std::vector< boost::shared_ptr< Quote > > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< std::vector< boost::shared_ptr< Quote > > > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_QuoteHandleVector__SWIG_0) {
  {
    unsigned int arg1 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    std::vector< Handle< Quote > > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_QuoteHandleVector(size);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_QuoteHandleVector" "', argument " "1"" of type '" "unsigned int""'");
    } 
    arg1 = static_cast< unsigned int >(val1);
    {
      try {
        result = (std::vector< Handle< Quote > > *)new std::vector< Handle< Quote > >(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_QuoteHandleVector__SWIG_1) {
  {
    int argvi = 0;
    std::vector< Handle< Quote > > *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_QuoteHandleVector();");
    }
    {
      try {
        result = (std::vector< Handle< Quote > > *)new std::vector< Handle< Quote > >();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_QuoteHandleVector__SWIG_2) {
  {
    unsigned int arg1 ;
    Handle< Quote > *arg2 = 0 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    std::vector< Handle< Quote > > *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_QuoteHandleVector(size,value);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_QuoteHandleVector" "', argument " "1"" of type '" "unsigned int""'");
    } 
    arg1 = static_cast< unsigned int >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_QuoteHandleVector" "', argument " "2"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_QuoteHandleVector" "', argument " "2"" of type '" "Handle< Quote > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< Quote > * >(argp2);
    {
      try {
        result = (std::vector< Handle< Quote > > *)new std::vector< Handle< Quote > >(arg1,(Handle< Quote > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_QuoteHandleVector__SWIG_3) {
  {
    std::vector< Handle< Quote > > *arg1 = 0 ;
    std::vector< Handle< Quote > > temp1 ;
    std::vector< Handle< Quote > > *v1 ;
    int argvi = 0;
    std::vector< Handle< Quote > > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_QuoteHandleVector(std::vector< Handle< Quote > > const &);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_QuoteHandleVector. "
          "Expected an array of " "Handle< Quote >");
        SV **tv;
        I32 len = av_len(av) + 1;
        Handle< Quote >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_HandleT_Quote_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_QuoteHandleVector. "
              "Expected an array of " "Handle< Quote >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_QuoteHandleVector. "
          "Expected an array of " "Handle< Quote >");
      }
    }
    {
      try {
        result = (std::vector< Handle< Quote > > *)new std::vector< Handle< Quote > >((std::vector< Handle< Quote > > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_QuoteHandleVector) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Handle< Quote > >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Handle< Quote >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_HandleT_Quote_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_QuoteHandleVector__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_QuoteHandleVector__SWIG_0); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_QuoteHandleVector__SWIG_3); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_QuoteHandleVector__SWIG_2); return;
    }
  }
  
  croak("No matching function for overloaded 'new_QuoteHandleVector'");
  XSRETURN(0);
}


XS(_wrap_QuoteHandleVector_size) {
  {
    std::vector< Handle< Quote > > *arg1 = (std::vector< Handle< Quote > > *) 0 ;
    std::vector< Handle< Quote > > temp1 ;
    std::vector< Handle< Quote > > *v1 ;
    int argvi = 0;
    unsigned int result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: QuoteHandleVector_size(self);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of QuoteHandleVector_size. "
          "Expected an array of " "Handle< Quote >");
        SV **tv;
        I32 len = av_len(av) + 1;
        Handle< Quote >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_HandleT_Quote_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "QuoteHandleVector_size. "
              "Expected an array of " "Handle< Quote >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of QuoteHandleVector_size. "
          "Expected an array of " "Handle< Quote >");
      }
    }
    {
      try {
        result = (unsigned int)((std::vector< Handle< Quote > > const *)arg1)->size();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_QuoteHandleVector_empty) {
  {
    std::vector< Handle< Quote > > *arg1 = (std::vector< Handle< Quote > > *) 0 ;
    std::vector< Handle< Quote > > temp1 ;
    std::vector< Handle< Quote > > *v1 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: QuoteHandleVector_empty(self);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of QuoteHandleVector_empty. "
          "Expected an array of " "Handle< Quote >");
        SV **tv;
        I32 len = av_len(av) + 1;
        Handle< Quote >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_HandleT_Quote_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "QuoteHandleVector_empty. "
              "Expected an array of " "Handle< Quote >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of QuoteHandleVector_empty. "
          "Expected an array of " "Handle< Quote >");
      }
    }
    {
      try {
        result = (bool)((std::vector< Handle< Quote > > const *)arg1)->empty();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_QuoteHandleVector_clear) {
  {
    std::vector< Handle< Quote > > *arg1 = (std::vector< Handle< Quote > > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: QuoteHandleVector_clear(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "QuoteHandleVector_clear" "', argument " "1"" of type '" "std::vector< Handle< Quote > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< Handle< Quote > > * >(argp1);
    {
      try {
        (arg1)->clear();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_QuoteHandleVector_push) {
  {
    std::vector< Handle< Quote > > *arg1 = (std::vector< Handle< Quote > > *) 0 ;
    Handle< Quote > *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: QuoteHandleVector_push(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "QuoteHandleVector_push" "', argument " "1"" of type '" "std::vector< Handle< Quote > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< Handle< Quote > > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "QuoteHandleVector_push" "', argument " "2"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "QuoteHandleVector_push" "', argument " "2"" of type '" "Handle< Quote > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< Quote > * >(argp2);
    {
      try {
        (arg1)->push_back((Handle< Quote > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_QuoteHandleVector_pop) {
  {
    std::vector< Handle< Quote > > *arg1 = (std::vector< Handle< Quote > > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Handle< Quote > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: QuoteHandleVector_pop(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "QuoteHandleVector_pop" "', argument " "1"" of type '" "std::vector< Handle< Quote > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< Handle< Quote > > * >(argp1);
    {
      try {
        try {
          result = std_vector_Sl_Handle_Sl_Quote_Sg__Sg__pop(arg1);
        }
        catch(std::out_of_range &_e) {
          sv_setsv(get_sv("@", GV_ADD), SWIG_NewPointerObj((new std::out_of_range(static_cast< const std::out_of_range& >(_e))),SWIGTYPE_p_std__out_of_range,SWIG_POINTER_OWN)); SWIG_fail ;
        }
        
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Handle< Quote >(static_cast< const Handle< Quote >& >(result))), SWIGTYPE_p_HandleT_Quote_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_QuoteHandleVector_get) {
  {
    std::vector< Handle< Quote > > *arg1 = (std::vector< Handle< Quote > > *) 0 ;
    int arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Handle< Quote > *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: QuoteHandleVector_get(self,i);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "QuoteHandleVector_get" "', argument " "1"" of type '" "std::vector< Handle< Quote > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< Handle< Quote > > * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "QuoteHandleVector_get" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    {
      try {
        try {
          result = (Handle< Quote > *) &std_vector_Sl_Handle_Sl_Quote_Sg__Sg__get(arg1,arg2);
        }
        catch(std::out_of_range &_e) {
          sv_setsv(get_sv("@", GV_ADD), SWIG_NewPointerObj((new std::out_of_range(static_cast< const std::out_of_range& >(_e))),SWIGTYPE_p_std__out_of_range,SWIG_POINTER_OWN)); SWIG_fail ;
        }
        
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_HandleT_Quote_t, 0 | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_QuoteHandleVector_set) {
  {
    std::vector< Handle< Quote > > *arg1 = (std::vector< Handle< Quote > > *) 0 ;
    int arg2 ;
    Handle< Quote > *arg3 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: QuoteHandleVector_set(self,i,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "QuoteHandleVector_set" "', argument " "1"" of type '" "std::vector< Handle< Quote > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< Handle< Quote > > * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "QuoteHandleVector_set" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "QuoteHandleVector_set" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "QuoteHandleVector_set" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< Quote > * >(argp3);
    {
      try {
        try {
          std_vector_Sl_Handle_Sl_Quote_Sg__Sg__set(arg1,arg2,(Handle< Quote > const &)*arg3);
        }
        catch(std::out_of_range &_e) {
          sv_setsv(get_sv("@", GV_ADD), SWIG_NewPointerObj((new std::out_of_range(static_cast< const std::out_of_range& >(_e))),SWIGTYPE_p_std__out_of_range,SWIG_POINTER_OWN)); SWIG_fail ;
        }
        
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_QuoteHandleVector) {
  {
    std::vector< Handle< Quote > > *arg1 = (std::vector< Handle< Quote > > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_QuoteHandleVector(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_QuoteHandleVector" "', argument " "1"" of type '" "std::vector< Handle< Quote > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< Handle< Quote > > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_QuoteHandleVectorVector__SWIG_0) {
  {
    unsigned int arg1 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    std::vector< std::vector< Handle< Quote > > > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_QuoteHandleVectorVector(size);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_QuoteHandleVectorVector" "', argument " "1"" of type '" "unsigned int""'");
    } 
    arg1 = static_cast< unsigned int >(val1);
    {
      try {
        result = (std::vector< std::vector< Handle< Quote > > > *)new std::vector< std::vector< Handle< Quote > > >(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__vectorT_HandleT_Quote_t_t_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_QuoteHandleVectorVector__SWIG_1) {
  {
    int argvi = 0;
    std::vector< std::vector< Handle< Quote > > > *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_QuoteHandleVectorVector();");
    }
    {
      try {
        result = (std::vector< std::vector< Handle< Quote > > > *)new std::vector< std::vector< Handle< Quote > > >();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__vectorT_HandleT_Quote_t_t_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_QuoteHandleVectorVector__SWIG_2) {
  {
    unsigned int arg1 ;
    std::vector< Handle< Quote > > *arg2 = 0 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    std::vector< Handle< Quote > > temp2 ;
    std::vector< Handle< Quote > > *v2 ;
    int argvi = 0;
    std::vector< std::vector< Handle< Quote > > > *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_QuoteHandleVectorVector(size,value);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_QuoteHandleVectorVector" "', argument " "1"" of type '" "unsigned int""'");
    } 
    arg1 = static_cast< unsigned int >(val1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_QuoteHandleVectorVector. "
          "Expected an array of " "Handle< Quote >");
        SV **tv;
        I32 len = av_len(av) + 1;
        Handle< Quote >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_HandleT_Quote_t,0) != -1) {
            temp2.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_QuoteHandleVectorVector. "
              "Expected an array of " "Handle< Quote >");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_QuoteHandleVectorVector. "
          "Expected an array of " "Handle< Quote >");
      }
    }
    {
      try {
        result = (std::vector< std::vector< Handle< Quote > > > *)new std::vector< std::vector< Handle< Quote > > >(arg1,(std::vector< Handle< Quote > > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__vectorT_HandleT_Quote_t_t_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_QuoteHandleVectorVector__SWIG_3) {
  {
    std::vector< std::vector< Handle< Quote > > > *arg1 = 0 ;
    std::vector< std::vector< Handle< Quote > > > temp1 ;
    std::vector< std::vector< Handle< Quote > > > *v1 ;
    int argvi = 0;
    std::vector< std::vector< Handle< Quote > > > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_QuoteHandleVectorVector(std::vector< std::vector< Handle< Quote > > > const &);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_std__vectorT_HandleT_Quote_t_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_QuoteHandleVectorVector. "
          "Expected an array of " "std::vector< Handle< Quote > >");
        SV **tv;
        I32 len = av_len(av) + 1;
        std::vector< Handle< Quote > >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_QuoteHandleVectorVector. "
              "Expected an array of " "std::vector< Handle< Quote > >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_QuoteHandleVectorVector. "
          "Expected an array of " "std::vector< Handle< Quote > >");
      }
    }
    {
      try {
        result = (std::vector< std::vector< Handle< Quote > > > *)new std::vector< std::vector< Handle< Quote > > >((std::vector< std::vector< Handle< Quote > > > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__vectorT_HandleT_Quote_t_t_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_QuoteHandleVectorVector) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< std::vector< Handle< Quote > > >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_std__vectorT_HandleT_Quote_t_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  std::vector< Handle< Quote > >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Handle< Quote > >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Handle< Quote >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_HandleT_Quote_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_QuoteHandleVectorVector__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_QuoteHandleVectorVector__SWIG_0); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_QuoteHandleVectorVector__SWIG_3); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_QuoteHandleVectorVector__SWIG_2); return;
    }
  }
  
  croak("No matching function for overloaded 'new_QuoteHandleVectorVector'");
  XSRETURN(0);
}


XS(_wrap_QuoteHandleVectorVector_size) {
  {
    std::vector< std::vector< Handle< Quote > > > *arg1 = (std::vector< std::vector< Handle< Quote > > > *) 0 ;
    std::vector< std::vector< Handle< Quote > > > temp1 ;
    std::vector< std::vector< Handle< Quote > > > *v1 ;
    int argvi = 0;
    unsigned int result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: QuoteHandleVectorVector_size(self);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_std__vectorT_HandleT_Quote_t_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of QuoteHandleVectorVector_size. "
          "Expected an array of " "std::vector< Handle< Quote > >");
        SV **tv;
        I32 len = av_len(av) + 1;
        std::vector< Handle< Quote > >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "QuoteHandleVectorVector_size. "
              "Expected an array of " "std::vector< Handle< Quote > >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of QuoteHandleVectorVector_size. "
          "Expected an array of " "std::vector< Handle< Quote > >");
      }
    }
    {
      try {
        result = (unsigned int)((std::vector< std::vector< Handle< Quote > > > const *)arg1)->size();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_QuoteHandleVectorVector_empty) {
  {
    std::vector< std::vector< Handle< Quote > > > *arg1 = (std::vector< std::vector< Handle< Quote > > > *) 0 ;
    std::vector< std::vector< Handle< Quote > > > temp1 ;
    std::vector< std::vector< Handle< Quote > > > *v1 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: QuoteHandleVectorVector_empty(self);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_std__vectorT_HandleT_Quote_t_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of QuoteHandleVectorVector_empty. "
          "Expected an array of " "std::vector< Handle< Quote > >");
        SV **tv;
        I32 len = av_len(av) + 1;
        std::vector< Handle< Quote > >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "QuoteHandleVectorVector_empty. "
              "Expected an array of " "std::vector< Handle< Quote > >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of QuoteHandleVectorVector_empty. "
          "Expected an array of " "std::vector< Handle< Quote > >");
      }
    }
    {
      try {
        result = (bool)((std::vector< std::vector< Handle< Quote > > > const *)arg1)->empty();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_QuoteHandleVectorVector_clear) {
  {
    std::vector< std::vector< Handle< Quote > > > *arg1 = (std::vector< std::vector< Handle< Quote > > > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: QuoteHandleVectorVector_clear(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_HandleT_Quote_t_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "QuoteHandleVectorVector_clear" "', argument " "1"" of type '" "std::vector< std::vector< Handle< Quote > > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< std::vector< Handle< Quote > > > * >(argp1);
    {
      try {
        (arg1)->clear();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_QuoteHandleVectorVector_push) {
  {
    std::vector< std::vector< Handle< Quote > > > *arg1 = (std::vector< std::vector< Handle< Quote > > > *) 0 ;
    std::vector< Handle< Quote > > *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    std::vector< Handle< Quote > > temp2 ;
    std::vector< Handle< Quote > > *v2 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: QuoteHandleVectorVector_push(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_HandleT_Quote_t_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "QuoteHandleVectorVector_push" "', argument " "1"" of type '" "std::vector< std::vector< Handle< Quote > > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< std::vector< Handle< Quote > > > * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of QuoteHandleVectorVector_push. "
          "Expected an array of " "Handle< Quote >");
        SV **tv;
        I32 len = av_len(av) + 1;
        Handle< Quote >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_HandleT_Quote_t,0) != -1) {
            temp2.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 2 of "
              "QuoteHandleVectorVector_push. "
              "Expected an array of " "Handle< Quote >");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of QuoteHandleVectorVector_push. "
          "Expected an array of " "Handle< Quote >");
      }
    }
    {
      try {
        (arg1)->push_back((std::vector< Handle< Quote > > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_QuoteHandleVectorVector_pop) {
  {
    std::vector< std::vector< Handle< Quote > > > *arg1 = (std::vector< std::vector< Handle< Quote > > > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Handle< Quote > > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: QuoteHandleVectorVector_pop(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_HandleT_Quote_t_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "QuoteHandleVectorVector_pop" "', argument " "1"" of type '" "std::vector< std::vector< Handle< Quote > > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< std::vector< Handle< Quote > > > * >(argp1);
    {
      try {
        try {
          result = std_vector_Sl_std_vector_Sl_Handle_Sl_Quote_Sg__Sg__Sg__pop(arg1);
        }
        catch(std::out_of_range &_e) {
          sv_setsv(get_sv("@", GV_ADD), SWIG_NewPointerObj((new std::out_of_range(static_cast< const std::out_of_range& >(_e))),SWIGTYPE_p_std__out_of_range,SWIG_POINTER_OWN)); SWIG_fail ;
        }
        
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        Handle< Quote >* ptr = new Handle< Quote >(result[i]);
        svs[i] = sv_newmortal();
        SWIG_MakePtr(svs[i], (void*) ptr, 
          SWIGTYPE_p_HandleT_Quote_t, SWIG_SHADOW|0);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_QuoteHandleVectorVector_get) {
  {
    std::vector< std::vector< Handle< Quote > > > *arg1 = (std::vector< std::vector< Handle< Quote > > > *) 0 ;
    int arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    std::vector< Handle< Quote > > *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: QuoteHandleVectorVector_get(self,i);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_HandleT_Quote_t_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "QuoteHandleVectorVector_get" "', argument " "1"" of type '" "std::vector< std::vector< Handle< Quote > > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< std::vector< Handle< Quote > > > * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "QuoteHandleVectorVector_get" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    {
      try {
        try {
          result = (std::vector< Handle< Quote > > *) &std_vector_Sl_std_vector_Sl_Handle_Sl_Quote_Sg__Sg__Sg__get(arg1,arg2);
        }
        catch(std::out_of_range &_e) {
          sv_setsv(get_sv("@", GV_ADD), SWIG_NewPointerObj((new std::out_of_range(static_cast< const std::out_of_range& >(_e))),SWIGTYPE_p_std__out_of_range,SWIG_POINTER_OWN)); SWIG_fail ;
        }
        
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t, 0 | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_QuoteHandleVectorVector_set) {
  {
    std::vector< std::vector< Handle< Quote > > > *arg1 = (std::vector< std::vector< Handle< Quote > > > *) 0 ;
    int arg2 ;
    std::vector< Handle< Quote > > *arg3 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    std::vector< Handle< Quote > > temp3 ;
    std::vector< Handle< Quote > > *v3 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: QuoteHandleVectorVector_set(self,i,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_HandleT_Quote_t_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "QuoteHandleVectorVector_set" "', argument " "1"" of type '" "std::vector< std::vector< Handle< Quote > > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< std::vector< Handle< Quote > > > * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "QuoteHandleVectorVector_set" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of QuoteHandleVectorVector_set. "
          "Expected an array of " "Handle< Quote >");
        SV **tv;
        I32 len = av_len(av) + 1;
        Handle< Quote >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_HandleT_Quote_t,0) != -1) {
            temp3.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 3 of "
              "QuoteHandleVectorVector_set. "
              "Expected an array of " "Handle< Quote >");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of QuoteHandleVectorVector_set. "
          "Expected an array of " "Handle< Quote >");
      }
    }
    {
      try {
        try {
          std_vector_Sl_std_vector_Sl_Handle_Sl_Quote_Sg__Sg__Sg__set(arg1,arg2,(std::vector< Handle< Quote > > const &)*arg3);
        }
        catch(std::out_of_range &_e) {
          sv_setsv(get_sv("@", GV_ADD), SWIG_NewPointerObj((new std::out_of_range(static_cast< const std::out_of_range& >(_e))),SWIGTYPE_p_std__out_of_range,SWIG_POINTER_OWN)); SWIG_fail ;
        }
        
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_QuoteHandleVectorVector) {
  {
    std::vector< std::vector< Handle< Quote > > > *arg1 = (std::vector< std::vector< Handle< Quote > > > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_QuoteHandleVectorVector(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_HandleT_Quote_t_t_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_QuoteHandleVectorVector" "', argument " "1"" of type '" "std::vector< std::vector< Handle< Quote > > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< std::vector< Handle< Quote > > > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_RelinkableQuoteHandleVector__SWIG_0) {
  {
    unsigned int arg1 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    std::vector< RelinkableHandle< Quote > > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_RelinkableQuoteHandleVector(size);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_RelinkableQuoteHandleVector" "', argument " "1"" of type '" "unsigned int""'");
    } 
    arg1 = static_cast< unsigned int >(val1);
    {
      try {
        result = (std::vector< RelinkableHandle< Quote > > *)new std::vector< RelinkableHandle< Quote > >(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_RelinkableHandleT_Quote_t_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_RelinkableQuoteHandleVector__SWIG_1) {
  {
    int argvi = 0;
    std::vector< RelinkableHandle< Quote > > *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_RelinkableQuoteHandleVector();");
    }
    {
      try {
        result = (std::vector< RelinkableHandle< Quote > > *)new std::vector< RelinkableHandle< Quote > >();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_RelinkableHandleT_Quote_t_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_RelinkableQuoteHandleVector__SWIG_2) {
  {
    unsigned int arg1 ;
    RelinkableHandle< Quote > *arg2 = 0 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    std::vector< RelinkableHandle< Quote > > *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_RelinkableQuoteHandleVector(size,value);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_RelinkableQuoteHandleVector" "', argument " "1"" of type '" "unsigned int""'");
    } 
    arg1 = static_cast< unsigned int >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_RelinkableHandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_RelinkableQuoteHandleVector" "', argument " "2"" of type '" "RelinkableHandle< Quote > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_RelinkableQuoteHandleVector" "', argument " "2"" of type '" "RelinkableHandle< Quote > const &""'"); 
    }
    arg2 = reinterpret_cast< RelinkableHandle< Quote > * >(argp2);
    {
      try {
        result = (std::vector< RelinkableHandle< Quote > > *)new std::vector< RelinkableHandle< Quote > >(arg1,(RelinkableHandle< Quote > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_RelinkableHandleT_Quote_t_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_RelinkableQuoteHandleVector__SWIG_3) {
  {
    std::vector< RelinkableHandle< Quote > > *arg1 = 0 ;
    std::vector< RelinkableHandle< Quote > > temp1 ;
    std::vector< RelinkableHandle< Quote > > *v1 ;
    int argvi = 0;
    std::vector< RelinkableHandle< Quote > > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_RelinkableQuoteHandleVector(std::vector< RelinkableHandle< Quote > > const &);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_RelinkableHandleT_Quote_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_RelinkableQuoteHandleVector. "
          "Expected an array of " "RelinkableHandle< Quote >");
        SV **tv;
        I32 len = av_len(av) + 1;
        RelinkableHandle< Quote >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_RelinkableHandleT_Quote_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_RelinkableQuoteHandleVector. "
              "Expected an array of " "RelinkableHandle< Quote >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_RelinkableQuoteHandleVector. "
          "Expected an array of " "RelinkableHandle< Quote >");
      }
    }
    {
      try {
        result = (std::vector< RelinkableHandle< Quote > > *)new std::vector< RelinkableHandle< Quote > >((std::vector< RelinkableHandle< Quote > > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_RelinkableHandleT_Quote_t_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_RelinkableQuoteHandleVector) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< RelinkableHandle< Quote > >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_RelinkableHandleT_Quote_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  RelinkableHandle< Quote >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_RelinkableHandleT_Quote_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_RelinkableHandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_RelinkableQuoteHandleVector__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_RelinkableQuoteHandleVector__SWIG_0); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_RelinkableQuoteHandleVector__SWIG_3); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_RelinkableQuoteHandleVector__SWIG_2); return;
    }
  }
  
  croak("No matching function for overloaded 'new_RelinkableQuoteHandleVector'");
  XSRETURN(0);
}


XS(_wrap_RelinkableQuoteHandleVector_size) {
  {
    std::vector< RelinkableHandle< Quote > > *arg1 = (std::vector< RelinkableHandle< Quote > > *) 0 ;
    std::vector< RelinkableHandle< Quote > > temp1 ;
    std::vector< RelinkableHandle< Quote > > *v1 ;
    int argvi = 0;
    unsigned int result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: RelinkableQuoteHandleVector_size(self);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_RelinkableHandleT_Quote_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of RelinkableQuoteHandleVector_size. "
          "Expected an array of " "RelinkableHandle< Quote >");
        SV **tv;
        I32 len = av_len(av) + 1;
        RelinkableHandle< Quote >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_RelinkableHandleT_Quote_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "RelinkableQuoteHandleVector_size. "
              "Expected an array of " "RelinkableHandle< Quote >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of RelinkableQuoteHandleVector_size. "
          "Expected an array of " "RelinkableHandle< Quote >");
      }
    }
    {
      try {
        result = (unsigned int)((std::vector< RelinkableHandle< Quote > > const *)arg1)->size();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_RelinkableQuoteHandleVector_empty) {
  {
    std::vector< RelinkableHandle< Quote > > *arg1 = (std::vector< RelinkableHandle< Quote > > *) 0 ;
    std::vector< RelinkableHandle< Quote > > temp1 ;
    std::vector< RelinkableHandle< Quote > > *v1 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: RelinkableQuoteHandleVector_empty(self);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_RelinkableHandleT_Quote_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of RelinkableQuoteHandleVector_empty. "
          "Expected an array of " "RelinkableHandle< Quote >");
        SV **tv;
        I32 len = av_len(av) + 1;
        RelinkableHandle< Quote >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_RelinkableHandleT_Quote_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "RelinkableQuoteHandleVector_empty. "
              "Expected an array of " "RelinkableHandle< Quote >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of RelinkableQuoteHandleVector_empty. "
          "Expected an array of " "RelinkableHandle< Quote >");
      }
    }
    {
      try {
        result = (bool)((std::vector< RelinkableHandle< Quote > > const *)arg1)->empty();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_RelinkableQuoteHandleVector_clear) {
  {
    std::vector< RelinkableHandle< Quote > > *arg1 = (std::vector< RelinkableHandle< Quote > > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: RelinkableQuoteHandleVector_clear(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_RelinkableHandleT_Quote_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RelinkableQuoteHandleVector_clear" "', argument " "1"" of type '" "std::vector< RelinkableHandle< Quote > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< RelinkableHandle< Quote > > * >(argp1);
    {
      try {
        (arg1)->clear();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_RelinkableQuoteHandleVector_push) {
  {
    std::vector< RelinkableHandle< Quote > > *arg1 = (std::vector< RelinkableHandle< Quote > > *) 0 ;
    RelinkableHandle< Quote > *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: RelinkableQuoteHandleVector_push(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_RelinkableHandleT_Quote_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RelinkableQuoteHandleVector_push" "', argument " "1"" of type '" "std::vector< RelinkableHandle< Quote > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< RelinkableHandle< Quote > > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_RelinkableHandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "RelinkableQuoteHandleVector_push" "', argument " "2"" of type '" "RelinkableHandle< Quote > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "RelinkableQuoteHandleVector_push" "', argument " "2"" of type '" "RelinkableHandle< Quote > const &""'"); 
    }
    arg2 = reinterpret_cast< RelinkableHandle< Quote > * >(argp2);
    {
      try {
        (arg1)->push_back((RelinkableHandle< Quote > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_RelinkableQuoteHandleVector_pop) {
  {
    std::vector< RelinkableHandle< Quote > > *arg1 = (std::vector< RelinkableHandle< Quote > > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    RelinkableHandle< Quote > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: RelinkableQuoteHandleVector_pop(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_RelinkableHandleT_Quote_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RelinkableQuoteHandleVector_pop" "', argument " "1"" of type '" "std::vector< RelinkableHandle< Quote > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< RelinkableHandle< Quote > > * >(argp1);
    {
      try {
        try {
          result = std_vector_Sl_RelinkableHandle_Sl_Quote_Sg__Sg__pop(arg1);
        }
        catch(std::out_of_range &_e) {
          sv_setsv(get_sv("@", GV_ADD), SWIG_NewPointerObj((new std::out_of_range(static_cast< const std::out_of_range& >(_e))),SWIGTYPE_p_std__out_of_range,SWIG_POINTER_OWN)); SWIG_fail ;
        }
        
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new RelinkableHandle< Quote >(static_cast< const RelinkableHandle< Quote >& >(result))), SWIGTYPE_p_RelinkableHandleT_Quote_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_RelinkableQuoteHandleVector_get) {
  {
    std::vector< RelinkableHandle< Quote > > *arg1 = (std::vector< RelinkableHandle< Quote > > *) 0 ;
    int arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    RelinkableHandle< Quote > *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: RelinkableQuoteHandleVector_get(self,i);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_RelinkableHandleT_Quote_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RelinkableQuoteHandleVector_get" "', argument " "1"" of type '" "std::vector< RelinkableHandle< Quote > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< RelinkableHandle< Quote > > * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RelinkableQuoteHandleVector_get" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    {
      try {
        try {
          result = (RelinkableHandle< Quote > *) &std_vector_Sl_RelinkableHandle_Sl_Quote_Sg__Sg__get(arg1,arg2);
        }
        catch(std::out_of_range &_e) {
          sv_setsv(get_sv("@", GV_ADD), SWIG_NewPointerObj((new std::out_of_range(static_cast< const std::out_of_range& >(_e))),SWIGTYPE_p_std__out_of_range,SWIG_POINTER_OWN)); SWIG_fail ;
        }
        
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_RelinkableHandleT_Quote_t, 0 | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_RelinkableQuoteHandleVector_set) {
  {
    std::vector< RelinkableHandle< Quote > > *arg1 = (std::vector< RelinkableHandle< Quote > > *) 0 ;
    int arg2 ;
    RelinkableHandle< Quote > *arg3 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: RelinkableQuoteHandleVector_set(self,i,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_RelinkableHandleT_Quote_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RelinkableQuoteHandleVector_set" "', argument " "1"" of type '" "std::vector< RelinkableHandle< Quote > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< RelinkableHandle< Quote > > * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RelinkableQuoteHandleVector_set" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_RelinkableHandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "RelinkableQuoteHandleVector_set" "', argument " "3"" of type '" "RelinkableHandle< Quote > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "RelinkableQuoteHandleVector_set" "', argument " "3"" of type '" "RelinkableHandle< Quote > const &""'"); 
    }
    arg3 = reinterpret_cast< RelinkableHandle< Quote > * >(argp3);
    {
      try {
        try {
          std_vector_Sl_RelinkableHandle_Sl_Quote_Sg__Sg__set(arg1,arg2,(RelinkableHandle< Quote > const &)*arg3);
        }
        catch(std::out_of_range &_e) {
          sv_setsv(get_sv("@", GV_ADD), SWIG_NewPointerObj((new std::out_of_range(static_cast< const std::out_of_range& >(_e))),SWIGTYPE_p_std__out_of_range,SWIG_POINTER_OWN)); SWIG_fail ;
        }
        
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_RelinkableQuoteHandleVector) {
  {
    std::vector< RelinkableHandle< Quote > > *arg1 = (std::vector< RelinkableHandle< Quote > > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_RelinkableQuoteHandleVector(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_RelinkableHandleT_Quote_t_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_RelinkableQuoteHandleVector" "', argument " "1"" of type '" "std::vector< RelinkableHandle< Quote > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< RelinkableHandle< Quote > > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_RelinkableQuoteHandleVectorVector__SWIG_0) {
  {
    unsigned int arg1 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    std::vector< std::vector< RelinkableHandle< Quote > > > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_RelinkableQuoteHandleVectorVector(size);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_RelinkableQuoteHandleVectorVector" "', argument " "1"" of type '" "unsigned int""'");
    } 
    arg1 = static_cast< unsigned int >(val1);
    {
      try {
        result = (std::vector< std::vector< RelinkableHandle< Quote > > > *)new std::vector< std::vector< RelinkableHandle< Quote > > >(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__vectorT_RelinkableHandleT_Quote_t_t_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_RelinkableQuoteHandleVectorVector__SWIG_1) {
  {
    int argvi = 0;
    std::vector< std::vector< RelinkableHandle< Quote > > > *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_RelinkableQuoteHandleVectorVector();");
    }
    {
      try {
        result = (std::vector< std::vector< RelinkableHandle< Quote > > > *)new std::vector< std::vector< RelinkableHandle< Quote > > >();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__vectorT_RelinkableHandleT_Quote_t_t_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_RelinkableQuoteHandleVectorVector__SWIG_2) {
  {
    unsigned int arg1 ;
    std::vector< RelinkableHandle< Quote > > *arg2 = 0 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    std::vector< RelinkableHandle< Quote > > temp2 ;
    std::vector< RelinkableHandle< Quote > > *v2 ;
    int argvi = 0;
    std::vector< std::vector< RelinkableHandle< Quote > > > *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_RelinkableQuoteHandleVectorVector(size,value);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_RelinkableQuoteHandleVectorVector" "', argument " "1"" of type '" "unsigned int""'");
    } 
    arg1 = static_cast< unsigned int >(val1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_RelinkableHandleT_Quote_t_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_RelinkableQuoteHandleVectorVector. "
          "Expected an array of " "RelinkableHandle< Quote >");
        SV **tv;
        I32 len = av_len(av) + 1;
        RelinkableHandle< Quote >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_RelinkableHandleT_Quote_t,0) != -1) {
            temp2.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_RelinkableQuoteHandleVectorVector. "
              "Expected an array of " "RelinkableHandle< Quote >");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_RelinkableQuoteHandleVectorVector. "
          "Expected an array of " "RelinkableHandle< Quote >");
      }
    }
    {
      try {
        result = (std::vector< std::vector< RelinkableHandle< Quote > > > *)new std::vector< std::vector< RelinkableHandle< Quote > > >(arg1,(std::vector< RelinkableHandle< Quote > > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__vectorT_RelinkableHandleT_Quote_t_t_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_RelinkableQuoteHandleVectorVector__SWIG_3) {
  {
    std::vector< std::vector< RelinkableHandle< Quote > > > *arg1 = 0 ;
    std::vector< std::vector< RelinkableHandle< Quote > > > temp1 ;
    std::vector< std::vector< RelinkableHandle< Quote > > > *v1 ;
    int argvi = 0;
    std::vector< std::vector< RelinkableHandle< Quote > > > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_RelinkableQuoteHandleVectorVector(std::vector< std::vector< RelinkableHandle< Quote > > > const &);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_std__vectorT_RelinkableHandleT_Quote_t_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_RelinkableQuoteHandleVectorVector. "
          "Expected an array of " "std::vector< RelinkableHandle< Quote > >");
        SV **tv;
        I32 len = av_len(av) + 1;
        std::vector< RelinkableHandle< Quote > >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_std__vectorT_RelinkableHandleT_Quote_t_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_RelinkableQuoteHandleVectorVector. "
              "Expected an array of " "std::vector< RelinkableHandle< Quote > >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_RelinkableQuoteHandleVectorVector. "
          "Expected an array of " "std::vector< RelinkableHandle< Quote > >");
      }
    }
    {
      try {
        result = (std::vector< std::vector< RelinkableHandle< Quote > > > *)new std::vector< std::vector< RelinkableHandle< Quote > > >((std::vector< std::vector< RelinkableHandle< Quote > > > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__vectorT_RelinkableHandleT_Quote_t_t_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_RelinkableQuoteHandleVectorVector) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< std::vector< RelinkableHandle< Quote > > >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_std__vectorT_RelinkableHandleT_Quote_t_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  std::vector< RelinkableHandle< Quote > >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_std__vectorT_RelinkableHandleT_Quote_t_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< RelinkableHandle< Quote > >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_RelinkableHandleT_Quote_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  RelinkableHandle< Quote >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_RelinkableHandleT_Quote_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_RelinkableQuoteHandleVectorVector__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_RelinkableQuoteHandleVectorVector__SWIG_0); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_RelinkableQuoteHandleVectorVector__SWIG_3); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_RelinkableQuoteHandleVectorVector__SWIG_2); return;
    }
  }
  
  croak("No matching function for overloaded 'new_RelinkableQuoteHandleVectorVector'");
  XSRETURN(0);
}


XS(_wrap_RelinkableQuoteHandleVectorVector_size) {
  {
    std::vector< std::vector< RelinkableHandle< Quote > > > *arg1 = (std::vector< std::vector< RelinkableHandle< Quote > > > *) 0 ;
    std::vector< std::vector< RelinkableHandle< Quote > > > temp1 ;
    std::vector< std::vector< RelinkableHandle< Quote > > > *v1 ;
    int argvi = 0;
    unsigned int result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: RelinkableQuoteHandleVectorVector_size(self);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_std__vectorT_RelinkableHandleT_Quote_t_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of RelinkableQuoteHandleVectorVector_size. "
          "Expected an array of " "std::vector< RelinkableHandle< Quote > >");
        SV **tv;
        I32 len = av_len(av) + 1;
        std::vector< RelinkableHandle< Quote > >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_std__vectorT_RelinkableHandleT_Quote_t_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "RelinkableQuoteHandleVectorVector_size. "
              "Expected an array of " "std::vector< RelinkableHandle< Quote > >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of RelinkableQuoteHandleVectorVector_size. "
          "Expected an array of " "std::vector< RelinkableHandle< Quote > >");
      }
    }
    {
      try {
        result = (unsigned int)((std::vector< std::vector< RelinkableHandle< Quote > > > const *)arg1)->size();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_RelinkableQuoteHandleVectorVector_empty) {
  {
    std::vector< std::vector< RelinkableHandle< Quote > > > *arg1 = (std::vector< std::vector< RelinkableHandle< Quote > > > *) 0 ;
    std::vector< std::vector< RelinkableHandle< Quote > > > temp1 ;
    std::vector< std::vector< RelinkableHandle< Quote > > > *v1 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: RelinkableQuoteHandleVectorVector_empty(self);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_std__vectorT_RelinkableHandleT_Quote_t_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of RelinkableQuoteHandleVectorVector_empty. "
          "Expected an array of " "std::vector< RelinkableHandle< Quote > >");
        SV **tv;
        I32 len = av_len(av) + 1;
        std::vector< RelinkableHandle< Quote > >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_std__vectorT_RelinkableHandleT_Quote_t_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "RelinkableQuoteHandleVectorVector_empty. "
              "Expected an array of " "std::vector< RelinkableHandle< Quote > >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of RelinkableQuoteHandleVectorVector_empty. "
          "Expected an array of " "std::vector< RelinkableHandle< Quote > >");
      }
    }
    {
      try {
        result = (bool)((std::vector< std::vector< RelinkableHandle< Quote > > > const *)arg1)->empty();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_RelinkableQuoteHandleVectorVector_clear) {
  {
    std::vector< std::vector< RelinkableHandle< Quote > > > *arg1 = (std::vector< std::vector< RelinkableHandle< Quote > > > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: RelinkableQuoteHandleVectorVector_clear(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_RelinkableHandleT_Quote_t_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RelinkableQuoteHandleVectorVector_clear" "', argument " "1"" of type '" "std::vector< std::vector< RelinkableHandle< Quote > > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< std::vector< RelinkableHandle< Quote > > > * >(argp1);
    {
      try {
        (arg1)->clear();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_RelinkableQuoteHandleVectorVector_push) {
  {
    std::vector< std::vector< RelinkableHandle< Quote > > > *arg1 = (std::vector< std::vector< RelinkableHandle< Quote > > > *) 0 ;
    std::vector< RelinkableHandle< Quote > > *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    std::vector< RelinkableHandle< Quote > > temp2 ;
    std::vector< RelinkableHandle< Quote > > *v2 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: RelinkableQuoteHandleVectorVector_push(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_RelinkableHandleT_Quote_t_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RelinkableQuoteHandleVectorVector_push" "', argument " "1"" of type '" "std::vector< std::vector< RelinkableHandle< Quote > > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< std::vector< RelinkableHandle< Quote > > > * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_RelinkableHandleT_Quote_t_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of RelinkableQuoteHandleVectorVector_push. "
          "Expected an array of " "RelinkableHandle< Quote >");
        SV **tv;
        I32 len = av_len(av) + 1;
        RelinkableHandle< Quote >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_RelinkableHandleT_Quote_t,0) != -1) {
            temp2.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 2 of "
              "RelinkableQuoteHandleVectorVector_push. "
              "Expected an array of " "RelinkableHandle< Quote >");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of RelinkableQuoteHandleVectorVector_push. "
          "Expected an array of " "RelinkableHandle< Quote >");
      }
    }
    {
      try {
        (arg1)->push_back((std::vector< RelinkableHandle< Quote > > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_RelinkableQuoteHandleVectorVector_pop) {
  {
    std::vector< std::vector< RelinkableHandle< Quote > > > *arg1 = (std::vector< std::vector< RelinkableHandle< Quote > > > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< RelinkableHandle< Quote > > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: RelinkableQuoteHandleVectorVector_pop(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_RelinkableHandleT_Quote_t_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RelinkableQuoteHandleVectorVector_pop" "', argument " "1"" of type '" "std::vector< std::vector< RelinkableHandle< Quote > > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< std::vector< RelinkableHandle< Quote > > > * >(argp1);
    {
      try {
        try {
          result = std_vector_Sl_std_vector_Sl_RelinkableHandle_Sl_Quote_Sg__Sg__Sg__pop(arg1);
        }
        catch(std::out_of_range &_e) {
          sv_setsv(get_sv("@", GV_ADD), SWIG_NewPointerObj((new std::out_of_range(static_cast< const std::out_of_range& >(_e))),SWIGTYPE_p_std__out_of_range,SWIG_POINTER_OWN)); SWIG_fail ;
        }
        
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        RelinkableHandle< Quote >* ptr = new RelinkableHandle< Quote >(result[i]);
        svs[i] = sv_newmortal();
        SWIG_MakePtr(svs[i], (void*) ptr, 
          SWIGTYPE_p_RelinkableHandleT_Quote_t, SWIG_SHADOW|0);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_RelinkableQuoteHandleVectorVector_get) {
  {
    std::vector< std::vector< RelinkableHandle< Quote > > > *arg1 = (std::vector< std::vector< RelinkableHandle< Quote > > > *) 0 ;
    int arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    std::vector< RelinkableHandle< Quote > > *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: RelinkableQuoteHandleVectorVector_get(self,i);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_RelinkableHandleT_Quote_t_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RelinkableQuoteHandleVectorVector_get" "', argument " "1"" of type '" "std::vector< std::vector< RelinkableHandle< Quote > > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< std::vector< RelinkableHandle< Quote > > > * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RelinkableQuoteHandleVectorVector_get" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    {
      try {
        try {
          result = (std::vector< RelinkableHandle< Quote > > *) &std_vector_Sl_std_vector_Sl_RelinkableHandle_Sl_Quote_Sg__Sg__Sg__get(arg1,arg2);
        }
        catch(std::out_of_range &_e) {
          sv_setsv(get_sv("@", GV_ADD), SWIG_NewPointerObj((new std::out_of_range(static_cast< const std::out_of_range& >(_e))),SWIGTYPE_p_std__out_of_range,SWIG_POINTER_OWN)); SWIG_fail ;
        }
        
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_RelinkableHandleT_Quote_t_t, 0 | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_RelinkableQuoteHandleVectorVector_set) {
  {
    std::vector< std::vector< RelinkableHandle< Quote > > > *arg1 = (std::vector< std::vector< RelinkableHandle< Quote > > > *) 0 ;
    int arg2 ;
    std::vector< RelinkableHandle< Quote > > *arg3 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    std::vector< RelinkableHandle< Quote > > temp3 ;
    std::vector< RelinkableHandle< Quote > > *v3 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: RelinkableQuoteHandleVectorVector_set(self,i,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_RelinkableHandleT_Quote_t_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RelinkableQuoteHandleVectorVector_set" "', argument " "1"" of type '" "std::vector< std::vector< RelinkableHandle< Quote > > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< std::vector< RelinkableHandle< Quote > > > * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RelinkableQuoteHandleVectorVector_set" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_RelinkableHandleT_Quote_t_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of RelinkableQuoteHandleVectorVector_set. "
          "Expected an array of " "RelinkableHandle< Quote >");
        SV **tv;
        I32 len = av_len(av) + 1;
        RelinkableHandle< Quote >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_RelinkableHandleT_Quote_t,0) != -1) {
            temp3.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 3 of "
              "RelinkableQuoteHandleVectorVector_set. "
              "Expected an array of " "RelinkableHandle< Quote >");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of RelinkableQuoteHandleVectorVector_set. "
          "Expected an array of " "RelinkableHandle< Quote >");
      }
    }
    {
      try {
        try {
          std_vector_Sl_std_vector_Sl_RelinkableHandle_Sl_Quote_Sg__Sg__Sg__set(arg1,arg2,(std::vector< RelinkableHandle< Quote > > const &)*arg3);
        }
        catch(std::out_of_range &_e) {
          sv_setsv(get_sv("@", GV_ADD), SWIG_NewPointerObj((new std::out_of_range(static_cast< const std::out_of_range& >(_e))),SWIGTYPE_p_std__out_of_range,SWIG_POINTER_OWN)); SWIG_fail ;
        }
        
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_RelinkableQuoteHandleVectorVector) {
  {
    std::vector< std::vector< RelinkableHandle< Quote > > > *arg1 = (std::vector< std::vector< RelinkableHandle< Quote > > > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_RelinkableQuoteHandleVectorVector(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_RelinkableHandleT_Quote_t_t_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_RelinkableQuoteHandleVectorVector" "', argument " "1"" of type '" "std::vector< std::vector< RelinkableHandle< Quote > > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< std::vector< RelinkableHandle< Quote > > > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Calendar_isWeekend) {
  {
    Calendar *arg1 = (Calendar *) 0 ;
    Weekday arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Calendar_isWeekend(self,w);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Calendar, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Calendar_isWeekend" "', argument " "1"" of type '" "Calendar *""'"); 
    }
    arg1 = reinterpret_cast< Calendar * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Calendar_isWeekend" "', argument " "2"" of type '" "Weekday""'");
    } 
    arg2 = static_cast< Weekday >(val2);
    {
      try {
        result = (bool)(arg1)->isWeekend(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Calendar_endOfMonth) {
  {
    Calendar *arg1 = (Calendar *) 0 ;
    Date *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Calendar_endOfMonth(self,Date const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Calendar, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Calendar_endOfMonth" "', argument " "1"" of type '" "Calendar *""'"); 
    }
    arg1 = reinterpret_cast< Calendar * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Calendar_endOfMonth" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Calendar_endOfMonth" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    {
      try {
        result = (arg1)->endOfMonth((Date const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Calendar_isBusinessDay) {
  {
    Calendar *arg1 = (Calendar *) 0 ;
    Date *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Calendar_isBusinessDay(self,Date const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Calendar, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Calendar_isBusinessDay" "', argument " "1"" of type '" "Calendar *""'"); 
    }
    arg1 = reinterpret_cast< Calendar * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Calendar_isBusinessDay" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Calendar_isBusinessDay" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    {
      try {
        result = (bool)(arg1)->isBusinessDay((Date const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Calendar_isHoliday) {
  {
    Calendar *arg1 = (Calendar *) 0 ;
    Date *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Calendar_isHoliday(self,Date const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Calendar, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Calendar_isHoliday" "', argument " "1"" of type '" "Calendar *""'"); 
    }
    arg1 = reinterpret_cast< Calendar * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Calendar_isHoliday" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Calendar_isHoliday" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    {
      try {
        result = (bool)(arg1)->isHoliday((Date const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Calendar_isEndOfMonth) {
  {
    Calendar *arg1 = (Calendar *) 0 ;
    Date *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Calendar_isEndOfMonth(self,Date const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Calendar, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Calendar_isEndOfMonth" "', argument " "1"" of type '" "Calendar *""'"); 
    }
    arg1 = reinterpret_cast< Calendar * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Calendar_isEndOfMonth" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Calendar_isEndOfMonth" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    {
      try {
        result = (bool)(arg1)->isEndOfMonth((Date const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Calendar_addHoliday) {
  {
    Calendar *arg1 = (Calendar *) 0 ;
    Date *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Calendar_addHoliday(self,Date const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Calendar, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Calendar_addHoliday" "', argument " "1"" of type '" "Calendar *""'"); 
    }
    arg1 = reinterpret_cast< Calendar * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Calendar_addHoliday" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Calendar_addHoliday" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    {
      try {
        (arg1)->addHoliday((Date const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Calendar_removeHoliday) {
  {
    Calendar *arg1 = (Calendar *) 0 ;
    Date *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Calendar_removeHoliday(self,Date const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Calendar, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Calendar_removeHoliday" "', argument " "1"" of type '" "Calendar *""'"); 
    }
    arg1 = reinterpret_cast< Calendar * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Calendar_removeHoliday" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Calendar_removeHoliday" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    {
      try {
        (arg1)->removeHoliday((Date const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Calendar_adjust__SWIG_0) {
  {
    Calendar *arg1 = (Calendar *) 0 ;
    Date *arg2 = 0 ;
    BusinessDayConvention arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: Calendar_adjust(self,d,convention);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Calendar, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Calendar_adjust" "', argument " "1"" of type '" "Calendar *""'"); 
    }
    arg1 = reinterpret_cast< Calendar * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Calendar_adjust" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Calendar_adjust" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Calendar_adjust" "', argument " "3"" of type '" "BusinessDayConvention""'");
    } 
    arg3 = static_cast< BusinessDayConvention >(val3);
    {
      try {
        result = (arg1)->adjust((Date const &)*arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Calendar_adjust__SWIG_1) {
  {
    Calendar *arg1 = (Calendar *) 0 ;
    Date *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Calendar_adjust(self,d);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Calendar, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Calendar_adjust" "', argument " "1"" of type '" "Calendar *""'"); 
    }
    arg1 = reinterpret_cast< Calendar * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Calendar_adjust" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Calendar_adjust" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    {
      try {
        result = (arg1)->adjust((Date const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Calendar_adjust) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Calendar_adjust__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Calendar_adjust__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'Calendar_adjust'");
  XSRETURN(0);
}


XS(_wrap_Calendar_advance__SWIG_0) {
  {
    Calendar *arg1 = (Calendar *) 0 ;
    Date *arg2 = 0 ;
    Integer arg3 ;
    TimeUnit arg4 ;
    BusinessDayConvention arg5 ;
    bool arg6 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    bool val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: Calendar_advance(self,d,n,unit,convention,endOfMonth);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Calendar, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Calendar_advance" "', argument " "1"" of type '" "Calendar *""'"); 
    }
    arg1 = reinterpret_cast< Calendar * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Calendar_advance" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Calendar_advance" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Calendar_advance" "', argument " "3"" of type '" "Integer""'");
    } 
    arg3 = static_cast< Integer >(val3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Calendar_advance" "', argument " "4"" of type '" "TimeUnit""'");
    } 
    arg4 = static_cast< TimeUnit >(val4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Calendar_advance" "', argument " "5"" of type '" "BusinessDayConvention""'");
    } 
    arg5 = static_cast< BusinessDayConvention >(val5);
    ecode6 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Calendar_advance" "', argument " "6"" of type '" "bool""'");
    } 
    arg6 = static_cast< bool >(val6);
    {
      try {
        result = (arg1)->advance((Date const &)*arg2,arg3,arg4,arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Calendar_advance__SWIG_1) {
  {
    Calendar *arg1 = (Calendar *) 0 ;
    Date *arg2 = 0 ;
    Integer arg3 ;
    TimeUnit arg4 ;
    BusinessDayConvention arg5 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: Calendar_advance(self,d,n,unit,convention);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Calendar, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Calendar_advance" "', argument " "1"" of type '" "Calendar *""'"); 
    }
    arg1 = reinterpret_cast< Calendar * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Calendar_advance" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Calendar_advance" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Calendar_advance" "', argument " "3"" of type '" "Integer""'");
    } 
    arg3 = static_cast< Integer >(val3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Calendar_advance" "', argument " "4"" of type '" "TimeUnit""'");
    } 
    arg4 = static_cast< TimeUnit >(val4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Calendar_advance" "', argument " "5"" of type '" "BusinessDayConvention""'");
    } 
    arg5 = static_cast< BusinessDayConvention >(val5);
    {
      try {
        result = (arg1)->advance((Date const &)*arg2,arg3,arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Calendar_advance__SWIG_2) {
  {
    Calendar *arg1 = (Calendar *) 0 ;
    Date *arg2 = 0 ;
    Integer arg3 ;
    TimeUnit arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: Calendar_advance(self,d,n,unit);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Calendar, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Calendar_advance" "', argument " "1"" of type '" "Calendar *""'"); 
    }
    arg1 = reinterpret_cast< Calendar * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Calendar_advance" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Calendar_advance" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Calendar_advance" "', argument " "3"" of type '" "Integer""'");
    } 
    arg3 = static_cast< Integer >(val3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Calendar_advance" "', argument " "4"" of type '" "TimeUnit""'");
    } 
    arg4 = static_cast< TimeUnit >(val4);
    {
      try {
        result = (arg1)->advance((Date const &)*arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Calendar_advance__SWIG_3) {
  {
    Calendar *arg1 = (Calendar *) 0 ;
    Date *arg2 = 0 ;
    Period *arg3 = 0 ;
    BusinessDayConvention arg4 ;
    bool arg5 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    bool val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: Calendar_advance(self,d,period,convention,endOfMonth);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Calendar, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Calendar_advance" "', argument " "1"" of type '" "Calendar *""'"); 
    }
    arg1 = reinterpret_cast< Calendar * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Calendar_advance" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Calendar_advance" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Calendar_advance" "', argument " "3"" of type '" "Period const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Calendar_advance" "', argument " "3"" of type '" "Period const &""'"); 
    }
    arg3 = reinterpret_cast< Period * >(argp3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Calendar_advance" "', argument " "4"" of type '" "BusinessDayConvention""'");
    } 
    arg4 = static_cast< BusinessDayConvention >(val4);
    ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Calendar_advance" "', argument " "5"" of type '" "bool""'");
    } 
    arg5 = static_cast< bool >(val5);
    {
      try {
        result = (arg1)->advance((Date const &)*arg2,(Period const &)*arg3,arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Calendar_advance__SWIG_4) {
  {
    Calendar *arg1 = (Calendar *) 0 ;
    Date *arg2 = 0 ;
    Period *arg3 = 0 ;
    BusinessDayConvention arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: Calendar_advance(self,d,period,convention);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Calendar, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Calendar_advance" "', argument " "1"" of type '" "Calendar *""'"); 
    }
    arg1 = reinterpret_cast< Calendar * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Calendar_advance" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Calendar_advance" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Calendar_advance" "', argument " "3"" of type '" "Period const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Calendar_advance" "', argument " "3"" of type '" "Period const &""'"); 
    }
    arg3 = reinterpret_cast< Period * >(argp3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Calendar_advance" "', argument " "4"" of type '" "BusinessDayConvention""'");
    } 
    arg4 = static_cast< BusinessDayConvention >(val4);
    {
      try {
        result = (arg1)->advance((Date const &)*arg2,(Period const &)*arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Calendar_advance__SWIG_5) {
  {
    Calendar *arg1 = (Calendar *) 0 ;
    Date *arg2 = 0 ;
    Period *arg3 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: Calendar_advance(self,d,period);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Calendar, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Calendar_advance" "', argument " "1"" of type '" "Calendar *""'"); 
    }
    arg1 = reinterpret_cast< Calendar * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Calendar_advance" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Calendar_advance" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Calendar_advance" "', argument " "3"" of type '" "Period const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Calendar_advance" "', argument " "3"" of type '" "Period const &""'"); 
    }
    arg3 = reinterpret_cast< Period * >(argp3);
    {
      try {
        result = (arg1)->advance((Date const &)*arg2,(Period const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Calendar_advance) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Calendar_advance__SWIG_5); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Calendar_advance__SWIG_4); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Calendar_advance__SWIG_2); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Calendar_advance__SWIG_3); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Calendar_advance__SWIG_1); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Calendar_advance__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'Calendar_advance'");
  XSRETURN(0);
}


XS(_wrap_Calendar_businessDaysBetween__SWIG_0) {
  {
    Calendar *arg1 = (Calendar *) 0 ;
    Date *arg2 = 0 ;
    Date *arg3 = 0 ;
    bool arg4 ;
    bool arg5 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    bool val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    BigInteger result;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: Calendar_businessDaysBetween(self,from,to,includeFirst,includeLast);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Calendar, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Calendar_businessDaysBetween" "', argument " "1"" of type '" "Calendar *""'"); 
    }
    arg1 = reinterpret_cast< Calendar * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Calendar_businessDaysBetween" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Calendar_businessDaysBetween" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Calendar_businessDaysBetween" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Calendar_businessDaysBetween" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Calendar_businessDaysBetween" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Calendar_businessDaysBetween" "', argument " "5"" of type '" "bool""'");
    } 
    arg5 = static_cast< bool >(val5);
    {
      try {
        result = (BigInteger)(arg1)->businessDaysBetween((Date const &)*arg2,(Date const &)*arg3,arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_long  SWIG_PERL_CALL_ARGS_1(static_cast< long >(result)); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Calendar_businessDaysBetween__SWIG_1) {
  {
    Calendar *arg1 = (Calendar *) 0 ;
    Date *arg2 = 0 ;
    Date *arg3 = 0 ;
    bool arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    BigInteger result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: Calendar_businessDaysBetween(self,from,to,includeFirst);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Calendar, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Calendar_businessDaysBetween" "', argument " "1"" of type '" "Calendar *""'"); 
    }
    arg1 = reinterpret_cast< Calendar * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Calendar_businessDaysBetween" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Calendar_businessDaysBetween" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Calendar_businessDaysBetween" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Calendar_businessDaysBetween" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Calendar_businessDaysBetween" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    {
      try {
        result = (BigInteger)(arg1)->businessDaysBetween((Date const &)*arg2,(Date const &)*arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_long  SWIG_PERL_CALL_ARGS_1(static_cast< long >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Calendar_businessDaysBetween__SWIG_2) {
  {
    Calendar *arg1 = (Calendar *) 0 ;
    Date *arg2 = 0 ;
    Date *arg3 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    BigInteger result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: Calendar_businessDaysBetween(self,from,to);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Calendar, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Calendar_businessDaysBetween" "', argument " "1"" of type '" "Calendar *""'"); 
    }
    arg1 = reinterpret_cast< Calendar * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Calendar_businessDaysBetween" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Calendar_businessDaysBetween" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Calendar_businessDaysBetween" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Calendar_businessDaysBetween" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    {
      try {
        result = (BigInteger)(arg1)->businessDaysBetween((Date const &)*arg2,(Date const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_long  SWIG_PERL_CALL_ARGS_1(static_cast< long >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Calendar_businessDaysBetween) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Calendar_businessDaysBetween__SWIG_2); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Calendar_businessDaysBetween__SWIG_1); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Calendar_businessDaysBetween__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'Calendar_businessDaysBetween'");
  XSRETURN(0);
}


XS(_wrap_Calendar_name) {
  {
    Calendar *arg1 = (Calendar *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Calendar_name(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Calendar, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Calendar_name" "', argument " "1"" of type '" "Calendar *""'"); 
    }
    arg1 = reinterpret_cast< Calendar * >(argp1);
    {
      try {
        result = (arg1)->name();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_Calendar) {
  {
    Calendar *arg1 = (Calendar *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Calendar(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Calendar, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Calendar" "', argument " "1"" of type '" "Calendar *""'"); 
    }
    arg1 = reinterpret_cast< Calendar * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Argentina__SWIG_0) {
  {
    QuantLib::Argentina::Market arg1 ;
    int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    QuantLib::Argentina *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Argentina(m);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Argentina" "', argument " "1"" of type '" "QuantLib::Argentina::Market""'");
    } 
    arg1 = static_cast< QuantLib::Argentina::Market >(val1);
    {
      try {
        result = (QuantLib::Argentina *)new QuantLib::Argentina(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__Argentina, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Argentina__SWIG_1) {
  {
    int argvi = 0;
    QuantLib::Argentina *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Argentina();");
    }
    {
      try {
        result = (QuantLib::Argentina *)new QuantLib::Argentina();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__Argentina, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_Argentina) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Argentina__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Argentina__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Argentina'");
  XSRETURN(0);
}


XS(_wrap_delete_Argentina) {
  {
    QuantLib::Argentina *arg1 = (QuantLib::Argentina *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Argentina(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__Argentina, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Argentina" "', argument " "1"" of type '" "QuantLib::Argentina *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::Argentina * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Australia) {
  {
    int argvi = 0;
    QuantLib::Australia *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Australia();");
    }
    {
      try {
        result = (QuantLib::Australia *)new QuantLib::Australia();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__Australia, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_Australia) {
  {
    QuantLib::Australia *arg1 = (QuantLib::Australia *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Australia(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__Australia, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Australia" "', argument " "1"" of type '" "QuantLib::Australia *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::Australia * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Brazil__SWIG_0) {
  {
    QuantLib::Brazil::Market arg1 ;
    int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    QuantLib::Brazil *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Brazil(m);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Brazil" "', argument " "1"" of type '" "QuantLib::Brazil::Market""'");
    } 
    arg1 = static_cast< QuantLib::Brazil::Market >(val1);
    {
      try {
        result = (QuantLib::Brazil *)new QuantLib::Brazil(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__Brazil, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Brazil__SWIG_1) {
  {
    int argvi = 0;
    QuantLib::Brazil *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Brazil();");
    }
    {
      try {
        result = (QuantLib::Brazil *)new QuantLib::Brazil();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__Brazil, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_Brazil) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Brazil__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Brazil__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Brazil'");
  XSRETURN(0);
}


XS(_wrap_delete_Brazil) {
  {
    QuantLib::Brazil *arg1 = (QuantLib::Brazil *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Brazil(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__Brazil, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Brazil" "', argument " "1"" of type '" "QuantLib::Brazil *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::Brazil * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Canada__SWIG_0) {
  {
    QuantLib::Canada::Market arg1 ;
    int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    QuantLib::Canada *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Canada(m);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Canada" "', argument " "1"" of type '" "QuantLib::Canada::Market""'");
    } 
    arg1 = static_cast< QuantLib::Canada::Market >(val1);
    {
      try {
        result = (QuantLib::Canada *)new QuantLib::Canada(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__Canada, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Canada__SWIG_1) {
  {
    int argvi = 0;
    QuantLib::Canada *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Canada();");
    }
    {
      try {
        result = (QuantLib::Canada *)new QuantLib::Canada();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__Canada, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_Canada) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Canada__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Canada__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Canada'");
  XSRETURN(0);
}


XS(_wrap_delete_Canada) {
  {
    QuantLib::Canada *arg1 = (QuantLib::Canada *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Canada(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__Canada, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Canada" "', argument " "1"" of type '" "QuantLib::Canada *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::Canada * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_China__SWIG_0) {
  {
    QuantLib::China::Market arg1 ;
    int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    QuantLib::China *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_China(m);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_China" "', argument " "1"" of type '" "QuantLib::China::Market""'");
    } 
    arg1 = static_cast< QuantLib::China::Market >(val1);
    {
      try {
        result = (QuantLib::China *)new QuantLib::China(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__China, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_China__SWIG_1) {
  {
    int argvi = 0;
    QuantLib::China *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_China();");
    }
    {
      try {
        result = (QuantLib::China *)new QuantLib::China();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__China, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_China) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_China__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_China__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_China'");
  XSRETURN(0);
}


XS(_wrap_delete_China) {
  {
    QuantLib::China *arg1 = (QuantLib::China *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_China(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__China, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_China" "', argument " "1"" of type '" "QuantLib::China *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::China * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CzechRepublic__SWIG_0) {
  {
    QuantLib::CzechRepublic::Market arg1 ;
    int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    QuantLib::CzechRepublic *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_CzechRepublic(m);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_CzechRepublic" "', argument " "1"" of type '" "QuantLib::CzechRepublic::Market""'");
    } 
    arg1 = static_cast< QuantLib::CzechRepublic::Market >(val1);
    {
      try {
        result = (QuantLib::CzechRepublic *)new QuantLib::CzechRepublic(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__CzechRepublic, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CzechRepublic__SWIG_1) {
  {
    int argvi = 0;
    QuantLib::CzechRepublic *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_CzechRepublic();");
    }
    {
      try {
        result = (QuantLib::CzechRepublic *)new QuantLib::CzechRepublic();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__CzechRepublic, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_CzechRepublic) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_CzechRepublic__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_CzechRepublic__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_CzechRepublic'");
  XSRETURN(0);
}


XS(_wrap_delete_CzechRepublic) {
  {
    QuantLib::CzechRepublic *arg1 = (QuantLib::CzechRepublic *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_CzechRepublic(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__CzechRepublic, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CzechRepublic" "', argument " "1"" of type '" "QuantLib::CzechRepublic *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::CzechRepublic * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Denmark) {
  {
    int argvi = 0;
    QuantLib::Denmark *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Denmark();");
    }
    {
      try {
        result = (QuantLib::Denmark *)new QuantLib::Denmark();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__Denmark, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_Denmark) {
  {
    QuantLib::Denmark *arg1 = (QuantLib::Denmark *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Denmark(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__Denmark, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Denmark" "', argument " "1"" of type '" "QuantLib::Denmark *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::Denmark * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Finland) {
  {
    int argvi = 0;
    QuantLib::Finland *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Finland();");
    }
    {
      try {
        result = (QuantLib::Finland *)new QuantLib::Finland();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__Finland, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_Finland) {
  {
    QuantLib::Finland *arg1 = (QuantLib::Finland *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Finland(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__Finland, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Finland" "', argument " "1"" of type '" "QuantLib::Finland *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::Finland * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Germany__SWIG_0) {
  {
    QuantLib::Germany::Market arg1 ;
    int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    QuantLib::Germany *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Germany(m);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Germany" "', argument " "1"" of type '" "QuantLib::Germany::Market""'");
    } 
    arg1 = static_cast< QuantLib::Germany::Market >(val1);
    {
      try {
        result = (QuantLib::Germany *)new QuantLib::Germany(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__Germany, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Germany__SWIG_1) {
  {
    int argvi = 0;
    QuantLib::Germany *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Germany();");
    }
    {
      try {
        result = (QuantLib::Germany *)new QuantLib::Germany();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__Germany, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_Germany) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Germany__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Germany__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Germany'");
  XSRETURN(0);
}


XS(_wrap_delete_Germany) {
  {
    QuantLib::Germany *arg1 = (QuantLib::Germany *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Germany(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__Germany, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Germany" "', argument " "1"" of type '" "QuantLib::Germany *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::Germany * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_HongKong__SWIG_0) {
  {
    QuantLib::HongKong::Market arg1 ;
    int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    QuantLib::HongKong *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_HongKong(m);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_HongKong" "', argument " "1"" of type '" "QuantLib::HongKong::Market""'");
    } 
    arg1 = static_cast< QuantLib::HongKong::Market >(val1);
    {
      try {
        result = (QuantLib::HongKong *)new QuantLib::HongKong(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__HongKong, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_HongKong__SWIG_1) {
  {
    int argvi = 0;
    QuantLib::HongKong *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_HongKong();");
    }
    {
      try {
        result = (QuantLib::HongKong *)new QuantLib::HongKong();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__HongKong, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_HongKong) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_HongKong__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_HongKong__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_HongKong'");
  XSRETURN(0);
}


XS(_wrap_delete_HongKong) {
  {
    QuantLib::HongKong *arg1 = (QuantLib::HongKong *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_HongKong(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__HongKong, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_HongKong" "', argument " "1"" of type '" "QuantLib::HongKong *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::HongKong * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Hungary) {
  {
    int argvi = 0;
    QuantLib::Hungary *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Hungary();");
    }
    {
      try {
        result = (QuantLib::Hungary *)new QuantLib::Hungary();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__Hungary, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_Hungary) {
  {
    QuantLib::Hungary *arg1 = (QuantLib::Hungary *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Hungary(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__Hungary, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Hungary" "', argument " "1"" of type '" "QuantLib::Hungary *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::Hungary * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Iceland__SWIG_0) {
  {
    QuantLib::Iceland::Market arg1 ;
    int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    QuantLib::Iceland *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Iceland(m);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Iceland" "', argument " "1"" of type '" "QuantLib::Iceland::Market""'");
    } 
    arg1 = static_cast< QuantLib::Iceland::Market >(val1);
    {
      try {
        result = (QuantLib::Iceland *)new QuantLib::Iceland(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__Iceland, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Iceland__SWIG_1) {
  {
    int argvi = 0;
    QuantLib::Iceland *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Iceland();");
    }
    {
      try {
        result = (QuantLib::Iceland *)new QuantLib::Iceland();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__Iceland, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_Iceland) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Iceland__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Iceland__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Iceland'");
  XSRETURN(0);
}


XS(_wrap_delete_Iceland) {
  {
    QuantLib::Iceland *arg1 = (QuantLib::Iceland *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Iceland(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__Iceland, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Iceland" "', argument " "1"" of type '" "QuantLib::Iceland *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::Iceland * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_India__SWIG_0) {
  {
    QuantLib::India::Market arg1 ;
    int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    QuantLib::India *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_India(m);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_India" "', argument " "1"" of type '" "QuantLib::India::Market""'");
    } 
    arg1 = static_cast< QuantLib::India::Market >(val1);
    {
      try {
        result = (QuantLib::India *)new QuantLib::India(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__India, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_India__SWIG_1) {
  {
    int argvi = 0;
    QuantLib::India *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_India();");
    }
    {
      try {
        result = (QuantLib::India *)new QuantLib::India();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__India, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_India) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_India__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_India__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_India'");
  XSRETURN(0);
}


XS(_wrap_delete_India) {
  {
    QuantLib::India *arg1 = (QuantLib::India *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_India(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__India, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_India" "', argument " "1"" of type '" "QuantLib::India *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::India * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Indonesia__SWIG_0) {
  {
    QuantLib::Indonesia::Market arg1 ;
    int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    QuantLib::Indonesia *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Indonesia(m);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Indonesia" "', argument " "1"" of type '" "QuantLib::Indonesia::Market""'");
    } 
    arg1 = static_cast< QuantLib::Indonesia::Market >(val1);
    {
      try {
        result = (QuantLib::Indonesia *)new QuantLib::Indonesia(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__Indonesia, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Indonesia__SWIG_1) {
  {
    int argvi = 0;
    QuantLib::Indonesia *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Indonesia();");
    }
    {
      try {
        result = (QuantLib::Indonesia *)new QuantLib::Indonesia();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__Indonesia, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_Indonesia) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Indonesia__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Indonesia__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Indonesia'");
  XSRETURN(0);
}


XS(_wrap_delete_Indonesia) {
  {
    QuantLib::Indonesia *arg1 = (QuantLib::Indonesia *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Indonesia(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__Indonesia, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Indonesia" "', argument " "1"" of type '" "QuantLib::Indonesia *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::Indonesia * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Israel__SWIG_0) {
  {
    QuantLib::Israel::Market arg1 ;
    int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    QuantLib::Israel *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Israel(m);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Israel" "', argument " "1"" of type '" "QuantLib::Israel::Market""'");
    } 
    arg1 = static_cast< QuantLib::Israel::Market >(val1);
    {
      try {
        result = (QuantLib::Israel *)new QuantLib::Israel(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__Israel, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Israel__SWIG_1) {
  {
    int argvi = 0;
    QuantLib::Israel *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Israel();");
    }
    {
      try {
        result = (QuantLib::Israel *)new QuantLib::Israel();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__Israel, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_Israel) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Israel__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Israel__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Israel'");
  XSRETURN(0);
}


XS(_wrap_delete_Israel) {
  {
    QuantLib::Israel *arg1 = (QuantLib::Israel *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Israel(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__Israel, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Israel" "', argument " "1"" of type '" "QuantLib::Israel *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::Israel * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Italy__SWIG_0) {
  {
    QuantLib::Italy::Market arg1 ;
    int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    QuantLib::Italy *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Italy(m);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Italy" "', argument " "1"" of type '" "QuantLib::Italy::Market""'");
    } 
    arg1 = static_cast< QuantLib::Italy::Market >(val1);
    {
      try {
        result = (QuantLib::Italy *)new QuantLib::Italy(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__Italy, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Italy__SWIG_1) {
  {
    int argvi = 0;
    QuantLib::Italy *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Italy();");
    }
    {
      try {
        result = (QuantLib::Italy *)new QuantLib::Italy();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__Italy, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_Italy) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Italy__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Italy__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Italy'");
  XSRETURN(0);
}


XS(_wrap_delete_Italy) {
  {
    QuantLib::Italy *arg1 = (QuantLib::Italy *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Italy(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__Italy, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Italy" "', argument " "1"" of type '" "QuantLib::Italy *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::Italy * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Japan) {
  {
    int argvi = 0;
    QuantLib::Japan *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Japan();");
    }
    {
      try {
        result = (QuantLib::Japan *)new QuantLib::Japan();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__Japan, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_Japan) {
  {
    QuantLib::Japan *arg1 = (QuantLib::Japan *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Japan(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__Japan, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Japan" "', argument " "1"" of type '" "QuantLib::Japan *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::Japan * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Mexico__SWIG_0) {
  {
    QuantLib::Mexico::Market arg1 ;
    int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    QuantLib::Mexico *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Mexico(m);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Mexico" "', argument " "1"" of type '" "QuantLib::Mexico::Market""'");
    } 
    arg1 = static_cast< QuantLib::Mexico::Market >(val1);
    {
      try {
        result = (QuantLib::Mexico *)new QuantLib::Mexico(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__Mexico, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Mexico__SWIG_1) {
  {
    int argvi = 0;
    QuantLib::Mexico *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Mexico();");
    }
    {
      try {
        result = (QuantLib::Mexico *)new QuantLib::Mexico();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__Mexico, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_Mexico) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Mexico__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Mexico__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Mexico'");
  XSRETURN(0);
}


XS(_wrap_delete_Mexico) {
  {
    QuantLib::Mexico *arg1 = (QuantLib::Mexico *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Mexico(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__Mexico, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Mexico" "', argument " "1"" of type '" "QuantLib::Mexico *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::Mexico * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_NewZealand) {
  {
    int argvi = 0;
    QuantLib::NewZealand *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_NewZealand();");
    }
    {
      try {
        result = (QuantLib::NewZealand *)new QuantLib::NewZealand();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__NewZealand, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_NewZealand) {
  {
    QuantLib::NewZealand *arg1 = (QuantLib::NewZealand *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_NewZealand(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__NewZealand, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_NewZealand" "', argument " "1"" of type '" "QuantLib::NewZealand *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::NewZealand * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Norway) {
  {
    int argvi = 0;
    QuantLib::Norway *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Norway();");
    }
    {
      try {
        result = (QuantLib::Norway *)new QuantLib::Norway();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__Norway, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_Norway) {
  {
    QuantLib::Norway *arg1 = (QuantLib::Norway *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Norway(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__Norway, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Norway" "', argument " "1"" of type '" "QuantLib::Norway *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::Norway * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Poland) {
  {
    int argvi = 0;
    QuantLib::Poland *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Poland();");
    }
    {
      try {
        result = (QuantLib::Poland *)new QuantLib::Poland();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__Poland, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_Poland) {
  {
    QuantLib::Poland *arg1 = (QuantLib::Poland *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Poland(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__Poland, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Poland" "', argument " "1"" of type '" "QuantLib::Poland *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::Poland * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Russia__SWIG_0) {
  {
    QuantLib::Russia::Market arg1 ;
    int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    QuantLib::Russia *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Russia(m);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Russia" "', argument " "1"" of type '" "QuantLib::Russia::Market""'");
    } 
    arg1 = static_cast< QuantLib::Russia::Market >(val1);
    {
      try {
        result = (QuantLib::Russia *)new QuantLib::Russia(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__Russia, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Russia__SWIG_1) {
  {
    int argvi = 0;
    QuantLib::Russia *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Russia();");
    }
    {
      try {
        result = (QuantLib::Russia *)new QuantLib::Russia();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__Russia, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_Russia) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Russia__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Russia__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Russia'");
  XSRETURN(0);
}


XS(_wrap_delete_Russia) {
  {
    QuantLib::Russia *arg1 = (QuantLib::Russia *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Russia(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__Russia, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Russia" "', argument " "1"" of type '" "QuantLib::Russia *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::Russia * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Romania) {
  {
    int argvi = 0;
    QuantLib::Romania *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Romania();");
    }
    {
      try {
        result = (QuantLib::Romania *)new QuantLib::Romania();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__Romania, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_Romania) {
  {
    QuantLib::Romania *arg1 = (QuantLib::Romania *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Romania(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__Romania, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Romania" "', argument " "1"" of type '" "QuantLib::Romania *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::Romania * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SaudiArabia__SWIG_0) {
  {
    QuantLib::SaudiArabia::Market arg1 ;
    int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    QuantLib::SaudiArabia *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_SaudiArabia(m);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_SaudiArabia" "', argument " "1"" of type '" "QuantLib::SaudiArabia::Market""'");
    } 
    arg1 = static_cast< QuantLib::SaudiArabia::Market >(val1);
    {
      try {
        result = (QuantLib::SaudiArabia *)new QuantLib::SaudiArabia(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__SaudiArabia, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SaudiArabia__SWIG_1) {
  {
    int argvi = 0;
    QuantLib::SaudiArabia *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_SaudiArabia();");
    }
    {
      try {
        result = (QuantLib::SaudiArabia *)new QuantLib::SaudiArabia();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__SaudiArabia, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_SaudiArabia) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SaudiArabia__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SaudiArabia__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_SaudiArabia'");
  XSRETURN(0);
}


XS(_wrap_delete_SaudiArabia) {
  {
    QuantLib::SaudiArabia *arg1 = (QuantLib::SaudiArabia *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_SaudiArabia(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__SaudiArabia, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SaudiArabia" "', argument " "1"" of type '" "QuantLib::SaudiArabia *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::SaudiArabia * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Singapore__SWIG_0) {
  {
    QuantLib::Singapore::Market arg1 ;
    int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    QuantLib::Singapore *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Singapore(m);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Singapore" "', argument " "1"" of type '" "QuantLib::Singapore::Market""'");
    } 
    arg1 = static_cast< QuantLib::Singapore::Market >(val1);
    {
      try {
        result = (QuantLib::Singapore *)new QuantLib::Singapore(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__Singapore, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Singapore__SWIG_1) {
  {
    int argvi = 0;
    QuantLib::Singapore *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Singapore();");
    }
    {
      try {
        result = (QuantLib::Singapore *)new QuantLib::Singapore();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__Singapore, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_Singapore) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Singapore__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Singapore__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Singapore'");
  XSRETURN(0);
}


XS(_wrap_delete_Singapore) {
  {
    QuantLib::Singapore *arg1 = (QuantLib::Singapore *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Singapore(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__Singapore, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Singapore" "', argument " "1"" of type '" "QuantLib::Singapore *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::Singapore * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Slovakia__SWIG_0) {
  {
    QuantLib::Slovakia::Market arg1 ;
    int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    QuantLib::Slovakia *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Slovakia(m);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Slovakia" "', argument " "1"" of type '" "QuantLib::Slovakia::Market""'");
    } 
    arg1 = static_cast< QuantLib::Slovakia::Market >(val1);
    {
      try {
        result = (QuantLib::Slovakia *)new QuantLib::Slovakia(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__Slovakia, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Slovakia__SWIG_1) {
  {
    int argvi = 0;
    QuantLib::Slovakia *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Slovakia();");
    }
    {
      try {
        result = (QuantLib::Slovakia *)new QuantLib::Slovakia();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__Slovakia, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_Slovakia) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Slovakia__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Slovakia__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Slovakia'");
  XSRETURN(0);
}


XS(_wrap_delete_Slovakia) {
  {
    QuantLib::Slovakia *arg1 = (QuantLib::Slovakia *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Slovakia(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__Slovakia, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Slovakia" "', argument " "1"" of type '" "QuantLib::Slovakia *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::Slovakia * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SouthAfrica) {
  {
    int argvi = 0;
    QuantLib::SouthAfrica *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_SouthAfrica();");
    }
    {
      try {
        result = (QuantLib::SouthAfrica *)new QuantLib::SouthAfrica();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__SouthAfrica, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_SouthAfrica) {
  {
    QuantLib::SouthAfrica *arg1 = (QuantLib::SouthAfrica *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_SouthAfrica(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__SouthAfrica, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SouthAfrica" "', argument " "1"" of type '" "QuantLib::SouthAfrica *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::SouthAfrica * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SouthKorea__SWIG_0) {
  {
    QuantLib::SouthKorea::Market arg1 ;
    int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    QuantLib::SouthKorea *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_SouthKorea(m);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_SouthKorea" "', argument " "1"" of type '" "QuantLib::SouthKorea::Market""'");
    } 
    arg1 = static_cast< QuantLib::SouthKorea::Market >(val1);
    {
      try {
        result = (QuantLib::SouthKorea *)new QuantLib::SouthKorea(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__SouthKorea, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SouthKorea__SWIG_1) {
  {
    int argvi = 0;
    QuantLib::SouthKorea *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_SouthKorea();");
    }
    {
      try {
        result = (QuantLib::SouthKorea *)new QuantLib::SouthKorea();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__SouthKorea, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_SouthKorea) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SouthKorea__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SouthKorea__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_SouthKorea'");
  XSRETURN(0);
}


XS(_wrap_delete_SouthKorea) {
  {
    QuantLib::SouthKorea *arg1 = (QuantLib::SouthKorea *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_SouthKorea(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__SouthKorea, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SouthKorea" "', argument " "1"" of type '" "QuantLib::SouthKorea *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::SouthKorea * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Sweden) {
  {
    int argvi = 0;
    QuantLib::Sweden *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Sweden();");
    }
    {
      try {
        result = (QuantLib::Sweden *)new QuantLib::Sweden();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__Sweden, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_Sweden) {
  {
    QuantLib::Sweden *arg1 = (QuantLib::Sweden *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Sweden(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__Sweden, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Sweden" "', argument " "1"" of type '" "QuantLib::Sweden *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::Sweden * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Switzerland) {
  {
    int argvi = 0;
    QuantLib::Switzerland *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Switzerland();");
    }
    {
      try {
        result = (QuantLib::Switzerland *)new QuantLib::Switzerland();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__Switzerland, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_Switzerland) {
  {
    QuantLib::Switzerland *arg1 = (QuantLib::Switzerland *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Switzerland(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__Switzerland, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Switzerland" "', argument " "1"" of type '" "QuantLib::Switzerland *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::Switzerland * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Taiwan__SWIG_0) {
  {
    QuantLib::Taiwan::Market arg1 ;
    int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    QuantLib::Taiwan *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Taiwan(m);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Taiwan" "', argument " "1"" of type '" "QuantLib::Taiwan::Market""'");
    } 
    arg1 = static_cast< QuantLib::Taiwan::Market >(val1);
    {
      try {
        result = (QuantLib::Taiwan *)new QuantLib::Taiwan(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__Taiwan, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Taiwan__SWIG_1) {
  {
    int argvi = 0;
    QuantLib::Taiwan *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Taiwan();");
    }
    {
      try {
        result = (QuantLib::Taiwan *)new QuantLib::Taiwan();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__Taiwan, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_Taiwan) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Taiwan__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Taiwan__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Taiwan'");
  XSRETURN(0);
}


XS(_wrap_delete_Taiwan) {
  {
    QuantLib::Taiwan *arg1 = (QuantLib::Taiwan *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Taiwan(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__Taiwan, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Taiwan" "', argument " "1"" of type '" "QuantLib::Taiwan *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::Taiwan * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_TARGET) {
  {
    int argvi = 0;
    QuantLib::TARGET *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_TARGET();");
    }
    {
      try {
        result = (QuantLib::TARGET *)new QuantLib::TARGET();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__TARGET, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_TARGET) {
  {
    QuantLib::TARGET *arg1 = (QuantLib::TARGET *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_TARGET(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__TARGET, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_TARGET" "', argument " "1"" of type '" "QuantLib::TARGET *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::TARGET * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Turkey) {
  {
    int argvi = 0;
    QuantLib::Turkey *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Turkey();");
    }
    {
      try {
        result = (QuantLib::Turkey *)new QuantLib::Turkey();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__Turkey, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_Turkey) {
  {
    QuantLib::Turkey *arg1 = (QuantLib::Turkey *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Turkey(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__Turkey, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Turkey" "', argument " "1"" of type '" "QuantLib::Turkey *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::Turkey * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Ukraine__SWIG_0) {
  {
    QuantLib::Ukraine::Market arg1 ;
    int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    QuantLib::Ukraine *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Ukraine(m);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Ukraine" "', argument " "1"" of type '" "QuantLib::Ukraine::Market""'");
    } 
    arg1 = static_cast< QuantLib::Ukraine::Market >(val1);
    {
      try {
        result = (QuantLib::Ukraine *)new QuantLib::Ukraine(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__Ukraine, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Ukraine__SWIG_1) {
  {
    int argvi = 0;
    QuantLib::Ukraine *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Ukraine();");
    }
    {
      try {
        result = (QuantLib::Ukraine *)new QuantLib::Ukraine();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__Ukraine, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_Ukraine) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Ukraine__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Ukraine__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Ukraine'");
  XSRETURN(0);
}


XS(_wrap_delete_Ukraine) {
  {
    QuantLib::Ukraine *arg1 = (QuantLib::Ukraine *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Ukraine(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__Ukraine, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Ukraine" "', argument " "1"" of type '" "QuantLib::Ukraine *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::Ukraine * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_UnitedKingdom__SWIG_0) {
  {
    QuantLib::UnitedKingdom::Market arg1 ;
    int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    QuantLib::UnitedKingdom *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_UnitedKingdom(m);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_UnitedKingdom" "', argument " "1"" of type '" "QuantLib::UnitedKingdom::Market""'");
    } 
    arg1 = static_cast< QuantLib::UnitedKingdom::Market >(val1);
    {
      try {
        result = (QuantLib::UnitedKingdom *)new QuantLib::UnitedKingdom(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__UnitedKingdom, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_UnitedKingdom__SWIG_1) {
  {
    int argvi = 0;
    QuantLib::UnitedKingdom *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_UnitedKingdom();");
    }
    {
      try {
        result = (QuantLib::UnitedKingdom *)new QuantLib::UnitedKingdom();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__UnitedKingdom, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_UnitedKingdom) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_UnitedKingdom__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_UnitedKingdom__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_UnitedKingdom'");
  XSRETURN(0);
}


XS(_wrap_delete_UnitedKingdom) {
  {
    QuantLib::UnitedKingdom *arg1 = (QuantLib::UnitedKingdom *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_UnitedKingdom(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__UnitedKingdom, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnitedKingdom" "', argument " "1"" of type '" "QuantLib::UnitedKingdom *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::UnitedKingdom * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_UnitedStates__SWIG_0) {
  {
    QuantLib::UnitedStates::Market arg1 ;
    int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    QuantLib::UnitedStates *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_UnitedStates(m);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_UnitedStates" "', argument " "1"" of type '" "QuantLib::UnitedStates::Market""'");
    } 
    arg1 = static_cast< QuantLib::UnitedStates::Market >(val1);
    {
      try {
        result = (QuantLib::UnitedStates *)new QuantLib::UnitedStates(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__UnitedStates, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_UnitedStates__SWIG_1) {
  {
    int argvi = 0;
    QuantLib::UnitedStates *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_UnitedStates();");
    }
    {
      try {
        result = (QuantLib::UnitedStates *)new QuantLib::UnitedStates();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__UnitedStates, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_UnitedStates) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_UnitedStates__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_UnitedStates__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_UnitedStates'");
  XSRETURN(0);
}


XS(_wrap_delete_UnitedStates) {
  {
    QuantLib::UnitedStates *arg1 = (QuantLib::UnitedStates *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_UnitedStates(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__UnitedStates, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnitedStates" "', argument " "1"" of type '" "QuantLib::UnitedStates *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::UnitedStates * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_NullCalendar) {
  {
    int argvi = 0;
    QuantLib::NullCalendar *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_NullCalendar();");
    }
    {
      try {
        result = (QuantLib::NullCalendar *)new QuantLib::NullCalendar();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__NullCalendar, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_NullCalendar) {
  {
    QuantLib::NullCalendar *arg1 = (QuantLib::NullCalendar *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_NullCalendar(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__NullCalendar, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_NullCalendar" "', argument " "1"" of type '" "QuantLib::NullCalendar *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::NullCalendar * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_WeekendsOnly) {
  {
    int argvi = 0;
    QuantLib::WeekendsOnly *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_WeekendsOnly();");
    }
    {
      try {
        result = (QuantLib::WeekendsOnly *)new QuantLib::WeekendsOnly();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__WeekendsOnly, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_WeekendsOnly) {
  {
    QuantLib::WeekendsOnly *arg1 = (QuantLib::WeekendsOnly *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_WeekendsOnly(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__WeekendsOnly, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_WeekendsOnly" "', argument " "1"" of type '" "QuantLib::WeekendsOnly *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::WeekendsOnly * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_JointCalendar__SWIG_0) {
  {
    Calendar *arg1 = 0 ;
    Calendar *arg2 = 0 ;
    JointCalendarRule arg3 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    QuantLib::JointCalendar *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_JointCalendar(Calendar const &,Calendar const &,rule);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_JointCalendar" "', argument " "1"" of type '" "Calendar const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_JointCalendar" "', argument " "1"" of type '" "Calendar const &""'"); 
    }
    arg1 = reinterpret_cast< Calendar * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_JointCalendar" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_JointCalendar" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_JointCalendar" "', argument " "3"" of type '" "JointCalendarRule""'");
    } 
    arg3 = static_cast< JointCalendarRule >(val3);
    {
      try {
        result = (QuantLib::JointCalendar *)new QuantLib::JointCalendar((Calendar const &)*arg1,(Calendar const &)*arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__JointCalendar, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_JointCalendar__SWIG_1) {
  {
    Calendar *arg1 = 0 ;
    Calendar *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    QuantLib::JointCalendar *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_JointCalendar(Calendar const &,Calendar const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_JointCalendar" "', argument " "1"" of type '" "Calendar const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_JointCalendar" "', argument " "1"" of type '" "Calendar const &""'"); 
    }
    arg1 = reinterpret_cast< Calendar * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_JointCalendar" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_JointCalendar" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    {
      try {
        result = (QuantLib::JointCalendar *)new QuantLib::JointCalendar((Calendar const &)*arg1,(Calendar const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__JointCalendar, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_JointCalendar__SWIG_2) {
  {
    Calendar *arg1 = 0 ;
    Calendar *arg2 = 0 ;
    Calendar *arg3 = 0 ;
    JointCalendarRule arg4 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    QuantLib::JointCalendar *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_JointCalendar(Calendar const &,Calendar const &,Calendar const &,rule);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_JointCalendar" "', argument " "1"" of type '" "Calendar const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_JointCalendar" "', argument " "1"" of type '" "Calendar const &""'"); 
    }
    arg1 = reinterpret_cast< Calendar * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_JointCalendar" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_JointCalendar" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_JointCalendar" "', argument " "3"" of type '" "Calendar const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_JointCalendar" "', argument " "3"" of type '" "Calendar const &""'"); 
    }
    arg3 = reinterpret_cast< Calendar * >(argp3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_JointCalendar" "', argument " "4"" of type '" "JointCalendarRule""'");
    } 
    arg4 = static_cast< JointCalendarRule >(val4);
    {
      try {
        result = (QuantLib::JointCalendar *)new QuantLib::JointCalendar((Calendar const &)*arg1,(Calendar const &)*arg2,(Calendar const &)*arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__JointCalendar, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_JointCalendar__SWIG_3) {
  {
    Calendar *arg1 = 0 ;
    Calendar *arg2 = 0 ;
    Calendar *arg3 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    QuantLib::JointCalendar *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_JointCalendar(Calendar const &,Calendar const &,Calendar const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_JointCalendar" "', argument " "1"" of type '" "Calendar const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_JointCalendar" "', argument " "1"" of type '" "Calendar const &""'"); 
    }
    arg1 = reinterpret_cast< Calendar * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_JointCalendar" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_JointCalendar" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_JointCalendar" "', argument " "3"" of type '" "Calendar const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_JointCalendar" "', argument " "3"" of type '" "Calendar const &""'"); 
    }
    arg3 = reinterpret_cast< Calendar * >(argp3);
    {
      try {
        result = (QuantLib::JointCalendar *)new QuantLib::JointCalendar((Calendar const &)*arg1,(Calendar const &)*arg2,(Calendar const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__JointCalendar, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_JointCalendar__SWIG_4) {
  {
    Calendar *arg1 = 0 ;
    Calendar *arg2 = 0 ;
    Calendar *arg3 = 0 ;
    Calendar *arg4 = 0 ;
    JointCalendarRule arg5 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    QuantLib::JointCalendar *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_JointCalendar(Calendar const &,Calendar const &,Calendar const &,Calendar const &,rule);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_JointCalendar" "', argument " "1"" of type '" "Calendar const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_JointCalendar" "', argument " "1"" of type '" "Calendar const &""'"); 
    }
    arg1 = reinterpret_cast< Calendar * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_JointCalendar" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_JointCalendar" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_JointCalendar" "', argument " "3"" of type '" "Calendar const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_JointCalendar" "', argument " "3"" of type '" "Calendar const &""'"); 
    }
    arg3 = reinterpret_cast< Calendar * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_JointCalendar" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_JointCalendar" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    arg4 = reinterpret_cast< Calendar * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_JointCalendar" "', argument " "5"" of type '" "JointCalendarRule""'");
    } 
    arg5 = static_cast< JointCalendarRule >(val5);
    {
      try {
        result = (QuantLib::JointCalendar *)new QuantLib::JointCalendar((Calendar const &)*arg1,(Calendar const &)*arg2,(Calendar const &)*arg3,(Calendar const &)*arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__JointCalendar, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_JointCalendar__SWIG_5) {
  {
    Calendar *arg1 = 0 ;
    Calendar *arg2 = 0 ;
    Calendar *arg3 = 0 ;
    Calendar *arg4 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int argvi = 0;
    QuantLib::JointCalendar *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_JointCalendar(Calendar const &,Calendar const &,Calendar const &,Calendar const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_JointCalendar" "', argument " "1"" of type '" "Calendar const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_JointCalendar" "', argument " "1"" of type '" "Calendar const &""'"); 
    }
    arg1 = reinterpret_cast< Calendar * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_JointCalendar" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_JointCalendar" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_JointCalendar" "', argument " "3"" of type '" "Calendar const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_JointCalendar" "', argument " "3"" of type '" "Calendar const &""'"); 
    }
    arg3 = reinterpret_cast< Calendar * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_JointCalendar" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_JointCalendar" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    arg4 = reinterpret_cast< Calendar * >(argp4);
    {
      try {
        result = (QuantLib::JointCalendar *)new QuantLib::JointCalendar((Calendar const &)*arg1,(Calendar const &)*arg2,(Calendar const &)*arg3,(Calendar const &)*arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__JointCalendar, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_JointCalendar) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_JointCalendar__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_JointCalendar__SWIG_3); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_JointCalendar__SWIG_0); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_JointCalendar__SWIG_5); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_JointCalendar__SWIG_2); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_JointCalendar__SWIG_4); return;
    }
  }
  
  croak("No matching function for overloaded 'new_JointCalendar'");
  XSRETURN(0);
}


XS(_wrap_delete_JointCalendar) {
  {
    QuantLib::JointCalendar *arg1 = (QuantLib::JointCalendar *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_JointCalendar(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__JointCalendar, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_JointCalendar" "', argument " "1"" of type '" "QuantLib::JointCalendar *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::JointCalendar * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BespokeCalendar) {
  {
    std::string *arg1 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    int argvi = 0;
    QuantLib::BespokeCalendar *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_BespokeCalendar(name);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_BespokeCalendar" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BespokeCalendar" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      try {
        result = (QuantLib::BespokeCalendar *)new QuantLib::BespokeCalendar((std::string const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__BespokeCalendar, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    SWIG_croak_null();
  }
}


XS(_wrap_BespokeCalendar_addWeekend) {
  {
    QuantLib::BespokeCalendar *arg1 = (QuantLib::BespokeCalendar *) 0 ;
    Weekday arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: BespokeCalendar_addWeekend(self,Weekday);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__BespokeCalendar, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BespokeCalendar_addWeekend" "', argument " "1"" of type '" "QuantLib::BespokeCalendar *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::BespokeCalendar * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BespokeCalendar_addWeekend" "', argument " "2"" of type '" "Weekday""'");
    } 
    arg2 = static_cast< Weekday >(val2);
    {
      try {
        (arg1)->addWeekend(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_BespokeCalendar) {
  {
    QuantLib::BespokeCalendar *arg1 = (QuantLib::BespokeCalendar *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_BespokeCalendar(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__BespokeCalendar, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_BespokeCalendar" "', argument " "1"" of type '" "QuantLib::BespokeCalendar *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::BespokeCalendar * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_nullInt) {
  {
    int argvi = 0;
    int result;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: nullInt();");
    }
    {
      try {
        result = (int)nullInt();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_nullDouble) {
  {
    int argvi = 0;
    double result;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: nullDouble();");
    }
    {
      try {
        result = (double)nullDouble();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_DayCounter_dayCount) {
  {
    DayCounter *arg1 = (DayCounter *) 0 ;
    Date *arg2 = 0 ;
    Date *arg3 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    BigInteger result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: DayCounter_dayCount(self,d1,d2);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_DayCounter, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DayCounter_dayCount" "', argument " "1"" of type '" "DayCounter const *""'"); 
    }
    arg1 = reinterpret_cast< DayCounter * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DayCounter_dayCount" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DayCounter_dayCount" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "DayCounter_dayCount" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DayCounter_dayCount" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    {
      try {
        result = (BigInteger)((DayCounter const *)arg1)->dayCount((Date const &)*arg2,(Date const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_long  SWIG_PERL_CALL_ARGS_1(static_cast< long >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_DayCounter_yearFraction__SWIG_0) {
  {
    DayCounter *arg1 = (DayCounter *) 0 ;
    Date *arg2 = 0 ;
    Date *arg3 = 0 ;
    Date *arg4 = 0 ;
    Date *arg5 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int argvi = 0;
    Time result;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: DayCounter_yearFraction(self,d1,d2,startRef,endRef);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_DayCounter, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DayCounter_yearFraction" "', argument " "1"" of type '" "DayCounter const *""'"); 
    }
    arg1 = reinterpret_cast< DayCounter * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DayCounter_yearFraction" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DayCounter_yearFraction" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "DayCounter_yearFraction" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DayCounter_yearFraction" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "DayCounter_yearFraction" "', argument " "4"" of type '" "Date const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DayCounter_yearFraction" "', argument " "4"" of type '" "Date const &""'"); 
    }
    arg4 = reinterpret_cast< Date * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "DayCounter_yearFraction" "', argument " "5"" of type '" "Date const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DayCounter_yearFraction" "', argument " "5"" of type '" "Date const &""'"); 
    }
    arg5 = reinterpret_cast< Date * >(argp5);
    {
      try {
        result = (Time)((DayCounter const *)arg1)->yearFraction((Date const &)*arg2,(Date const &)*arg3,(Date const &)*arg4,(Date const &)*arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_DayCounter_yearFraction__SWIG_1) {
  {
    DayCounter *arg1 = (DayCounter *) 0 ;
    Date *arg2 = 0 ;
    Date *arg3 = 0 ;
    Date *arg4 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int argvi = 0;
    Time result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: DayCounter_yearFraction(self,d1,d2,startRef);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_DayCounter, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DayCounter_yearFraction" "', argument " "1"" of type '" "DayCounter const *""'"); 
    }
    arg1 = reinterpret_cast< DayCounter * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DayCounter_yearFraction" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DayCounter_yearFraction" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "DayCounter_yearFraction" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DayCounter_yearFraction" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "DayCounter_yearFraction" "', argument " "4"" of type '" "Date const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DayCounter_yearFraction" "', argument " "4"" of type '" "Date const &""'"); 
    }
    arg4 = reinterpret_cast< Date * >(argp4);
    {
      try {
        result = (Time)((DayCounter const *)arg1)->yearFraction((Date const &)*arg2,(Date const &)*arg3,(Date const &)*arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_DayCounter_yearFraction__SWIG_2) {
  {
    DayCounter *arg1 = (DayCounter *) 0 ;
    Date *arg2 = 0 ;
    Date *arg3 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    Time result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: DayCounter_yearFraction(self,d1,d2);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_DayCounter, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DayCounter_yearFraction" "', argument " "1"" of type '" "DayCounter const *""'"); 
    }
    arg1 = reinterpret_cast< DayCounter * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DayCounter_yearFraction" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DayCounter_yearFraction" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "DayCounter_yearFraction" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DayCounter_yearFraction" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    {
      try {
        result = (Time)((DayCounter const *)arg1)->yearFraction((Date const &)*arg2,(Date const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_DayCounter_yearFraction) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_DayCounter_yearFraction__SWIG_2); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_DayCounter_yearFraction__SWIG_1); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_DayCounter_yearFraction__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'DayCounter_yearFraction'");
  XSRETURN(0);
}


XS(_wrap_DayCounter_name) {
  {
    DayCounter *arg1 = (DayCounter *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DayCounter_name(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_DayCounter, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DayCounter_name" "', argument " "1"" of type '" "DayCounter const *""'"); 
    }
    arg1 = reinterpret_cast< DayCounter * >(argp1);
    {
      try {
        result = ((DayCounter const *)arg1)->name();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_DayCounter) {
  {
    DayCounter *arg1 = (DayCounter *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_DayCounter(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_DayCounter, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DayCounter" "', argument " "1"" of type '" "DayCounter *""'"); 
    }
    arg1 = reinterpret_cast< DayCounter * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Actual360) {
  {
    int argvi = 0;
    QuantLib::Actual360 *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Actual360();");
    }
    {
      try {
        result = (QuantLib::Actual360 *)new QuantLib::Actual360();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__Actual360, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_Actual360) {
  {
    QuantLib::Actual360 *arg1 = (QuantLib::Actual360 *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Actual360(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__Actual360, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Actual360" "', argument " "1"" of type '" "QuantLib::Actual360 *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::Actual360 * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Actual365Fixed__SWIG_0) {
  {
    QuantLib::Actual365Fixed::Convention arg1 ;
    int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    QuantLib::Actual365Fixed *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Actual365Fixed(c);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Actual365Fixed" "', argument " "1"" of type '" "QuantLib::Actual365Fixed::Convention""'");
    } 
    arg1 = static_cast< QuantLib::Actual365Fixed::Convention >(val1);
    {
      try {
        result = (QuantLib::Actual365Fixed *)new QuantLib::Actual365Fixed(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__Actual365Fixed, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Actual365Fixed__SWIG_1) {
  {
    int argvi = 0;
    QuantLib::Actual365Fixed *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Actual365Fixed();");
    }
    {
      try {
        result = (QuantLib::Actual365Fixed *)new QuantLib::Actual365Fixed();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__Actual365Fixed, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_Actual365Fixed) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Actual365Fixed__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Actual365Fixed__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Actual365Fixed'");
  XSRETURN(0);
}


XS(_wrap_delete_Actual365Fixed) {
  {
    QuantLib::Actual365Fixed *arg1 = (QuantLib::Actual365Fixed *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Actual365Fixed(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__Actual365Fixed, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Actual365Fixed" "', argument " "1"" of type '" "QuantLib::Actual365Fixed *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::Actual365Fixed * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Thirty360__SWIG_0) {
  {
    QuantLib::Thirty360::Convention arg1 ;
    int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    QuantLib::Thirty360 *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Thirty360(c);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Thirty360" "', argument " "1"" of type '" "QuantLib::Thirty360::Convention""'");
    } 
    arg1 = static_cast< QuantLib::Thirty360::Convention >(val1);
    {
      try {
        result = (QuantLib::Thirty360 *)new QuantLib::Thirty360(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__Thirty360, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Thirty360__SWIG_1) {
  {
    int argvi = 0;
    QuantLib::Thirty360 *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Thirty360();");
    }
    {
      try {
        result = (QuantLib::Thirty360 *)new QuantLib::Thirty360();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__Thirty360, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_Thirty360) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Thirty360__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Thirty360__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Thirty360'");
  XSRETURN(0);
}


XS(_wrap_delete_Thirty360) {
  {
    QuantLib::Thirty360 *arg1 = (QuantLib::Thirty360 *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Thirty360(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__Thirty360, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Thirty360" "', argument " "1"" of type '" "QuantLib::Thirty360 *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::Thirty360 * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ActualActual__SWIG_0) {
  {
    QuantLib::ActualActual::Convention arg1 ;
    Schedule *arg2 = 0 ;
    int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    QuantLib::ActualActual *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_ActualActual(c,schedule);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ActualActual" "', argument " "1"" of type '" "QuantLib::ActualActual::Convention""'");
    } 
    arg1 = static_cast< QuantLib::ActualActual::Convention >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ActualActual" "', argument " "2"" of type '" "Schedule const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ActualActual" "', argument " "2"" of type '" "Schedule const &""'"); 
    }
    arg2 = reinterpret_cast< Schedule * >(argp2);
    {
      try {
        result = (QuantLib::ActualActual *)new QuantLib::ActualActual(arg1,(Schedule const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__ActualActual, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ActualActual__SWIG_1) {
  {
    QuantLib::ActualActual::Convention arg1 ;
    int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    QuantLib::ActualActual *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_ActualActual(c);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ActualActual" "', argument " "1"" of type '" "QuantLib::ActualActual::Convention""'");
    } 
    arg1 = static_cast< QuantLib::ActualActual::Convention >(val1);
    {
      try {
        result = (QuantLib::ActualActual *)new QuantLib::ActualActual(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__ActualActual, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ActualActual__SWIG_2) {
  {
    int argvi = 0;
    QuantLib::ActualActual *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_ActualActual();");
    }
    {
      try {
        result = (QuantLib::ActualActual *)new QuantLib::ActualActual();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__ActualActual, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_ActualActual) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ActualActual__SWIG_2); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ActualActual__SWIG_1); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ActualActual__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_ActualActual'");
  XSRETURN(0);
}


XS(_wrap_delete_ActualActual) {
  {
    QuantLib::ActualActual *arg1 = (QuantLib::ActualActual *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_ActualActual(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__ActualActual, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ActualActual" "', argument " "1"" of type '" "QuantLib::ActualActual *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::ActualActual * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_OneDayCounter) {
  {
    int argvi = 0;
    QuantLib::OneDayCounter *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_OneDayCounter();");
    }
    {
      try {
        result = (QuantLib::OneDayCounter *)new QuantLib::OneDayCounter();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__OneDayCounter, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_OneDayCounter) {
  {
    QuantLib::OneDayCounter *arg1 = (QuantLib::OneDayCounter *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_OneDayCounter(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__OneDayCounter, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_OneDayCounter" "', argument " "1"" of type '" "QuantLib::OneDayCounter *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::OneDayCounter * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SimpleDayCounter) {
  {
    int argvi = 0;
    QuantLib::SimpleDayCounter *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_SimpleDayCounter();");
    }
    {
      try {
        result = (QuantLib::SimpleDayCounter *)new QuantLib::SimpleDayCounter();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__SimpleDayCounter, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_SimpleDayCounter) {
  {
    QuantLib::SimpleDayCounter *arg1 = (QuantLib::SimpleDayCounter *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_SimpleDayCounter(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__SimpleDayCounter, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SimpleDayCounter" "', argument " "1"" of type '" "QuantLib::SimpleDayCounter *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::SimpleDayCounter * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Business252__SWIG_0) {
  {
    SwigValueWrapper< Calendar > arg1 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    QuantLib::Business252 *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Business252(c);");
    }
    {
      res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Calendar,  0 );
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Business252" "', argument " "1"" of type '" "Calendar""'"); 
      }  
      if (!argp1) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Business252" "', argument " "1"" of type '" "Calendar""'");
      } else {
        arg1 = *(reinterpret_cast< Calendar * >(argp1));
      }
    }
    {
      try {
        result = (QuantLib::Business252 *)new QuantLib::Business252(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__Business252, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_Business252__SWIG_1) {
  {
    int argvi = 0;
    QuantLib::Business252 *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Business252();");
    }
    {
      try {
        result = (QuantLib::Business252 *)new QuantLib::Business252();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__Business252, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_Business252) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Business252__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Business252__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Business252'");
  XSRETURN(0);
}


XS(_wrap_delete_Business252) {
  {
    QuantLib::Business252 *arg1 = (QuantLib::Business252 *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Business252(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__Business252, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Business252" "', argument " "1"" of type '" "QuantLib::Business252 *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::Business252 * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Actual365NoLeap) {
  {
    int argvi = 0;
    SwigValueWrapper< DayCounter > result;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: Actual365NoLeap();");
    }
    {
      try {
        result = Actual365NoLeap();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new DayCounter(static_cast< const DayCounter& >(result))), SWIGTYPE_p_DayCounter, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_InterestRate__SWIG_0) {
  {
    int argvi = 0;
    InterestRate *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_InterestRate();");
    }
    {
      try {
        result = (InterestRate *)new InterestRate();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_InterestRate, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_InterestRate__SWIG_1) {
  {
    Rate arg1 ;
    DayCounter *arg2 = 0 ;
    Compounding arg3 ;
    Frequency arg4 ;
    double val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    InterestRate *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_InterestRate(r,dc,comp,freq);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_InterestRate" "', argument " "1"" of type '" "Rate""'");
    } 
    arg1 = static_cast< Rate >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_InterestRate" "', argument " "2"" of type '" "DayCounter const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_InterestRate" "', argument " "2"" of type '" "DayCounter const &""'"); 
    }
    arg2 = reinterpret_cast< DayCounter * >(argp2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_InterestRate" "', argument " "3"" of type '" "Compounding""'");
    } 
    arg3 = static_cast< Compounding >(val3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_InterestRate" "', argument " "4"" of type '" "Frequency""'");
    } 
    arg4 = static_cast< Frequency >(val4);
    {
      try {
        result = (InterestRate *)new InterestRate(arg1,(DayCounter const &)*arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_InterestRate, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_InterestRate) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_InterestRate__SWIG_0); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_InterestRate__SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded 'new_InterestRate'");
  XSRETURN(0);
}


XS(_wrap_InterestRate_rate) {
  {
    InterestRate *arg1 = (InterestRate *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: InterestRate_rate(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_InterestRate, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InterestRate_rate" "', argument " "1"" of type '" "InterestRate const *""'"); 
    }
    arg1 = reinterpret_cast< InterestRate * >(argp1);
    {
      try {
        result = (Rate)((InterestRate const *)arg1)->rate();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_InterestRate_dayCounter) {
  {
    InterestRate *arg1 = (InterestRate *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    SwigValueWrapper< DayCounter > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: InterestRate_dayCounter(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_InterestRate, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InterestRate_dayCounter" "', argument " "1"" of type '" "InterestRate const *""'"); 
    }
    arg1 = reinterpret_cast< InterestRate * >(argp1);
    {
      try {
        result = ((InterestRate const *)arg1)->dayCounter();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new DayCounter(static_cast< const DayCounter& >(result))), SWIGTYPE_p_DayCounter, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_InterestRate_compounding) {
  {
    InterestRate *arg1 = (InterestRate *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Compounding result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: InterestRate_compounding(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_InterestRate, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InterestRate_compounding" "', argument " "1"" of type '" "InterestRate const *""'"); 
    }
    arg1 = reinterpret_cast< InterestRate * >(argp1);
    {
      try {
        result = (Compounding)((InterestRate const *)arg1)->compounding();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_InterestRate_frequency) {
  {
    InterestRate *arg1 = (InterestRate *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Frequency result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: InterestRate_frequency(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_InterestRate, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InterestRate_frequency" "', argument " "1"" of type '" "InterestRate const *""'"); 
    }
    arg1 = reinterpret_cast< InterestRate * >(argp1);
    {
      try {
        result = (Frequency)((InterestRate const *)arg1)->frequency();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_InterestRate_discountFactor__SWIG_0) {
  {
    InterestRate *arg1 = (InterestRate *) 0 ;
    Time arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    DiscountFactor result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: InterestRate_discountFactor(self,t);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_InterestRate, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InterestRate_discountFactor" "', argument " "1"" of type '" "InterestRate const *""'"); 
    }
    arg1 = reinterpret_cast< InterestRate * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "InterestRate_discountFactor" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    {
      try {
        result = (DiscountFactor)((InterestRate const *)arg1)->discountFactor(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_InterestRate_discountFactor__SWIG_1) {
  {
    InterestRate *arg1 = (InterestRate *) 0 ;
    Date *arg2 = 0 ;
    Date *arg3 = 0 ;
    Date *arg4 = 0 ;
    Date *arg5 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int argvi = 0;
    DiscountFactor result;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: InterestRate_discountFactor(self,d1,d2,refStart,refEnd);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_InterestRate, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InterestRate_discountFactor" "', argument " "1"" of type '" "InterestRate const *""'"); 
    }
    arg1 = reinterpret_cast< InterestRate * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "InterestRate_discountFactor" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "InterestRate_discountFactor" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "InterestRate_discountFactor" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "InterestRate_discountFactor" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "InterestRate_discountFactor" "', argument " "4"" of type '" "Date const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "InterestRate_discountFactor" "', argument " "4"" of type '" "Date const &""'"); 
    }
    arg4 = reinterpret_cast< Date * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "InterestRate_discountFactor" "', argument " "5"" of type '" "Date const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "InterestRate_discountFactor" "', argument " "5"" of type '" "Date const &""'"); 
    }
    arg5 = reinterpret_cast< Date * >(argp5);
    {
      try {
        result = (DiscountFactor)((InterestRate const *)arg1)->discountFactor((Date const &)*arg2,(Date const &)*arg3,(Date const &)*arg4,(Date const &)*arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_InterestRate_discountFactor__SWIG_2) {
  {
    InterestRate *arg1 = (InterestRate *) 0 ;
    Date *arg2 = 0 ;
    Date *arg3 = 0 ;
    Date *arg4 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int argvi = 0;
    DiscountFactor result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: InterestRate_discountFactor(self,d1,d2,refStart);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_InterestRate, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InterestRate_discountFactor" "', argument " "1"" of type '" "InterestRate const *""'"); 
    }
    arg1 = reinterpret_cast< InterestRate * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "InterestRate_discountFactor" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "InterestRate_discountFactor" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "InterestRate_discountFactor" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "InterestRate_discountFactor" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "InterestRate_discountFactor" "', argument " "4"" of type '" "Date const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "InterestRate_discountFactor" "', argument " "4"" of type '" "Date const &""'"); 
    }
    arg4 = reinterpret_cast< Date * >(argp4);
    {
      try {
        result = (DiscountFactor)((InterestRate const *)arg1)->discountFactor((Date const &)*arg2,(Date const &)*arg3,(Date const &)*arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_InterestRate_discountFactor__SWIG_3) {
  {
    InterestRate *arg1 = (InterestRate *) 0 ;
    Date *arg2 = 0 ;
    Date *arg3 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    DiscountFactor result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: InterestRate_discountFactor(self,d1,d2);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_InterestRate, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InterestRate_discountFactor" "', argument " "1"" of type '" "InterestRate const *""'"); 
    }
    arg1 = reinterpret_cast< InterestRate * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "InterestRate_discountFactor" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "InterestRate_discountFactor" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "InterestRate_discountFactor" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "InterestRate_discountFactor" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    {
      try {
        result = (DiscountFactor)((InterestRate const *)arg1)->discountFactor((Date const &)*arg2,(Date const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_InterestRate_discountFactor) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_InterestRate, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_InterestRate, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_InterestRate, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_InterestRate, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_InterestRate_discountFactor__SWIG_0); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_InterestRate_discountFactor__SWIG_3); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_InterestRate_discountFactor__SWIG_2); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_InterestRate_discountFactor__SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded 'InterestRate_discountFactor'");
  XSRETURN(0);
}


XS(_wrap_InterestRate_compoundFactor__SWIG_0) {
  {
    InterestRate *arg1 = (InterestRate *) 0 ;
    Time arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: InterestRate_compoundFactor(self,t);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_InterestRate, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InterestRate_compoundFactor" "', argument " "1"" of type '" "InterestRate const *""'"); 
    }
    arg1 = reinterpret_cast< InterestRate * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "InterestRate_compoundFactor" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    {
      try {
        result = (Real)((InterestRate const *)arg1)->compoundFactor(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_InterestRate_compoundFactor__SWIG_1) {
  {
    InterestRate *arg1 = (InterestRate *) 0 ;
    Date *arg2 = 0 ;
    Date *arg3 = 0 ;
    Date *arg4 = 0 ;
    Date *arg5 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: InterestRate_compoundFactor(self,d1,d2,refStart,refEnd);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_InterestRate, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InterestRate_compoundFactor" "', argument " "1"" of type '" "InterestRate const *""'"); 
    }
    arg1 = reinterpret_cast< InterestRate * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "InterestRate_compoundFactor" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "InterestRate_compoundFactor" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "InterestRate_compoundFactor" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "InterestRate_compoundFactor" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "InterestRate_compoundFactor" "', argument " "4"" of type '" "Date const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "InterestRate_compoundFactor" "', argument " "4"" of type '" "Date const &""'"); 
    }
    arg4 = reinterpret_cast< Date * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "InterestRate_compoundFactor" "', argument " "5"" of type '" "Date const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "InterestRate_compoundFactor" "', argument " "5"" of type '" "Date const &""'"); 
    }
    arg5 = reinterpret_cast< Date * >(argp5);
    {
      try {
        result = (Real)((InterestRate const *)arg1)->compoundFactor((Date const &)*arg2,(Date const &)*arg3,(Date const &)*arg4,(Date const &)*arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_InterestRate_compoundFactor__SWIG_2) {
  {
    InterestRate *arg1 = (InterestRate *) 0 ;
    Date *arg2 = 0 ;
    Date *arg3 = 0 ;
    Date *arg4 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: InterestRate_compoundFactor(self,d1,d2,refStart);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_InterestRate, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InterestRate_compoundFactor" "', argument " "1"" of type '" "InterestRate const *""'"); 
    }
    arg1 = reinterpret_cast< InterestRate * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "InterestRate_compoundFactor" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "InterestRate_compoundFactor" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "InterestRate_compoundFactor" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "InterestRate_compoundFactor" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "InterestRate_compoundFactor" "', argument " "4"" of type '" "Date const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "InterestRate_compoundFactor" "', argument " "4"" of type '" "Date const &""'"); 
    }
    arg4 = reinterpret_cast< Date * >(argp4);
    {
      try {
        result = (Real)((InterestRate const *)arg1)->compoundFactor((Date const &)*arg2,(Date const &)*arg3,(Date const &)*arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_InterestRate_compoundFactor__SWIG_3) {
  {
    InterestRate *arg1 = (InterestRate *) 0 ;
    Date *arg2 = 0 ;
    Date *arg3 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: InterestRate_compoundFactor(self,d1,d2);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_InterestRate, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InterestRate_compoundFactor" "', argument " "1"" of type '" "InterestRate const *""'"); 
    }
    arg1 = reinterpret_cast< InterestRate * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "InterestRate_compoundFactor" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "InterestRate_compoundFactor" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "InterestRate_compoundFactor" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "InterestRate_compoundFactor" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    {
      try {
        result = (Real)((InterestRate const *)arg1)->compoundFactor((Date const &)*arg2,(Date const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_InterestRate_compoundFactor) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_InterestRate, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_InterestRate, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_InterestRate, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_InterestRate, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_InterestRate_compoundFactor__SWIG_0); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_InterestRate_compoundFactor__SWIG_3); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_InterestRate_compoundFactor__SWIG_2); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_InterestRate_compoundFactor__SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded 'InterestRate_compoundFactor'");
  XSRETURN(0);
}


XS(_wrap_InterestRate_impliedRate__SWIG_0) {
  {
    Real arg1 ;
    DayCounter *arg2 = 0 ;
    Compounding arg3 ;
    Frequency arg4 ;
    Time arg5 ;
    double val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    double val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    InterestRate result;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: InterestRate_impliedRate(compound,resultDC,comp,freq,t);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "InterestRate_impliedRate" "', argument " "1"" of type '" "Real""'");
    } 
    arg1 = static_cast< Real >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "InterestRate_impliedRate" "', argument " "2"" of type '" "DayCounter const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "InterestRate_impliedRate" "', argument " "2"" of type '" "DayCounter const &""'"); 
    }
    arg2 = reinterpret_cast< DayCounter * >(argp2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "InterestRate_impliedRate" "', argument " "3"" of type '" "Compounding""'");
    } 
    arg3 = static_cast< Compounding >(val3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "InterestRate_impliedRate" "', argument " "4"" of type '" "Frequency""'");
    } 
    arg4 = static_cast< Frequency >(val4);
    ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "InterestRate_impliedRate" "', argument " "5"" of type '" "Time""'");
    } 
    arg5 = static_cast< Time >(val5);
    {
      try {
        result = InterestRate::impliedRate(arg1,(DayCounter const &)*arg2,arg3,arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new InterestRate(static_cast< const InterestRate& >(result))), SWIGTYPE_p_InterestRate, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_InterestRate_impliedRate__SWIG_1) {
  {
    Real arg1 ;
    DayCounter *arg2 = 0 ;
    Compounding arg3 ;
    Frequency arg4 ;
    Date *arg5 = 0 ;
    Date *arg6 = 0 ;
    Date *arg7 = 0 ;
    Date *arg8 = 0 ;
    double val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    int argvi = 0;
    InterestRate result;
    dXSARGS;
    
    if ((items < 8) || (items > 8)) {
      SWIG_croak("Usage: InterestRate_impliedRate(compound,resultDC,comp,freq,d1,d2,refStart,refEnd);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "InterestRate_impliedRate" "', argument " "1"" of type '" "Real""'");
    } 
    arg1 = static_cast< Real >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "InterestRate_impliedRate" "', argument " "2"" of type '" "DayCounter const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "InterestRate_impliedRate" "', argument " "2"" of type '" "DayCounter const &""'"); 
    }
    arg2 = reinterpret_cast< DayCounter * >(argp2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "InterestRate_impliedRate" "', argument " "3"" of type '" "Compounding""'");
    } 
    arg3 = static_cast< Compounding >(val3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "InterestRate_impliedRate" "', argument " "4"" of type '" "Frequency""'");
    } 
    arg4 = static_cast< Frequency >(val4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "InterestRate_impliedRate" "', argument " "5"" of type '" "Date const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "InterestRate_impliedRate" "', argument " "5"" of type '" "Date const &""'"); 
    }
    arg5 = reinterpret_cast< Date * >(argp5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "InterestRate_impliedRate" "', argument " "6"" of type '" "Date const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "InterestRate_impliedRate" "', argument " "6"" of type '" "Date const &""'"); 
    }
    arg6 = reinterpret_cast< Date * >(argp6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "InterestRate_impliedRate" "', argument " "7"" of type '" "Date const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "InterestRate_impliedRate" "', argument " "7"" of type '" "Date const &""'"); 
    }
    arg7 = reinterpret_cast< Date * >(argp7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "InterestRate_impliedRate" "', argument " "8"" of type '" "Date const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "InterestRate_impliedRate" "', argument " "8"" of type '" "Date const &""'"); 
    }
    arg8 = reinterpret_cast< Date * >(argp8);
    {
      try {
        result = InterestRate::impliedRate(arg1,(DayCounter const &)*arg2,arg3,arg4,(Date const &)*arg5,(Date const &)*arg6,(Date const &)*arg7,(Date const &)*arg8);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new InterestRate(static_cast< const InterestRate& >(result))), SWIGTYPE_p_InterestRate, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_InterestRate_impliedRate__SWIG_2) {
  {
    Real arg1 ;
    DayCounter *arg2 = 0 ;
    Compounding arg3 ;
    Frequency arg4 ;
    Date *arg5 = 0 ;
    Date *arg6 = 0 ;
    Date *arg7 = 0 ;
    double val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    int argvi = 0;
    InterestRate result;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: InterestRate_impliedRate(compound,resultDC,comp,freq,d1,d2,refStart);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "InterestRate_impliedRate" "', argument " "1"" of type '" "Real""'");
    } 
    arg1 = static_cast< Real >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "InterestRate_impliedRate" "', argument " "2"" of type '" "DayCounter const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "InterestRate_impliedRate" "', argument " "2"" of type '" "DayCounter const &""'"); 
    }
    arg2 = reinterpret_cast< DayCounter * >(argp2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "InterestRate_impliedRate" "', argument " "3"" of type '" "Compounding""'");
    } 
    arg3 = static_cast< Compounding >(val3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "InterestRate_impliedRate" "', argument " "4"" of type '" "Frequency""'");
    } 
    arg4 = static_cast< Frequency >(val4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "InterestRate_impliedRate" "', argument " "5"" of type '" "Date const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "InterestRate_impliedRate" "', argument " "5"" of type '" "Date const &""'"); 
    }
    arg5 = reinterpret_cast< Date * >(argp5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "InterestRate_impliedRate" "', argument " "6"" of type '" "Date const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "InterestRate_impliedRate" "', argument " "6"" of type '" "Date const &""'"); 
    }
    arg6 = reinterpret_cast< Date * >(argp6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "InterestRate_impliedRate" "', argument " "7"" of type '" "Date const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "InterestRate_impliedRate" "', argument " "7"" of type '" "Date const &""'"); 
    }
    arg7 = reinterpret_cast< Date * >(argp7);
    {
      try {
        result = InterestRate::impliedRate(arg1,(DayCounter const &)*arg2,arg3,arg4,(Date const &)*arg5,(Date const &)*arg6,(Date const &)*arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new InterestRate(static_cast< const InterestRate& >(result))), SWIGTYPE_p_InterestRate, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_InterestRate_impliedRate__SWIG_3) {
  {
    Real arg1 ;
    DayCounter *arg2 = 0 ;
    Compounding arg3 ;
    Frequency arg4 ;
    Date *arg5 = 0 ;
    Date *arg6 = 0 ;
    double val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    int argvi = 0;
    InterestRate result;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: InterestRate_impliedRate(compound,resultDC,comp,freq,d1,d2);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "InterestRate_impliedRate" "', argument " "1"" of type '" "Real""'");
    } 
    arg1 = static_cast< Real >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "InterestRate_impliedRate" "', argument " "2"" of type '" "DayCounter const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "InterestRate_impliedRate" "', argument " "2"" of type '" "DayCounter const &""'"); 
    }
    arg2 = reinterpret_cast< DayCounter * >(argp2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "InterestRate_impliedRate" "', argument " "3"" of type '" "Compounding""'");
    } 
    arg3 = static_cast< Compounding >(val3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "InterestRate_impliedRate" "', argument " "4"" of type '" "Frequency""'");
    } 
    arg4 = static_cast< Frequency >(val4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "InterestRate_impliedRate" "', argument " "5"" of type '" "Date const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "InterestRate_impliedRate" "', argument " "5"" of type '" "Date const &""'"); 
    }
    arg5 = reinterpret_cast< Date * >(argp5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "InterestRate_impliedRate" "', argument " "6"" of type '" "Date const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "InterestRate_impliedRate" "', argument " "6"" of type '" "Date const &""'"); 
    }
    arg6 = reinterpret_cast< Date * >(argp6);
    {
      try {
        result = InterestRate::impliedRate(arg1,(DayCounter const &)*arg2,arg3,arg4,(Date const &)*arg5,(Date const &)*arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new InterestRate(static_cast< const InterestRate& >(result))), SWIGTYPE_p_InterestRate, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_InterestRate_impliedRate) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 8) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_InterestRate_impliedRate__SWIG_0); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_InterestRate_impliedRate__SWIG_3); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_InterestRate_impliedRate__SWIG_2); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_InterestRate_impliedRate__SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded 'InterestRate_impliedRate'");
  XSRETURN(0);
}


XS(_wrap_InterestRate_equivalentRate__SWIG_0) {
  {
    InterestRate *arg1 = (InterestRate *) 0 ;
    Compounding arg2 ;
    Frequency arg3 ;
    Time arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    InterestRate result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: InterestRate_equivalentRate(self,comp,freq,t);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_InterestRate, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InterestRate_equivalentRate" "', argument " "1"" of type '" "InterestRate const *""'"); 
    }
    arg1 = reinterpret_cast< InterestRate * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "InterestRate_equivalentRate" "', argument " "2"" of type '" "Compounding""'");
    } 
    arg2 = static_cast< Compounding >(val2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "InterestRate_equivalentRate" "', argument " "3"" of type '" "Frequency""'");
    } 
    arg3 = static_cast< Frequency >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "InterestRate_equivalentRate" "', argument " "4"" of type '" "Time""'");
    } 
    arg4 = static_cast< Time >(val4);
    {
      try {
        result = ((InterestRate const *)arg1)->equivalentRate(arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new InterestRate(static_cast< const InterestRate& >(result))), SWIGTYPE_p_InterestRate, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_InterestRate_equivalentRate__SWIG_1) {
  {
    InterestRate *arg1 = (InterestRate *) 0 ;
    DayCounter *arg2 = 0 ;
    Compounding arg3 ;
    Frequency arg4 ;
    Date *arg5 = 0 ;
    Date *arg6 = 0 ;
    Date *arg7 = 0 ;
    Date *arg8 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    int argvi = 0;
    InterestRate result;
    dXSARGS;
    
    if ((items < 8) || (items > 8)) {
      SWIG_croak("Usage: InterestRate_equivalentRate(self,resultDayCounter,comp,freq,d1,d2,refStart,refEnd);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_InterestRate, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InterestRate_equivalentRate" "', argument " "1"" of type '" "InterestRate const *""'"); 
    }
    arg1 = reinterpret_cast< InterestRate * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "InterestRate_equivalentRate" "', argument " "2"" of type '" "DayCounter const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "InterestRate_equivalentRate" "', argument " "2"" of type '" "DayCounter const &""'"); 
    }
    arg2 = reinterpret_cast< DayCounter * >(argp2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "InterestRate_equivalentRate" "', argument " "3"" of type '" "Compounding""'");
    } 
    arg3 = static_cast< Compounding >(val3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "InterestRate_equivalentRate" "', argument " "4"" of type '" "Frequency""'");
    } 
    arg4 = static_cast< Frequency >(val4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "InterestRate_equivalentRate" "', argument " "5"" of type '" "Date const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "InterestRate_equivalentRate" "', argument " "5"" of type '" "Date const &""'"); 
    }
    arg5 = reinterpret_cast< Date * >(argp5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "InterestRate_equivalentRate" "', argument " "6"" of type '" "Date const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "InterestRate_equivalentRate" "', argument " "6"" of type '" "Date const &""'"); 
    }
    arg6 = reinterpret_cast< Date * >(argp6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "InterestRate_equivalentRate" "', argument " "7"" of type '" "Date const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "InterestRate_equivalentRate" "', argument " "7"" of type '" "Date const &""'"); 
    }
    arg7 = reinterpret_cast< Date * >(argp7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "InterestRate_equivalentRate" "', argument " "8"" of type '" "Date const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "InterestRate_equivalentRate" "', argument " "8"" of type '" "Date const &""'"); 
    }
    arg8 = reinterpret_cast< Date * >(argp8);
    {
      try {
        result = ((InterestRate const *)arg1)->equivalentRate((DayCounter const &)*arg2,arg3,arg4,(Date const &)*arg5,(Date const &)*arg6,(Date const &)*arg7,(Date const &)*arg8);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new InterestRate(static_cast< const InterestRate& >(result))), SWIGTYPE_p_InterestRate, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_InterestRate_equivalentRate__SWIG_2) {
  {
    InterestRate *arg1 = (InterestRate *) 0 ;
    DayCounter *arg2 = 0 ;
    Compounding arg3 ;
    Frequency arg4 ;
    Date *arg5 = 0 ;
    Date *arg6 = 0 ;
    Date *arg7 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    int argvi = 0;
    InterestRate result;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: InterestRate_equivalentRate(self,resultDayCounter,comp,freq,d1,d2,refStart);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_InterestRate, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InterestRate_equivalentRate" "', argument " "1"" of type '" "InterestRate const *""'"); 
    }
    arg1 = reinterpret_cast< InterestRate * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "InterestRate_equivalentRate" "', argument " "2"" of type '" "DayCounter const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "InterestRate_equivalentRate" "', argument " "2"" of type '" "DayCounter const &""'"); 
    }
    arg2 = reinterpret_cast< DayCounter * >(argp2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "InterestRate_equivalentRate" "', argument " "3"" of type '" "Compounding""'");
    } 
    arg3 = static_cast< Compounding >(val3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "InterestRate_equivalentRate" "', argument " "4"" of type '" "Frequency""'");
    } 
    arg4 = static_cast< Frequency >(val4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "InterestRate_equivalentRate" "', argument " "5"" of type '" "Date const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "InterestRate_equivalentRate" "', argument " "5"" of type '" "Date const &""'"); 
    }
    arg5 = reinterpret_cast< Date * >(argp5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "InterestRate_equivalentRate" "', argument " "6"" of type '" "Date const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "InterestRate_equivalentRate" "', argument " "6"" of type '" "Date const &""'"); 
    }
    arg6 = reinterpret_cast< Date * >(argp6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "InterestRate_equivalentRate" "', argument " "7"" of type '" "Date const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "InterestRate_equivalentRate" "', argument " "7"" of type '" "Date const &""'"); 
    }
    arg7 = reinterpret_cast< Date * >(argp7);
    {
      try {
        result = ((InterestRate const *)arg1)->equivalentRate((DayCounter const &)*arg2,arg3,arg4,(Date const &)*arg5,(Date const &)*arg6,(Date const &)*arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new InterestRate(static_cast< const InterestRate& >(result))), SWIGTYPE_p_InterestRate, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_InterestRate_equivalentRate__SWIG_3) {
  {
    InterestRate *arg1 = (InterestRate *) 0 ;
    DayCounter *arg2 = 0 ;
    Compounding arg3 ;
    Frequency arg4 ;
    Date *arg5 = 0 ;
    Date *arg6 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    int argvi = 0;
    InterestRate result;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: InterestRate_equivalentRate(self,resultDayCounter,comp,freq,d1,d2);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_InterestRate, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InterestRate_equivalentRate" "', argument " "1"" of type '" "InterestRate const *""'"); 
    }
    arg1 = reinterpret_cast< InterestRate * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "InterestRate_equivalentRate" "', argument " "2"" of type '" "DayCounter const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "InterestRate_equivalentRate" "', argument " "2"" of type '" "DayCounter const &""'"); 
    }
    arg2 = reinterpret_cast< DayCounter * >(argp2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "InterestRate_equivalentRate" "', argument " "3"" of type '" "Compounding""'");
    } 
    arg3 = static_cast< Compounding >(val3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "InterestRate_equivalentRate" "', argument " "4"" of type '" "Frequency""'");
    } 
    arg4 = static_cast< Frequency >(val4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "InterestRate_equivalentRate" "', argument " "5"" of type '" "Date const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "InterestRate_equivalentRate" "', argument " "5"" of type '" "Date const &""'"); 
    }
    arg5 = reinterpret_cast< Date * >(argp5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "InterestRate_equivalentRate" "', argument " "6"" of type '" "Date const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "InterestRate_equivalentRate" "', argument " "6"" of type '" "Date const &""'"); 
    }
    arg6 = reinterpret_cast< Date * >(argp6);
    {
      try {
        result = ((InterestRate const *)arg1)->equivalentRate((DayCounter const &)*arg2,arg3,arg4,(Date const &)*arg5,(Date const &)*arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new InterestRate(static_cast< const InterestRate& >(result))), SWIGTYPE_p_InterestRate, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_InterestRate_equivalentRate) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_InterestRate, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_InterestRate, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_InterestRate, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 8) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_InterestRate, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_InterestRate_equivalentRate__SWIG_0); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_InterestRate_equivalentRate__SWIG_3); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_InterestRate_equivalentRate__SWIG_2); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_InterestRate_equivalentRate__SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded 'InterestRate_equivalentRate'");
  XSRETURN(0);
}


XS(_wrap_InterestRate_to_string) {
  {
    InterestRate *arg1 = (InterestRate *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: InterestRate_to_string(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_InterestRate, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InterestRate_to_string" "', argument " "1"" of type '" "InterestRate *""'"); 
    }
    arg1 = reinterpret_cast< InterestRate * >(argp1);
    {
      try {
        result = InterestRate___str__(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_InterestRate) {
  {
    InterestRate *arg1 = (InterestRate *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_InterestRate(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_InterestRate, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_InterestRate" "', argument " "1"" of type '" "InterestRate *""'"); 
    }
    arg1 = reinterpret_cast< InterestRate * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_InterestRateVector__SWIG_0) {
  {
    unsigned int arg1 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    std::vector< InterestRate > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_InterestRateVector(size);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_InterestRateVector" "', argument " "1"" of type '" "unsigned int""'");
    } 
    arg1 = static_cast< unsigned int >(val1);
    {
      try {
        result = (std::vector< InterestRate > *)new std::vector< InterestRate >(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_InterestRate_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_InterestRateVector__SWIG_1) {
  {
    int argvi = 0;
    std::vector< InterestRate > *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_InterestRateVector();");
    }
    {
      try {
        result = (std::vector< InterestRate > *)new std::vector< InterestRate >();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_InterestRate_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_InterestRateVector__SWIG_2) {
  {
    unsigned int arg1 ;
    InterestRate *arg2 = 0 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    std::vector< InterestRate > *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_InterestRateVector(size,value);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_InterestRateVector" "', argument " "1"" of type '" "unsigned int""'");
    } 
    arg1 = static_cast< unsigned int >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_InterestRate,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_InterestRateVector" "', argument " "2"" of type '" "InterestRate const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_InterestRateVector" "', argument " "2"" of type '" "InterestRate const &""'"); 
    }
    arg2 = reinterpret_cast< InterestRate * >(argp2);
    {
      try {
        result = (std::vector< InterestRate > *)new std::vector< InterestRate >(arg1,(InterestRate const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_InterestRate_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_InterestRateVector__SWIG_3) {
  {
    std::vector< InterestRate > *arg1 = 0 ;
    std::vector< InterestRate > temp1 ;
    std::vector< InterestRate > *v1 ;
    int argvi = 0;
    std::vector< InterestRate > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_InterestRateVector(std::vector< InterestRate > const &);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_InterestRate_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_InterestRateVector. "
          "Expected an array of " "InterestRate");
        SV **tv;
        I32 len = av_len(av) + 1;
        InterestRate* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_InterestRate,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_InterestRateVector. "
              "Expected an array of " "InterestRate");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_InterestRateVector. "
          "Expected an array of " "InterestRate");
      }
    }
    {
      try {
        result = (std::vector< InterestRate > *)new std::vector< InterestRate >((std::vector< InterestRate > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_InterestRate_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_InterestRateVector) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< InterestRate >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_InterestRate_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  InterestRate* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_InterestRate,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_InterestRate, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_InterestRateVector__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_InterestRateVector__SWIG_0); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_InterestRateVector__SWIG_3); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_InterestRateVector__SWIG_2); return;
    }
  }
  
  croak("No matching function for overloaded 'new_InterestRateVector'");
  XSRETURN(0);
}


XS(_wrap_InterestRateVector_size) {
  {
    std::vector< InterestRate > *arg1 = (std::vector< InterestRate > *) 0 ;
    std::vector< InterestRate > temp1 ;
    std::vector< InterestRate > *v1 ;
    int argvi = 0;
    unsigned int result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: InterestRateVector_size(self);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_InterestRate_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of InterestRateVector_size. "
          "Expected an array of " "InterestRate");
        SV **tv;
        I32 len = av_len(av) + 1;
        InterestRate* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_InterestRate,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "InterestRateVector_size. "
              "Expected an array of " "InterestRate");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of InterestRateVector_size. "
          "Expected an array of " "InterestRate");
      }
    }
    {
      try {
        result = (unsigned int)((std::vector< InterestRate > const *)arg1)->size();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_InterestRateVector_empty) {
  {
    std::vector< InterestRate > *arg1 = (std::vector< InterestRate > *) 0 ;
    std::vector< InterestRate > temp1 ;
    std::vector< InterestRate > *v1 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: InterestRateVector_empty(self);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_InterestRate_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of InterestRateVector_empty. "
          "Expected an array of " "InterestRate");
        SV **tv;
        I32 len = av_len(av) + 1;
        InterestRate* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_InterestRate,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "InterestRateVector_empty. "
              "Expected an array of " "InterestRate");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of InterestRateVector_empty. "
          "Expected an array of " "InterestRate");
      }
    }
    {
      try {
        result = (bool)((std::vector< InterestRate > const *)arg1)->empty();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_InterestRateVector_clear) {
  {
    std::vector< InterestRate > *arg1 = (std::vector< InterestRate > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: InterestRateVector_clear(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_InterestRate_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InterestRateVector_clear" "', argument " "1"" of type '" "std::vector< InterestRate > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< InterestRate > * >(argp1);
    {
      try {
        (arg1)->clear();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_InterestRateVector_push) {
  {
    std::vector< InterestRate > *arg1 = (std::vector< InterestRate > *) 0 ;
    InterestRate *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: InterestRateVector_push(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_InterestRate_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InterestRateVector_push" "', argument " "1"" of type '" "std::vector< InterestRate > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< InterestRate > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_InterestRate,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "InterestRateVector_push" "', argument " "2"" of type '" "InterestRate const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "InterestRateVector_push" "', argument " "2"" of type '" "InterestRate const &""'"); 
    }
    arg2 = reinterpret_cast< InterestRate * >(argp2);
    {
      try {
        (arg1)->push_back((InterestRate const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_InterestRateVector_pop) {
  {
    std::vector< InterestRate > *arg1 = (std::vector< InterestRate > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    InterestRate result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: InterestRateVector_pop(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_InterestRate_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InterestRateVector_pop" "', argument " "1"" of type '" "std::vector< InterestRate > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< InterestRate > * >(argp1);
    {
      try {
        try {
          result = std_vector_Sl_InterestRate_Sg__pop(arg1);
        }
        catch(std::out_of_range &_e) {
          sv_setsv(get_sv("@", GV_ADD), SWIG_NewPointerObj((new std::out_of_range(static_cast< const std::out_of_range& >(_e))),SWIGTYPE_p_std__out_of_range,SWIG_POINTER_OWN)); SWIG_fail ;
        }
        
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new InterestRate(static_cast< const InterestRate& >(result))), SWIGTYPE_p_InterestRate, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_InterestRateVector_get) {
  {
    std::vector< InterestRate > *arg1 = (std::vector< InterestRate > *) 0 ;
    int arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    InterestRate *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: InterestRateVector_get(self,i);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_InterestRate_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InterestRateVector_get" "', argument " "1"" of type '" "std::vector< InterestRate > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< InterestRate > * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "InterestRateVector_get" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    {
      try {
        try {
          result = (InterestRate *) &std_vector_Sl_InterestRate_Sg__get(arg1,arg2);
        }
        catch(std::out_of_range &_e) {
          sv_setsv(get_sv("@", GV_ADD), SWIG_NewPointerObj((new std::out_of_range(static_cast< const std::out_of_range& >(_e))),SWIGTYPE_p_std__out_of_range,SWIG_POINTER_OWN)); SWIG_fail ;
        }
        
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_InterestRate, 0 | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_InterestRateVector_set) {
  {
    std::vector< InterestRate > *arg1 = (std::vector< InterestRate > *) 0 ;
    int arg2 ;
    InterestRate *arg3 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: InterestRateVector_set(self,i,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_InterestRate_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InterestRateVector_set" "', argument " "1"" of type '" "std::vector< InterestRate > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< InterestRate > * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "InterestRateVector_set" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_InterestRate,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "InterestRateVector_set" "', argument " "3"" of type '" "InterestRate const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "InterestRateVector_set" "', argument " "3"" of type '" "InterestRate const &""'"); 
    }
    arg3 = reinterpret_cast< InterestRate * >(argp3);
    {
      try {
        try {
          std_vector_Sl_InterestRate_Sg__set(arg1,arg2,(InterestRate const &)*arg3);
        }
        catch(std::out_of_range &_e) {
          sv_setsv(get_sv("@", GV_ADD), SWIG_NewPointerObj((new std::out_of_range(static_cast< const std::out_of_range& >(_e))),SWIGTYPE_p_std__out_of_range,SWIG_POINTER_OWN)); SWIG_fail ;
        }
        
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_InterestRateVector) {
  {
    std::vector< InterestRate > *arg1 = (std::vector< InterestRate > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_InterestRateVector(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_InterestRate_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_InterestRateVector" "', argument " "1"" of type '" "std::vector< InterestRate > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< InterestRate > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Rounding) {
  {
    int argvi = 0;
    Rounding *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Rounding();");
    }
    {
      try {
        result = (Rounding *)new Rounding();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Rounding, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_Rounding_apply) {
  {
    Rounding *arg1 = (Rounding *) 0 ;
    Decimal arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Decimal result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Rounding_apply(self,value);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Rounding, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Rounding_apply" "', argument " "1"" of type '" "Rounding const *""'"); 
    }
    arg1 = reinterpret_cast< Rounding * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Rounding_apply" "', argument " "2"" of type '" "Decimal""'");
    } 
    arg2 = static_cast< Decimal >(val2);
    {
      try {
        result = (Decimal)((Rounding const *)arg1)->operator ()(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_Rounding) {
  {
    Rounding *arg1 = (Rounding *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Rounding(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Rounding, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Rounding" "', argument " "1"" of type '" "Rounding *""'"); 
    }
    arg1 = reinterpret_cast< Rounding * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_UpRounding__SWIG_0) {
  {
    Integer arg1 ;
    Integer arg2 ;
    int val1 ;
    int ecode1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    UpRounding *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_UpRounding(precision,digit);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_UpRounding" "', argument " "1"" of type '" "Integer""'");
    } 
    arg1 = static_cast< Integer >(val1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_UpRounding" "', argument " "2"" of type '" "Integer""'");
    } 
    arg2 = static_cast< Integer >(val2);
    {
      try {
        result = (UpRounding *)new UpRounding(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UpRounding, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_UpRounding__SWIG_1) {
  {
    Integer arg1 ;
    int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    UpRounding *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_UpRounding(precision);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_UpRounding" "', argument " "1"" of type '" "Integer""'");
    } 
    arg1 = static_cast< Integer >(val1);
    {
      try {
        result = (UpRounding *)new UpRounding(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UpRounding, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_UpRounding) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_UpRounding__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_UpRounding__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_UpRounding'");
  XSRETURN(0);
}


XS(_wrap_delete_UpRounding) {
  {
    UpRounding *arg1 = (UpRounding *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_UpRounding(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_UpRounding, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UpRounding" "', argument " "1"" of type '" "UpRounding *""'"); 
    }
    arg1 = reinterpret_cast< UpRounding * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DownRounding__SWIG_0) {
  {
    Integer arg1 ;
    Integer arg2 ;
    int val1 ;
    int ecode1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    DownRounding *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_DownRounding(precision,digit);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_DownRounding" "', argument " "1"" of type '" "Integer""'");
    } 
    arg1 = static_cast< Integer >(val1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_DownRounding" "', argument " "2"" of type '" "Integer""'");
    } 
    arg2 = static_cast< Integer >(val2);
    {
      try {
        result = (DownRounding *)new DownRounding(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DownRounding, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DownRounding__SWIG_1) {
  {
    Integer arg1 ;
    int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    DownRounding *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_DownRounding(precision);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_DownRounding" "', argument " "1"" of type '" "Integer""'");
    } 
    arg1 = static_cast< Integer >(val1);
    {
      try {
        result = (DownRounding *)new DownRounding(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DownRounding, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DownRounding) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DownRounding__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DownRounding__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_DownRounding'");
  XSRETURN(0);
}


XS(_wrap_delete_DownRounding) {
  {
    DownRounding *arg1 = (DownRounding *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_DownRounding(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_DownRounding, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DownRounding" "', argument " "1"" of type '" "DownRounding *""'"); 
    }
    arg1 = reinterpret_cast< DownRounding * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ClosestRounding__SWIG_0) {
  {
    Integer arg1 ;
    Integer arg2 ;
    int val1 ;
    int ecode1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    ClosestRounding *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_ClosestRounding(precision,digit);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ClosestRounding" "', argument " "1"" of type '" "Integer""'");
    } 
    arg1 = static_cast< Integer >(val1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_ClosestRounding" "', argument " "2"" of type '" "Integer""'");
    } 
    arg2 = static_cast< Integer >(val2);
    {
      try {
        result = (ClosestRounding *)new ClosestRounding(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ClosestRounding, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ClosestRounding__SWIG_1) {
  {
    Integer arg1 ;
    int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    ClosestRounding *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_ClosestRounding(precision);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ClosestRounding" "', argument " "1"" of type '" "Integer""'");
    } 
    arg1 = static_cast< Integer >(val1);
    {
      try {
        result = (ClosestRounding *)new ClosestRounding(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ClosestRounding, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ClosestRounding) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ClosestRounding__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ClosestRounding__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_ClosestRounding'");
  XSRETURN(0);
}


XS(_wrap_delete_ClosestRounding) {
  {
    ClosestRounding *arg1 = (ClosestRounding *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_ClosestRounding(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ClosestRounding, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ClosestRounding" "', argument " "1"" of type '" "ClosestRounding *""'"); 
    }
    arg1 = reinterpret_cast< ClosestRounding * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CeilingTruncation__SWIG_0) {
  {
    Integer arg1 ;
    Integer arg2 ;
    int val1 ;
    int ecode1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    CeilingTruncation *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_CeilingTruncation(precision,digit);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_CeilingTruncation" "', argument " "1"" of type '" "Integer""'");
    } 
    arg1 = static_cast< Integer >(val1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_CeilingTruncation" "', argument " "2"" of type '" "Integer""'");
    } 
    arg2 = static_cast< Integer >(val2);
    {
      try {
        result = (CeilingTruncation *)new CeilingTruncation(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CeilingTruncation, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CeilingTruncation__SWIG_1) {
  {
    Integer arg1 ;
    int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    CeilingTruncation *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_CeilingTruncation(precision);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_CeilingTruncation" "', argument " "1"" of type '" "Integer""'");
    } 
    arg1 = static_cast< Integer >(val1);
    {
      try {
        result = (CeilingTruncation *)new CeilingTruncation(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CeilingTruncation, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CeilingTruncation) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_CeilingTruncation__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_CeilingTruncation__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_CeilingTruncation'");
  XSRETURN(0);
}


XS(_wrap_delete_CeilingTruncation) {
  {
    CeilingTruncation *arg1 = (CeilingTruncation *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_CeilingTruncation(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CeilingTruncation, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CeilingTruncation" "', argument " "1"" of type '" "CeilingTruncation *""'"); 
    }
    arg1 = reinterpret_cast< CeilingTruncation * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FloorTruncation__SWIG_0) {
  {
    Integer arg1 ;
    Integer arg2 ;
    int val1 ;
    int ecode1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    FloorTruncation *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_FloorTruncation(precision,digit);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FloorTruncation" "', argument " "1"" of type '" "Integer""'");
    } 
    arg1 = static_cast< Integer >(val1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FloorTruncation" "', argument " "2"" of type '" "Integer""'");
    } 
    arg2 = static_cast< Integer >(val2);
    {
      try {
        result = (FloorTruncation *)new FloorTruncation(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FloorTruncation, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FloorTruncation__SWIG_1) {
  {
    Integer arg1 ;
    int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    FloorTruncation *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_FloorTruncation(precision);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FloorTruncation" "', argument " "1"" of type '" "Integer""'");
    } 
    arg1 = static_cast< Integer >(val1);
    {
      try {
        result = (FloorTruncation *)new FloorTruncation(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FloorTruncation, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FloorTruncation) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FloorTruncation__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FloorTruncation__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_FloorTruncation'");
  XSRETURN(0);
}


XS(_wrap_delete_FloorTruncation) {
  {
    FloorTruncation *arg1 = (FloorTruncation *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_FloorTruncation(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_FloorTruncation, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FloorTruncation" "', argument " "1"" of type '" "FloorTruncation *""'"); 
    }
    arg1 = reinterpret_cast< FloorTruncation * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Currency_name) {
  {
    Currency *arg1 = (Currency *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Currency_name(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Currency, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Currency_name" "', argument " "1"" of type '" "Currency const *""'"); 
    }
    arg1 = reinterpret_cast< Currency * >(argp1);
    {
      try {
        result = (std::string *) &((Currency const *)arg1)->name();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(*result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Currency_code) {
  {
    Currency *arg1 = (Currency *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Currency_code(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Currency, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Currency_code" "', argument " "1"" of type '" "Currency const *""'"); 
    }
    arg1 = reinterpret_cast< Currency * >(argp1);
    {
      try {
        result = (std::string *) &((Currency const *)arg1)->code();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(*result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Currency_numericCode) {
  {
    Currency *arg1 = (Currency *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Integer result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Currency_numericCode(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Currency, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Currency_numericCode" "', argument " "1"" of type '" "Currency const *""'"); 
    }
    arg1 = reinterpret_cast< Currency * >(argp1);
    {
      try {
        result = (Integer)((Currency const *)arg1)->numericCode();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Currency_symbol) {
  {
    Currency *arg1 = (Currency *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Currency_symbol(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Currency, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Currency_symbol" "', argument " "1"" of type '" "Currency const *""'"); 
    }
    arg1 = reinterpret_cast< Currency * >(argp1);
    {
      try {
        result = (std::string *) &((Currency const *)arg1)->symbol();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(*result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Currency_fractionSymbol) {
  {
    Currency *arg1 = (Currency *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Currency_fractionSymbol(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Currency, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Currency_fractionSymbol" "', argument " "1"" of type '" "Currency const *""'"); 
    }
    arg1 = reinterpret_cast< Currency * >(argp1);
    {
      try {
        result = (std::string *) &((Currency const *)arg1)->fractionSymbol();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(*result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Currency_fractionsPerUnit) {
  {
    Currency *arg1 = (Currency *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Integer result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Currency_fractionsPerUnit(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Currency, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Currency_fractionsPerUnit" "', argument " "1"" of type '" "Currency const *""'"); 
    }
    arg1 = reinterpret_cast< Currency * >(argp1);
    {
      try {
        result = (Integer)((Currency const *)arg1)->fractionsPerUnit();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Currency_rounding) {
  {
    Currency *arg1 = (Currency *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Rounding *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Currency_rounding(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Currency, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Currency_rounding" "', argument " "1"" of type '" "Currency const *""'"); 
    }
    arg1 = reinterpret_cast< Currency * >(argp1);
    {
      try {
        result = (Rounding *) &((Currency const *)arg1)->rounding();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Rounding, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Currency_format) {
  {
    Currency *arg1 = (Currency *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Currency_format(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Currency, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Currency_format" "', argument " "1"" of type '" "Currency const *""'"); 
    }
    arg1 = reinterpret_cast< Currency * >(argp1);
    {
      try {
        result = ((Currency const *)arg1)->format();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Currency_empty) {
  {
    Currency *arg1 = (Currency *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Currency_empty(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Currency, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Currency_empty" "', argument " "1"" of type '" "Currency const *""'"); 
    }
    arg1 = reinterpret_cast< Currency * >(argp1);
    {
      try {
        result = (bool)((Currency const *)arg1)->empty();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Currency_triangulationCurrency) {
  {
    Currency *arg1 = (Currency *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Currency *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Currency_triangulationCurrency(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Currency, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Currency_triangulationCurrency" "', argument " "1"" of type '" "Currency const *""'"); 
    }
    arg1 = reinterpret_cast< Currency * >(argp1);
    {
      try {
        result = (Currency *) &((Currency const *)arg1)->triangulationCurrency();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Currency, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Currency) {
  {
    int argvi = 0;
    Currency *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Currency();");
    }
    {
      try {
        result = (Currency *)new Currency();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Currency, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_Currency) {
  {
    Currency *arg1 = (Currency *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Currency(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Currency, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Currency" "', argument " "1"" of type '" "Currency *""'"); 
    }
    arg1 = reinterpret_cast< Currency * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ARSCurrency) {
  {
    int argvi = 0;
    QuantLib::ARSCurrency *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_ARSCurrency();");
    }
    {
      try {
        result = (QuantLib::ARSCurrency *)new QuantLib::ARSCurrency();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__ARSCurrency, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_ARSCurrency) {
  {
    QuantLib::ARSCurrency *arg1 = (QuantLib::ARSCurrency *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_ARSCurrency(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__ARSCurrency, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ARSCurrency" "', argument " "1"" of type '" "QuantLib::ARSCurrency *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::ARSCurrency * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ATSCurrency) {
  {
    int argvi = 0;
    QuantLib::ATSCurrency *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_ATSCurrency();");
    }
    {
      try {
        result = (QuantLib::ATSCurrency *)new QuantLib::ATSCurrency();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__ATSCurrency, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_ATSCurrency) {
  {
    QuantLib::ATSCurrency *arg1 = (QuantLib::ATSCurrency *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_ATSCurrency(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__ATSCurrency, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ATSCurrency" "', argument " "1"" of type '" "QuantLib::ATSCurrency *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::ATSCurrency * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_AUDCurrency) {
  {
    int argvi = 0;
    QuantLib::AUDCurrency *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_AUDCurrency();");
    }
    {
      try {
        result = (QuantLib::AUDCurrency *)new QuantLib::AUDCurrency();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__AUDCurrency, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_AUDCurrency) {
  {
    QuantLib::AUDCurrency *arg1 = (QuantLib::AUDCurrency *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_AUDCurrency(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__AUDCurrency, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_AUDCurrency" "', argument " "1"" of type '" "QuantLib::AUDCurrency *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::AUDCurrency * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BDTCurrency) {
  {
    int argvi = 0;
    QuantLib::BDTCurrency *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_BDTCurrency();");
    }
    {
      try {
        result = (QuantLib::BDTCurrency *)new QuantLib::BDTCurrency();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__BDTCurrency, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_BDTCurrency) {
  {
    QuantLib::BDTCurrency *arg1 = (QuantLib::BDTCurrency *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_BDTCurrency(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__BDTCurrency, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_BDTCurrency" "', argument " "1"" of type '" "QuantLib::BDTCurrency *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::BDTCurrency * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BEFCurrency) {
  {
    int argvi = 0;
    QuantLib::BEFCurrency *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_BEFCurrency();");
    }
    {
      try {
        result = (QuantLib::BEFCurrency *)new QuantLib::BEFCurrency();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__BEFCurrency, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_BEFCurrency) {
  {
    QuantLib::BEFCurrency *arg1 = (QuantLib::BEFCurrency *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_BEFCurrency(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__BEFCurrency, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_BEFCurrency" "', argument " "1"" of type '" "QuantLib::BEFCurrency *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::BEFCurrency * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BGLCurrency) {
  {
    int argvi = 0;
    QuantLib::BGLCurrency *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_BGLCurrency();");
    }
    {
      try {
        result = (QuantLib::BGLCurrency *)new QuantLib::BGLCurrency();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__BGLCurrency, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_BGLCurrency) {
  {
    QuantLib::BGLCurrency *arg1 = (QuantLib::BGLCurrency *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_BGLCurrency(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__BGLCurrency, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_BGLCurrency" "', argument " "1"" of type '" "QuantLib::BGLCurrency *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::BGLCurrency * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BRLCurrency) {
  {
    int argvi = 0;
    QuantLib::BRLCurrency *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_BRLCurrency();");
    }
    {
      try {
        result = (QuantLib::BRLCurrency *)new QuantLib::BRLCurrency();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__BRLCurrency, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_BRLCurrency) {
  {
    QuantLib::BRLCurrency *arg1 = (QuantLib::BRLCurrency *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_BRLCurrency(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__BRLCurrency, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_BRLCurrency" "', argument " "1"" of type '" "QuantLib::BRLCurrency *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::BRLCurrency * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BYRCurrency) {
  {
    int argvi = 0;
    QuantLib::BYRCurrency *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_BYRCurrency();");
    }
    {
      try {
        result = (QuantLib::BYRCurrency *)new QuantLib::BYRCurrency();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__BYRCurrency, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_BYRCurrency) {
  {
    QuantLib::BYRCurrency *arg1 = (QuantLib::BYRCurrency *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_BYRCurrency(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__BYRCurrency, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_BYRCurrency" "', argument " "1"" of type '" "QuantLib::BYRCurrency *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::BYRCurrency * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CADCurrency) {
  {
    int argvi = 0;
    QuantLib::CADCurrency *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_CADCurrency();");
    }
    {
      try {
        result = (QuantLib::CADCurrency *)new QuantLib::CADCurrency();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__CADCurrency, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_CADCurrency) {
  {
    QuantLib::CADCurrency *arg1 = (QuantLib::CADCurrency *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_CADCurrency(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__CADCurrency, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CADCurrency" "', argument " "1"" of type '" "QuantLib::CADCurrency *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::CADCurrency * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CHFCurrency) {
  {
    int argvi = 0;
    QuantLib::CHFCurrency *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_CHFCurrency();");
    }
    {
      try {
        result = (QuantLib::CHFCurrency *)new QuantLib::CHFCurrency();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__CHFCurrency, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_CHFCurrency) {
  {
    QuantLib::CHFCurrency *arg1 = (QuantLib::CHFCurrency *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_CHFCurrency(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__CHFCurrency, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CHFCurrency" "', argument " "1"" of type '" "QuantLib::CHFCurrency *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::CHFCurrency * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CLPCurrency) {
  {
    int argvi = 0;
    QuantLib::CLPCurrency *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_CLPCurrency();");
    }
    {
      try {
        result = (QuantLib::CLPCurrency *)new QuantLib::CLPCurrency();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__CLPCurrency, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_CLPCurrency) {
  {
    QuantLib::CLPCurrency *arg1 = (QuantLib::CLPCurrency *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_CLPCurrency(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__CLPCurrency, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CLPCurrency" "', argument " "1"" of type '" "QuantLib::CLPCurrency *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::CLPCurrency * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CNYCurrency) {
  {
    int argvi = 0;
    QuantLib::CNYCurrency *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_CNYCurrency();");
    }
    {
      try {
        result = (QuantLib::CNYCurrency *)new QuantLib::CNYCurrency();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__CNYCurrency, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_CNYCurrency) {
  {
    QuantLib::CNYCurrency *arg1 = (QuantLib::CNYCurrency *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_CNYCurrency(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__CNYCurrency, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CNYCurrency" "', argument " "1"" of type '" "QuantLib::CNYCurrency *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::CNYCurrency * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_COPCurrency) {
  {
    int argvi = 0;
    QuantLib::COPCurrency *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_COPCurrency();");
    }
    {
      try {
        result = (QuantLib::COPCurrency *)new QuantLib::COPCurrency();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__COPCurrency, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_COPCurrency) {
  {
    QuantLib::COPCurrency *arg1 = (QuantLib::COPCurrency *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_COPCurrency(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__COPCurrency, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_COPCurrency" "', argument " "1"" of type '" "QuantLib::COPCurrency *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::COPCurrency * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CYPCurrency) {
  {
    int argvi = 0;
    QuantLib::CYPCurrency *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_CYPCurrency();");
    }
    {
      try {
        result = (QuantLib::CYPCurrency *)new QuantLib::CYPCurrency();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__CYPCurrency, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_CYPCurrency) {
  {
    QuantLib::CYPCurrency *arg1 = (QuantLib::CYPCurrency *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_CYPCurrency(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__CYPCurrency, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CYPCurrency" "', argument " "1"" of type '" "QuantLib::CYPCurrency *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::CYPCurrency * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CZKCurrency) {
  {
    int argvi = 0;
    QuantLib::CZKCurrency *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_CZKCurrency();");
    }
    {
      try {
        result = (QuantLib::CZKCurrency *)new QuantLib::CZKCurrency();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__CZKCurrency, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_CZKCurrency) {
  {
    QuantLib::CZKCurrency *arg1 = (QuantLib::CZKCurrency *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_CZKCurrency(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__CZKCurrency, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CZKCurrency" "', argument " "1"" of type '" "QuantLib::CZKCurrency *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::CZKCurrency * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DEMCurrency) {
  {
    int argvi = 0;
    QuantLib::DEMCurrency *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_DEMCurrency();");
    }
    {
      try {
        result = (QuantLib::DEMCurrency *)new QuantLib::DEMCurrency();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__DEMCurrency, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_DEMCurrency) {
  {
    QuantLib::DEMCurrency *arg1 = (QuantLib::DEMCurrency *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_DEMCurrency(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__DEMCurrency, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DEMCurrency" "', argument " "1"" of type '" "QuantLib::DEMCurrency *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::DEMCurrency * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DKKCurrency) {
  {
    int argvi = 0;
    QuantLib::DKKCurrency *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_DKKCurrency();");
    }
    {
      try {
        result = (QuantLib::DKKCurrency *)new QuantLib::DKKCurrency();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__DKKCurrency, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_DKKCurrency) {
  {
    QuantLib::DKKCurrency *arg1 = (QuantLib::DKKCurrency *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_DKKCurrency(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__DKKCurrency, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DKKCurrency" "', argument " "1"" of type '" "QuantLib::DKKCurrency *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::DKKCurrency * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_EEKCurrency) {
  {
    int argvi = 0;
    QuantLib::EEKCurrency *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_EEKCurrency();");
    }
    {
      try {
        result = (QuantLib::EEKCurrency *)new QuantLib::EEKCurrency();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__EEKCurrency, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_EEKCurrency) {
  {
    QuantLib::EEKCurrency *arg1 = (QuantLib::EEKCurrency *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_EEKCurrency(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__EEKCurrency, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_EEKCurrency" "', argument " "1"" of type '" "QuantLib::EEKCurrency *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::EEKCurrency * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ESPCurrency) {
  {
    int argvi = 0;
    QuantLib::ESPCurrency *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_ESPCurrency();");
    }
    {
      try {
        result = (QuantLib::ESPCurrency *)new QuantLib::ESPCurrency();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__ESPCurrency, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_ESPCurrency) {
  {
    QuantLib::ESPCurrency *arg1 = (QuantLib::ESPCurrency *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_ESPCurrency(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__ESPCurrency, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ESPCurrency" "', argument " "1"" of type '" "QuantLib::ESPCurrency *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::ESPCurrency * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_EURCurrency) {
  {
    int argvi = 0;
    QuantLib::EURCurrency *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_EURCurrency();");
    }
    {
      try {
        result = (QuantLib::EURCurrency *)new QuantLib::EURCurrency();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__EURCurrency, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_EURCurrency) {
  {
    QuantLib::EURCurrency *arg1 = (QuantLib::EURCurrency *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_EURCurrency(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__EURCurrency, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_EURCurrency" "', argument " "1"" of type '" "QuantLib::EURCurrency *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::EURCurrency * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FIMCurrency) {
  {
    int argvi = 0;
    QuantLib::FIMCurrency *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_FIMCurrency();");
    }
    {
      try {
        result = (QuantLib::FIMCurrency *)new QuantLib::FIMCurrency();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__FIMCurrency, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_FIMCurrency) {
  {
    QuantLib::FIMCurrency *arg1 = (QuantLib::FIMCurrency *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_FIMCurrency(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__FIMCurrency, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FIMCurrency" "', argument " "1"" of type '" "QuantLib::FIMCurrency *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::FIMCurrency * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FRFCurrency) {
  {
    int argvi = 0;
    QuantLib::FRFCurrency *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_FRFCurrency();");
    }
    {
      try {
        result = (QuantLib::FRFCurrency *)new QuantLib::FRFCurrency();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__FRFCurrency, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_FRFCurrency) {
  {
    QuantLib::FRFCurrency *arg1 = (QuantLib::FRFCurrency *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_FRFCurrency(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__FRFCurrency, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FRFCurrency" "', argument " "1"" of type '" "QuantLib::FRFCurrency *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::FRFCurrency * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_GBPCurrency) {
  {
    int argvi = 0;
    QuantLib::GBPCurrency *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_GBPCurrency();");
    }
    {
      try {
        result = (QuantLib::GBPCurrency *)new QuantLib::GBPCurrency();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__GBPCurrency, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_GBPCurrency) {
  {
    QuantLib::GBPCurrency *arg1 = (QuantLib::GBPCurrency *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_GBPCurrency(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__GBPCurrency, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GBPCurrency" "', argument " "1"" of type '" "QuantLib::GBPCurrency *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::GBPCurrency * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_GRDCurrency) {
  {
    int argvi = 0;
    QuantLib::GRDCurrency *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_GRDCurrency();");
    }
    {
      try {
        result = (QuantLib::GRDCurrency *)new QuantLib::GRDCurrency();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__GRDCurrency, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_GRDCurrency) {
  {
    QuantLib::GRDCurrency *arg1 = (QuantLib::GRDCurrency *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_GRDCurrency(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__GRDCurrency, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GRDCurrency" "', argument " "1"" of type '" "QuantLib::GRDCurrency *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::GRDCurrency * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_HKDCurrency) {
  {
    int argvi = 0;
    QuantLib::HKDCurrency *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_HKDCurrency();");
    }
    {
      try {
        result = (QuantLib::HKDCurrency *)new QuantLib::HKDCurrency();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__HKDCurrency, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_HKDCurrency) {
  {
    QuantLib::HKDCurrency *arg1 = (QuantLib::HKDCurrency *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_HKDCurrency(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__HKDCurrency, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_HKDCurrency" "', argument " "1"" of type '" "QuantLib::HKDCurrency *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::HKDCurrency * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_HUFCurrency) {
  {
    int argvi = 0;
    QuantLib::HUFCurrency *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_HUFCurrency();");
    }
    {
      try {
        result = (QuantLib::HUFCurrency *)new QuantLib::HUFCurrency();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__HUFCurrency, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_HUFCurrency) {
  {
    QuantLib::HUFCurrency *arg1 = (QuantLib::HUFCurrency *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_HUFCurrency(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__HUFCurrency, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_HUFCurrency" "', argument " "1"" of type '" "QuantLib::HUFCurrency *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::HUFCurrency * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_IEPCurrency) {
  {
    int argvi = 0;
    QuantLib::IEPCurrency *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_IEPCurrency();");
    }
    {
      try {
        result = (QuantLib::IEPCurrency *)new QuantLib::IEPCurrency();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__IEPCurrency, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_IEPCurrency) {
  {
    QuantLib::IEPCurrency *arg1 = (QuantLib::IEPCurrency *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_IEPCurrency(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__IEPCurrency, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IEPCurrency" "', argument " "1"" of type '" "QuantLib::IEPCurrency *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::IEPCurrency * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_IDRCurrency) {
  {
    int argvi = 0;
    QuantLib::IDRCurrency *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_IDRCurrency();");
    }
    {
      try {
        result = (QuantLib::IDRCurrency *)new QuantLib::IDRCurrency();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__IDRCurrency, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_IDRCurrency) {
  {
    QuantLib::IDRCurrency *arg1 = (QuantLib::IDRCurrency *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_IDRCurrency(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__IDRCurrency, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IDRCurrency" "', argument " "1"" of type '" "QuantLib::IDRCurrency *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::IDRCurrency * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ILSCurrency) {
  {
    int argvi = 0;
    QuantLib::ILSCurrency *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_ILSCurrency();");
    }
    {
      try {
        result = (QuantLib::ILSCurrency *)new QuantLib::ILSCurrency();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__ILSCurrency, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_ILSCurrency) {
  {
    QuantLib::ILSCurrency *arg1 = (QuantLib::ILSCurrency *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_ILSCurrency(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__ILSCurrency, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ILSCurrency" "', argument " "1"" of type '" "QuantLib::ILSCurrency *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::ILSCurrency * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_INRCurrency) {
  {
    int argvi = 0;
    QuantLib::INRCurrency *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_INRCurrency();");
    }
    {
      try {
        result = (QuantLib::INRCurrency *)new QuantLib::INRCurrency();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__INRCurrency, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_INRCurrency) {
  {
    QuantLib::INRCurrency *arg1 = (QuantLib::INRCurrency *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_INRCurrency(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__INRCurrency, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_INRCurrency" "', argument " "1"" of type '" "QuantLib::INRCurrency *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::INRCurrency * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_IQDCurrency) {
  {
    int argvi = 0;
    QuantLib::IQDCurrency *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_IQDCurrency();");
    }
    {
      try {
        result = (QuantLib::IQDCurrency *)new QuantLib::IQDCurrency();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__IQDCurrency, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_IQDCurrency) {
  {
    QuantLib::IQDCurrency *arg1 = (QuantLib::IQDCurrency *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_IQDCurrency(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__IQDCurrency, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IQDCurrency" "', argument " "1"" of type '" "QuantLib::IQDCurrency *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::IQDCurrency * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_IRRCurrency) {
  {
    int argvi = 0;
    QuantLib::IRRCurrency *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_IRRCurrency();");
    }
    {
      try {
        result = (QuantLib::IRRCurrency *)new QuantLib::IRRCurrency();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__IRRCurrency, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_IRRCurrency) {
  {
    QuantLib::IRRCurrency *arg1 = (QuantLib::IRRCurrency *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_IRRCurrency(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__IRRCurrency, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IRRCurrency" "', argument " "1"" of type '" "QuantLib::IRRCurrency *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::IRRCurrency * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ISKCurrency) {
  {
    int argvi = 0;
    QuantLib::ISKCurrency *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_ISKCurrency();");
    }
    {
      try {
        result = (QuantLib::ISKCurrency *)new QuantLib::ISKCurrency();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__ISKCurrency, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_ISKCurrency) {
  {
    QuantLib::ISKCurrency *arg1 = (QuantLib::ISKCurrency *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_ISKCurrency(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__ISKCurrency, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ISKCurrency" "', argument " "1"" of type '" "QuantLib::ISKCurrency *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::ISKCurrency * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ITLCurrency) {
  {
    int argvi = 0;
    QuantLib::ITLCurrency *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_ITLCurrency();");
    }
    {
      try {
        result = (QuantLib::ITLCurrency *)new QuantLib::ITLCurrency();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__ITLCurrency, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_ITLCurrency) {
  {
    QuantLib::ITLCurrency *arg1 = (QuantLib::ITLCurrency *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_ITLCurrency(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__ITLCurrency, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ITLCurrency" "', argument " "1"" of type '" "QuantLib::ITLCurrency *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::ITLCurrency * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_JPYCurrency) {
  {
    int argvi = 0;
    QuantLib::JPYCurrency *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_JPYCurrency();");
    }
    {
      try {
        result = (QuantLib::JPYCurrency *)new QuantLib::JPYCurrency();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__JPYCurrency, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_JPYCurrency) {
  {
    QuantLib::JPYCurrency *arg1 = (QuantLib::JPYCurrency *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_JPYCurrency(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__JPYCurrency, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_JPYCurrency" "', argument " "1"" of type '" "QuantLib::JPYCurrency *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::JPYCurrency * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_KRWCurrency) {
  {
    int argvi = 0;
    QuantLib::KRWCurrency *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_KRWCurrency();");
    }
    {
      try {
        result = (QuantLib::KRWCurrency *)new QuantLib::KRWCurrency();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__KRWCurrency, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_KRWCurrency) {
  {
    QuantLib::KRWCurrency *arg1 = (QuantLib::KRWCurrency *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_KRWCurrency(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__KRWCurrency, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_KRWCurrency" "', argument " "1"" of type '" "QuantLib::KRWCurrency *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::KRWCurrency * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_KWDCurrency) {
  {
    int argvi = 0;
    QuantLib::KWDCurrency *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_KWDCurrency();");
    }
    {
      try {
        result = (QuantLib::KWDCurrency *)new QuantLib::KWDCurrency();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__KWDCurrency, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_KWDCurrency) {
  {
    QuantLib::KWDCurrency *arg1 = (QuantLib::KWDCurrency *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_KWDCurrency(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__KWDCurrency, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_KWDCurrency" "', argument " "1"" of type '" "QuantLib::KWDCurrency *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::KWDCurrency * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_LTLCurrency) {
  {
    int argvi = 0;
    QuantLib::LTLCurrency *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_LTLCurrency();");
    }
    {
      try {
        result = (QuantLib::LTLCurrency *)new QuantLib::LTLCurrency();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__LTLCurrency, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_LTLCurrency) {
  {
    QuantLib::LTLCurrency *arg1 = (QuantLib::LTLCurrency *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_LTLCurrency(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__LTLCurrency, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_LTLCurrency" "', argument " "1"" of type '" "QuantLib::LTLCurrency *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::LTLCurrency * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_LUFCurrency) {
  {
    int argvi = 0;
    QuantLib::LUFCurrency *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_LUFCurrency();");
    }
    {
      try {
        result = (QuantLib::LUFCurrency *)new QuantLib::LUFCurrency();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__LUFCurrency, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_LUFCurrency) {
  {
    QuantLib::LUFCurrency *arg1 = (QuantLib::LUFCurrency *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_LUFCurrency(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__LUFCurrency, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_LUFCurrency" "', argument " "1"" of type '" "QuantLib::LUFCurrency *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::LUFCurrency * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_LVLCurrency) {
  {
    int argvi = 0;
    QuantLib::LVLCurrency *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_LVLCurrency();");
    }
    {
      try {
        result = (QuantLib::LVLCurrency *)new QuantLib::LVLCurrency();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__LVLCurrency, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_LVLCurrency) {
  {
    QuantLib::LVLCurrency *arg1 = (QuantLib::LVLCurrency *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_LVLCurrency(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__LVLCurrency, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_LVLCurrency" "', argument " "1"" of type '" "QuantLib::LVLCurrency *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::LVLCurrency * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MTLCurrency) {
  {
    int argvi = 0;
    QuantLib::MTLCurrency *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_MTLCurrency();");
    }
    {
      try {
        result = (QuantLib::MTLCurrency *)new QuantLib::MTLCurrency();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__MTLCurrency, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_MTLCurrency) {
  {
    QuantLib::MTLCurrency *arg1 = (QuantLib::MTLCurrency *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_MTLCurrency(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__MTLCurrency, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MTLCurrency" "', argument " "1"" of type '" "QuantLib::MTLCurrency *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::MTLCurrency * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MXNCurrency) {
  {
    int argvi = 0;
    QuantLib::MXNCurrency *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_MXNCurrency();");
    }
    {
      try {
        result = (QuantLib::MXNCurrency *)new QuantLib::MXNCurrency();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__MXNCurrency, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_MXNCurrency) {
  {
    QuantLib::MXNCurrency *arg1 = (QuantLib::MXNCurrency *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_MXNCurrency(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__MXNCurrency, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MXNCurrency" "', argument " "1"" of type '" "QuantLib::MXNCurrency *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::MXNCurrency * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MYRCurrency) {
  {
    int argvi = 0;
    QuantLib::MYRCurrency *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_MYRCurrency();");
    }
    {
      try {
        result = (QuantLib::MYRCurrency *)new QuantLib::MYRCurrency();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__MYRCurrency, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_MYRCurrency) {
  {
    QuantLib::MYRCurrency *arg1 = (QuantLib::MYRCurrency *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_MYRCurrency(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__MYRCurrency, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MYRCurrency" "', argument " "1"" of type '" "QuantLib::MYRCurrency *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::MYRCurrency * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_NLGCurrency) {
  {
    int argvi = 0;
    QuantLib::NLGCurrency *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_NLGCurrency();");
    }
    {
      try {
        result = (QuantLib::NLGCurrency *)new QuantLib::NLGCurrency();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__NLGCurrency, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_NLGCurrency) {
  {
    QuantLib::NLGCurrency *arg1 = (QuantLib::NLGCurrency *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_NLGCurrency(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__NLGCurrency, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_NLGCurrency" "', argument " "1"" of type '" "QuantLib::NLGCurrency *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::NLGCurrency * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_NOKCurrency) {
  {
    int argvi = 0;
    QuantLib::NOKCurrency *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_NOKCurrency();");
    }
    {
      try {
        result = (QuantLib::NOKCurrency *)new QuantLib::NOKCurrency();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__NOKCurrency, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_NOKCurrency) {
  {
    QuantLib::NOKCurrency *arg1 = (QuantLib::NOKCurrency *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_NOKCurrency(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__NOKCurrency, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_NOKCurrency" "', argument " "1"" of type '" "QuantLib::NOKCurrency *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::NOKCurrency * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_NPRCurrency) {
  {
    int argvi = 0;
    QuantLib::NPRCurrency *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_NPRCurrency();");
    }
    {
      try {
        result = (QuantLib::NPRCurrency *)new QuantLib::NPRCurrency();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__NPRCurrency, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_NPRCurrency) {
  {
    QuantLib::NPRCurrency *arg1 = (QuantLib::NPRCurrency *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_NPRCurrency(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__NPRCurrency, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_NPRCurrency" "', argument " "1"" of type '" "QuantLib::NPRCurrency *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::NPRCurrency * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_NZDCurrency) {
  {
    int argvi = 0;
    QuantLib::NZDCurrency *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_NZDCurrency();");
    }
    {
      try {
        result = (QuantLib::NZDCurrency *)new QuantLib::NZDCurrency();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__NZDCurrency, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_NZDCurrency) {
  {
    QuantLib::NZDCurrency *arg1 = (QuantLib::NZDCurrency *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_NZDCurrency(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__NZDCurrency, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_NZDCurrency" "', argument " "1"" of type '" "QuantLib::NZDCurrency *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::NZDCurrency * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PEHCurrency) {
  {
    int argvi = 0;
    QuantLib::PEHCurrency *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_PEHCurrency();");
    }
    {
      try {
        result = (QuantLib::PEHCurrency *)new QuantLib::PEHCurrency();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__PEHCurrency, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_PEHCurrency) {
  {
    QuantLib::PEHCurrency *arg1 = (QuantLib::PEHCurrency *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_PEHCurrency(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__PEHCurrency, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_PEHCurrency" "', argument " "1"" of type '" "QuantLib::PEHCurrency *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::PEHCurrency * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PEICurrency) {
  {
    int argvi = 0;
    QuantLib::PEICurrency *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_PEICurrency();");
    }
    {
      try {
        result = (QuantLib::PEICurrency *)new QuantLib::PEICurrency();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__PEICurrency, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_PEICurrency) {
  {
    QuantLib::PEICurrency *arg1 = (QuantLib::PEICurrency *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_PEICurrency(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__PEICurrency, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_PEICurrency" "', argument " "1"" of type '" "QuantLib::PEICurrency *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::PEICurrency * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PENCurrency) {
  {
    int argvi = 0;
    QuantLib::PENCurrency *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_PENCurrency();");
    }
    {
      try {
        result = (QuantLib::PENCurrency *)new QuantLib::PENCurrency();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__PENCurrency, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_PENCurrency) {
  {
    QuantLib::PENCurrency *arg1 = (QuantLib::PENCurrency *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_PENCurrency(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__PENCurrency, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_PENCurrency" "', argument " "1"" of type '" "QuantLib::PENCurrency *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::PENCurrency * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PKRCurrency) {
  {
    int argvi = 0;
    QuantLib::PKRCurrency *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_PKRCurrency();");
    }
    {
      try {
        result = (QuantLib::PKRCurrency *)new QuantLib::PKRCurrency();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__PKRCurrency, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_PKRCurrency) {
  {
    QuantLib::PKRCurrency *arg1 = (QuantLib::PKRCurrency *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_PKRCurrency(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__PKRCurrency, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_PKRCurrency" "', argument " "1"" of type '" "QuantLib::PKRCurrency *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::PKRCurrency * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PLNCurrency) {
  {
    int argvi = 0;
    QuantLib::PLNCurrency *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_PLNCurrency();");
    }
    {
      try {
        result = (QuantLib::PLNCurrency *)new QuantLib::PLNCurrency();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__PLNCurrency, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_PLNCurrency) {
  {
    QuantLib::PLNCurrency *arg1 = (QuantLib::PLNCurrency *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_PLNCurrency(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__PLNCurrency, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_PLNCurrency" "', argument " "1"" of type '" "QuantLib::PLNCurrency *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::PLNCurrency * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PTECurrency) {
  {
    int argvi = 0;
    QuantLib::PTECurrency *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_PTECurrency();");
    }
    {
      try {
        result = (QuantLib::PTECurrency *)new QuantLib::PTECurrency();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__PTECurrency, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_PTECurrency) {
  {
    QuantLib::PTECurrency *arg1 = (QuantLib::PTECurrency *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_PTECurrency(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__PTECurrency, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_PTECurrency" "', argument " "1"" of type '" "QuantLib::PTECurrency *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::PTECurrency * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ROLCurrency) {
  {
    int argvi = 0;
    QuantLib::ROLCurrency *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_ROLCurrency();");
    }
    {
      try {
        result = (QuantLib::ROLCurrency *)new QuantLib::ROLCurrency();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__ROLCurrency, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_ROLCurrency) {
  {
    QuantLib::ROLCurrency *arg1 = (QuantLib::ROLCurrency *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_ROLCurrency(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__ROLCurrency, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ROLCurrency" "', argument " "1"" of type '" "QuantLib::ROLCurrency *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::ROLCurrency * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_RONCurrency) {
  {
    int argvi = 0;
    QuantLib::RONCurrency *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_RONCurrency();");
    }
    {
      try {
        result = (QuantLib::RONCurrency *)new QuantLib::RONCurrency();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__RONCurrency, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_RONCurrency) {
  {
    QuantLib::RONCurrency *arg1 = (QuantLib::RONCurrency *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_RONCurrency(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__RONCurrency, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_RONCurrency" "', argument " "1"" of type '" "QuantLib::RONCurrency *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::RONCurrency * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_RUBCurrency) {
  {
    int argvi = 0;
    QuantLib::RUBCurrency *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_RUBCurrency();");
    }
    {
      try {
        result = (QuantLib::RUBCurrency *)new QuantLib::RUBCurrency();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__RUBCurrency, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_RUBCurrency) {
  {
    QuantLib::RUBCurrency *arg1 = (QuantLib::RUBCurrency *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_RUBCurrency(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__RUBCurrency, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_RUBCurrency" "', argument " "1"" of type '" "QuantLib::RUBCurrency *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::RUBCurrency * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SARCurrency) {
  {
    int argvi = 0;
    QuantLib::SARCurrency *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_SARCurrency();");
    }
    {
      try {
        result = (QuantLib::SARCurrency *)new QuantLib::SARCurrency();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__SARCurrency, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_SARCurrency) {
  {
    QuantLib::SARCurrency *arg1 = (QuantLib::SARCurrency *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_SARCurrency(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__SARCurrency, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SARCurrency" "', argument " "1"" of type '" "QuantLib::SARCurrency *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::SARCurrency * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SEKCurrency) {
  {
    int argvi = 0;
    QuantLib::SEKCurrency *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_SEKCurrency();");
    }
    {
      try {
        result = (QuantLib::SEKCurrency *)new QuantLib::SEKCurrency();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__SEKCurrency, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_SEKCurrency) {
  {
    QuantLib::SEKCurrency *arg1 = (QuantLib::SEKCurrency *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_SEKCurrency(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__SEKCurrency, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SEKCurrency" "', argument " "1"" of type '" "QuantLib::SEKCurrency *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::SEKCurrency * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SGDCurrency) {
  {
    int argvi = 0;
    QuantLib::SGDCurrency *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_SGDCurrency();");
    }
    {
      try {
        result = (QuantLib::SGDCurrency *)new QuantLib::SGDCurrency();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__SGDCurrency, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_SGDCurrency) {
  {
    QuantLib::SGDCurrency *arg1 = (QuantLib::SGDCurrency *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_SGDCurrency(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__SGDCurrency, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SGDCurrency" "', argument " "1"" of type '" "QuantLib::SGDCurrency *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::SGDCurrency * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SITCurrency) {
  {
    int argvi = 0;
    QuantLib::SITCurrency *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_SITCurrency();");
    }
    {
      try {
        result = (QuantLib::SITCurrency *)new QuantLib::SITCurrency();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__SITCurrency, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_SITCurrency) {
  {
    QuantLib::SITCurrency *arg1 = (QuantLib::SITCurrency *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_SITCurrency(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__SITCurrency, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SITCurrency" "', argument " "1"" of type '" "QuantLib::SITCurrency *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::SITCurrency * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SKKCurrency) {
  {
    int argvi = 0;
    QuantLib::SKKCurrency *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_SKKCurrency();");
    }
    {
      try {
        result = (QuantLib::SKKCurrency *)new QuantLib::SKKCurrency();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__SKKCurrency, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_SKKCurrency) {
  {
    QuantLib::SKKCurrency *arg1 = (QuantLib::SKKCurrency *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_SKKCurrency(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__SKKCurrency, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SKKCurrency" "', argument " "1"" of type '" "QuantLib::SKKCurrency *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::SKKCurrency * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_THBCurrency) {
  {
    int argvi = 0;
    QuantLib::THBCurrency *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_THBCurrency();");
    }
    {
      try {
        result = (QuantLib::THBCurrency *)new QuantLib::THBCurrency();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__THBCurrency, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_THBCurrency) {
  {
    QuantLib::THBCurrency *arg1 = (QuantLib::THBCurrency *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_THBCurrency(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__THBCurrency, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_THBCurrency" "', argument " "1"" of type '" "QuantLib::THBCurrency *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::THBCurrency * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_TRLCurrency) {
  {
    int argvi = 0;
    QuantLib::TRLCurrency *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_TRLCurrency();");
    }
    {
      try {
        result = (QuantLib::TRLCurrency *)new QuantLib::TRLCurrency();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__TRLCurrency, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_TRLCurrency) {
  {
    QuantLib::TRLCurrency *arg1 = (QuantLib::TRLCurrency *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_TRLCurrency(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__TRLCurrency, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_TRLCurrency" "', argument " "1"" of type '" "QuantLib::TRLCurrency *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::TRLCurrency * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_TRYCurrency) {
  {
    int argvi = 0;
    QuantLib::TRYCurrency *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_TRYCurrency();");
    }
    {
      try {
        result = (QuantLib::TRYCurrency *)new QuantLib::TRYCurrency();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__TRYCurrency, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_TRYCurrency) {
  {
    QuantLib::TRYCurrency *arg1 = (QuantLib::TRYCurrency *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_TRYCurrency(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__TRYCurrency, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_TRYCurrency" "', argument " "1"" of type '" "QuantLib::TRYCurrency *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::TRYCurrency * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_TTDCurrency) {
  {
    int argvi = 0;
    QuantLib::TTDCurrency *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_TTDCurrency();");
    }
    {
      try {
        result = (QuantLib::TTDCurrency *)new QuantLib::TTDCurrency();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__TTDCurrency, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_TTDCurrency) {
  {
    QuantLib::TTDCurrency *arg1 = (QuantLib::TTDCurrency *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_TTDCurrency(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__TTDCurrency, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_TTDCurrency" "', argument " "1"" of type '" "QuantLib::TTDCurrency *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::TTDCurrency * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_TWDCurrency) {
  {
    int argvi = 0;
    QuantLib::TWDCurrency *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_TWDCurrency();");
    }
    {
      try {
        result = (QuantLib::TWDCurrency *)new QuantLib::TWDCurrency();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__TWDCurrency, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_TWDCurrency) {
  {
    QuantLib::TWDCurrency *arg1 = (QuantLib::TWDCurrency *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_TWDCurrency(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__TWDCurrency, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_TWDCurrency" "', argument " "1"" of type '" "QuantLib::TWDCurrency *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::TWDCurrency * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_USDCurrency) {
  {
    int argvi = 0;
    QuantLib::USDCurrency *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_USDCurrency();");
    }
    {
      try {
        result = (QuantLib::USDCurrency *)new QuantLib::USDCurrency();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__USDCurrency, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_USDCurrency) {
  {
    QuantLib::USDCurrency *arg1 = (QuantLib::USDCurrency *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_USDCurrency(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__USDCurrency, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_USDCurrency" "', argument " "1"" of type '" "QuantLib::USDCurrency *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::USDCurrency * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_VEBCurrency) {
  {
    int argvi = 0;
    QuantLib::VEBCurrency *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_VEBCurrency();");
    }
    {
      try {
        result = (QuantLib::VEBCurrency *)new QuantLib::VEBCurrency();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__VEBCurrency, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_VEBCurrency) {
  {
    QuantLib::VEBCurrency *arg1 = (QuantLib::VEBCurrency *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_VEBCurrency(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__VEBCurrency, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_VEBCurrency" "', argument " "1"" of type '" "QuantLib::VEBCurrency *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::VEBCurrency * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_VNDCurrency) {
  {
    int argvi = 0;
    QuantLib::VNDCurrency *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_VNDCurrency();");
    }
    {
      try {
        result = (QuantLib::VNDCurrency *)new QuantLib::VNDCurrency();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__VNDCurrency, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_VNDCurrency) {
  {
    QuantLib::VNDCurrency *arg1 = (QuantLib::VNDCurrency *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_VNDCurrency(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__VNDCurrency, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_VNDCurrency" "', argument " "1"" of type '" "QuantLib::VNDCurrency *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::VNDCurrency * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ZARCurrency) {
  {
    int argvi = 0;
    QuantLib::ZARCurrency *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_ZARCurrency();");
    }
    {
      try {
        result = (QuantLib::ZARCurrency *)new QuantLib::ZARCurrency();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantLib__ZARCurrency, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_ZARCurrency) {
  {
    QuantLib::ZARCurrency *arg1 = (QuantLib::ZARCurrency *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_ZARCurrency(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantLib__ZARCurrency, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ZARCurrency" "', argument " "1"" of type '" "QuantLib::ZARCurrency *""'"); 
    }
    arg1 = reinterpret_cast< QuantLib::ZARCurrency * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_LinearInterpolation) {
  {
    Array *arg1 = 0 ;
    Array *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    SafeLinearInterpolation *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_LinearInterpolation(x,y);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_LinearInterpolation" "', argument " "1"" of type '" "Array const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LinearInterpolation" "', argument " "1"" of type '" "Array const &""'"); 
    }
    arg1 = reinterpret_cast< Array * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_LinearInterpolation" "', argument " "2"" of type '" "Array const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LinearInterpolation" "', argument " "2"" of type '" "Array const &""'"); 
    }
    arg2 = reinterpret_cast< Array * >(argp2);
    {
      try {
        result = (SafeLinearInterpolation *)new SafeLinearInterpolation((Array const &)*arg1,(Array const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SafeLinearInterpolation, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_LinearInterpolation_call__SWIG_0) {
  {
    SafeLinearInterpolation *arg1 = (SafeLinearInterpolation *) 0 ;
    Real arg2 ;
    bool arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: LinearInterpolation_call(self,x,allowExtrapolation);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeLinearInterpolation, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LinearInterpolation_call" "', argument " "1"" of type '" "SafeLinearInterpolation *""'"); 
    }
    arg1 = reinterpret_cast< SafeLinearInterpolation * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LinearInterpolation_call" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "LinearInterpolation_call" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (Real)(arg1)->operator ()(arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_LinearInterpolation_call__SWIG_1) {
  {
    SafeLinearInterpolation *arg1 = (SafeLinearInterpolation *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: LinearInterpolation_call(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeLinearInterpolation, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LinearInterpolation_call" "', argument " "1"" of type '" "SafeLinearInterpolation *""'"); 
    }
    arg1 = reinterpret_cast< SafeLinearInterpolation * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LinearInterpolation_call" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (Real)(arg1)->operator ()(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_LinearInterpolation_call) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeLinearInterpolation, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeLinearInterpolation, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_LinearInterpolation_call__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_LinearInterpolation_call__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'LinearInterpolation_call'");
  XSRETURN(0);
}


XS(_wrap_delete_LinearInterpolation) {
  {
    SafeLinearInterpolation *arg1 = (SafeLinearInterpolation *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_LinearInterpolation(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeLinearInterpolation, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_LinearInterpolation" "', argument " "1"" of type '" "SafeLinearInterpolation *""'"); 
    }
    arg1 = reinterpret_cast< SafeLinearInterpolation * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_LogLinearInterpolation) {
  {
    Array *arg1 = 0 ;
    Array *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    SafeLogLinearInterpolation *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_LogLinearInterpolation(x,y);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_LogLinearInterpolation" "', argument " "1"" of type '" "Array const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LogLinearInterpolation" "', argument " "1"" of type '" "Array const &""'"); 
    }
    arg1 = reinterpret_cast< Array * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_LogLinearInterpolation" "', argument " "2"" of type '" "Array const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LogLinearInterpolation" "', argument " "2"" of type '" "Array const &""'"); 
    }
    arg2 = reinterpret_cast< Array * >(argp2);
    {
      try {
        result = (SafeLogLinearInterpolation *)new SafeLogLinearInterpolation((Array const &)*arg1,(Array const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SafeLogLinearInterpolation, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_LogLinearInterpolation_call__SWIG_0) {
  {
    SafeLogLinearInterpolation *arg1 = (SafeLogLinearInterpolation *) 0 ;
    Real arg2 ;
    bool arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: LogLinearInterpolation_call(self,x,allowExtrapolation);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeLogLinearInterpolation, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LogLinearInterpolation_call" "', argument " "1"" of type '" "SafeLogLinearInterpolation *""'"); 
    }
    arg1 = reinterpret_cast< SafeLogLinearInterpolation * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LogLinearInterpolation_call" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "LogLinearInterpolation_call" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (Real)(arg1)->operator ()(arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_LogLinearInterpolation_call__SWIG_1) {
  {
    SafeLogLinearInterpolation *arg1 = (SafeLogLinearInterpolation *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: LogLinearInterpolation_call(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeLogLinearInterpolation, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LogLinearInterpolation_call" "', argument " "1"" of type '" "SafeLogLinearInterpolation *""'"); 
    }
    arg1 = reinterpret_cast< SafeLogLinearInterpolation * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LogLinearInterpolation_call" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (Real)(arg1)->operator ()(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_LogLinearInterpolation_call) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeLogLinearInterpolation, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeLogLinearInterpolation, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_LogLinearInterpolation_call__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_LogLinearInterpolation_call__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'LogLinearInterpolation_call'");
  XSRETURN(0);
}


XS(_wrap_delete_LogLinearInterpolation) {
  {
    SafeLogLinearInterpolation *arg1 = (SafeLogLinearInterpolation *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_LogLinearInterpolation(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeLogLinearInterpolation, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_LogLinearInterpolation" "', argument " "1"" of type '" "SafeLogLinearInterpolation *""'"); 
    }
    arg1 = reinterpret_cast< SafeLogLinearInterpolation * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BackwardFlatInterpolation) {
  {
    Array *arg1 = 0 ;
    Array *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    SafeBackwardFlatInterpolation *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_BackwardFlatInterpolation(x,y);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_BackwardFlatInterpolation" "', argument " "1"" of type '" "Array const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BackwardFlatInterpolation" "', argument " "1"" of type '" "Array const &""'"); 
    }
    arg1 = reinterpret_cast< Array * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_BackwardFlatInterpolation" "', argument " "2"" of type '" "Array const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BackwardFlatInterpolation" "', argument " "2"" of type '" "Array const &""'"); 
    }
    arg2 = reinterpret_cast< Array * >(argp2);
    {
      try {
        result = (SafeBackwardFlatInterpolation *)new SafeBackwardFlatInterpolation((Array const &)*arg1,(Array const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SafeBackwardFlatInterpolation, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BackwardFlatInterpolation_call__SWIG_0) {
  {
    SafeBackwardFlatInterpolation *arg1 = (SafeBackwardFlatInterpolation *) 0 ;
    Real arg2 ;
    bool arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: BackwardFlatInterpolation_call(self,x,allowExtrapolation);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeBackwardFlatInterpolation, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BackwardFlatInterpolation_call" "', argument " "1"" of type '" "SafeBackwardFlatInterpolation *""'"); 
    }
    arg1 = reinterpret_cast< SafeBackwardFlatInterpolation * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BackwardFlatInterpolation_call" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "BackwardFlatInterpolation_call" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (Real)(arg1)->operator ()(arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BackwardFlatInterpolation_call__SWIG_1) {
  {
    SafeBackwardFlatInterpolation *arg1 = (SafeBackwardFlatInterpolation *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: BackwardFlatInterpolation_call(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeBackwardFlatInterpolation, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BackwardFlatInterpolation_call" "', argument " "1"" of type '" "SafeBackwardFlatInterpolation *""'"); 
    }
    arg1 = reinterpret_cast< SafeBackwardFlatInterpolation * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BackwardFlatInterpolation_call" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (Real)(arg1)->operator ()(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BackwardFlatInterpolation_call) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeBackwardFlatInterpolation, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeBackwardFlatInterpolation, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BackwardFlatInterpolation_call__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BackwardFlatInterpolation_call__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'BackwardFlatInterpolation_call'");
  XSRETURN(0);
}


XS(_wrap_delete_BackwardFlatInterpolation) {
  {
    SafeBackwardFlatInterpolation *arg1 = (SafeBackwardFlatInterpolation *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_BackwardFlatInterpolation(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeBackwardFlatInterpolation, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_BackwardFlatInterpolation" "', argument " "1"" of type '" "SafeBackwardFlatInterpolation *""'"); 
    }
    arg1 = reinterpret_cast< SafeBackwardFlatInterpolation * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ForwardFlatInterpolation) {
  {
    Array *arg1 = 0 ;
    Array *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    SafeForwardFlatInterpolation *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_ForwardFlatInterpolation(x,y);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ForwardFlatInterpolation" "', argument " "1"" of type '" "Array const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ForwardFlatInterpolation" "', argument " "1"" of type '" "Array const &""'"); 
    }
    arg1 = reinterpret_cast< Array * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ForwardFlatInterpolation" "', argument " "2"" of type '" "Array const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ForwardFlatInterpolation" "', argument " "2"" of type '" "Array const &""'"); 
    }
    arg2 = reinterpret_cast< Array * >(argp2);
    {
      try {
        result = (SafeForwardFlatInterpolation *)new SafeForwardFlatInterpolation((Array const &)*arg1,(Array const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SafeForwardFlatInterpolation, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_ForwardFlatInterpolation_call__SWIG_0) {
  {
    SafeForwardFlatInterpolation *arg1 = (SafeForwardFlatInterpolation *) 0 ;
    Real arg2 ;
    bool arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: ForwardFlatInterpolation_call(self,x,allowExtrapolation);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeForwardFlatInterpolation, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ForwardFlatInterpolation_call" "', argument " "1"" of type '" "SafeForwardFlatInterpolation *""'"); 
    }
    arg1 = reinterpret_cast< SafeForwardFlatInterpolation * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ForwardFlatInterpolation_call" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ForwardFlatInterpolation_call" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (Real)(arg1)->operator ()(arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_ForwardFlatInterpolation_call__SWIG_1) {
  {
    SafeForwardFlatInterpolation *arg1 = (SafeForwardFlatInterpolation *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: ForwardFlatInterpolation_call(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeForwardFlatInterpolation, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ForwardFlatInterpolation_call" "', argument " "1"" of type '" "SafeForwardFlatInterpolation *""'"); 
    }
    arg1 = reinterpret_cast< SafeForwardFlatInterpolation * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ForwardFlatInterpolation_call" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (Real)(arg1)->operator ()(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_ForwardFlatInterpolation_call) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeForwardFlatInterpolation, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeForwardFlatInterpolation, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_ForwardFlatInterpolation_call__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_ForwardFlatInterpolation_call__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'ForwardFlatInterpolation_call'");
  XSRETURN(0);
}


XS(_wrap_delete_ForwardFlatInterpolation) {
  {
    SafeForwardFlatInterpolation *arg1 = (SafeForwardFlatInterpolation *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_ForwardFlatInterpolation(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeForwardFlatInterpolation, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ForwardFlatInterpolation" "', argument " "1"" of type '" "SafeForwardFlatInterpolation *""'"); 
    }
    arg1 = reinterpret_cast< SafeForwardFlatInterpolation * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CubicNaturalSpline) {
  {
    Array *arg1 = 0 ;
    Array *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    SafeCubicNaturalSpline *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_CubicNaturalSpline(x,y);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CubicNaturalSpline" "', argument " "1"" of type '" "Array const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CubicNaturalSpline" "', argument " "1"" of type '" "Array const &""'"); 
    }
    arg1 = reinterpret_cast< Array * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CubicNaturalSpline" "', argument " "2"" of type '" "Array const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CubicNaturalSpline" "', argument " "2"" of type '" "Array const &""'"); 
    }
    arg2 = reinterpret_cast< Array * >(argp2);
    {
      try {
        result = (SafeCubicNaturalSpline *)new SafeCubicNaturalSpline((Array const &)*arg1,(Array const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SafeCubicNaturalSpline, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CubicNaturalSpline_call__SWIG_0) {
  {
    SafeCubicNaturalSpline *arg1 = (SafeCubicNaturalSpline *) 0 ;
    Real arg2 ;
    bool arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: CubicNaturalSpline_call(self,x,allowExtrapolation);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeCubicNaturalSpline, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CubicNaturalSpline_call" "', argument " "1"" of type '" "SafeCubicNaturalSpline *""'"); 
    }
    arg1 = reinterpret_cast< SafeCubicNaturalSpline * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CubicNaturalSpline_call" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CubicNaturalSpline_call" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (Real)(arg1)->operator ()(arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CubicNaturalSpline_call__SWIG_1) {
  {
    SafeCubicNaturalSpline *arg1 = (SafeCubicNaturalSpline *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: CubicNaturalSpline_call(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeCubicNaturalSpline, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CubicNaturalSpline_call" "', argument " "1"" of type '" "SafeCubicNaturalSpline *""'"); 
    }
    arg1 = reinterpret_cast< SafeCubicNaturalSpline * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CubicNaturalSpline_call" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (Real)(arg1)->operator ()(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CubicNaturalSpline_call) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeCubicNaturalSpline, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeCubicNaturalSpline, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CubicNaturalSpline_call__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CubicNaturalSpline_call__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'CubicNaturalSpline_call'");
  XSRETURN(0);
}


XS(_wrap_CubicNaturalSpline_derivative__SWIG_0) {
  {
    SafeCubicNaturalSpline *arg1 = (SafeCubicNaturalSpline *) 0 ;
    Real arg2 ;
    bool arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: CubicNaturalSpline_derivative(self,x,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeCubicNaturalSpline, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CubicNaturalSpline_derivative" "', argument " "1"" of type '" "SafeCubicNaturalSpline *""'"); 
    }
    arg1 = reinterpret_cast< SafeCubicNaturalSpline * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CubicNaturalSpline_derivative" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CubicNaturalSpline_derivative" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (Real)SafeCubicNaturalSpline_derivative__SWIG_0(arg1,arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CubicNaturalSpline_derivative__SWIG_1) {
  {
    SafeCubicNaturalSpline *arg1 = (SafeCubicNaturalSpline *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: CubicNaturalSpline_derivative(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeCubicNaturalSpline, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CubicNaturalSpline_derivative" "', argument " "1"" of type '" "SafeCubicNaturalSpline *""'"); 
    }
    arg1 = reinterpret_cast< SafeCubicNaturalSpline * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CubicNaturalSpline_derivative" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (Real)SafeCubicNaturalSpline_derivative__SWIG_0(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CubicNaturalSpline_derivative) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeCubicNaturalSpline, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeCubicNaturalSpline, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CubicNaturalSpline_derivative__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CubicNaturalSpline_derivative__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'CubicNaturalSpline_derivative'");
  XSRETURN(0);
}


XS(_wrap_CubicNaturalSpline_secondDerivative__SWIG_0) {
  {
    SafeCubicNaturalSpline *arg1 = (SafeCubicNaturalSpline *) 0 ;
    Real arg2 ;
    bool arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: CubicNaturalSpline_secondDerivative(self,x,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeCubicNaturalSpline, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CubicNaturalSpline_secondDerivative" "', argument " "1"" of type '" "SafeCubicNaturalSpline *""'"); 
    }
    arg1 = reinterpret_cast< SafeCubicNaturalSpline * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CubicNaturalSpline_secondDerivative" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CubicNaturalSpline_secondDerivative" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (Real)SafeCubicNaturalSpline_secondDerivative__SWIG_0(arg1,arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CubicNaturalSpline_secondDerivative__SWIG_1) {
  {
    SafeCubicNaturalSpline *arg1 = (SafeCubicNaturalSpline *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: CubicNaturalSpline_secondDerivative(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeCubicNaturalSpline, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CubicNaturalSpline_secondDerivative" "', argument " "1"" of type '" "SafeCubicNaturalSpline *""'"); 
    }
    arg1 = reinterpret_cast< SafeCubicNaturalSpline * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CubicNaturalSpline_secondDerivative" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (Real)SafeCubicNaturalSpline_secondDerivative__SWIG_0(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CubicNaturalSpline_secondDerivative) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeCubicNaturalSpline, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeCubicNaturalSpline, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CubicNaturalSpline_secondDerivative__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CubicNaturalSpline_secondDerivative__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'CubicNaturalSpline_secondDerivative'");
  XSRETURN(0);
}


XS(_wrap_CubicNaturalSpline_primitive__SWIG_0) {
  {
    SafeCubicNaturalSpline *arg1 = (SafeCubicNaturalSpline *) 0 ;
    Real arg2 ;
    bool arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: CubicNaturalSpline_primitive(self,x,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeCubicNaturalSpline, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CubicNaturalSpline_primitive" "', argument " "1"" of type '" "SafeCubicNaturalSpline *""'"); 
    }
    arg1 = reinterpret_cast< SafeCubicNaturalSpline * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CubicNaturalSpline_primitive" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CubicNaturalSpline_primitive" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (Real)SafeCubicNaturalSpline_primitive__SWIG_0(arg1,arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CubicNaturalSpline_primitive__SWIG_1) {
  {
    SafeCubicNaturalSpline *arg1 = (SafeCubicNaturalSpline *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: CubicNaturalSpline_primitive(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeCubicNaturalSpline, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CubicNaturalSpline_primitive" "', argument " "1"" of type '" "SafeCubicNaturalSpline *""'"); 
    }
    arg1 = reinterpret_cast< SafeCubicNaturalSpline * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CubicNaturalSpline_primitive" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (Real)SafeCubicNaturalSpline_primitive__SWIG_0(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CubicNaturalSpline_primitive) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeCubicNaturalSpline, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeCubicNaturalSpline, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CubicNaturalSpline_primitive__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CubicNaturalSpline_primitive__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'CubicNaturalSpline_primitive'");
  XSRETURN(0);
}


XS(_wrap_delete_CubicNaturalSpline) {
  {
    SafeCubicNaturalSpline *arg1 = (SafeCubicNaturalSpline *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_CubicNaturalSpline(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeCubicNaturalSpline, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CubicNaturalSpline" "', argument " "1"" of type '" "SafeCubicNaturalSpline *""'"); 
    }
    arg1 = reinterpret_cast< SafeCubicNaturalSpline * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_LogCubicNaturalSpline) {
  {
    Array *arg1 = 0 ;
    Array *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    SafeLogCubicNaturalSpline *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_LogCubicNaturalSpline(x,y);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_LogCubicNaturalSpline" "', argument " "1"" of type '" "Array const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LogCubicNaturalSpline" "', argument " "1"" of type '" "Array const &""'"); 
    }
    arg1 = reinterpret_cast< Array * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_LogCubicNaturalSpline" "', argument " "2"" of type '" "Array const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LogCubicNaturalSpline" "', argument " "2"" of type '" "Array const &""'"); 
    }
    arg2 = reinterpret_cast< Array * >(argp2);
    {
      try {
        result = (SafeLogCubicNaturalSpline *)new SafeLogCubicNaturalSpline((Array const &)*arg1,(Array const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SafeLogCubicNaturalSpline, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_LogCubicNaturalSpline_call__SWIG_0) {
  {
    SafeLogCubicNaturalSpline *arg1 = (SafeLogCubicNaturalSpline *) 0 ;
    Real arg2 ;
    bool arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: LogCubicNaturalSpline_call(self,x,allowExtrapolation);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeLogCubicNaturalSpline, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LogCubicNaturalSpline_call" "', argument " "1"" of type '" "SafeLogCubicNaturalSpline *""'"); 
    }
    arg1 = reinterpret_cast< SafeLogCubicNaturalSpline * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LogCubicNaturalSpline_call" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "LogCubicNaturalSpline_call" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (Real)(arg1)->operator ()(arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_LogCubicNaturalSpline_call__SWIG_1) {
  {
    SafeLogCubicNaturalSpline *arg1 = (SafeLogCubicNaturalSpline *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: LogCubicNaturalSpline_call(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeLogCubicNaturalSpline, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LogCubicNaturalSpline_call" "', argument " "1"" of type '" "SafeLogCubicNaturalSpline *""'"); 
    }
    arg1 = reinterpret_cast< SafeLogCubicNaturalSpline * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LogCubicNaturalSpline_call" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (Real)(arg1)->operator ()(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_LogCubicNaturalSpline_call) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeLogCubicNaturalSpline, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeLogCubicNaturalSpline, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_LogCubicNaturalSpline_call__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_LogCubicNaturalSpline_call__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'LogCubicNaturalSpline_call'");
  XSRETURN(0);
}


XS(_wrap_LogCubicNaturalSpline_derivative__SWIG_0) {
  {
    SafeLogCubicNaturalSpline *arg1 = (SafeLogCubicNaturalSpline *) 0 ;
    Real arg2 ;
    bool arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: LogCubicNaturalSpline_derivative(self,x,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeLogCubicNaturalSpline, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LogCubicNaturalSpline_derivative" "', argument " "1"" of type '" "SafeLogCubicNaturalSpline *""'"); 
    }
    arg1 = reinterpret_cast< SafeLogCubicNaturalSpline * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LogCubicNaturalSpline_derivative" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "LogCubicNaturalSpline_derivative" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (Real)SafeLogCubicNaturalSpline_derivative__SWIG_0(arg1,arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_LogCubicNaturalSpline_derivative__SWIG_1) {
  {
    SafeLogCubicNaturalSpline *arg1 = (SafeLogCubicNaturalSpline *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: LogCubicNaturalSpline_derivative(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeLogCubicNaturalSpline, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LogCubicNaturalSpline_derivative" "', argument " "1"" of type '" "SafeLogCubicNaturalSpline *""'"); 
    }
    arg1 = reinterpret_cast< SafeLogCubicNaturalSpline * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LogCubicNaturalSpline_derivative" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (Real)SafeLogCubicNaturalSpline_derivative__SWIG_0(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_LogCubicNaturalSpline_derivative) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeLogCubicNaturalSpline, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeLogCubicNaturalSpline, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_LogCubicNaturalSpline_derivative__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_LogCubicNaturalSpline_derivative__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'LogCubicNaturalSpline_derivative'");
  XSRETURN(0);
}


XS(_wrap_LogCubicNaturalSpline_secondDerivative__SWIG_0) {
  {
    SafeLogCubicNaturalSpline *arg1 = (SafeLogCubicNaturalSpline *) 0 ;
    Real arg2 ;
    bool arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: LogCubicNaturalSpline_secondDerivative(self,x,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeLogCubicNaturalSpline, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LogCubicNaturalSpline_secondDerivative" "', argument " "1"" of type '" "SafeLogCubicNaturalSpline *""'"); 
    }
    arg1 = reinterpret_cast< SafeLogCubicNaturalSpline * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LogCubicNaturalSpline_secondDerivative" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "LogCubicNaturalSpline_secondDerivative" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (Real)SafeLogCubicNaturalSpline_secondDerivative__SWIG_0(arg1,arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_LogCubicNaturalSpline_secondDerivative__SWIG_1) {
  {
    SafeLogCubicNaturalSpline *arg1 = (SafeLogCubicNaturalSpline *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: LogCubicNaturalSpline_secondDerivative(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeLogCubicNaturalSpline, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LogCubicNaturalSpline_secondDerivative" "', argument " "1"" of type '" "SafeLogCubicNaturalSpline *""'"); 
    }
    arg1 = reinterpret_cast< SafeLogCubicNaturalSpline * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LogCubicNaturalSpline_secondDerivative" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (Real)SafeLogCubicNaturalSpline_secondDerivative__SWIG_0(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_LogCubicNaturalSpline_secondDerivative) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeLogCubicNaturalSpline, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeLogCubicNaturalSpline, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_LogCubicNaturalSpline_secondDerivative__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_LogCubicNaturalSpline_secondDerivative__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'LogCubicNaturalSpline_secondDerivative'");
  XSRETURN(0);
}


XS(_wrap_LogCubicNaturalSpline_primitive__SWIG_0) {
  {
    SafeLogCubicNaturalSpline *arg1 = (SafeLogCubicNaturalSpline *) 0 ;
    Real arg2 ;
    bool arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: LogCubicNaturalSpline_primitive(self,x,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeLogCubicNaturalSpline, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LogCubicNaturalSpline_primitive" "', argument " "1"" of type '" "SafeLogCubicNaturalSpline *""'"); 
    }
    arg1 = reinterpret_cast< SafeLogCubicNaturalSpline * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LogCubicNaturalSpline_primitive" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "LogCubicNaturalSpline_primitive" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (Real)SafeLogCubicNaturalSpline_primitive__SWIG_0(arg1,arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_LogCubicNaturalSpline_primitive__SWIG_1) {
  {
    SafeLogCubicNaturalSpline *arg1 = (SafeLogCubicNaturalSpline *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: LogCubicNaturalSpline_primitive(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeLogCubicNaturalSpline, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LogCubicNaturalSpline_primitive" "', argument " "1"" of type '" "SafeLogCubicNaturalSpline *""'"); 
    }
    arg1 = reinterpret_cast< SafeLogCubicNaturalSpline * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LogCubicNaturalSpline_primitive" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (Real)SafeLogCubicNaturalSpline_primitive__SWIG_0(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_LogCubicNaturalSpline_primitive) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeLogCubicNaturalSpline, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeLogCubicNaturalSpline, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_LogCubicNaturalSpline_primitive__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_LogCubicNaturalSpline_primitive__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'LogCubicNaturalSpline_primitive'");
  XSRETURN(0);
}


XS(_wrap_delete_LogCubicNaturalSpline) {
  {
    SafeLogCubicNaturalSpline *arg1 = (SafeLogCubicNaturalSpline *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_LogCubicNaturalSpline(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeLogCubicNaturalSpline, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_LogCubicNaturalSpline" "', argument " "1"" of type '" "SafeLogCubicNaturalSpline *""'"); 
    }
    arg1 = reinterpret_cast< SafeLogCubicNaturalSpline * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MonotonicCubicNaturalSpline) {
  {
    Array *arg1 = 0 ;
    Array *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    SafeMonotonicCubicNaturalSpline *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_MonotonicCubicNaturalSpline(x,y);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MonotonicCubicNaturalSpline" "', argument " "1"" of type '" "Array const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MonotonicCubicNaturalSpline" "', argument " "1"" of type '" "Array const &""'"); 
    }
    arg1 = reinterpret_cast< Array * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MonotonicCubicNaturalSpline" "', argument " "2"" of type '" "Array const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MonotonicCubicNaturalSpline" "', argument " "2"" of type '" "Array const &""'"); 
    }
    arg2 = reinterpret_cast< Array * >(argp2);
    {
      try {
        result = (SafeMonotonicCubicNaturalSpline *)new SafeMonotonicCubicNaturalSpline((Array const &)*arg1,(Array const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SafeMonotonicCubicNaturalSpline, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_MonotonicCubicNaturalSpline_call__SWIG_0) {
  {
    SafeMonotonicCubicNaturalSpline *arg1 = (SafeMonotonicCubicNaturalSpline *) 0 ;
    Real arg2 ;
    bool arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: MonotonicCubicNaturalSpline_call(self,x,allowExtrapolation);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeMonotonicCubicNaturalSpline, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MonotonicCubicNaturalSpline_call" "', argument " "1"" of type '" "SafeMonotonicCubicNaturalSpline *""'"); 
    }
    arg1 = reinterpret_cast< SafeMonotonicCubicNaturalSpline * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MonotonicCubicNaturalSpline_call" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MonotonicCubicNaturalSpline_call" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (Real)(arg1)->operator ()(arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_MonotonicCubicNaturalSpline_call__SWIG_1) {
  {
    SafeMonotonicCubicNaturalSpline *arg1 = (SafeMonotonicCubicNaturalSpline *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: MonotonicCubicNaturalSpline_call(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeMonotonicCubicNaturalSpline, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MonotonicCubicNaturalSpline_call" "', argument " "1"" of type '" "SafeMonotonicCubicNaturalSpline *""'"); 
    }
    arg1 = reinterpret_cast< SafeMonotonicCubicNaturalSpline * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MonotonicCubicNaturalSpline_call" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (Real)(arg1)->operator ()(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_MonotonicCubicNaturalSpline_call) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeMonotonicCubicNaturalSpline, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeMonotonicCubicNaturalSpline, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_MonotonicCubicNaturalSpline_call__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_MonotonicCubicNaturalSpline_call__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'MonotonicCubicNaturalSpline_call'");
  XSRETURN(0);
}


XS(_wrap_MonotonicCubicNaturalSpline_derivative__SWIG_0) {
  {
    SafeMonotonicCubicNaturalSpline *arg1 = (SafeMonotonicCubicNaturalSpline *) 0 ;
    Real arg2 ;
    bool arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: MonotonicCubicNaturalSpline_derivative(self,x,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeMonotonicCubicNaturalSpline, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MonotonicCubicNaturalSpline_derivative" "', argument " "1"" of type '" "SafeMonotonicCubicNaturalSpline *""'"); 
    }
    arg1 = reinterpret_cast< SafeMonotonicCubicNaturalSpline * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MonotonicCubicNaturalSpline_derivative" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MonotonicCubicNaturalSpline_derivative" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (Real)SafeMonotonicCubicNaturalSpline_derivative__SWIG_0(arg1,arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_MonotonicCubicNaturalSpline_derivative__SWIG_1) {
  {
    SafeMonotonicCubicNaturalSpline *arg1 = (SafeMonotonicCubicNaturalSpline *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: MonotonicCubicNaturalSpline_derivative(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeMonotonicCubicNaturalSpline, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MonotonicCubicNaturalSpline_derivative" "', argument " "1"" of type '" "SafeMonotonicCubicNaturalSpline *""'"); 
    }
    arg1 = reinterpret_cast< SafeMonotonicCubicNaturalSpline * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MonotonicCubicNaturalSpline_derivative" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (Real)SafeMonotonicCubicNaturalSpline_derivative__SWIG_0(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_MonotonicCubicNaturalSpline_derivative) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeMonotonicCubicNaturalSpline, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeMonotonicCubicNaturalSpline, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_MonotonicCubicNaturalSpline_derivative__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_MonotonicCubicNaturalSpline_derivative__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'MonotonicCubicNaturalSpline_derivative'");
  XSRETURN(0);
}


XS(_wrap_MonotonicCubicNaturalSpline_secondDerivative__SWIG_0) {
  {
    SafeMonotonicCubicNaturalSpline *arg1 = (SafeMonotonicCubicNaturalSpline *) 0 ;
    Real arg2 ;
    bool arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: MonotonicCubicNaturalSpline_secondDerivative(self,x,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeMonotonicCubicNaturalSpline, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MonotonicCubicNaturalSpline_secondDerivative" "', argument " "1"" of type '" "SafeMonotonicCubicNaturalSpline *""'"); 
    }
    arg1 = reinterpret_cast< SafeMonotonicCubicNaturalSpline * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MonotonicCubicNaturalSpline_secondDerivative" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MonotonicCubicNaturalSpline_secondDerivative" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (Real)SafeMonotonicCubicNaturalSpline_secondDerivative__SWIG_0(arg1,arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_MonotonicCubicNaturalSpline_secondDerivative__SWIG_1) {
  {
    SafeMonotonicCubicNaturalSpline *arg1 = (SafeMonotonicCubicNaturalSpline *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: MonotonicCubicNaturalSpline_secondDerivative(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeMonotonicCubicNaturalSpline, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MonotonicCubicNaturalSpline_secondDerivative" "', argument " "1"" of type '" "SafeMonotonicCubicNaturalSpline *""'"); 
    }
    arg1 = reinterpret_cast< SafeMonotonicCubicNaturalSpline * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MonotonicCubicNaturalSpline_secondDerivative" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (Real)SafeMonotonicCubicNaturalSpline_secondDerivative__SWIG_0(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_MonotonicCubicNaturalSpline_secondDerivative) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeMonotonicCubicNaturalSpline, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeMonotonicCubicNaturalSpline, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_MonotonicCubicNaturalSpline_secondDerivative__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_MonotonicCubicNaturalSpline_secondDerivative__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'MonotonicCubicNaturalSpline_secondDerivative'");
  XSRETURN(0);
}


XS(_wrap_MonotonicCubicNaturalSpline_primitive__SWIG_0) {
  {
    SafeMonotonicCubicNaturalSpline *arg1 = (SafeMonotonicCubicNaturalSpline *) 0 ;
    Real arg2 ;
    bool arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: MonotonicCubicNaturalSpline_primitive(self,x,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeMonotonicCubicNaturalSpline, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MonotonicCubicNaturalSpline_primitive" "', argument " "1"" of type '" "SafeMonotonicCubicNaturalSpline *""'"); 
    }
    arg1 = reinterpret_cast< SafeMonotonicCubicNaturalSpline * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MonotonicCubicNaturalSpline_primitive" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MonotonicCubicNaturalSpline_primitive" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (Real)SafeMonotonicCubicNaturalSpline_primitive__SWIG_0(arg1,arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_MonotonicCubicNaturalSpline_primitive__SWIG_1) {
  {
    SafeMonotonicCubicNaturalSpline *arg1 = (SafeMonotonicCubicNaturalSpline *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: MonotonicCubicNaturalSpline_primitive(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeMonotonicCubicNaturalSpline, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MonotonicCubicNaturalSpline_primitive" "', argument " "1"" of type '" "SafeMonotonicCubicNaturalSpline *""'"); 
    }
    arg1 = reinterpret_cast< SafeMonotonicCubicNaturalSpline * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MonotonicCubicNaturalSpline_primitive" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (Real)SafeMonotonicCubicNaturalSpline_primitive__SWIG_0(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_MonotonicCubicNaturalSpline_primitive) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeMonotonicCubicNaturalSpline, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeMonotonicCubicNaturalSpline, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_MonotonicCubicNaturalSpline_primitive__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_MonotonicCubicNaturalSpline_primitive__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'MonotonicCubicNaturalSpline_primitive'");
  XSRETURN(0);
}


XS(_wrap_delete_MonotonicCubicNaturalSpline) {
  {
    SafeMonotonicCubicNaturalSpline *arg1 = (SafeMonotonicCubicNaturalSpline *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_MonotonicCubicNaturalSpline(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeMonotonicCubicNaturalSpline, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MonotonicCubicNaturalSpline" "', argument " "1"" of type '" "SafeMonotonicCubicNaturalSpline *""'"); 
    }
    arg1 = reinterpret_cast< SafeMonotonicCubicNaturalSpline * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MonotonicLogCubicNaturalSpline) {
  {
    Array *arg1 = 0 ;
    Array *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    SafeMonotonicLogCubicNaturalSpline *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_MonotonicLogCubicNaturalSpline(x,y);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MonotonicLogCubicNaturalSpline" "', argument " "1"" of type '" "Array const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MonotonicLogCubicNaturalSpline" "', argument " "1"" of type '" "Array const &""'"); 
    }
    arg1 = reinterpret_cast< Array * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MonotonicLogCubicNaturalSpline" "', argument " "2"" of type '" "Array const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MonotonicLogCubicNaturalSpline" "', argument " "2"" of type '" "Array const &""'"); 
    }
    arg2 = reinterpret_cast< Array * >(argp2);
    {
      try {
        result = (SafeMonotonicLogCubicNaturalSpline *)new SafeMonotonicLogCubicNaturalSpline((Array const &)*arg1,(Array const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SafeMonotonicLogCubicNaturalSpline, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_MonotonicLogCubicNaturalSpline_call__SWIG_0) {
  {
    SafeMonotonicLogCubicNaturalSpline *arg1 = (SafeMonotonicLogCubicNaturalSpline *) 0 ;
    Real arg2 ;
    bool arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: MonotonicLogCubicNaturalSpline_call(self,x,allowExtrapolation);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeMonotonicLogCubicNaturalSpline, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MonotonicLogCubicNaturalSpline_call" "', argument " "1"" of type '" "SafeMonotonicLogCubicNaturalSpline *""'"); 
    }
    arg1 = reinterpret_cast< SafeMonotonicLogCubicNaturalSpline * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MonotonicLogCubicNaturalSpline_call" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MonotonicLogCubicNaturalSpline_call" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (Real)(arg1)->operator ()(arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_MonotonicLogCubicNaturalSpline_call__SWIG_1) {
  {
    SafeMonotonicLogCubicNaturalSpline *arg1 = (SafeMonotonicLogCubicNaturalSpline *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: MonotonicLogCubicNaturalSpline_call(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeMonotonicLogCubicNaturalSpline, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MonotonicLogCubicNaturalSpline_call" "', argument " "1"" of type '" "SafeMonotonicLogCubicNaturalSpline *""'"); 
    }
    arg1 = reinterpret_cast< SafeMonotonicLogCubicNaturalSpline * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MonotonicLogCubicNaturalSpline_call" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (Real)(arg1)->operator ()(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_MonotonicLogCubicNaturalSpline_call) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeMonotonicLogCubicNaturalSpline, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeMonotonicLogCubicNaturalSpline, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_MonotonicLogCubicNaturalSpline_call__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_MonotonicLogCubicNaturalSpline_call__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'MonotonicLogCubicNaturalSpline_call'");
  XSRETURN(0);
}


XS(_wrap_MonotonicLogCubicNaturalSpline_derivative__SWIG_0) {
  {
    SafeMonotonicLogCubicNaturalSpline *arg1 = (SafeMonotonicLogCubicNaturalSpline *) 0 ;
    Real arg2 ;
    bool arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: MonotonicLogCubicNaturalSpline_derivative(self,x,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeMonotonicLogCubicNaturalSpline, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MonotonicLogCubicNaturalSpline_derivative" "', argument " "1"" of type '" "SafeMonotonicLogCubicNaturalSpline *""'"); 
    }
    arg1 = reinterpret_cast< SafeMonotonicLogCubicNaturalSpline * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MonotonicLogCubicNaturalSpline_derivative" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MonotonicLogCubicNaturalSpline_derivative" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (Real)SafeMonotonicLogCubicNaturalSpline_derivative__SWIG_0(arg1,arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_MonotonicLogCubicNaturalSpline_derivative__SWIG_1) {
  {
    SafeMonotonicLogCubicNaturalSpline *arg1 = (SafeMonotonicLogCubicNaturalSpline *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: MonotonicLogCubicNaturalSpline_derivative(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeMonotonicLogCubicNaturalSpline, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MonotonicLogCubicNaturalSpline_derivative" "', argument " "1"" of type '" "SafeMonotonicLogCubicNaturalSpline *""'"); 
    }
    arg1 = reinterpret_cast< SafeMonotonicLogCubicNaturalSpline * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MonotonicLogCubicNaturalSpline_derivative" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (Real)SafeMonotonicLogCubicNaturalSpline_derivative__SWIG_0(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_MonotonicLogCubicNaturalSpline_derivative) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeMonotonicLogCubicNaturalSpline, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeMonotonicLogCubicNaturalSpline, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_MonotonicLogCubicNaturalSpline_derivative__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_MonotonicLogCubicNaturalSpline_derivative__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'MonotonicLogCubicNaturalSpline_derivative'");
  XSRETURN(0);
}


XS(_wrap_MonotonicLogCubicNaturalSpline_secondDerivative__SWIG_0) {
  {
    SafeMonotonicLogCubicNaturalSpline *arg1 = (SafeMonotonicLogCubicNaturalSpline *) 0 ;
    Real arg2 ;
    bool arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: MonotonicLogCubicNaturalSpline_secondDerivative(self,x,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeMonotonicLogCubicNaturalSpline, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MonotonicLogCubicNaturalSpline_secondDerivative" "', argument " "1"" of type '" "SafeMonotonicLogCubicNaturalSpline *""'"); 
    }
    arg1 = reinterpret_cast< SafeMonotonicLogCubicNaturalSpline * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MonotonicLogCubicNaturalSpline_secondDerivative" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MonotonicLogCubicNaturalSpline_secondDerivative" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (Real)SafeMonotonicLogCubicNaturalSpline_secondDerivative__SWIG_0(arg1,arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_MonotonicLogCubicNaturalSpline_secondDerivative__SWIG_1) {
  {
    SafeMonotonicLogCubicNaturalSpline *arg1 = (SafeMonotonicLogCubicNaturalSpline *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: MonotonicLogCubicNaturalSpline_secondDerivative(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeMonotonicLogCubicNaturalSpline, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MonotonicLogCubicNaturalSpline_secondDerivative" "', argument " "1"" of type '" "SafeMonotonicLogCubicNaturalSpline *""'"); 
    }
    arg1 = reinterpret_cast< SafeMonotonicLogCubicNaturalSpline * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MonotonicLogCubicNaturalSpline_secondDerivative" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (Real)SafeMonotonicLogCubicNaturalSpline_secondDerivative__SWIG_0(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_MonotonicLogCubicNaturalSpline_secondDerivative) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeMonotonicLogCubicNaturalSpline, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeMonotonicLogCubicNaturalSpline, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_MonotonicLogCubicNaturalSpline_secondDerivative__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_MonotonicLogCubicNaturalSpline_secondDerivative__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'MonotonicLogCubicNaturalSpline_secondDerivative'");
  XSRETURN(0);
}


XS(_wrap_MonotonicLogCubicNaturalSpline_primitive__SWIG_0) {
  {
    SafeMonotonicLogCubicNaturalSpline *arg1 = (SafeMonotonicLogCubicNaturalSpline *) 0 ;
    Real arg2 ;
    bool arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: MonotonicLogCubicNaturalSpline_primitive(self,x,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeMonotonicLogCubicNaturalSpline, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MonotonicLogCubicNaturalSpline_primitive" "', argument " "1"" of type '" "SafeMonotonicLogCubicNaturalSpline *""'"); 
    }
    arg1 = reinterpret_cast< SafeMonotonicLogCubicNaturalSpline * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MonotonicLogCubicNaturalSpline_primitive" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MonotonicLogCubicNaturalSpline_primitive" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (Real)SafeMonotonicLogCubicNaturalSpline_primitive__SWIG_0(arg1,arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_MonotonicLogCubicNaturalSpline_primitive__SWIG_1) {
  {
    SafeMonotonicLogCubicNaturalSpline *arg1 = (SafeMonotonicLogCubicNaturalSpline *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: MonotonicLogCubicNaturalSpline_primitive(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeMonotonicLogCubicNaturalSpline, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MonotonicLogCubicNaturalSpline_primitive" "', argument " "1"" of type '" "SafeMonotonicLogCubicNaturalSpline *""'"); 
    }
    arg1 = reinterpret_cast< SafeMonotonicLogCubicNaturalSpline * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MonotonicLogCubicNaturalSpline_primitive" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (Real)SafeMonotonicLogCubicNaturalSpline_primitive__SWIG_0(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_MonotonicLogCubicNaturalSpline_primitive) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeMonotonicLogCubicNaturalSpline, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeMonotonicLogCubicNaturalSpline, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_MonotonicLogCubicNaturalSpline_primitive__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_MonotonicLogCubicNaturalSpline_primitive__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'MonotonicLogCubicNaturalSpline_primitive'");
  XSRETURN(0);
}


XS(_wrap_delete_MonotonicLogCubicNaturalSpline) {
  {
    SafeMonotonicLogCubicNaturalSpline *arg1 = (SafeMonotonicLogCubicNaturalSpline *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_MonotonicLogCubicNaturalSpline(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeMonotonicLogCubicNaturalSpline, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MonotonicLogCubicNaturalSpline" "', argument " "1"" of type '" "SafeMonotonicLogCubicNaturalSpline *""'"); 
    }
    arg1 = reinterpret_cast< SafeMonotonicLogCubicNaturalSpline * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_KrugerCubic) {
  {
    Array *arg1 = 0 ;
    Array *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    SafeKrugerCubic *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_KrugerCubic(x,y);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_KrugerCubic" "', argument " "1"" of type '" "Array const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_KrugerCubic" "', argument " "1"" of type '" "Array const &""'"); 
    }
    arg1 = reinterpret_cast< Array * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_KrugerCubic" "', argument " "2"" of type '" "Array const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_KrugerCubic" "', argument " "2"" of type '" "Array const &""'"); 
    }
    arg2 = reinterpret_cast< Array * >(argp2);
    {
      try {
        result = (SafeKrugerCubic *)new SafeKrugerCubic((Array const &)*arg1,(Array const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SafeKrugerCubic, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_KrugerCubic_call__SWIG_0) {
  {
    SafeKrugerCubic *arg1 = (SafeKrugerCubic *) 0 ;
    Real arg2 ;
    bool arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: KrugerCubic_call(self,x,allowExtrapolation);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeKrugerCubic, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "KrugerCubic_call" "', argument " "1"" of type '" "SafeKrugerCubic *""'"); 
    }
    arg1 = reinterpret_cast< SafeKrugerCubic * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "KrugerCubic_call" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "KrugerCubic_call" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (Real)(arg1)->operator ()(arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_KrugerCubic_call__SWIG_1) {
  {
    SafeKrugerCubic *arg1 = (SafeKrugerCubic *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: KrugerCubic_call(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeKrugerCubic, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "KrugerCubic_call" "', argument " "1"" of type '" "SafeKrugerCubic *""'"); 
    }
    arg1 = reinterpret_cast< SafeKrugerCubic * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "KrugerCubic_call" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (Real)(arg1)->operator ()(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_KrugerCubic_call) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeKrugerCubic, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeKrugerCubic, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_KrugerCubic_call__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_KrugerCubic_call__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'KrugerCubic_call'");
  XSRETURN(0);
}


XS(_wrap_KrugerCubic_derivative__SWIG_0) {
  {
    SafeKrugerCubic *arg1 = (SafeKrugerCubic *) 0 ;
    Real arg2 ;
    bool arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: KrugerCubic_derivative(self,x,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeKrugerCubic, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "KrugerCubic_derivative" "', argument " "1"" of type '" "SafeKrugerCubic *""'"); 
    }
    arg1 = reinterpret_cast< SafeKrugerCubic * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "KrugerCubic_derivative" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "KrugerCubic_derivative" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (Real)SafeKrugerCubic_derivative__SWIG_0(arg1,arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_KrugerCubic_derivative__SWIG_1) {
  {
    SafeKrugerCubic *arg1 = (SafeKrugerCubic *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: KrugerCubic_derivative(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeKrugerCubic, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "KrugerCubic_derivative" "', argument " "1"" of type '" "SafeKrugerCubic *""'"); 
    }
    arg1 = reinterpret_cast< SafeKrugerCubic * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "KrugerCubic_derivative" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (Real)SafeKrugerCubic_derivative__SWIG_0(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_KrugerCubic_derivative) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeKrugerCubic, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeKrugerCubic, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_KrugerCubic_derivative__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_KrugerCubic_derivative__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'KrugerCubic_derivative'");
  XSRETURN(0);
}


XS(_wrap_KrugerCubic_secondDerivative__SWIG_0) {
  {
    SafeKrugerCubic *arg1 = (SafeKrugerCubic *) 0 ;
    Real arg2 ;
    bool arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: KrugerCubic_secondDerivative(self,x,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeKrugerCubic, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "KrugerCubic_secondDerivative" "', argument " "1"" of type '" "SafeKrugerCubic *""'"); 
    }
    arg1 = reinterpret_cast< SafeKrugerCubic * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "KrugerCubic_secondDerivative" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "KrugerCubic_secondDerivative" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (Real)SafeKrugerCubic_secondDerivative__SWIG_0(arg1,arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_KrugerCubic_secondDerivative__SWIG_1) {
  {
    SafeKrugerCubic *arg1 = (SafeKrugerCubic *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: KrugerCubic_secondDerivative(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeKrugerCubic, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "KrugerCubic_secondDerivative" "', argument " "1"" of type '" "SafeKrugerCubic *""'"); 
    }
    arg1 = reinterpret_cast< SafeKrugerCubic * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "KrugerCubic_secondDerivative" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (Real)SafeKrugerCubic_secondDerivative__SWIG_0(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_KrugerCubic_secondDerivative) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeKrugerCubic, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeKrugerCubic, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_KrugerCubic_secondDerivative__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_KrugerCubic_secondDerivative__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'KrugerCubic_secondDerivative'");
  XSRETURN(0);
}


XS(_wrap_KrugerCubic_primitive__SWIG_0) {
  {
    SafeKrugerCubic *arg1 = (SafeKrugerCubic *) 0 ;
    Real arg2 ;
    bool arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: KrugerCubic_primitive(self,x,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeKrugerCubic, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "KrugerCubic_primitive" "', argument " "1"" of type '" "SafeKrugerCubic *""'"); 
    }
    arg1 = reinterpret_cast< SafeKrugerCubic * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "KrugerCubic_primitive" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "KrugerCubic_primitive" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (Real)SafeKrugerCubic_primitive__SWIG_0(arg1,arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_KrugerCubic_primitive__SWIG_1) {
  {
    SafeKrugerCubic *arg1 = (SafeKrugerCubic *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: KrugerCubic_primitive(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeKrugerCubic, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "KrugerCubic_primitive" "', argument " "1"" of type '" "SafeKrugerCubic *""'"); 
    }
    arg1 = reinterpret_cast< SafeKrugerCubic * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "KrugerCubic_primitive" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (Real)SafeKrugerCubic_primitive__SWIG_0(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_KrugerCubic_primitive) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeKrugerCubic, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeKrugerCubic, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_KrugerCubic_primitive__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_KrugerCubic_primitive__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'KrugerCubic_primitive'");
  XSRETURN(0);
}


XS(_wrap_delete_KrugerCubic) {
  {
    SafeKrugerCubic *arg1 = (SafeKrugerCubic *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_KrugerCubic(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeKrugerCubic, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_KrugerCubic" "', argument " "1"" of type '" "SafeKrugerCubic *""'"); 
    }
    arg1 = reinterpret_cast< SafeKrugerCubic * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_KrugerLogCubic) {
  {
    Array *arg1 = 0 ;
    Array *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    SafeKrugerLogCubic *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_KrugerLogCubic(x,y);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_KrugerLogCubic" "', argument " "1"" of type '" "Array const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_KrugerLogCubic" "', argument " "1"" of type '" "Array const &""'"); 
    }
    arg1 = reinterpret_cast< Array * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_KrugerLogCubic" "', argument " "2"" of type '" "Array const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_KrugerLogCubic" "', argument " "2"" of type '" "Array const &""'"); 
    }
    arg2 = reinterpret_cast< Array * >(argp2);
    {
      try {
        result = (SafeKrugerLogCubic *)new SafeKrugerLogCubic((Array const &)*arg1,(Array const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SafeKrugerLogCubic, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_KrugerLogCubic_call__SWIG_0) {
  {
    SafeKrugerLogCubic *arg1 = (SafeKrugerLogCubic *) 0 ;
    Real arg2 ;
    bool arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: KrugerLogCubic_call(self,x,allowExtrapolation);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeKrugerLogCubic, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "KrugerLogCubic_call" "', argument " "1"" of type '" "SafeKrugerLogCubic *""'"); 
    }
    arg1 = reinterpret_cast< SafeKrugerLogCubic * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "KrugerLogCubic_call" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "KrugerLogCubic_call" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (Real)(arg1)->operator ()(arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_KrugerLogCubic_call__SWIG_1) {
  {
    SafeKrugerLogCubic *arg1 = (SafeKrugerLogCubic *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: KrugerLogCubic_call(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeKrugerLogCubic, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "KrugerLogCubic_call" "', argument " "1"" of type '" "SafeKrugerLogCubic *""'"); 
    }
    arg1 = reinterpret_cast< SafeKrugerLogCubic * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "KrugerLogCubic_call" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (Real)(arg1)->operator ()(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_KrugerLogCubic_call) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeKrugerLogCubic, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeKrugerLogCubic, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_KrugerLogCubic_call__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_KrugerLogCubic_call__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'KrugerLogCubic_call'");
  XSRETURN(0);
}


XS(_wrap_KrugerLogCubic_derivative__SWIG_0) {
  {
    SafeKrugerLogCubic *arg1 = (SafeKrugerLogCubic *) 0 ;
    Real arg2 ;
    bool arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: KrugerLogCubic_derivative(self,x,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeKrugerLogCubic, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "KrugerLogCubic_derivative" "', argument " "1"" of type '" "SafeKrugerLogCubic *""'"); 
    }
    arg1 = reinterpret_cast< SafeKrugerLogCubic * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "KrugerLogCubic_derivative" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "KrugerLogCubic_derivative" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (Real)SafeKrugerLogCubic_derivative__SWIG_0(arg1,arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_KrugerLogCubic_derivative__SWIG_1) {
  {
    SafeKrugerLogCubic *arg1 = (SafeKrugerLogCubic *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: KrugerLogCubic_derivative(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeKrugerLogCubic, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "KrugerLogCubic_derivative" "', argument " "1"" of type '" "SafeKrugerLogCubic *""'"); 
    }
    arg1 = reinterpret_cast< SafeKrugerLogCubic * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "KrugerLogCubic_derivative" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (Real)SafeKrugerLogCubic_derivative__SWIG_0(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_KrugerLogCubic_derivative) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeKrugerLogCubic, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeKrugerLogCubic, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_KrugerLogCubic_derivative__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_KrugerLogCubic_derivative__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'KrugerLogCubic_derivative'");
  XSRETURN(0);
}


XS(_wrap_KrugerLogCubic_secondDerivative__SWIG_0) {
  {
    SafeKrugerLogCubic *arg1 = (SafeKrugerLogCubic *) 0 ;
    Real arg2 ;
    bool arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: KrugerLogCubic_secondDerivative(self,x,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeKrugerLogCubic, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "KrugerLogCubic_secondDerivative" "', argument " "1"" of type '" "SafeKrugerLogCubic *""'"); 
    }
    arg1 = reinterpret_cast< SafeKrugerLogCubic * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "KrugerLogCubic_secondDerivative" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "KrugerLogCubic_secondDerivative" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (Real)SafeKrugerLogCubic_secondDerivative__SWIG_0(arg1,arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_KrugerLogCubic_secondDerivative__SWIG_1) {
  {
    SafeKrugerLogCubic *arg1 = (SafeKrugerLogCubic *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: KrugerLogCubic_secondDerivative(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeKrugerLogCubic, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "KrugerLogCubic_secondDerivative" "', argument " "1"" of type '" "SafeKrugerLogCubic *""'"); 
    }
    arg1 = reinterpret_cast< SafeKrugerLogCubic * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "KrugerLogCubic_secondDerivative" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (Real)SafeKrugerLogCubic_secondDerivative__SWIG_0(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_KrugerLogCubic_secondDerivative) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeKrugerLogCubic, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeKrugerLogCubic, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_KrugerLogCubic_secondDerivative__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_KrugerLogCubic_secondDerivative__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'KrugerLogCubic_secondDerivative'");
  XSRETURN(0);
}


XS(_wrap_KrugerLogCubic_primitive__SWIG_0) {
  {
    SafeKrugerLogCubic *arg1 = (SafeKrugerLogCubic *) 0 ;
    Real arg2 ;
    bool arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: KrugerLogCubic_primitive(self,x,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeKrugerLogCubic, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "KrugerLogCubic_primitive" "', argument " "1"" of type '" "SafeKrugerLogCubic *""'"); 
    }
    arg1 = reinterpret_cast< SafeKrugerLogCubic * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "KrugerLogCubic_primitive" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "KrugerLogCubic_primitive" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (Real)SafeKrugerLogCubic_primitive__SWIG_0(arg1,arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_KrugerLogCubic_primitive__SWIG_1) {
  {
    SafeKrugerLogCubic *arg1 = (SafeKrugerLogCubic *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: KrugerLogCubic_primitive(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeKrugerLogCubic, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "KrugerLogCubic_primitive" "', argument " "1"" of type '" "SafeKrugerLogCubic *""'"); 
    }
    arg1 = reinterpret_cast< SafeKrugerLogCubic * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "KrugerLogCubic_primitive" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (Real)SafeKrugerLogCubic_primitive__SWIG_0(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_KrugerLogCubic_primitive) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeKrugerLogCubic, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeKrugerLogCubic, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_KrugerLogCubic_primitive__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_KrugerLogCubic_primitive__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'KrugerLogCubic_primitive'");
  XSRETURN(0);
}


XS(_wrap_delete_KrugerLogCubic) {
  {
    SafeKrugerLogCubic *arg1 = (SafeKrugerLogCubic *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_KrugerLogCubic(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeKrugerLogCubic, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_KrugerLogCubic" "', argument " "1"" of type '" "SafeKrugerLogCubic *""'"); 
    }
    arg1 = reinterpret_cast< SafeKrugerLogCubic * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FritschButlandCubic) {
  {
    Array *arg1 = 0 ;
    Array *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    SafeFritschButlandCubic *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_FritschButlandCubic(x,y);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FritschButlandCubic" "', argument " "1"" of type '" "Array const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FritschButlandCubic" "', argument " "1"" of type '" "Array const &""'"); 
    }
    arg1 = reinterpret_cast< Array * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FritschButlandCubic" "', argument " "2"" of type '" "Array const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FritschButlandCubic" "', argument " "2"" of type '" "Array const &""'"); 
    }
    arg2 = reinterpret_cast< Array * >(argp2);
    {
      try {
        result = (SafeFritschButlandCubic *)new SafeFritschButlandCubic((Array const &)*arg1,(Array const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SafeFritschButlandCubic, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_FritschButlandCubic_call__SWIG_0) {
  {
    SafeFritschButlandCubic *arg1 = (SafeFritschButlandCubic *) 0 ;
    Real arg2 ;
    bool arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: FritschButlandCubic_call(self,x,allowExtrapolation);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeFritschButlandCubic, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FritschButlandCubic_call" "', argument " "1"" of type '" "SafeFritschButlandCubic *""'"); 
    }
    arg1 = reinterpret_cast< SafeFritschButlandCubic * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FritschButlandCubic_call" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FritschButlandCubic_call" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (Real)(arg1)->operator ()(arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_FritschButlandCubic_call__SWIG_1) {
  {
    SafeFritschButlandCubic *arg1 = (SafeFritschButlandCubic *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: FritschButlandCubic_call(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeFritschButlandCubic, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FritschButlandCubic_call" "', argument " "1"" of type '" "SafeFritschButlandCubic *""'"); 
    }
    arg1 = reinterpret_cast< SafeFritschButlandCubic * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FritschButlandCubic_call" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (Real)(arg1)->operator ()(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_FritschButlandCubic_call) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeFritschButlandCubic, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeFritschButlandCubic, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_FritschButlandCubic_call__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_FritschButlandCubic_call__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'FritschButlandCubic_call'");
  XSRETURN(0);
}


XS(_wrap_FritschButlandCubic_derivative__SWIG_0) {
  {
    SafeFritschButlandCubic *arg1 = (SafeFritschButlandCubic *) 0 ;
    Real arg2 ;
    bool arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: FritschButlandCubic_derivative(self,x,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeFritschButlandCubic, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FritschButlandCubic_derivative" "', argument " "1"" of type '" "SafeFritschButlandCubic *""'"); 
    }
    arg1 = reinterpret_cast< SafeFritschButlandCubic * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FritschButlandCubic_derivative" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FritschButlandCubic_derivative" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (Real)SafeFritschButlandCubic_derivative__SWIG_0(arg1,arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_FritschButlandCubic_derivative__SWIG_1) {
  {
    SafeFritschButlandCubic *arg1 = (SafeFritschButlandCubic *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: FritschButlandCubic_derivative(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeFritschButlandCubic, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FritschButlandCubic_derivative" "', argument " "1"" of type '" "SafeFritschButlandCubic *""'"); 
    }
    arg1 = reinterpret_cast< SafeFritschButlandCubic * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FritschButlandCubic_derivative" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (Real)SafeFritschButlandCubic_derivative__SWIG_0(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_FritschButlandCubic_derivative) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeFritschButlandCubic, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeFritschButlandCubic, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_FritschButlandCubic_derivative__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_FritschButlandCubic_derivative__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'FritschButlandCubic_derivative'");
  XSRETURN(0);
}


XS(_wrap_FritschButlandCubic_secondDerivative__SWIG_0) {
  {
    SafeFritschButlandCubic *arg1 = (SafeFritschButlandCubic *) 0 ;
    Real arg2 ;
    bool arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: FritschButlandCubic_secondDerivative(self,x,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeFritschButlandCubic, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FritschButlandCubic_secondDerivative" "', argument " "1"" of type '" "SafeFritschButlandCubic *""'"); 
    }
    arg1 = reinterpret_cast< SafeFritschButlandCubic * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FritschButlandCubic_secondDerivative" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FritschButlandCubic_secondDerivative" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (Real)SafeFritschButlandCubic_secondDerivative__SWIG_0(arg1,arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_FritschButlandCubic_secondDerivative__SWIG_1) {
  {
    SafeFritschButlandCubic *arg1 = (SafeFritschButlandCubic *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: FritschButlandCubic_secondDerivative(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeFritschButlandCubic, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FritschButlandCubic_secondDerivative" "', argument " "1"" of type '" "SafeFritschButlandCubic *""'"); 
    }
    arg1 = reinterpret_cast< SafeFritschButlandCubic * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FritschButlandCubic_secondDerivative" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (Real)SafeFritschButlandCubic_secondDerivative__SWIG_0(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_FritschButlandCubic_secondDerivative) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeFritschButlandCubic, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeFritschButlandCubic, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_FritschButlandCubic_secondDerivative__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_FritschButlandCubic_secondDerivative__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'FritschButlandCubic_secondDerivative'");
  XSRETURN(0);
}


XS(_wrap_FritschButlandCubic_primitive__SWIG_0) {
  {
    SafeFritschButlandCubic *arg1 = (SafeFritschButlandCubic *) 0 ;
    Real arg2 ;
    bool arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: FritschButlandCubic_primitive(self,x,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeFritschButlandCubic, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FritschButlandCubic_primitive" "', argument " "1"" of type '" "SafeFritschButlandCubic *""'"); 
    }
    arg1 = reinterpret_cast< SafeFritschButlandCubic * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FritschButlandCubic_primitive" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FritschButlandCubic_primitive" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (Real)SafeFritschButlandCubic_primitive__SWIG_0(arg1,arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_FritschButlandCubic_primitive__SWIG_1) {
  {
    SafeFritschButlandCubic *arg1 = (SafeFritschButlandCubic *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: FritschButlandCubic_primitive(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeFritschButlandCubic, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FritschButlandCubic_primitive" "', argument " "1"" of type '" "SafeFritschButlandCubic *""'"); 
    }
    arg1 = reinterpret_cast< SafeFritschButlandCubic * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FritschButlandCubic_primitive" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (Real)SafeFritschButlandCubic_primitive__SWIG_0(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_FritschButlandCubic_primitive) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeFritschButlandCubic, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeFritschButlandCubic, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_FritschButlandCubic_primitive__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_FritschButlandCubic_primitive__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'FritschButlandCubic_primitive'");
  XSRETURN(0);
}


XS(_wrap_delete_FritschButlandCubic) {
  {
    SafeFritschButlandCubic *arg1 = (SafeFritschButlandCubic *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_FritschButlandCubic(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeFritschButlandCubic, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FritschButlandCubic" "', argument " "1"" of type '" "SafeFritschButlandCubic *""'"); 
    }
    arg1 = reinterpret_cast< SafeFritschButlandCubic * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FritschButlandLogCubic) {
  {
    Array *arg1 = 0 ;
    Array *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    SafeFritschButlandLogCubic *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_FritschButlandLogCubic(x,y);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FritschButlandLogCubic" "', argument " "1"" of type '" "Array const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FritschButlandLogCubic" "', argument " "1"" of type '" "Array const &""'"); 
    }
    arg1 = reinterpret_cast< Array * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FritschButlandLogCubic" "', argument " "2"" of type '" "Array const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FritschButlandLogCubic" "', argument " "2"" of type '" "Array const &""'"); 
    }
    arg2 = reinterpret_cast< Array * >(argp2);
    {
      try {
        result = (SafeFritschButlandLogCubic *)new SafeFritschButlandLogCubic((Array const &)*arg1,(Array const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SafeFritschButlandLogCubic, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_FritschButlandLogCubic_call__SWIG_0) {
  {
    SafeFritschButlandLogCubic *arg1 = (SafeFritschButlandLogCubic *) 0 ;
    Real arg2 ;
    bool arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: FritschButlandLogCubic_call(self,x,allowExtrapolation);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeFritschButlandLogCubic, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FritschButlandLogCubic_call" "', argument " "1"" of type '" "SafeFritschButlandLogCubic *""'"); 
    }
    arg1 = reinterpret_cast< SafeFritschButlandLogCubic * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FritschButlandLogCubic_call" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FritschButlandLogCubic_call" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (Real)(arg1)->operator ()(arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_FritschButlandLogCubic_call__SWIG_1) {
  {
    SafeFritschButlandLogCubic *arg1 = (SafeFritschButlandLogCubic *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: FritschButlandLogCubic_call(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeFritschButlandLogCubic, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FritschButlandLogCubic_call" "', argument " "1"" of type '" "SafeFritschButlandLogCubic *""'"); 
    }
    arg1 = reinterpret_cast< SafeFritschButlandLogCubic * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FritschButlandLogCubic_call" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (Real)(arg1)->operator ()(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_FritschButlandLogCubic_call) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeFritschButlandLogCubic, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeFritschButlandLogCubic, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_FritschButlandLogCubic_call__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_FritschButlandLogCubic_call__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'FritschButlandLogCubic_call'");
  XSRETURN(0);
}


XS(_wrap_FritschButlandLogCubic_derivative__SWIG_0) {
  {
    SafeFritschButlandLogCubic *arg1 = (SafeFritschButlandLogCubic *) 0 ;
    Real arg2 ;
    bool arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: FritschButlandLogCubic_derivative(self,x,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeFritschButlandLogCubic, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FritschButlandLogCubic_derivative" "', argument " "1"" of type '" "SafeFritschButlandLogCubic *""'"); 
    }
    arg1 = reinterpret_cast< SafeFritschButlandLogCubic * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FritschButlandLogCubic_derivative" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FritschButlandLogCubic_derivative" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (Real)SafeFritschButlandLogCubic_derivative__SWIG_0(arg1,arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_FritschButlandLogCubic_derivative__SWIG_1) {
  {
    SafeFritschButlandLogCubic *arg1 = (SafeFritschButlandLogCubic *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: FritschButlandLogCubic_derivative(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeFritschButlandLogCubic, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FritschButlandLogCubic_derivative" "', argument " "1"" of type '" "SafeFritschButlandLogCubic *""'"); 
    }
    arg1 = reinterpret_cast< SafeFritschButlandLogCubic * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FritschButlandLogCubic_derivative" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (Real)SafeFritschButlandLogCubic_derivative__SWIG_0(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_FritschButlandLogCubic_derivative) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeFritschButlandLogCubic, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeFritschButlandLogCubic, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_FritschButlandLogCubic_derivative__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_FritschButlandLogCubic_derivative__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'FritschButlandLogCubic_derivative'");
  XSRETURN(0);
}


XS(_wrap_FritschButlandLogCubic_secondDerivative__SWIG_0) {
  {
    SafeFritschButlandLogCubic *arg1 = (SafeFritschButlandLogCubic *) 0 ;
    Real arg2 ;
    bool arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: FritschButlandLogCubic_secondDerivative(self,x,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeFritschButlandLogCubic, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FritschButlandLogCubic_secondDerivative" "', argument " "1"" of type '" "SafeFritschButlandLogCubic *""'"); 
    }
    arg1 = reinterpret_cast< SafeFritschButlandLogCubic * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FritschButlandLogCubic_secondDerivative" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FritschButlandLogCubic_secondDerivative" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (Real)SafeFritschButlandLogCubic_secondDerivative__SWIG_0(arg1,arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_FritschButlandLogCubic_secondDerivative__SWIG_1) {
  {
    SafeFritschButlandLogCubic *arg1 = (SafeFritschButlandLogCubic *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: FritschButlandLogCubic_secondDerivative(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeFritschButlandLogCubic, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FritschButlandLogCubic_secondDerivative" "', argument " "1"" of type '" "SafeFritschButlandLogCubic *""'"); 
    }
    arg1 = reinterpret_cast< SafeFritschButlandLogCubic * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FritschButlandLogCubic_secondDerivative" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (Real)SafeFritschButlandLogCubic_secondDerivative__SWIG_0(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_FritschButlandLogCubic_secondDerivative) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeFritschButlandLogCubic, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeFritschButlandLogCubic, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_FritschButlandLogCubic_secondDerivative__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_FritschButlandLogCubic_secondDerivative__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'FritschButlandLogCubic_secondDerivative'");
  XSRETURN(0);
}


XS(_wrap_FritschButlandLogCubic_primitive__SWIG_0) {
  {
    SafeFritschButlandLogCubic *arg1 = (SafeFritschButlandLogCubic *) 0 ;
    Real arg2 ;
    bool arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: FritschButlandLogCubic_primitive(self,x,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeFritschButlandLogCubic, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FritschButlandLogCubic_primitive" "', argument " "1"" of type '" "SafeFritschButlandLogCubic *""'"); 
    }
    arg1 = reinterpret_cast< SafeFritschButlandLogCubic * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FritschButlandLogCubic_primitive" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FritschButlandLogCubic_primitive" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (Real)SafeFritschButlandLogCubic_primitive__SWIG_0(arg1,arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_FritschButlandLogCubic_primitive__SWIG_1) {
  {
    SafeFritschButlandLogCubic *arg1 = (SafeFritschButlandLogCubic *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: FritschButlandLogCubic_primitive(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeFritschButlandLogCubic, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FritschButlandLogCubic_primitive" "', argument " "1"" of type '" "SafeFritschButlandLogCubic *""'"); 
    }
    arg1 = reinterpret_cast< SafeFritschButlandLogCubic * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FritschButlandLogCubic_primitive" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (Real)SafeFritschButlandLogCubic_primitive__SWIG_0(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_FritschButlandLogCubic_primitive) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeFritschButlandLogCubic, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeFritschButlandLogCubic, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_FritschButlandLogCubic_primitive__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_FritschButlandLogCubic_primitive__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'FritschButlandLogCubic_primitive'");
  XSRETURN(0);
}


XS(_wrap_delete_FritschButlandLogCubic) {
  {
    SafeFritschButlandLogCubic *arg1 = (SafeFritschButlandLogCubic *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_FritschButlandLogCubic(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeFritschButlandLogCubic, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FritschButlandLogCubic" "', argument " "1"" of type '" "SafeFritschButlandLogCubic *""'"); 
    }
    arg1 = reinterpret_cast< SafeFritschButlandLogCubic * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Parabolic) {
  {
    Array *arg1 = 0 ;
    Array *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    SafeParabolic *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_Parabolic(x,y);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Parabolic" "', argument " "1"" of type '" "Array const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Parabolic" "', argument " "1"" of type '" "Array const &""'"); 
    }
    arg1 = reinterpret_cast< Array * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Parabolic" "', argument " "2"" of type '" "Array const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Parabolic" "', argument " "2"" of type '" "Array const &""'"); 
    }
    arg2 = reinterpret_cast< Array * >(argp2);
    {
      try {
        result = (SafeParabolic *)new SafeParabolic((Array const &)*arg1,(Array const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SafeParabolic, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Parabolic_call__SWIG_0) {
  {
    SafeParabolic *arg1 = (SafeParabolic *) 0 ;
    Real arg2 ;
    bool arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: Parabolic_call(self,x,allowExtrapolation);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeParabolic, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Parabolic_call" "', argument " "1"" of type '" "SafeParabolic *""'"); 
    }
    arg1 = reinterpret_cast< SafeParabolic * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Parabolic_call" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Parabolic_call" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (Real)(arg1)->operator ()(arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Parabolic_call__SWIG_1) {
  {
    SafeParabolic *arg1 = (SafeParabolic *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Parabolic_call(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeParabolic, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Parabolic_call" "', argument " "1"" of type '" "SafeParabolic *""'"); 
    }
    arg1 = reinterpret_cast< SafeParabolic * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Parabolic_call" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (Real)(arg1)->operator ()(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Parabolic_call) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeParabolic, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeParabolic, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Parabolic_call__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Parabolic_call__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'Parabolic_call'");
  XSRETURN(0);
}


XS(_wrap_Parabolic_derivative__SWIG_0) {
  {
    SafeParabolic *arg1 = (SafeParabolic *) 0 ;
    Real arg2 ;
    bool arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: Parabolic_derivative(self,x,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeParabolic, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Parabolic_derivative" "', argument " "1"" of type '" "SafeParabolic *""'"); 
    }
    arg1 = reinterpret_cast< SafeParabolic * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Parabolic_derivative" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Parabolic_derivative" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (Real)SafeParabolic_derivative__SWIG_0(arg1,arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Parabolic_derivative__SWIG_1) {
  {
    SafeParabolic *arg1 = (SafeParabolic *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Parabolic_derivative(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeParabolic, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Parabolic_derivative" "', argument " "1"" of type '" "SafeParabolic *""'"); 
    }
    arg1 = reinterpret_cast< SafeParabolic * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Parabolic_derivative" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (Real)SafeParabolic_derivative__SWIG_0(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Parabolic_derivative) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeParabolic, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeParabolic, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Parabolic_derivative__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Parabolic_derivative__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'Parabolic_derivative'");
  XSRETURN(0);
}


XS(_wrap_Parabolic_secondDerivative__SWIG_0) {
  {
    SafeParabolic *arg1 = (SafeParabolic *) 0 ;
    Real arg2 ;
    bool arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: Parabolic_secondDerivative(self,x,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeParabolic, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Parabolic_secondDerivative" "', argument " "1"" of type '" "SafeParabolic *""'"); 
    }
    arg1 = reinterpret_cast< SafeParabolic * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Parabolic_secondDerivative" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Parabolic_secondDerivative" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (Real)SafeParabolic_secondDerivative__SWIG_0(arg1,arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Parabolic_secondDerivative__SWIG_1) {
  {
    SafeParabolic *arg1 = (SafeParabolic *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Parabolic_secondDerivative(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeParabolic, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Parabolic_secondDerivative" "', argument " "1"" of type '" "SafeParabolic *""'"); 
    }
    arg1 = reinterpret_cast< SafeParabolic * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Parabolic_secondDerivative" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (Real)SafeParabolic_secondDerivative__SWIG_0(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Parabolic_secondDerivative) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeParabolic, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeParabolic, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Parabolic_secondDerivative__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Parabolic_secondDerivative__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'Parabolic_secondDerivative'");
  XSRETURN(0);
}


XS(_wrap_Parabolic_primitive__SWIG_0) {
  {
    SafeParabolic *arg1 = (SafeParabolic *) 0 ;
    Real arg2 ;
    bool arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: Parabolic_primitive(self,x,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeParabolic, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Parabolic_primitive" "', argument " "1"" of type '" "SafeParabolic *""'"); 
    }
    arg1 = reinterpret_cast< SafeParabolic * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Parabolic_primitive" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Parabolic_primitive" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (Real)SafeParabolic_primitive__SWIG_0(arg1,arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Parabolic_primitive__SWIG_1) {
  {
    SafeParabolic *arg1 = (SafeParabolic *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Parabolic_primitive(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeParabolic, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Parabolic_primitive" "', argument " "1"" of type '" "SafeParabolic *""'"); 
    }
    arg1 = reinterpret_cast< SafeParabolic * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Parabolic_primitive" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (Real)SafeParabolic_primitive__SWIG_0(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Parabolic_primitive) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeParabolic, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeParabolic, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Parabolic_primitive__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Parabolic_primitive__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'Parabolic_primitive'");
  XSRETURN(0);
}


XS(_wrap_delete_Parabolic) {
  {
    SafeParabolic *arg1 = (SafeParabolic *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Parabolic(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeParabolic, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Parabolic" "', argument " "1"" of type '" "SafeParabolic *""'"); 
    }
    arg1 = reinterpret_cast< SafeParabolic * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_LogParabolic) {
  {
    Array *arg1 = 0 ;
    Array *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    SafeLogParabolic *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_LogParabolic(x,y);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_LogParabolic" "', argument " "1"" of type '" "Array const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LogParabolic" "', argument " "1"" of type '" "Array const &""'"); 
    }
    arg1 = reinterpret_cast< Array * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_LogParabolic" "', argument " "2"" of type '" "Array const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LogParabolic" "', argument " "2"" of type '" "Array const &""'"); 
    }
    arg2 = reinterpret_cast< Array * >(argp2);
    {
      try {
        result = (SafeLogParabolic *)new SafeLogParabolic((Array const &)*arg1,(Array const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SafeLogParabolic, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_LogParabolic_call__SWIG_0) {
  {
    SafeLogParabolic *arg1 = (SafeLogParabolic *) 0 ;
    Real arg2 ;
    bool arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: LogParabolic_call(self,x,allowExtrapolation);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeLogParabolic, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LogParabolic_call" "', argument " "1"" of type '" "SafeLogParabolic *""'"); 
    }
    arg1 = reinterpret_cast< SafeLogParabolic * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LogParabolic_call" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "LogParabolic_call" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (Real)(arg1)->operator ()(arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_LogParabolic_call__SWIG_1) {
  {
    SafeLogParabolic *arg1 = (SafeLogParabolic *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: LogParabolic_call(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeLogParabolic, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LogParabolic_call" "', argument " "1"" of type '" "SafeLogParabolic *""'"); 
    }
    arg1 = reinterpret_cast< SafeLogParabolic * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LogParabolic_call" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (Real)(arg1)->operator ()(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_LogParabolic_call) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeLogParabolic, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeLogParabolic, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_LogParabolic_call__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_LogParabolic_call__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'LogParabolic_call'");
  XSRETURN(0);
}


XS(_wrap_LogParabolic_derivative__SWIG_0) {
  {
    SafeLogParabolic *arg1 = (SafeLogParabolic *) 0 ;
    Real arg2 ;
    bool arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: LogParabolic_derivative(self,x,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeLogParabolic, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LogParabolic_derivative" "', argument " "1"" of type '" "SafeLogParabolic *""'"); 
    }
    arg1 = reinterpret_cast< SafeLogParabolic * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LogParabolic_derivative" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "LogParabolic_derivative" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (Real)SafeLogParabolic_derivative__SWIG_0(arg1,arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_LogParabolic_derivative__SWIG_1) {
  {
    SafeLogParabolic *arg1 = (SafeLogParabolic *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: LogParabolic_derivative(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeLogParabolic, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LogParabolic_derivative" "', argument " "1"" of type '" "SafeLogParabolic *""'"); 
    }
    arg1 = reinterpret_cast< SafeLogParabolic * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LogParabolic_derivative" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (Real)SafeLogParabolic_derivative__SWIG_0(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_LogParabolic_derivative) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeLogParabolic, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeLogParabolic, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_LogParabolic_derivative__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_LogParabolic_derivative__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'LogParabolic_derivative'");
  XSRETURN(0);
}


XS(_wrap_LogParabolic_secondDerivative__SWIG_0) {
  {
    SafeLogParabolic *arg1 = (SafeLogParabolic *) 0 ;
    Real arg2 ;
    bool arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: LogParabolic_secondDerivative(self,x,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeLogParabolic, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LogParabolic_secondDerivative" "', argument " "1"" of type '" "SafeLogParabolic *""'"); 
    }
    arg1 = reinterpret_cast< SafeLogParabolic * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LogParabolic_secondDerivative" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "LogParabolic_secondDerivative" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (Real)SafeLogParabolic_secondDerivative__SWIG_0(arg1,arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_LogParabolic_secondDerivative__SWIG_1) {
  {
    SafeLogParabolic *arg1 = (SafeLogParabolic *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: LogParabolic_secondDerivative(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeLogParabolic, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LogParabolic_secondDerivative" "', argument " "1"" of type '" "SafeLogParabolic *""'"); 
    }
    arg1 = reinterpret_cast< SafeLogParabolic * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LogParabolic_secondDerivative" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (Real)SafeLogParabolic_secondDerivative__SWIG_0(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_LogParabolic_secondDerivative) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeLogParabolic, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeLogParabolic, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_LogParabolic_secondDerivative__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_LogParabolic_secondDerivative__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'LogParabolic_secondDerivative'");
  XSRETURN(0);
}


XS(_wrap_LogParabolic_primitive__SWIG_0) {
  {
    SafeLogParabolic *arg1 = (SafeLogParabolic *) 0 ;
    Real arg2 ;
    bool arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: LogParabolic_primitive(self,x,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeLogParabolic, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LogParabolic_primitive" "', argument " "1"" of type '" "SafeLogParabolic *""'"); 
    }
    arg1 = reinterpret_cast< SafeLogParabolic * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LogParabolic_primitive" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "LogParabolic_primitive" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (Real)SafeLogParabolic_primitive__SWIG_0(arg1,arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_LogParabolic_primitive__SWIG_1) {
  {
    SafeLogParabolic *arg1 = (SafeLogParabolic *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: LogParabolic_primitive(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeLogParabolic, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LogParabolic_primitive" "', argument " "1"" of type '" "SafeLogParabolic *""'"); 
    }
    arg1 = reinterpret_cast< SafeLogParabolic * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LogParabolic_primitive" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (Real)SafeLogParabolic_primitive__SWIG_0(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_LogParabolic_primitive) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeLogParabolic, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeLogParabolic, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_LogParabolic_primitive__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_LogParabolic_primitive__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'LogParabolic_primitive'");
  XSRETURN(0);
}


XS(_wrap_delete_LogParabolic) {
  {
    SafeLogParabolic *arg1 = (SafeLogParabolic *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_LogParabolic(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeLogParabolic, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_LogParabolic" "', argument " "1"" of type '" "SafeLogParabolic *""'"); 
    }
    arg1 = reinterpret_cast< SafeLogParabolic * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MonotonicParabolic) {
  {
    Array *arg1 = 0 ;
    Array *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    SafeMonotonicParabolic *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_MonotonicParabolic(x,y);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MonotonicParabolic" "', argument " "1"" of type '" "Array const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MonotonicParabolic" "', argument " "1"" of type '" "Array const &""'"); 
    }
    arg1 = reinterpret_cast< Array * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MonotonicParabolic" "', argument " "2"" of type '" "Array const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MonotonicParabolic" "', argument " "2"" of type '" "Array const &""'"); 
    }
    arg2 = reinterpret_cast< Array * >(argp2);
    {
      try {
        result = (SafeMonotonicParabolic *)new SafeMonotonicParabolic((Array const &)*arg1,(Array const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SafeMonotonicParabolic, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_MonotonicParabolic_call__SWIG_0) {
  {
    SafeMonotonicParabolic *arg1 = (SafeMonotonicParabolic *) 0 ;
    Real arg2 ;
    bool arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: MonotonicParabolic_call(self,x,allowExtrapolation);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeMonotonicParabolic, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MonotonicParabolic_call" "', argument " "1"" of type '" "SafeMonotonicParabolic *""'"); 
    }
    arg1 = reinterpret_cast< SafeMonotonicParabolic * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MonotonicParabolic_call" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MonotonicParabolic_call" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (Real)(arg1)->operator ()(arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_MonotonicParabolic_call__SWIG_1) {
  {
    SafeMonotonicParabolic *arg1 = (SafeMonotonicParabolic *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: MonotonicParabolic_call(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeMonotonicParabolic, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MonotonicParabolic_call" "', argument " "1"" of type '" "SafeMonotonicParabolic *""'"); 
    }
    arg1 = reinterpret_cast< SafeMonotonicParabolic * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MonotonicParabolic_call" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (Real)(arg1)->operator ()(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_MonotonicParabolic_call) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeMonotonicParabolic, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeMonotonicParabolic, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_MonotonicParabolic_call__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_MonotonicParabolic_call__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'MonotonicParabolic_call'");
  XSRETURN(0);
}


XS(_wrap_MonotonicParabolic_derivative__SWIG_0) {
  {
    SafeMonotonicParabolic *arg1 = (SafeMonotonicParabolic *) 0 ;
    Real arg2 ;
    bool arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: MonotonicParabolic_derivative(self,x,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeMonotonicParabolic, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MonotonicParabolic_derivative" "', argument " "1"" of type '" "SafeMonotonicParabolic *""'"); 
    }
    arg1 = reinterpret_cast< SafeMonotonicParabolic * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MonotonicParabolic_derivative" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MonotonicParabolic_derivative" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (Real)SafeMonotonicParabolic_derivative__SWIG_0(arg1,arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_MonotonicParabolic_derivative__SWIG_1) {
  {
    SafeMonotonicParabolic *arg1 = (SafeMonotonicParabolic *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: MonotonicParabolic_derivative(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeMonotonicParabolic, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MonotonicParabolic_derivative" "', argument " "1"" of type '" "SafeMonotonicParabolic *""'"); 
    }
    arg1 = reinterpret_cast< SafeMonotonicParabolic * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MonotonicParabolic_derivative" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (Real)SafeMonotonicParabolic_derivative__SWIG_0(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_MonotonicParabolic_derivative) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeMonotonicParabolic, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeMonotonicParabolic, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_MonotonicParabolic_derivative__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_MonotonicParabolic_derivative__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'MonotonicParabolic_derivative'");
  XSRETURN(0);
}


XS(_wrap_MonotonicParabolic_secondDerivative__SWIG_0) {
  {
    SafeMonotonicParabolic *arg1 = (SafeMonotonicParabolic *) 0 ;
    Real arg2 ;
    bool arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: MonotonicParabolic_secondDerivative(self,x,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeMonotonicParabolic, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MonotonicParabolic_secondDerivative" "', argument " "1"" of type '" "SafeMonotonicParabolic *""'"); 
    }
    arg1 = reinterpret_cast< SafeMonotonicParabolic * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MonotonicParabolic_secondDerivative" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MonotonicParabolic_secondDerivative" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (Real)SafeMonotonicParabolic_secondDerivative__SWIG_0(arg1,arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_MonotonicParabolic_secondDerivative__SWIG_1) {
  {
    SafeMonotonicParabolic *arg1 = (SafeMonotonicParabolic *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: MonotonicParabolic_secondDerivative(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeMonotonicParabolic, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MonotonicParabolic_secondDerivative" "', argument " "1"" of type '" "SafeMonotonicParabolic *""'"); 
    }
    arg1 = reinterpret_cast< SafeMonotonicParabolic * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MonotonicParabolic_secondDerivative" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (Real)SafeMonotonicParabolic_secondDerivative__SWIG_0(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_MonotonicParabolic_secondDerivative) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeMonotonicParabolic, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeMonotonicParabolic, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_MonotonicParabolic_secondDerivative__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_MonotonicParabolic_secondDerivative__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'MonotonicParabolic_secondDerivative'");
  XSRETURN(0);
}


XS(_wrap_MonotonicParabolic_primitive__SWIG_0) {
  {
    SafeMonotonicParabolic *arg1 = (SafeMonotonicParabolic *) 0 ;
    Real arg2 ;
    bool arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: MonotonicParabolic_primitive(self,x,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeMonotonicParabolic, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MonotonicParabolic_primitive" "', argument " "1"" of type '" "SafeMonotonicParabolic *""'"); 
    }
    arg1 = reinterpret_cast< SafeMonotonicParabolic * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MonotonicParabolic_primitive" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MonotonicParabolic_primitive" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (Real)SafeMonotonicParabolic_primitive__SWIG_0(arg1,arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_MonotonicParabolic_primitive__SWIG_1) {
  {
    SafeMonotonicParabolic *arg1 = (SafeMonotonicParabolic *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: MonotonicParabolic_primitive(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeMonotonicParabolic, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MonotonicParabolic_primitive" "', argument " "1"" of type '" "SafeMonotonicParabolic *""'"); 
    }
    arg1 = reinterpret_cast< SafeMonotonicParabolic * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MonotonicParabolic_primitive" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (Real)SafeMonotonicParabolic_primitive__SWIG_0(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_MonotonicParabolic_primitive) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeMonotonicParabolic, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeMonotonicParabolic, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_MonotonicParabolic_primitive__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_MonotonicParabolic_primitive__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'MonotonicParabolic_primitive'");
  XSRETURN(0);
}


XS(_wrap_delete_MonotonicParabolic) {
  {
    SafeMonotonicParabolic *arg1 = (SafeMonotonicParabolic *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_MonotonicParabolic(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeMonotonicParabolic, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MonotonicParabolic" "', argument " "1"" of type '" "SafeMonotonicParabolic *""'"); 
    }
    arg1 = reinterpret_cast< SafeMonotonicParabolic * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MonotonicLogParabolic) {
  {
    Array *arg1 = 0 ;
    Array *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    SafeMonotonicLogParabolic *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_MonotonicLogParabolic(x,y);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MonotonicLogParabolic" "', argument " "1"" of type '" "Array const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MonotonicLogParabolic" "', argument " "1"" of type '" "Array const &""'"); 
    }
    arg1 = reinterpret_cast< Array * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MonotonicLogParabolic" "', argument " "2"" of type '" "Array const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MonotonicLogParabolic" "', argument " "2"" of type '" "Array const &""'"); 
    }
    arg2 = reinterpret_cast< Array * >(argp2);
    {
      try {
        result = (SafeMonotonicLogParabolic *)new SafeMonotonicLogParabolic((Array const &)*arg1,(Array const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SafeMonotonicLogParabolic, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_MonotonicLogParabolic_call__SWIG_0) {
  {
    SafeMonotonicLogParabolic *arg1 = (SafeMonotonicLogParabolic *) 0 ;
    Real arg2 ;
    bool arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: MonotonicLogParabolic_call(self,x,allowExtrapolation);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeMonotonicLogParabolic, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MonotonicLogParabolic_call" "', argument " "1"" of type '" "SafeMonotonicLogParabolic *""'"); 
    }
    arg1 = reinterpret_cast< SafeMonotonicLogParabolic * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MonotonicLogParabolic_call" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MonotonicLogParabolic_call" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (Real)(arg1)->operator ()(arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_MonotonicLogParabolic_call__SWIG_1) {
  {
    SafeMonotonicLogParabolic *arg1 = (SafeMonotonicLogParabolic *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: MonotonicLogParabolic_call(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeMonotonicLogParabolic, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MonotonicLogParabolic_call" "', argument " "1"" of type '" "SafeMonotonicLogParabolic *""'"); 
    }
    arg1 = reinterpret_cast< SafeMonotonicLogParabolic * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MonotonicLogParabolic_call" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (Real)(arg1)->operator ()(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_MonotonicLogParabolic_call) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeMonotonicLogParabolic, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeMonotonicLogParabolic, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_MonotonicLogParabolic_call__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_MonotonicLogParabolic_call__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'MonotonicLogParabolic_call'");
  XSRETURN(0);
}


XS(_wrap_MonotonicLogParabolic_derivative__SWIG_0) {
  {
    SafeMonotonicLogParabolic *arg1 = (SafeMonotonicLogParabolic *) 0 ;
    Real arg2 ;
    bool arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: MonotonicLogParabolic_derivative(self,x,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeMonotonicLogParabolic, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MonotonicLogParabolic_derivative" "', argument " "1"" of type '" "SafeMonotonicLogParabolic *""'"); 
    }
    arg1 = reinterpret_cast< SafeMonotonicLogParabolic * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MonotonicLogParabolic_derivative" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MonotonicLogParabolic_derivative" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (Real)SafeMonotonicLogParabolic_derivative__SWIG_0(arg1,arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_MonotonicLogParabolic_derivative__SWIG_1) {
  {
    SafeMonotonicLogParabolic *arg1 = (SafeMonotonicLogParabolic *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: MonotonicLogParabolic_derivative(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeMonotonicLogParabolic, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MonotonicLogParabolic_derivative" "', argument " "1"" of type '" "SafeMonotonicLogParabolic *""'"); 
    }
    arg1 = reinterpret_cast< SafeMonotonicLogParabolic * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MonotonicLogParabolic_derivative" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (Real)SafeMonotonicLogParabolic_derivative__SWIG_0(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_MonotonicLogParabolic_derivative) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeMonotonicLogParabolic, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeMonotonicLogParabolic, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_MonotonicLogParabolic_derivative__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_MonotonicLogParabolic_derivative__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'MonotonicLogParabolic_derivative'");
  XSRETURN(0);
}


XS(_wrap_MonotonicLogParabolic_secondDerivative__SWIG_0) {
  {
    SafeMonotonicLogParabolic *arg1 = (SafeMonotonicLogParabolic *) 0 ;
    Real arg2 ;
    bool arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: MonotonicLogParabolic_secondDerivative(self,x,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeMonotonicLogParabolic, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MonotonicLogParabolic_secondDerivative" "', argument " "1"" of type '" "SafeMonotonicLogParabolic *""'"); 
    }
    arg1 = reinterpret_cast< SafeMonotonicLogParabolic * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MonotonicLogParabolic_secondDerivative" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MonotonicLogParabolic_secondDerivative" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (Real)SafeMonotonicLogParabolic_secondDerivative__SWIG_0(arg1,arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_MonotonicLogParabolic_secondDerivative__SWIG_1) {
  {
    SafeMonotonicLogParabolic *arg1 = (SafeMonotonicLogParabolic *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: MonotonicLogParabolic_secondDerivative(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeMonotonicLogParabolic, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MonotonicLogParabolic_secondDerivative" "', argument " "1"" of type '" "SafeMonotonicLogParabolic *""'"); 
    }
    arg1 = reinterpret_cast< SafeMonotonicLogParabolic * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MonotonicLogParabolic_secondDerivative" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (Real)SafeMonotonicLogParabolic_secondDerivative__SWIG_0(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_MonotonicLogParabolic_secondDerivative) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeMonotonicLogParabolic, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeMonotonicLogParabolic, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_MonotonicLogParabolic_secondDerivative__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_MonotonicLogParabolic_secondDerivative__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'MonotonicLogParabolic_secondDerivative'");
  XSRETURN(0);
}


XS(_wrap_MonotonicLogParabolic_primitive__SWIG_0) {
  {
    SafeMonotonicLogParabolic *arg1 = (SafeMonotonicLogParabolic *) 0 ;
    Real arg2 ;
    bool arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: MonotonicLogParabolic_primitive(self,x,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeMonotonicLogParabolic, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MonotonicLogParabolic_primitive" "', argument " "1"" of type '" "SafeMonotonicLogParabolic *""'"); 
    }
    arg1 = reinterpret_cast< SafeMonotonicLogParabolic * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MonotonicLogParabolic_primitive" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MonotonicLogParabolic_primitive" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (Real)SafeMonotonicLogParabolic_primitive__SWIG_0(arg1,arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_MonotonicLogParabolic_primitive__SWIG_1) {
  {
    SafeMonotonicLogParabolic *arg1 = (SafeMonotonicLogParabolic *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: MonotonicLogParabolic_primitive(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeMonotonicLogParabolic, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MonotonicLogParabolic_primitive" "', argument " "1"" of type '" "SafeMonotonicLogParabolic *""'"); 
    }
    arg1 = reinterpret_cast< SafeMonotonicLogParabolic * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MonotonicLogParabolic_primitive" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (Real)SafeMonotonicLogParabolic_primitive__SWIG_0(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_MonotonicLogParabolic_primitive) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeMonotonicLogParabolic, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeMonotonicLogParabolic, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_MonotonicLogParabolic_primitive__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_MonotonicLogParabolic_primitive__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'MonotonicLogParabolic_primitive'");
  XSRETURN(0);
}


XS(_wrap_delete_MonotonicLogParabolic) {
  {
    SafeMonotonicLogParabolic *arg1 = (SafeMonotonicLogParabolic *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_MonotonicLogParabolic(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeMonotonicLogParabolic, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MonotonicLogParabolic" "', argument " "1"" of type '" "SafeMonotonicLogParabolic *""'"); 
    }
    arg1 = reinterpret_cast< SafeMonotonicLogParabolic * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BilinearInterpolation) {
  {
    Array *arg1 = 0 ;
    Array *arg2 = 0 ;
    Matrix *arg3 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    SafeBilinearInterpolation *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_BilinearInterpolation(x,y,m);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_BilinearInterpolation" "', argument " "1"" of type '" "Array const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BilinearInterpolation" "', argument " "1"" of type '" "Array const &""'"); 
    }
    arg1 = reinterpret_cast< Array * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_BilinearInterpolation" "', argument " "2"" of type '" "Array const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BilinearInterpolation" "', argument " "2"" of type '" "Array const &""'"); 
    }
    arg2 = reinterpret_cast< Array * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Matrix,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_BilinearInterpolation" "', argument " "3"" of type '" "Matrix const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BilinearInterpolation" "', argument " "3"" of type '" "Matrix const &""'"); 
    }
    arg3 = reinterpret_cast< Matrix * >(argp3);
    {
      try {
        result = (SafeBilinearInterpolation *)new SafeBilinearInterpolation((Array const &)*arg1,(Array const &)*arg2,(Matrix const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SafeBilinearInterpolation, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BilinearInterpolation_call__SWIG_0) {
  {
    SafeBilinearInterpolation *arg1 = (SafeBilinearInterpolation *) 0 ;
    Real arg2 ;
    Real arg3 ;
    bool arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: BilinearInterpolation_call(self,x,y,allowExtrapolation);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeBilinearInterpolation, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BilinearInterpolation_call" "', argument " "1"" of type '" "SafeBilinearInterpolation *""'"); 
    }
    arg1 = reinterpret_cast< SafeBilinearInterpolation * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BilinearInterpolation_call" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "BilinearInterpolation_call" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "BilinearInterpolation_call" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    {
      try {
        result = (Real)(arg1)->operator ()(arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BilinearInterpolation_call__SWIG_1) {
  {
    SafeBilinearInterpolation *arg1 = (SafeBilinearInterpolation *) 0 ;
    Real arg2 ;
    Real arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: BilinearInterpolation_call(self,x,y);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeBilinearInterpolation, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BilinearInterpolation_call" "', argument " "1"" of type '" "SafeBilinearInterpolation *""'"); 
    }
    arg1 = reinterpret_cast< SafeBilinearInterpolation * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BilinearInterpolation_call" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "BilinearInterpolation_call" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    {
      try {
        result = (Real)(arg1)->operator ()(arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BilinearInterpolation_call) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeBilinearInterpolation, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeBilinearInterpolation, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BilinearInterpolation_call__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BilinearInterpolation_call__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'BilinearInterpolation_call'");
  XSRETURN(0);
}


XS(_wrap_delete_BilinearInterpolation) {
  {
    SafeBilinearInterpolation *arg1 = (SafeBilinearInterpolation *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_BilinearInterpolation(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeBilinearInterpolation, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_BilinearInterpolation" "', argument " "1"" of type '" "SafeBilinearInterpolation *""'"); 
    }
    arg1 = reinterpret_cast< SafeBilinearInterpolation * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BicubicSpline) {
  {
    Array *arg1 = 0 ;
    Array *arg2 = 0 ;
    Matrix *arg3 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    SafeBicubicSpline *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_BicubicSpline(x,y,m);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_BicubicSpline" "', argument " "1"" of type '" "Array const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BicubicSpline" "', argument " "1"" of type '" "Array const &""'"); 
    }
    arg1 = reinterpret_cast< Array * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_BicubicSpline" "', argument " "2"" of type '" "Array const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BicubicSpline" "', argument " "2"" of type '" "Array const &""'"); 
    }
    arg2 = reinterpret_cast< Array * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Matrix,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_BicubicSpline" "', argument " "3"" of type '" "Matrix const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BicubicSpline" "', argument " "3"" of type '" "Matrix const &""'"); 
    }
    arg3 = reinterpret_cast< Matrix * >(argp3);
    {
      try {
        result = (SafeBicubicSpline *)new SafeBicubicSpline((Array const &)*arg1,(Array const &)*arg2,(Matrix const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SafeBicubicSpline, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BicubicSpline_call__SWIG_0) {
  {
    SafeBicubicSpline *arg1 = (SafeBicubicSpline *) 0 ;
    Real arg2 ;
    Real arg3 ;
    bool arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: BicubicSpline_call(self,x,y,allowExtrapolation);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeBicubicSpline, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BicubicSpline_call" "', argument " "1"" of type '" "SafeBicubicSpline *""'"); 
    }
    arg1 = reinterpret_cast< SafeBicubicSpline * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BicubicSpline_call" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "BicubicSpline_call" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "BicubicSpline_call" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    {
      try {
        result = (Real)(arg1)->operator ()(arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BicubicSpline_call__SWIG_1) {
  {
    SafeBicubicSpline *arg1 = (SafeBicubicSpline *) 0 ;
    Real arg2 ;
    Real arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: BicubicSpline_call(self,x,y);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeBicubicSpline, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BicubicSpline_call" "', argument " "1"" of type '" "SafeBicubicSpline *""'"); 
    }
    arg1 = reinterpret_cast< SafeBicubicSpline * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BicubicSpline_call" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "BicubicSpline_call" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    {
      try {
        result = (Real)(arg1)->operator ()(arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BicubicSpline_call) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeBicubicSpline, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SafeBicubicSpline, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BicubicSpline_call__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BicubicSpline_call__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'BicubicSpline_call'");
  XSRETURN(0);
}


XS(_wrap_delete_BicubicSpline) {
  {
    SafeBicubicSpline *arg1 = (SafeBicubicSpline *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_BicubicSpline(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SafeBicubicSpline, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_BicubicSpline" "', argument " "1"" of type '" "SafeBicubicSpline *""'"); 
    }
    arg1 = reinterpret_cast< SafeBicubicSpline * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BackwardFlat) {
  {
    int argvi = 0;
    BackwardFlat *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_BackwardFlat();");
    }
    {
      try {
        result = (BackwardFlat *)new BackwardFlat();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BackwardFlat, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_BackwardFlat) {
  {
    BackwardFlat *arg1 = (BackwardFlat *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_BackwardFlat(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BackwardFlat, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_BackwardFlat" "', argument " "1"" of type '" "BackwardFlat *""'"); 
    }
    arg1 = reinterpret_cast< BackwardFlat * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ForwardFlat) {
  {
    int argvi = 0;
    ForwardFlat *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_ForwardFlat();");
    }
    {
      try {
        result = (ForwardFlat *)new ForwardFlat();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ForwardFlat, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_ForwardFlat) {
  {
    ForwardFlat *arg1 = (ForwardFlat *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_ForwardFlat(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ForwardFlat, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ForwardFlat" "', argument " "1"" of type '" "ForwardFlat *""'"); 
    }
    arg1 = reinterpret_cast< ForwardFlat * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Linear) {
  {
    int argvi = 0;
    Linear *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Linear();");
    }
    {
      try {
        result = (Linear *)new Linear();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Linear, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_Linear) {
  {
    Linear *arg1 = (Linear *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Linear(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Linear, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Linear" "', argument " "1"" of type '" "Linear *""'"); 
    }
    arg1 = reinterpret_cast< Linear * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_LogLinear) {
  {
    int argvi = 0;
    LogLinear *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_LogLinear();");
    }
    {
      try {
        result = (LogLinear *)new LogLinear();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_LogLinear, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_LogLinear) {
  {
    LogLinear *arg1 = (LogLinear *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_LogLinear(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_LogLinear, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_LogLinear" "', argument " "1"" of type '" "LogLinear *""'"); 
    }
    arg1 = reinterpret_cast< LogLinear * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Cubic) {
  {
    int argvi = 0;
    Cubic *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Cubic();");
    }
    {
      try {
        result = (Cubic *)new Cubic();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Cubic, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_Cubic) {
  {
    Cubic *arg1 = (Cubic *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Cubic(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Cubic, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Cubic" "', argument " "1"" of type '" "Cubic *""'"); 
    }
    arg1 = reinterpret_cast< Cubic * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MonotonicCubic) {
  {
    int argvi = 0;
    MonotonicCubic *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_MonotonicCubic();");
    }
    {
      try {
        result = (MonotonicCubic *)new MonotonicCubic();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MonotonicCubic, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_MonotonicCubic) {
  {
    MonotonicCubic *arg1 = (MonotonicCubic *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_MonotonicCubic(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_MonotonicCubic, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MonotonicCubic" "', argument " "1"" of type '" "MonotonicCubic *""'"); 
    }
    arg1 = reinterpret_cast< MonotonicCubic * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DefaultLogCubic) {
  {
    int argvi = 0;
    DefaultLogCubic *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_DefaultLogCubic();");
    }
    {
      try {
        result = (DefaultLogCubic *)new DefaultLogCubic();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DefaultLogCubic, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_DefaultLogCubic) {
  {
    DefaultLogCubic *arg1 = (DefaultLogCubic *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_DefaultLogCubic(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_DefaultLogCubic, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DefaultLogCubic" "', argument " "1"" of type '" "DefaultLogCubic *""'"); 
    }
    arg1 = reinterpret_cast< DefaultLogCubic * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MonotonicLogCubic) {
  {
    int argvi = 0;
    MonotonicLogCubic *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_MonotonicLogCubic();");
    }
    {
      try {
        result = (MonotonicLogCubic *)new MonotonicLogCubic();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MonotonicLogCubic, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_MonotonicLogCubic) {
  {
    MonotonicLogCubic *arg1 = (MonotonicLogCubic *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_MonotonicLogCubic(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_MonotonicLogCubic, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MonotonicLogCubic" "', argument " "1"" of type '" "MonotonicLogCubic *""'"); 
    }
    arg1 = reinterpret_cast< MonotonicLogCubic * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_YieldTermStructure___deref__) {
  {
    boost::shared_ptr< YieldTermStructure > *arg1 = (boost::shared_ptr< YieldTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    YieldTermStructure *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: YieldTermStructure___deref__(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YieldTermStructure___deref__" "', argument " "1"" of type '" "boost::shared_ptr< YieldTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< YieldTermStructure > * >(argp1);
    {
      try {
        result = (YieldTermStructure *)(arg1)->operator ->();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_YieldTermStructure, 0 | 0); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_YieldTermStructure_isNull) {
  {
    boost::shared_ptr< YieldTermStructure > *arg1 = (boost::shared_ptr< YieldTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: YieldTermStructure_isNull(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YieldTermStructure_isNull" "', argument " "1"" of type '" "boost::shared_ptr< YieldTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< YieldTermStructure > * >(argp1);
    {
      try {
        result = (bool)boost_shared_ptr_Sl_YieldTermStructure_Sg__isNull(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_YieldTermStructure_asObservable) {
  {
    boost::shared_ptr< YieldTermStructure > *arg1 = (boost::shared_ptr< YieldTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    boost::shared_ptr< Observable > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: YieldTermStructure_asObservable(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YieldTermStructure_asObservable" "', argument " "1"" of type '" "boost::shared_ptr< YieldTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< YieldTermStructure > * >(argp1);
    {
      try {
        result = boost_shared_ptr_Sl_YieldTermStructure_Sg__asObservable(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new boost::shared_ptr< Observable >(static_cast< const boost::shared_ptr< Observable >& >(result))), SWIGTYPE_p_boost__shared_ptrT_Observable_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_YieldTermStructure) {
  {
    int argvi = 0;
    boost::shared_ptr< YieldTermStructure > *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_YieldTermStructure();");
    }
    {
      try {
        result = (boost::shared_ptr< YieldTermStructure > *)new boost::shared_ptr< YieldTermStructure >();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_YieldTermStructure) {
  {
    boost::shared_ptr< YieldTermStructure > *arg1 = (boost::shared_ptr< YieldTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_YieldTermStructure(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_YieldTermStructure" "', argument " "1"" of type '" "boost::shared_ptr< YieldTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< YieldTermStructure > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_YieldTermStructure_dayCounter) {
  {
    boost::shared_ptr< YieldTermStructure > *arg1 = (boost::shared_ptr< YieldTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    SwigValueWrapper< DayCounter > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: YieldTermStructure_dayCounter(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YieldTermStructure_dayCounter" "', argument " "1"" of type '" "boost::shared_ptr< YieldTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< YieldTermStructure > * >(argp1);
    {
      try {
        result = (*arg1)->dayCounter();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new DayCounter(static_cast< const DayCounter& >(result))), SWIGTYPE_p_DayCounter, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_YieldTermStructure_calendar) {
  {
    boost::shared_ptr< YieldTermStructure > *arg1 = (boost::shared_ptr< YieldTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    SwigValueWrapper< Calendar > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: YieldTermStructure_calendar(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YieldTermStructure_calendar" "', argument " "1"" of type '" "boost::shared_ptr< YieldTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< YieldTermStructure > * >(argp1);
    {
      try {
        result = (*arg1)->calendar();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Calendar(static_cast< const Calendar& >(result))), SWIGTYPE_p_Calendar, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_YieldTermStructure_referenceDate) {
  {
    boost::shared_ptr< YieldTermStructure > *arg1 = (boost::shared_ptr< YieldTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: YieldTermStructure_referenceDate(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YieldTermStructure_referenceDate" "', argument " "1"" of type '" "boost::shared_ptr< YieldTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< YieldTermStructure > * >(argp1);
    {
      try {
        result = (*arg1)->referenceDate();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_YieldTermStructure_maxDate) {
  {
    boost::shared_ptr< YieldTermStructure > *arg1 = (boost::shared_ptr< YieldTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: YieldTermStructure_maxDate(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YieldTermStructure_maxDate" "', argument " "1"" of type '" "boost::shared_ptr< YieldTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< YieldTermStructure > * >(argp1);
    {
      try {
        result = (*arg1)->maxDate();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_YieldTermStructure_maxTime) {
  {
    boost::shared_ptr< YieldTermStructure > *arg1 = (boost::shared_ptr< YieldTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Time result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: YieldTermStructure_maxTime(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YieldTermStructure_maxTime" "', argument " "1"" of type '" "boost::shared_ptr< YieldTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< YieldTermStructure > * >(argp1);
    {
      try {
        result = (Time)(*arg1)->maxTime();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_YieldTermStructure_discount__SWIG_0) {
  {
    boost::shared_ptr< YieldTermStructure > *arg1 = (boost::shared_ptr< YieldTermStructure > *) 0 ;
    Date *arg2 = 0 ;
    bool arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    DiscountFactor result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: YieldTermStructure_discount(self,Date const &,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YieldTermStructure_discount" "', argument " "1"" of type '" "boost::shared_ptr< YieldTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< YieldTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "YieldTermStructure_discount" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "YieldTermStructure_discount" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "YieldTermStructure_discount" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (DiscountFactor)(*arg1)->discount((Date const &)*arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_YieldTermStructure_discount__SWIG_1) {
  {
    boost::shared_ptr< YieldTermStructure > *arg1 = (boost::shared_ptr< YieldTermStructure > *) 0 ;
    Date *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    DiscountFactor result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: YieldTermStructure_discount(self,Date const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YieldTermStructure_discount" "', argument " "1"" of type '" "boost::shared_ptr< YieldTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< YieldTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "YieldTermStructure_discount" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "YieldTermStructure_discount" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    {
      try {
        result = (DiscountFactor)(*arg1)->discount((Date const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_YieldTermStructure_discount__SWIG_2) {
  {
    boost::shared_ptr< YieldTermStructure > *arg1 = (boost::shared_ptr< YieldTermStructure > *) 0 ;
    Time arg2 ;
    bool arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    DiscountFactor result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: YieldTermStructure_discount(self,Time,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YieldTermStructure_discount" "', argument " "1"" of type '" "boost::shared_ptr< YieldTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< YieldTermStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "YieldTermStructure_discount" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "YieldTermStructure_discount" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (DiscountFactor)(*arg1)->discount(arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_YieldTermStructure_discount__SWIG_3) {
  {
    boost::shared_ptr< YieldTermStructure > *arg1 = (boost::shared_ptr< YieldTermStructure > *) 0 ;
    Time arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    DiscountFactor result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: YieldTermStructure_discount(self,Time);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YieldTermStructure_discount" "', argument " "1"" of type '" "boost::shared_ptr< YieldTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< YieldTermStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "YieldTermStructure_discount" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    {
      try {
        result = (DiscountFactor)(*arg1)->discount(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_YieldTermStructure_discount) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_YieldTermStructure_discount__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_YieldTermStructure_discount__SWIG_3); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_YieldTermStructure_discount__SWIG_0); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_YieldTermStructure_discount__SWIG_2); return;
    }
  }
  
  croak("No matching function for overloaded 'YieldTermStructure_discount'");
  XSRETURN(0);
}


XS(_wrap_YieldTermStructure_zeroRate__SWIG_0) {
  {
    boost::shared_ptr< YieldTermStructure > *arg1 = (boost::shared_ptr< YieldTermStructure > *) 0 ;
    Date *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    Compounding arg4 ;
    Frequency arg5 ;
    bool arg6 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    bool val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    InterestRate result;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: YieldTermStructure_zeroRate(self,d,DayCounter const &,Compounding,f,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YieldTermStructure_zeroRate" "', argument " "1"" of type '" "boost::shared_ptr< YieldTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< YieldTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "YieldTermStructure_zeroRate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "YieldTermStructure_zeroRate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "YieldTermStructure_zeroRate" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "YieldTermStructure_zeroRate" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "YieldTermStructure_zeroRate" "', argument " "4"" of type '" "Compounding""'");
    } 
    arg4 = static_cast< Compounding >(val4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "YieldTermStructure_zeroRate" "', argument " "5"" of type '" "Frequency""'");
    } 
    arg5 = static_cast< Frequency >(val5);
    ecode6 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "YieldTermStructure_zeroRate" "', argument " "6"" of type '" "bool""'");
    } 
    arg6 = static_cast< bool >(val6);
    {
      try {
        result = (*arg1)->zeroRate((Date const &)*arg2,(DayCounter const &)*arg3,arg4,arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new InterestRate(static_cast< const InterestRate& >(result))), SWIGTYPE_p_InterestRate, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_YieldTermStructure_zeroRate__SWIG_1) {
  {
    boost::shared_ptr< YieldTermStructure > *arg1 = (boost::shared_ptr< YieldTermStructure > *) 0 ;
    Date *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    Compounding arg4 ;
    Frequency arg5 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    InterestRate result;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: YieldTermStructure_zeroRate(self,d,DayCounter const &,Compounding,f);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YieldTermStructure_zeroRate" "', argument " "1"" of type '" "boost::shared_ptr< YieldTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< YieldTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "YieldTermStructure_zeroRate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "YieldTermStructure_zeroRate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "YieldTermStructure_zeroRate" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "YieldTermStructure_zeroRate" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "YieldTermStructure_zeroRate" "', argument " "4"" of type '" "Compounding""'");
    } 
    arg4 = static_cast< Compounding >(val4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "YieldTermStructure_zeroRate" "', argument " "5"" of type '" "Frequency""'");
    } 
    arg5 = static_cast< Frequency >(val5);
    {
      try {
        result = (*arg1)->zeroRate((Date const &)*arg2,(DayCounter const &)*arg3,arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new InterestRate(static_cast< const InterestRate& >(result))), SWIGTYPE_p_InterestRate, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_YieldTermStructure_zeroRate__SWIG_2) {
  {
    boost::shared_ptr< YieldTermStructure > *arg1 = (boost::shared_ptr< YieldTermStructure > *) 0 ;
    Date *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    Compounding arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    InterestRate result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: YieldTermStructure_zeroRate(self,d,DayCounter const &,Compounding);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YieldTermStructure_zeroRate" "', argument " "1"" of type '" "boost::shared_ptr< YieldTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< YieldTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "YieldTermStructure_zeroRate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "YieldTermStructure_zeroRate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "YieldTermStructure_zeroRate" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "YieldTermStructure_zeroRate" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "YieldTermStructure_zeroRate" "', argument " "4"" of type '" "Compounding""'");
    } 
    arg4 = static_cast< Compounding >(val4);
    {
      try {
        result = (*arg1)->zeroRate((Date const &)*arg2,(DayCounter const &)*arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new InterestRate(static_cast< const InterestRate& >(result))), SWIGTYPE_p_InterestRate, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_YieldTermStructure_zeroRate__SWIG_3) {
  {
    boost::shared_ptr< YieldTermStructure > *arg1 = (boost::shared_ptr< YieldTermStructure > *) 0 ;
    Time arg2 ;
    Compounding arg3 ;
    Frequency arg4 ;
    bool arg5 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    bool val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    InterestRate result;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: YieldTermStructure_zeroRate(self,t,Compounding,f,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YieldTermStructure_zeroRate" "', argument " "1"" of type '" "boost::shared_ptr< YieldTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< YieldTermStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "YieldTermStructure_zeroRate" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "YieldTermStructure_zeroRate" "', argument " "3"" of type '" "Compounding""'");
    } 
    arg3 = static_cast< Compounding >(val3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "YieldTermStructure_zeroRate" "', argument " "4"" of type '" "Frequency""'");
    } 
    arg4 = static_cast< Frequency >(val4);
    ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "YieldTermStructure_zeroRate" "', argument " "5"" of type '" "bool""'");
    } 
    arg5 = static_cast< bool >(val5);
    {
      try {
        result = (*arg1)->zeroRate(arg2,arg3,arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new InterestRate(static_cast< const InterestRate& >(result))), SWIGTYPE_p_InterestRate, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_YieldTermStructure_zeroRate__SWIG_4) {
  {
    boost::shared_ptr< YieldTermStructure > *arg1 = (boost::shared_ptr< YieldTermStructure > *) 0 ;
    Time arg2 ;
    Compounding arg3 ;
    Frequency arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    InterestRate result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: YieldTermStructure_zeroRate(self,t,Compounding,f);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YieldTermStructure_zeroRate" "', argument " "1"" of type '" "boost::shared_ptr< YieldTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< YieldTermStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "YieldTermStructure_zeroRate" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "YieldTermStructure_zeroRate" "', argument " "3"" of type '" "Compounding""'");
    } 
    arg3 = static_cast< Compounding >(val3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "YieldTermStructure_zeroRate" "', argument " "4"" of type '" "Frequency""'");
    } 
    arg4 = static_cast< Frequency >(val4);
    {
      try {
        result = (*arg1)->zeroRate(arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new InterestRate(static_cast< const InterestRate& >(result))), SWIGTYPE_p_InterestRate, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_YieldTermStructure_zeroRate__SWIG_5) {
  {
    boost::shared_ptr< YieldTermStructure > *arg1 = (boost::shared_ptr< YieldTermStructure > *) 0 ;
    Time arg2 ;
    Compounding arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    InterestRate result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: YieldTermStructure_zeroRate(self,t,Compounding);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YieldTermStructure_zeroRate" "', argument " "1"" of type '" "boost::shared_ptr< YieldTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< YieldTermStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "YieldTermStructure_zeroRate" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "YieldTermStructure_zeroRate" "', argument " "3"" of type '" "Compounding""'");
    } 
    arg3 = static_cast< Compounding >(val3);
    {
      try {
        result = (*arg1)->zeroRate(arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new InterestRate(static_cast< const InterestRate& >(result))), SWIGTYPE_p_InterestRate, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_YieldTermStructure_zeroRate) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_YieldTermStructure_zeroRate__SWIG_5); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_YieldTermStructure_zeroRate__SWIG_2); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_YieldTermStructure_zeroRate__SWIG_4); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_YieldTermStructure_zeroRate__SWIG_1); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_YieldTermStructure_zeroRate__SWIG_3); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_YieldTermStructure_zeroRate__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'YieldTermStructure_zeroRate'");
  XSRETURN(0);
}


XS(_wrap_YieldTermStructure_forwardRate__SWIG_0) {
  {
    boost::shared_ptr< YieldTermStructure > *arg1 = (boost::shared_ptr< YieldTermStructure > *) 0 ;
    Date *arg2 = 0 ;
    Date *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    Compounding arg5 ;
    Frequency arg6 ;
    bool arg7 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    bool val7 ;
    int ecode7 = 0 ;
    int argvi = 0;
    InterestRate result;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: YieldTermStructure_forwardRate(self,d1,d2,DayCounter const &,Compounding,f,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YieldTermStructure_forwardRate" "', argument " "1"" of type '" "boost::shared_ptr< YieldTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< YieldTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "YieldTermStructure_forwardRate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "YieldTermStructure_forwardRate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "YieldTermStructure_forwardRate" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "YieldTermStructure_forwardRate" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "YieldTermStructure_forwardRate" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "YieldTermStructure_forwardRate" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "YieldTermStructure_forwardRate" "', argument " "5"" of type '" "Compounding""'");
    } 
    arg5 = static_cast< Compounding >(val5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "YieldTermStructure_forwardRate" "', argument " "6"" of type '" "Frequency""'");
    } 
    arg6 = static_cast< Frequency >(val6);
    ecode7 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "YieldTermStructure_forwardRate" "', argument " "7"" of type '" "bool""'");
    } 
    arg7 = static_cast< bool >(val7);
    {
      try {
        result = (*arg1)->forwardRate((Date const &)*arg2,(Date const &)*arg3,(DayCounter const &)*arg4,arg5,arg6,arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new InterestRate(static_cast< const InterestRate& >(result))), SWIGTYPE_p_InterestRate, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_YieldTermStructure_forwardRate__SWIG_1) {
  {
    boost::shared_ptr< YieldTermStructure > *arg1 = (boost::shared_ptr< YieldTermStructure > *) 0 ;
    Date *arg2 = 0 ;
    Date *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    Compounding arg5 ;
    Frequency arg6 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    InterestRate result;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: YieldTermStructure_forwardRate(self,d1,d2,DayCounter const &,Compounding,f);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YieldTermStructure_forwardRate" "', argument " "1"" of type '" "boost::shared_ptr< YieldTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< YieldTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "YieldTermStructure_forwardRate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "YieldTermStructure_forwardRate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "YieldTermStructure_forwardRate" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "YieldTermStructure_forwardRate" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "YieldTermStructure_forwardRate" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "YieldTermStructure_forwardRate" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "YieldTermStructure_forwardRate" "', argument " "5"" of type '" "Compounding""'");
    } 
    arg5 = static_cast< Compounding >(val5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "YieldTermStructure_forwardRate" "', argument " "6"" of type '" "Frequency""'");
    } 
    arg6 = static_cast< Frequency >(val6);
    {
      try {
        result = (*arg1)->forwardRate((Date const &)*arg2,(Date const &)*arg3,(DayCounter const &)*arg4,arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new InterestRate(static_cast< const InterestRate& >(result))), SWIGTYPE_p_InterestRate, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_YieldTermStructure_forwardRate__SWIG_2) {
  {
    boost::shared_ptr< YieldTermStructure > *arg1 = (boost::shared_ptr< YieldTermStructure > *) 0 ;
    Date *arg2 = 0 ;
    Date *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    Compounding arg5 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    InterestRate result;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: YieldTermStructure_forwardRate(self,d1,d2,DayCounter const &,Compounding);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YieldTermStructure_forwardRate" "', argument " "1"" of type '" "boost::shared_ptr< YieldTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< YieldTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "YieldTermStructure_forwardRate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "YieldTermStructure_forwardRate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "YieldTermStructure_forwardRate" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "YieldTermStructure_forwardRate" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "YieldTermStructure_forwardRate" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "YieldTermStructure_forwardRate" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "YieldTermStructure_forwardRate" "', argument " "5"" of type '" "Compounding""'");
    } 
    arg5 = static_cast< Compounding >(val5);
    {
      try {
        result = (*arg1)->forwardRate((Date const &)*arg2,(Date const &)*arg3,(DayCounter const &)*arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new InterestRate(static_cast< const InterestRate& >(result))), SWIGTYPE_p_InterestRate, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_YieldTermStructure_forwardRate__SWIG_3) {
  {
    boost::shared_ptr< YieldTermStructure > *arg1 = (boost::shared_ptr< YieldTermStructure > *) 0 ;
    Time arg2 ;
    Time arg3 ;
    Compounding arg4 ;
    Frequency arg5 ;
    bool arg6 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    bool val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    InterestRate result;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: YieldTermStructure_forwardRate(self,t1,t2,Compounding,f,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YieldTermStructure_forwardRate" "', argument " "1"" of type '" "boost::shared_ptr< YieldTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< YieldTermStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "YieldTermStructure_forwardRate" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "YieldTermStructure_forwardRate" "', argument " "3"" of type '" "Time""'");
    } 
    arg3 = static_cast< Time >(val3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "YieldTermStructure_forwardRate" "', argument " "4"" of type '" "Compounding""'");
    } 
    arg4 = static_cast< Compounding >(val4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "YieldTermStructure_forwardRate" "', argument " "5"" of type '" "Frequency""'");
    } 
    arg5 = static_cast< Frequency >(val5);
    ecode6 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "YieldTermStructure_forwardRate" "', argument " "6"" of type '" "bool""'");
    } 
    arg6 = static_cast< bool >(val6);
    {
      try {
        result = (*arg1)->forwardRate(arg2,arg3,arg4,arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new InterestRate(static_cast< const InterestRate& >(result))), SWIGTYPE_p_InterestRate, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_YieldTermStructure_forwardRate__SWIG_4) {
  {
    boost::shared_ptr< YieldTermStructure > *arg1 = (boost::shared_ptr< YieldTermStructure > *) 0 ;
    Time arg2 ;
    Time arg3 ;
    Compounding arg4 ;
    Frequency arg5 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    InterestRate result;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: YieldTermStructure_forwardRate(self,t1,t2,Compounding,f);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YieldTermStructure_forwardRate" "', argument " "1"" of type '" "boost::shared_ptr< YieldTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< YieldTermStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "YieldTermStructure_forwardRate" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "YieldTermStructure_forwardRate" "', argument " "3"" of type '" "Time""'");
    } 
    arg3 = static_cast< Time >(val3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "YieldTermStructure_forwardRate" "', argument " "4"" of type '" "Compounding""'");
    } 
    arg4 = static_cast< Compounding >(val4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "YieldTermStructure_forwardRate" "', argument " "5"" of type '" "Frequency""'");
    } 
    arg5 = static_cast< Frequency >(val5);
    {
      try {
        result = (*arg1)->forwardRate(arg2,arg3,arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new InterestRate(static_cast< const InterestRate& >(result))), SWIGTYPE_p_InterestRate, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_YieldTermStructure_forwardRate__SWIG_5) {
  {
    boost::shared_ptr< YieldTermStructure > *arg1 = (boost::shared_ptr< YieldTermStructure > *) 0 ;
    Time arg2 ;
    Time arg3 ;
    Compounding arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    InterestRate result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: YieldTermStructure_forwardRate(self,t1,t2,Compounding);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YieldTermStructure_forwardRate" "', argument " "1"" of type '" "boost::shared_ptr< YieldTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< YieldTermStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "YieldTermStructure_forwardRate" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "YieldTermStructure_forwardRate" "', argument " "3"" of type '" "Time""'");
    } 
    arg3 = static_cast< Time >(val3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "YieldTermStructure_forwardRate" "', argument " "4"" of type '" "Compounding""'");
    } 
    arg4 = static_cast< Compounding >(val4);
    {
      try {
        result = (*arg1)->forwardRate(arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new InterestRate(static_cast< const InterestRate& >(result))), SWIGTYPE_p_InterestRate, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_YieldTermStructure_forwardRate) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_YieldTermStructure_forwardRate__SWIG_5); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_YieldTermStructure_forwardRate__SWIG_2); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_YieldTermStructure_forwardRate__SWIG_4); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_YieldTermStructure_forwardRate__SWIG_1); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_YieldTermStructure_forwardRate__SWIG_3); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_YieldTermStructure_forwardRate__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'YieldTermStructure_forwardRate'");
  XSRETURN(0);
}


XS(_wrap_YieldTermStructure_enableExtrapolation) {
  {
    boost::shared_ptr< YieldTermStructure > *arg1 = (boost::shared_ptr< YieldTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: YieldTermStructure_enableExtrapolation(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YieldTermStructure_enableExtrapolation" "', argument " "1"" of type '" "boost::shared_ptr< YieldTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< YieldTermStructure > * >(argp1);
    {
      try {
        (*arg1)->enableExtrapolation();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_YieldTermStructure_disableExtrapolation) {
  {
    boost::shared_ptr< YieldTermStructure > *arg1 = (boost::shared_ptr< YieldTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: YieldTermStructure_disableExtrapolation(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YieldTermStructure_disableExtrapolation" "', argument " "1"" of type '" "boost::shared_ptr< YieldTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< YieldTermStructure > * >(argp1);
    {
      try {
        (*arg1)->disableExtrapolation();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_YieldTermStructure_allowsExtrapolation) {
  {
    boost::shared_ptr< YieldTermStructure > *arg1 = (boost::shared_ptr< YieldTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: YieldTermStructure_allowsExtrapolation(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YieldTermStructure_allowsExtrapolation" "', argument " "1"" of type '" "boost::shared_ptr< YieldTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< YieldTermStructure > * >(argp1);
    {
      try {
        result = (bool)(*arg1)->allowsExtrapolation();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_YieldTermStructureHandle__SWIG_0) {
  {
    boost::shared_ptr< YieldTermStructure > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Handle< YieldTermStructure > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_YieldTermStructureHandle(boost::shared_ptr< YieldTermStructure > const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_YieldTermStructureHandle" "', argument " "1"" of type '" "boost::shared_ptr< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_YieldTermStructureHandle" "', argument " "1"" of type '" "boost::shared_ptr< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< YieldTermStructure > * >(argp1);
    {
      try {
        result = (Handle< YieldTermStructure > *)new Handle< YieldTermStructure >((boost::shared_ptr< YieldTermStructure > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_HandleT_YieldTermStructure_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_YieldTermStructureHandle__SWIG_1) {
  {
    int argvi = 0;
    Handle< YieldTermStructure > *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_YieldTermStructureHandle();");
    }
    {
      try {
        result = (Handle< YieldTermStructure > *)new Handle< YieldTermStructure >();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_HandleT_YieldTermStructure_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_YieldTermStructureHandle) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_YieldTermStructureHandle__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_YieldTermStructureHandle__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_YieldTermStructureHandle'");
  XSRETURN(0);
}


XS(_wrap_YieldTermStructureHandle___deref__) {
  {
    Handle< YieldTermStructure > *arg1 = (Handle< YieldTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    boost::shared_ptr< YieldTermStructure > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: YieldTermStructureHandle___deref__(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_YieldTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YieldTermStructureHandle___deref__" "', argument " "1"" of type '" "Handle< YieldTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    {
      try {
        result = (arg1)->operator ->();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new boost::shared_ptr< YieldTermStructure >(static_cast< const boost::shared_ptr< YieldTermStructure >& >(result))), SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_YieldTermStructureHandle_empty) {
  {
    Handle< YieldTermStructure > *arg1 = (Handle< YieldTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: YieldTermStructureHandle_empty(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_YieldTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YieldTermStructureHandle_empty" "', argument " "1"" of type '" "Handle< YieldTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    {
      try {
        result = (bool)(arg1)->empty();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_YieldTermStructureHandle_asObservable) {
  {
    Handle< YieldTermStructure > *arg1 = (Handle< YieldTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    boost::shared_ptr< Observable > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: YieldTermStructureHandle_asObservable(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_YieldTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YieldTermStructureHandle_asObservable" "', argument " "1"" of type '" "Handle< YieldTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    {
      try {
        result = Handle_Sl_YieldTermStructure_Sg__asObservable(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new boost::shared_ptr< Observable >(static_cast< const boost::shared_ptr< Observable >& >(result))), SWIGTYPE_p_boost__shared_ptrT_Observable_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_YieldTermStructureHandle) {
  {
    Handle< YieldTermStructure > *arg1 = (Handle< YieldTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_YieldTermStructureHandle(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_YieldTermStructure_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_YieldTermStructureHandle" "', argument " "1"" of type '" "Handle< YieldTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_YieldTermStructureHandle_dayCounter) {
  {
    Handle< YieldTermStructure > *arg1 = (Handle< YieldTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    SwigValueWrapper< DayCounter > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: YieldTermStructureHandle_dayCounter(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_YieldTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YieldTermStructureHandle_dayCounter" "', argument " "1"" of type '" "Handle< YieldTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    {
      try {
        result = (*arg1)->dayCounter();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new DayCounter(static_cast< const DayCounter& >(result))), SWIGTYPE_p_DayCounter, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_YieldTermStructureHandle_calendar) {
  {
    Handle< YieldTermStructure > *arg1 = (Handle< YieldTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    SwigValueWrapper< Calendar > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: YieldTermStructureHandle_calendar(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_YieldTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YieldTermStructureHandle_calendar" "', argument " "1"" of type '" "Handle< YieldTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    {
      try {
        result = (*arg1)->calendar();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Calendar(static_cast< const Calendar& >(result))), SWIGTYPE_p_Calendar, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_YieldTermStructureHandle_referenceDate) {
  {
    Handle< YieldTermStructure > *arg1 = (Handle< YieldTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: YieldTermStructureHandle_referenceDate(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_YieldTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YieldTermStructureHandle_referenceDate" "', argument " "1"" of type '" "Handle< YieldTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    {
      try {
        result = (*arg1)->referenceDate();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_YieldTermStructureHandle_maxDate) {
  {
    Handle< YieldTermStructure > *arg1 = (Handle< YieldTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: YieldTermStructureHandle_maxDate(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_YieldTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YieldTermStructureHandle_maxDate" "', argument " "1"" of type '" "Handle< YieldTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    {
      try {
        result = (*arg1)->maxDate();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_YieldTermStructureHandle_maxTime) {
  {
    Handle< YieldTermStructure > *arg1 = (Handle< YieldTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Time result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: YieldTermStructureHandle_maxTime(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_YieldTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YieldTermStructureHandle_maxTime" "', argument " "1"" of type '" "Handle< YieldTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    {
      try {
        result = (Time)(*arg1)->maxTime();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_YieldTermStructureHandle_discount__SWIG_0) {
  {
    Handle< YieldTermStructure > *arg1 = (Handle< YieldTermStructure > *) 0 ;
    Date *arg2 = 0 ;
    bool arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    DiscountFactor result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: YieldTermStructureHandle_discount(self,Date const &,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_YieldTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YieldTermStructureHandle_discount" "', argument " "1"" of type '" "Handle< YieldTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "YieldTermStructureHandle_discount" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "YieldTermStructureHandle_discount" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "YieldTermStructureHandle_discount" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (DiscountFactor)(*arg1)->discount((Date const &)*arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_YieldTermStructureHandle_discount__SWIG_1) {
  {
    Handle< YieldTermStructure > *arg1 = (Handle< YieldTermStructure > *) 0 ;
    Date *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    DiscountFactor result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: YieldTermStructureHandle_discount(self,Date const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_YieldTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YieldTermStructureHandle_discount" "', argument " "1"" of type '" "Handle< YieldTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "YieldTermStructureHandle_discount" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "YieldTermStructureHandle_discount" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    {
      try {
        result = (DiscountFactor)(*arg1)->discount((Date const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_YieldTermStructureHandle_discount__SWIG_2) {
  {
    Handle< YieldTermStructure > *arg1 = (Handle< YieldTermStructure > *) 0 ;
    Time arg2 ;
    bool arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    DiscountFactor result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: YieldTermStructureHandle_discount(self,Time,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_YieldTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YieldTermStructureHandle_discount" "', argument " "1"" of type '" "Handle< YieldTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "YieldTermStructureHandle_discount" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "YieldTermStructureHandle_discount" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (DiscountFactor)(*arg1)->discount(arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_YieldTermStructureHandle_discount__SWIG_3) {
  {
    Handle< YieldTermStructure > *arg1 = (Handle< YieldTermStructure > *) 0 ;
    Time arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    DiscountFactor result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: YieldTermStructureHandle_discount(self,Time);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_YieldTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YieldTermStructureHandle_discount" "', argument " "1"" of type '" "Handle< YieldTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "YieldTermStructureHandle_discount" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    {
      try {
        result = (DiscountFactor)(*arg1)->discount(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_YieldTermStructureHandle_discount) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_YieldTermStructureHandle_discount__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_YieldTermStructureHandle_discount__SWIG_3); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_YieldTermStructureHandle_discount__SWIG_0); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_YieldTermStructureHandle_discount__SWIG_2); return;
    }
  }
  
  croak("No matching function for overloaded 'YieldTermStructureHandle_discount'");
  XSRETURN(0);
}


XS(_wrap_YieldTermStructureHandle_zeroRate__SWIG_0) {
  {
    Handle< YieldTermStructure > *arg1 = (Handle< YieldTermStructure > *) 0 ;
    Date *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    Compounding arg4 ;
    Frequency arg5 ;
    bool arg6 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    bool val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    InterestRate result;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: YieldTermStructureHandle_zeroRate(self,d,DayCounter const &,Compounding,f,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_YieldTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YieldTermStructureHandle_zeroRate" "', argument " "1"" of type '" "Handle< YieldTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "YieldTermStructureHandle_zeroRate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "YieldTermStructureHandle_zeroRate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "YieldTermStructureHandle_zeroRate" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "YieldTermStructureHandle_zeroRate" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "YieldTermStructureHandle_zeroRate" "', argument " "4"" of type '" "Compounding""'");
    } 
    arg4 = static_cast< Compounding >(val4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "YieldTermStructureHandle_zeroRate" "', argument " "5"" of type '" "Frequency""'");
    } 
    arg5 = static_cast< Frequency >(val5);
    ecode6 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "YieldTermStructureHandle_zeroRate" "', argument " "6"" of type '" "bool""'");
    } 
    arg6 = static_cast< bool >(val6);
    {
      try {
        result = (*arg1)->zeroRate((Date const &)*arg2,(DayCounter const &)*arg3,arg4,arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new InterestRate(static_cast< const InterestRate& >(result))), SWIGTYPE_p_InterestRate, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_YieldTermStructureHandle_zeroRate__SWIG_1) {
  {
    Handle< YieldTermStructure > *arg1 = (Handle< YieldTermStructure > *) 0 ;
    Date *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    Compounding arg4 ;
    Frequency arg5 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    InterestRate result;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: YieldTermStructureHandle_zeroRate(self,d,DayCounter const &,Compounding,f);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_YieldTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YieldTermStructureHandle_zeroRate" "', argument " "1"" of type '" "Handle< YieldTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "YieldTermStructureHandle_zeroRate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "YieldTermStructureHandle_zeroRate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "YieldTermStructureHandle_zeroRate" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "YieldTermStructureHandle_zeroRate" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "YieldTermStructureHandle_zeroRate" "', argument " "4"" of type '" "Compounding""'");
    } 
    arg4 = static_cast< Compounding >(val4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "YieldTermStructureHandle_zeroRate" "', argument " "5"" of type '" "Frequency""'");
    } 
    arg5 = static_cast< Frequency >(val5);
    {
      try {
        result = (*arg1)->zeroRate((Date const &)*arg2,(DayCounter const &)*arg3,arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new InterestRate(static_cast< const InterestRate& >(result))), SWIGTYPE_p_InterestRate, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_YieldTermStructureHandle_zeroRate__SWIG_2) {
  {
    Handle< YieldTermStructure > *arg1 = (Handle< YieldTermStructure > *) 0 ;
    Date *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    Compounding arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    InterestRate result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: YieldTermStructureHandle_zeroRate(self,d,DayCounter const &,Compounding);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_YieldTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YieldTermStructureHandle_zeroRate" "', argument " "1"" of type '" "Handle< YieldTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "YieldTermStructureHandle_zeroRate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "YieldTermStructureHandle_zeroRate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "YieldTermStructureHandle_zeroRate" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "YieldTermStructureHandle_zeroRate" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "YieldTermStructureHandle_zeroRate" "', argument " "4"" of type '" "Compounding""'");
    } 
    arg4 = static_cast< Compounding >(val4);
    {
      try {
        result = (*arg1)->zeroRate((Date const &)*arg2,(DayCounter const &)*arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new InterestRate(static_cast< const InterestRate& >(result))), SWIGTYPE_p_InterestRate, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_YieldTermStructureHandle_zeroRate__SWIG_3) {
  {
    Handle< YieldTermStructure > *arg1 = (Handle< YieldTermStructure > *) 0 ;
    Time arg2 ;
    Compounding arg3 ;
    Frequency arg4 ;
    bool arg5 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    bool val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    InterestRate result;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: YieldTermStructureHandle_zeroRate(self,t,Compounding,f,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_YieldTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YieldTermStructureHandle_zeroRate" "', argument " "1"" of type '" "Handle< YieldTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "YieldTermStructureHandle_zeroRate" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "YieldTermStructureHandle_zeroRate" "', argument " "3"" of type '" "Compounding""'");
    } 
    arg3 = static_cast< Compounding >(val3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "YieldTermStructureHandle_zeroRate" "', argument " "4"" of type '" "Frequency""'");
    } 
    arg4 = static_cast< Frequency >(val4);
    ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "YieldTermStructureHandle_zeroRate" "', argument " "5"" of type '" "bool""'");
    } 
    arg5 = static_cast< bool >(val5);
    {
      try {
        result = (*arg1)->zeroRate(arg2,arg3,arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new InterestRate(static_cast< const InterestRate& >(result))), SWIGTYPE_p_InterestRate, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_YieldTermStructureHandle_zeroRate__SWIG_4) {
  {
    Handle< YieldTermStructure > *arg1 = (Handle< YieldTermStructure > *) 0 ;
    Time arg2 ;
    Compounding arg3 ;
    Frequency arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    InterestRate result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: YieldTermStructureHandle_zeroRate(self,t,Compounding,f);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_YieldTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YieldTermStructureHandle_zeroRate" "', argument " "1"" of type '" "Handle< YieldTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "YieldTermStructureHandle_zeroRate" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "YieldTermStructureHandle_zeroRate" "', argument " "3"" of type '" "Compounding""'");
    } 
    arg3 = static_cast< Compounding >(val3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "YieldTermStructureHandle_zeroRate" "', argument " "4"" of type '" "Frequency""'");
    } 
    arg4 = static_cast< Frequency >(val4);
    {
      try {
        result = (*arg1)->zeroRate(arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new InterestRate(static_cast< const InterestRate& >(result))), SWIGTYPE_p_InterestRate, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_YieldTermStructureHandle_zeroRate__SWIG_5) {
  {
    Handle< YieldTermStructure > *arg1 = (Handle< YieldTermStructure > *) 0 ;
    Time arg2 ;
    Compounding arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    InterestRate result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: YieldTermStructureHandle_zeroRate(self,t,Compounding);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_YieldTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YieldTermStructureHandle_zeroRate" "', argument " "1"" of type '" "Handle< YieldTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "YieldTermStructureHandle_zeroRate" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "YieldTermStructureHandle_zeroRate" "', argument " "3"" of type '" "Compounding""'");
    } 
    arg3 = static_cast< Compounding >(val3);
    {
      try {
        result = (*arg1)->zeroRate(arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new InterestRate(static_cast< const InterestRate& >(result))), SWIGTYPE_p_InterestRate, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_YieldTermStructureHandle_zeroRate) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_YieldTermStructureHandle_zeroRate__SWIG_5); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_YieldTermStructureHandle_zeroRate__SWIG_2); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_YieldTermStructureHandle_zeroRate__SWIG_4); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_YieldTermStructureHandle_zeroRate__SWIG_1); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_YieldTermStructureHandle_zeroRate__SWIG_3); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_YieldTermStructureHandle_zeroRate__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'YieldTermStructureHandle_zeroRate'");
  XSRETURN(0);
}


XS(_wrap_YieldTermStructureHandle_forwardRate__SWIG_0) {
  {
    Handle< YieldTermStructure > *arg1 = (Handle< YieldTermStructure > *) 0 ;
    Date *arg2 = 0 ;
    Date *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    Compounding arg5 ;
    Frequency arg6 ;
    bool arg7 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    bool val7 ;
    int ecode7 = 0 ;
    int argvi = 0;
    InterestRate result;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: YieldTermStructureHandle_forwardRate(self,d1,d2,DayCounter const &,Compounding,f,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_YieldTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YieldTermStructureHandle_forwardRate" "', argument " "1"" of type '" "Handle< YieldTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "YieldTermStructureHandle_forwardRate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "YieldTermStructureHandle_forwardRate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "YieldTermStructureHandle_forwardRate" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "YieldTermStructureHandle_forwardRate" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "YieldTermStructureHandle_forwardRate" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "YieldTermStructureHandle_forwardRate" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "YieldTermStructureHandle_forwardRate" "', argument " "5"" of type '" "Compounding""'");
    } 
    arg5 = static_cast< Compounding >(val5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "YieldTermStructureHandle_forwardRate" "', argument " "6"" of type '" "Frequency""'");
    } 
    arg6 = static_cast< Frequency >(val6);
    ecode7 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "YieldTermStructureHandle_forwardRate" "', argument " "7"" of type '" "bool""'");
    } 
    arg7 = static_cast< bool >(val7);
    {
      try {
        result = (*arg1)->forwardRate((Date const &)*arg2,(Date const &)*arg3,(DayCounter const &)*arg4,arg5,arg6,arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new InterestRate(static_cast< const InterestRate& >(result))), SWIGTYPE_p_InterestRate, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_YieldTermStructureHandle_forwardRate__SWIG_1) {
  {
    Handle< YieldTermStructure > *arg1 = (Handle< YieldTermStructure > *) 0 ;
    Date *arg2 = 0 ;
    Date *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    Compounding arg5 ;
    Frequency arg6 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    InterestRate result;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: YieldTermStructureHandle_forwardRate(self,d1,d2,DayCounter const &,Compounding,f);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_YieldTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YieldTermStructureHandle_forwardRate" "', argument " "1"" of type '" "Handle< YieldTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "YieldTermStructureHandle_forwardRate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "YieldTermStructureHandle_forwardRate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "YieldTermStructureHandle_forwardRate" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "YieldTermStructureHandle_forwardRate" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "YieldTermStructureHandle_forwardRate" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "YieldTermStructureHandle_forwardRate" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "YieldTermStructureHandle_forwardRate" "', argument " "5"" of type '" "Compounding""'");
    } 
    arg5 = static_cast< Compounding >(val5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "YieldTermStructureHandle_forwardRate" "', argument " "6"" of type '" "Frequency""'");
    } 
    arg6 = static_cast< Frequency >(val6);
    {
      try {
        result = (*arg1)->forwardRate((Date const &)*arg2,(Date const &)*arg3,(DayCounter const &)*arg4,arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new InterestRate(static_cast< const InterestRate& >(result))), SWIGTYPE_p_InterestRate, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_YieldTermStructureHandle_forwardRate__SWIG_2) {
  {
    Handle< YieldTermStructure > *arg1 = (Handle< YieldTermStructure > *) 0 ;
    Date *arg2 = 0 ;
    Date *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    Compounding arg5 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    InterestRate result;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: YieldTermStructureHandle_forwardRate(self,d1,d2,DayCounter const &,Compounding);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_YieldTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YieldTermStructureHandle_forwardRate" "', argument " "1"" of type '" "Handle< YieldTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "YieldTermStructureHandle_forwardRate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "YieldTermStructureHandle_forwardRate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "YieldTermStructureHandle_forwardRate" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "YieldTermStructureHandle_forwardRate" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "YieldTermStructureHandle_forwardRate" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "YieldTermStructureHandle_forwardRate" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "YieldTermStructureHandle_forwardRate" "', argument " "5"" of type '" "Compounding""'");
    } 
    arg5 = static_cast< Compounding >(val5);
    {
      try {
        result = (*arg1)->forwardRate((Date const &)*arg2,(Date const &)*arg3,(DayCounter const &)*arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new InterestRate(static_cast< const InterestRate& >(result))), SWIGTYPE_p_InterestRate, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_YieldTermStructureHandle_forwardRate__SWIG_3) {
  {
    Handle< YieldTermStructure > *arg1 = (Handle< YieldTermStructure > *) 0 ;
    Time arg2 ;
    Time arg3 ;
    Compounding arg4 ;
    Frequency arg5 ;
    bool arg6 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    bool val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    InterestRate result;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: YieldTermStructureHandle_forwardRate(self,t1,t2,Compounding,f,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_YieldTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YieldTermStructureHandle_forwardRate" "', argument " "1"" of type '" "Handle< YieldTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "YieldTermStructureHandle_forwardRate" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "YieldTermStructureHandle_forwardRate" "', argument " "3"" of type '" "Time""'");
    } 
    arg3 = static_cast< Time >(val3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "YieldTermStructureHandle_forwardRate" "', argument " "4"" of type '" "Compounding""'");
    } 
    arg4 = static_cast< Compounding >(val4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "YieldTermStructureHandle_forwardRate" "', argument " "5"" of type '" "Frequency""'");
    } 
    arg5 = static_cast< Frequency >(val5);
    ecode6 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "YieldTermStructureHandle_forwardRate" "', argument " "6"" of type '" "bool""'");
    } 
    arg6 = static_cast< bool >(val6);
    {
      try {
        result = (*arg1)->forwardRate(arg2,arg3,arg4,arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new InterestRate(static_cast< const InterestRate& >(result))), SWIGTYPE_p_InterestRate, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_YieldTermStructureHandle_forwardRate__SWIG_4) {
  {
    Handle< YieldTermStructure > *arg1 = (Handle< YieldTermStructure > *) 0 ;
    Time arg2 ;
    Time arg3 ;
    Compounding arg4 ;
    Frequency arg5 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    InterestRate result;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: YieldTermStructureHandle_forwardRate(self,t1,t2,Compounding,f);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_YieldTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YieldTermStructureHandle_forwardRate" "', argument " "1"" of type '" "Handle< YieldTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "YieldTermStructureHandle_forwardRate" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "YieldTermStructureHandle_forwardRate" "', argument " "3"" of type '" "Time""'");
    } 
    arg3 = static_cast< Time >(val3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "YieldTermStructureHandle_forwardRate" "', argument " "4"" of type '" "Compounding""'");
    } 
    arg4 = static_cast< Compounding >(val4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "YieldTermStructureHandle_forwardRate" "', argument " "5"" of type '" "Frequency""'");
    } 
    arg5 = static_cast< Frequency >(val5);
    {
      try {
        result = (*arg1)->forwardRate(arg2,arg3,arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new InterestRate(static_cast< const InterestRate& >(result))), SWIGTYPE_p_InterestRate, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_YieldTermStructureHandle_forwardRate__SWIG_5) {
  {
    Handle< YieldTermStructure > *arg1 = (Handle< YieldTermStructure > *) 0 ;
    Time arg2 ;
    Time arg3 ;
    Compounding arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    InterestRate result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: YieldTermStructureHandle_forwardRate(self,t1,t2,Compounding);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_YieldTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YieldTermStructureHandle_forwardRate" "', argument " "1"" of type '" "Handle< YieldTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "YieldTermStructureHandle_forwardRate" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "YieldTermStructureHandle_forwardRate" "', argument " "3"" of type '" "Time""'");
    } 
    arg3 = static_cast< Time >(val3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "YieldTermStructureHandle_forwardRate" "', argument " "4"" of type '" "Compounding""'");
    } 
    arg4 = static_cast< Compounding >(val4);
    {
      try {
        result = (*arg1)->forwardRate(arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new InterestRate(static_cast< const InterestRate& >(result))), SWIGTYPE_p_InterestRate, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_YieldTermStructureHandle_forwardRate) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_YieldTermStructureHandle_forwardRate__SWIG_5); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_YieldTermStructureHandle_forwardRate__SWIG_2); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_YieldTermStructureHandle_forwardRate__SWIG_4); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_YieldTermStructureHandle_forwardRate__SWIG_1); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_YieldTermStructureHandle_forwardRate__SWIG_3); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_YieldTermStructureHandle_forwardRate__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'YieldTermStructureHandle_forwardRate'");
  XSRETURN(0);
}


XS(_wrap_YieldTermStructureHandle_enableExtrapolation) {
  {
    Handle< YieldTermStructure > *arg1 = (Handle< YieldTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: YieldTermStructureHandle_enableExtrapolation(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_YieldTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YieldTermStructureHandle_enableExtrapolation" "', argument " "1"" of type '" "Handle< YieldTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    {
      try {
        (*arg1)->enableExtrapolation();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_YieldTermStructureHandle_disableExtrapolation) {
  {
    Handle< YieldTermStructure > *arg1 = (Handle< YieldTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: YieldTermStructureHandle_disableExtrapolation(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_YieldTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YieldTermStructureHandle_disableExtrapolation" "', argument " "1"" of type '" "Handle< YieldTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    {
      try {
        (*arg1)->disableExtrapolation();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_YieldTermStructureHandle_allowsExtrapolation) {
  {
    Handle< YieldTermStructure > *arg1 = (Handle< YieldTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: YieldTermStructureHandle_allowsExtrapolation(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_YieldTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YieldTermStructureHandle_allowsExtrapolation" "', argument " "1"" of type '" "Handle< YieldTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    {
      try {
        result = (bool)(*arg1)->allowsExtrapolation();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_RelinkableYieldTermStructureHandle__SWIG_0) {
  {
    boost::shared_ptr< YieldTermStructure > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    RelinkableHandle< YieldTermStructure > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_RelinkableYieldTermStructureHandle(boost::shared_ptr< YieldTermStructure > const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_RelinkableYieldTermStructureHandle" "', argument " "1"" of type '" "boost::shared_ptr< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_RelinkableYieldTermStructureHandle" "', argument " "1"" of type '" "boost::shared_ptr< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< YieldTermStructure > * >(argp1);
    {
      try {
        result = (RelinkableHandle< YieldTermStructure > *)new RelinkableHandle< YieldTermStructure >((boost::shared_ptr< YieldTermStructure > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_RelinkableHandleT_YieldTermStructure_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_RelinkableYieldTermStructureHandle__SWIG_1) {
  {
    int argvi = 0;
    RelinkableHandle< YieldTermStructure > *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_RelinkableYieldTermStructureHandle();");
    }
    {
      try {
        result = (RelinkableHandle< YieldTermStructure > *)new RelinkableHandle< YieldTermStructure >();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_RelinkableHandleT_YieldTermStructure_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_RelinkableYieldTermStructureHandle) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_RelinkableYieldTermStructureHandle__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_RelinkableYieldTermStructureHandle__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_RelinkableYieldTermStructureHandle'");
  XSRETURN(0);
}


XS(_wrap_RelinkableYieldTermStructureHandle_linkTo) {
  {
    RelinkableHandle< YieldTermStructure > *arg1 = (RelinkableHandle< YieldTermStructure > *) 0 ;
    boost::shared_ptr< YieldTermStructure > *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: RelinkableYieldTermStructureHandle_linkTo(self,boost::shared_ptr< YieldTermStructure > const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_RelinkableHandleT_YieldTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RelinkableYieldTermStructureHandle_linkTo" "', argument " "1"" of type '" "RelinkableHandle< YieldTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< RelinkableHandle< YieldTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "RelinkableYieldTermStructureHandle_linkTo" "', argument " "2"" of type '" "boost::shared_ptr< YieldTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "RelinkableYieldTermStructureHandle_linkTo" "', argument " "2"" of type '" "boost::shared_ptr< YieldTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< boost::shared_ptr< YieldTermStructure > * >(argp2);
    {
      try {
        (arg1)->linkTo((boost::shared_ptr< YieldTermStructure > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_RelinkableYieldTermStructureHandle) {
  {
    RelinkableHandle< YieldTermStructure > *arg1 = (RelinkableHandle< YieldTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_RelinkableYieldTermStructureHandle(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_RelinkableHandleT_YieldTermStructure_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_RelinkableYieldTermStructureHandle" "', argument " "1"" of type '" "RelinkableHandle< YieldTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< RelinkableHandle< YieldTermStructure > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ImpliedTermStructure) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    Date *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    ImpliedTermStructurePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_ImpliedTermStructure(curveHandle,referenceDate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ImpliedTermStructure" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ImpliedTermStructure" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ImpliedTermStructure" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ImpliedTermStructure" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    {
      try {
        result = (ImpliedTermStructurePtr *)new_ImpliedTermStructurePtr((Handle< YieldTermStructure > const &)*arg1,(Date const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ImpliedTermStructurePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_ImpliedTermStructure) {
  {
    ImpliedTermStructurePtr *arg1 = (ImpliedTermStructurePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_ImpliedTermStructure(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ImpliedTermStructurePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ImpliedTermStructure" "', argument " "1"" of type '" "ImpliedTermStructurePtr *""'"); 
    }
    arg1 = reinterpret_cast< ImpliedTermStructurePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ZeroSpreadedTermStructure__SWIG_0) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    Handle< Quote > *arg2 = 0 ;
    Compounding arg3 ;
    Frequency arg4 ;
    DayCounter *arg5 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int argvi = 0;
    ZeroSpreadedTermStructurePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_ZeroSpreadedTermStructure(curveHandle,spreadHandle,comp,freq,dc);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ZeroSpreadedTermStructure" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ZeroSpreadedTermStructure" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ZeroSpreadedTermStructure" "', argument " "2"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ZeroSpreadedTermStructure" "', argument " "2"" of type '" "Handle< Quote > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< Quote > * >(argp2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_ZeroSpreadedTermStructure" "', argument " "3"" of type '" "Compounding""'");
    } 
    arg3 = static_cast< Compounding >(val3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_ZeroSpreadedTermStructure" "', argument " "4"" of type '" "Frequency""'");
    } 
    arg4 = static_cast< Frequency >(val4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_ZeroSpreadedTermStructure" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ZeroSpreadedTermStructure" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    arg5 = reinterpret_cast< DayCounter * >(argp5);
    {
      try {
        result = (ZeroSpreadedTermStructurePtr *)new_ZeroSpreadedTermStructurePtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1,(Handle< Quote > const &)*arg2,arg3,arg4,(DayCounter const &)*arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ZeroSpreadedTermStructurePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ZeroSpreadedTermStructure__SWIG_1) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    Handle< Quote > *arg2 = 0 ;
    Compounding arg3 ;
    Frequency arg4 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    ZeroSpreadedTermStructurePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_ZeroSpreadedTermStructure(curveHandle,spreadHandle,comp,freq);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ZeroSpreadedTermStructure" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ZeroSpreadedTermStructure" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ZeroSpreadedTermStructure" "', argument " "2"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ZeroSpreadedTermStructure" "', argument " "2"" of type '" "Handle< Quote > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< Quote > * >(argp2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_ZeroSpreadedTermStructure" "', argument " "3"" of type '" "Compounding""'");
    } 
    arg3 = static_cast< Compounding >(val3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_ZeroSpreadedTermStructure" "', argument " "4"" of type '" "Frequency""'");
    } 
    arg4 = static_cast< Frequency >(val4);
    {
      try {
        result = (ZeroSpreadedTermStructurePtr *)new_ZeroSpreadedTermStructurePtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1,(Handle< Quote > const &)*arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ZeroSpreadedTermStructurePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ZeroSpreadedTermStructure__SWIG_2) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    Handle< Quote > *arg2 = 0 ;
    Compounding arg3 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    ZeroSpreadedTermStructurePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_ZeroSpreadedTermStructure(curveHandle,spreadHandle,comp);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ZeroSpreadedTermStructure" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ZeroSpreadedTermStructure" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ZeroSpreadedTermStructure" "', argument " "2"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ZeroSpreadedTermStructure" "', argument " "2"" of type '" "Handle< Quote > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< Quote > * >(argp2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_ZeroSpreadedTermStructure" "', argument " "3"" of type '" "Compounding""'");
    } 
    arg3 = static_cast< Compounding >(val3);
    {
      try {
        result = (ZeroSpreadedTermStructurePtr *)new_ZeroSpreadedTermStructurePtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1,(Handle< Quote > const &)*arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ZeroSpreadedTermStructurePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ZeroSpreadedTermStructure__SWIG_3) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    Handle< Quote > *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    ZeroSpreadedTermStructurePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_ZeroSpreadedTermStructure(curveHandle,spreadHandle);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ZeroSpreadedTermStructure" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ZeroSpreadedTermStructure" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ZeroSpreadedTermStructure" "', argument " "2"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ZeroSpreadedTermStructure" "', argument " "2"" of type '" "Handle< Quote > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< Quote > * >(argp2);
    {
      try {
        result = (ZeroSpreadedTermStructurePtr *)new_ZeroSpreadedTermStructurePtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1,(Handle< Quote > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ZeroSpreadedTermStructurePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ZeroSpreadedTermStructure) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ZeroSpreadedTermStructure__SWIG_3); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ZeroSpreadedTermStructure__SWIG_2); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ZeroSpreadedTermStructure__SWIG_1); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ZeroSpreadedTermStructure__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_ZeroSpreadedTermStructure'");
  XSRETURN(0);
}


XS(_wrap_delete_ZeroSpreadedTermStructure) {
  {
    ZeroSpreadedTermStructurePtr *arg1 = (ZeroSpreadedTermStructurePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_ZeroSpreadedTermStructure(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ZeroSpreadedTermStructurePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ZeroSpreadedTermStructure" "', argument " "1"" of type '" "ZeroSpreadedTermStructurePtr *""'"); 
    }
    arg1 = reinterpret_cast< ZeroSpreadedTermStructurePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ForwardSpreadedTermStructure) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    Handle< Quote > *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    ForwardSpreadedTermStructurePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_ForwardSpreadedTermStructure(curveHandle,spreadHandle);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ForwardSpreadedTermStructure" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ForwardSpreadedTermStructure" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ForwardSpreadedTermStructure" "', argument " "2"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ForwardSpreadedTermStructure" "', argument " "2"" of type '" "Handle< Quote > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< Quote > * >(argp2);
    {
      try {
        result = (ForwardSpreadedTermStructurePtr *)new_ForwardSpreadedTermStructurePtr((Handle< YieldTermStructure > const &)*arg1,(Handle< Quote > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ForwardSpreadedTermStructurePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_ForwardSpreadedTermStructure) {
  {
    ForwardSpreadedTermStructurePtr *arg1 = (ForwardSpreadedTermStructurePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_ForwardSpreadedTermStructure(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ForwardSpreadedTermStructurePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ForwardSpreadedTermStructure" "', argument " "1"" of type '" "ForwardSpreadedTermStructurePtr *""'"); 
    }
    arg1 = reinterpret_cast< ForwardSpreadedTermStructurePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SpreadedLinearZeroInterpolatedTermStructure__SWIG_0) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    std::vector< Handle< Quote > > *arg2 = 0 ;
    std::vector< Date > *arg3 = 0 ;
    Compounding arg4 ;
    Frequency arg5 ;
    DayCounter *arg6 = 0 ;
    Linear *arg7 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    std::vector< Handle< Quote > > temp2 ;
    std::vector< Handle< Quote > > *v2 ;
    std::vector< Date > temp3 ;
    std::vector< Date > *v3 ;
    int val4 ;
    int ecode4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    int argvi = 0;
    SpreadedLinearZeroInterpolatedTermStructurePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: new_SpreadedLinearZeroInterpolatedTermStructure(curveHandle,spreadHandles,dates,comp,freq,dc,factory);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SpreadedLinearZeroInterpolatedTermStructure" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SpreadedLinearZeroInterpolatedTermStructure" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_SpreadedLinearZeroInterpolatedTermStructure. "
          "Expected an array of " "Handle< Quote >");
        SV **tv;
        I32 len = av_len(av) + 1;
        Handle< Quote >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_HandleT_Quote_t,0) != -1) {
            temp2.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_SpreadedLinearZeroInterpolatedTermStructure. "
              "Expected an array of " "Handle< Quote >");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_SpreadedLinearZeroInterpolatedTermStructure. "
          "Expected an array of " "Handle< Quote >");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_SpreadedLinearZeroInterpolatedTermStructure. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp3.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_SpreadedLinearZeroInterpolatedTermStructure. "
              "Expected an array of " "Date");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_SpreadedLinearZeroInterpolatedTermStructure. "
          "Expected an array of " "Date");
      }
    }
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_SpreadedLinearZeroInterpolatedTermStructure" "', argument " "4"" of type '" "Compounding""'");
    } 
    arg4 = static_cast< Compounding >(val4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_SpreadedLinearZeroInterpolatedTermStructure" "', argument " "5"" of type '" "Frequency""'");
    } 
    arg5 = static_cast< Frequency >(val5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_SpreadedLinearZeroInterpolatedTermStructure" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SpreadedLinearZeroInterpolatedTermStructure" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    arg6 = reinterpret_cast< DayCounter * >(argp6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Linear,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_SpreadedLinearZeroInterpolatedTermStructure" "', argument " "7"" of type '" "Linear const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SpreadedLinearZeroInterpolatedTermStructure" "', argument " "7"" of type '" "Linear const &""'"); 
    }
    arg7 = reinterpret_cast< Linear * >(argp7);
    {
      try {
        result = (SpreadedLinearZeroInterpolatedTermStructurePtr *)new_SpreadedLinearZeroInterpolatedTermStructurePtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1,(std::vector< Handle< Quote > > const &)*arg2,(std::vector< Date > const &)*arg3,arg4,arg5,(DayCounter const &)*arg6,(Linear const &)*arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SpreadedLinearZeroInterpolatedTermStructurePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SpreadedLinearZeroInterpolatedTermStructure__SWIG_1) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    std::vector< Handle< Quote > > *arg2 = 0 ;
    std::vector< Date > *arg3 = 0 ;
    Compounding arg4 ;
    Frequency arg5 ;
    DayCounter *arg6 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    std::vector< Handle< Quote > > temp2 ;
    std::vector< Handle< Quote > > *v2 ;
    std::vector< Date > temp3 ;
    std::vector< Date > *v3 ;
    int val4 ;
    int ecode4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    int argvi = 0;
    SpreadedLinearZeroInterpolatedTermStructurePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_SpreadedLinearZeroInterpolatedTermStructure(curveHandle,spreadHandles,dates,comp,freq,dc);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SpreadedLinearZeroInterpolatedTermStructure" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SpreadedLinearZeroInterpolatedTermStructure" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_SpreadedLinearZeroInterpolatedTermStructure. "
          "Expected an array of " "Handle< Quote >");
        SV **tv;
        I32 len = av_len(av) + 1;
        Handle< Quote >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_HandleT_Quote_t,0) != -1) {
            temp2.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_SpreadedLinearZeroInterpolatedTermStructure. "
              "Expected an array of " "Handle< Quote >");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_SpreadedLinearZeroInterpolatedTermStructure. "
          "Expected an array of " "Handle< Quote >");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_SpreadedLinearZeroInterpolatedTermStructure. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp3.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_SpreadedLinearZeroInterpolatedTermStructure. "
              "Expected an array of " "Date");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_SpreadedLinearZeroInterpolatedTermStructure. "
          "Expected an array of " "Date");
      }
    }
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_SpreadedLinearZeroInterpolatedTermStructure" "', argument " "4"" of type '" "Compounding""'");
    } 
    arg4 = static_cast< Compounding >(val4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_SpreadedLinearZeroInterpolatedTermStructure" "', argument " "5"" of type '" "Frequency""'");
    } 
    arg5 = static_cast< Frequency >(val5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_SpreadedLinearZeroInterpolatedTermStructure" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SpreadedLinearZeroInterpolatedTermStructure" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    arg6 = reinterpret_cast< DayCounter * >(argp6);
    {
      try {
        result = (SpreadedLinearZeroInterpolatedTermStructurePtr *)new_SpreadedLinearZeroInterpolatedTermStructurePtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1,(std::vector< Handle< Quote > > const &)*arg2,(std::vector< Date > const &)*arg3,arg4,arg5,(DayCounter const &)*arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SpreadedLinearZeroInterpolatedTermStructurePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SpreadedLinearZeroInterpolatedTermStructure__SWIG_2) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    std::vector< Handle< Quote > > *arg2 = 0 ;
    std::vector< Date > *arg3 = 0 ;
    Compounding arg4 ;
    Frequency arg5 ;
    void *argp1 ;
    int res1 = 0 ;
    std::vector< Handle< Quote > > temp2 ;
    std::vector< Handle< Quote > > *v2 ;
    std::vector< Date > temp3 ;
    std::vector< Date > *v3 ;
    int val4 ;
    int ecode4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    SpreadedLinearZeroInterpolatedTermStructurePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_SpreadedLinearZeroInterpolatedTermStructure(curveHandle,spreadHandles,dates,comp,freq);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SpreadedLinearZeroInterpolatedTermStructure" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SpreadedLinearZeroInterpolatedTermStructure" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_SpreadedLinearZeroInterpolatedTermStructure. "
          "Expected an array of " "Handle< Quote >");
        SV **tv;
        I32 len = av_len(av) + 1;
        Handle< Quote >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_HandleT_Quote_t,0) != -1) {
            temp2.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_SpreadedLinearZeroInterpolatedTermStructure. "
              "Expected an array of " "Handle< Quote >");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_SpreadedLinearZeroInterpolatedTermStructure. "
          "Expected an array of " "Handle< Quote >");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_SpreadedLinearZeroInterpolatedTermStructure. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp3.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_SpreadedLinearZeroInterpolatedTermStructure. "
              "Expected an array of " "Date");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_SpreadedLinearZeroInterpolatedTermStructure. "
          "Expected an array of " "Date");
      }
    }
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_SpreadedLinearZeroInterpolatedTermStructure" "', argument " "4"" of type '" "Compounding""'");
    } 
    arg4 = static_cast< Compounding >(val4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_SpreadedLinearZeroInterpolatedTermStructure" "', argument " "5"" of type '" "Frequency""'");
    } 
    arg5 = static_cast< Frequency >(val5);
    {
      try {
        result = (SpreadedLinearZeroInterpolatedTermStructurePtr *)new_SpreadedLinearZeroInterpolatedTermStructurePtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1,(std::vector< Handle< Quote > > const &)*arg2,(std::vector< Date > const &)*arg3,arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SpreadedLinearZeroInterpolatedTermStructurePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SpreadedLinearZeroInterpolatedTermStructure__SWIG_3) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    std::vector< Handle< Quote > > *arg2 = 0 ;
    std::vector< Date > *arg3 = 0 ;
    Compounding arg4 ;
    void *argp1 ;
    int res1 = 0 ;
    std::vector< Handle< Quote > > temp2 ;
    std::vector< Handle< Quote > > *v2 ;
    std::vector< Date > temp3 ;
    std::vector< Date > *v3 ;
    int val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    SpreadedLinearZeroInterpolatedTermStructurePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_SpreadedLinearZeroInterpolatedTermStructure(curveHandle,spreadHandles,dates,comp);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SpreadedLinearZeroInterpolatedTermStructure" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SpreadedLinearZeroInterpolatedTermStructure" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_SpreadedLinearZeroInterpolatedTermStructure. "
          "Expected an array of " "Handle< Quote >");
        SV **tv;
        I32 len = av_len(av) + 1;
        Handle< Quote >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_HandleT_Quote_t,0) != -1) {
            temp2.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_SpreadedLinearZeroInterpolatedTermStructure. "
              "Expected an array of " "Handle< Quote >");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_SpreadedLinearZeroInterpolatedTermStructure. "
          "Expected an array of " "Handle< Quote >");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_SpreadedLinearZeroInterpolatedTermStructure. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp3.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_SpreadedLinearZeroInterpolatedTermStructure. "
              "Expected an array of " "Date");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_SpreadedLinearZeroInterpolatedTermStructure. "
          "Expected an array of " "Date");
      }
    }
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_SpreadedLinearZeroInterpolatedTermStructure" "', argument " "4"" of type '" "Compounding""'");
    } 
    arg4 = static_cast< Compounding >(val4);
    {
      try {
        result = (SpreadedLinearZeroInterpolatedTermStructurePtr *)new_SpreadedLinearZeroInterpolatedTermStructurePtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1,(std::vector< Handle< Quote > > const &)*arg2,(std::vector< Date > const &)*arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SpreadedLinearZeroInterpolatedTermStructurePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SpreadedLinearZeroInterpolatedTermStructure__SWIG_4) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    std::vector< Handle< Quote > > *arg2 = 0 ;
    std::vector< Date > *arg3 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    std::vector< Handle< Quote > > temp2 ;
    std::vector< Handle< Quote > > *v2 ;
    std::vector< Date > temp3 ;
    std::vector< Date > *v3 ;
    int argvi = 0;
    SpreadedLinearZeroInterpolatedTermStructurePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_SpreadedLinearZeroInterpolatedTermStructure(curveHandle,spreadHandles,dates);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SpreadedLinearZeroInterpolatedTermStructure" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SpreadedLinearZeroInterpolatedTermStructure" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_SpreadedLinearZeroInterpolatedTermStructure. "
          "Expected an array of " "Handle< Quote >");
        SV **tv;
        I32 len = av_len(av) + 1;
        Handle< Quote >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_HandleT_Quote_t,0) != -1) {
            temp2.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_SpreadedLinearZeroInterpolatedTermStructure. "
              "Expected an array of " "Handle< Quote >");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_SpreadedLinearZeroInterpolatedTermStructure. "
          "Expected an array of " "Handle< Quote >");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_SpreadedLinearZeroInterpolatedTermStructure. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp3.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_SpreadedLinearZeroInterpolatedTermStructure. "
              "Expected an array of " "Date");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_SpreadedLinearZeroInterpolatedTermStructure. "
          "Expected an array of " "Date");
      }
    }
    {
      try {
        result = (SpreadedLinearZeroInterpolatedTermStructurePtr *)new_SpreadedLinearZeroInterpolatedTermStructurePtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1,(std::vector< Handle< Quote > > const &)*arg2,(std::vector< Date > const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SpreadedLinearZeroInterpolatedTermStructurePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SpreadedLinearZeroInterpolatedTermStructure) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Handle< Quote > >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Handle< Quote >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_HandleT_Quote_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Handle< Quote > >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Handle< Quote >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_HandleT_Quote_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Handle< Quote > >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Handle< Quote >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_HandleT_Quote_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Handle< Quote > >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Handle< Quote >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_HandleT_Quote_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Handle< Quote > >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Handle< Quote >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_HandleT_Quote_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Linear, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SpreadedLinearZeroInterpolatedTermStructure__SWIG_4); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SpreadedLinearZeroInterpolatedTermStructure__SWIG_3); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SpreadedLinearZeroInterpolatedTermStructure__SWIG_2); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SpreadedLinearZeroInterpolatedTermStructure__SWIG_1); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SpreadedLinearZeroInterpolatedTermStructure__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_SpreadedLinearZeroInterpolatedTermStructure'");
  XSRETURN(0);
}


XS(_wrap_delete_SpreadedLinearZeroInterpolatedTermStructure) {
  {
    SpreadedLinearZeroInterpolatedTermStructurePtr *arg1 = (SpreadedLinearZeroInterpolatedTermStructurePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_SpreadedLinearZeroInterpolatedTermStructure(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SpreadedLinearZeroInterpolatedTermStructurePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SpreadedLinearZeroInterpolatedTermStructure" "', argument " "1"" of type '" "SpreadedLinearZeroInterpolatedTermStructurePtr *""'"); 
    }
    arg1 = reinterpret_cast< SpreadedLinearZeroInterpolatedTermStructurePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FlatForward__SWIG_0) {
  {
    Date *arg1 = 0 ;
    Handle< Quote > *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    Compounding arg4 ;
    Frequency arg5 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    FlatForwardPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_FlatForward(referenceDate,forward,dayCounter,compounding,frequency);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FlatForward" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FlatForward" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FlatForward" "', argument " "2"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FlatForward" "', argument " "2"" of type '" "Handle< Quote > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< Quote > * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FlatForward" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FlatForward" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_FlatForward" "', argument " "4"" of type '" "Compounding""'");
    } 
    arg4 = static_cast< Compounding >(val4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_FlatForward" "', argument " "5"" of type '" "Frequency""'");
    } 
    arg5 = static_cast< Frequency >(val5);
    {
      try {
        result = (FlatForwardPtr *)new_FlatForwardPtr__SWIG_0((Date const &)*arg1,(Handle< Quote > const &)*arg2,(DayCounter const &)*arg3,arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FlatForwardPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FlatForward__SWIG_1) {
  {
    Date *arg1 = 0 ;
    Handle< Quote > *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    Compounding arg4 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    FlatForwardPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_FlatForward(referenceDate,forward,dayCounter,compounding);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FlatForward" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FlatForward" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FlatForward" "', argument " "2"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FlatForward" "', argument " "2"" of type '" "Handle< Quote > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< Quote > * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FlatForward" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FlatForward" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_FlatForward" "', argument " "4"" of type '" "Compounding""'");
    } 
    arg4 = static_cast< Compounding >(val4);
    {
      try {
        result = (FlatForwardPtr *)new_FlatForwardPtr__SWIG_0((Date const &)*arg1,(Handle< Quote > const &)*arg2,(DayCounter const &)*arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FlatForwardPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FlatForward__SWIG_2) {
  {
    Date *arg1 = 0 ;
    Handle< Quote > *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    FlatForwardPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_FlatForward(referenceDate,forward,dayCounter);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FlatForward" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FlatForward" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FlatForward" "', argument " "2"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FlatForward" "', argument " "2"" of type '" "Handle< Quote > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< Quote > * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FlatForward" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FlatForward" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    {
      try {
        result = (FlatForwardPtr *)new_FlatForwardPtr__SWIG_0((Date const &)*arg1,(Handle< Quote > const &)*arg2,(DayCounter const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FlatForwardPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FlatForward__SWIG_3) {
  {
    Date *arg1 = 0 ;
    Rate arg2 ;
    DayCounter *arg3 = 0 ;
    Compounding arg4 ;
    Frequency arg5 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    FlatForwardPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_FlatForward(referenceDate,forward,dayCounter,compounding,frequency);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FlatForward" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FlatForward" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FlatForward" "', argument " "2"" of type '" "Rate""'");
    } 
    arg2 = static_cast< Rate >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FlatForward" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FlatForward" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_FlatForward" "', argument " "4"" of type '" "Compounding""'");
    } 
    arg4 = static_cast< Compounding >(val4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_FlatForward" "', argument " "5"" of type '" "Frequency""'");
    } 
    arg5 = static_cast< Frequency >(val5);
    {
      try {
        result = (FlatForwardPtr *)new_FlatForwardPtr__SWIG_3((Date const &)*arg1,arg2,(DayCounter const &)*arg3,arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FlatForwardPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FlatForward__SWIG_4) {
  {
    Date *arg1 = 0 ;
    Rate arg2 ;
    DayCounter *arg3 = 0 ;
    Compounding arg4 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    FlatForwardPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_FlatForward(referenceDate,forward,dayCounter,compounding);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FlatForward" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FlatForward" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FlatForward" "', argument " "2"" of type '" "Rate""'");
    } 
    arg2 = static_cast< Rate >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FlatForward" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FlatForward" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_FlatForward" "', argument " "4"" of type '" "Compounding""'");
    } 
    arg4 = static_cast< Compounding >(val4);
    {
      try {
        result = (FlatForwardPtr *)new_FlatForwardPtr__SWIG_3((Date const &)*arg1,arg2,(DayCounter const &)*arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FlatForwardPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FlatForward__SWIG_5) {
  {
    Date *arg1 = 0 ;
    Rate arg2 ;
    DayCounter *arg3 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    FlatForwardPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_FlatForward(referenceDate,forward,dayCounter);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FlatForward" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FlatForward" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FlatForward" "', argument " "2"" of type '" "Rate""'");
    } 
    arg2 = static_cast< Rate >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FlatForward" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FlatForward" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    {
      try {
        result = (FlatForwardPtr *)new_FlatForwardPtr__SWIG_3((Date const &)*arg1,arg2,(DayCounter const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FlatForwardPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FlatForward__SWIG_6) {
  {
    Integer arg1 ;
    Calendar *arg2 = 0 ;
    Handle< Quote > *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    Compounding arg5 ;
    Frequency arg6 ;
    int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    FlatForwardPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_FlatForward(settlementDays,calendar,forward,dayCounter,compounding,frequency);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FlatForward" "', argument " "1"" of type '" "Integer""'");
    } 
    arg1 = static_cast< Integer >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FlatForward" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FlatForward" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FlatForward" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FlatForward" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< Quote > * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FlatForward" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FlatForward" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_FlatForward" "', argument " "5"" of type '" "Compounding""'");
    } 
    arg5 = static_cast< Compounding >(val5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_FlatForward" "', argument " "6"" of type '" "Frequency""'");
    } 
    arg6 = static_cast< Frequency >(val6);
    {
      try {
        result = (FlatForwardPtr *)new_FlatForwardPtr__SWIG_6(arg1,(Calendar const &)*arg2,(Handle< Quote > const &)*arg3,(DayCounter const &)*arg4,arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FlatForwardPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FlatForward__SWIG_7) {
  {
    Integer arg1 ;
    Calendar *arg2 = 0 ;
    Handle< Quote > *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    Compounding arg5 ;
    int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    FlatForwardPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_FlatForward(settlementDays,calendar,forward,dayCounter,compounding);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FlatForward" "', argument " "1"" of type '" "Integer""'");
    } 
    arg1 = static_cast< Integer >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FlatForward" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FlatForward" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FlatForward" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FlatForward" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< Quote > * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FlatForward" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FlatForward" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_FlatForward" "', argument " "5"" of type '" "Compounding""'");
    } 
    arg5 = static_cast< Compounding >(val5);
    {
      try {
        result = (FlatForwardPtr *)new_FlatForwardPtr__SWIG_6(arg1,(Calendar const &)*arg2,(Handle< Quote > const &)*arg3,(DayCounter const &)*arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FlatForwardPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FlatForward__SWIG_8) {
  {
    Integer arg1 ;
    Calendar *arg2 = 0 ;
    Handle< Quote > *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int argvi = 0;
    FlatForwardPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_FlatForward(settlementDays,calendar,forward,dayCounter);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FlatForward" "', argument " "1"" of type '" "Integer""'");
    } 
    arg1 = static_cast< Integer >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FlatForward" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FlatForward" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FlatForward" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FlatForward" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< Quote > * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FlatForward" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FlatForward" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    {
      try {
        result = (FlatForwardPtr *)new_FlatForwardPtr__SWIG_6(arg1,(Calendar const &)*arg2,(Handle< Quote > const &)*arg3,(DayCounter const &)*arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FlatForwardPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FlatForward__SWIG_9) {
  {
    Integer arg1 ;
    Calendar *arg2 = 0 ;
    Rate arg3 ;
    DayCounter *arg4 = 0 ;
    Compounding arg5 ;
    Frequency arg6 ;
    int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    FlatForwardPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_FlatForward(settlementDays,calendar,forward,dayCounter,compounding,frequency);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FlatForward" "', argument " "1"" of type '" "Integer""'");
    } 
    arg1 = static_cast< Integer >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FlatForward" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FlatForward" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_FlatForward" "', argument " "3"" of type '" "Rate""'");
    } 
    arg3 = static_cast< Rate >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FlatForward" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FlatForward" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_FlatForward" "', argument " "5"" of type '" "Compounding""'");
    } 
    arg5 = static_cast< Compounding >(val5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_FlatForward" "', argument " "6"" of type '" "Frequency""'");
    } 
    arg6 = static_cast< Frequency >(val6);
    {
      try {
        result = (FlatForwardPtr *)new_FlatForwardPtr__SWIG_9(arg1,(Calendar const &)*arg2,arg3,(DayCounter const &)*arg4,arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FlatForwardPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FlatForward__SWIG_10) {
  {
    Integer arg1 ;
    Calendar *arg2 = 0 ;
    Rate arg3 ;
    DayCounter *arg4 = 0 ;
    Compounding arg5 ;
    int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    FlatForwardPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_FlatForward(settlementDays,calendar,forward,dayCounter,compounding);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FlatForward" "', argument " "1"" of type '" "Integer""'");
    } 
    arg1 = static_cast< Integer >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FlatForward" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FlatForward" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_FlatForward" "', argument " "3"" of type '" "Rate""'");
    } 
    arg3 = static_cast< Rate >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FlatForward" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FlatForward" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_FlatForward" "', argument " "5"" of type '" "Compounding""'");
    } 
    arg5 = static_cast< Compounding >(val5);
    {
      try {
        result = (FlatForwardPtr *)new_FlatForwardPtr__SWIG_9(arg1,(Calendar const &)*arg2,arg3,(DayCounter const &)*arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FlatForwardPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FlatForward__SWIG_11) {
  {
    Integer arg1 ;
    Calendar *arg2 = 0 ;
    Rate arg3 ;
    DayCounter *arg4 = 0 ;
    int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int argvi = 0;
    FlatForwardPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_FlatForward(settlementDays,calendar,forward,dayCounter);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FlatForward" "', argument " "1"" of type '" "Integer""'");
    } 
    arg1 = static_cast< Integer >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FlatForward" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FlatForward" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_FlatForward" "', argument " "3"" of type '" "Rate""'");
    } 
    arg3 = static_cast< Rate >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FlatForward" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FlatForward" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    {
      try {
        result = (FlatForwardPtr *)new_FlatForwardPtr__SWIG_9(arg1,(Calendar const &)*arg2,arg3,(DayCounter const &)*arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FlatForwardPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FlatForward) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 7;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_7:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 8;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_8:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 9;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_9:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 10;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_10:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 11;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_11:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 12;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_12:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FlatForward__SWIG_2); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FlatForward__SWIG_5); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FlatForward__SWIG_1); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FlatForward__SWIG_4); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FlatForward__SWIG_8); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FlatForward__SWIG_11); return;
    case 7:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FlatForward__SWIG_0); return;
    case 8:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FlatForward__SWIG_3); return;
    case 9:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FlatForward__SWIG_7); return;
    case 10:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FlatForward__SWIG_10); return;
    case 11:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FlatForward__SWIG_6); return;
    case 12:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FlatForward__SWIG_9); return;
    }
  }
  
  croak("No matching function for overloaded 'new_FlatForward'");
  XSRETURN(0);
}


XS(_wrap_delete_FlatForward) {
  {
    FlatForwardPtr *arg1 = (FlatForwardPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_FlatForward(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_FlatForwardPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FlatForward" "', argument " "1"" of type '" "FlatForwardPtr *""'"); 
    }
    arg1 = reinterpret_cast< FlatForwardPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_RealTimeSeries__SWIG_0) {
  {
    int argvi = 0;
    TimeSeries< Real > *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_RealTimeSeries();");
    }
    {
      try {
        result = (TimeSeries< Real > *)new TimeSeries< Real >();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TimeSeriesT_double_std__mapT_Date_double_t_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_RealTimeSeries__SWIG_1) {
  {
    std::vector< Date > *arg1 = 0 ;
    std::vector< double > *arg2 = 0 ;
    std::vector< Date > temp1 ;
    std::vector< Date > *v1 ;
    std::vector< double > temp2 ;
    std::vector< double > *v2 ;
    int argvi = 0;
    TimeSeries< Real > *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_RealTimeSeries(d,v);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_RealTimeSeries. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_RealTimeSeries. "
              "Expected an array of " "Date");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_RealTimeSeries. "
          "Expected an array of " "Date");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_RealTimeSeries. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp2.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_RealTimeSeries. "
              "Expected an array of ""double");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_RealTimeSeries. "
          "Expected an array of ""double");
      }
    }
    {
      try {
        result = (TimeSeries< Real > *)new_TimeSeries_Sl_Real_Sg___SWIG_1((std::vector< Date > const &)*arg1,(std::vector< double > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TimeSeriesT_double_std__mapT_Date_double_t_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_RealTimeSeries) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_RealTimeSeries__SWIG_0); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_RealTimeSeries__SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded 'new_RealTimeSeries'");
  XSRETURN(0);
}


XS(_wrap_RealTimeSeries_dates) {
  {
    TimeSeries< Real > *arg1 = (TimeSeries< Real > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Date > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: RealTimeSeries_dates(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_TimeSeriesT_double_std__mapT_Date_double_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RealTimeSeries_dates" "', argument " "1"" of type '" "TimeSeries< Real > *""'"); 
    }
    arg1 = reinterpret_cast< TimeSeries< Real > * >(argp1);
    {
      try {
        result = (arg1)->dates();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        Date* ptr = new Date(result[i]);
        svs[i] = sv_newmortal();
        SWIG_MakePtr(svs[i], (void*) ptr, 
          SWIGTYPE_p_Date, SWIG_SHADOW|0);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_RealTimeSeries_values) {
  {
    TimeSeries< Real > *arg1 = (TimeSeries< Real > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< double > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: RealTimeSeries_values(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_TimeSeriesT_double_std__mapT_Date_double_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RealTimeSeries_values" "', argument " "1"" of type '" "TimeSeries< Real > *""'"); 
    }
    arg1 = reinterpret_cast< TimeSeries< Real > * >(argp1);
    {
      try {
        result = (arg1)->values();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        svs[i] = sv_newmortal();
        sv_setnv(svs[i], result[i]);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_RealTimeSeries_size) {
  {
    TimeSeries< Real > *arg1 = (TimeSeries< Real > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Size result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: RealTimeSeries_size(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_TimeSeriesT_double_std__mapT_Date_double_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RealTimeSeries_size" "', argument " "1"" of type '" "TimeSeries< Real > *""'"); 
    }
    arg1 = reinterpret_cast< TimeSeries< Real > * >(argp1);
    {
      try {
        result = (arg1)->size();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_size_t  SWIG_PERL_CALL_ARGS_1(static_cast< size_t >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_RealTimeSeries) {
  {
    TimeSeries< Real > *arg1 = (TimeSeries< Real > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_RealTimeSeries(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_TimeSeriesT_double_std__mapT_Date_double_t_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_RealTimeSeries" "', argument " "1"" of type '" "TimeSeries< Real > *""'"); 
    }
    arg1 = reinterpret_cast< TimeSeries< Real > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_IntervalPriceTimeSeries__SWIG_0) {
  {
    int argvi = 0;
    TimeSeries< IntervalPrice > *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_IntervalPriceTimeSeries();");
    }
    {
      try {
        result = (TimeSeries< IntervalPrice > *)new TimeSeries< IntervalPrice >();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TimeSeriesT_IntervalPrice_std__mapT_Date_IntervalPrice_t_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_IntervalPriceTimeSeries__SWIG_1) {
  {
    std::vector< Date > *arg1 = 0 ;
    std::vector< IntervalPrice > *arg2 = 0 ;
    std::vector< Date > temp1 ;
    std::vector< Date > *v1 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    TimeSeries< IntervalPrice > *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_IntervalPriceTimeSeries(d,v);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_IntervalPriceTimeSeries. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_IntervalPriceTimeSeries. "
              "Expected an array of " "Date");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_IntervalPriceTimeSeries. "
          "Expected an array of " "Date");
      }
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_std__vectorT_IntervalPrice_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_IntervalPriceTimeSeries" "', argument " "2"" of type '" "std::vector< IntervalPrice > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_IntervalPriceTimeSeries" "', argument " "2"" of type '" "std::vector< IntervalPrice > const &""'"); 
    }
    arg2 = reinterpret_cast< std::vector< IntervalPrice > * >(argp2);
    {
      try {
        result = (TimeSeries< IntervalPrice > *)new_TimeSeries_Sl_IntervalPrice_Sg___SWIG_1((std::vector< Date > const &)*arg1,(std::vector< IntervalPrice > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TimeSeriesT_IntervalPrice_std__mapT_Date_IntervalPrice_t_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_IntervalPriceTimeSeries) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_std__vectorT_IntervalPrice_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_IntervalPriceTimeSeries__SWIG_0); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_IntervalPriceTimeSeries__SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded 'new_IntervalPriceTimeSeries'");
  XSRETURN(0);
}


XS(_wrap_IntervalPriceTimeSeries_dates) {
  {
    TimeSeries< IntervalPrice > *arg1 = (TimeSeries< IntervalPrice > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Date > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: IntervalPriceTimeSeries_dates(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_TimeSeriesT_IntervalPrice_std__mapT_Date_IntervalPrice_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntervalPriceTimeSeries_dates" "', argument " "1"" of type '" "TimeSeries< IntervalPrice > *""'"); 
    }
    arg1 = reinterpret_cast< TimeSeries< IntervalPrice > * >(argp1);
    {
      try {
        result = (arg1)->dates();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        Date* ptr = new Date(result[i]);
        svs[i] = sv_newmortal();
        SWIG_MakePtr(svs[i], (void*) ptr, 
          SWIGTYPE_p_Date, SWIG_SHADOW|0);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_IntervalPriceTimeSeries_values) {
  {
    TimeSeries< IntervalPrice > *arg1 = (TimeSeries< IntervalPrice > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< IntervalPrice > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: IntervalPriceTimeSeries_values(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_TimeSeriesT_IntervalPrice_std__mapT_Date_IntervalPrice_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntervalPriceTimeSeries_values" "', argument " "1"" of type '" "TimeSeries< IntervalPrice > *""'"); 
    }
    arg1 = reinterpret_cast< TimeSeries< IntervalPrice > * >(argp1);
    {
      try {
        result = (arg1)->values();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new std::vector< IntervalPrice >(static_cast< const std::vector< IntervalPrice >& >(result))), SWIGTYPE_p_std__vectorT_IntervalPrice_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_IntervalPriceTimeSeries_size) {
  {
    TimeSeries< IntervalPrice > *arg1 = (TimeSeries< IntervalPrice > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Size result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: IntervalPriceTimeSeries_size(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_TimeSeriesT_IntervalPrice_std__mapT_Date_IntervalPrice_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntervalPriceTimeSeries_size" "', argument " "1"" of type '" "TimeSeries< IntervalPrice > *""'"); 
    }
    arg1 = reinterpret_cast< TimeSeries< IntervalPrice > * >(argp1);
    {
      try {
        result = (arg1)->size();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_size_t  SWIG_PERL_CALL_ARGS_1(static_cast< size_t >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_IntervalPriceTimeSeries) {
  {
    TimeSeries< IntervalPrice > *arg1 = (TimeSeries< IntervalPrice > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_IntervalPriceTimeSeries(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_TimeSeriesT_IntervalPrice_std__mapT_Date_IntervalPrice_t_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IntervalPriceTimeSeries" "', argument " "1"" of type '" "TimeSeries< IntervalPrice > *""'"); 
    }
    arg1 = reinterpret_cast< TimeSeries< IntervalPrice > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_IntervalPriceVector__SWIG_0) {
  {
    unsigned int arg1 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    std::vector< IntervalPrice > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_IntervalPriceVector(size);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IntervalPriceVector" "', argument " "1"" of type '" "unsigned int""'");
    } 
    arg1 = static_cast< unsigned int >(val1);
    {
      try {
        result = (std::vector< IntervalPrice > *)new std::vector< IntervalPrice >(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_IntervalPrice_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_IntervalPriceVector__SWIG_1) {
  {
    int argvi = 0;
    std::vector< IntervalPrice > *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_IntervalPriceVector();");
    }
    {
      try {
        result = (std::vector< IntervalPrice > *)new std::vector< IntervalPrice >();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_IntervalPrice_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_IntervalPriceVector__SWIG_2) {
  {
    unsigned int arg1 ;
    IntervalPrice *arg2 = 0 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    std::vector< IntervalPrice > *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_IntervalPriceVector(size,value);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IntervalPriceVector" "', argument " "1"" of type '" "unsigned int""'");
    } 
    arg1 = static_cast< unsigned int >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_IntervalPrice,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_IntervalPriceVector" "', argument " "2"" of type '" "IntervalPrice const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_IntervalPriceVector" "', argument " "2"" of type '" "IntervalPrice const &""'"); 
    }
    arg2 = reinterpret_cast< IntervalPrice * >(argp2);
    {
      try {
        result = (std::vector< IntervalPrice > *)new std::vector< IntervalPrice >(arg1,(IntervalPrice const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_IntervalPrice_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_IntervalPriceVector__SWIG_3) {
  {
    std::vector< IntervalPrice > *arg1 = 0 ;
    std::vector< IntervalPrice > temp1 ;
    std::vector< IntervalPrice > *v1 ;
    int argvi = 0;
    std::vector< IntervalPrice > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_IntervalPriceVector(std::vector< IntervalPrice > const &);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_IntervalPrice_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_IntervalPriceVector. "
          "Expected an array of " "IntervalPrice");
        SV **tv;
        I32 len = av_len(av) + 1;
        IntervalPrice* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_IntervalPrice,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_IntervalPriceVector. "
              "Expected an array of " "IntervalPrice");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_IntervalPriceVector. "
          "Expected an array of " "IntervalPrice");
      }
    }
    {
      try {
        result = (std::vector< IntervalPrice > *)new std::vector< IntervalPrice >((std::vector< IntervalPrice > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_IntervalPrice_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_IntervalPriceVector) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< IntervalPrice >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_IntervalPrice_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  IntervalPrice* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_IntervalPrice,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_IntervalPrice, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_IntervalPriceVector__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_IntervalPriceVector__SWIG_0); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_IntervalPriceVector__SWIG_3); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_IntervalPriceVector__SWIG_2); return;
    }
  }
  
  croak("No matching function for overloaded 'new_IntervalPriceVector'");
  XSRETURN(0);
}


XS(_wrap_IntervalPriceVector_size) {
  {
    std::vector< IntervalPrice > *arg1 = (std::vector< IntervalPrice > *) 0 ;
    std::vector< IntervalPrice > temp1 ;
    std::vector< IntervalPrice > *v1 ;
    int argvi = 0;
    unsigned int result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: IntervalPriceVector_size(self);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_IntervalPrice_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of IntervalPriceVector_size. "
          "Expected an array of " "IntervalPrice");
        SV **tv;
        I32 len = av_len(av) + 1;
        IntervalPrice* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_IntervalPrice,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "IntervalPriceVector_size. "
              "Expected an array of " "IntervalPrice");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of IntervalPriceVector_size. "
          "Expected an array of " "IntervalPrice");
      }
    }
    {
      try {
        result = (unsigned int)((std::vector< IntervalPrice > const *)arg1)->size();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_IntervalPriceVector_empty) {
  {
    std::vector< IntervalPrice > *arg1 = (std::vector< IntervalPrice > *) 0 ;
    std::vector< IntervalPrice > temp1 ;
    std::vector< IntervalPrice > *v1 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: IntervalPriceVector_empty(self);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_IntervalPrice_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of IntervalPriceVector_empty. "
          "Expected an array of " "IntervalPrice");
        SV **tv;
        I32 len = av_len(av) + 1;
        IntervalPrice* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_IntervalPrice,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "IntervalPriceVector_empty. "
              "Expected an array of " "IntervalPrice");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of IntervalPriceVector_empty. "
          "Expected an array of " "IntervalPrice");
      }
    }
    {
      try {
        result = (bool)((std::vector< IntervalPrice > const *)arg1)->empty();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_IntervalPriceVector_clear) {
  {
    std::vector< IntervalPrice > *arg1 = (std::vector< IntervalPrice > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: IntervalPriceVector_clear(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_IntervalPrice_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntervalPriceVector_clear" "', argument " "1"" of type '" "std::vector< IntervalPrice > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< IntervalPrice > * >(argp1);
    {
      try {
        (arg1)->clear();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_IntervalPriceVector_push) {
  {
    std::vector< IntervalPrice > *arg1 = (std::vector< IntervalPrice > *) 0 ;
    IntervalPrice *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: IntervalPriceVector_push(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_IntervalPrice_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntervalPriceVector_push" "', argument " "1"" of type '" "std::vector< IntervalPrice > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< IntervalPrice > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_IntervalPrice,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IntervalPriceVector_push" "', argument " "2"" of type '" "IntervalPrice const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IntervalPriceVector_push" "', argument " "2"" of type '" "IntervalPrice const &""'"); 
    }
    arg2 = reinterpret_cast< IntervalPrice * >(argp2);
    {
      try {
        (arg1)->push_back((IntervalPrice const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_IntervalPriceVector_pop) {
  {
    std::vector< IntervalPrice > *arg1 = (std::vector< IntervalPrice > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    SwigValueWrapper< IntervalPrice > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: IntervalPriceVector_pop(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_IntervalPrice_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntervalPriceVector_pop" "', argument " "1"" of type '" "std::vector< IntervalPrice > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< IntervalPrice > * >(argp1);
    {
      try {
        try {
          result = std_vector_Sl_IntervalPrice_Sg__pop(arg1);
        }
        catch(std::out_of_range &_e) {
          sv_setsv(get_sv("@", GV_ADD), SWIG_NewPointerObj((new std::out_of_range(static_cast< const std::out_of_range& >(_e))),SWIGTYPE_p_std__out_of_range,SWIG_POINTER_OWN)); SWIG_fail ;
        }
        
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new IntervalPrice(static_cast< const IntervalPrice& >(result))), SWIGTYPE_p_IntervalPrice, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_IntervalPriceVector_get) {
  {
    std::vector< IntervalPrice > *arg1 = (std::vector< IntervalPrice > *) 0 ;
    int arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    IntervalPrice *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: IntervalPriceVector_get(self,i);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_IntervalPrice_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntervalPriceVector_get" "', argument " "1"" of type '" "std::vector< IntervalPrice > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< IntervalPrice > * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntervalPriceVector_get" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    {
      try {
        try {
          result = (IntervalPrice *) &std_vector_Sl_IntervalPrice_Sg__get(arg1,arg2);
        }
        catch(std::out_of_range &_e) {
          sv_setsv(get_sv("@", GV_ADD), SWIG_NewPointerObj((new std::out_of_range(static_cast< const std::out_of_range& >(_e))),SWIGTYPE_p_std__out_of_range,SWIG_POINTER_OWN)); SWIG_fail ;
        }
        
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IntervalPrice, 0 | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_IntervalPriceVector_set) {
  {
    std::vector< IntervalPrice > *arg1 = (std::vector< IntervalPrice > *) 0 ;
    int arg2 ;
    IntervalPrice *arg3 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: IntervalPriceVector_set(self,i,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_IntervalPrice_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntervalPriceVector_set" "', argument " "1"" of type '" "std::vector< IntervalPrice > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< IntervalPrice > * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntervalPriceVector_set" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_IntervalPrice,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IntervalPriceVector_set" "', argument " "3"" of type '" "IntervalPrice const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IntervalPriceVector_set" "', argument " "3"" of type '" "IntervalPrice const &""'"); 
    }
    arg3 = reinterpret_cast< IntervalPrice * >(argp3);
    {
      try {
        try {
          std_vector_Sl_IntervalPrice_Sg__set(arg1,arg2,(IntervalPrice const &)*arg3);
        }
        catch(std::out_of_range &_e) {
          sv_setsv(get_sv("@", GV_ADD), SWIG_NewPointerObj((new std::out_of_range(static_cast< const std::out_of_range& >(_e))),SWIGTYPE_p_std__out_of_range,SWIG_POINTER_OWN)); SWIG_fail ;
        }
        
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_IntervalPriceVector) {
  {
    std::vector< IntervalPrice > *arg1 = (std::vector< IntervalPrice > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_IntervalPriceVector(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_IntervalPrice_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IntervalPriceVector" "', argument " "1"" of type '" "std::vector< IntervalPrice > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< IntervalPrice > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_IntervalPrice) {
  {
    Real arg1 ;
    Real arg2 ;
    Real arg3 ;
    Real arg4 ;
    double val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    IntervalPrice *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_IntervalPrice(Real,Real,Real,Real);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IntervalPrice" "', argument " "1"" of type '" "Real""'");
    } 
    arg1 = static_cast< Real >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_IntervalPrice" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_IntervalPrice" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_IntervalPrice" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    {
      try {
        result = (IntervalPrice *)new IntervalPrice(arg1,arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IntervalPrice, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_IntervalPrice_setValue) {
  {
    IntervalPrice *arg1 = (IntervalPrice *) 0 ;
    Real arg2 ;
    IntervalPrice::Type arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: IntervalPrice_setValue(self,Real,IntervalPrice::Type);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_IntervalPrice, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntervalPrice_setValue" "', argument " "1"" of type '" "IntervalPrice *""'"); 
    }
    arg1 = reinterpret_cast< IntervalPrice * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntervalPrice_setValue" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IntervalPrice_setValue" "', argument " "3"" of type '" "IntervalPrice::Type""'");
    } 
    arg3 = static_cast< IntervalPrice::Type >(val3);
    {
      try {
        (arg1)->setValue(arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_IntervalPrice_setValues) {
  {
    IntervalPrice *arg1 = (IntervalPrice *) 0 ;
    Real arg2 ;
    Real arg3 ;
    Real arg4 ;
    Real arg5 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    double val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: IntervalPrice_setValues(self,Real,Real,Real,Real);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_IntervalPrice, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntervalPrice_setValues" "', argument " "1"" of type '" "IntervalPrice *""'"); 
    }
    arg1 = reinterpret_cast< IntervalPrice * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntervalPrice_setValues" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IntervalPrice_setValues" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IntervalPrice_setValues" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "IntervalPrice_setValues" "', argument " "5"" of type '" "Real""'");
    } 
    arg5 = static_cast< Real >(val5);
    {
      try {
        (arg1)->setValues(arg2,arg3,arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_IntervalPrice_value) {
  {
    IntervalPrice *arg1 = (IntervalPrice *) 0 ;
    IntervalPrice::Type arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: IntervalPrice_value(self,t);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_IntervalPrice, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntervalPrice_value" "', argument " "1"" of type '" "IntervalPrice *""'"); 
    }
    arg1 = reinterpret_cast< IntervalPrice * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntervalPrice_value" "', argument " "2"" of type '" "IntervalPrice::Type""'");
    } 
    arg2 = static_cast< IntervalPrice::Type >(val2);
    {
      try {
        result = (Real)(arg1)->value(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_IntervalPrice_open) {
  {
    IntervalPrice *arg1 = (IntervalPrice *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: IntervalPrice_open(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_IntervalPrice, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntervalPrice_open" "', argument " "1"" of type '" "IntervalPrice *""'"); 
    }
    arg1 = reinterpret_cast< IntervalPrice * >(argp1);
    {
      try {
        result = (Real)(arg1)->open();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_IntervalPrice_close) {
  {
    IntervalPrice *arg1 = (IntervalPrice *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: IntervalPrice_close(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_IntervalPrice, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntervalPrice_close" "', argument " "1"" of type '" "IntervalPrice *""'"); 
    }
    arg1 = reinterpret_cast< IntervalPrice * >(argp1);
    {
      try {
        result = (Real)(arg1)->close();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_IntervalPrice_high) {
  {
    IntervalPrice *arg1 = (IntervalPrice *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: IntervalPrice_high(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_IntervalPrice, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntervalPrice_high" "', argument " "1"" of type '" "IntervalPrice *""'"); 
    }
    arg1 = reinterpret_cast< IntervalPrice * >(argp1);
    {
      try {
        result = (Real)(arg1)->high();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_IntervalPrice_low) {
  {
    IntervalPrice *arg1 = (IntervalPrice *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: IntervalPrice_low(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_IntervalPrice, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntervalPrice_low" "', argument " "1"" of type '" "IntervalPrice *""'"); 
    }
    arg1 = reinterpret_cast< IntervalPrice * >(argp1);
    {
      try {
        result = (Real)(arg1)->low();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_IntervalPrice_makeSeries) {
  {
    std::vector< Date > *arg1 = 0 ;
    std::vector< Real > *arg2 = 0 ;
    std::vector< Real > *arg3 = 0 ;
    std::vector< Real > *arg4 = 0 ;
    std::vector< Real > *arg5 = 0 ;
    std::vector< Date > temp1 ;
    std::vector< Date > *v1 ;
    std::vector< double > temp2 ;
    std::vector< double > *v2 ;
    std::vector< double > temp3 ;
    std::vector< double > *v3 ;
    std::vector< double > temp4 ;
    std::vector< double > *v4 ;
    std::vector< double > temp5 ;
    std::vector< double > *v5 ;
    int argvi = 0;
    TimeSeries< IntervalPrice > result;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: IntervalPrice_makeSeries(d,open,close,high,low);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of IntervalPrice_makeSeries. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "IntervalPrice_makeSeries. "
              "Expected an array of " "Date");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of IntervalPrice_makeSeries. "
          "Expected an array of " "Date");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of IntervalPrice_makeSeries. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp2.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "IntervalPrice_makeSeries. "
              "Expected an array of ""double");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of IntervalPrice_makeSeries. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of IntervalPrice_makeSeries. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp3.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 3 of "
              "IntervalPrice_makeSeries. "
              "Expected an array of ""double");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of IntervalPrice_makeSeries. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of IntervalPrice_makeSeries. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp4.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 4 of "
              "IntervalPrice_makeSeries. "
              "Expected an array of ""double");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of IntervalPrice_makeSeries. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(4),(void **) &v5, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg5 = v5;
      } else if (SvROK(ST(4))) {
        AV *av = (AV *)SvRV(ST(4));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 5 of IntervalPrice_makeSeries. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp5.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 5 of "
              "IntervalPrice_makeSeries. "
              "Expected an array of ""double");
          }
        }
        arg5 = &temp5;
      } else {
        SWIG_croak("Type error in argument 5 of IntervalPrice_makeSeries. "
          "Expected an array of ""double");
      }
    }
    {
      try {
        result = IntervalPrice::makeSeries((std::vector< Date > const &)*arg1,(std::vector< double > const &)*arg2,(std::vector< double > const &)*arg3,(std::vector< double > const &)*arg4,(std::vector< double > const &)*arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new TimeSeries< IntervalPrice >(static_cast< const TimeSeries< IntervalPrice >& >(result))), SWIGTYPE_p_TimeSeriesT_IntervalPrice_std__mapT_Date_IntervalPrice_t_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_IntervalPrice_extractValues) {
  {
    TimeSeries< IntervalPrice > arg1 ;
    IntervalPrice::Type arg2 ;
    void *argp1 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    std::vector< Real > result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: IntervalPrice_extractValues(TimeSeries< IntervalPrice >,t);");
    }
    {
      res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_TimeSeriesT_IntervalPrice_std__mapT_Date_IntervalPrice_t_t,  0 );
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntervalPrice_extractValues" "', argument " "1"" of type '" "TimeSeries< IntervalPrice >""'"); 
      }  
      if (!argp1) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IntervalPrice_extractValues" "', argument " "1"" of type '" "TimeSeries< IntervalPrice >""'");
      } else {
        arg1 = *(reinterpret_cast< TimeSeries< IntervalPrice > * >(argp1));
      }
    }
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntervalPrice_extractValues" "', argument " "2"" of type '" "IntervalPrice::Type""'");
    } 
    arg2 = static_cast< IntervalPrice::Type >(val2);
    {
      try {
        result = IntervalPrice::extractValues(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        svs[i] = sv_newmortal();
        sv_setnv(svs[i], result[i]);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_IntervalPrice_extractComponent) {
  {
    TimeSeries< IntervalPrice > arg1 ;
    IntervalPrice::Type arg2 ;
    void *argp1 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    TimeSeries< Real > result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: IntervalPrice_extractComponent(TimeSeries< IntervalPrice >,t);");
    }
    {
      res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_TimeSeriesT_IntervalPrice_std__mapT_Date_IntervalPrice_t_t,  0 );
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntervalPrice_extractComponent" "', argument " "1"" of type '" "TimeSeries< IntervalPrice >""'"); 
      }  
      if (!argp1) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IntervalPrice_extractComponent" "', argument " "1"" of type '" "TimeSeries< IntervalPrice >""'");
      } else {
        arg1 = *(reinterpret_cast< TimeSeries< IntervalPrice > * >(argp1));
      }
    }
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntervalPrice_extractComponent" "', argument " "2"" of type '" "IntervalPrice::Type""'");
    } 
    arg2 = static_cast< IntervalPrice::Type >(val2);
    {
      try {
        result = IntervalPrice::extractComponent(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new TimeSeries< Real >(static_cast< const TimeSeries< Real >& >(result))), SWIGTYPE_p_TimeSeriesT_double_std__mapT_Date_double_t_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_IntervalPrice) {
  {
    IntervalPrice *arg1 = (IntervalPrice *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_IntervalPrice(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_IntervalPrice, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IntervalPrice" "', argument " "1"" of type '" "IntervalPrice *""'"); 
    }
    arg1 = reinterpret_cast< IntervalPrice * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_IndexManager_instance) {
  {
    int argvi = 0;
    IndexManager *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: IndexManager_instance();");
    }
    {
      try {
        result = (IndexManager *) &IndexManager::instance();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IndexManager, 0 | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_IndexManager_setHistory) {
  {
    IndexManager *arg1 = (IndexManager *) 0 ;
    std::string *arg2 = 0 ;
    TimeSeries< Real > *arg3 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: IndexManager_setHistory(self,name,fixings);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_IndexManager, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexManager_setHistory" "', argument " "1"" of type '" "IndexManager *""'"); 
    }
    arg1 = reinterpret_cast< IndexManager * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexManager_setHistory" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IndexManager_setHistory" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_TimeSeriesT_double_std__mapT_Date_double_t_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexManager_setHistory" "', argument " "3"" of type '" "TimeSeries< Real > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IndexManager_setHistory" "', argument " "3"" of type '" "TimeSeries< Real > const &""'"); 
    }
    arg3 = reinterpret_cast< TimeSeries< Real > * >(argp3);
    {
      try {
        (arg1)->setHistory((std::string const &)*arg2,(TimeSeries< Real > const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    SWIG_croak_null();
  }
}


XS(_wrap_IndexManager_getHistory) {
  {
    IndexManager *arg1 = (IndexManager *) 0 ;
    std::string *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    TimeSeries< Real > *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: IndexManager_getHistory(self,name);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_IndexManager, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexManager_getHistory" "', argument " "1"" of type '" "IndexManager const *""'"); 
    }
    arg1 = reinterpret_cast< IndexManager * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexManager_getHistory" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IndexManager_getHistory" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      try {
        result = (TimeSeries< Real > *) &((IndexManager const *)arg1)->getHistory((std::string const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TimeSeriesT_double_std__mapT_Date_double_t_t, 0 | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_IndexManager_hasHistory) {
  {
    IndexManager *arg1 = (IndexManager *) 0 ;
    std::string *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: IndexManager_hasHistory(self,name);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_IndexManager, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexManager_hasHistory" "', argument " "1"" of type '" "IndexManager const *""'"); 
    }
    arg1 = reinterpret_cast< IndexManager * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexManager_hasHistory" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IndexManager_hasHistory" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      try {
        result = (bool)((IndexManager const *)arg1)->hasHistory((std::string const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_IndexManager_histories) {
  {
    IndexManager *arg1 = (IndexManager *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< std::string > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: IndexManager_histories(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_IndexManager, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexManager_histories" "', argument " "1"" of type '" "IndexManager const *""'"); 
    }
    arg1 = reinterpret_cast< IndexManager * >(argp1);
    {
      try {
        result = ((IndexManager const *)arg1)->histories();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        svs[i] = sv_newmortal();
        SwigSvFromString(svs[i], result[i]);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_IndexManager_clearHistory) {
  {
    IndexManager *arg1 = (IndexManager *) 0 ;
    std::string *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: IndexManager_clearHistory(self,name);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_IndexManager, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexManager_clearHistory" "', argument " "1"" of type '" "IndexManager *""'"); 
    }
    arg1 = reinterpret_cast< IndexManager * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexManager_clearHistory" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IndexManager_clearHistory" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      try {
        (arg1)->clearHistory((std::string const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_IndexManager_clearHistories) {
  {
    IndexManager *arg1 = (IndexManager *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: IndexManager_clearHistories(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_IndexManager, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexManager_clearHistories" "', argument " "1"" of type '" "IndexManager *""'"); 
    }
    arg1 = reinterpret_cast< IndexManager * >(argp1);
    {
      try {
        (arg1)->clearHistories();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_IndexManager) {
  {
    IndexManager *arg1 = (IndexManager *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_IndexManager(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_IndexManager, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IndexManager" "', argument " "1"" of type '" "IndexManager *""'"); 
    }
    arg1 = reinterpret_cast< IndexManager * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Index___deref__) {
  {
    boost::shared_ptr< Index > *arg1 = (boost::shared_ptr< Index > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Index *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Index___deref__(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Index_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index___deref__" "', argument " "1"" of type '" "boost::shared_ptr< Index > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Index > * >(argp1);
    {
      try {
        result = (Index *)(arg1)->operator ->();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Index, 0 | 0); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Index_isNull) {
  {
    boost::shared_ptr< Index > *arg1 = (boost::shared_ptr< Index > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Index_isNull(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Index_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index_isNull" "', argument " "1"" of type '" "boost::shared_ptr< Index > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Index > * >(argp1);
    {
      try {
        result = (bool)boost_shared_ptr_Sl_Index_Sg__isNull(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Index_addFixings) {
  {
    boost::shared_ptr< Index > *arg1 = (boost::shared_ptr< Index > *) 0 ;
    std::vector< Date > *arg2 = 0 ;
    std::vector< Rate > *arg3 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    std::vector< Date > temp2 ;
    std::vector< Date > *v2 ;
    std::vector< double > temp3 ;
    std::vector< double > *v3 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: Index_addFixings(self,fixingDates,fixings);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Index_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index_addFixings" "', argument " "1"" of type '" "boost::shared_ptr< Index > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Index > * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of Index_addFixings. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp2.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 2 of "
              "Index_addFixings. "
              "Expected an array of " "Date");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of Index_addFixings. "
          "Expected an array of " "Date");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of Index_addFixings. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp3.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 3 of "
              "Index_addFixings. "
              "Expected an array of ""double");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of Index_addFixings. "
          "Expected an array of ""double");
      }
    }
    {
      try {
        boost_shared_ptr_Sl_Index_Sg__addFixings(arg1,(std::vector< Date > const &)*arg2,(std::vector< double > const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Index_asObservable) {
  {
    boost::shared_ptr< Index > *arg1 = (boost::shared_ptr< Index > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    boost::shared_ptr< Observable > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Index_asObservable(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Index_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index_asObservable" "', argument " "1"" of type '" "boost::shared_ptr< Index > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Index > * >(argp1);
    {
      try {
        result = boost_shared_ptr_Sl_Index_Sg__asObservable(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new boost::shared_ptr< Observable >(static_cast< const boost::shared_ptr< Observable >& >(result))), SWIGTYPE_p_boost__shared_ptrT_Observable_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Index) {
  {
    int argvi = 0;
    boost::shared_ptr< Index > *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Index();");
    }
    {
      try {
        result = (boost::shared_ptr< Index > *)new boost::shared_ptr< Index >();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_boost__shared_ptrT_Index_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_Index) {
  {
    boost::shared_ptr< Index > *arg1 = (boost::shared_ptr< Index > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Index(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Index_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Index" "', argument " "1"" of type '" "boost::shared_ptr< Index > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Index > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Index_name) {
  {
    boost::shared_ptr< Index > *arg1 = (boost::shared_ptr< Index > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Index_name(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Index_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index_name" "', argument " "1"" of type '" "boost::shared_ptr< Index > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Index > * >(argp1);
    {
      try {
        result = (*arg1)->name();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Index_fixingCalendar) {
  {
    boost::shared_ptr< Index > *arg1 = (boost::shared_ptr< Index > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    SwigValueWrapper< Calendar > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Index_fixingCalendar(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Index_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index_fixingCalendar" "', argument " "1"" of type '" "boost::shared_ptr< Index > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Index > * >(argp1);
    {
      try {
        result = (*arg1)->fixingCalendar();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Calendar(static_cast< const Calendar& >(result))), SWIGTYPE_p_Calendar, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Index_isValidFixingDate) {
  {
    boost::shared_ptr< Index > *arg1 = (boost::shared_ptr< Index > *) 0 ;
    Date *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Index_isValidFixingDate(self,fixingDate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Index_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index_isValidFixingDate" "', argument " "1"" of type '" "boost::shared_ptr< Index > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Index > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Index_isValidFixingDate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Index_isValidFixingDate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    {
      try {
        result = (bool)(*arg1)->isValidFixingDate((Date const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Index_fixing__SWIG_0) {
  {
    boost::shared_ptr< Index > *arg1 = (boost::shared_ptr< Index > *) 0 ;
    Date *arg2 = 0 ;
    bool arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: Index_fixing(self,fixingDate,forecastTodaysFixing);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Index_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index_fixing" "', argument " "1"" of type '" "boost::shared_ptr< Index > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Index > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Index_fixing" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Index_fixing" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Index_fixing" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (Real)(*arg1)->fixing((Date const &)*arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Index_fixing__SWIG_1) {
  {
    boost::shared_ptr< Index > *arg1 = (boost::shared_ptr< Index > *) 0 ;
    Date *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Index_fixing(self,fixingDate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Index_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index_fixing" "', argument " "1"" of type '" "boost::shared_ptr< Index > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Index > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Index_fixing" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Index_fixing" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    {
      try {
        result = (Real)(*arg1)->fixing((Date const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Index_fixing) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_Index_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_Index_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Index_fixing__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Index_fixing__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'Index_fixing'");
  XSRETURN(0);
}


XS(_wrap_Index_addFixing) {
  {
    boost::shared_ptr< Index > *arg1 = (boost::shared_ptr< Index > *) 0 ;
    Date *arg2 = 0 ;
    Rate arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: Index_addFixing(self,fixingDate,fixing);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Index_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index_addFixing" "', argument " "1"" of type '" "boost::shared_ptr< Index > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Index > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Index_addFixing" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Index_addFixing" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Index_addFixing" "', argument " "3"" of type '" "Rate""'");
    } 
    arg3 = static_cast< Rate >(val3);
    {
      try {
        (*arg1)->addFixing((Date const &)*arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_InterestRateIndex_familyName) {
  {
    InterestRateIndexPtr *arg1 = (InterestRateIndexPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: InterestRateIndex_familyName(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_InterestRateIndexPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InterestRateIndex_familyName" "', argument " "1"" of type '" "InterestRateIndexPtr *""'"); 
    }
    arg1 = reinterpret_cast< InterestRateIndexPtr * >(argp1);
    {
      try {
        result = InterestRateIndexPtr_familyName(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_InterestRateIndex_tenor) {
  {
    InterestRateIndexPtr *arg1 = (InterestRateIndexPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Period result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: InterestRateIndex_tenor(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_InterestRateIndexPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InterestRateIndex_tenor" "', argument " "1"" of type '" "InterestRateIndexPtr *""'"); 
    }
    arg1 = reinterpret_cast< InterestRateIndexPtr * >(argp1);
    {
      try {
        result = InterestRateIndexPtr_tenor(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Period(static_cast< const Period& >(result))), SWIGTYPE_p_Period, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_InterestRateIndex_fixingDays) {
  {
    InterestRateIndexPtr *arg1 = (InterestRateIndexPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Natural result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: InterestRateIndex_fixingDays(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_InterestRateIndexPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InterestRateIndex_fixingDays" "', argument " "1"" of type '" "InterestRateIndexPtr *""'"); 
    }
    arg1 = reinterpret_cast< InterestRateIndexPtr * >(argp1);
    {
      try {
        result = (Natural)InterestRateIndexPtr_fixingDays(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_InterestRateIndex_fixingDate) {
  {
    InterestRateIndexPtr *arg1 = (InterestRateIndexPtr *) 0 ;
    Date *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: InterestRateIndex_fixingDate(self,valueDate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_InterestRateIndexPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InterestRateIndex_fixingDate" "', argument " "1"" of type '" "InterestRateIndexPtr *""'"); 
    }
    arg1 = reinterpret_cast< InterestRateIndexPtr * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "InterestRateIndex_fixingDate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "InterestRateIndex_fixingDate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    {
      try {
        result = InterestRateIndexPtr_fixingDate(arg1,(Date const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_InterestRateIndex_currency) {
  {
    InterestRateIndexPtr *arg1 = (InterestRateIndexPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Currency result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: InterestRateIndex_currency(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_InterestRateIndexPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InterestRateIndex_currency" "', argument " "1"" of type '" "InterestRateIndexPtr *""'"); 
    }
    arg1 = reinterpret_cast< InterestRateIndexPtr * >(argp1);
    {
      try {
        result = InterestRateIndexPtr_currency(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Currency(static_cast< const Currency& >(result))), SWIGTYPE_p_Currency, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_InterestRateIndex_dayCounter) {
  {
    InterestRateIndexPtr *arg1 = (InterestRateIndexPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    SwigValueWrapper< DayCounter > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: InterestRateIndex_dayCounter(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_InterestRateIndexPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InterestRateIndex_dayCounter" "', argument " "1"" of type '" "InterestRateIndexPtr *""'"); 
    }
    arg1 = reinterpret_cast< InterestRateIndexPtr * >(argp1);
    {
      try {
        result = InterestRateIndexPtr_dayCounter(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new DayCounter(static_cast< const DayCounter& >(result))), SWIGTYPE_p_DayCounter, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_InterestRateIndex_maturityDate) {
  {
    InterestRateIndexPtr *arg1 = (InterestRateIndexPtr *) 0 ;
    Date *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: InterestRateIndex_maturityDate(self,valueDate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_InterestRateIndexPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InterestRateIndex_maturityDate" "', argument " "1"" of type '" "InterestRateIndexPtr *""'"); 
    }
    arg1 = reinterpret_cast< InterestRateIndexPtr * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "InterestRateIndex_maturityDate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "InterestRateIndex_maturityDate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    {
      try {
        result = InterestRateIndexPtr_maturityDate(arg1,(Date const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_InterestRateIndex_valueDate) {
  {
    InterestRateIndexPtr *arg1 = (InterestRateIndexPtr *) 0 ;
    Date *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: InterestRateIndex_valueDate(self,fixingDate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_InterestRateIndexPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InterestRateIndex_valueDate" "', argument " "1"" of type '" "InterestRateIndexPtr *""'"); 
    }
    arg1 = reinterpret_cast< InterestRateIndexPtr * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "InterestRateIndex_valueDate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "InterestRateIndex_valueDate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    {
      try {
        result = InterestRateIndexPtr_valueDate(arg1,(Date const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_InterestRateIndex) {
  {
    InterestRateIndexPtr *arg1 = (InterestRateIndexPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_InterestRateIndex(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_InterestRateIndexPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_InterestRateIndex" "', argument " "1"" of type '" "InterestRateIndexPtr *""'"); 
    }
    arg1 = reinterpret_cast< InterestRateIndexPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_IborIndex__SWIG_0) {
  {
    std::string *arg1 = 0 ;
    Period *arg2 = 0 ;
    Integer arg3 ;
    Currency *arg4 = 0 ;
    Calendar *arg5 = 0 ;
    BusinessDayConvention arg6 ;
    bool arg7 ;
    DayCounter *arg8 = 0 ;
    Handle< YieldTermStructure > *arg9 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    void *argp2 ;
    int res2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    bool val7 ;
    int ecode7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    int argvi = 0;
    IborIndexPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 9) || (items > 9)) {
      SWIG_croak("Usage: new_IborIndex(familyName,tenor,settlementDays,currency,calendar,convention,endOfMonth,dayCounter,h);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_IborIndex" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_IborIndex" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_IborIndex" "', argument " "2"" of type '" "Period const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_IborIndex" "', argument " "2"" of type '" "Period const &""'"); 
    }
    arg2 = reinterpret_cast< Period * >(argp2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_IborIndex" "', argument " "3"" of type '" "Integer""'");
    } 
    arg3 = static_cast< Integer >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Currency,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_IborIndex" "', argument " "4"" of type '" "Currency const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_IborIndex" "', argument " "4"" of type '" "Currency const &""'"); 
    }
    arg4 = reinterpret_cast< Currency * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_IborIndex" "', argument " "5"" of type '" "Calendar const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_IborIndex" "', argument " "5"" of type '" "Calendar const &""'"); 
    }
    arg5 = reinterpret_cast< Calendar * >(argp5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_IborIndex" "', argument " "6"" of type '" "BusinessDayConvention""'");
    } 
    arg6 = static_cast< BusinessDayConvention >(val6);
    ecode7 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_IborIndex" "', argument " "7"" of type '" "bool""'");
    } 
    arg7 = static_cast< bool >(val7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_IborIndex" "', argument " "8"" of type '" "DayCounter const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_IborIndex" "', argument " "8"" of type '" "DayCounter const &""'"); 
    }
    arg8 = reinterpret_cast< DayCounter * >(argp8);
    res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res9)) {
      SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_IborIndex" "', argument " "9"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp9) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_IborIndex" "', argument " "9"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg9 = reinterpret_cast< Handle< YieldTermStructure > * >(argp9);
    {
      try {
        result = (IborIndexPtr *)new_IborIndexPtr__SWIG_0((std::string const &)*arg1,(Period const &)*arg2,arg3,(Currency const &)*arg4,(Calendar const &)*arg5,arg6,arg7,(DayCounter const &)*arg8,(Handle< YieldTermStructure > const &)*arg9);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IborIndexPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_IborIndex__SWIG_1) {
  {
    std::string *arg1 = 0 ;
    Period *arg2 = 0 ;
    Integer arg3 ;
    Currency *arg4 = 0 ;
    Calendar *arg5 = 0 ;
    BusinessDayConvention arg6 ;
    bool arg7 ;
    DayCounter *arg8 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    void *argp2 ;
    int res2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    bool val7 ;
    int ecode7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    int argvi = 0;
    IborIndexPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 8) || (items > 8)) {
      SWIG_croak("Usage: new_IborIndex(familyName,tenor,settlementDays,currency,calendar,convention,endOfMonth,dayCounter);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_IborIndex" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_IborIndex" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_IborIndex" "', argument " "2"" of type '" "Period const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_IborIndex" "', argument " "2"" of type '" "Period const &""'"); 
    }
    arg2 = reinterpret_cast< Period * >(argp2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_IborIndex" "', argument " "3"" of type '" "Integer""'");
    } 
    arg3 = static_cast< Integer >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Currency,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_IborIndex" "', argument " "4"" of type '" "Currency const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_IborIndex" "', argument " "4"" of type '" "Currency const &""'"); 
    }
    arg4 = reinterpret_cast< Currency * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_IborIndex" "', argument " "5"" of type '" "Calendar const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_IborIndex" "', argument " "5"" of type '" "Calendar const &""'"); 
    }
    arg5 = reinterpret_cast< Calendar * >(argp5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_IborIndex" "', argument " "6"" of type '" "BusinessDayConvention""'");
    } 
    arg6 = static_cast< BusinessDayConvention >(val6);
    ecode7 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_IborIndex" "', argument " "7"" of type '" "bool""'");
    } 
    arg7 = static_cast< bool >(val7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_IborIndex" "', argument " "8"" of type '" "DayCounter const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_IborIndex" "', argument " "8"" of type '" "DayCounter const &""'"); 
    }
    arg8 = reinterpret_cast< DayCounter * >(argp8);
    {
      try {
        result = (IborIndexPtr *)new_IborIndexPtr__SWIG_0((std::string const &)*arg1,(Period const &)*arg2,arg3,(Currency const &)*arg4,(Calendar const &)*arg5,arg6,arg7,(DayCounter const &)*arg8);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IborIndexPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_IborIndex) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 8) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Currency, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 9) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Currency, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_IborIndex__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_IborIndex__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_IborIndex'");
  XSRETURN(0);
}


XS(_wrap_IborIndex_businessDayConvention) {
  {
    IborIndexPtr *arg1 = (IborIndexPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    BusinessDayConvention result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: IborIndex_businessDayConvention(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_IborIndexPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IborIndex_businessDayConvention" "', argument " "1"" of type '" "IborIndexPtr *""'"); 
    }
    arg1 = reinterpret_cast< IborIndexPtr * >(argp1);
    {
      try {
        result = (BusinessDayConvention)IborIndexPtr_businessDayConvention(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_IborIndex_endOfMonth) {
  {
    IborIndexPtr *arg1 = (IborIndexPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: IborIndex_endOfMonth(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_IborIndexPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IborIndex_endOfMonth" "', argument " "1"" of type '" "IborIndexPtr *""'"); 
    }
    arg1 = reinterpret_cast< IborIndexPtr * >(argp1);
    {
      try {
        result = (bool)IborIndexPtr_endOfMonth(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_IborIndex_forwardingTermStructure) {
  {
    IborIndexPtr *arg1 = (IborIndexPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Handle< YieldTermStructure > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: IborIndex_forwardingTermStructure(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_IborIndexPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IborIndex_forwardingTermStructure" "', argument " "1"" of type '" "IborIndexPtr *""'"); 
    }
    arg1 = reinterpret_cast< IborIndexPtr * >(argp1);
    {
      try {
        result = IborIndexPtr_forwardingTermStructure(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Handle< YieldTermStructure >(static_cast< const Handle< YieldTermStructure >& >(result))), SWIGTYPE_p_HandleT_YieldTermStructure_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_IborIndex_clone) {
  {
    IborIndexPtr *arg1 = (IborIndexPtr *) 0 ;
    Handle< YieldTermStructure > *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    SwigValueWrapper< IborIndexPtr > result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: IborIndex_clone(self,h);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_IborIndexPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IborIndex_clone" "', argument " "1"" of type '" "IborIndexPtr *""'"); 
    }
    arg1 = reinterpret_cast< IborIndexPtr * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IborIndex_clone" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IborIndex_clone" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< YieldTermStructure > * >(argp2);
    {
      try {
        result = IborIndexPtr_clone(arg1,(Handle< YieldTermStructure > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new IborIndexPtr(static_cast< const IborIndexPtr& >(result))), SWIGTYPE_p_IborIndexPtr, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_IborIndex) {
  {
    IborIndexPtr *arg1 = (IborIndexPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_IborIndex(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_IborIndexPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IborIndex" "', argument " "1"" of type '" "IborIndexPtr *""'"); 
    }
    arg1 = reinterpret_cast< IborIndexPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_as_iborindex) {
  {
    InterestRateIndexPtr *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    SwigValueWrapper< IborIndexPtr > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: as_iborindex(index);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_InterestRateIndexPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "as_iborindex" "', argument " "1"" of type '" "InterestRateIndexPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "as_iborindex" "', argument " "1"" of type '" "InterestRateIndexPtr const &""'"); 
    }
    arg1 = reinterpret_cast< InterestRateIndexPtr * >(argp1);
    {
      try {
        result = as_iborindex((InterestRateIndexPtr const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new IborIndexPtr(static_cast< const IborIndexPtr& >(result))), SWIGTYPE_p_IborIndexPtr, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_OvernightIndex__SWIG_0) {
  {
    std::string *arg1 = 0 ;
    Integer arg2 ;
    Currency *arg3 = 0 ;
    Calendar *arg4 = 0 ;
    DayCounter *arg5 = 0 ;
    Handle< YieldTermStructure > *arg6 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    int val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    int argvi = 0;
    OvernightIndexPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_OvernightIndex(familyName,settlementDays,currency,calendar,dayCounter,h);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_OvernightIndex" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_OvernightIndex" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_OvernightIndex" "', argument " "2"" of type '" "Integer""'");
    } 
    arg2 = static_cast< Integer >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Currency,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_OvernightIndex" "', argument " "3"" of type '" "Currency const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_OvernightIndex" "', argument " "3"" of type '" "Currency const &""'"); 
    }
    arg3 = reinterpret_cast< Currency * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_OvernightIndex" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_OvernightIndex" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    arg4 = reinterpret_cast< Calendar * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_OvernightIndex" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_OvernightIndex" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    arg5 = reinterpret_cast< DayCounter * >(argp5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_OvernightIndex" "', argument " "6"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_OvernightIndex" "', argument " "6"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg6 = reinterpret_cast< Handle< YieldTermStructure > * >(argp6);
    {
      try {
        result = (OvernightIndexPtr *)new_OvernightIndexPtr__SWIG_0((std::string const &)*arg1,arg2,(Currency const &)*arg3,(Calendar const &)*arg4,(DayCounter const &)*arg5,(Handle< YieldTermStructure > const &)*arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OvernightIndexPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_OvernightIndex__SWIG_1) {
  {
    std::string *arg1 = 0 ;
    Integer arg2 ;
    Currency *arg3 = 0 ;
    Calendar *arg4 = 0 ;
    DayCounter *arg5 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    int val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int argvi = 0;
    OvernightIndexPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_OvernightIndex(familyName,settlementDays,currency,calendar,dayCounter);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_OvernightIndex" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_OvernightIndex" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_OvernightIndex" "', argument " "2"" of type '" "Integer""'");
    } 
    arg2 = static_cast< Integer >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Currency,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_OvernightIndex" "', argument " "3"" of type '" "Currency const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_OvernightIndex" "', argument " "3"" of type '" "Currency const &""'"); 
    }
    arg3 = reinterpret_cast< Currency * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_OvernightIndex" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_OvernightIndex" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    arg4 = reinterpret_cast< Calendar * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_OvernightIndex" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_OvernightIndex" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    arg5 = reinterpret_cast< DayCounter * >(argp5);
    {
      try {
        result = (OvernightIndexPtr *)new_OvernightIndexPtr__SWIG_0((std::string const &)*arg1,arg2,(Currency const &)*arg3,(Calendar const &)*arg4,(DayCounter const &)*arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OvernightIndexPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    
    
    
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_OvernightIndex) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Currency, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Currency, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_OvernightIndex__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_OvernightIndex__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_OvernightIndex'");
  XSRETURN(0);
}


XS(_wrap_delete_OvernightIndex) {
  {
    OvernightIndexPtr *arg1 = (OvernightIndexPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_OvernightIndex(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OvernightIndexPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_OvernightIndex" "', argument " "1"" of type '" "OvernightIndexPtr *""'"); 
    }
    arg1 = reinterpret_cast< OvernightIndexPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Libor__SWIG_0) {
  {
    std::string *arg1 = 0 ;
    Period *arg2 = 0 ;
    Natural arg3 ;
    Currency *arg4 = 0 ;
    Calendar *arg5 = 0 ;
    DayCounter *arg6 = 0 ;
    Handle< YieldTermStructure > *arg7 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    void *argp2 ;
    int res2 = 0 ;
    unsigned int val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    int argvi = 0;
    LiborPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: new_Libor(familyName,tenor,settlementDays,currency,financialCenterCalendar,dayCounter,h);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Libor" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Libor" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Libor" "', argument " "2"" of type '" "Period const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Libor" "', argument " "2"" of type '" "Period const &""'"); 
    }
    arg2 = reinterpret_cast< Period * >(argp2);
    ecode3 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Libor" "', argument " "3"" of type '" "Natural""'");
    } 
    arg3 = static_cast< Natural >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Currency,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_Libor" "', argument " "4"" of type '" "Currency const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Libor" "', argument " "4"" of type '" "Currency const &""'"); 
    }
    arg4 = reinterpret_cast< Currency * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_Libor" "', argument " "5"" of type '" "Calendar const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Libor" "', argument " "5"" of type '" "Calendar const &""'"); 
    }
    arg5 = reinterpret_cast< Calendar * >(argp5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_Libor" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Libor" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    arg6 = reinterpret_cast< DayCounter * >(argp6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_Libor" "', argument " "7"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Libor" "', argument " "7"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg7 = reinterpret_cast< Handle< YieldTermStructure > * >(argp7);
    {
      try {
        result = (LiborPtr *)new_LiborPtr__SWIG_0((std::string const &)*arg1,(Period const &)*arg2,arg3,(Currency const &)*arg4,(Calendar const &)*arg5,(DayCounter const &)*arg6,(Handle< YieldTermStructure > const &)*arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_LiborPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Libor__SWIG_1) {
  {
    std::string *arg1 = 0 ;
    Period *arg2 = 0 ;
    Natural arg3 ;
    Currency *arg4 = 0 ;
    Calendar *arg5 = 0 ;
    DayCounter *arg6 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    void *argp2 ;
    int res2 = 0 ;
    unsigned int val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    int argvi = 0;
    LiborPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_Libor(familyName,tenor,settlementDays,currency,financialCenterCalendar,dayCounter);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Libor" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Libor" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Libor" "', argument " "2"" of type '" "Period const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Libor" "', argument " "2"" of type '" "Period const &""'"); 
    }
    arg2 = reinterpret_cast< Period * >(argp2);
    ecode3 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Libor" "', argument " "3"" of type '" "Natural""'");
    } 
    arg3 = static_cast< Natural >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Currency,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_Libor" "', argument " "4"" of type '" "Currency const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Libor" "', argument " "4"" of type '" "Currency const &""'"); 
    }
    arg4 = reinterpret_cast< Currency * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_Libor" "', argument " "5"" of type '" "Calendar const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Libor" "', argument " "5"" of type '" "Calendar const &""'"); 
    }
    arg5 = reinterpret_cast< Calendar * >(argp5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_Libor" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Libor" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    arg6 = reinterpret_cast< DayCounter * >(argp6);
    {
      try {
        result = (LiborPtr *)new_LiborPtr__SWIG_0((std::string const &)*arg1,(Period const &)*arg2,arg3,(Currency const &)*arg4,(Calendar const &)*arg5,(DayCounter const &)*arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_LiborPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Libor) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Currency, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Currency, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Libor__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Libor__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Libor'");
  XSRETURN(0);
}


XS(_wrap_delete_Libor) {
  {
    LiborPtr *arg1 = (LiborPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Libor(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_LiborPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Libor" "', argument " "1"" of type '" "LiborPtr *""'"); 
    }
    arg1 = reinterpret_cast< LiborPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SwapIndex__SWIG_0) {
  {
    std::string *arg1 = 0 ;
    Period *arg2 = 0 ;
    Integer arg3 ;
    Currency *arg4 = 0 ;
    Calendar *arg5 = 0 ;
    Period *arg6 = 0 ;
    BusinessDayConvention arg7 ;
    DayCounter *arg8 = 0 ;
    IborIndexPtr *arg9 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    void *argp2 ;
    int res2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    int val7 ;
    int ecode7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    int argvi = 0;
    SwapIndexPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 9) || (items > 9)) {
      SWIG_croak("Usage: new_SwapIndex(familyName,tenor,settlementDays,currency,calendar,fixedLegTenor,fixedLegConvention,fixedLegDayCounter,iborIndex);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SwapIndex" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapIndex" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SwapIndex" "', argument " "2"" of type '" "Period const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapIndex" "', argument " "2"" of type '" "Period const &""'"); 
    }
    arg2 = reinterpret_cast< Period * >(argp2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_SwapIndex" "', argument " "3"" of type '" "Integer""'");
    } 
    arg3 = static_cast< Integer >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Currency,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_SwapIndex" "', argument " "4"" of type '" "Currency const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapIndex" "', argument " "4"" of type '" "Currency const &""'"); 
    }
    arg4 = reinterpret_cast< Currency * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_SwapIndex" "', argument " "5"" of type '" "Calendar const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapIndex" "', argument " "5"" of type '" "Calendar const &""'"); 
    }
    arg5 = reinterpret_cast< Calendar * >(argp5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_SwapIndex" "', argument " "6"" of type '" "Period const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapIndex" "', argument " "6"" of type '" "Period const &""'"); 
    }
    arg6 = reinterpret_cast< Period * >(argp6);
    ecode7 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_SwapIndex" "', argument " "7"" of type '" "BusinessDayConvention""'");
    } 
    arg7 = static_cast< BusinessDayConvention >(val7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_SwapIndex" "', argument " "8"" of type '" "DayCounter const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapIndex" "', argument " "8"" of type '" "DayCounter const &""'"); 
    }
    arg8 = reinterpret_cast< DayCounter * >(argp8);
    res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_IborIndexPtr,  0 );
    if (!SWIG_IsOK(res9)) {
      SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_SwapIndex" "', argument " "9"" of type '" "IborIndexPtr const &""'"); 
    }
    if (!argp9) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapIndex" "', argument " "9"" of type '" "IborIndexPtr const &""'"); 
    }
    arg9 = reinterpret_cast< IborIndexPtr * >(argp9);
    {
      try {
        result = (SwapIndexPtr *)new_SwapIndexPtr__SWIG_0((std::string const &)*arg1,(Period const &)*arg2,arg3,(Currency const &)*arg4,(Calendar const &)*arg5,(Period const &)*arg6,arg7,(DayCounter const &)*arg8,(IborIndexPtr const &)*arg9);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SwapIndexPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SwapIndex__SWIG_1) {
  {
    std::string *arg1 = 0 ;
    Period *arg2 = 0 ;
    Integer arg3 ;
    Currency *arg4 = 0 ;
    Calendar *arg5 = 0 ;
    Period *arg6 = 0 ;
    BusinessDayConvention arg7 ;
    DayCounter *arg8 = 0 ;
    IborIndexPtr *arg9 = 0 ;
    Handle< YieldTermStructure > *arg10 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    void *argp2 ;
    int res2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    int val7 ;
    int ecode7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    void *argp10 ;
    int res10 = 0 ;
    int argvi = 0;
    SwapIndexPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 10) || (items > 10)) {
      SWIG_croak("Usage: new_SwapIndex(familyName,tenor,settlementDays,currency,calendar,fixedLegTenor,fixedLegConvention,fixedLegDayCounter,iborIndex,discountCurve);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SwapIndex" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapIndex" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SwapIndex" "', argument " "2"" of type '" "Period const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapIndex" "', argument " "2"" of type '" "Period const &""'"); 
    }
    arg2 = reinterpret_cast< Period * >(argp2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_SwapIndex" "', argument " "3"" of type '" "Integer""'");
    } 
    arg3 = static_cast< Integer >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Currency,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_SwapIndex" "', argument " "4"" of type '" "Currency const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapIndex" "', argument " "4"" of type '" "Currency const &""'"); 
    }
    arg4 = reinterpret_cast< Currency * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_SwapIndex" "', argument " "5"" of type '" "Calendar const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapIndex" "', argument " "5"" of type '" "Calendar const &""'"); 
    }
    arg5 = reinterpret_cast< Calendar * >(argp5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_SwapIndex" "', argument " "6"" of type '" "Period const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapIndex" "', argument " "6"" of type '" "Period const &""'"); 
    }
    arg6 = reinterpret_cast< Period * >(argp6);
    ecode7 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_SwapIndex" "', argument " "7"" of type '" "BusinessDayConvention""'");
    } 
    arg7 = static_cast< BusinessDayConvention >(val7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_SwapIndex" "', argument " "8"" of type '" "DayCounter const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapIndex" "', argument " "8"" of type '" "DayCounter const &""'"); 
    }
    arg8 = reinterpret_cast< DayCounter * >(argp8);
    res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_IborIndexPtr,  0 );
    if (!SWIG_IsOK(res9)) {
      SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_SwapIndex" "', argument " "9"" of type '" "IborIndexPtr const &""'"); 
    }
    if (!argp9) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapIndex" "', argument " "9"" of type '" "IborIndexPtr const &""'"); 
    }
    arg9 = reinterpret_cast< IborIndexPtr * >(argp9);
    res10 = SWIG_ConvertPtr(ST(9), &argp10, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res10)) {
      SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "new_SwapIndex" "', argument " "10"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp10) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapIndex" "', argument " "10"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg10 = reinterpret_cast< Handle< YieldTermStructure > * >(argp10);
    {
      try {
        result = (SwapIndexPtr *)new_SwapIndexPtr__SWIG_1((std::string const &)*arg1,(Period const &)*arg2,arg3,(Currency const &)*arg4,(Calendar const &)*arg5,(Period const &)*arg6,arg7,(DayCounter const &)*arg8,(IborIndexPtr const &)*arg9,(Handle< YieldTermStructure > const &)*arg10);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SwapIndexPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SwapIndex) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 9) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Currency, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_IborIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 10) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Currency, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_IborIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(9), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SwapIndex__SWIG_0); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SwapIndex__SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded 'new_SwapIndex'");
  XSRETURN(0);
}


XS(_wrap_SwapIndex_fixedLegTenor) {
  {
    SwapIndexPtr *arg1 = (SwapIndexPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Period result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: SwapIndex_fixedLegTenor(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SwapIndexPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwapIndex_fixedLegTenor" "', argument " "1"" of type '" "SwapIndexPtr *""'"); 
    }
    arg1 = reinterpret_cast< SwapIndexPtr * >(argp1);
    {
      try {
        result = SwapIndexPtr_fixedLegTenor(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Period(static_cast< const Period& >(result))), SWIGTYPE_p_Period, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_SwapIndex_fixedLegConvention) {
  {
    SwapIndexPtr *arg1 = (SwapIndexPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    BusinessDayConvention result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: SwapIndex_fixedLegConvention(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SwapIndexPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwapIndex_fixedLegConvention" "', argument " "1"" of type '" "SwapIndexPtr *""'"); 
    }
    arg1 = reinterpret_cast< SwapIndexPtr * >(argp1);
    {
      try {
        result = (BusinessDayConvention)SwapIndexPtr_fixedLegConvention(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_SwapIndex_iborIndex) {
  {
    SwapIndexPtr *arg1 = (SwapIndexPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    SwigValueWrapper< IborIndexPtr > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: SwapIndex_iborIndex(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SwapIndexPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwapIndex_iborIndex" "', argument " "1"" of type '" "SwapIndexPtr *""'"); 
    }
    arg1 = reinterpret_cast< SwapIndexPtr * >(argp1);
    {
      try {
        result = SwapIndexPtr_iborIndex(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new IborIndexPtr(static_cast< const IborIndexPtr& >(result))), SWIGTYPE_p_IborIndexPtr, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_SwapIndex_forwardingTermStructure) {
  {
    SwapIndexPtr *arg1 = (SwapIndexPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Handle< YieldTermStructure > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: SwapIndex_forwardingTermStructure(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SwapIndexPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwapIndex_forwardingTermStructure" "', argument " "1"" of type '" "SwapIndexPtr *""'"); 
    }
    arg1 = reinterpret_cast< SwapIndexPtr * >(argp1);
    {
      try {
        result = SwapIndexPtr_forwardingTermStructure(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Handle< YieldTermStructure >(static_cast< const Handle< YieldTermStructure >& >(result))), SWIGTYPE_p_HandleT_YieldTermStructure_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_SwapIndex) {
  {
    SwapIndexPtr *arg1 = (SwapIndexPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_SwapIndex(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SwapIndexPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SwapIndex" "', argument " "1"" of type '" "SwapIndexPtr *""'"); 
    }
    arg1 = reinterpret_cast< SwapIndexPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_AUDLibor__SWIG_0) {
  {
    Period *arg1 = 0 ;
    Handle< YieldTermStructure > *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    AUDLiborPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_AUDLibor(tenor,h);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_AUDLibor" "', argument " "1"" of type '" "Period const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AUDLibor" "', argument " "1"" of type '" "Period const &""'"); 
    }
    arg1 = reinterpret_cast< Period * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_AUDLibor" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AUDLibor" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< YieldTermStructure > * >(argp2);
    {
      try {
        result = (AUDLiborPtr *)new_AUDLiborPtr__SWIG_0((Period const &)*arg1,(Handle< YieldTermStructure > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_AUDLiborPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_AUDLibor__SWIG_1) {
  {
    Period *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    AUDLiborPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_AUDLibor(tenor);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_AUDLibor" "', argument " "1"" of type '" "Period const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AUDLibor" "', argument " "1"" of type '" "Period const &""'"); 
    }
    arg1 = reinterpret_cast< Period * >(argp1);
    {
      try {
        result = (AUDLiborPtr *)new_AUDLiborPtr__SWIG_0((Period const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_AUDLiborPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_AUDLibor) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_AUDLibor__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_AUDLibor__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_AUDLibor'");
  XSRETURN(0);
}


XS(_wrap_delete_AUDLibor) {
  {
    AUDLiborPtr *arg1 = (AUDLiborPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_AUDLibor(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_AUDLiborPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_AUDLibor" "', argument " "1"" of type '" "AUDLiborPtr *""'"); 
    }
    arg1 = reinterpret_cast< AUDLiborPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CADLibor__SWIG_0) {
  {
    Period *arg1 = 0 ;
    Handle< YieldTermStructure > *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    CADLiborPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_CADLibor(tenor,h);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CADLibor" "', argument " "1"" of type '" "Period const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CADLibor" "', argument " "1"" of type '" "Period const &""'"); 
    }
    arg1 = reinterpret_cast< Period * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CADLibor" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CADLibor" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< YieldTermStructure > * >(argp2);
    {
      try {
        result = (CADLiborPtr *)new_CADLiborPtr__SWIG_0((Period const &)*arg1,(Handle< YieldTermStructure > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CADLiborPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CADLibor__SWIG_1) {
  {
    Period *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    CADLiborPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_CADLibor(tenor);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CADLibor" "', argument " "1"" of type '" "Period const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CADLibor" "', argument " "1"" of type '" "Period const &""'"); 
    }
    arg1 = reinterpret_cast< Period * >(argp1);
    {
      try {
        result = (CADLiborPtr *)new_CADLiborPtr__SWIG_0((Period const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CADLiborPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CADLibor) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_CADLibor__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_CADLibor__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_CADLibor'");
  XSRETURN(0);
}


XS(_wrap_delete_CADLibor) {
  {
    CADLiborPtr *arg1 = (CADLiborPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_CADLibor(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CADLiborPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CADLibor" "', argument " "1"" of type '" "CADLiborPtr *""'"); 
    }
    arg1 = reinterpret_cast< CADLiborPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Cdor__SWIG_0) {
  {
    Period *arg1 = 0 ;
    Handle< YieldTermStructure > *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    CdorPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_Cdor(tenor,h);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Cdor" "', argument " "1"" of type '" "Period const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Cdor" "', argument " "1"" of type '" "Period const &""'"); 
    }
    arg1 = reinterpret_cast< Period * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Cdor" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Cdor" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< YieldTermStructure > * >(argp2);
    {
      try {
        result = (CdorPtr *)new_CdorPtr__SWIG_0((Period const &)*arg1,(Handle< YieldTermStructure > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CdorPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Cdor__SWIG_1) {
  {
    Period *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    CdorPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Cdor(tenor);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Cdor" "', argument " "1"" of type '" "Period const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Cdor" "', argument " "1"" of type '" "Period const &""'"); 
    }
    arg1 = reinterpret_cast< Period * >(argp1);
    {
      try {
        result = (CdorPtr *)new_CdorPtr__SWIG_0((Period const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CdorPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Cdor) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Cdor__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Cdor__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Cdor'");
  XSRETURN(0);
}


XS(_wrap_delete_Cdor) {
  {
    CdorPtr *arg1 = (CdorPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Cdor(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CdorPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Cdor" "', argument " "1"" of type '" "CdorPtr *""'"); 
    }
    arg1 = reinterpret_cast< CdorPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CHFLibor__SWIG_0) {
  {
    Period *arg1 = 0 ;
    Handle< YieldTermStructure > *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    CHFLiborPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_CHFLibor(tenor,h);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CHFLibor" "', argument " "1"" of type '" "Period const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CHFLibor" "', argument " "1"" of type '" "Period const &""'"); 
    }
    arg1 = reinterpret_cast< Period * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CHFLibor" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CHFLibor" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< YieldTermStructure > * >(argp2);
    {
      try {
        result = (CHFLiborPtr *)new_CHFLiborPtr__SWIG_0((Period const &)*arg1,(Handle< YieldTermStructure > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CHFLiborPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CHFLibor__SWIG_1) {
  {
    Period *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    CHFLiborPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_CHFLibor(tenor);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CHFLibor" "', argument " "1"" of type '" "Period const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CHFLibor" "', argument " "1"" of type '" "Period const &""'"); 
    }
    arg1 = reinterpret_cast< Period * >(argp1);
    {
      try {
        result = (CHFLiborPtr *)new_CHFLiborPtr__SWIG_0((Period const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CHFLiborPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CHFLibor) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_CHFLibor__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_CHFLibor__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_CHFLibor'");
  XSRETURN(0);
}


XS(_wrap_delete_CHFLibor) {
  {
    CHFLiborPtr *arg1 = (CHFLiborPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_CHFLibor(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CHFLiborPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CHFLibor" "', argument " "1"" of type '" "CHFLiborPtr *""'"); 
    }
    arg1 = reinterpret_cast< CHFLiborPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DKKLibor__SWIG_0) {
  {
    Period *arg1 = 0 ;
    Handle< YieldTermStructure > *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    DKKLiborPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_DKKLibor(tenor,h);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DKKLibor" "', argument " "1"" of type '" "Period const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DKKLibor" "', argument " "1"" of type '" "Period const &""'"); 
    }
    arg1 = reinterpret_cast< Period * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_DKKLibor" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DKKLibor" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< YieldTermStructure > * >(argp2);
    {
      try {
        result = (DKKLiborPtr *)new_DKKLiborPtr__SWIG_0((Period const &)*arg1,(Handle< YieldTermStructure > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DKKLiborPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DKKLibor__SWIG_1) {
  {
    Period *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    DKKLiborPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_DKKLibor(tenor);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DKKLibor" "', argument " "1"" of type '" "Period const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DKKLibor" "', argument " "1"" of type '" "Period const &""'"); 
    }
    arg1 = reinterpret_cast< Period * >(argp1);
    {
      try {
        result = (DKKLiborPtr *)new_DKKLiborPtr__SWIG_0((Period const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DKKLiborPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DKKLibor) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DKKLibor__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DKKLibor__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_DKKLibor'");
  XSRETURN(0);
}


XS(_wrap_delete_DKKLibor) {
  {
    DKKLiborPtr *arg1 = (DKKLiborPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_DKKLibor(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_DKKLiborPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DKKLibor" "', argument " "1"" of type '" "DKKLiborPtr *""'"); 
    }
    arg1 = reinterpret_cast< DKKLiborPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Bbsw__SWIG_0) {
  {
    Period *arg1 = 0 ;
    Handle< YieldTermStructure > *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    BbswPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_Bbsw(tenor,h);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Bbsw" "', argument " "1"" of type '" "Period const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Bbsw" "', argument " "1"" of type '" "Period const &""'"); 
    }
    arg1 = reinterpret_cast< Period * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Bbsw" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Bbsw" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< YieldTermStructure > * >(argp2);
    {
      try {
        result = (BbswPtr *)new_BbswPtr__SWIG_0((Period const &)*arg1,(Handle< YieldTermStructure > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BbswPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Bbsw__SWIG_1) {
  {
    Period *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    BbswPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Bbsw(tenor);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Bbsw" "', argument " "1"" of type '" "Period const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Bbsw" "', argument " "1"" of type '" "Period const &""'"); 
    }
    arg1 = reinterpret_cast< Period * >(argp1);
    {
      try {
        result = (BbswPtr *)new_BbswPtr__SWIG_0((Period const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BbswPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Bbsw) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Bbsw__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Bbsw__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Bbsw'");
  XSRETURN(0);
}


XS(_wrap_delete_Bbsw) {
  {
    BbswPtr *arg1 = (BbswPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Bbsw(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BbswPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Bbsw" "', argument " "1"" of type '" "BbswPtr *""'"); 
    }
    arg1 = reinterpret_cast< BbswPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Bbsw1M__SWIG_0) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Bbsw1MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Bbsw1M(h);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Bbsw1M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Bbsw1M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    {
      try {
        result = (Bbsw1MPtr *)new_Bbsw1MPtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Bbsw1MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Bbsw1M__SWIG_1) {
  {
    int argvi = 0;
    Bbsw1MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Bbsw1M();");
    }
    {
      try {
        result = (Bbsw1MPtr *)new_Bbsw1MPtr__SWIG_0();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Bbsw1MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_Bbsw1M) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Bbsw1M__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Bbsw1M__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Bbsw1M'");
  XSRETURN(0);
}


XS(_wrap_delete_Bbsw1M) {
  {
    Bbsw1MPtr *arg1 = (Bbsw1MPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Bbsw1M(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Bbsw1MPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Bbsw1M" "', argument " "1"" of type '" "Bbsw1MPtr *""'"); 
    }
    arg1 = reinterpret_cast< Bbsw1MPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Bbsw2M__SWIG_0) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Bbsw2MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Bbsw2M(h);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Bbsw2M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Bbsw2M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    {
      try {
        result = (Bbsw2MPtr *)new_Bbsw2MPtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Bbsw2MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Bbsw2M__SWIG_1) {
  {
    int argvi = 0;
    Bbsw2MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Bbsw2M();");
    }
    {
      try {
        result = (Bbsw2MPtr *)new_Bbsw2MPtr__SWIG_0();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Bbsw2MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_Bbsw2M) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Bbsw2M__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Bbsw2M__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Bbsw2M'");
  XSRETURN(0);
}


XS(_wrap_delete_Bbsw2M) {
  {
    Bbsw2MPtr *arg1 = (Bbsw2MPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Bbsw2M(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Bbsw2MPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Bbsw2M" "', argument " "1"" of type '" "Bbsw2MPtr *""'"); 
    }
    arg1 = reinterpret_cast< Bbsw2MPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Bbsw3M__SWIG_0) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Bbsw3MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Bbsw3M(h);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Bbsw3M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Bbsw3M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    {
      try {
        result = (Bbsw3MPtr *)new_Bbsw3MPtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Bbsw3MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Bbsw3M__SWIG_1) {
  {
    int argvi = 0;
    Bbsw3MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Bbsw3M();");
    }
    {
      try {
        result = (Bbsw3MPtr *)new_Bbsw3MPtr__SWIG_0();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Bbsw3MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_Bbsw3M) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Bbsw3M__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Bbsw3M__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Bbsw3M'");
  XSRETURN(0);
}


XS(_wrap_delete_Bbsw3M) {
  {
    Bbsw3MPtr *arg1 = (Bbsw3MPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Bbsw3M(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Bbsw3MPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Bbsw3M" "', argument " "1"" of type '" "Bbsw3MPtr *""'"); 
    }
    arg1 = reinterpret_cast< Bbsw3MPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Bbsw4M__SWIG_0) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Bbsw4MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Bbsw4M(h);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Bbsw4M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Bbsw4M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    {
      try {
        result = (Bbsw4MPtr *)new_Bbsw4MPtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Bbsw4MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Bbsw4M__SWIG_1) {
  {
    int argvi = 0;
    Bbsw4MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Bbsw4M();");
    }
    {
      try {
        result = (Bbsw4MPtr *)new_Bbsw4MPtr__SWIG_0();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Bbsw4MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_Bbsw4M) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Bbsw4M__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Bbsw4M__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Bbsw4M'");
  XSRETURN(0);
}


XS(_wrap_delete_Bbsw4M) {
  {
    Bbsw4MPtr *arg1 = (Bbsw4MPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Bbsw4M(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Bbsw4MPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Bbsw4M" "', argument " "1"" of type '" "Bbsw4MPtr *""'"); 
    }
    arg1 = reinterpret_cast< Bbsw4MPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Bbsw5M__SWIG_0) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Bbsw5MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Bbsw5M(h);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Bbsw5M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Bbsw5M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    {
      try {
        result = (Bbsw5MPtr *)new_Bbsw5MPtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Bbsw5MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Bbsw5M__SWIG_1) {
  {
    int argvi = 0;
    Bbsw5MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Bbsw5M();");
    }
    {
      try {
        result = (Bbsw5MPtr *)new_Bbsw5MPtr__SWIG_0();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Bbsw5MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_Bbsw5M) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Bbsw5M__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Bbsw5M__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Bbsw5M'");
  XSRETURN(0);
}


XS(_wrap_delete_Bbsw5M) {
  {
    Bbsw5MPtr *arg1 = (Bbsw5MPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Bbsw5M(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Bbsw5MPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Bbsw5M" "', argument " "1"" of type '" "Bbsw5MPtr *""'"); 
    }
    arg1 = reinterpret_cast< Bbsw5MPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Bbsw6M__SWIG_0) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Bbsw6MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Bbsw6M(h);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Bbsw6M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Bbsw6M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    {
      try {
        result = (Bbsw6MPtr *)new_Bbsw6MPtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Bbsw6MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Bbsw6M__SWIG_1) {
  {
    int argvi = 0;
    Bbsw6MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Bbsw6M();");
    }
    {
      try {
        result = (Bbsw6MPtr *)new_Bbsw6MPtr__SWIG_0();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Bbsw6MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_Bbsw6M) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Bbsw6M__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Bbsw6M__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Bbsw6M'");
  XSRETURN(0);
}


XS(_wrap_delete_Bbsw6M) {
  {
    Bbsw6MPtr *arg1 = (Bbsw6MPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Bbsw6M(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Bbsw6MPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Bbsw6M" "', argument " "1"" of type '" "Bbsw6MPtr *""'"); 
    }
    arg1 = reinterpret_cast< Bbsw6MPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Bkbm__SWIG_0) {
  {
    Period *arg1 = 0 ;
    Handle< YieldTermStructure > *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    BkbmPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_Bkbm(tenor,h);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Bkbm" "', argument " "1"" of type '" "Period const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Bkbm" "', argument " "1"" of type '" "Period const &""'"); 
    }
    arg1 = reinterpret_cast< Period * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Bkbm" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Bkbm" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< YieldTermStructure > * >(argp2);
    {
      try {
        result = (BkbmPtr *)new_BkbmPtr__SWIG_0((Period const &)*arg1,(Handle< YieldTermStructure > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BkbmPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Bkbm__SWIG_1) {
  {
    Period *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    BkbmPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Bkbm(tenor);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Bkbm" "', argument " "1"" of type '" "Period const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Bkbm" "', argument " "1"" of type '" "Period const &""'"); 
    }
    arg1 = reinterpret_cast< Period * >(argp1);
    {
      try {
        result = (BkbmPtr *)new_BkbmPtr__SWIG_0((Period const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BkbmPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Bkbm) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Bkbm__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Bkbm__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Bkbm'");
  XSRETURN(0);
}


XS(_wrap_delete_Bkbm) {
  {
    BkbmPtr *arg1 = (BkbmPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Bkbm(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BkbmPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Bkbm" "', argument " "1"" of type '" "BkbmPtr *""'"); 
    }
    arg1 = reinterpret_cast< BkbmPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Bkbm1M__SWIG_0) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Bkbm1MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Bkbm1M(h);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Bkbm1M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Bkbm1M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    {
      try {
        result = (Bkbm1MPtr *)new_Bkbm1MPtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Bkbm1MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Bkbm1M__SWIG_1) {
  {
    int argvi = 0;
    Bkbm1MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Bkbm1M();");
    }
    {
      try {
        result = (Bkbm1MPtr *)new_Bkbm1MPtr__SWIG_0();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Bkbm1MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_Bkbm1M) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Bkbm1M__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Bkbm1M__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Bkbm1M'");
  XSRETURN(0);
}


XS(_wrap_delete_Bkbm1M) {
  {
    Bkbm1MPtr *arg1 = (Bkbm1MPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Bkbm1M(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Bkbm1MPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Bkbm1M" "', argument " "1"" of type '" "Bkbm1MPtr *""'"); 
    }
    arg1 = reinterpret_cast< Bkbm1MPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Bkbm2M__SWIG_0) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Bkbm2MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Bkbm2M(h);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Bkbm2M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Bkbm2M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    {
      try {
        result = (Bkbm2MPtr *)new_Bkbm2MPtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Bkbm2MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Bkbm2M__SWIG_1) {
  {
    int argvi = 0;
    Bkbm2MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Bkbm2M();");
    }
    {
      try {
        result = (Bkbm2MPtr *)new_Bkbm2MPtr__SWIG_0();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Bkbm2MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_Bkbm2M) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Bkbm2M__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Bkbm2M__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Bkbm2M'");
  XSRETURN(0);
}


XS(_wrap_delete_Bkbm2M) {
  {
    Bkbm2MPtr *arg1 = (Bkbm2MPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Bkbm2M(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Bkbm2MPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Bkbm2M" "', argument " "1"" of type '" "Bkbm2MPtr *""'"); 
    }
    arg1 = reinterpret_cast< Bkbm2MPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Bkbm3M__SWIG_0) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Bkbm3MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Bkbm3M(h);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Bkbm3M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Bkbm3M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    {
      try {
        result = (Bkbm3MPtr *)new_Bkbm3MPtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Bkbm3MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Bkbm3M__SWIG_1) {
  {
    int argvi = 0;
    Bkbm3MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Bkbm3M();");
    }
    {
      try {
        result = (Bkbm3MPtr *)new_Bkbm3MPtr__SWIG_0();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Bkbm3MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_Bkbm3M) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Bkbm3M__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Bkbm3M__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Bkbm3M'");
  XSRETURN(0);
}


XS(_wrap_delete_Bkbm3M) {
  {
    Bkbm3MPtr *arg1 = (Bkbm3MPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Bkbm3M(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Bkbm3MPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Bkbm3M" "', argument " "1"" of type '" "Bkbm3MPtr *""'"); 
    }
    arg1 = reinterpret_cast< Bkbm3MPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Bkbm4M__SWIG_0) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Bkbm4MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Bkbm4M(h);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Bkbm4M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Bkbm4M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    {
      try {
        result = (Bkbm4MPtr *)new_Bkbm4MPtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Bkbm4MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Bkbm4M__SWIG_1) {
  {
    int argvi = 0;
    Bkbm4MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Bkbm4M();");
    }
    {
      try {
        result = (Bkbm4MPtr *)new_Bkbm4MPtr__SWIG_0();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Bkbm4MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_Bkbm4M) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Bkbm4M__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Bkbm4M__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Bkbm4M'");
  XSRETURN(0);
}


XS(_wrap_delete_Bkbm4M) {
  {
    Bkbm4MPtr *arg1 = (Bkbm4MPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Bkbm4M(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Bkbm4MPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Bkbm4M" "', argument " "1"" of type '" "Bkbm4MPtr *""'"); 
    }
    arg1 = reinterpret_cast< Bkbm4MPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Bkbm5M__SWIG_0) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Bkbm5MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Bkbm5M(h);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Bkbm5M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Bkbm5M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    {
      try {
        result = (Bkbm5MPtr *)new_Bkbm5MPtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Bkbm5MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Bkbm5M__SWIG_1) {
  {
    int argvi = 0;
    Bkbm5MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Bkbm5M();");
    }
    {
      try {
        result = (Bkbm5MPtr *)new_Bkbm5MPtr__SWIG_0();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Bkbm5MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_Bkbm5M) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Bkbm5M__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Bkbm5M__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Bkbm5M'");
  XSRETURN(0);
}


XS(_wrap_delete_Bkbm5M) {
  {
    Bkbm5MPtr *arg1 = (Bkbm5MPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Bkbm5M(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Bkbm5MPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Bkbm5M" "', argument " "1"" of type '" "Bkbm5MPtr *""'"); 
    }
    arg1 = reinterpret_cast< Bkbm5MPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Bkbm6M__SWIG_0) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Bkbm6MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Bkbm6M(h);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Bkbm6M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Bkbm6M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    {
      try {
        result = (Bkbm6MPtr *)new_Bkbm6MPtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Bkbm6MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Bkbm6M__SWIG_1) {
  {
    int argvi = 0;
    Bkbm6MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Bkbm6M();");
    }
    {
      try {
        result = (Bkbm6MPtr *)new_Bkbm6MPtr__SWIG_0();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Bkbm6MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_Bkbm6M) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Bkbm6M__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Bkbm6M__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Bkbm6M'");
  XSRETURN(0);
}


XS(_wrap_delete_Bkbm6M) {
  {
    Bkbm6MPtr *arg1 = (Bkbm6MPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Bkbm6M(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Bkbm6MPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Bkbm6M" "', argument " "1"" of type '" "Bkbm6MPtr *""'"); 
    }
    arg1 = reinterpret_cast< Bkbm6MPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor__SWIG_0) {
  {
    Period *arg1 = 0 ;
    Handle< YieldTermStructure > *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    EuriborPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_Euribor(tenor,h);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Euribor" "', argument " "1"" of type '" "Period const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Euribor" "', argument " "1"" of type '" "Period const &""'"); 
    }
    arg1 = reinterpret_cast< Period * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Euribor" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Euribor" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< YieldTermStructure > * >(argp2);
    {
      try {
        result = (EuriborPtr *)new_EuriborPtr__SWIG_0((Period const &)*arg1,(Handle< YieldTermStructure > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EuriborPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor__SWIG_1) {
  {
    Period *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    EuriborPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Euribor(tenor);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Euribor" "', argument " "1"" of type '" "Period const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Euribor" "', argument " "1"" of type '" "Period const &""'"); 
    }
    arg1 = reinterpret_cast< Period * >(argp1);
    {
      try {
        result = (EuriborPtr *)new_EuriborPtr__SWIG_0((Period const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EuriborPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Euribor__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Euribor__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Euribor'");
  XSRETURN(0);
}


XS(_wrap_delete_Euribor) {
  {
    EuriborPtr *arg1 = (EuriborPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Euribor(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_EuriborPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Euribor" "', argument " "1"" of type '" "EuriborPtr *""'"); 
    }
    arg1 = reinterpret_cast< EuriborPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_EuriborSW__SWIG_0) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    EuriborSWPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_EuriborSW(h);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_EuriborSW" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EuriborSW" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    {
      try {
        result = (EuriborSWPtr *)new_EuriborSWPtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EuriborSWPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_EuriborSW__SWIG_1) {
  {
    int argvi = 0;
    EuriborSWPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_EuriborSW();");
    }
    {
      try {
        result = (EuriborSWPtr *)new_EuriborSWPtr__SWIG_0();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EuriborSWPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_EuriborSW) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_EuriborSW__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_EuriborSW__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_EuriborSW'");
  XSRETURN(0);
}


XS(_wrap_delete_EuriborSW) {
  {
    EuriborSWPtr *arg1 = (EuriborSWPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_EuriborSW(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_EuriborSWPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_EuriborSW" "', argument " "1"" of type '" "EuriborSWPtr *""'"); 
    }
    arg1 = reinterpret_cast< EuriborSWPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor2W__SWIG_0) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Euribor2WPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Euribor2W(h);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Euribor2W" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Euribor2W" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    {
      try {
        result = (Euribor2WPtr *)new_Euribor2WPtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Euribor2WPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor2W__SWIG_1) {
  {
    int argvi = 0;
    Euribor2WPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Euribor2W();");
    }
    {
      try {
        result = (Euribor2WPtr *)new_Euribor2WPtr__SWIG_0();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Euribor2WPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor2W) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Euribor2W__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Euribor2W__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Euribor2W'");
  XSRETURN(0);
}


XS(_wrap_delete_Euribor2W) {
  {
    Euribor2WPtr *arg1 = (Euribor2WPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Euribor2W(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Euribor2WPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Euribor2W" "', argument " "1"" of type '" "Euribor2WPtr *""'"); 
    }
    arg1 = reinterpret_cast< Euribor2WPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor3W__SWIG_0) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Euribor3WPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Euribor3W(h);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Euribor3W" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Euribor3W" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    {
      try {
        result = (Euribor3WPtr *)new_Euribor3WPtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Euribor3WPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor3W__SWIG_1) {
  {
    int argvi = 0;
    Euribor3WPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Euribor3W();");
    }
    {
      try {
        result = (Euribor3WPtr *)new_Euribor3WPtr__SWIG_0();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Euribor3WPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor3W) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Euribor3W__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Euribor3W__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Euribor3W'");
  XSRETURN(0);
}


XS(_wrap_delete_Euribor3W) {
  {
    Euribor3WPtr *arg1 = (Euribor3WPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Euribor3W(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Euribor3WPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Euribor3W" "', argument " "1"" of type '" "Euribor3WPtr *""'"); 
    }
    arg1 = reinterpret_cast< Euribor3WPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor1M__SWIG_0) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Euribor1MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Euribor1M(h);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Euribor1M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Euribor1M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    {
      try {
        result = (Euribor1MPtr *)new_Euribor1MPtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Euribor1MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor1M__SWIG_1) {
  {
    int argvi = 0;
    Euribor1MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Euribor1M();");
    }
    {
      try {
        result = (Euribor1MPtr *)new_Euribor1MPtr__SWIG_0();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Euribor1MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor1M) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Euribor1M__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Euribor1M__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Euribor1M'");
  XSRETURN(0);
}


XS(_wrap_delete_Euribor1M) {
  {
    Euribor1MPtr *arg1 = (Euribor1MPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Euribor1M(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Euribor1MPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Euribor1M" "', argument " "1"" of type '" "Euribor1MPtr *""'"); 
    }
    arg1 = reinterpret_cast< Euribor1MPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor2M__SWIG_0) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Euribor2MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Euribor2M(h);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Euribor2M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Euribor2M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    {
      try {
        result = (Euribor2MPtr *)new_Euribor2MPtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Euribor2MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor2M__SWIG_1) {
  {
    int argvi = 0;
    Euribor2MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Euribor2M();");
    }
    {
      try {
        result = (Euribor2MPtr *)new_Euribor2MPtr__SWIG_0();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Euribor2MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor2M) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Euribor2M__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Euribor2M__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Euribor2M'");
  XSRETURN(0);
}


XS(_wrap_delete_Euribor2M) {
  {
    Euribor2MPtr *arg1 = (Euribor2MPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Euribor2M(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Euribor2MPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Euribor2M" "', argument " "1"" of type '" "Euribor2MPtr *""'"); 
    }
    arg1 = reinterpret_cast< Euribor2MPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor3M__SWIG_0) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Euribor3MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Euribor3M(h);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Euribor3M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Euribor3M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    {
      try {
        result = (Euribor3MPtr *)new_Euribor3MPtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Euribor3MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor3M__SWIG_1) {
  {
    int argvi = 0;
    Euribor3MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Euribor3M();");
    }
    {
      try {
        result = (Euribor3MPtr *)new_Euribor3MPtr__SWIG_0();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Euribor3MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor3M) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Euribor3M__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Euribor3M__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Euribor3M'");
  XSRETURN(0);
}


XS(_wrap_delete_Euribor3M) {
  {
    Euribor3MPtr *arg1 = (Euribor3MPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Euribor3M(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Euribor3MPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Euribor3M" "', argument " "1"" of type '" "Euribor3MPtr *""'"); 
    }
    arg1 = reinterpret_cast< Euribor3MPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor4M__SWIG_0) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Euribor4MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Euribor4M(h);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Euribor4M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Euribor4M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    {
      try {
        result = (Euribor4MPtr *)new_Euribor4MPtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Euribor4MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor4M__SWIG_1) {
  {
    int argvi = 0;
    Euribor4MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Euribor4M();");
    }
    {
      try {
        result = (Euribor4MPtr *)new_Euribor4MPtr__SWIG_0();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Euribor4MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor4M) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Euribor4M__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Euribor4M__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Euribor4M'");
  XSRETURN(0);
}


XS(_wrap_delete_Euribor4M) {
  {
    Euribor4MPtr *arg1 = (Euribor4MPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Euribor4M(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Euribor4MPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Euribor4M" "', argument " "1"" of type '" "Euribor4MPtr *""'"); 
    }
    arg1 = reinterpret_cast< Euribor4MPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor5M__SWIG_0) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Euribor5MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Euribor5M(h);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Euribor5M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Euribor5M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    {
      try {
        result = (Euribor5MPtr *)new_Euribor5MPtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Euribor5MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor5M__SWIG_1) {
  {
    int argvi = 0;
    Euribor5MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Euribor5M();");
    }
    {
      try {
        result = (Euribor5MPtr *)new_Euribor5MPtr__SWIG_0();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Euribor5MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor5M) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Euribor5M__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Euribor5M__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Euribor5M'");
  XSRETURN(0);
}


XS(_wrap_delete_Euribor5M) {
  {
    Euribor5MPtr *arg1 = (Euribor5MPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Euribor5M(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Euribor5MPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Euribor5M" "', argument " "1"" of type '" "Euribor5MPtr *""'"); 
    }
    arg1 = reinterpret_cast< Euribor5MPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor6M__SWIG_0) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Euribor6MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Euribor6M(h);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Euribor6M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Euribor6M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    {
      try {
        result = (Euribor6MPtr *)new_Euribor6MPtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Euribor6MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor6M__SWIG_1) {
  {
    int argvi = 0;
    Euribor6MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Euribor6M();");
    }
    {
      try {
        result = (Euribor6MPtr *)new_Euribor6MPtr__SWIG_0();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Euribor6MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor6M) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Euribor6M__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Euribor6M__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Euribor6M'");
  XSRETURN(0);
}


XS(_wrap_delete_Euribor6M) {
  {
    Euribor6MPtr *arg1 = (Euribor6MPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Euribor6M(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Euribor6MPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Euribor6M" "', argument " "1"" of type '" "Euribor6MPtr *""'"); 
    }
    arg1 = reinterpret_cast< Euribor6MPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor7M__SWIG_0) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Euribor7MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Euribor7M(h);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Euribor7M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Euribor7M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    {
      try {
        result = (Euribor7MPtr *)new_Euribor7MPtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Euribor7MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor7M__SWIG_1) {
  {
    int argvi = 0;
    Euribor7MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Euribor7M();");
    }
    {
      try {
        result = (Euribor7MPtr *)new_Euribor7MPtr__SWIG_0();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Euribor7MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor7M) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Euribor7M__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Euribor7M__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Euribor7M'");
  XSRETURN(0);
}


XS(_wrap_delete_Euribor7M) {
  {
    Euribor7MPtr *arg1 = (Euribor7MPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Euribor7M(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Euribor7MPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Euribor7M" "', argument " "1"" of type '" "Euribor7MPtr *""'"); 
    }
    arg1 = reinterpret_cast< Euribor7MPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor8M__SWIG_0) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Euribor8MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Euribor8M(h);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Euribor8M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Euribor8M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    {
      try {
        result = (Euribor8MPtr *)new_Euribor8MPtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Euribor8MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor8M__SWIG_1) {
  {
    int argvi = 0;
    Euribor8MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Euribor8M();");
    }
    {
      try {
        result = (Euribor8MPtr *)new_Euribor8MPtr__SWIG_0();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Euribor8MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor8M) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Euribor8M__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Euribor8M__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Euribor8M'");
  XSRETURN(0);
}


XS(_wrap_delete_Euribor8M) {
  {
    Euribor8MPtr *arg1 = (Euribor8MPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Euribor8M(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Euribor8MPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Euribor8M" "', argument " "1"" of type '" "Euribor8MPtr *""'"); 
    }
    arg1 = reinterpret_cast< Euribor8MPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor9M__SWIG_0) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Euribor9MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Euribor9M(h);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Euribor9M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Euribor9M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    {
      try {
        result = (Euribor9MPtr *)new_Euribor9MPtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Euribor9MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor9M__SWIG_1) {
  {
    int argvi = 0;
    Euribor9MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Euribor9M();");
    }
    {
      try {
        result = (Euribor9MPtr *)new_Euribor9MPtr__SWIG_0();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Euribor9MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor9M) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Euribor9M__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Euribor9M__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Euribor9M'");
  XSRETURN(0);
}


XS(_wrap_delete_Euribor9M) {
  {
    Euribor9MPtr *arg1 = (Euribor9MPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Euribor9M(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Euribor9MPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Euribor9M" "', argument " "1"" of type '" "Euribor9MPtr *""'"); 
    }
    arg1 = reinterpret_cast< Euribor9MPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor10M__SWIG_0) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Euribor10MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Euribor10M(h);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Euribor10M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Euribor10M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    {
      try {
        result = (Euribor10MPtr *)new_Euribor10MPtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Euribor10MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor10M__SWIG_1) {
  {
    int argvi = 0;
    Euribor10MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Euribor10M();");
    }
    {
      try {
        result = (Euribor10MPtr *)new_Euribor10MPtr__SWIG_0();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Euribor10MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor10M) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Euribor10M__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Euribor10M__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Euribor10M'");
  XSRETURN(0);
}


XS(_wrap_delete_Euribor10M) {
  {
    Euribor10MPtr *arg1 = (Euribor10MPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Euribor10M(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Euribor10MPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Euribor10M" "', argument " "1"" of type '" "Euribor10MPtr *""'"); 
    }
    arg1 = reinterpret_cast< Euribor10MPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor11M__SWIG_0) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Euribor11MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Euribor11M(h);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Euribor11M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Euribor11M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    {
      try {
        result = (Euribor11MPtr *)new_Euribor11MPtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Euribor11MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor11M__SWIG_1) {
  {
    int argvi = 0;
    Euribor11MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Euribor11M();");
    }
    {
      try {
        result = (Euribor11MPtr *)new_Euribor11MPtr__SWIG_0();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Euribor11MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor11M) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Euribor11M__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Euribor11M__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Euribor11M'");
  XSRETURN(0);
}


XS(_wrap_delete_Euribor11M) {
  {
    Euribor11MPtr *arg1 = (Euribor11MPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Euribor11M(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Euribor11MPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Euribor11M" "', argument " "1"" of type '" "Euribor11MPtr *""'"); 
    }
    arg1 = reinterpret_cast< Euribor11MPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor1Y__SWIG_0) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Euribor1YPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Euribor1Y(h);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Euribor1Y" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Euribor1Y" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    {
      try {
        result = (Euribor1YPtr *)new_Euribor1YPtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Euribor1YPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor1Y__SWIG_1) {
  {
    int argvi = 0;
    Euribor1YPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Euribor1Y();");
    }
    {
      try {
        result = (Euribor1YPtr *)new_Euribor1YPtr__SWIG_0();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Euribor1YPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor1Y) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Euribor1Y__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Euribor1Y__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Euribor1Y'");
  XSRETURN(0);
}


XS(_wrap_delete_Euribor1Y) {
  {
    Euribor1YPtr *arg1 = (Euribor1YPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Euribor1Y(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Euribor1YPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Euribor1Y" "', argument " "1"" of type '" "Euribor1YPtr *""'"); 
    }
    arg1 = reinterpret_cast< Euribor1YPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor365__SWIG_0) {
  {
    Period *arg1 = 0 ;
    Handle< YieldTermStructure > *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    Euribor365Ptr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_Euribor365(tenor,h);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Euribor365" "', argument " "1"" of type '" "Period const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Euribor365" "', argument " "1"" of type '" "Period const &""'"); 
    }
    arg1 = reinterpret_cast< Period * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Euribor365" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Euribor365" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< YieldTermStructure > * >(argp2);
    {
      try {
        result = (Euribor365Ptr *)new_Euribor365Ptr__SWIG_0((Period const &)*arg1,(Handle< YieldTermStructure > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Euribor365Ptr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor365__SWIG_1) {
  {
    Period *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Euribor365Ptr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Euribor365(tenor);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Euribor365" "', argument " "1"" of type '" "Period const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Euribor365" "', argument " "1"" of type '" "Period const &""'"); 
    }
    arg1 = reinterpret_cast< Period * >(argp1);
    {
      try {
        result = (Euribor365Ptr *)new_Euribor365Ptr__SWIG_0((Period const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Euribor365Ptr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor365) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Euribor365__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Euribor365__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Euribor365'");
  XSRETURN(0);
}


XS(_wrap_delete_Euribor365) {
  {
    Euribor365Ptr *arg1 = (Euribor365Ptr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Euribor365(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Euribor365Ptr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Euribor365" "', argument " "1"" of type '" "Euribor365Ptr *""'"); 
    }
    arg1 = reinterpret_cast< Euribor365Ptr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor365_SW__SWIG_0) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Euribor365_SWPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Euribor365_SW(h);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Euribor365_SW" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Euribor365_SW" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    {
      try {
        result = (Euribor365_SWPtr *)new_Euribor365_SWPtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Euribor365_SWPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor365_SW__SWIG_1) {
  {
    int argvi = 0;
    Euribor365_SWPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Euribor365_SW();");
    }
    {
      try {
        result = (Euribor365_SWPtr *)new_Euribor365_SWPtr__SWIG_0();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Euribor365_SWPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor365_SW) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Euribor365_SW__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Euribor365_SW__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Euribor365_SW'");
  XSRETURN(0);
}


XS(_wrap_delete_Euribor365_SW) {
  {
    Euribor365_SWPtr *arg1 = (Euribor365_SWPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Euribor365_SW(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Euribor365_SWPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Euribor365_SW" "', argument " "1"" of type '" "Euribor365_SWPtr *""'"); 
    }
    arg1 = reinterpret_cast< Euribor365_SWPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor365_2W__SWIG_0) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Euribor365_2WPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Euribor365_2W(h);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Euribor365_2W" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Euribor365_2W" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    {
      try {
        result = (Euribor365_2WPtr *)new_Euribor365_2WPtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Euribor365_2WPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor365_2W__SWIG_1) {
  {
    int argvi = 0;
    Euribor365_2WPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Euribor365_2W();");
    }
    {
      try {
        result = (Euribor365_2WPtr *)new_Euribor365_2WPtr__SWIG_0();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Euribor365_2WPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor365_2W) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Euribor365_2W__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Euribor365_2W__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Euribor365_2W'");
  XSRETURN(0);
}


XS(_wrap_delete_Euribor365_2W) {
  {
    Euribor365_2WPtr *arg1 = (Euribor365_2WPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Euribor365_2W(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Euribor365_2WPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Euribor365_2W" "', argument " "1"" of type '" "Euribor365_2WPtr *""'"); 
    }
    arg1 = reinterpret_cast< Euribor365_2WPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor365_3W__SWIG_0) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Euribor365_3WPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Euribor365_3W(h);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Euribor365_3W" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Euribor365_3W" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    {
      try {
        result = (Euribor365_3WPtr *)new_Euribor365_3WPtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Euribor365_3WPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor365_3W__SWIG_1) {
  {
    int argvi = 0;
    Euribor365_3WPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Euribor365_3W();");
    }
    {
      try {
        result = (Euribor365_3WPtr *)new_Euribor365_3WPtr__SWIG_0();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Euribor365_3WPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor365_3W) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Euribor365_3W__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Euribor365_3W__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Euribor365_3W'");
  XSRETURN(0);
}


XS(_wrap_delete_Euribor365_3W) {
  {
    Euribor365_3WPtr *arg1 = (Euribor365_3WPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Euribor365_3W(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Euribor365_3WPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Euribor365_3W" "', argument " "1"" of type '" "Euribor365_3WPtr *""'"); 
    }
    arg1 = reinterpret_cast< Euribor365_3WPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor365_1M__SWIG_0) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Euribor365_1MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Euribor365_1M(h);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Euribor365_1M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Euribor365_1M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    {
      try {
        result = (Euribor365_1MPtr *)new_Euribor365_1MPtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Euribor365_1MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor365_1M__SWIG_1) {
  {
    int argvi = 0;
    Euribor365_1MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Euribor365_1M();");
    }
    {
      try {
        result = (Euribor365_1MPtr *)new_Euribor365_1MPtr__SWIG_0();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Euribor365_1MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor365_1M) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Euribor365_1M__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Euribor365_1M__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Euribor365_1M'");
  XSRETURN(0);
}


XS(_wrap_delete_Euribor365_1M) {
  {
    Euribor365_1MPtr *arg1 = (Euribor365_1MPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Euribor365_1M(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Euribor365_1MPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Euribor365_1M" "', argument " "1"" of type '" "Euribor365_1MPtr *""'"); 
    }
    arg1 = reinterpret_cast< Euribor365_1MPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor365_2M__SWIG_0) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Euribor365_2MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Euribor365_2M(h);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Euribor365_2M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Euribor365_2M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    {
      try {
        result = (Euribor365_2MPtr *)new_Euribor365_2MPtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Euribor365_2MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor365_2M__SWIG_1) {
  {
    int argvi = 0;
    Euribor365_2MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Euribor365_2M();");
    }
    {
      try {
        result = (Euribor365_2MPtr *)new_Euribor365_2MPtr__SWIG_0();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Euribor365_2MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor365_2M) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Euribor365_2M__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Euribor365_2M__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Euribor365_2M'");
  XSRETURN(0);
}


XS(_wrap_delete_Euribor365_2M) {
  {
    Euribor365_2MPtr *arg1 = (Euribor365_2MPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Euribor365_2M(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Euribor365_2MPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Euribor365_2M" "', argument " "1"" of type '" "Euribor365_2MPtr *""'"); 
    }
    arg1 = reinterpret_cast< Euribor365_2MPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor365_3M__SWIG_0) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Euribor365_3MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Euribor365_3M(h);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Euribor365_3M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Euribor365_3M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    {
      try {
        result = (Euribor365_3MPtr *)new_Euribor365_3MPtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Euribor365_3MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor365_3M__SWIG_1) {
  {
    int argvi = 0;
    Euribor365_3MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Euribor365_3M();");
    }
    {
      try {
        result = (Euribor365_3MPtr *)new_Euribor365_3MPtr__SWIG_0();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Euribor365_3MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor365_3M) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Euribor365_3M__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Euribor365_3M__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Euribor365_3M'");
  XSRETURN(0);
}


XS(_wrap_delete_Euribor365_3M) {
  {
    Euribor365_3MPtr *arg1 = (Euribor365_3MPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Euribor365_3M(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Euribor365_3MPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Euribor365_3M" "', argument " "1"" of type '" "Euribor365_3MPtr *""'"); 
    }
    arg1 = reinterpret_cast< Euribor365_3MPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor365_4M__SWIG_0) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Euribor365_4MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Euribor365_4M(h);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Euribor365_4M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Euribor365_4M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    {
      try {
        result = (Euribor365_4MPtr *)new_Euribor365_4MPtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Euribor365_4MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor365_4M__SWIG_1) {
  {
    int argvi = 0;
    Euribor365_4MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Euribor365_4M();");
    }
    {
      try {
        result = (Euribor365_4MPtr *)new_Euribor365_4MPtr__SWIG_0();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Euribor365_4MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor365_4M) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Euribor365_4M__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Euribor365_4M__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Euribor365_4M'");
  XSRETURN(0);
}


XS(_wrap_delete_Euribor365_4M) {
  {
    Euribor365_4MPtr *arg1 = (Euribor365_4MPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Euribor365_4M(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Euribor365_4MPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Euribor365_4M" "', argument " "1"" of type '" "Euribor365_4MPtr *""'"); 
    }
    arg1 = reinterpret_cast< Euribor365_4MPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor365_5M__SWIG_0) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Euribor365_5MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Euribor365_5M(h);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Euribor365_5M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Euribor365_5M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    {
      try {
        result = (Euribor365_5MPtr *)new_Euribor365_5MPtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Euribor365_5MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor365_5M__SWIG_1) {
  {
    int argvi = 0;
    Euribor365_5MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Euribor365_5M();");
    }
    {
      try {
        result = (Euribor365_5MPtr *)new_Euribor365_5MPtr__SWIG_0();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Euribor365_5MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor365_5M) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Euribor365_5M__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Euribor365_5M__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Euribor365_5M'");
  XSRETURN(0);
}


XS(_wrap_delete_Euribor365_5M) {
  {
    Euribor365_5MPtr *arg1 = (Euribor365_5MPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Euribor365_5M(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Euribor365_5MPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Euribor365_5M" "', argument " "1"" of type '" "Euribor365_5MPtr *""'"); 
    }
    arg1 = reinterpret_cast< Euribor365_5MPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor365_6M__SWIG_0) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Euribor365_6MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Euribor365_6M(h);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Euribor365_6M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Euribor365_6M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    {
      try {
        result = (Euribor365_6MPtr *)new_Euribor365_6MPtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Euribor365_6MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor365_6M__SWIG_1) {
  {
    int argvi = 0;
    Euribor365_6MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Euribor365_6M();");
    }
    {
      try {
        result = (Euribor365_6MPtr *)new_Euribor365_6MPtr__SWIG_0();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Euribor365_6MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor365_6M) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Euribor365_6M__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Euribor365_6M__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Euribor365_6M'");
  XSRETURN(0);
}


XS(_wrap_delete_Euribor365_6M) {
  {
    Euribor365_6MPtr *arg1 = (Euribor365_6MPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Euribor365_6M(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Euribor365_6MPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Euribor365_6M" "', argument " "1"" of type '" "Euribor365_6MPtr *""'"); 
    }
    arg1 = reinterpret_cast< Euribor365_6MPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor365_7M__SWIG_0) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Euribor365_7MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Euribor365_7M(h);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Euribor365_7M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Euribor365_7M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    {
      try {
        result = (Euribor365_7MPtr *)new_Euribor365_7MPtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Euribor365_7MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor365_7M__SWIG_1) {
  {
    int argvi = 0;
    Euribor365_7MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Euribor365_7M();");
    }
    {
      try {
        result = (Euribor365_7MPtr *)new_Euribor365_7MPtr__SWIG_0();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Euribor365_7MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor365_7M) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Euribor365_7M__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Euribor365_7M__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Euribor365_7M'");
  XSRETURN(0);
}


XS(_wrap_delete_Euribor365_7M) {
  {
    Euribor365_7MPtr *arg1 = (Euribor365_7MPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Euribor365_7M(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Euribor365_7MPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Euribor365_7M" "', argument " "1"" of type '" "Euribor365_7MPtr *""'"); 
    }
    arg1 = reinterpret_cast< Euribor365_7MPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor365_8M__SWIG_0) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Euribor365_8MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Euribor365_8M(h);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Euribor365_8M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Euribor365_8M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    {
      try {
        result = (Euribor365_8MPtr *)new_Euribor365_8MPtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Euribor365_8MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor365_8M__SWIG_1) {
  {
    int argvi = 0;
    Euribor365_8MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Euribor365_8M();");
    }
    {
      try {
        result = (Euribor365_8MPtr *)new_Euribor365_8MPtr__SWIG_0();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Euribor365_8MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor365_8M) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Euribor365_8M__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Euribor365_8M__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Euribor365_8M'");
  XSRETURN(0);
}


XS(_wrap_delete_Euribor365_8M) {
  {
    Euribor365_8MPtr *arg1 = (Euribor365_8MPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Euribor365_8M(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Euribor365_8MPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Euribor365_8M" "', argument " "1"" of type '" "Euribor365_8MPtr *""'"); 
    }
    arg1 = reinterpret_cast< Euribor365_8MPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor365_9M__SWIG_0) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Euribor365_9MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Euribor365_9M(h);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Euribor365_9M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Euribor365_9M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    {
      try {
        result = (Euribor365_9MPtr *)new_Euribor365_9MPtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Euribor365_9MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor365_9M__SWIG_1) {
  {
    int argvi = 0;
    Euribor365_9MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Euribor365_9M();");
    }
    {
      try {
        result = (Euribor365_9MPtr *)new_Euribor365_9MPtr__SWIG_0();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Euribor365_9MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor365_9M) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Euribor365_9M__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Euribor365_9M__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Euribor365_9M'");
  XSRETURN(0);
}


XS(_wrap_delete_Euribor365_9M) {
  {
    Euribor365_9MPtr *arg1 = (Euribor365_9MPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Euribor365_9M(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Euribor365_9MPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Euribor365_9M" "', argument " "1"" of type '" "Euribor365_9MPtr *""'"); 
    }
    arg1 = reinterpret_cast< Euribor365_9MPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor365_10M__SWIG_0) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Euribor365_10MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Euribor365_10M(h);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Euribor365_10M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Euribor365_10M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    {
      try {
        result = (Euribor365_10MPtr *)new_Euribor365_10MPtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Euribor365_10MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor365_10M__SWIG_1) {
  {
    int argvi = 0;
    Euribor365_10MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Euribor365_10M();");
    }
    {
      try {
        result = (Euribor365_10MPtr *)new_Euribor365_10MPtr__SWIG_0();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Euribor365_10MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor365_10M) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Euribor365_10M__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Euribor365_10M__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Euribor365_10M'");
  XSRETURN(0);
}


XS(_wrap_delete_Euribor365_10M) {
  {
    Euribor365_10MPtr *arg1 = (Euribor365_10MPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Euribor365_10M(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Euribor365_10MPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Euribor365_10M" "', argument " "1"" of type '" "Euribor365_10MPtr *""'"); 
    }
    arg1 = reinterpret_cast< Euribor365_10MPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor365_11M__SWIG_0) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Euribor365_11MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Euribor365_11M(h);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Euribor365_11M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Euribor365_11M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    {
      try {
        result = (Euribor365_11MPtr *)new_Euribor365_11MPtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Euribor365_11MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor365_11M__SWIG_1) {
  {
    int argvi = 0;
    Euribor365_11MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Euribor365_11M();");
    }
    {
      try {
        result = (Euribor365_11MPtr *)new_Euribor365_11MPtr__SWIG_0();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Euribor365_11MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor365_11M) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Euribor365_11M__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Euribor365_11M__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Euribor365_11M'");
  XSRETURN(0);
}


XS(_wrap_delete_Euribor365_11M) {
  {
    Euribor365_11MPtr *arg1 = (Euribor365_11MPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Euribor365_11M(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Euribor365_11MPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Euribor365_11M" "', argument " "1"" of type '" "Euribor365_11MPtr *""'"); 
    }
    arg1 = reinterpret_cast< Euribor365_11MPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor365_1Y__SWIG_0) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Euribor365_1YPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Euribor365_1Y(h);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Euribor365_1Y" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Euribor365_1Y" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    {
      try {
        result = (Euribor365_1YPtr *)new_Euribor365_1YPtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Euribor365_1YPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor365_1Y__SWIG_1) {
  {
    int argvi = 0;
    Euribor365_1YPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Euribor365_1Y();");
    }
    {
      try {
        result = (Euribor365_1YPtr *)new_Euribor365_1YPtr__SWIG_0();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Euribor365_1YPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_Euribor365_1Y) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Euribor365_1Y__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Euribor365_1Y__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Euribor365_1Y'");
  XSRETURN(0);
}


XS(_wrap_delete_Euribor365_1Y) {
  {
    Euribor365_1YPtr *arg1 = (Euribor365_1YPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Euribor365_1Y(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Euribor365_1YPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Euribor365_1Y" "', argument " "1"" of type '" "Euribor365_1YPtr *""'"); 
    }
    arg1 = reinterpret_cast< Euribor365_1YPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_EURLibor__SWIG_0) {
  {
    Period *arg1 = 0 ;
    Handle< YieldTermStructure > *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    EURLiborPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_EURLibor(tenor,h);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_EURLibor" "', argument " "1"" of type '" "Period const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EURLibor" "', argument " "1"" of type '" "Period const &""'"); 
    }
    arg1 = reinterpret_cast< Period * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_EURLibor" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EURLibor" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< YieldTermStructure > * >(argp2);
    {
      try {
        result = (EURLiborPtr *)new_EURLiborPtr__SWIG_0((Period const &)*arg1,(Handle< YieldTermStructure > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EURLiborPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_EURLibor__SWIG_1) {
  {
    Period *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    EURLiborPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_EURLibor(tenor);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_EURLibor" "', argument " "1"" of type '" "Period const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EURLibor" "', argument " "1"" of type '" "Period const &""'"); 
    }
    arg1 = reinterpret_cast< Period * >(argp1);
    {
      try {
        result = (EURLiborPtr *)new_EURLiborPtr__SWIG_0((Period const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EURLiborPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_EURLibor) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_EURLibor__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_EURLibor__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_EURLibor'");
  XSRETURN(0);
}


XS(_wrap_delete_EURLibor) {
  {
    EURLiborPtr *arg1 = (EURLiborPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_EURLibor(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_EURLiborPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_EURLibor" "', argument " "1"" of type '" "EURLiborPtr *""'"); 
    }
    arg1 = reinterpret_cast< EURLiborPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_EURLiborSW__SWIG_0) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    EURLiborSWPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_EURLiborSW(h);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_EURLiborSW" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EURLiborSW" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    {
      try {
        result = (EURLiborSWPtr *)new_EURLiborSWPtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EURLiborSWPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_EURLiborSW__SWIG_1) {
  {
    int argvi = 0;
    EURLiborSWPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_EURLiborSW();");
    }
    {
      try {
        result = (EURLiborSWPtr *)new_EURLiborSWPtr__SWIG_0();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EURLiborSWPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_EURLiborSW) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_EURLiborSW__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_EURLiborSW__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_EURLiborSW'");
  XSRETURN(0);
}


XS(_wrap_delete_EURLiborSW) {
  {
    EURLiborSWPtr *arg1 = (EURLiborSWPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_EURLiborSW(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_EURLiborSWPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_EURLiborSW" "', argument " "1"" of type '" "EURLiborSWPtr *""'"); 
    }
    arg1 = reinterpret_cast< EURLiborSWPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_EURLibor2W__SWIG_0) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    EURLibor2WPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_EURLibor2W(h);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_EURLibor2W" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EURLibor2W" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    {
      try {
        result = (EURLibor2WPtr *)new_EURLibor2WPtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EURLibor2WPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_EURLibor2W__SWIG_1) {
  {
    int argvi = 0;
    EURLibor2WPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_EURLibor2W();");
    }
    {
      try {
        result = (EURLibor2WPtr *)new_EURLibor2WPtr__SWIG_0();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EURLibor2WPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_EURLibor2W) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_EURLibor2W__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_EURLibor2W__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_EURLibor2W'");
  XSRETURN(0);
}


XS(_wrap_delete_EURLibor2W) {
  {
    EURLibor2WPtr *arg1 = (EURLibor2WPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_EURLibor2W(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_EURLibor2WPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_EURLibor2W" "', argument " "1"" of type '" "EURLibor2WPtr *""'"); 
    }
    arg1 = reinterpret_cast< EURLibor2WPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_EURLibor1M__SWIG_0) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    EURLibor1MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_EURLibor1M(h);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_EURLibor1M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EURLibor1M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    {
      try {
        result = (EURLibor1MPtr *)new_EURLibor1MPtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EURLibor1MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_EURLibor1M__SWIG_1) {
  {
    int argvi = 0;
    EURLibor1MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_EURLibor1M();");
    }
    {
      try {
        result = (EURLibor1MPtr *)new_EURLibor1MPtr__SWIG_0();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EURLibor1MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_EURLibor1M) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_EURLibor1M__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_EURLibor1M__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_EURLibor1M'");
  XSRETURN(0);
}


XS(_wrap_delete_EURLibor1M) {
  {
    EURLibor1MPtr *arg1 = (EURLibor1MPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_EURLibor1M(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_EURLibor1MPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_EURLibor1M" "', argument " "1"" of type '" "EURLibor1MPtr *""'"); 
    }
    arg1 = reinterpret_cast< EURLibor1MPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_EURLibor2M__SWIG_0) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    EURLibor2MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_EURLibor2M(h);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_EURLibor2M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EURLibor2M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    {
      try {
        result = (EURLibor2MPtr *)new_EURLibor2MPtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EURLibor2MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_EURLibor2M__SWIG_1) {
  {
    int argvi = 0;
    EURLibor2MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_EURLibor2M();");
    }
    {
      try {
        result = (EURLibor2MPtr *)new_EURLibor2MPtr__SWIG_0();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EURLibor2MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_EURLibor2M) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_EURLibor2M__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_EURLibor2M__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_EURLibor2M'");
  XSRETURN(0);
}


XS(_wrap_delete_EURLibor2M) {
  {
    EURLibor2MPtr *arg1 = (EURLibor2MPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_EURLibor2M(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_EURLibor2MPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_EURLibor2M" "', argument " "1"" of type '" "EURLibor2MPtr *""'"); 
    }
    arg1 = reinterpret_cast< EURLibor2MPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_EURLibor3M__SWIG_0) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    EURLibor3MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_EURLibor3M(h);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_EURLibor3M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EURLibor3M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    {
      try {
        result = (EURLibor3MPtr *)new_EURLibor3MPtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EURLibor3MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_EURLibor3M__SWIG_1) {
  {
    int argvi = 0;
    EURLibor3MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_EURLibor3M();");
    }
    {
      try {
        result = (EURLibor3MPtr *)new_EURLibor3MPtr__SWIG_0();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EURLibor3MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_EURLibor3M) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_EURLibor3M__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_EURLibor3M__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_EURLibor3M'");
  XSRETURN(0);
}


XS(_wrap_delete_EURLibor3M) {
  {
    EURLibor3MPtr *arg1 = (EURLibor3MPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_EURLibor3M(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_EURLibor3MPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_EURLibor3M" "', argument " "1"" of type '" "EURLibor3MPtr *""'"); 
    }
    arg1 = reinterpret_cast< EURLibor3MPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_EURLibor4M__SWIG_0) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    EURLibor4MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_EURLibor4M(h);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_EURLibor4M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EURLibor4M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    {
      try {
        result = (EURLibor4MPtr *)new_EURLibor4MPtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EURLibor4MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_EURLibor4M__SWIG_1) {
  {
    int argvi = 0;
    EURLibor4MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_EURLibor4M();");
    }
    {
      try {
        result = (EURLibor4MPtr *)new_EURLibor4MPtr__SWIG_0();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EURLibor4MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_EURLibor4M) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_EURLibor4M__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_EURLibor4M__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_EURLibor4M'");
  XSRETURN(0);
}


XS(_wrap_delete_EURLibor4M) {
  {
    EURLibor4MPtr *arg1 = (EURLibor4MPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_EURLibor4M(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_EURLibor4MPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_EURLibor4M" "', argument " "1"" of type '" "EURLibor4MPtr *""'"); 
    }
    arg1 = reinterpret_cast< EURLibor4MPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_EURLibor5M__SWIG_0) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    EURLibor5MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_EURLibor5M(h);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_EURLibor5M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EURLibor5M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    {
      try {
        result = (EURLibor5MPtr *)new_EURLibor5MPtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EURLibor5MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_EURLibor5M__SWIG_1) {
  {
    int argvi = 0;
    EURLibor5MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_EURLibor5M();");
    }
    {
      try {
        result = (EURLibor5MPtr *)new_EURLibor5MPtr__SWIG_0();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EURLibor5MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_EURLibor5M) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_EURLibor5M__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_EURLibor5M__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_EURLibor5M'");
  XSRETURN(0);
}


XS(_wrap_delete_EURLibor5M) {
  {
    EURLibor5MPtr *arg1 = (EURLibor5MPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_EURLibor5M(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_EURLibor5MPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_EURLibor5M" "', argument " "1"" of type '" "EURLibor5MPtr *""'"); 
    }
    arg1 = reinterpret_cast< EURLibor5MPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_EURLibor6M__SWIG_0) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    EURLibor6MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_EURLibor6M(h);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_EURLibor6M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EURLibor6M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    {
      try {
        result = (EURLibor6MPtr *)new_EURLibor6MPtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EURLibor6MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_EURLibor6M__SWIG_1) {
  {
    int argvi = 0;
    EURLibor6MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_EURLibor6M();");
    }
    {
      try {
        result = (EURLibor6MPtr *)new_EURLibor6MPtr__SWIG_0();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EURLibor6MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_EURLibor6M) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_EURLibor6M__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_EURLibor6M__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_EURLibor6M'");
  XSRETURN(0);
}


XS(_wrap_delete_EURLibor6M) {
  {
    EURLibor6MPtr *arg1 = (EURLibor6MPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_EURLibor6M(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_EURLibor6MPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_EURLibor6M" "', argument " "1"" of type '" "EURLibor6MPtr *""'"); 
    }
    arg1 = reinterpret_cast< EURLibor6MPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_EURLibor7M__SWIG_0) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    EURLibor7MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_EURLibor7M(h);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_EURLibor7M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EURLibor7M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    {
      try {
        result = (EURLibor7MPtr *)new_EURLibor7MPtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EURLibor7MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_EURLibor7M__SWIG_1) {
  {
    int argvi = 0;
    EURLibor7MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_EURLibor7M();");
    }
    {
      try {
        result = (EURLibor7MPtr *)new_EURLibor7MPtr__SWIG_0();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EURLibor7MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_EURLibor7M) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_EURLibor7M__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_EURLibor7M__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_EURLibor7M'");
  XSRETURN(0);
}


XS(_wrap_delete_EURLibor7M) {
  {
    EURLibor7MPtr *arg1 = (EURLibor7MPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_EURLibor7M(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_EURLibor7MPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_EURLibor7M" "', argument " "1"" of type '" "EURLibor7MPtr *""'"); 
    }
    arg1 = reinterpret_cast< EURLibor7MPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_EURLibor8M__SWIG_0) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    EURLibor8MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_EURLibor8M(h);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_EURLibor8M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EURLibor8M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    {
      try {
        result = (EURLibor8MPtr *)new_EURLibor8MPtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EURLibor8MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_EURLibor8M__SWIG_1) {
  {
    int argvi = 0;
    EURLibor8MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_EURLibor8M();");
    }
    {
      try {
        result = (EURLibor8MPtr *)new_EURLibor8MPtr__SWIG_0();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EURLibor8MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_EURLibor8M) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_EURLibor8M__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_EURLibor8M__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_EURLibor8M'");
  XSRETURN(0);
}


XS(_wrap_delete_EURLibor8M) {
  {
    EURLibor8MPtr *arg1 = (EURLibor8MPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_EURLibor8M(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_EURLibor8MPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_EURLibor8M" "', argument " "1"" of type '" "EURLibor8MPtr *""'"); 
    }
    arg1 = reinterpret_cast< EURLibor8MPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_EURLibor9M__SWIG_0) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    EURLibor9MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_EURLibor9M(h);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_EURLibor9M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EURLibor9M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    {
      try {
        result = (EURLibor9MPtr *)new_EURLibor9MPtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EURLibor9MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_EURLibor9M__SWIG_1) {
  {
    int argvi = 0;
    EURLibor9MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_EURLibor9M();");
    }
    {
      try {
        result = (EURLibor9MPtr *)new_EURLibor9MPtr__SWIG_0();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EURLibor9MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_EURLibor9M) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_EURLibor9M__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_EURLibor9M__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_EURLibor9M'");
  XSRETURN(0);
}


XS(_wrap_delete_EURLibor9M) {
  {
    EURLibor9MPtr *arg1 = (EURLibor9MPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_EURLibor9M(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_EURLibor9MPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_EURLibor9M" "', argument " "1"" of type '" "EURLibor9MPtr *""'"); 
    }
    arg1 = reinterpret_cast< EURLibor9MPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_EURLibor10M__SWIG_0) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    EURLibor10MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_EURLibor10M(h);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_EURLibor10M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EURLibor10M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    {
      try {
        result = (EURLibor10MPtr *)new_EURLibor10MPtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EURLibor10MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_EURLibor10M__SWIG_1) {
  {
    int argvi = 0;
    EURLibor10MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_EURLibor10M();");
    }
    {
      try {
        result = (EURLibor10MPtr *)new_EURLibor10MPtr__SWIG_0();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EURLibor10MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_EURLibor10M) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_EURLibor10M__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_EURLibor10M__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_EURLibor10M'");
  XSRETURN(0);
}


XS(_wrap_delete_EURLibor10M) {
  {
    EURLibor10MPtr *arg1 = (EURLibor10MPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_EURLibor10M(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_EURLibor10MPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_EURLibor10M" "', argument " "1"" of type '" "EURLibor10MPtr *""'"); 
    }
    arg1 = reinterpret_cast< EURLibor10MPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_EURLibor11M__SWIG_0) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    EURLibor11MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_EURLibor11M(h);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_EURLibor11M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EURLibor11M" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    {
      try {
        result = (EURLibor11MPtr *)new_EURLibor11MPtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EURLibor11MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_EURLibor11M__SWIG_1) {
  {
    int argvi = 0;
    EURLibor11MPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_EURLibor11M();");
    }
    {
      try {
        result = (EURLibor11MPtr *)new_EURLibor11MPtr__SWIG_0();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EURLibor11MPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_EURLibor11M) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_EURLibor11M__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_EURLibor11M__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_EURLibor11M'");
  XSRETURN(0);
}


XS(_wrap_delete_EURLibor11M) {
  {
    EURLibor11MPtr *arg1 = (EURLibor11MPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_EURLibor11M(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_EURLibor11MPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_EURLibor11M" "', argument " "1"" of type '" "EURLibor11MPtr *""'"); 
    }
    arg1 = reinterpret_cast< EURLibor11MPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_EURLibor1Y__SWIG_0) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    EURLibor1YPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_EURLibor1Y(h);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_EURLibor1Y" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EURLibor1Y" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    {
      try {
        result = (EURLibor1YPtr *)new_EURLibor1YPtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EURLibor1YPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_EURLibor1Y__SWIG_1) {
  {
    int argvi = 0;
    EURLibor1YPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_EURLibor1Y();");
    }
    {
      try {
        result = (EURLibor1YPtr *)new_EURLibor1YPtr__SWIG_0();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EURLibor1YPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_EURLibor1Y) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_EURLibor1Y__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_EURLibor1Y__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_EURLibor1Y'");
  XSRETURN(0);
}


XS(_wrap_delete_EURLibor1Y) {
  {
    EURLibor1YPtr *arg1 = (EURLibor1YPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_EURLibor1Y(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_EURLibor1YPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_EURLibor1Y" "', argument " "1"" of type '" "EURLibor1YPtr *""'"); 
    }
    arg1 = reinterpret_cast< EURLibor1YPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_GBPLibor__SWIG_0) {
  {
    Period *arg1 = 0 ;
    Handle< YieldTermStructure > *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    GBPLiborPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_GBPLibor(tenor,h);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_GBPLibor" "', argument " "1"" of type '" "Period const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GBPLibor" "', argument " "1"" of type '" "Period const &""'"); 
    }
    arg1 = reinterpret_cast< Period * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_GBPLibor" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GBPLibor" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< YieldTermStructure > * >(argp2);
    {
      try {
        result = (GBPLiborPtr *)new_GBPLiborPtr__SWIG_0((Period const &)*arg1,(Handle< YieldTermStructure > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GBPLiborPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_GBPLibor__SWIG_1) {
  {
    Period *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    GBPLiborPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_GBPLibor(tenor);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_GBPLibor" "', argument " "1"" of type '" "Period const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GBPLibor" "', argument " "1"" of type '" "Period const &""'"); 
    }
    arg1 = reinterpret_cast< Period * >(argp1);
    {
      try {
        result = (GBPLiborPtr *)new_GBPLiborPtr__SWIG_0((Period const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GBPLiborPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_GBPLibor) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_GBPLibor__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_GBPLibor__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_GBPLibor'");
  XSRETURN(0);
}


XS(_wrap_delete_GBPLibor) {
  {
    GBPLiborPtr *arg1 = (GBPLiborPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_GBPLibor(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GBPLiborPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GBPLibor" "', argument " "1"" of type '" "GBPLiborPtr *""'"); 
    }
    arg1 = reinterpret_cast< GBPLiborPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Jibar__SWIG_0) {
  {
    Period *arg1 = 0 ;
    Handle< YieldTermStructure > *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    JibarPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_Jibar(tenor,h);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Jibar" "', argument " "1"" of type '" "Period const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Jibar" "', argument " "1"" of type '" "Period const &""'"); 
    }
    arg1 = reinterpret_cast< Period * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Jibar" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Jibar" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< YieldTermStructure > * >(argp2);
    {
      try {
        result = (JibarPtr *)new_JibarPtr__SWIG_0((Period const &)*arg1,(Handle< YieldTermStructure > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_JibarPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Jibar__SWIG_1) {
  {
    Period *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    JibarPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Jibar(tenor);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Jibar" "', argument " "1"" of type '" "Period const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Jibar" "', argument " "1"" of type '" "Period const &""'"); 
    }
    arg1 = reinterpret_cast< Period * >(argp1);
    {
      try {
        result = (JibarPtr *)new_JibarPtr__SWIG_0((Period const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_JibarPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Jibar) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Jibar__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Jibar__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Jibar'");
  XSRETURN(0);
}


XS(_wrap_delete_Jibar) {
  {
    JibarPtr *arg1 = (JibarPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Jibar(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_JibarPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Jibar" "', argument " "1"" of type '" "JibarPtr *""'"); 
    }
    arg1 = reinterpret_cast< JibarPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_JPYLibor__SWIG_0) {
  {
    Period *arg1 = 0 ;
    Handle< YieldTermStructure > *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    JPYLiborPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_JPYLibor(tenor,h);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_JPYLibor" "', argument " "1"" of type '" "Period const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_JPYLibor" "', argument " "1"" of type '" "Period const &""'"); 
    }
    arg1 = reinterpret_cast< Period * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_JPYLibor" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_JPYLibor" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< YieldTermStructure > * >(argp2);
    {
      try {
        result = (JPYLiborPtr *)new_JPYLiborPtr__SWIG_0((Period const &)*arg1,(Handle< YieldTermStructure > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_JPYLiborPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_JPYLibor__SWIG_1) {
  {
    Period *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    JPYLiborPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_JPYLibor(tenor);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_JPYLibor" "', argument " "1"" of type '" "Period const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_JPYLibor" "', argument " "1"" of type '" "Period const &""'"); 
    }
    arg1 = reinterpret_cast< Period * >(argp1);
    {
      try {
        result = (JPYLiborPtr *)new_JPYLiborPtr__SWIG_0((Period const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_JPYLiborPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_JPYLibor) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_JPYLibor__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_JPYLibor__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_JPYLibor'");
  XSRETURN(0);
}


XS(_wrap_delete_JPYLibor) {
  {
    JPYLiborPtr *arg1 = (JPYLiborPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_JPYLibor(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_JPYLiborPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_JPYLibor" "', argument " "1"" of type '" "JPYLiborPtr *""'"); 
    }
    arg1 = reinterpret_cast< JPYLiborPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_NZDLibor__SWIG_0) {
  {
    Period *arg1 = 0 ;
    Handle< YieldTermStructure > *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    NZDLiborPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_NZDLibor(tenor,h);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_NZDLibor" "', argument " "1"" of type '" "Period const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NZDLibor" "', argument " "1"" of type '" "Period const &""'"); 
    }
    arg1 = reinterpret_cast< Period * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_NZDLibor" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NZDLibor" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< YieldTermStructure > * >(argp2);
    {
      try {
        result = (NZDLiborPtr *)new_NZDLiborPtr__SWIG_0((Period const &)*arg1,(Handle< YieldTermStructure > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_NZDLiborPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_NZDLibor__SWIG_1) {
  {
    Period *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    NZDLiborPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_NZDLibor(tenor);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_NZDLibor" "', argument " "1"" of type '" "Period const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NZDLibor" "', argument " "1"" of type '" "Period const &""'"); 
    }
    arg1 = reinterpret_cast< Period * >(argp1);
    {
      try {
        result = (NZDLiborPtr *)new_NZDLiborPtr__SWIG_0((Period const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_NZDLiborPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_NZDLibor) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_NZDLibor__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_NZDLibor__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_NZDLibor'");
  XSRETURN(0);
}


XS(_wrap_delete_NZDLibor) {
  {
    NZDLiborPtr *arg1 = (NZDLiborPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_NZDLibor(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_NZDLiborPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_NZDLibor" "', argument " "1"" of type '" "NZDLiborPtr *""'"); 
    }
    arg1 = reinterpret_cast< NZDLiborPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SEKLibor__SWIG_0) {
  {
    Period *arg1 = 0 ;
    Handle< YieldTermStructure > *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    SEKLiborPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_SEKLibor(tenor,h);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SEKLibor" "', argument " "1"" of type '" "Period const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SEKLibor" "', argument " "1"" of type '" "Period const &""'"); 
    }
    arg1 = reinterpret_cast< Period * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SEKLibor" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SEKLibor" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< YieldTermStructure > * >(argp2);
    {
      try {
        result = (SEKLiborPtr *)new_SEKLiborPtr__SWIG_0((Period const &)*arg1,(Handle< YieldTermStructure > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SEKLiborPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SEKLibor__SWIG_1) {
  {
    Period *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    SEKLiborPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_SEKLibor(tenor);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SEKLibor" "', argument " "1"" of type '" "Period const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SEKLibor" "', argument " "1"" of type '" "Period const &""'"); 
    }
    arg1 = reinterpret_cast< Period * >(argp1);
    {
      try {
        result = (SEKLiborPtr *)new_SEKLiborPtr__SWIG_0((Period const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SEKLiborPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SEKLibor) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SEKLibor__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SEKLibor__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_SEKLibor'");
  XSRETURN(0);
}


XS(_wrap_delete_SEKLibor) {
  {
    SEKLiborPtr *arg1 = (SEKLiborPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_SEKLibor(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SEKLiborPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SEKLibor" "', argument " "1"" of type '" "SEKLiborPtr *""'"); 
    }
    arg1 = reinterpret_cast< SEKLiborPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Tibor__SWIG_0) {
  {
    Period *arg1 = 0 ;
    Handle< YieldTermStructure > *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    TiborPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_Tibor(tenor,h);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Tibor" "', argument " "1"" of type '" "Period const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Tibor" "', argument " "1"" of type '" "Period const &""'"); 
    }
    arg1 = reinterpret_cast< Period * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Tibor" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Tibor" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< YieldTermStructure > * >(argp2);
    {
      try {
        result = (TiborPtr *)new_TiborPtr__SWIG_0((Period const &)*arg1,(Handle< YieldTermStructure > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TiborPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Tibor__SWIG_1) {
  {
    Period *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    TiborPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Tibor(tenor);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Tibor" "', argument " "1"" of type '" "Period const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Tibor" "', argument " "1"" of type '" "Period const &""'"); 
    }
    arg1 = reinterpret_cast< Period * >(argp1);
    {
      try {
        result = (TiborPtr *)new_TiborPtr__SWIG_0((Period const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TiborPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Tibor) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Tibor__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Tibor__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Tibor'");
  XSRETURN(0);
}


XS(_wrap_delete_Tibor) {
  {
    TiborPtr *arg1 = (TiborPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Tibor(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_TiborPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Tibor" "', argument " "1"" of type '" "TiborPtr *""'"); 
    }
    arg1 = reinterpret_cast< TiborPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_TRLibor__SWIG_0) {
  {
    Period *arg1 = 0 ;
    Handle< YieldTermStructure > *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    TRLiborPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_TRLibor(tenor,h);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_TRLibor" "', argument " "1"" of type '" "Period const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_TRLibor" "', argument " "1"" of type '" "Period const &""'"); 
    }
    arg1 = reinterpret_cast< Period * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_TRLibor" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_TRLibor" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< YieldTermStructure > * >(argp2);
    {
      try {
        result = (TRLiborPtr *)new_TRLiborPtr__SWIG_0((Period const &)*arg1,(Handle< YieldTermStructure > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TRLiborPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_TRLibor__SWIG_1) {
  {
    Period *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    TRLiborPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_TRLibor(tenor);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_TRLibor" "', argument " "1"" of type '" "Period const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_TRLibor" "', argument " "1"" of type '" "Period const &""'"); 
    }
    arg1 = reinterpret_cast< Period * >(argp1);
    {
      try {
        result = (TRLiborPtr *)new_TRLiborPtr__SWIG_0((Period const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TRLiborPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_TRLibor) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_TRLibor__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_TRLibor__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_TRLibor'");
  XSRETURN(0);
}


XS(_wrap_delete_TRLibor) {
  {
    TRLiborPtr *arg1 = (TRLiborPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_TRLibor(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_TRLiborPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_TRLibor" "', argument " "1"" of type '" "TRLiborPtr *""'"); 
    }
    arg1 = reinterpret_cast< TRLiborPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_USDLibor__SWIG_0) {
  {
    Period *arg1 = 0 ;
    Handle< YieldTermStructure > *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    USDLiborPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_USDLibor(tenor,h);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_USDLibor" "', argument " "1"" of type '" "Period const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_USDLibor" "', argument " "1"" of type '" "Period const &""'"); 
    }
    arg1 = reinterpret_cast< Period * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_USDLibor" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_USDLibor" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< YieldTermStructure > * >(argp2);
    {
      try {
        result = (USDLiborPtr *)new_USDLiborPtr__SWIG_0((Period const &)*arg1,(Handle< YieldTermStructure > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_USDLiborPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_USDLibor__SWIG_1) {
  {
    Period *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    USDLiborPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_USDLibor(tenor);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_USDLibor" "', argument " "1"" of type '" "Period const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_USDLibor" "', argument " "1"" of type '" "Period const &""'"); 
    }
    arg1 = reinterpret_cast< Period * >(argp1);
    {
      try {
        result = (USDLiborPtr *)new_USDLiborPtr__SWIG_0((Period const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_USDLiborPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_USDLibor) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_USDLibor__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_USDLibor__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_USDLibor'");
  XSRETURN(0);
}


XS(_wrap_delete_USDLibor) {
  {
    USDLiborPtr *arg1 = (USDLiborPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_USDLibor(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_USDLiborPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_USDLibor" "', argument " "1"" of type '" "USDLiborPtr *""'"); 
    }
    arg1 = reinterpret_cast< USDLiborPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Zibor__SWIG_0) {
  {
    Period *arg1 = 0 ;
    Handle< YieldTermStructure > *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    ZiborPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_Zibor(tenor,h);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Zibor" "', argument " "1"" of type '" "Period const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Zibor" "', argument " "1"" of type '" "Period const &""'"); 
    }
    arg1 = reinterpret_cast< Period * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Zibor" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Zibor" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< YieldTermStructure > * >(argp2);
    {
      try {
        result = (ZiborPtr *)new_ZiborPtr__SWIG_0((Period const &)*arg1,(Handle< YieldTermStructure > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ZiborPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Zibor__SWIG_1) {
  {
    Period *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    ZiborPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Zibor(tenor);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Zibor" "', argument " "1"" of type '" "Period const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Zibor" "', argument " "1"" of type '" "Period const &""'"); 
    }
    arg1 = reinterpret_cast< Period * >(argp1);
    {
      try {
        result = (ZiborPtr *)new_ZiborPtr__SWIG_0((Period const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ZiborPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Zibor) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Zibor__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Zibor__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Zibor'");
  XSRETURN(0);
}


XS(_wrap_delete_Zibor) {
  {
    ZiborPtr *arg1 = (ZiborPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Zibor(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ZiborPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Zibor" "', argument " "1"" of type '" "ZiborPtr *""'"); 
    }
    arg1 = reinterpret_cast< ZiborPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Aonia__SWIG_0) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    AoniaPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Aonia(h);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Aonia" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Aonia" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    {
      try {
        result = (AoniaPtr *)new_AoniaPtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_AoniaPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Aonia__SWIG_1) {
  {
    int argvi = 0;
    AoniaPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Aonia();");
    }
    {
      try {
        result = (AoniaPtr *)new_AoniaPtr__SWIG_0();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_AoniaPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_Aonia) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Aonia__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Aonia__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Aonia'");
  XSRETURN(0);
}


XS(_wrap_delete_Aonia) {
  {
    AoniaPtr *arg1 = (AoniaPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Aonia(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_AoniaPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Aonia" "', argument " "1"" of type '" "AoniaPtr *""'"); 
    }
    arg1 = reinterpret_cast< AoniaPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Eonia__SWIG_0) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    EoniaPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Eonia(h);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Eonia" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Eonia" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    {
      try {
        result = (EoniaPtr *)new_EoniaPtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EoniaPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Eonia__SWIG_1) {
  {
    int argvi = 0;
    EoniaPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Eonia();");
    }
    {
      try {
        result = (EoniaPtr *)new_EoniaPtr__SWIG_0();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EoniaPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_Eonia) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Eonia__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Eonia__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Eonia'");
  XSRETURN(0);
}


XS(_wrap_delete_Eonia) {
  {
    EoniaPtr *arg1 = (EoniaPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Eonia(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_EoniaPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Eonia" "', argument " "1"" of type '" "EoniaPtr *""'"); 
    }
    arg1 = reinterpret_cast< EoniaPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Sonia__SWIG_0) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    SoniaPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Sonia(h);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Sonia" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Sonia" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    {
      try {
        result = (SoniaPtr *)new_SoniaPtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SoniaPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Sonia__SWIG_1) {
  {
    int argvi = 0;
    SoniaPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Sonia();");
    }
    {
      try {
        result = (SoniaPtr *)new_SoniaPtr__SWIG_0();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SoniaPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_Sonia) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Sonia__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Sonia__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Sonia'");
  XSRETURN(0);
}


XS(_wrap_delete_Sonia) {
  {
    SoniaPtr *arg1 = (SoniaPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Sonia(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SoniaPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Sonia" "', argument " "1"" of type '" "SoniaPtr *""'"); 
    }
    arg1 = reinterpret_cast< SoniaPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FedFunds__SWIG_0) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    FedFundsPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_FedFunds(h);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FedFunds" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FedFunds" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    {
      try {
        result = (FedFundsPtr *)new_FedFundsPtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FedFundsPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FedFunds__SWIG_1) {
  {
    int argvi = 0;
    FedFundsPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_FedFunds();");
    }
    {
      try {
        result = (FedFundsPtr *)new_FedFundsPtr__SWIG_0();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FedFundsPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_FedFunds) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FedFunds__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FedFunds__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_FedFunds'");
  XSRETURN(0);
}


XS(_wrap_delete_FedFunds) {
  {
    FedFundsPtr *arg1 = (FedFundsPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_FedFunds(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_FedFundsPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FedFunds" "', argument " "1"" of type '" "FedFundsPtr *""'"); 
    }
    arg1 = reinterpret_cast< FedFundsPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Nzocr__SWIG_0) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    NzocrPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Nzocr(h);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Nzocr" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Nzocr" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    {
      try {
        result = (NzocrPtr *)new_NzocrPtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_NzocrPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Nzocr__SWIG_1) {
  {
    int argvi = 0;
    NzocrPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Nzocr();");
    }
    {
      try {
        result = (NzocrPtr *)new_NzocrPtr__SWIG_0();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_NzocrPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_Nzocr) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Nzocr__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Nzocr__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Nzocr'");
  XSRETURN(0);
}


XS(_wrap_delete_Nzocr) {
  {
    NzocrPtr *arg1 = (NzocrPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Nzocr(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_NzocrPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Nzocr" "', argument " "1"" of type '" "NzocrPtr *""'"); 
    }
    arg1 = reinterpret_cast< NzocrPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_EuriborSwapIsdaFixA__SWIG_0) {
  {
    Period *arg1 = 0 ;
    Handle< YieldTermStructure > *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    EuriborSwapIsdaFixAPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_EuriborSwapIsdaFixA(tenor,h);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_EuriborSwapIsdaFixA" "', argument " "1"" of type '" "Period const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EuriborSwapIsdaFixA" "', argument " "1"" of type '" "Period const &""'"); 
    }
    arg1 = reinterpret_cast< Period * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_EuriborSwapIsdaFixA" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EuriborSwapIsdaFixA" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< YieldTermStructure > * >(argp2);
    {
      try {
        result = (EuriborSwapIsdaFixAPtr *)new_EuriborSwapIsdaFixAPtr__SWIG_0((Period const &)*arg1,(Handle< YieldTermStructure > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EuriborSwapIsdaFixAPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_EuriborSwapIsdaFixA__SWIG_1) {
  {
    Period *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    EuriborSwapIsdaFixAPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_EuriborSwapIsdaFixA(tenor);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_EuriborSwapIsdaFixA" "', argument " "1"" of type '" "Period const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EuriborSwapIsdaFixA" "', argument " "1"" of type '" "Period const &""'"); 
    }
    arg1 = reinterpret_cast< Period * >(argp1);
    {
      try {
        result = (EuriborSwapIsdaFixAPtr *)new_EuriborSwapIsdaFixAPtr__SWIG_0((Period const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EuriborSwapIsdaFixAPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_EuriborSwapIsdaFixA__SWIG_2) {
  {
    Period *arg1 = 0 ;
    Handle< YieldTermStructure > *arg2 = 0 ;
    Handle< YieldTermStructure > *arg3 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    EuriborSwapIsdaFixAPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_EuriborSwapIsdaFixA(tenor,h1,h2);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_EuriborSwapIsdaFixA" "', argument " "1"" of type '" "Period const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EuriborSwapIsdaFixA" "', argument " "1"" of type '" "Period const &""'"); 
    }
    arg1 = reinterpret_cast< Period * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_EuriborSwapIsdaFixA" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EuriborSwapIsdaFixA" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< YieldTermStructure > * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_EuriborSwapIsdaFixA" "', argument " "3"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EuriborSwapIsdaFixA" "', argument " "3"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< YieldTermStructure > * >(argp3);
    {
      try {
        result = (EuriborSwapIsdaFixAPtr *)new_EuriborSwapIsdaFixAPtr__SWIG_2((Period const &)*arg1,(Handle< YieldTermStructure > const &)*arg2,(Handle< YieldTermStructure > const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EuriborSwapIsdaFixAPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_EuriborSwapIsdaFixA) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_EuriborSwapIsdaFixA__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_EuriborSwapIsdaFixA__SWIG_0); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_EuriborSwapIsdaFixA__SWIG_2); return;
    }
  }
  
  croak("No matching function for overloaded 'new_EuriborSwapIsdaFixA'");
  XSRETURN(0);
}


XS(_wrap_delete_EuriborSwapIsdaFixA) {
  {
    EuriborSwapIsdaFixAPtr *arg1 = (EuriborSwapIsdaFixAPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_EuriborSwapIsdaFixA(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_EuriborSwapIsdaFixAPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_EuriborSwapIsdaFixA" "', argument " "1"" of type '" "EuriborSwapIsdaFixAPtr *""'"); 
    }
    arg1 = reinterpret_cast< EuriborSwapIsdaFixAPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_EuriborSwapIsdaFixB__SWIG_0) {
  {
    Period *arg1 = 0 ;
    Handle< YieldTermStructure > *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    EuriborSwapIsdaFixBPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_EuriborSwapIsdaFixB(tenor,h);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_EuriborSwapIsdaFixB" "', argument " "1"" of type '" "Period const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EuriborSwapIsdaFixB" "', argument " "1"" of type '" "Period const &""'"); 
    }
    arg1 = reinterpret_cast< Period * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_EuriborSwapIsdaFixB" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EuriborSwapIsdaFixB" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< YieldTermStructure > * >(argp2);
    {
      try {
        result = (EuriborSwapIsdaFixBPtr *)new_EuriborSwapIsdaFixBPtr__SWIG_0((Period const &)*arg1,(Handle< YieldTermStructure > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EuriborSwapIsdaFixBPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_EuriborSwapIsdaFixB__SWIG_1) {
  {
    Period *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    EuriborSwapIsdaFixBPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_EuriborSwapIsdaFixB(tenor);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_EuriborSwapIsdaFixB" "', argument " "1"" of type '" "Period const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EuriborSwapIsdaFixB" "', argument " "1"" of type '" "Period const &""'"); 
    }
    arg1 = reinterpret_cast< Period * >(argp1);
    {
      try {
        result = (EuriborSwapIsdaFixBPtr *)new_EuriborSwapIsdaFixBPtr__SWIG_0((Period const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EuriborSwapIsdaFixBPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_EuriborSwapIsdaFixB__SWIG_2) {
  {
    Period *arg1 = 0 ;
    Handle< YieldTermStructure > *arg2 = 0 ;
    Handle< YieldTermStructure > *arg3 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    EuriborSwapIsdaFixBPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_EuriborSwapIsdaFixB(tenor,h1,h2);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_EuriborSwapIsdaFixB" "', argument " "1"" of type '" "Period const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EuriborSwapIsdaFixB" "', argument " "1"" of type '" "Period const &""'"); 
    }
    arg1 = reinterpret_cast< Period * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_EuriborSwapIsdaFixB" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EuriborSwapIsdaFixB" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< YieldTermStructure > * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_EuriborSwapIsdaFixB" "', argument " "3"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EuriborSwapIsdaFixB" "', argument " "3"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< YieldTermStructure > * >(argp3);
    {
      try {
        result = (EuriborSwapIsdaFixBPtr *)new_EuriborSwapIsdaFixBPtr__SWIG_2((Period const &)*arg1,(Handle< YieldTermStructure > const &)*arg2,(Handle< YieldTermStructure > const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EuriborSwapIsdaFixBPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_EuriborSwapIsdaFixB) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_EuriborSwapIsdaFixB__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_EuriborSwapIsdaFixB__SWIG_0); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_EuriborSwapIsdaFixB__SWIG_2); return;
    }
  }
  
  croak("No matching function for overloaded 'new_EuriborSwapIsdaFixB'");
  XSRETURN(0);
}


XS(_wrap_delete_EuriborSwapIsdaFixB) {
  {
    EuriborSwapIsdaFixBPtr *arg1 = (EuriborSwapIsdaFixBPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_EuriborSwapIsdaFixB(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_EuriborSwapIsdaFixBPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_EuriborSwapIsdaFixB" "', argument " "1"" of type '" "EuriborSwapIsdaFixBPtr *""'"); 
    }
    arg1 = reinterpret_cast< EuriborSwapIsdaFixBPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_EuriborSwapIfrFix__SWIG_0) {
  {
    Period *arg1 = 0 ;
    Handle< YieldTermStructure > *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    EuriborSwapIfrFixPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_EuriborSwapIfrFix(tenor,h);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_EuriborSwapIfrFix" "', argument " "1"" of type '" "Period const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EuriborSwapIfrFix" "', argument " "1"" of type '" "Period const &""'"); 
    }
    arg1 = reinterpret_cast< Period * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_EuriborSwapIfrFix" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EuriborSwapIfrFix" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< YieldTermStructure > * >(argp2);
    {
      try {
        result = (EuriborSwapIfrFixPtr *)new_EuriborSwapIfrFixPtr__SWIG_0((Period const &)*arg1,(Handle< YieldTermStructure > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EuriborSwapIfrFixPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_EuriborSwapIfrFix__SWIG_1) {
  {
    Period *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    EuriborSwapIfrFixPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_EuriborSwapIfrFix(tenor);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_EuriborSwapIfrFix" "', argument " "1"" of type '" "Period const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EuriborSwapIfrFix" "', argument " "1"" of type '" "Period const &""'"); 
    }
    arg1 = reinterpret_cast< Period * >(argp1);
    {
      try {
        result = (EuriborSwapIfrFixPtr *)new_EuriborSwapIfrFixPtr__SWIG_0((Period const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EuriborSwapIfrFixPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_EuriborSwapIfrFix__SWIG_2) {
  {
    Period *arg1 = 0 ;
    Handle< YieldTermStructure > *arg2 = 0 ;
    Handle< YieldTermStructure > *arg3 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    EuriborSwapIfrFixPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_EuriborSwapIfrFix(tenor,h1,h2);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_EuriborSwapIfrFix" "', argument " "1"" of type '" "Period const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EuriborSwapIfrFix" "', argument " "1"" of type '" "Period const &""'"); 
    }
    arg1 = reinterpret_cast< Period * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_EuriborSwapIfrFix" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EuriborSwapIfrFix" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< YieldTermStructure > * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_EuriborSwapIfrFix" "', argument " "3"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EuriborSwapIfrFix" "', argument " "3"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< YieldTermStructure > * >(argp3);
    {
      try {
        result = (EuriborSwapIfrFixPtr *)new_EuriborSwapIfrFixPtr__SWIG_2((Period const &)*arg1,(Handle< YieldTermStructure > const &)*arg2,(Handle< YieldTermStructure > const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EuriborSwapIfrFixPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_EuriborSwapIfrFix) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_EuriborSwapIfrFix__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_EuriborSwapIfrFix__SWIG_0); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_EuriborSwapIfrFix__SWIG_2); return;
    }
  }
  
  croak("No matching function for overloaded 'new_EuriborSwapIfrFix'");
  XSRETURN(0);
}


XS(_wrap_delete_EuriborSwapIfrFix) {
  {
    EuriborSwapIfrFixPtr *arg1 = (EuriborSwapIfrFixPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_EuriborSwapIfrFix(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_EuriborSwapIfrFixPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_EuriborSwapIfrFix" "', argument " "1"" of type '" "EuriborSwapIfrFixPtr *""'"); 
    }
    arg1 = reinterpret_cast< EuriborSwapIfrFixPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_EurLiborSwapIsdaFixA__SWIG_0) {
  {
    Period *arg1 = 0 ;
    Handle< YieldTermStructure > *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    EurLiborSwapIsdaFixAPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_EurLiborSwapIsdaFixA(tenor,h);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_EurLiborSwapIsdaFixA" "', argument " "1"" of type '" "Period const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EurLiborSwapIsdaFixA" "', argument " "1"" of type '" "Period const &""'"); 
    }
    arg1 = reinterpret_cast< Period * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_EurLiborSwapIsdaFixA" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EurLiborSwapIsdaFixA" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< YieldTermStructure > * >(argp2);
    {
      try {
        result = (EurLiborSwapIsdaFixAPtr *)new_EurLiborSwapIsdaFixAPtr__SWIG_0((Period const &)*arg1,(Handle< YieldTermStructure > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EurLiborSwapIsdaFixAPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_EurLiborSwapIsdaFixA__SWIG_1) {
  {
    Period *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    EurLiborSwapIsdaFixAPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_EurLiborSwapIsdaFixA(tenor);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_EurLiborSwapIsdaFixA" "', argument " "1"" of type '" "Period const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EurLiborSwapIsdaFixA" "', argument " "1"" of type '" "Period const &""'"); 
    }
    arg1 = reinterpret_cast< Period * >(argp1);
    {
      try {
        result = (EurLiborSwapIsdaFixAPtr *)new_EurLiborSwapIsdaFixAPtr__SWIG_0((Period const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EurLiborSwapIsdaFixAPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_EurLiborSwapIsdaFixA__SWIG_2) {
  {
    Period *arg1 = 0 ;
    Handle< YieldTermStructure > *arg2 = 0 ;
    Handle< YieldTermStructure > *arg3 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    EurLiborSwapIsdaFixAPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_EurLiborSwapIsdaFixA(tenor,h1,h2);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_EurLiborSwapIsdaFixA" "', argument " "1"" of type '" "Period const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EurLiborSwapIsdaFixA" "', argument " "1"" of type '" "Period const &""'"); 
    }
    arg1 = reinterpret_cast< Period * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_EurLiborSwapIsdaFixA" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EurLiborSwapIsdaFixA" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< YieldTermStructure > * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_EurLiborSwapIsdaFixA" "', argument " "3"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EurLiborSwapIsdaFixA" "', argument " "3"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< YieldTermStructure > * >(argp3);
    {
      try {
        result = (EurLiborSwapIsdaFixAPtr *)new_EurLiborSwapIsdaFixAPtr__SWIG_2((Period const &)*arg1,(Handle< YieldTermStructure > const &)*arg2,(Handle< YieldTermStructure > const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EurLiborSwapIsdaFixAPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_EurLiborSwapIsdaFixA) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_EurLiborSwapIsdaFixA__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_EurLiborSwapIsdaFixA__SWIG_0); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_EurLiborSwapIsdaFixA__SWIG_2); return;
    }
  }
  
  croak("No matching function for overloaded 'new_EurLiborSwapIsdaFixA'");
  XSRETURN(0);
}


XS(_wrap_delete_EurLiborSwapIsdaFixA) {
  {
    EurLiborSwapIsdaFixAPtr *arg1 = (EurLiborSwapIsdaFixAPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_EurLiborSwapIsdaFixA(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_EurLiborSwapIsdaFixAPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_EurLiborSwapIsdaFixA" "', argument " "1"" of type '" "EurLiborSwapIsdaFixAPtr *""'"); 
    }
    arg1 = reinterpret_cast< EurLiborSwapIsdaFixAPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_EurLiborSwapIsdaFixB__SWIG_0) {
  {
    Period *arg1 = 0 ;
    Handle< YieldTermStructure > *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    EurLiborSwapIsdaFixBPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_EurLiborSwapIsdaFixB(tenor,h);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_EurLiborSwapIsdaFixB" "', argument " "1"" of type '" "Period const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EurLiborSwapIsdaFixB" "', argument " "1"" of type '" "Period const &""'"); 
    }
    arg1 = reinterpret_cast< Period * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_EurLiborSwapIsdaFixB" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EurLiborSwapIsdaFixB" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< YieldTermStructure > * >(argp2);
    {
      try {
        result = (EurLiborSwapIsdaFixBPtr *)new_EurLiborSwapIsdaFixBPtr__SWIG_0((Period const &)*arg1,(Handle< YieldTermStructure > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EurLiborSwapIsdaFixBPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_EurLiborSwapIsdaFixB__SWIG_1) {
  {
    Period *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    EurLiborSwapIsdaFixBPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_EurLiborSwapIsdaFixB(tenor);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_EurLiborSwapIsdaFixB" "', argument " "1"" of type '" "Period const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EurLiborSwapIsdaFixB" "', argument " "1"" of type '" "Period const &""'"); 
    }
    arg1 = reinterpret_cast< Period * >(argp1);
    {
      try {
        result = (EurLiborSwapIsdaFixBPtr *)new_EurLiborSwapIsdaFixBPtr__SWIG_0((Period const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EurLiborSwapIsdaFixBPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_EurLiborSwapIsdaFixB__SWIG_2) {
  {
    Period *arg1 = 0 ;
    Handle< YieldTermStructure > *arg2 = 0 ;
    Handle< YieldTermStructure > *arg3 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    EurLiborSwapIsdaFixBPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_EurLiborSwapIsdaFixB(tenor,h1,h2);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_EurLiborSwapIsdaFixB" "', argument " "1"" of type '" "Period const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EurLiborSwapIsdaFixB" "', argument " "1"" of type '" "Period const &""'"); 
    }
    arg1 = reinterpret_cast< Period * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_EurLiborSwapIsdaFixB" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EurLiborSwapIsdaFixB" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< YieldTermStructure > * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_EurLiborSwapIsdaFixB" "', argument " "3"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EurLiborSwapIsdaFixB" "', argument " "3"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< YieldTermStructure > * >(argp3);
    {
      try {
        result = (EurLiborSwapIsdaFixBPtr *)new_EurLiborSwapIsdaFixBPtr__SWIG_2((Period const &)*arg1,(Handle< YieldTermStructure > const &)*arg2,(Handle< YieldTermStructure > const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EurLiborSwapIsdaFixBPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_EurLiborSwapIsdaFixB) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_EurLiborSwapIsdaFixB__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_EurLiborSwapIsdaFixB__SWIG_0); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_EurLiborSwapIsdaFixB__SWIG_2); return;
    }
  }
  
  croak("No matching function for overloaded 'new_EurLiborSwapIsdaFixB'");
  XSRETURN(0);
}


XS(_wrap_delete_EurLiborSwapIsdaFixB) {
  {
    EurLiborSwapIsdaFixBPtr *arg1 = (EurLiborSwapIsdaFixBPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_EurLiborSwapIsdaFixB(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_EurLiborSwapIsdaFixBPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_EurLiborSwapIsdaFixB" "', argument " "1"" of type '" "EurLiborSwapIsdaFixBPtr *""'"); 
    }
    arg1 = reinterpret_cast< EurLiborSwapIsdaFixBPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_EurLiborSwapIfrFix__SWIG_0) {
  {
    Period *arg1 = 0 ;
    Handle< YieldTermStructure > *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    EurLiborSwapIfrFixPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_EurLiborSwapIfrFix(tenor,h);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_EurLiborSwapIfrFix" "', argument " "1"" of type '" "Period const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EurLiborSwapIfrFix" "', argument " "1"" of type '" "Period const &""'"); 
    }
    arg1 = reinterpret_cast< Period * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_EurLiborSwapIfrFix" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EurLiborSwapIfrFix" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< YieldTermStructure > * >(argp2);
    {
      try {
        result = (EurLiborSwapIfrFixPtr *)new_EurLiborSwapIfrFixPtr__SWIG_0((Period const &)*arg1,(Handle< YieldTermStructure > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EurLiborSwapIfrFixPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_EurLiborSwapIfrFix__SWIG_1) {
  {
    Period *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    EurLiborSwapIfrFixPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_EurLiborSwapIfrFix(tenor);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_EurLiborSwapIfrFix" "', argument " "1"" of type '" "Period const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EurLiborSwapIfrFix" "', argument " "1"" of type '" "Period const &""'"); 
    }
    arg1 = reinterpret_cast< Period * >(argp1);
    {
      try {
        result = (EurLiborSwapIfrFixPtr *)new_EurLiborSwapIfrFixPtr__SWIG_0((Period const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EurLiborSwapIfrFixPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_EurLiborSwapIfrFix__SWIG_2) {
  {
    Period *arg1 = 0 ;
    Handle< YieldTermStructure > *arg2 = 0 ;
    Handle< YieldTermStructure > *arg3 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    EurLiborSwapIfrFixPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_EurLiborSwapIfrFix(tenor,h1,h2);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_EurLiborSwapIfrFix" "', argument " "1"" of type '" "Period const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EurLiborSwapIfrFix" "', argument " "1"" of type '" "Period const &""'"); 
    }
    arg1 = reinterpret_cast< Period * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_EurLiborSwapIfrFix" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EurLiborSwapIfrFix" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< YieldTermStructure > * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_EurLiborSwapIfrFix" "', argument " "3"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EurLiborSwapIfrFix" "', argument " "3"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< YieldTermStructure > * >(argp3);
    {
      try {
        result = (EurLiborSwapIfrFixPtr *)new_EurLiborSwapIfrFixPtr__SWIG_2((Period const &)*arg1,(Handle< YieldTermStructure > const &)*arg2,(Handle< YieldTermStructure > const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EurLiborSwapIfrFixPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_EurLiborSwapIfrFix) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_EurLiborSwapIfrFix__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_EurLiborSwapIfrFix__SWIG_0); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_EurLiborSwapIfrFix__SWIG_2); return;
    }
  }
  
  croak("No matching function for overloaded 'new_EurLiborSwapIfrFix'");
  XSRETURN(0);
}


XS(_wrap_delete_EurLiborSwapIfrFix) {
  {
    EurLiborSwapIfrFixPtr *arg1 = (EurLiborSwapIfrFixPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_EurLiborSwapIfrFix(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_EurLiborSwapIfrFixPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_EurLiborSwapIfrFix" "', argument " "1"" of type '" "EurLiborSwapIfrFixPtr *""'"); 
    }
    arg1 = reinterpret_cast< EurLiborSwapIfrFixPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Brent_setMaxEvaluations) {
  {
    Brent *arg1 = (Brent *) 0 ;
    Size arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Brent_setMaxEvaluations(self,evaluations);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Brent, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Brent_setMaxEvaluations" "', argument " "1"" of type '" "Brent *""'"); 
    }
    arg1 = reinterpret_cast< Brent * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Brent_setMaxEvaluations" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    {
      try {
        (arg1)->setMaxEvaluations(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Brent_setLowerBound) {
  {
    Brent *arg1 = (Brent *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Brent_setLowerBound(self,lowerBound);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Brent, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Brent_setLowerBound" "', argument " "1"" of type '" "Brent *""'"); 
    }
    arg1 = reinterpret_cast< Brent * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Brent_setLowerBound" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        (arg1)->setLowerBound(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Brent_setUpperBound) {
  {
    Brent *arg1 = (Brent *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Brent_setUpperBound(self,upperBound);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Brent, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Brent_setUpperBound" "', argument " "1"" of type '" "Brent *""'"); 
    }
    arg1 = reinterpret_cast< Brent * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Brent_setUpperBound" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        (arg1)->setUpperBound(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Brent) {
  {
    int argvi = 0;
    Brent *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Brent();");
    }
    {
      try {
        result = (Brent *)new Brent();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Brent, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_Brent) {
  {
    Brent *arg1 = (Brent *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Brent(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Brent, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Brent" "', argument " "1"" of type '" "Brent *""'"); 
    }
    arg1 = reinterpret_cast< Brent * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Bisection_setMaxEvaluations) {
  {
    Bisection *arg1 = (Bisection *) 0 ;
    Size arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Bisection_setMaxEvaluations(self,evaluations);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Bisection, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Bisection_setMaxEvaluations" "', argument " "1"" of type '" "Bisection *""'"); 
    }
    arg1 = reinterpret_cast< Bisection * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Bisection_setMaxEvaluations" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    {
      try {
        (arg1)->setMaxEvaluations(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Bisection_setLowerBound) {
  {
    Bisection *arg1 = (Bisection *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Bisection_setLowerBound(self,lowerBound);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Bisection, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Bisection_setLowerBound" "', argument " "1"" of type '" "Bisection *""'"); 
    }
    arg1 = reinterpret_cast< Bisection * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Bisection_setLowerBound" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        (arg1)->setLowerBound(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Bisection_setUpperBound) {
  {
    Bisection *arg1 = (Bisection *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Bisection_setUpperBound(self,upperBound);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Bisection, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Bisection_setUpperBound" "', argument " "1"" of type '" "Bisection *""'"); 
    }
    arg1 = reinterpret_cast< Bisection * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Bisection_setUpperBound" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        (arg1)->setUpperBound(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Bisection) {
  {
    int argvi = 0;
    Bisection *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Bisection();");
    }
    {
      try {
        result = (Bisection *)new Bisection();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Bisection, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_Bisection) {
  {
    Bisection *arg1 = (Bisection *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Bisection(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Bisection, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Bisection" "', argument " "1"" of type '" "Bisection *""'"); 
    }
    arg1 = reinterpret_cast< Bisection * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_FalsePosition_setMaxEvaluations) {
  {
    FalsePosition *arg1 = (FalsePosition *) 0 ;
    Size arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: FalsePosition_setMaxEvaluations(self,evaluations);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_FalsePosition, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FalsePosition_setMaxEvaluations" "', argument " "1"" of type '" "FalsePosition *""'"); 
    }
    arg1 = reinterpret_cast< FalsePosition * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FalsePosition_setMaxEvaluations" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    {
      try {
        (arg1)->setMaxEvaluations(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_FalsePosition_setLowerBound) {
  {
    FalsePosition *arg1 = (FalsePosition *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: FalsePosition_setLowerBound(self,lowerBound);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_FalsePosition, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FalsePosition_setLowerBound" "', argument " "1"" of type '" "FalsePosition *""'"); 
    }
    arg1 = reinterpret_cast< FalsePosition * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FalsePosition_setLowerBound" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        (arg1)->setLowerBound(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_FalsePosition_setUpperBound) {
  {
    FalsePosition *arg1 = (FalsePosition *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: FalsePosition_setUpperBound(self,upperBound);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_FalsePosition, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FalsePosition_setUpperBound" "', argument " "1"" of type '" "FalsePosition *""'"); 
    }
    arg1 = reinterpret_cast< FalsePosition * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FalsePosition_setUpperBound" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        (arg1)->setUpperBound(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FalsePosition) {
  {
    int argvi = 0;
    FalsePosition *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_FalsePosition();");
    }
    {
      try {
        result = (FalsePosition *)new FalsePosition();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FalsePosition, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_FalsePosition) {
  {
    FalsePosition *arg1 = (FalsePosition *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_FalsePosition(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_FalsePosition, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FalsePosition" "', argument " "1"" of type '" "FalsePosition *""'"); 
    }
    arg1 = reinterpret_cast< FalsePosition * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Ridder_setMaxEvaluations) {
  {
    Ridder *arg1 = (Ridder *) 0 ;
    Size arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Ridder_setMaxEvaluations(self,evaluations);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ridder, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Ridder_setMaxEvaluations" "', argument " "1"" of type '" "Ridder *""'"); 
    }
    arg1 = reinterpret_cast< Ridder * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Ridder_setMaxEvaluations" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    {
      try {
        (arg1)->setMaxEvaluations(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Ridder_setLowerBound) {
  {
    Ridder *arg1 = (Ridder *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Ridder_setLowerBound(self,lowerBound);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ridder, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Ridder_setLowerBound" "', argument " "1"" of type '" "Ridder *""'"); 
    }
    arg1 = reinterpret_cast< Ridder * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Ridder_setLowerBound" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        (arg1)->setLowerBound(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Ridder_setUpperBound) {
  {
    Ridder *arg1 = (Ridder *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Ridder_setUpperBound(self,upperBound);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ridder, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Ridder_setUpperBound" "', argument " "1"" of type '" "Ridder *""'"); 
    }
    arg1 = reinterpret_cast< Ridder * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Ridder_setUpperBound" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        (arg1)->setUpperBound(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Ridder) {
  {
    int argvi = 0;
    Ridder *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Ridder();");
    }
    {
      try {
        result = (Ridder *)new Ridder();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Ridder, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_Ridder) {
  {
    Ridder *arg1 = (Ridder *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Ridder(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Ridder, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Ridder" "', argument " "1"" of type '" "Ridder *""'"); 
    }
    arg1 = reinterpret_cast< Ridder * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Secant_setMaxEvaluations) {
  {
    Secant *arg1 = (Secant *) 0 ;
    Size arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Secant_setMaxEvaluations(self,evaluations);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Secant, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Secant_setMaxEvaluations" "', argument " "1"" of type '" "Secant *""'"); 
    }
    arg1 = reinterpret_cast< Secant * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Secant_setMaxEvaluations" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    {
      try {
        (arg1)->setMaxEvaluations(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Secant_setLowerBound) {
  {
    Secant *arg1 = (Secant *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Secant_setLowerBound(self,lowerBound);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Secant, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Secant_setLowerBound" "', argument " "1"" of type '" "Secant *""'"); 
    }
    arg1 = reinterpret_cast< Secant * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Secant_setLowerBound" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        (arg1)->setLowerBound(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Secant_setUpperBound) {
  {
    Secant *arg1 = (Secant *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Secant_setUpperBound(self,upperBound);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Secant, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Secant_setUpperBound" "', argument " "1"" of type '" "Secant *""'"); 
    }
    arg1 = reinterpret_cast< Secant * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Secant_setUpperBound" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        (arg1)->setUpperBound(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Secant) {
  {
    int argvi = 0;
    Secant *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Secant();");
    }
    {
      try {
        result = (Secant *)new Secant();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Secant, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_Secant) {
  {
    Secant *arg1 = (Secant *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Secant(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Secant, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Secant" "', argument " "1"" of type '" "Secant *""'"); 
    }
    arg1 = reinterpret_cast< Secant * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_Constraint) {
  {
    Constraint *arg1 = (Constraint *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Constraint(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Constraint, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Constraint" "', argument " "1"" of type '" "Constraint *""'"); 
    }
    arg1 = reinterpret_cast< Constraint * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BoundaryConstraint) {
  {
    Real arg1 ;
    Real arg2 ;
    double val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    BoundaryConstraint *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_BoundaryConstraint(lower,upper);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_BoundaryConstraint" "', argument " "1"" of type '" "Real""'");
    } 
    arg1 = static_cast< Real >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_BoundaryConstraint" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (BoundaryConstraint *)new BoundaryConstraint(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BoundaryConstraint, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_BoundaryConstraint) {
  {
    BoundaryConstraint *arg1 = (BoundaryConstraint *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_BoundaryConstraint(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BoundaryConstraint, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_BoundaryConstraint" "', argument " "1"" of type '" "BoundaryConstraint *""'"); 
    }
    arg1 = reinterpret_cast< BoundaryConstraint * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_NoConstraint) {
  {
    int argvi = 0;
    NoConstraint *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_NoConstraint();");
    }
    {
      try {
        result = (NoConstraint *)new NoConstraint();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_NoConstraint, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_NoConstraint) {
  {
    NoConstraint *arg1 = (NoConstraint *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_NoConstraint(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_NoConstraint, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_NoConstraint" "', argument " "1"" of type '" "NoConstraint *""'"); 
    }
    arg1 = reinterpret_cast< NoConstraint * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PositiveConstraint) {
  {
    int argvi = 0;
    PositiveConstraint *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_PositiveConstraint();");
    }
    {
      try {
        result = (PositiveConstraint *)new PositiveConstraint();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PositiveConstraint, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_PositiveConstraint) {
  {
    PositiveConstraint *arg1 = (PositiveConstraint *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_PositiveConstraint(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PositiveConstraint, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_PositiveConstraint" "', argument " "1"" of type '" "PositiveConstraint *""'"); 
    }
    arg1 = reinterpret_cast< PositiveConstraint * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CompositeConstraint) {
  {
    Constraint *arg1 = 0 ;
    Constraint *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    CompositeConstraint *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_CompositeConstraint(c1,c2);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Constraint,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CompositeConstraint" "', argument " "1"" of type '" "Constraint const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CompositeConstraint" "', argument " "1"" of type '" "Constraint const &""'"); 
    }
    arg1 = reinterpret_cast< Constraint * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Constraint,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CompositeConstraint" "', argument " "2"" of type '" "Constraint const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CompositeConstraint" "', argument " "2"" of type '" "Constraint const &""'"); 
    }
    arg2 = reinterpret_cast< Constraint * >(argp2);
    {
      try {
        result = (CompositeConstraint *)new CompositeConstraint((Constraint const &)*arg1,(Constraint const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CompositeConstraint, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_CompositeConstraint) {
  {
    CompositeConstraint *arg1 = (CompositeConstraint *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_CompositeConstraint(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CompositeConstraint, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CompositeConstraint" "', argument " "1"" of type '" "CompositeConstraint *""'"); 
    }
    arg1 = reinterpret_cast< CompositeConstraint * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_NonhomogeneousBoundaryConstraint) {
  {
    Array *arg1 = 0 ;
    Array *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    NonhomogeneousBoundaryConstraint *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_NonhomogeneousBoundaryConstraint(l,u);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_NonhomogeneousBoundaryConstraint" "', argument " "1"" of type '" "Array const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NonhomogeneousBoundaryConstraint" "', argument " "1"" of type '" "Array const &""'"); 
    }
    arg1 = reinterpret_cast< Array * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_NonhomogeneousBoundaryConstraint" "', argument " "2"" of type '" "Array const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NonhomogeneousBoundaryConstraint" "', argument " "2"" of type '" "Array const &""'"); 
    }
    arg2 = reinterpret_cast< Array * >(argp2);
    {
      try {
        result = (NonhomogeneousBoundaryConstraint *)new NonhomogeneousBoundaryConstraint((Array const &)*arg1,(Array const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_NonhomogeneousBoundaryConstraint, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_NonhomogeneousBoundaryConstraint) {
  {
    NonhomogeneousBoundaryConstraint *arg1 = (NonhomogeneousBoundaryConstraint *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_NonhomogeneousBoundaryConstraint(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_NonhomogeneousBoundaryConstraint, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_NonhomogeneousBoundaryConstraint" "', argument " "1"" of type '" "NonhomogeneousBoundaryConstraint *""'"); 
    }
    arg1 = reinterpret_cast< NonhomogeneousBoundaryConstraint * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_EndCriteria) {
  {
    Size arg1 ;
    Size arg2 ;
    Real arg3 ;
    Real arg4 ;
    Real arg5 ;
    size_t val1 ;
    int ecode1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    double val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    EndCriteria *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_EndCriteria(maxIteration,maxStationaryStateIterations,rootEpsilon,functionEpsilon,gradientNormEpsilon);");
    }
    ecode1 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_EndCriteria" "', argument " "1"" of type '" "Size""'");
    } 
    arg1 = static_cast< Size >(val1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_EndCriteria" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_EndCriteria" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_EndCriteria" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_EndCriteria" "', argument " "5"" of type '" "Real""'");
    } 
    arg5 = static_cast< Real >(val5);
    {
      try {
        result = (EndCriteria *)new EndCriteria(arg1,arg2,arg3,arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EndCriteria, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_EndCriteria_call) {
  {
    EndCriteria *arg1 = (EndCriteria *) 0 ;
    Size arg2 ;
    Size *arg3 = 0 ;
    bool arg4 ;
    Real arg5 ;
    Real arg6 ;
    Real arg7 ;
    Real arg8 ;
    EndCriteria::Type *arg9 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    void *argp3 = 0 ;
    int res3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    double val5 ;
    int ecode5 = 0 ;
    double val6 ;
    int ecode6 = 0 ;
    double val7 ;
    int ecode7 = 0 ;
    double val8 ;
    int ecode8 = 0 ;
    void *argp9 = 0 ;
    int res9 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 9) || (items > 9)) {
      SWIG_croak("Usage: EndCriteria_call(self,iteration,statState,positiveOptimization,fold,normgold,fnew,normgnewx,ecType);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_EndCriteria, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EndCriteria_call" "', argument " "1"" of type '" "EndCriteria const *""'"); 
    }
    arg1 = reinterpret_cast< EndCriteria * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "EndCriteria_call" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_std__size_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "EndCriteria_call" "', argument " "3"" of type '" "Size &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "EndCriteria_call" "', argument " "3"" of type '" "Size &""'"); 
    }
    arg3 = reinterpret_cast< Size * >(argp3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "EndCriteria_call" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "EndCriteria_call" "', argument " "5"" of type '" "Real""'");
    } 
    arg5 = static_cast< Real >(val5);
    ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "EndCriteria_call" "', argument " "6"" of type '" "Real""'");
    } 
    arg6 = static_cast< Real >(val6);
    ecode7 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "EndCriteria_call" "', argument " "7"" of type '" "Real""'");
    } 
    arg7 = static_cast< Real >(val7);
    ecode8 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "EndCriteria_call" "', argument " "8"" of type '" "Real""'");
    } 
    arg8 = static_cast< Real >(val8);
    res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_EndCriteria__Type,  0 );
    if (!SWIG_IsOK(res9)) {
      SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "EndCriteria_call" "', argument " "9"" of type '" "EndCriteria::Type &""'"); 
    }
    if (!argp9) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "EndCriteria_call" "', argument " "9"" of type '" "EndCriteria::Type &""'"); 
    }
    arg9 = reinterpret_cast< EndCriteria::Type * >(argp9);
    {
      try {
        result = (bool)((EndCriteria const *)arg1)->operator ()(arg2,*arg3,arg4,arg5,arg6,arg7,arg8,*arg9);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_EndCriteria) {
  {
    EndCriteria *arg1 = (EndCriteria *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_EndCriteria(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_EndCriteria, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_EndCriteria" "', argument " "1"" of type '" "EndCriteria *""'"); 
    }
    arg1 = reinterpret_cast< EndCriteria * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_OptimizationMethod) {
  {
    OptimizationMethod *arg1 = (OptimizationMethod *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_OptimizationMethod(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OptimizationMethod, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_OptimizationMethod" "', argument " "1"" of type '" "OptimizationMethod *""'"); 
    }
    arg1 = reinterpret_cast< OptimizationMethod * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ConjugateGradient) {
  {
    int argvi = 0;
    ConjugateGradient *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_ConjugateGradient();");
    }
    {
      try {
        result = (ConjugateGradient *)new ConjugateGradient();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ConjugateGradient, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_ConjugateGradient) {
  {
    ConjugateGradient *arg1 = (ConjugateGradient *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_ConjugateGradient(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ConjugateGradient, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ConjugateGradient" "', argument " "1"" of type '" "ConjugateGradient *""'"); 
    }
    arg1 = reinterpret_cast< ConjugateGradient * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Simplex) {
  {
    Real arg1 ;
    double val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    Simplex *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Simplex(lambda);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Simplex" "', argument " "1"" of type '" "Real""'");
    } 
    arg1 = static_cast< Real >(val1);
    {
      try {
        result = (Simplex *)new Simplex(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Simplex, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_Simplex) {
  {
    Simplex *arg1 = (Simplex *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Simplex(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Simplex, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Simplex" "', argument " "1"" of type '" "Simplex *""'"); 
    }
    arg1 = reinterpret_cast< Simplex * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SteepestDescent) {
  {
    int argvi = 0;
    SteepestDescent *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_SteepestDescent();");
    }
    {
      try {
        result = (SteepestDescent *)new SteepestDescent();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SteepestDescent, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_SteepestDescent) {
  {
    SteepestDescent *arg1 = (SteepestDescent *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_SteepestDescent(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SteepestDescent, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SteepestDescent" "', argument " "1"" of type '" "SteepestDescent *""'"); 
    }
    arg1 = reinterpret_cast< SteepestDescent * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BFGS) {
  {
    int argvi = 0;
    BFGS *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_BFGS();");
    }
    {
      try {
        result = (BFGS *)new BFGS();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BFGS, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_BFGS) {
  {
    BFGS *arg1 = (BFGS *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_BFGS(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BFGS, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_BFGS" "', argument " "1"" of type '" "BFGS *""'"); 
    }
    arg1 = reinterpret_cast< BFGS * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_LevenbergMarquardt__SWIG_0) {
  {
    Real arg1 ;
    Real arg2 ;
    Real arg3 ;
    double val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    LevenbergMarquardt *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_LevenbergMarquardt(epsfcn,xtol,gtol);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_LevenbergMarquardt" "', argument " "1"" of type '" "Real""'");
    } 
    arg1 = static_cast< Real >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_LevenbergMarquardt" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_LevenbergMarquardt" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    {
      try {
        result = (LevenbergMarquardt *)new LevenbergMarquardt(arg1,arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_LevenbergMarquardt, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_LevenbergMarquardt__SWIG_1) {
  {
    Real arg1 ;
    Real arg2 ;
    double val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    LevenbergMarquardt *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_LevenbergMarquardt(epsfcn,xtol);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_LevenbergMarquardt" "', argument " "1"" of type '" "Real""'");
    } 
    arg1 = static_cast< Real >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_LevenbergMarquardt" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (LevenbergMarquardt *)new LevenbergMarquardt(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_LevenbergMarquardt, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_LevenbergMarquardt__SWIG_2) {
  {
    Real arg1 ;
    double val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    LevenbergMarquardt *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_LevenbergMarquardt(epsfcn);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_LevenbergMarquardt" "', argument " "1"" of type '" "Real""'");
    } 
    arg1 = static_cast< Real >(val1);
    {
      try {
        result = (LevenbergMarquardt *)new LevenbergMarquardt(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_LevenbergMarquardt, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_LevenbergMarquardt__SWIG_3) {
  {
    int argvi = 0;
    LevenbergMarquardt *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_LevenbergMarquardt();");
    }
    {
      try {
        result = (LevenbergMarquardt *)new LevenbergMarquardt();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_LevenbergMarquardt, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_LevenbergMarquardt) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_LevenbergMarquardt__SWIG_3); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_LevenbergMarquardt__SWIG_2); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_LevenbergMarquardt__SWIG_1); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_LevenbergMarquardt__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_LevenbergMarquardt'");
  XSRETURN(0);
}


XS(_wrap_delete_LevenbergMarquardt) {
  {
    LevenbergMarquardt *arg1 = (LevenbergMarquardt *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_LevenbergMarquardt(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_LevenbergMarquardt, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_LevenbergMarquardt" "', argument " "1"" of type '" "LevenbergMarquardt *""'"); 
    }
    arg1 = reinterpret_cast< LevenbergMarquardt * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DifferentialEvolution) {
  {
    int argvi = 0;
    DifferentialEvolution *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_DifferentialEvolution();");
    }
    {
      try {
        result = (DifferentialEvolution *)new DifferentialEvolution();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DifferentialEvolution, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_DifferentialEvolution) {
  {
    DifferentialEvolution *arg1 = (DifferentialEvolution *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_DifferentialEvolution(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_DifferentialEvolution, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DifferentialEvolution" "', argument " "1"" of type '" "DifferentialEvolution *""'"); 
    }
    arg1 = reinterpret_cast< DifferentialEvolution * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SamplerGaussian__SWIG_0) {
  {
    unsigned long arg1 ;
    unsigned long val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    SamplerGaussian *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_SamplerGaussian(seed);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_long SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_SamplerGaussian" "', argument " "1"" of type '" "unsigned long""'");
    } 
    arg1 = static_cast< unsigned long >(val1);
    {
      try {
        result = (SamplerGaussian *)new SamplerGaussian(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SamplerGaussian, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SamplerGaussian__SWIG_1) {
  {
    int argvi = 0;
    SamplerGaussian *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_SamplerGaussian();");
    }
    {
      try {
        result = (SamplerGaussian *)new SamplerGaussian();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SamplerGaussian, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_SamplerGaussian) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_long SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SamplerGaussian__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SamplerGaussian__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_SamplerGaussian'");
  XSRETURN(0);
}


XS(_wrap_delete_SamplerGaussian) {
  {
    SamplerGaussian *arg1 = (SamplerGaussian *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_SamplerGaussian(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SamplerGaussian, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SamplerGaussian" "', argument " "1"" of type '" "SamplerGaussian *""'"); 
    }
    arg1 = reinterpret_cast< SamplerGaussian * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SamplerLogNormal__SWIG_0) {
  {
    unsigned long arg1 ;
    unsigned long val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    SamplerLogNormal *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_SamplerLogNormal(seed);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_long SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_SamplerLogNormal" "', argument " "1"" of type '" "unsigned long""'");
    } 
    arg1 = static_cast< unsigned long >(val1);
    {
      try {
        result = (SamplerLogNormal *)new SamplerLogNormal(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SamplerLogNormal, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SamplerLogNormal__SWIG_1) {
  {
    int argvi = 0;
    SamplerLogNormal *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_SamplerLogNormal();");
    }
    {
      try {
        result = (SamplerLogNormal *)new SamplerLogNormal();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SamplerLogNormal, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_SamplerLogNormal) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_long SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SamplerLogNormal__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SamplerLogNormal__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_SamplerLogNormal'");
  XSRETURN(0);
}


XS(_wrap_delete_SamplerLogNormal) {
  {
    SamplerLogNormal *arg1 = (SamplerLogNormal *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_SamplerLogNormal(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SamplerLogNormal, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SamplerLogNormal" "', argument " "1"" of type '" "SamplerLogNormal *""'"); 
    }
    arg1 = reinterpret_cast< SamplerLogNormal * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SamplerMirrorGaussian__SWIG_0) {
  {
    Array *arg1 = 0 ;
    Array *arg2 = 0 ;
    unsigned long arg3 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    unsigned long val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    SamplerMirrorGaussian *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_SamplerMirrorGaussian(lower,upper,seed);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SamplerMirrorGaussian" "', argument " "1"" of type '" "Array const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SamplerMirrorGaussian" "', argument " "1"" of type '" "Array const &""'"); 
    }
    arg1 = reinterpret_cast< Array * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SamplerMirrorGaussian" "', argument " "2"" of type '" "Array const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SamplerMirrorGaussian" "', argument " "2"" of type '" "Array const &""'"); 
    }
    arg2 = reinterpret_cast< Array * >(argp2);
    ecode3 = SWIG_AsVal_unsigned_SS_long SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_SamplerMirrorGaussian" "', argument " "3"" of type '" "unsigned long""'");
    } 
    arg3 = static_cast< unsigned long >(val3);
    {
      try {
        result = (SamplerMirrorGaussian *)new SamplerMirrorGaussian((Array const &)*arg1,(Array const &)*arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SamplerMirrorGaussian, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SamplerMirrorGaussian__SWIG_1) {
  {
    Array *arg1 = 0 ;
    Array *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    SamplerMirrorGaussian *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_SamplerMirrorGaussian(lower,upper);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SamplerMirrorGaussian" "', argument " "1"" of type '" "Array const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SamplerMirrorGaussian" "', argument " "1"" of type '" "Array const &""'"); 
    }
    arg1 = reinterpret_cast< Array * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SamplerMirrorGaussian" "', argument " "2"" of type '" "Array const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SamplerMirrorGaussian" "', argument " "2"" of type '" "Array const &""'"); 
    }
    arg2 = reinterpret_cast< Array * >(argp2);
    {
      try {
        result = (SamplerMirrorGaussian *)new SamplerMirrorGaussian((Array const &)*arg1,(Array const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SamplerMirrorGaussian, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SamplerMirrorGaussian) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Array, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Array, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Array, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Array, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_long SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SamplerMirrorGaussian__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SamplerMirrorGaussian__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_SamplerMirrorGaussian'");
  XSRETURN(0);
}


XS(_wrap_delete_SamplerMirrorGaussian) {
  {
    SamplerMirrorGaussian *arg1 = (SamplerMirrorGaussian *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_SamplerMirrorGaussian(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SamplerMirrorGaussian, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SamplerMirrorGaussian" "', argument " "1"" of type '" "SamplerMirrorGaussian *""'"); 
    }
    arg1 = reinterpret_cast< SamplerMirrorGaussian * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ProbabilityBoltzmannDownhill__SWIG_0) {
  {
    unsigned long arg1 ;
    unsigned long val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    ProbabilityBoltzmannDownhill *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_ProbabilityBoltzmannDownhill(seed);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_long SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ProbabilityBoltzmannDownhill" "', argument " "1"" of type '" "unsigned long""'");
    } 
    arg1 = static_cast< unsigned long >(val1);
    {
      try {
        result = (ProbabilityBoltzmannDownhill *)new ProbabilityBoltzmannDownhill(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ProbabilityBoltzmannDownhill, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ProbabilityBoltzmannDownhill__SWIG_1) {
  {
    int argvi = 0;
    ProbabilityBoltzmannDownhill *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_ProbabilityBoltzmannDownhill();");
    }
    {
      try {
        result = (ProbabilityBoltzmannDownhill *)new ProbabilityBoltzmannDownhill();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ProbabilityBoltzmannDownhill, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_ProbabilityBoltzmannDownhill) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_long SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ProbabilityBoltzmannDownhill__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ProbabilityBoltzmannDownhill__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_ProbabilityBoltzmannDownhill'");
  XSRETURN(0);
}


XS(_wrap_delete_ProbabilityBoltzmannDownhill) {
  {
    ProbabilityBoltzmannDownhill *arg1 = (ProbabilityBoltzmannDownhill *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_ProbabilityBoltzmannDownhill(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ProbabilityBoltzmannDownhill, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ProbabilityBoltzmannDownhill" "', argument " "1"" of type '" "ProbabilityBoltzmannDownhill *""'"); 
    }
    arg1 = reinterpret_cast< ProbabilityBoltzmannDownhill * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_TemperatureExponential__SWIG_0) {
  {
    Real arg1 ;
    Size arg2 ;
    Real arg3 ;
    double val1 ;
    int ecode1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    TemperatureExponential *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_TemperatureExponential(initialTemp,dimension,power);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_TemperatureExponential" "', argument " "1"" of type '" "Real""'");
    } 
    arg1 = static_cast< Real >(val1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_TemperatureExponential" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_TemperatureExponential" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    {
      try {
        result = (TemperatureExponential *)new TemperatureExponential(arg1,arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TemperatureExponential, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_TemperatureExponential__SWIG_1) {
  {
    Real arg1 ;
    Size arg2 ;
    double val1 ;
    int ecode1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    TemperatureExponential *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_TemperatureExponential(initialTemp,dimension);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_TemperatureExponential" "', argument " "1"" of type '" "Real""'");
    } 
    arg1 = static_cast< Real >(val1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_TemperatureExponential" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    {
      try {
        result = (TemperatureExponential *)new TemperatureExponential(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TemperatureExponential, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_TemperatureExponential) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_TemperatureExponential__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_TemperatureExponential__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_TemperatureExponential'");
  XSRETURN(0);
}


XS(_wrap_delete_TemperatureExponential) {
  {
    TemperatureExponential *arg1 = (TemperatureExponential *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_TemperatureExponential(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_TemperatureExponential, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_TemperatureExponential" "', argument " "1"" of type '" "TemperatureExponential *""'"); 
    }
    arg1 = reinterpret_cast< TemperatureExponential * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ReannealingTrivial) {
  {
    int argvi = 0;
    ReannealingTrivial *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_ReannealingTrivial();");
    }
    {
      try {
        result = (ReannealingTrivial *)new ReannealingTrivial();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ReannealingTrivial, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_ReannealingTrivial) {
  {
    ReannealingTrivial *arg1 = (ReannealingTrivial *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_ReannealingTrivial(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ReannealingTrivial, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ReannealingTrivial" "', argument " "1"" of type '" "ReannealingTrivial *""'"); 
    }
    arg1 = reinterpret_cast< ReannealingTrivial * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_GaussianSimulatedAnnealing__SWIG_0) {
  {
    SamplerGaussian *arg1 = 0 ;
    ProbabilityBoltzmannDownhill *arg2 = 0 ;
    TemperatureExponential *arg3 = 0 ;
    ReannealingTrivial *arg4 = 0 ;
    Real arg5 ;
    Real arg6 ;
    Size arg7 ;
    GaussianSimulatedAnnealing::ResetScheme arg8 ;
    Size arg9 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    double val5 ;
    int ecode5 = 0 ;
    double val6 ;
    int ecode6 = 0 ;
    size_t val7 ;
    int ecode7 = 0 ;
    int val8 ;
    int ecode8 = 0 ;
    size_t val9 ;
    int ecode9 = 0 ;
    int argvi = 0;
    GaussianSimulatedAnnealing *result = 0 ;
    dXSARGS;
    
    if ((items < 9) || (items > 9)) {
      SWIG_croak("Usage: new_GaussianSimulatedAnnealing(sampler,probability,temperature,reannealing,startTemperature,endTemperature,reAnnealSteps,resetScheme,resetSteps);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_SamplerGaussian,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_GaussianSimulatedAnnealing" "', argument " "1"" of type '" "SamplerGaussian const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GaussianSimulatedAnnealing" "', argument " "1"" of type '" "SamplerGaussian const &""'"); 
    }
    arg1 = reinterpret_cast< SamplerGaussian * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_ProbabilityBoltzmannDownhill,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_GaussianSimulatedAnnealing" "', argument " "2"" of type '" "ProbabilityBoltzmannDownhill const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GaussianSimulatedAnnealing" "', argument " "2"" of type '" "ProbabilityBoltzmannDownhill const &""'"); 
    }
    arg2 = reinterpret_cast< ProbabilityBoltzmannDownhill * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_TemperatureExponential,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_GaussianSimulatedAnnealing" "', argument " "3"" of type '" "TemperatureExponential const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GaussianSimulatedAnnealing" "', argument " "3"" of type '" "TemperatureExponential const &""'"); 
    }
    arg3 = reinterpret_cast< TemperatureExponential * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_ReannealingTrivial,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_GaussianSimulatedAnnealing" "', argument " "4"" of type '" "ReannealingTrivial const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GaussianSimulatedAnnealing" "', argument " "4"" of type '" "ReannealingTrivial const &""'"); 
    }
    arg4 = reinterpret_cast< ReannealingTrivial * >(argp4);
    ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_GaussianSimulatedAnnealing" "', argument " "5"" of type '" "Real""'");
    } 
    arg5 = static_cast< Real >(val5);
    ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_GaussianSimulatedAnnealing" "', argument " "6"" of type '" "Real""'");
    } 
    arg6 = static_cast< Real >(val6);
    ecode7 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_GaussianSimulatedAnnealing" "', argument " "7"" of type '" "Size""'");
    } 
    arg7 = static_cast< Size >(val7);
    ecode8 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_GaussianSimulatedAnnealing" "', argument " "8"" of type '" "GaussianSimulatedAnnealing::ResetScheme""'");
    } 
    arg8 = static_cast< GaussianSimulatedAnnealing::ResetScheme >(val8);
    ecode9 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(8), &val9);
    if (!SWIG_IsOK(ecode9)) {
      SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "new_GaussianSimulatedAnnealing" "', argument " "9"" of type '" "Size""'");
    } 
    arg9 = static_cast< Size >(val9);
    {
      try {
        result = (GaussianSimulatedAnnealing *)new GaussianSimulatedAnnealing((SamplerGaussian const &)*arg1,(ProbabilityBoltzmannDownhill const &)*arg2,(TemperatureExponential const &)*arg3,(ReannealingTrivial const &)*arg4,arg5,arg6,arg7,arg8,arg9);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GaussianSimulatedAnnealing, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_GaussianSimulatedAnnealing__SWIG_1) {
  {
    SamplerGaussian *arg1 = 0 ;
    ProbabilityBoltzmannDownhill *arg2 = 0 ;
    TemperatureExponential *arg3 = 0 ;
    ReannealingTrivial *arg4 = 0 ;
    Real arg5 ;
    Real arg6 ;
    Size arg7 ;
    GaussianSimulatedAnnealing::ResetScheme arg8 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    double val5 ;
    int ecode5 = 0 ;
    double val6 ;
    int ecode6 = 0 ;
    size_t val7 ;
    int ecode7 = 0 ;
    int val8 ;
    int ecode8 = 0 ;
    int argvi = 0;
    GaussianSimulatedAnnealing *result = 0 ;
    dXSARGS;
    
    if ((items < 8) || (items > 8)) {
      SWIG_croak("Usage: new_GaussianSimulatedAnnealing(sampler,probability,temperature,reannealing,startTemperature,endTemperature,reAnnealSteps,resetScheme);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_SamplerGaussian,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_GaussianSimulatedAnnealing" "', argument " "1"" of type '" "SamplerGaussian const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GaussianSimulatedAnnealing" "', argument " "1"" of type '" "SamplerGaussian const &""'"); 
    }
    arg1 = reinterpret_cast< SamplerGaussian * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_ProbabilityBoltzmannDownhill,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_GaussianSimulatedAnnealing" "', argument " "2"" of type '" "ProbabilityBoltzmannDownhill const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GaussianSimulatedAnnealing" "', argument " "2"" of type '" "ProbabilityBoltzmannDownhill const &""'"); 
    }
    arg2 = reinterpret_cast< ProbabilityBoltzmannDownhill * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_TemperatureExponential,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_GaussianSimulatedAnnealing" "', argument " "3"" of type '" "TemperatureExponential const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GaussianSimulatedAnnealing" "', argument " "3"" of type '" "TemperatureExponential const &""'"); 
    }
    arg3 = reinterpret_cast< TemperatureExponential * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_ReannealingTrivial,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_GaussianSimulatedAnnealing" "', argument " "4"" of type '" "ReannealingTrivial const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GaussianSimulatedAnnealing" "', argument " "4"" of type '" "ReannealingTrivial const &""'"); 
    }
    arg4 = reinterpret_cast< ReannealingTrivial * >(argp4);
    ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_GaussianSimulatedAnnealing" "', argument " "5"" of type '" "Real""'");
    } 
    arg5 = static_cast< Real >(val5);
    ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_GaussianSimulatedAnnealing" "', argument " "6"" of type '" "Real""'");
    } 
    arg6 = static_cast< Real >(val6);
    ecode7 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_GaussianSimulatedAnnealing" "', argument " "7"" of type '" "Size""'");
    } 
    arg7 = static_cast< Size >(val7);
    ecode8 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_GaussianSimulatedAnnealing" "', argument " "8"" of type '" "GaussianSimulatedAnnealing::ResetScheme""'");
    } 
    arg8 = static_cast< GaussianSimulatedAnnealing::ResetScheme >(val8);
    {
      try {
        result = (GaussianSimulatedAnnealing *)new GaussianSimulatedAnnealing((SamplerGaussian const &)*arg1,(ProbabilityBoltzmannDownhill const &)*arg2,(TemperatureExponential const &)*arg3,(ReannealingTrivial const &)*arg4,arg5,arg6,arg7,arg8);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GaussianSimulatedAnnealing, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_GaussianSimulatedAnnealing__SWIG_2) {
  {
    SamplerGaussian *arg1 = 0 ;
    ProbabilityBoltzmannDownhill *arg2 = 0 ;
    TemperatureExponential *arg3 = 0 ;
    ReannealingTrivial *arg4 = 0 ;
    Real arg5 ;
    Real arg6 ;
    Size arg7 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    double val5 ;
    int ecode5 = 0 ;
    double val6 ;
    int ecode6 = 0 ;
    size_t val7 ;
    int ecode7 = 0 ;
    int argvi = 0;
    GaussianSimulatedAnnealing *result = 0 ;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: new_GaussianSimulatedAnnealing(sampler,probability,temperature,reannealing,startTemperature,endTemperature,reAnnealSteps);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_SamplerGaussian,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_GaussianSimulatedAnnealing" "', argument " "1"" of type '" "SamplerGaussian const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GaussianSimulatedAnnealing" "', argument " "1"" of type '" "SamplerGaussian const &""'"); 
    }
    arg1 = reinterpret_cast< SamplerGaussian * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_ProbabilityBoltzmannDownhill,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_GaussianSimulatedAnnealing" "', argument " "2"" of type '" "ProbabilityBoltzmannDownhill const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GaussianSimulatedAnnealing" "', argument " "2"" of type '" "ProbabilityBoltzmannDownhill const &""'"); 
    }
    arg2 = reinterpret_cast< ProbabilityBoltzmannDownhill * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_TemperatureExponential,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_GaussianSimulatedAnnealing" "', argument " "3"" of type '" "TemperatureExponential const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GaussianSimulatedAnnealing" "', argument " "3"" of type '" "TemperatureExponential const &""'"); 
    }
    arg3 = reinterpret_cast< TemperatureExponential * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_ReannealingTrivial,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_GaussianSimulatedAnnealing" "', argument " "4"" of type '" "ReannealingTrivial const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GaussianSimulatedAnnealing" "', argument " "4"" of type '" "ReannealingTrivial const &""'"); 
    }
    arg4 = reinterpret_cast< ReannealingTrivial * >(argp4);
    ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_GaussianSimulatedAnnealing" "', argument " "5"" of type '" "Real""'");
    } 
    arg5 = static_cast< Real >(val5);
    ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_GaussianSimulatedAnnealing" "', argument " "6"" of type '" "Real""'");
    } 
    arg6 = static_cast< Real >(val6);
    ecode7 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_GaussianSimulatedAnnealing" "', argument " "7"" of type '" "Size""'");
    } 
    arg7 = static_cast< Size >(val7);
    {
      try {
        result = (GaussianSimulatedAnnealing *)new GaussianSimulatedAnnealing((SamplerGaussian const &)*arg1,(ProbabilityBoltzmannDownhill const &)*arg2,(TemperatureExponential const &)*arg3,(ReannealingTrivial const &)*arg4,arg5,arg6,arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GaussianSimulatedAnnealing, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_GaussianSimulatedAnnealing__SWIG_3) {
  {
    SamplerGaussian *arg1 = 0 ;
    ProbabilityBoltzmannDownhill *arg2 = 0 ;
    TemperatureExponential *arg3 = 0 ;
    ReannealingTrivial *arg4 = 0 ;
    Real arg5 ;
    Real arg6 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    double val5 ;
    int ecode5 = 0 ;
    double val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    GaussianSimulatedAnnealing *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_GaussianSimulatedAnnealing(sampler,probability,temperature,reannealing,startTemperature,endTemperature);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_SamplerGaussian,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_GaussianSimulatedAnnealing" "', argument " "1"" of type '" "SamplerGaussian const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GaussianSimulatedAnnealing" "', argument " "1"" of type '" "SamplerGaussian const &""'"); 
    }
    arg1 = reinterpret_cast< SamplerGaussian * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_ProbabilityBoltzmannDownhill,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_GaussianSimulatedAnnealing" "', argument " "2"" of type '" "ProbabilityBoltzmannDownhill const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GaussianSimulatedAnnealing" "', argument " "2"" of type '" "ProbabilityBoltzmannDownhill const &""'"); 
    }
    arg2 = reinterpret_cast< ProbabilityBoltzmannDownhill * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_TemperatureExponential,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_GaussianSimulatedAnnealing" "', argument " "3"" of type '" "TemperatureExponential const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GaussianSimulatedAnnealing" "', argument " "3"" of type '" "TemperatureExponential const &""'"); 
    }
    arg3 = reinterpret_cast< TemperatureExponential * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_ReannealingTrivial,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_GaussianSimulatedAnnealing" "', argument " "4"" of type '" "ReannealingTrivial const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GaussianSimulatedAnnealing" "', argument " "4"" of type '" "ReannealingTrivial const &""'"); 
    }
    arg4 = reinterpret_cast< ReannealingTrivial * >(argp4);
    ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_GaussianSimulatedAnnealing" "', argument " "5"" of type '" "Real""'");
    } 
    arg5 = static_cast< Real >(val5);
    ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_GaussianSimulatedAnnealing" "', argument " "6"" of type '" "Real""'");
    } 
    arg6 = static_cast< Real >(val6);
    {
      try {
        result = (GaussianSimulatedAnnealing *)new GaussianSimulatedAnnealing((SamplerGaussian const &)*arg1,(ProbabilityBoltzmannDownhill const &)*arg2,(TemperatureExponential const &)*arg3,(ReannealingTrivial const &)*arg4,arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GaussianSimulatedAnnealing, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_GaussianSimulatedAnnealing__SWIG_4) {
  {
    SamplerGaussian *arg1 = 0 ;
    ProbabilityBoltzmannDownhill *arg2 = 0 ;
    TemperatureExponential *arg3 = 0 ;
    ReannealingTrivial *arg4 = 0 ;
    Real arg5 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    double val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    GaussianSimulatedAnnealing *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_GaussianSimulatedAnnealing(sampler,probability,temperature,reannealing,startTemperature);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_SamplerGaussian,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_GaussianSimulatedAnnealing" "', argument " "1"" of type '" "SamplerGaussian const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GaussianSimulatedAnnealing" "', argument " "1"" of type '" "SamplerGaussian const &""'"); 
    }
    arg1 = reinterpret_cast< SamplerGaussian * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_ProbabilityBoltzmannDownhill,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_GaussianSimulatedAnnealing" "', argument " "2"" of type '" "ProbabilityBoltzmannDownhill const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GaussianSimulatedAnnealing" "', argument " "2"" of type '" "ProbabilityBoltzmannDownhill const &""'"); 
    }
    arg2 = reinterpret_cast< ProbabilityBoltzmannDownhill * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_TemperatureExponential,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_GaussianSimulatedAnnealing" "', argument " "3"" of type '" "TemperatureExponential const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GaussianSimulatedAnnealing" "', argument " "3"" of type '" "TemperatureExponential const &""'"); 
    }
    arg3 = reinterpret_cast< TemperatureExponential * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_ReannealingTrivial,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_GaussianSimulatedAnnealing" "', argument " "4"" of type '" "ReannealingTrivial const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GaussianSimulatedAnnealing" "', argument " "4"" of type '" "ReannealingTrivial const &""'"); 
    }
    arg4 = reinterpret_cast< ReannealingTrivial * >(argp4);
    ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_GaussianSimulatedAnnealing" "', argument " "5"" of type '" "Real""'");
    } 
    arg5 = static_cast< Real >(val5);
    {
      try {
        result = (GaussianSimulatedAnnealing *)new GaussianSimulatedAnnealing((SamplerGaussian const &)*arg1,(ProbabilityBoltzmannDownhill const &)*arg2,(TemperatureExponential const &)*arg3,(ReannealingTrivial const &)*arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GaussianSimulatedAnnealing, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_GaussianSimulatedAnnealing__SWIG_5) {
  {
    SamplerGaussian *arg1 = 0 ;
    ProbabilityBoltzmannDownhill *arg2 = 0 ;
    TemperatureExponential *arg3 = 0 ;
    ReannealingTrivial *arg4 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int argvi = 0;
    GaussianSimulatedAnnealing *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_GaussianSimulatedAnnealing(sampler,probability,temperature,reannealing);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_SamplerGaussian,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_GaussianSimulatedAnnealing" "', argument " "1"" of type '" "SamplerGaussian const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GaussianSimulatedAnnealing" "', argument " "1"" of type '" "SamplerGaussian const &""'"); 
    }
    arg1 = reinterpret_cast< SamplerGaussian * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_ProbabilityBoltzmannDownhill,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_GaussianSimulatedAnnealing" "', argument " "2"" of type '" "ProbabilityBoltzmannDownhill const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GaussianSimulatedAnnealing" "', argument " "2"" of type '" "ProbabilityBoltzmannDownhill const &""'"); 
    }
    arg2 = reinterpret_cast< ProbabilityBoltzmannDownhill * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_TemperatureExponential,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_GaussianSimulatedAnnealing" "', argument " "3"" of type '" "TemperatureExponential const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GaussianSimulatedAnnealing" "', argument " "3"" of type '" "TemperatureExponential const &""'"); 
    }
    arg3 = reinterpret_cast< TemperatureExponential * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_ReannealingTrivial,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_GaussianSimulatedAnnealing" "', argument " "4"" of type '" "ReannealingTrivial const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GaussianSimulatedAnnealing" "', argument " "4"" of type '" "ReannealingTrivial const &""'"); 
    }
    arg4 = reinterpret_cast< ReannealingTrivial * >(argp4);
    {
      try {
        result = (GaussianSimulatedAnnealing *)new GaussianSimulatedAnnealing((SamplerGaussian const &)*arg1,(ProbabilityBoltzmannDownhill const &)*arg2,(TemperatureExponential const &)*arg3,(ReannealingTrivial const &)*arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GaussianSimulatedAnnealing, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_GaussianSimulatedAnnealing__SWIG_6) {
  {
    SamplerGaussian *arg1 = 0 ;
    ProbabilityBoltzmannDownhill *arg2 = 0 ;
    TemperatureExponential *arg3 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    GaussianSimulatedAnnealing *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_GaussianSimulatedAnnealing(sampler,probability,temperature);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_SamplerGaussian,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_GaussianSimulatedAnnealing" "', argument " "1"" of type '" "SamplerGaussian const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GaussianSimulatedAnnealing" "', argument " "1"" of type '" "SamplerGaussian const &""'"); 
    }
    arg1 = reinterpret_cast< SamplerGaussian * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_ProbabilityBoltzmannDownhill,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_GaussianSimulatedAnnealing" "', argument " "2"" of type '" "ProbabilityBoltzmannDownhill const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GaussianSimulatedAnnealing" "', argument " "2"" of type '" "ProbabilityBoltzmannDownhill const &""'"); 
    }
    arg2 = reinterpret_cast< ProbabilityBoltzmannDownhill * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_TemperatureExponential,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_GaussianSimulatedAnnealing" "', argument " "3"" of type '" "TemperatureExponential const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GaussianSimulatedAnnealing" "', argument " "3"" of type '" "TemperatureExponential const &""'"); 
    }
    arg3 = reinterpret_cast< TemperatureExponential * >(argp3);
    {
      try {
        result = (GaussianSimulatedAnnealing *)new GaussianSimulatedAnnealing((SamplerGaussian const &)*arg1,(ProbabilityBoltzmannDownhill const &)*arg2,(TemperatureExponential const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GaussianSimulatedAnnealing, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_GaussianSimulatedAnnealing) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SamplerGaussian, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_ProbabilityBoltzmannDownhill, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_TemperatureExponential, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SamplerGaussian, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_ProbabilityBoltzmannDownhill, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_TemperatureExponential, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_ReannealingTrivial, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SamplerGaussian, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_ProbabilityBoltzmannDownhill, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_TemperatureExponential, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_ReannealingTrivial, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SamplerGaussian, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_ProbabilityBoltzmannDownhill, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_TemperatureExponential, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_ReannealingTrivial, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SamplerGaussian, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_ProbabilityBoltzmannDownhill, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_TemperatureExponential, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_ReannealingTrivial, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 8) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SamplerGaussian, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_ProbabilityBoltzmannDownhill, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_TemperatureExponential, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_ReannealingTrivial, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
    if (items == 9) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SamplerGaussian, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_ProbabilityBoltzmannDownhill, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_TemperatureExponential, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_ReannealingTrivial, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(8), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 7;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_7:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_GaussianSimulatedAnnealing__SWIG_6); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_GaussianSimulatedAnnealing__SWIG_5); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_GaussianSimulatedAnnealing__SWIG_4); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_GaussianSimulatedAnnealing__SWIG_3); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_GaussianSimulatedAnnealing__SWIG_2); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_GaussianSimulatedAnnealing__SWIG_1); return;
    case 7:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_GaussianSimulatedAnnealing__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_GaussianSimulatedAnnealing'");
  XSRETURN(0);
}


XS(_wrap_delete_GaussianSimulatedAnnealing) {
  {
    GaussianSimulatedAnnealing *arg1 = (GaussianSimulatedAnnealing *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_GaussianSimulatedAnnealing(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GaussianSimulatedAnnealing, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GaussianSimulatedAnnealing" "', argument " "1"" of type '" "GaussianSimulatedAnnealing *""'"); 
    }
    arg1 = reinterpret_cast< GaussianSimulatedAnnealing * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MirrorGaussianSimulatedAnnealing__SWIG_0) {
  {
    SamplerMirrorGaussian *arg1 = 0 ;
    ProbabilityBoltzmannDownhill *arg2 = 0 ;
    TemperatureExponential *arg3 = 0 ;
    ReannealingTrivial *arg4 = 0 ;
    Real arg5 ;
    Real arg6 ;
    Size arg7 ;
    MirrorGaussianSimulatedAnnealing::ResetScheme arg8 ;
    Size arg9 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    double val5 ;
    int ecode5 = 0 ;
    double val6 ;
    int ecode6 = 0 ;
    size_t val7 ;
    int ecode7 = 0 ;
    int val8 ;
    int ecode8 = 0 ;
    size_t val9 ;
    int ecode9 = 0 ;
    int argvi = 0;
    MirrorGaussianSimulatedAnnealing *result = 0 ;
    dXSARGS;
    
    if ((items < 9) || (items > 9)) {
      SWIG_croak("Usage: new_MirrorGaussianSimulatedAnnealing(sampler,probability,temperature,reannealing,startTemperature,endTemperature,reAnnealSteps,resetScheme,resetSteps);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_SamplerMirrorGaussian,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MirrorGaussianSimulatedAnnealing" "', argument " "1"" of type '" "SamplerMirrorGaussian const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MirrorGaussianSimulatedAnnealing" "', argument " "1"" of type '" "SamplerMirrorGaussian const &""'"); 
    }
    arg1 = reinterpret_cast< SamplerMirrorGaussian * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_ProbabilityBoltzmannDownhill,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MirrorGaussianSimulatedAnnealing" "', argument " "2"" of type '" "ProbabilityBoltzmannDownhill const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MirrorGaussianSimulatedAnnealing" "', argument " "2"" of type '" "ProbabilityBoltzmannDownhill const &""'"); 
    }
    arg2 = reinterpret_cast< ProbabilityBoltzmannDownhill * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_TemperatureExponential,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_MirrorGaussianSimulatedAnnealing" "', argument " "3"" of type '" "TemperatureExponential const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MirrorGaussianSimulatedAnnealing" "', argument " "3"" of type '" "TemperatureExponential const &""'"); 
    }
    arg3 = reinterpret_cast< TemperatureExponential * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_ReannealingTrivial,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_MirrorGaussianSimulatedAnnealing" "', argument " "4"" of type '" "ReannealingTrivial const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MirrorGaussianSimulatedAnnealing" "', argument " "4"" of type '" "ReannealingTrivial const &""'"); 
    }
    arg4 = reinterpret_cast< ReannealingTrivial * >(argp4);
    ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_MirrorGaussianSimulatedAnnealing" "', argument " "5"" of type '" "Real""'");
    } 
    arg5 = static_cast< Real >(val5);
    ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_MirrorGaussianSimulatedAnnealing" "', argument " "6"" of type '" "Real""'");
    } 
    arg6 = static_cast< Real >(val6);
    ecode7 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_MirrorGaussianSimulatedAnnealing" "', argument " "7"" of type '" "Size""'");
    } 
    arg7 = static_cast< Size >(val7);
    ecode8 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_MirrorGaussianSimulatedAnnealing" "', argument " "8"" of type '" "MirrorGaussianSimulatedAnnealing::ResetScheme""'");
    } 
    arg8 = static_cast< MirrorGaussianSimulatedAnnealing::ResetScheme >(val8);
    ecode9 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(8), &val9);
    if (!SWIG_IsOK(ecode9)) {
      SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "new_MirrorGaussianSimulatedAnnealing" "', argument " "9"" of type '" "Size""'");
    } 
    arg9 = static_cast< Size >(val9);
    {
      try {
        result = (MirrorGaussianSimulatedAnnealing *)new MirrorGaussianSimulatedAnnealing((SamplerMirrorGaussian const &)*arg1,(ProbabilityBoltzmannDownhill const &)*arg2,(TemperatureExponential const &)*arg3,(ReannealingTrivial const &)*arg4,arg5,arg6,arg7,arg8,arg9);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MirrorGaussianSimulatedAnnealing, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MirrorGaussianSimulatedAnnealing__SWIG_1) {
  {
    SamplerMirrorGaussian *arg1 = 0 ;
    ProbabilityBoltzmannDownhill *arg2 = 0 ;
    TemperatureExponential *arg3 = 0 ;
    ReannealingTrivial *arg4 = 0 ;
    Real arg5 ;
    Real arg6 ;
    Size arg7 ;
    MirrorGaussianSimulatedAnnealing::ResetScheme arg8 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    double val5 ;
    int ecode5 = 0 ;
    double val6 ;
    int ecode6 = 0 ;
    size_t val7 ;
    int ecode7 = 0 ;
    int val8 ;
    int ecode8 = 0 ;
    int argvi = 0;
    MirrorGaussianSimulatedAnnealing *result = 0 ;
    dXSARGS;
    
    if ((items < 8) || (items > 8)) {
      SWIG_croak("Usage: new_MirrorGaussianSimulatedAnnealing(sampler,probability,temperature,reannealing,startTemperature,endTemperature,reAnnealSteps,resetScheme);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_SamplerMirrorGaussian,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MirrorGaussianSimulatedAnnealing" "', argument " "1"" of type '" "SamplerMirrorGaussian const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MirrorGaussianSimulatedAnnealing" "', argument " "1"" of type '" "SamplerMirrorGaussian const &""'"); 
    }
    arg1 = reinterpret_cast< SamplerMirrorGaussian * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_ProbabilityBoltzmannDownhill,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MirrorGaussianSimulatedAnnealing" "', argument " "2"" of type '" "ProbabilityBoltzmannDownhill const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MirrorGaussianSimulatedAnnealing" "', argument " "2"" of type '" "ProbabilityBoltzmannDownhill const &""'"); 
    }
    arg2 = reinterpret_cast< ProbabilityBoltzmannDownhill * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_TemperatureExponential,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_MirrorGaussianSimulatedAnnealing" "', argument " "3"" of type '" "TemperatureExponential const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MirrorGaussianSimulatedAnnealing" "', argument " "3"" of type '" "TemperatureExponential const &""'"); 
    }
    arg3 = reinterpret_cast< TemperatureExponential * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_ReannealingTrivial,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_MirrorGaussianSimulatedAnnealing" "', argument " "4"" of type '" "ReannealingTrivial const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MirrorGaussianSimulatedAnnealing" "', argument " "4"" of type '" "ReannealingTrivial const &""'"); 
    }
    arg4 = reinterpret_cast< ReannealingTrivial * >(argp4);
    ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_MirrorGaussianSimulatedAnnealing" "', argument " "5"" of type '" "Real""'");
    } 
    arg5 = static_cast< Real >(val5);
    ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_MirrorGaussianSimulatedAnnealing" "', argument " "6"" of type '" "Real""'");
    } 
    arg6 = static_cast< Real >(val6);
    ecode7 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_MirrorGaussianSimulatedAnnealing" "', argument " "7"" of type '" "Size""'");
    } 
    arg7 = static_cast< Size >(val7);
    ecode8 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_MirrorGaussianSimulatedAnnealing" "', argument " "8"" of type '" "MirrorGaussianSimulatedAnnealing::ResetScheme""'");
    } 
    arg8 = static_cast< MirrorGaussianSimulatedAnnealing::ResetScheme >(val8);
    {
      try {
        result = (MirrorGaussianSimulatedAnnealing *)new MirrorGaussianSimulatedAnnealing((SamplerMirrorGaussian const &)*arg1,(ProbabilityBoltzmannDownhill const &)*arg2,(TemperatureExponential const &)*arg3,(ReannealingTrivial const &)*arg4,arg5,arg6,arg7,arg8);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MirrorGaussianSimulatedAnnealing, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MirrorGaussianSimulatedAnnealing__SWIG_2) {
  {
    SamplerMirrorGaussian *arg1 = 0 ;
    ProbabilityBoltzmannDownhill *arg2 = 0 ;
    TemperatureExponential *arg3 = 0 ;
    ReannealingTrivial *arg4 = 0 ;
    Real arg5 ;
    Real arg6 ;
    Size arg7 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    double val5 ;
    int ecode5 = 0 ;
    double val6 ;
    int ecode6 = 0 ;
    size_t val7 ;
    int ecode7 = 0 ;
    int argvi = 0;
    MirrorGaussianSimulatedAnnealing *result = 0 ;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: new_MirrorGaussianSimulatedAnnealing(sampler,probability,temperature,reannealing,startTemperature,endTemperature,reAnnealSteps);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_SamplerMirrorGaussian,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MirrorGaussianSimulatedAnnealing" "', argument " "1"" of type '" "SamplerMirrorGaussian const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MirrorGaussianSimulatedAnnealing" "', argument " "1"" of type '" "SamplerMirrorGaussian const &""'"); 
    }
    arg1 = reinterpret_cast< SamplerMirrorGaussian * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_ProbabilityBoltzmannDownhill,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MirrorGaussianSimulatedAnnealing" "', argument " "2"" of type '" "ProbabilityBoltzmannDownhill const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MirrorGaussianSimulatedAnnealing" "', argument " "2"" of type '" "ProbabilityBoltzmannDownhill const &""'"); 
    }
    arg2 = reinterpret_cast< ProbabilityBoltzmannDownhill * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_TemperatureExponential,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_MirrorGaussianSimulatedAnnealing" "', argument " "3"" of type '" "TemperatureExponential const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MirrorGaussianSimulatedAnnealing" "', argument " "3"" of type '" "TemperatureExponential const &""'"); 
    }
    arg3 = reinterpret_cast< TemperatureExponential * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_ReannealingTrivial,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_MirrorGaussianSimulatedAnnealing" "', argument " "4"" of type '" "ReannealingTrivial const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MirrorGaussianSimulatedAnnealing" "', argument " "4"" of type '" "ReannealingTrivial const &""'"); 
    }
    arg4 = reinterpret_cast< ReannealingTrivial * >(argp4);
    ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_MirrorGaussianSimulatedAnnealing" "', argument " "5"" of type '" "Real""'");
    } 
    arg5 = static_cast< Real >(val5);
    ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_MirrorGaussianSimulatedAnnealing" "', argument " "6"" of type '" "Real""'");
    } 
    arg6 = static_cast< Real >(val6);
    ecode7 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_MirrorGaussianSimulatedAnnealing" "', argument " "7"" of type '" "Size""'");
    } 
    arg7 = static_cast< Size >(val7);
    {
      try {
        result = (MirrorGaussianSimulatedAnnealing *)new MirrorGaussianSimulatedAnnealing((SamplerMirrorGaussian const &)*arg1,(ProbabilityBoltzmannDownhill const &)*arg2,(TemperatureExponential const &)*arg3,(ReannealingTrivial const &)*arg4,arg5,arg6,arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MirrorGaussianSimulatedAnnealing, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MirrorGaussianSimulatedAnnealing__SWIG_3) {
  {
    SamplerMirrorGaussian *arg1 = 0 ;
    ProbabilityBoltzmannDownhill *arg2 = 0 ;
    TemperatureExponential *arg3 = 0 ;
    ReannealingTrivial *arg4 = 0 ;
    Real arg5 ;
    Real arg6 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    double val5 ;
    int ecode5 = 0 ;
    double val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    MirrorGaussianSimulatedAnnealing *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_MirrorGaussianSimulatedAnnealing(sampler,probability,temperature,reannealing,startTemperature,endTemperature);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_SamplerMirrorGaussian,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MirrorGaussianSimulatedAnnealing" "', argument " "1"" of type '" "SamplerMirrorGaussian const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MirrorGaussianSimulatedAnnealing" "', argument " "1"" of type '" "SamplerMirrorGaussian const &""'"); 
    }
    arg1 = reinterpret_cast< SamplerMirrorGaussian * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_ProbabilityBoltzmannDownhill,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MirrorGaussianSimulatedAnnealing" "', argument " "2"" of type '" "ProbabilityBoltzmannDownhill const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MirrorGaussianSimulatedAnnealing" "', argument " "2"" of type '" "ProbabilityBoltzmannDownhill const &""'"); 
    }
    arg2 = reinterpret_cast< ProbabilityBoltzmannDownhill * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_TemperatureExponential,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_MirrorGaussianSimulatedAnnealing" "', argument " "3"" of type '" "TemperatureExponential const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MirrorGaussianSimulatedAnnealing" "', argument " "3"" of type '" "TemperatureExponential const &""'"); 
    }
    arg3 = reinterpret_cast< TemperatureExponential * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_ReannealingTrivial,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_MirrorGaussianSimulatedAnnealing" "', argument " "4"" of type '" "ReannealingTrivial const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MirrorGaussianSimulatedAnnealing" "', argument " "4"" of type '" "ReannealingTrivial const &""'"); 
    }
    arg4 = reinterpret_cast< ReannealingTrivial * >(argp4);
    ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_MirrorGaussianSimulatedAnnealing" "', argument " "5"" of type '" "Real""'");
    } 
    arg5 = static_cast< Real >(val5);
    ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_MirrorGaussianSimulatedAnnealing" "', argument " "6"" of type '" "Real""'");
    } 
    arg6 = static_cast< Real >(val6);
    {
      try {
        result = (MirrorGaussianSimulatedAnnealing *)new MirrorGaussianSimulatedAnnealing((SamplerMirrorGaussian const &)*arg1,(ProbabilityBoltzmannDownhill const &)*arg2,(TemperatureExponential const &)*arg3,(ReannealingTrivial const &)*arg4,arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MirrorGaussianSimulatedAnnealing, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MirrorGaussianSimulatedAnnealing__SWIG_4) {
  {
    SamplerMirrorGaussian *arg1 = 0 ;
    ProbabilityBoltzmannDownhill *arg2 = 0 ;
    TemperatureExponential *arg3 = 0 ;
    ReannealingTrivial *arg4 = 0 ;
    Real arg5 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    double val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    MirrorGaussianSimulatedAnnealing *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_MirrorGaussianSimulatedAnnealing(sampler,probability,temperature,reannealing,startTemperature);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_SamplerMirrorGaussian,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MirrorGaussianSimulatedAnnealing" "', argument " "1"" of type '" "SamplerMirrorGaussian const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MirrorGaussianSimulatedAnnealing" "', argument " "1"" of type '" "SamplerMirrorGaussian const &""'"); 
    }
    arg1 = reinterpret_cast< SamplerMirrorGaussian * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_ProbabilityBoltzmannDownhill,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MirrorGaussianSimulatedAnnealing" "', argument " "2"" of type '" "ProbabilityBoltzmannDownhill const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MirrorGaussianSimulatedAnnealing" "', argument " "2"" of type '" "ProbabilityBoltzmannDownhill const &""'"); 
    }
    arg2 = reinterpret_cast< ProbabilityBoltzmannDownhill * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_TemperatureExponential,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_MirrorGaussianSimulatedAnnealing" "', argument " "3"" of type '" "TemperatureExponential const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MirrorGaussianSimulatedAnnealing" "', argument " "3"" of type '" "TemperatureExponential const &""'"); 
    }
    arg3 = reinterpret_cast< TemperatureExponential * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_ReannealingTrivial,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_MirrorGaussianSimulatedAnnealing" "', argument " "4"" of type '" "ReannealingTrivial const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MirrorGaussianSimulatedAnnealing" "', argument " "4"" of type '" "ReannealingTrivial const &""'"); 
    }
    arg4 = reinterpret_cast< ReannealingTrivial * >(argp4);
    ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_MirrorGaussianSimulatedAnnealing" "', argument " "5"" of type '" "Real""'");
    } 
    arg5 = static_cast< Real >(val5);
    {
      try {
        result = (MirrorGaussianSimulatedAnnealing *)new MirrorGaussianSimulatedAnnealing((SamplerMirrorGaussian const &)*arg1,(ProbabilityBoltzmannDownhill const &)*arg2,(TemperatureExponential const &)*arg3,(ReannealingTrivial const &)*arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MirrorGaussianSimulatedAnnealing, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MirrorGaussianSimulatedAnnealing__SWIG_5) {
  {
    SamplerMirrorGaussian *arg1 = 0 ;
    ProbabilityBoltzmannDownhill *arg2 = 0 ;
    TemperatureExponential *arg3 = 0 ;
    ReannealingTrivial *arg4 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int argvi = 0;
    MirrorGaussianSimulatedAnnealing *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_MirrorGaussianSimulatedAnnealing(sampler,probability,temperature,reannealing);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_SamplerMirrorGaussian,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MirrorGaussianSimulatedAnnealing" "', argument " "1"" of type '" "SamplerMirrorGaussian const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MirrorGaussianSimulatedAnnealing" "', argument " "1"" of type '" "SamplerMirrorGaussian const &""'"); 
    }
    arg1 = reinterpret_cast< SamplerMirrorGaussian * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_ProbabilityBoltzmannDownhill,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MirrorGaussianSimulatedAnnealing" "', argument " "2"" of type '" "ProbabilityBoltzmannDownhill const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MirrorGaussianSimulatedAnnealing" "', argument " "2"" of type '" "ProbabilityBoltzmannDownhill const &""'"); 
    }
    arg2 = reinterpret_cast< ProbabilityBoltzmannDownhill * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_TemperatureExponential,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_MirrorGaussianSimulatedAnnealing" "', argument " "3"" of type '" "TemperatureExponential const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MirrorGaussianSimulatedAnnealing" "', argument " "3"" of type '" "TemperatureExponential const &""'"); 
    }
    arg3 = reinterpret_cast< TemperatureExponential * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_ReannealingTrivial,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_MirrorGaussianSimulatedAnnealing" "', argument " "4"" of type '" "ReannealingTrivial const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MirrorGaussianSimulatedAnnealing" "', argument " "4"" of type '" "ReannealingTrivial const &""'"); 
    }
    arg4 = reinterpret_cast< ReannealingTrivial * >(argp4);
    {
      try {
        result = (MirrorGaussianSimulatedAnnealing *)new MirrorGaussianSimulatedAnnealing((SamplerMirrorGaussian const &)*arg1,(ProbabilityBoltzmannDownhill const &)*arg2,(TemperatureExponential const &)*arg3,(ReannealingTrivial const &)*arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MirrorGaussianSimulatedAnnealing, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MirrorGaussianSimulatedAnnealing__SWIG_6) {
  {
    SamplerMirrorGaussian *arg1 = 0 ;
    ProbabilityBoltzmannDownhill *arg2 = 0 ;
    TemperatureExponential *arg3 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    MirrorGaussianSimulatedAnnealing *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_MirrorGaussianSimulatedAnnealing(sampler,probability,temperature);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_SamplerMirrorGaussian,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MirrorGaussianSimulatedAnnealing" "', argument " "1"" of type '" "SamplerMirrorGaussian const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MirrorGaussianSimulatedAnnealing" "', argument " "1"" of type '" "SamplerMirrorGaussian const &""'"); 
    }
    arg1 = reinterpret_cast< SamplerMirrorGaussian * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_ProbabilityBoltzmannDownhill,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MirrorGaussianSimulatedAnnealing" "', argument " "2"" of type '" "ProbabilityBoltzmannDownhill const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MirrorGaussianSimulatedAnnealing" "', argument " "2"" of type '" "ProbabilityBoltzmannDownhill const &""'"); 
    }
    arg2 = reinterpret_cast< ProbabilityBoltzmannDownhill * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_TemperatureExponential,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_MirrorGaussianSimulatedAnnealing" "', argument " "3"" of type '" "TemperatureExponential const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MirrorGaussianSimulatedAnnealing" "', argument " "3"" of type '" "TemperatureExponential const &""'"); 
    }
    arg3 = reinterpret_cast< TemperatureExponential * >(argp3);
    {
      try {
        result = (MirrorGaussianSimulatedAnnealing *)new MirrorGaussianSimulatedAnnealing((SamplerMirrorGaussian const &)*arg1,(ProbabilityBoltzmannDownhill const &)*arg2,(TemperatureExponential const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MirrorGaussianSimulatedAnnealing, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MirrorGaussianSimulatedAnnealing) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SamplerMirrorGaussian, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_ProbabilityBoltzmannDownhill, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_TemperatureExponential, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SamplerMirrorGaussian, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_ProbabilityBoltzmannDownhill, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_TemperatureExponential, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_ReannealingTrivial, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SamplerMirrorGaussian, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_ProbabilityBoltzmannDownhill, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_TemperatureExponential, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_ReannealingTrivial, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SamplerMirrorGaussian, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_ProbabilityBoltzmannDownhill, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_TemperatureExponential, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_ReannealingTrivial, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SamplerMirrorGaussian, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_ProbabilityBoltzmannDownhill, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_TemperatureExponential, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_ReannealingTrivial, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 8) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SamplerMirrorGaussian, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_ProbabilityBoltzmannDownhill, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_TemperatureExponential, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_ReannealingTrivial, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
    if (items == 9) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SamplerMirrorGaussian, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_ProbabilityBoltzmannDownhill, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_TemperatureExponential, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_ReannealingTrivial, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(8), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 7;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_7:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MirrorGaussianSimulatedAnnealing__SWIG_6); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MirrorGaussianSimulatedAnnealing__SWIG_5); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MirrorGaussianSimulatedAnnealing__SWIG_4); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MirrorGaussianSimulatedAnnealing__SWIG_3); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MirrorGaussianSimulatedAnnealing__SWIG_2); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MirrorGaussianSimulatedAnnealing__SWIG_1); return;
    case 7:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MirrorGaussianSimulatedAnnealing__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_MirrorGaussianSimulatedAnnealing'");
  XSRETURN(0);
}


XS(_wrap_delete_MirrorGaussianSimulatedAnnealing) {
  {
    MirrorGaussianSimulatedAnnealing *arg1 = (MirrorGaussianSimulatedAnnealing *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_MirrorGaussianSimulatedAnnealing(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_MirrorGaussianSimulatedAnnealing, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MirrorGaussianSimulatedAnnealing" "', argument " "1"" of type '" "MirrorGaussianSimulatedAnnealing *""'"); 
    }
    arg1 = reinterpret_cast< MirrorGaussianSimulatedAnnealing * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_LogNormalSimulatedAnnealing__SWIG_0) {
  {
    SamplerLogNormal *arg1 = 0 ;
    ProbabilityBoltzmannDownhill *arg2 = 0 ;
    TemperatureExponential *arg3 = 0 ;
    ReannealingTrivial *arg4 = 0 ;
    Real arg5 ;
    Real arg6 ;
    Size arg7 ;
    LogNormalSimulatedAnnealing::ResetScheme arg8 ;
    Size arg9 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    double val5 ;
    int ecode5 = 0 ;
    double val6 ;
    int ecode6 = 0 ;
    size_t val7 ;
    int ecode7 = 0 ;
    int val8 ;
    int ecode8 = 0 ;
    size_t val9 ;
    int ecode9 = 0 ;
    int argvi = 0;
    LogNormalSimulatedAnnealing *result = 0 ;
    dXSARGS;
    
    if ((items < 9) || (items > 9)) {
      SWIG_croak("Usage: new_LogNormalSimulatedAnnealing(sampler,probability,temperature,reannealing,startTemperature,endTemperature,reAnnealSteps,resetScheme,resetSteps);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_SamplerLogNormal,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_LogNormalSimulatedAnnealing" "', argument " "1"" of type '" "SamplerLogNormal const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LogNormalSimulatedAnnealing" "', argument " "1"" of type '" "SamplerLogNormal const &""'"); 
    }
    arg1 = reinterpret_cast< SamplerLogNormal * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_ProbabilityBoltzmannDownhill,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_LogNormalSimulatedAnnealing" "', argument " "2"" of type '" "ProbabilityBoltzmannDownhill const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LogNormalSimulatedAnnealing" "', argument " "2"" of type '" "ProbabilityBoltzmannDownhill const &""'"); 
    }
    arg2 = reinterpret_cast< ProbabilityBoltzmannDownhill * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_TemperatureExponential,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_LogNormalSimulatedAnnealing" "', argument " "3"" of type '" "TemperatureExponential const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LogNormalSimulatedAnnealing" "', argument " "3"" of type '" "TemperatureExponential const &""'"); 
    }
    arg3 = reinterpret_cast< TemperatureExponential * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_ReannealingTrivial,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_LogNormalSimulatedAnnealing" "', argument " "4"" of type '" "ReannealingTrivial const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LogNormalSimulatedAnnealing" "', argument " "4"" of type '" "ReannealingTrivial const &""'"); 
    }
    arg4 = reinterpret_cast< ReannealingTrivial * >(argp4);
    ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_LogNormalSimulatedAnnealing" "', argument " "5"" of type '" "Real""'");
    } 
    arg5 = static_cast< Real >(val5);
    ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_LogNormalSimulatedAnnealing" "', argument " "6"" of type '" "Real""'");
    } 
    arg6 = static_cast< Real >(val6);
    ecode7 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_LogNormalSimulatedAnnealing" "', argument " "7"" of type '" "Size""'");
    } 
    arg7 = static_cast< Size >(val7);
    ecode8 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_LogNormalSimulatedAnnealing" "', argument " "8"" of type '" "LogNormalSimulatedAnnealing::ResetScheme""'");
    } 
    arg8 = static_cast< LogNormalSimulatedAnnealing::ResetScheme >(val8);
    ecode9 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(8), &val9);
    if (!SWIG_IsOK(ecode9)) {
      SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "new_LogNormalSimulatedAnnealing" "', argument " "9"" of type '" "Size""'");
    } 
    arg9 = static_cast< Size >(val9);
    {
      try {
        result = (LogNormalSimulatedAnnealing *)new LogNormalSimulatedAnnealing((SamplerLogNormal const &)*arg1,(ProbabilityBoltzmannDownhill const &)*arg2,(TemperatureExponential const &)*arg3,(ReannealingTrivial const &)*arg4,arg5,arg6,arg7,arg8,arg9);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_LogNormalSimulatedAnnealing, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_LogNormalSimulatedAnnealing__SWIG_1) {
  {
    SamplerLogNormal *arg1 = 0 ;
    ProbabilityBoltzmannDownhill *arg2 = 0 ;
    TemperatureExponential *arg3 = 0 ;
    ReannealingTrivial *arg4 = 0 ;
    Real arg5 ;
    Real arg6 ;
    Size arg7 ;
    LogNormalSimulatedAnnealing::ResetScheme arg8 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    double val5 ;
    int ecode5 = 0 ;
    double val6 ;
    int ecode6 = 0 ;
    size_t val7 ;
    int ecode7 = 0 ;
    int val8 ;
    int ecode8 = 0 ;
    int argvi = 0;
    LogNormalSimulatedAnnealing *result = 0 ;
    dXSARGS;
    
    if ((items < 8) || (items > 8)) {
      SWIG_croak("Usage: new_LogNormalSimulatedAnnealing(sampler,probability,temperature,reannealing,startTemperature,endTemperature,reAnnealSteps,resetScheme);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_SamplerLogNormal,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_LogNormalSimulatedAnnealing" "', argument " "1"" of type '" "SamplerLogNormal const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LogNormalSimulatedAnnealing" "', argument " "1"" of type '" "SamplerLogNormal const &""'"); 
    }
    arg1 = reinterpret_cast< SamplerLogNormal * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_ProbabilityBoltzmannDownhill,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_LogNormalSimulatedAnnealing" "', argument " "2"" of type '" "ProbabilityBoltzmannDownhill const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LogNormalSimulatedAnnealing" "', argument " "2"" of type '" "ProbabilityBoltzmannDownhill const &""'"); 
    }
    arg2 = reinterpret_cast< ProbabilityBoltzmannDownhill * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_TemperatureExponential,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_LogNormalSimulatedAnnealing" "', argument " "3"" of type '" "TemperatureExponential const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LogNormalSimulatedAnnealing" "', argument " "3"" of type '" "TemperatureExponential const &""'"); 
    }
    arg3 = reinterpret_cast< TemperatureExponential * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_ReannealingTrivial,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_LogNormalSimulatedAnnealing" "', argument " "4"" of type '" "ReannealingTrivial const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LogNormalSimulatedAnnealing" "', argument " "4"" of type '" "ReannealingTrivial const &""'"); 
    }
    arg4 = reinterpret_cast< ReannealingTrivial * >(argp4);
    ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_LogNormalSimulatedAnnealing" "', argument " "5"" of type '" "Real""'");
    } 
    arg5 = static_cast< Real >(val5);
    ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_LogNormalSimulatedAnnealing" "', argument " "6"" of type '" "Real""'");
    } 
    arg6 = static_cast< Real >(val6);
    ecode7 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_LogNormalSimulatedAnnealing" "', argument " "7"" of type '" "Size""'");
    } 
    arg7 = static_cast< Size >(val7);
    ecode8 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_LogNormalSimulatedAnnealing" "', argument " "8"" of type '" "LogNormalSimulatedAnnealing::ResetScheme""'");
    } 
    arg8 = static_cast< LogNormalSimulatedAnnealing::ResetScheme >(val8);
    {
      try {
        result = (LogNormalSimulatedAnnealing *)new LogNormalSimulatedAnnealing((SamplerLogNormal const &)*arg1,(ProbabilityBoltzmannDownhill const &)*arg2,(TemperatureExponential const &)*arg3,(ReannealingTrivial const &)*arg4,arg5,arg6,arg7,arg8);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_LogNormalSimulatedAnnealing, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_LogNormalSimulatedAnnealing__SWIG_2) {
  {
    SamplerLogNormal *arg1 = 0 ;
    ProbabilityBoltzmannDownhill *arg2 = 0 ;
    TemperatureExponential *arg3 = 0 ;
    ReannealingTrivial *arg4 = 0 ;
    Real arg5 ;
    Real arg6 ;
    Size arg7 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    double val5 ;
    int ecode5 = 0 ;
    double val6 ;
    int ecode6 = 0 ;
    size_t val7 ;
    int ecode7 = 0 ;
    int argvi = 0;
    LogNormalSimulatedAnnealing *result = 0 ;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: new_LogNormalSimulatedAnnealing(sampler,probability,temperature,reannealing,startTemperature,endTemperature,reAnnealSteps);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_SamplerLogNormal,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_LogNormalSimulatedAnnealing" "', argument " "1"" of type '" "SamplerLogNormal const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LogNormalSimulatedAnnealing" "', argument " "1"" of type '" "SamplerLogNormal const &""'"); 
    }
    arg1 = reinterpret_cast< SamplerLogNormal * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_ProbabilityBoltzmannDownhill,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_LogNormalSimulatedAnnealing" "', argument " "2"" of type '" "ProbabilityBoltzmannDownhill const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LogNormalSimulatedAnnealing" "', argument " "2"" of type '" "ProbabilityBoltzmannDownhill const &""'"); 
    }
    arg2 = reinterpret_cast< ProbabilityBoltzmannDownhill * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_TemperatureExponential,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_LogNormalSimulatedAnnealing" "', argument " "3"" of type '" "TemperatureExponential const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LogNormalSimulatedAnnealing" "', argument " "3"" of type '" "TemperatureExponential const &""'"); 
    }
    arg3 = reinterpret_cast< TemperatureExponential * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_ReannealingTrivial,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_LogNormalSimulatedAnnealing" "', argument " "4"" of type '" "ReannealingTrivial const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LogNormalSimulatedAnnealing" "', argument " "4"" of type '" "ReannealingTrivial const &""'"); 
    }
    arg4 = reinterpret_cast< ReannealingTrivial * >(argp4);
    ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_LogNormalSimulatedAnnealing" "', argument " "5"" of type '" "Real""'");
    } 
    arg5 = static_cast< Real >(val5);
    ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_LogNormalSimulatedAnnealing" "', argument " "6"" of type '" "Real""'");
    } 
    arg6 = static_cast< Real >(val6);
    ecode7 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_LogNormalSimulatedAnnealing" "', argument " "7"" of type '" "Size""'");
    } 
    arg7 = static_cast< Size >(val7);
    {
      try {
        result = (LogNormalSimulatedAnnealing *)new LogNormalSimulatedAnnealing((SamplerLogNormal const &)*arg1,(ProbabilityBoltzmannDownhill const &)*arg2,(TemperatureExponential const &)*arg3,(ReannealingTrivial const &)*arg4,arg5,arg6,arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_LogNormalSimulatedAnnealing, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_LogNormalSimulatedAnnealing__SWIG_3) {
  {
    SamplerLogNormal *arg1 = 0 ;
    ProbabilityBoltzmannDownhill *arg2 = 0 ;
    TemperatureExponential *arg3 = 0 ;
    ReannealingTrivial *arg4 = 0 ;
    Real arg5 ;
    Real arg6 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    double val5 ;
    int ecode5 = 0 ;
    double val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    LogNormalSimulatedAnnealing *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_LogNormalSimulatedAnnealing(sampler,probability,temperature,reannealing,startTemperature,endTemperature);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_SamplerLogNormal,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_LogNormalSimulatedAnnealing" "', argument " "1"" of type '" "SamplerLogNormal const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LogNormalSimulatedAnnealing" "', argument " "1"" of type '" "SamplerLogNormal const &""'"); 
    }
    arg1 = reinterpret_cast< SamplerLogNormal * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_ProbabilityBoltzmannDownhill,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_LogNormalSimulatedAnnealing" "', argument " "2"" of type '" "ProbabilityBoltzmannDownhill const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LogNormalSimulatedAnnealing" "', argument " "2"" of type '" "ProbabilityBoltzmannDownhill const &""'"); 
    }
    arg2 = reinterpret_cast< ProbabilityBoltzmannDownhill * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_TemperatureExponential,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_LogNormalSimulatedAnnealing" "', argument " "3"" of type '" "TemperatureExponential const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LogNormalSimulatedAnnealing" "', argument " "3"" of type '" "TemperatureExponential const &""'"); 
    }
    arg3 = reinterpret_cast< TemperatureExponential * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_ReannealingTrivial,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_LogNormalSimulatedAnnealing" "', argument " "4"" of type '" "ReannealingTrivial const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LogNormalSimulatedAnnealing" "', argument " "4"" of type '" "ReannealingTrivial const &""'"); 
    }
    arg4 = reinterpret_cast< ReannealingTrivial * >(argp4);
    ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_LogNormalSimulatedAnnealing" "', argument " "5"" of type '" "Real""'");
    } 
    arg5 = static_cast< Real >(val5);
    ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_LogNormalSimulatedAnnealing" "', argument " "6"" of type '" "Real""'");
    } 
    arg6 = static_cast< Real >(val6);
    {
      try {
        result = (LogNormalSimulatedAnnealing *)new LogNormalSimulatedAnnealing((SamplerLogNormal const &)*arg1,(ProbabilityBoltzmannDownhill const &)*arg2,(TemperatureExponential const &)*arg3,(ReannealingTrivial const &)*arg4,arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_LogNormalSimulatedAnnealing, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_LogNormalSimulatedAnnealing__SWIG_4) {
  {
    SamplerLogNormal *arg1 = 0 ;
    ProbabilityBoltzmannDownhill *arg2 = 0 ;
    TemperatureExponential *arg3 = 0 ;
    ReannealingTrivial *arg4 = 0 ;
    Real arg5 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    double val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    LogNormalSimulatedAnnealing *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_LogNormalSimulatedAnnealing(sampler,probability,temperature,reannealing,startTemperature);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_SamplerLogNormal,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_LogNormalSimulatedAnnealing" "', argument " "1"" of type '" "SamplerLogNormal const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LogNormalSimulatedAnnealing" "', argument " "1"" of type '" "SamplerLogNormal const &""'"); 
    }
    arg1 = reinterpret_cast< SamplerLogNormal * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_ProbabilityBoltzmannDownhill,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_LogNormalSimulatedAnnealing" "', argument " "2"" of type '" "ProbabilityBoltzmannDownhill const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LogNormalSimulatedAnnealing" "', argument " "2"" of type '" "ProbabilityBoltzmannDownhill const &""'"); 
    }
    arg2 = reinterpret_cast< ProbabilityBoltzmannDownhill * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_TemperatureExponential,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_LogNormalSimulatedAnnealing" "', argument " "3"" of type '" "TemperatureExponential const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LogNormalSimulatedAnnealing" "', argument " "3"" of type '" "TemperatureExponential const &""'"); 
    }
    arg3 = reinterpret_cast< TemperatureExponential * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_ReannealingTrivial,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_LogNormalSimulatedAnnealing" "', argument " "4"" of type '" "ReannealingTrivial const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LogNormalSimulatedAnnealing" "', argument " "4"" of type '" "ReannealingTrivial const &""'"); 
    }
    arg4 = reinterpret_cast< ReannealingTrivial * >(argp4);
    ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_LogNormalSimulatedAnnealing" "', argument " "5"" of type '" "Real""'");
    } 
    arg5 = static_cast< Real >(val5);
    {
      try {
        result = (LogNormalSimulatedAnnealing *)new LogNormalSimulatedAnnealing((SamplerLogNormal const &)*arg1,(ProbabilityBoltzmannDownhill const &)*arg2,(TemperatureExponential const &)*arg3,(ReannealingTrivial const &)*arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_LogNormalSimulatedAnnealing, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_LogNormalSimulatedAnnealing__SWIG_5) {
  {
    SamplerLogNormal *arg1 = 0 ;
    ProbabilityBoltzmannDownhill *arg2 = 0 ;
    TemperatureExponential *arg3 = 0 ;
    ReannealingTrivial *arg4 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int argvi = 0;
    LogNormalSimulatedAnnealing *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_LogNormalSimulatedAnnealing(sampler,probability,temperature,reannealing);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_SamplerLogNormal,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_LogNormalSimulatedAnnealing" "', argument " "1"" of type '" "SamplerLogNormal const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LogNormalSimulatedAnnealing" "', argument " "1"" of type '" "SamplerLogNormal const &""'"); 
    }
    arg1 = reinterpret_cast< SamplerLogNormal * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_ProbabilityBoltzmannDownhill,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_LogNormalSimulatedAnnealing" "', argument " "2"" of type '" "ProbabilityBoltzmannDownhill const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LogNormalSimulatedAnnealing" "', argument " "2"" of type '" "ProbabilityBoltzmannDownhill const &""'"); 
    }
    arg2 = reinterpret_cast< ProbabilityBoltzmannDownhill * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_TemperatureExponential,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_LogNormalSimulatedAnnealing" "', argument " "3"" of type '" "TemperatureExponential const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LogNormalSimulatedAnnealing" "', argument " "3"" of type '" "TemperatureExponential const &""'"); 
    }
    arg3 = reinterpret_cast< TemperatureExponential * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_ReannealingTrivial,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_LogNormalSimulatedAnnealing" "', argument " "4"" of type '" "ReannealingTrivial const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LogNormalSimulatedAnnealing" "', argument " "4"" of type '" "ReannealingTrivial const &""'"); 
    }
    arg4 = reinterpret_cast< ReannealingTrivial * >(argp4);
    {
      try {
        result = (LogNormalSimulatedAnnealing *)new LogNormalSimulatedAnnealing((SamplerLogNormal const &)*arg1,(ProbabilityBoltzmannDownhill const &)*arg2,(TemperatureExponential const &)*arg3,(ReannealingTrivial const &)*arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_LogNormalSimulatedAnnealing, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_LogNormalSimulatedAnnealing__SWIG_6) {
  {
    SamplerLogNormal *arg1 = 0 ;
    ProbabilityBoltzmannDownhill *arg2 = 0 ;
    TemperatureExponential *arg3 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    LogNormalSimulatedAnnealing *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_LogNormalSimulatedAnnealing(sampler,probability,temperature);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_SamplerLogNormal,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_LogNormalSimulatedAnnealing" "', argument " "1"" of type '" "SamplerLogNormal const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LogNormalSimulatedAnnealing" "', argument " "1"" of type '" "SamplerLogNormal const &""'"); 
    }
    arg1 = reinterpret_cast< SamplerLogNormal * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_ProbabilityBoltzmannDownhill,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_LogNormalSimulatedAnnealing" "', argument " "2"" of type '" "ProbabilityBoltzmannDownhill const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LogNormalSimulatedAnnealing" "', argument " "2"" of type '" "ProbabilityBoltzmannDownhill const &""'"); 
    }
    arg2 = reinterpret_cast< ProbabilityBoltzmannDownhill * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_TemperatureExponential,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_LogNormalSimulatedAnnealing" "', argument " "3"" of type '" "TemperatureExponential const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LogNormalSimulatedAnnealing" "', argument " "3"" of type '" "TemperatureExponential const &""'"); 
    }
    arg3 = reinterpret_cast< TemperatureExponential * >(argp3);
    {
      try {
        result = (LogNormalSimulatedAnnealing *)new LogNormalSimulatedAnnealing((SamplerLogNormal const &)*arg1,(ProbabilityBoltzmannDownhill const &)*arg2,(TemperatureExponential const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_LogNormalSimulatedAnnealing, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_LogNormalSimulatedAnnealing) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SamplerLogNormal, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_ProbabilityBoltzmannDownhill, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_TemperatureExponential, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SamplerLogNormal, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_ProbabilityBoltzmannDownhill, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_TemperatureExponential, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_ReannealingTrivial, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SamplerLogNormal, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_ProbabilityBoltzmannDownhill, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_TemperatureExponential, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_ReannealingTrivial, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SamplerLogNormal, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_ProbabilityBoltzmannDownhill, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_TemperatureExponential, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_ReannealingTrivial, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SamplerLogNormal, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_ProbabilityBoltzmannDownhill, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_TemperatureExponential, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_ReannealingTrivial, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 8) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SamplerLogNormal, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_ProbabilityBoltzmannDownhill, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_TemperatureExponential, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_ReannealingTrivial, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
    if (items == 9) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_SamplerLogNormal, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_ProbabilityBoltzmannDownhill, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_TemperatureExponential, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_ReannealingTrivial, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(8), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 7;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_7:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_LogNormalSimulatedAnnealing__SWIG_6); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_LogNormalSimulatedAnnealing__SWIG_5); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_LogNormalSimulatedAnnealing__SWIG_4); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_LogNormalSimulatedAnnealing__SWIG_3); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_LogNormalSimulatedAnnealing__SWIG_2); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_LogNormalSimulatedAnnealing__SWIG_1); return;
    case 7:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_LogNormalSimulatedAnnealing__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_LogNormalSimulatedAnnealing'");
  XSRETURN(0);
}


XS(_wrap_delete_LogNormalSimulatedAnnealing) {
  {
    LogNormalSimulatedAnnealing *arg1 = (LogNormalSimulatedAnnealing *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_LogNormalSimulatedAnnealing(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_LogNormalSimulatedAnnealing, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_LogNormalSimulatedAnnealing" "', argument " "1"" of type '" "LogNormalSimulatedAnnealing *""'"); 
    }
    arg1 = reinterpret_cast< LogNormalSimulatedAnnealing * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Optimizer) {
  {
    int argvi = 0;
    Optimizer *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Optimizer();");
    }
    {
      try {
        result = (Optimizer *)new Optimizer();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Optimizer, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_Optimizer) {
  {
    Optimizer *arg1 = (Optimizer *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Optimizer(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Optimizer, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Optimizer" "', argument " "1"" of type '" "Optimizer *""'"); 
    }
    arg1 = reinterpret_cast< Optimizer * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BlackVolTermStructure___deref__) {
  {
    boost::shared_ptr< BlackVolTermStructure > *arg1 = (boost::shared_ptr< BlackVolTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    BlackVolTermStructure *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BlackVolTermStructure___deref__(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_BlackVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BlackVolTermStructure___deref__" "', argument " "1"" of type '" "boost::shared_ptr< BlackVolTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< BlackVolTermStructure > * >(argp1);
    {
      try {
        result = (BlackVolTermStructure *)(arg1)->operator ->();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BlackVolTermStructure, 0 | 0); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BlackVolTermStructure_isNull) {
  {
    boost::shared_ptr< BlackVolTermStructure > *arg1 = (boost::shared_ptr< BlackVolTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BlackVolTermStructure_isNull(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_BlackVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BlackVolTermStructure_isNull" "', argument " "1"" of type '" "boost::shared_ptr< BlackVolTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< BlackVolTermStructure > * >(argp1);
    {
      try {
        result = (bool)boost_shared_ptr_Sl_BlackVolTermStructure_Sg__isNull(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BlackVolTermStructure_asObservable) {
  {
    boost::shared_ptr< BlackVolTermStructure > *arg1 = (boost::shared_ptr< BlackVolTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    boost::shared_ptr< Observable > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BlackVolTermStructure_asObservable(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_BlackVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BlackVolTermStructure_asObservable" "', argument " "1"" of type '" "boost::shared_ptr< BlackVolTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< BlackVolTermStructure > * >(argp1);
    {
      try {
        result = boost_shared_ptr_Sl_BlackVolTermStructure_Sg__asObservable(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new boost::shared_ptr< Observable >(static_cast< const boost::shared_ptr< Observable >& >(result))), SWIGTYPE_p_boost__shared_ptrT_Observable_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BlackVolTermStructure) {
  {
    int argvi = 0;
    boost::shared_ptr< BlackVolTermStructure > *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_BlackVolTermStructure();");
    }
    {
      try {
        result = (boost::shared_ptr< BlackVolTermStructure > *)new boost::shared_ptr< BlackVolTermStructure >();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_boost__shared_ptrT_BlackVolTermStructure_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_BlackVolTermStructure) {
  {
    boost::shared_ptr< BlackVolTermStructure > *arg1 = (boost::shared_ptr< BlackVolTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_BlackVolTermStructure(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_BlackVolTermStructure_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_BlackVolTermStructure" "', argument " "1"" of type '" "boost::shared_ptr< BlackVolTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< BlackVolTermStructure > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BlackVolTermStructure_referenceDate) {
  {
    boost::shared_ptr< BlackVolTermStructure > *arg1 = (boost::shared_ptr< BlackVolTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BlackVolTermStructure_referenceDate(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_BlackVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BlackVolTermStructure_referenceDate" "', argument " "1"" of type '" "boost::shared_ptr< BlackVolTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< BlackVolTermStructure > * >(argp1);
    {
      try {
        result = (*arg1)->referenceDate();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BlackVolTermStructure_dayCounter) {
  {
    boost::shared_ptr< BlackVolTermStructure > *arg1 = (boost::shared_ptr< BlackVolTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    SwigValueWrapper< DayCounter > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BlackVolTermStructure_dayCounter(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_BlackVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BlackVolTermStructure_dayCounter" "', argument " "1"" of type '" "boost::shared_ptr< BlackVolTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< BlackVolTermStructure > * >(argp1);
    {
      try {
        result = (*arg1)->dayCounter();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new DayCounter(static_cast< const DayCounter& >(result))), SWIGTYPE_p_DayCounter, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BlackVolTermStructure_calendar) {
  {
    boost::shared_ptr< BlackVolTermStructure > *arg1 = (boost::shared_ptr< BlackVolTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    SwigValueWrapper< Calendar > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BlackVolTermStructure_calendar(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_BlackVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BlackVolTermStructure_calendar" "', argument " "1"" of type '" "boost::shared_ptr< BlackVolTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< BlackVolTermStructure > * >(argp1);
    {
      try {
        result = (*arg1)->calendar();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Calendar(static_cast< const Calendar& >(result))), SWIGTYPE_p_Calendar, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BlackVolTermStructure_maxDate) {
  {
    boost::shared_ptr< BlackVolTermStructure > *arg1 = (boost::shared_ptr< BlackVolTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BlackVolTermStructure_maxDate(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_BlackVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BlackVolTermStructure_maxDate" "', argument " "1"" of type '" "boost::shared_ptr< BlackVolTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< BlackVolTermStructure > * >(argp1);
    {
      try {
        result = (*arg1)->maxDate();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BlackVolTermStructure_maxTime) {
  {
    boost::shared_ptr< BlackVolTermStructure > *arg1 = (boost::shared_ptr< BlackVolTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Time result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BlackVolTermStructure_maxTime(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_BlackVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BlackVolTermStructure_maxTime" "', argument " "1"" of type '" "boost::shared_ptr< BlackVolTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< BlackVolTermStructure > * >(argp1);
    {
      try {
        result = (Time)(*arg1)->maxTime();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BlackVolTermStructure_minStrike) {
  {
    boost::shared_ptr< BlackVolTermStructure > *arg1 = (boost::shared_ptr< BlackVolTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BlackVolTermStructure_minStrike(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_BlackVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BlackVolTermStructure_minStrike" "', argument " "1"" of type '" "boost::shared_ptr< BlackVolTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< BlackVolTermStructure > * >(argp1);
    {
      try {
        result = (Real)(*arg1)->minStrike();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BlackVolTermStructure_maxStrike) {
  {
    boost::shared_ptr< BlackVolTermStructure > *arg1 = (boost::shared_ptr< BlackVolTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BlackVolTermStructure_maxStrike(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_BlackVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BlackVolTermStructure_maxStrike" "', argument " "1"" of type '" "boost::shared_ptr< BlackVolTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< BlackVolTermStructure > * >(argp1);
    {
      try {
        result = (Real)(*arg1)->maxStrike();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BlackVolTermStructure_blackVol__SWIG_0) {
  {
    boost::shared_ptr< BlackVolTermStructure > *arg1 = (boost::shared_ptr< BlackVolTermStructure > *) 0 ;
    Date *arg2 = 0 ;
    Real arg3 ;
    bool arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Volatility result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: BlackVolTermStructure_blackVol(self,Date const &,strike,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_BlackVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BlackVolTermStructure_blackVol" "', argument " "1"" of type '" "boost::shared_ptr< BlackVolTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< BlackVolTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BlackVolTermStructure_blackVol" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BlackVolTermStructure_blackVol" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "BlackVolTermStructure_blackVol" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "BlackVolTermStructure_blackVol" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    {
      try {
        result = (Volatility)(*arg1)->blackVol((Date const &)*arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BlackVolTermStructure_blackVol__SWIG_1) {
  {
    boost::shared_ptr< BlackVolTermStructure > *arg1 = (boost::shared_ptr< BlackVolTermStructure > *) 0 ;
    Date *arg2 = 0 ;
    Real arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Volatility result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: BlackVolTermStructure_blackVol(self,Date const &,strike);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_BlackVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BlackVolTermStructure_blackVol" "', argument " "1"" of type '" "boost::shared_ptr< BlackVolTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< BlackVolTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BlackVolTermStructure_blackVol" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BlackVolTermStructure_blackVol" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "BlackVolTermStructure_blackVol" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    {
      try {
        result = (Volatility)(*arg1)->blackVol((Date const &)*arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BlackVolTermStructure_blackVol__SWIG_2) {
  {
    boost::shared_ptr< BlackVolTermStructure > *arg1 = (boost::shared_ptr< BlackVolTermStructure > *) 0 ;
    Time arg2 ;
    Real arg3 ;
    bool arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Volatility result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: BlackVolTermStructure_blackVol(self,Time,strike,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_BlackVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BlackVolTermStructure_blackVol" "', argument " "1"" of type '" "boost::shared_ptr< BlackVolTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< BlackVolTermStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BlackVolTermStructure_blackVol" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "BlackVolTermStructure_blackVol" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "BlackVolTermStructure_blackVol" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    {
      try {
        result = (Volatility)(*arg1)->blackVol(arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BlackVolTermStructure_blackVol__SWIG_3) {
  {
    boost::shared_ptr< BlackVolTermStructure > *arg1 = (boost::shared_ptr< BlackVolTermStructure > *) 0 ;
    Time arg2 ;
    Real arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Volatility result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: BlackVolTermStructure_blackVol(self,Time,strike);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_BlackVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BlackVolTermStructure_blackVol" "', argument " "1"" of type '" "boost::shared_ptr< BlackVolTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< BlackVolTermStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BlackVolTermStructure_blackVol" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "BlackVolTermStructure_blackVol" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    {
      try {
        result = (Volatility)(*arg1)->blackVol(arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BlackVolTermStructure_blackVol) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_BlackVolTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_BlackVolTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_BlackVolTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_BlackVolTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BlackVolTermStructure_blackVol__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BlackVolTermStructure_blackVol__SWIG_3); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BlackVolTermStructure_blackVol__SWIG_0); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BlackVolTermStructure_blackVol__SWIG_2); return;
    }
  }
  
  croak("No matching function for overloaded 'BlackVolTermStructure_blackVol'");
  XSRETURN(0);
}


XS(_wrap_BlackVolTermStructure_blackVariance__SWIG_0) {
  {
    boost::shared_ptr< BlackVolTermStructure > *arg1 = (boost::shared_ptr< BlackVolTermStructure > *) 0 ;
    Date *arg2 = 0 ;
    Real arg3 ;
    bool arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: BlackVolTermStructure_blackVariance(self,Date const &,strike,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_BlackVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BlackVolTermStructure_blackVariance" "', argument " "1"" of type '" "boost::shared_ptr< BlackVolTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< BlackVolTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BlackVolTermStructure_blackVariance" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BlackVolTermStructure_blackVariance" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "BlackVolTermStructure_blackVariance" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "BlackVolTermStructure_blackVariance" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    {
      try {
        result = (Real)(*arg1)->blackVariance((Date const &)*arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BlackVolTermStructure_blackVariance__SWIG_1) {
  {
    boost::shared_ptr< BlackVolTermStructure > *arg1 = (boost::shared_ptr< BlackVolTermStructure > *) 0 ;
    Date *arg2 = 0 ;
    Real arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: BlackVolTermStructure_blackVariance(self,Date const &,strike);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_BlackVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BlackVolTermStructure_blackVariance" "', argument " "1"" of type '" "boost::shared_ptr< BlackVolTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< BlackVolTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BlackVolTermStructure_blackVariance" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BlackVolTermStructure_blackVariance" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "BlackVolTermStructure_blackVariance" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    {
      try {
        result = (Real)(*arg1)->blackVariance((Date const &)*arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BlackVolTermStructure_blackVariance__SWIG_2) {
  {
    boost::shared_ptr< BlackVolTermStructure > *arg1 = (boost::shared_ptr< BlackVolTermStructure > *) 0 ;
    Time arg2 ;
    Real arg3 ;
    bool arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: BlackVolTermStructure_blackVariance(self,Time,strike,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_BlackVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BlackVolTermStructure_blackVariance" "', argument " "1"" of type '" "boost::shared_ptr< BlackVolTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< BlackVolTermStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BlackVolTermStructure_blackVariance" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "BlackVolTermStructure_blackVariance" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "BlackVolTermStructure_blackVariance" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    {
      try {
        result = (Real)(*arg1)->blackVariance(arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BlackVolTermStructure_blackVariance__SWIG_3) {
  {
    boost::shared_ptr< BlackVolTermStructure > *arg1 = (boost::shared_ptr< BlackVolTermStructure > *) 0 ;
    Time arg2 ;
    Real arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: BlackVolTermStructure_blackVariance(self,Time,strike);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_BlackVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BlackVolTermStructure_blackVariance" "', argument " "1"" of type '" "boost::shared_ptr< BlackVolTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< BlackVolTermStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BlackVolTermStructure_blackVariance" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "BlackVolTermStructure_blackVariance" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    {
      try {
        result = (Real)(*arg1)->blackVariance(arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BlackVolTermStructure_blackVariance) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_BlackVolTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_BlackVolTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_BlackVolTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_BlackVolTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BlackVolTermStructure_blackVariance__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BlackVolTermStructure_blackVariance__SWIG_3); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BlackVolTermStructure_blackVariance__SWIG_0); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BlackVolTermStructure_blackVariance__SWIG_2); return;
    }
  }
  
  croak("No matching function for overloaded 'BlackVolTermStructure_blackVariance'");
  XSRETURN(0);
}


XS(_wrap_BlackVolTermStructure_blackForwardVol__SWIG_0) {
  {
    boost::shared_ptr< BlackVolTermStructure > *arg1 = (boost::shared_ptr< BlackVolTermStructure > *) 0 ;
    Date *arg2 = 0 ;
    Date *arg3 = 0 ;
    Real arg4 ;
    bool arg5 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    bool val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    Volatility result;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: BlackVolTermStructure_blackForwardVol(self,Date const &,Date const &,strike,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_BlackVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BlackVolTermStructure_blackForwardVol" "', argument " "1"" of type '" "boost::shared_ptr< BlackVolTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< BlackVolTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BlackVolTermStructure_blackForwardVol" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BlackVolTermStructure_blackForwardVol" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "BlackVolTermStructure_blackForwardVol" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BlackVolTermStructure_blackForwardVol" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "BlackVolTermStructure_blackForwardVol" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "BlackVolTermStructure_blackForwardVol" "', argument " "5"" of type '" "bool""'");
    } 
    arg5 = static_cast< bool >(val5);
    {
      try {
        result = (Volatility)(*arg1)->blackForwardVol((Date const &)*arg2,(Date const &)*arg3,arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BlackVolTermStructure_blackForwardVol__SWIG_1) {
  {
    boost::shared_ptr< BlackVolTermStructure > *arg1 = (boost::shared_ptr< BlackVolTermStructure > *) 0 ;
    Date *arg2 = 0 ;
    Date *arg3 = 0 ;
    Real arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Volatility result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: BlackVolTermStructure_blackForwardVol(self,Date const &,Date const &,strike);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_BlackVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BlackVolTermStructure_blackForwardVol" "', argument " "1"" of type '" "boost::shared_ptr< BlackVolTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< BlackVolTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BlackVolTermStructure_blackForwardVol" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BlackVolTermStructure_blackForwardVol" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "BlackVolTermStructure_blackForwardVol" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BlackVolTermStructure_blackForwardVol" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "BlackVolTermStructure_blackForwardVol" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    {
      try {
        result = (Volatility)(*arg1)->blackForwardVol((Date const &)*arg2,(Date const &)*arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BlackVolTermStructure_blackForwardVol__SWIG_2) {
  {
    boost::shared_ptr< BlackVolTermStructure > *arg1 = (boost::shared_ptr< BlackVolTermStructure > *) 0 ;
    Time arg2 ;
    Time arg3 ;
    Real arg4 ;
    bool arg5 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    bool val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    Volatility result;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: BlackVolTermStructure_blackForwardVol(self,Time,Time,strike,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_BlackVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BlackVolTermStructure_blackForwardVol" "', argument " "1"" of type '" "boost::shared_ptr< BlackVolTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< BlackVolTermStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BlackVolTermStructure_blackForwardVol" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "BlackVolTermStructure_blackForwardVol" "', argument " "3"" of type '" "Time""'");
    } 
    arg3 = static_cast< Time >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "BlackVolTermStructure_blackForwardVol" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "BlackVolTermStructure_blackForwardVol" "', argument " "5"" of type '" "bool""'");
    } 
    arg5 = static_cast< bool >(val5);
    {
      try {
        result = (Volatility)(*arg1)->blackForwardVol(arg2,arg3,arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BlackVolTermStructure_blackForwardVol__SWIG_3) {
  {
    boost::shared_ptr< BlackVolTermStructure > *arg1 = (boost::shared_ptr< BlackVolTermStructure > *) 0 ;
    Time arg2 ;
    Time arg3 ;
    Real arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Volatility result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: BlackVolTermStructure_blackForwardVol(self,Time,Time,strike);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_BlackVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BlackVolTermStructure_blackForwardVol" "', argument " "1"" of type '" "boost::shared_ptr< BlackVolTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< BlackVolTermStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BlackVolTermStructure_blackForwardVol" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "BlackVolTermStructure_blackForwardVol" "', argument " "3"" of type '" "Time""'");
    } 
    arg3 = static_cast< Time >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "BlackVolTermStructure_blackForwardVol" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    {
      try {
        result = (Volatility)(*arg1)->blackForwardVol(arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BlackVolTermStructure_blackForwardVol) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_BlackVolTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_BlackVolTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_BlackVolTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_BlackVolTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BlackVolTermStructure_blackForwardVol__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BlackVolTermStructure_blackForwardVol__SWIG_3); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BlackVolTermStructure_blackForwardVol__SWIG_0); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BlackVolTermStructure_blackForwardVol__SWIG_2); return;
    }
  }
  
  croak("No matching function for overloaded 'BlackVolTermStructure_blackForwardVol'");
  XSRETURN(0);
}


XS(_wrap_BlackVolTermStructure_blackForwardVariance__SWIG_0) {
  {
    boost::shared_ptr< BlackVolTermStructure > *arg1 = (boost::shared_ptr< BlackVolTermStructure > *) 0 ;
    Date *arg2 = 0 ;
    Date *arg3 = 0 ;
    Real arg4 ;
    bool arg5 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    bool val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: BlackVolTermStructure_blackForwardVariance(self,Date const &,Date const &,strike,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_BlackVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BlackVolTermStructure_blackForwardVariance" "', argument " "1"" of type '" "boost::shared_ptr< BlackVolTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< BlackVolTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BlackVolTermStructure_blackForwardVariance" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BlackVolTermStructure_blackForwardVariance" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "BlackVolTermStructure_blackForwardVariance" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BlackVolTermStructure_blackForwardVariance" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "BlackVolTermStructure_blackForwardVariance" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "BlackVolTermStructure_blackForwardVariance" "', argument " "5"" of type '" "bool""'");
    } 
    arg5 = static_cast< bool >(val5);
    {
      try {
        result = (Real)(*arg1)->blackForwardVariance((Date const &)*arg2,(Date const &)*arg3,arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BlackVolTermStructure_blackForwardVariance__SWIG_1) {
  {
    boost::shared_ptr< BlackVolTermStructure > *arg1 = (boost::shared_ptr< BlackVolTermStructure > *) 0 ;
    Date *arg2 = 0 ;
    Date *arg3 = 0 ;
    Real arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: BlackVolTermStructure_blackForwardVariance(self,Date const &,Date const &,strike);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_BlackVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BlackVolTermStructure_blackForwardVariance" "', argument " "1"" of type '" "boost::shared_ptr< BlackVolTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< BlackVolTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BlackVolTermStructure_blackForwardVariance" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BlackVolTermStructure_blackForwardVariance" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "BlackVolTermStructure_blackForwardVariance" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BlackVolTermStructure_blackForwardVariance" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "BlackVolTermStructure_blackForwardVariance" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    {
      try {
        result = (Real)(*arg1)->blackForwardVariance((Date const &)*arg2,(Date const &)*arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BlackVolTermStructure_blackForwardVariance__SWIG_2) {
  {
    boost::shared_ptr< BlackVolTermStructure > *arg1 = (boost::shared_ptr< BlackVolTermStructure > *) 0 ;
    Time arg2 ;
    Time arg3 ;
    Real arg4 ;
    bool arg5 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    bool val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: BlackVolTermStructure_blackForwardVariance(self,Time,Time,strike,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_BlackVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BlackVolTermStructure_blackForwardVariance" "', argument " "1"" of type '" "boost::shared_ptr< BlackVolTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< BlackVolTermStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BlackVolTermStructure_blackForwardVariance" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "BlackVolTermStructure_blackForwardVariance" "', argument " "3"" of type '" "Time""'");
    } 
    arg3 = static_cast< Time >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "BlackVolTermStructure_blackForwardVariance" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "BlackVolTermStructure_blackForwardVariance" "', argument " "5"" of type '" "bool""'");
    } 
    arg5 = static_cast< bool >(val5);
    {
      try {
        result = (Real)(*arg1)->blackForwardVariance(arg2,arg3,arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BlackVolTermStructure_blackForwardVariance__SWIG_3) {
  {
    boost::shared_ptr< BlackVolTermStructure > *arg1 = (boost::shared_ptr< BlackVolTermStructure > *) 0 ;
    Time arg2 ;
    Time arg3 ;
    Real arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: BlackVolTermStructure_blackForwardVariance(self,Time,Time,strike);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_BlackVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BlackVolTermStructure_blackForwardVariance" "', argument " "1"" of type '" "boost::shared_ptr< BlackVolTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< BlackVolTermStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BlackVolTermStructure_blackForwardVariance" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "BlackVolTermStructure_blackForwardVariance" "', argument " "3"" of type '" "Time""'");
    } 
    arg3 = static_cast< Time >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "BlackVolTermStructure_blackForwardVariance" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    {
      try {
        result = (Real)(*arg1)->blackForwardVariance(arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BlackVolTermStructure_blackForwardVariance) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_BlackVolTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_BlackVolTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_BlackVolTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_BlackVolTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BlackVolTermStructure_blackForwardVariance__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BlackVolTermStructure_blackForwardVariance__SWIG_3); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BlackVolTermStructure_blackForwardVariance__SWIG_0); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BlackVolTermStructure_blackForwardVariance__SWIG_2); return;
    }
  }
  
  croak("No matching function for overloaded 'BlackVolTermStructure_blackForwardVariance'");
  XSRETURN(0);
}


XS(_wrap_BlackVolTermStructure_enableExtrapolation) {
  {
    boost::shared_ptr< BlackVolTermStructure > *arg1 = (boost::shared_ptr< BlackVolTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BlackVolTermStructure_enableExtrapolation(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_BlackVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BlackVolTermStructure_enableExtrapolation" "', argument " "1"" of type '" "boost::shared_ptr< BlackVolTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< BlackVolTermStructure > * >(argp1);
    {
      try {
        (*arg1)->enableExtrapolation();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BlackVolTermStructure_disableExtrapolation) {
  {
    boost::shared_ptr< BlackVolTermStructure > *arg1 = (boost::shared_ptr< BlackVolTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BlackVolTermStructure_disableExtrapolation(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_BlackVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BlackVolTermStructure_disableExtrapolation" "', argument " "1"" of type '" "boost::shared_ptr< BlackVolTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< BlackVolTermStructure > * >(argp1);
    {
      try {
        (*arg1)->disableExtrapolation();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BlackVolTermStructure_allowsExtrapolation) {
  {
    boost::shared_ptr< BlackVolTermStructure > *arg1 = (boost::shared_ptr< BlackVolTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BlackVolTermStructure_allowsExtrapolation(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_BlackVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BlackVolTermStructure_allowsExtrapolation" "', argument " "1"" of type '" "boost::shared_ptr< BlackVolTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< BlackVolTermStructure > * >(argp1);
    {
      try {
        result = (bool)(*arg1)->allowsExtrapolation();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BlackVolTermStructureHandle__SWIG_0) {
  {
    boost::shared_ptr< BlackVolTermStructure > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Handle< BlackVolTermStructure > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_BlackVolTermStructureHandle(boost::shared_ptr< BlackVolTermStructure > const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_BlackVolTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_BlackVolTermStructureHandle" "', argument " "1"" of type '" "boost::shared_ptr< BlackVolTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BlackVolTermStructureHandle" "', argument " "1"" of type '" "boost::shared_ptr< BlackVolTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< BlackVolTermStructure > * >(argp1);
    {
      try {
        result = (Handle< BlackVolTermStructure > *)new Handle< BlackVolTermStructure >((boost::shared_ptr< BlackVolTermStructure > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_HandleT_BlackVolTermStructure_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BlackVolTermStructureHandle__SWIG_1) {
  {
    int argvi = 0;
    Handle< BlackVolTermStructure > *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_BlackVolTermStructureHandle();");
    }
    {
      try {
        result = (Handle< BlackVolTermStructure > *)new Handle< BlackVolTermStructure >();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_HandleT_BlackVolTermStructure_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_BlackVolTermStructureHandle) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_BlackVolTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_BlackVolTermStructureHandle__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_BlackVolTermStructureHandle__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_BlackVolTermStructureHandle'");
  XSRETURN(0);
}


XS(_wrap_BlackVolTermStructureHandle___deref__) {
  {
    Handle< BlackVolTermStructure > *arg1 = (Handle< BlackVolTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    boost::shared_ptr< BlackVolTermStructure > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BlackVolTermStructureHandle___deref__(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_BlackVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BlackVolTermStructureHandle___deref__" "', argument " "1"" of type '" "Handle< BlackVolTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< BlackVolTermStructure > * >(argp1);
    {
      try {
        result = (arg1)->operator ->();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new boost::shared_ptr< BlackVolTermStructure >(static_cast< const boost::shared_ptr< BlackVolTermStructure >& >(result))), SWIGTYPE_p_boost__shared_ptrT_BlackVolTermStructure_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BlackVolTermStructureHandle_empty) {
  {
    Handle< BlackVolTermStructure > *arg1 = (Handle< BlackVolTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BlackVolTermStructureHandle_empty(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_BlackVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BlackVolTermStructureHandle_empty" "', argument " "1"" of type '" "Handle< BlackVolTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< BlackVolTermStructure > * >(argp1);
    {
      try {
        result = (bool)(arg1)->empty();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BlackVolTermStructureHandle_asObservable) {
  {
    Handle< BlackVolTermStructure > *arg1 = (Handle< BlackVolTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    boost::shared_ptr< Observable > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BlackVolTermStructureHandle_asObservable(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_BlackVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BlackVolTermStructureHandle_asObservable" "', argument " "1"" of type '" "Handle< BlackVolTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< BlackVolTermStructure > * >(argp1);
    {
      try {
        result = Handle_Sl_BlackVolTermStructure_Sg__asObservable(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new boost::shared_ptr< Observable >(static_cast< const boost::shared_ptr< Observable >& >(result))), SWIGTYPE_p_boost__shared_ptrT_Observable_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_BlackVolTermStructureHandle) {
  {
    Handle< BlackVolTermStructure > *arg1 = (Handle< BlackVolTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_BlackVolTermStructureHandle(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_BlackVolTermStructure_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_BlackVolTermStructureHandle" "', argument " "1"" of type '" "Handle< BlackVolTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< BlackVolTermStructure > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BlackVolTermStructureHandle_referenceDate) {
  {
    Handle< BlackVolTermStructure > *arg1 = (Handle< BlackVolTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BlackVolTermStructureHandle_referenceDate(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_BlackVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BlackVolTermStructureHandle_referenceDate" "', argument " "1"" of type '" "Handle< BlackVolTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< BlackVolTermStructure > * >(argp1);
    {
      try {
        result = (*arg1)->referenceDate();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BlackVolTermStructureHandle_dayCounter) {
  {
    Handle< BlackVolTermStructure > *arg1 = (Handle< BlackVolTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    SwigValueWrapper< DayCounter > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BlackVolTermStructureHandle_dayCounter(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_BlackVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BlackVolTermStructureHandle_dayCounter" "', argument " "1"" of type '" "Handle< BlackVolTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< BlackVolTermStructure > * >(argp1);
    {
      try {
        result = (*arg1)->dayCounter();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new DayCounter(static_cast< const DayCounter& >(result))), SWIGTYPE_p_DayCounter, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BlackVolTermStructureHandle_calendar) {
  {
    Handle< BlackVolTermStructure > *arg1 = (Handle< BlackVolTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    SwigValueWrapper< Calendar > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BlackVolTermStructureHandle_calendar(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_BlackVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BlackVolTermStructureHandle_calendar" "', argument " "1"" of type '" "Handle< BlackVolTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< BlackVolTermStructure > * >(argp1);
    {
      try {
        result = (*arg1)->calendar();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Calendar(static_cast< const Calendar& >(result))), SWIGTYPE_p_Calendar, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BlackVolTermStructureHandle_maxDate) {
  {
    Handle< BlackVolTermStructure > *arg1 = (Handle< BlackVolTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BlackVolTermStructureHandle_maxDate(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_BlackVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BlackVolTermStructureHandle_maxDate" "', argument " "1"" of type '" "Handle< BlackVolTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< BlackVolTermStructure > * >(argp1);
    {
      try {
        result = (*arg1)->maxDate();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BlackVolTermStructureHandle_maxTime) {
  {
    Handle< BlackVolTermStructure > *arg1 = (Handle< BlackVolTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Time result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BlackVolTermStructureHandle_maxTime(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_BlackVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BlackVolTermStructureHandle_maxTime" "', argument " "1"" of type '" "Handle< BlackVolTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< BlackVolTermStructure > * >(argp1);
    {
      try {
        result = (Time)(*arg1)->maxTime();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BlackVolTermStructureHandle_minStrike) {
  {
    Handle< BlackVolTermStructure > *arg1 = (Handle< BlackVolTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BlackVolTermStructureHandle_minStrike(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_BlackVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BlackVolTermStructureHandle_minStrike" "', argument " "1"" of type '" "Handle< BlackVolTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< BlackVolTermStructure > * >(argp1);
    {
      try {
        result = (Real)(*arg1)->minStrike();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BlackVolTermStructureHandle_maxStrike) {
  {
    Handle< BlackVolTermStructure > *arg1 = (Handle< BlackVolTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BlackVolTermStructureHandle_maxStrike(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_BlackVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BlackVolTermStructureHandle_maxStrike" "', argument " "1"" of type '" "Handle< BlackVolTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< BlackVolTermStructure > * >(argp1);
    {
      try {
        result = (Real)(*arg1)->maxStrike();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BlackVolTermStructureHandle_blackVol__SWIG_0) {
  {
    Handle< BlackVolTermStructure > *arg1 = (Handle< BlackVolTermStructure > *) 0 ;
    Date *arg2 = 0 ;
    Real arg3 ;
    bool arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Volatility result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: BlackVolTermStructureHandle_blackVol(self,Date const &,strike,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_BlackVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BlackVolTermStructureHandle_blackVol" "', argument " "1"" of type '" "Handle< BlackVolTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< BlackVolTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BlackVolTermStructureHandle_blackVol" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BlackVolTermStructureHandle_blackVol" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "BlackVolTermStructureHandle_blackVol" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "BlackVolTermStructureHandle_blackVol" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    {
      try {
        result = (Volatility)(*arg1)->blackVol((Date const &)*arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BlackVolTermStructureHandle_blackVol__SWIG_1) {
  {
    Handle< BlackVolTermStructure > *arg1 = (Handle< BlackVolTermStructure > *) 0 ;
    Date *arg2 = 0 ;
    Real arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Volatility result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: BlackVolTermStructureHandle_blackVol(self,Date const &,strike);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_BlackVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BlackVolTermStructureHandle_blackVol" "', argument " "1"" of type '" "Handle< BlackVolTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< BlackVolTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BlackVolTermStructureHandle_blackVol" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BlackVolTermStructureHandle_blackVol" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "BlackVolTermStructureHandle_blackVol" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    {
      try {
        result = (Volatility)(*arg1)->blackVol((Date const &)*arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BlackVolTermStructureHandle_blackVol__SWIG_2) {
  {
    Handle< BlackVolTermStructure > *arg1 = (Handle< BlackVolTermStructure > *) 0 ;
    Time arg2 ;
    Real arg3 ;
    bool arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Volatility result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: BlackVolTermStructureHandle_blackVol(self,Time,strike,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_BlackVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BlackVolTermStructureHandle_blackVol" "', argument " "1"" of type '" "Handle< BlackVolTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< BlackVolTermStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BlackVolTermStructureHandle_blackVol" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "BlackVolTermStructureHandle_blackVol" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "BlackVolTermStructureHandle_blackVol" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    {
      try {
        result = (Volatility)(*arg1)->blackVol(arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BlackVolTermStructureHandle_blackVol__SWIG_3) {
  {
    Handle< BlackVolTermStructure > *arg1 = (Handle< BlackVolTermStructure > *) 0 ;
    Time arg2 ;
    Real arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Volatility result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: BlackVolTermStructureHandle_blackVol(self,Time,strike);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_BlackVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BlackVolTermStructureHandle_blackVol" "', argument " "1"" of type '" "Handle< BlackVolTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< BlackVolTermStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BlackVolTermStructureHandle_blackVol" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "BlackVolTermStructureHandle_blackVol" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    {
      try {
        result = (Volatility)(*arg1)->blackVol(arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BlackVolTermStructureHandle_blackVol) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_BlackVolTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_BlackVolTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_BlackVolTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_BlackVolTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BlackVolTermStructureHandle_blackVol__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BlackVolTermStructureHandle_blackVol__SWIG_3); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BlackVolTermStructureHandle_blackVol__SWIG_0); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BlackVolTermStructureHandle_blackVol__SWIG_2); return;
    }
  }
  
  croak("No matching function for overloaded 'BlackVolTermStructureHandle_blackVol'");
  XSRETURN(0);
}


XS(_wrap_BlackVolTermStructureHandle_blackVariance__SWIG_0) {
  {
    Handle< BlackVolTermStructure > *arg1 = (Handle< BlackVolTermStructure > *) 0 ;
    Date *arg2 = 0 ;
    Real arg3 ;
    bool arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: BlackVolTermStructureHandle_blackVariance(self,Date const &,strike,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_BlackVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BlackVolTermStructureHandle_blackVariance" "', argument " "1"" of type '" "Handle< BlackVolTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< BlackVolTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BlackVolTermStructureHandle_blackVariance" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BlackVolTermStructureHandle_blackVariance" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "BlackVolTermStructureHandle_blackVariance" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "BlackVolTermStructureHandle_blackVariance" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    {
      try {
        result = (Real)(*arg1)->blackVariance((Date const &)*arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BlackVolTermStructureHandle_blackVariance__SWIG_1) {
  {
    Handle< BlackVolTermStructure > *arg1 = (Handle< BlackVolTermStructure > *) 0 ;
    Date *arg2 = 0 ;
    Real arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: BlackVolTermStructureHandle_blackVariance(self,Date const &,strike);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_BlackVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BlackVolTermStructureHandle_blackVariance" "', argument " "1"" of type '" "Handle< BlackVolTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< BlackVolTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BlackVolTermStructureHandle_blackVariance" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BlackVolTermStructureHandle_blackVariance" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "BlackVolTermStructureHandle_blackVariance" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    {
      try {
        result = (Real)(*arg1)->blackVariance((Date const &)*arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BlackVolTermStructureHandle_blackVariance__SWIG_2) {
  {
    Handle< BlackVolTermStructure > *arg1 = (Handle< BlackVolTermStructure > *) 0 ;
    Time arg2 ;
    Real arg3 ;
    bool arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: BlackVolTermStructureHandle_blackVariance(self,Time,strike,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_BlackVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BlackVolTermStructureHandle_blackVariance" "', argument " "1"" of type '" "Handle< BlackVolTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< BlackVolTermStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BlackVolTermStructureHandle_blackVariance" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "BlackVolTermStructureHandle_blackVariance" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "BlackVolTermStructureHandle_blackVariance" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    {
      try {
        result = (Real)(*arg1)->blackVariance(arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BlackVolTermStructureHandle_blackVariance__SWIG_3) {
  {
    Handle< BlackVolTermStructure > *arg1 = (Handle< BlackVolTermStructure > *) 0 ;
    Time arg2 ;
    Real arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: BlackVolTermStructureHandle_blackVariance(self,Time,strike);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_BlackVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BlackVolTermStructureHandle_blackVariance" "', argument " "1"" of type '" "Handle< BlackVolTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< BlackVolTermStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BlackVolTermStructureHandle_blackVariance" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "BlackVolTermStructureHandle_blackVariance" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    {
      try {
        result = (Real)(*arg1)->blackVariance(arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BlackVolTermStructureHandle_blackVariance) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_BlackVolTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_BlackVolTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_BlackVolTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_BlackVolTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BlackVolTermStructureHandle_blackVariance__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BlackVolTermStructureHandle_blackVariance__SWIG_3); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BlackVolTermStructureHandle_blackVariance__SWIG_0); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BlackVolTermStructureHandle_blackVariance__SWIG_2); return;
    }
  }
  
  croak("No matching function for overloaded 'BlackVolTermStructureHandle_blackVariance'");
  XSRETURN(0);
}


XS(_wrap_BlackVolTermStructureHandle_blackForwardVol__SWIG_0) {
  {
    Handle< BlackVolTermStructure > *arg1 = (Handle< BlackVolTermStructure > *) 0 ;
    Date *arg2 = 0 ;
    Date *arg3 = 0 ;
    Real arg4 ;
    bool arg5 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    bool val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    Volatility result;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: BlackVolTermStructureHandle_blackForwardVol(self,Date const &,Date const &,strike,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_BlackVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BlackVolTermStructureHandle_blackForwardVol" "', argument " "1"" of type '" "Handle< BlackVolTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< BlackVolTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BlackVolTermStructureHandle_blackForwardVol" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BlackVolTermStructureHandle_blackForwardVol" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "BlackVolTermStructureHandle_blackForwardVol" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BlackVolTermStructureHandle_blackForwardVol" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "BlackVolTermStructureHandle_blackForwardVol" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "BlackVolTermStructureHandle_blackForwardVol" "', argument " "5"" of type '" "bool""'");
    } 
    arg5 = static_cast< bool >(val5);
    {
      try {
        result = (Volatility)(*arg1)->blackForwardVol((Date const &)*arg2,(Date const &)*arg3,arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BlackVolTermStructureHandle_blackForwardVol__SWIG_1) {
  {
    Handle< BlackVolTermStructure > *arg1 = (Handle< BlackVolTermStructure > *) 0 ;
    Date *arg2 = 0 ;
    Date *arg3 = 0 ;
    Real arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Volatility result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: BlackVolTermStructureHandle_blackForwardVol(self,Date const &,Date const &,strike);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_BlackVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BlackVolTermStructureHandle_blackForwardVol" "', argument " "1"" of type '" "Handle< BlackVolTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< BlackVolTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BlackVolTermStructureHandle_blackForwardVol" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BlackVolTermStructureHandle_blackForwardVol" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "BlackVolTermStructureHandle_blackForwardVol" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BlackVolTermStructureHandle_blackForwardVol" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "BlackVolTermStructureHandle_blackForwardVol" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    {
      try {
        result = (Volatility)(*arg1)->blackForwardVol((Date const &)*arg2,(Date const &)*arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BlackVolTermStructureHandle_blackForwardVol__SWIG_2) {
  {
    Handle< BlackVolTermStructure > *arg1 = (Handle< BlackVolTermStructure > *) 0 ;
    Time arg2 ;
    Time arg3 ;
    Real arg4 ;
    bool arg5 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    bool val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    Volatility result;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: BlackVolTermStructureHandle_blackForwardVol(self,Time,Time,strike,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_BlackVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BlackVolTermStructureHandle_blackForwardVol" "', argument " "1"" of type '" "Handle< BlackVolTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< BlackVolTermStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BlackVolTermStructureHandle_blackForwardVol" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "BlackVolTermStructureHandle_blackForwardVol" "', argument " "3"" of type '" "Time""'");
    } 
    arg3 = static_cast< Time >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "BlackVolTermStructureHandle_blackForwardVol" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "BlackVolTermStructureHandle_blackForwardVol" "', argument " "5"" of type '" "bool""'");
    } 
    arg5 = static_cast< bool >(val5);
    {
      try {
        result = (Volatility)(*arg1)->blackForwardVol(arg2,arg3,arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BlackVolTermStructureHandle_blackForwardVol__SWIG_3) {
  {
    Handle< BlackVolTermStructure > *arg1 = (Handle< BlackVolTermStructure > *) 0 ;
    Time arg2 ;
    Time arg3 ;
    Real arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Volatility result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: BlackVolTermStructureHandle_blackForwardVol(self,Time,Time,strike);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_BlackVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BlackVolTermStructureHandle_blackForwardVol" "', argument " "1"" of type '" "Handle< BlackVolTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< BlackVolTermStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BlackVolTermStructureHandle_blackForwardVol" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "BlackVolTermStructureHandle_blackForwardVol" "', argument " "3"" of type '" "Time""'");
    } 
    arg3 = static_cast< Time >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "BlackVolTermStructureHandle_blackForwardVol" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    {
      try {
        result = (Volatility)(*arg1)->blackForwardVol(arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BlackVolTermStructureHandle_blackForwardVol) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_BlackVolTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_BlackVolTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_BlackVolTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_BlackVolTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BlackVolTermStructureHandle_blackForwardVol__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BlackVolTermStructureHandle_blackForwardVol__SWIG_3); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BlackVolTermStructureHandle_blackForwardVol__SWIG_0); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BlackVolTermStructureHandle_blackForwardVol__SWIG_2); return;
    }
  }
  
  croak("No matching function for overloaded 'BlackVolTermStructureHandle_blackForwardVol'");
  XSRETURN(0);
}


XS(_wrap_BlackVolTermStructureHandle_blackForwardVariance__SWIG_0) {
  {
    Handle< BlackVolTermStructure > *arg1 = (Handle< BlackVolTermStructure > *) 0 ;
    Date *arg2 = 0 ;
    Date *arg3 = 0 ;
    Real arg4 ;
    bool arg5 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    bool val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: BlackVolTermStructureHandle_blackForwardVariance(self,Date const &,Date const &,strike,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_BlackVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BlackVolTermStructureHandle_blackForwardVariance" "', argument " "1"" of type '" "Handle< BlackVolTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< BlackVolTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BlackVolTermStructureHandle_blackForwardVariance" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BlackVolTermStructureHandle_blackForwardVariance" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "BlackVolTermStructureHandle_blackForwardVariance" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BlackVolTermStructureHandle_blackForwardVariance" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "BlackVolTermStructureHandle_blackForwardVariance" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "BlackVolTermStructureHandle_blackForwardVariance" "', argument " "5"" of type '" "bool""'");
    } 
    arg5 = static_cast< bool >(val5);
    {
      try {
        result = (Real)(*arg1)->blackForwardVariance((Date const &)*arg2,(Date const &)*arg3,arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BlackVolTermStructureHandle_blackForwardVariance__SWIG_1) {
  {
    Handle< BlackVolTermStructure > *arg1 = (Handle< BlackVolTermStructure > *) 0 ;
    Date *arg2 = 0 ;
    Date *arg3 = 0 ;
    Real arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: BlackVolTermStructureHandle_blackForwardVariance(self,Date const &,Date const &,strike);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_BlackVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BlackVolTermStructureHandle_blackForwardVariance" "', argument " "1"" of type '" "Handle< BlackVolTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< BlackVolTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BlackVolTermStructureHandle_blackForwardVariance" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BlackVolTermStructureHandle_blackForwardVariance" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "BlackVolTermStructureHandle_blackForwardVariance" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BlackVolTermStructureHandle_blackForwardVariance" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "BlackVolTermStructureHandle_blackForwardVariance" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    {
      try {
        result = (Real)(*arg1)->blackForwardVariance((Date const &)*arg2,(Date const &)*arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BlackVolTermStructureHandle_blackForwardVariance__SWIG_2) {
  {
    Handle< BlackVolTermStructure > *arg1 = (Handle< BlackVolTermStructure > *) 0 ;
    Time arg2 ;
    Time arg3 ;
    Real arg4 ;
    bool arg5 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    bool val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: BlackVolTermStructureHandle_blackForwardVariance(self,Time,Time,strike,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_BlackVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BlackVolTermStructureHandle_blackForwardVariance" "', argument " "1"" of type '" "Handle< BlackVolTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< BlackVolTermStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BlackVolTermStructureHandle_blackForwardVariance" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "BlackVolTermStructureHandle_blackForwardVariance" "', argument " "3"" of type '" "Time""'");
    } 
    arg3 = static_cast< Time >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "BlackVolTermStructureHandle_blackForwardVariance" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "BlackVolTermStructureHandle_blackForwardVariance" "', argument " "5"" of type '" "bool""'");
    } 
    arg5 = static_cast< bool >(val5);
    {
      try {
        result = (Real)(*arg1)->blackForwardVariance(arg2,arg3,arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BlackVolTermStructureHandle_blackForwardVariance__SWIG_3) {
  {
    Handle< BlackVolTermStructure > *arg1 = (Handle< BlackVolTermStructure > *) 0 ;
    Time arg2 ;
    Time arg3 ;
    Real arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: BlackVolTermStructureHandle_blackForwardVariance(self,Time,Time,strike);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_BlackVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BlackVolTermStructureHandle_blackForwardVariance" "', argument " "1"" of type '" "Handle< BlackVolTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< BlackVolTermStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BlackVolTermStructureHandle_blackForwardVariance" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "BlackVolTermStructureHandle_blackForwardVariance" "', argument " "3"" of type '" "Time""'");
    } 
    arg3 = static_cast< Time >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "BlackVolTermStructureHandle_blackForwardVariance" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    {
      try {
        result = (Real)(*arg1)->blackForwardVariance(arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BlackVolTermStructureHandle_blackForwardVariance) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_BlackVolTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_BlackVolTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_BlackVolTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_BlackVolTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BlackVolTermStructureHandle_blackForwardVariance__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BlackVolTermStructureHandle_blackForwardVariance__SWIG_3); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BlackVolTermStructureHandle_blackForwardVariance__SWIG_0); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BlackVolTermStructureHandle_blackForwardVariance__SWIG_2); return;
    }
  }
  
  croak("No matching function for overloaded 'BlackVolTermStructureHandle_blackForwardVariance'");
  XSRETURN(0);
}


XS(_wrap_BlackVolTermStructureHandle_enableExtrapolation) {
  {
    Handle< BlackVolTermStructure > *arg1 = (Handle< BlackVolTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BlackVolTermStructureHandle_enableExtrapolation(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_BlackVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BlackVolTermStructureHandle_enableExtrapolation" "', argument " "1"" of type '" "Handle< BlackVolTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< BlackVolTermStructure > * >(argp1);
    {
      try {
        (*arg1)->enableExtrapolation();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BlackVolTermStructureHandle_disableExtrapolation) {
  {
    Handle< BlackVolTermStructure > *arg1 = (Handle< BlackVolTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BlackVolTermStructureHandle_disableExtrapolation(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_BlackVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BlackVolTermStructureHandle_disableExtrapolation" "', argument " "1"" of type '" "Handle< BlackVolTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< BlackVolTermStructure > * >(argp1);
    {
      try {
        (*arg1)->disableExtrapolation();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BlackVolTermStructureHandle_allowsExtrapolation) {
  {
    Handle< BlackVolTermStructure > *arg1 = (Handle< BlackVolTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BlackVolTermStructureHandle_allowsExtrapolation(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_BlackVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BlackVolTermStructureHandle_allowsExtrapolation" "', argument " "1"" of type '" "Handle< BlackVolTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< BlackVolTermStructure > * >(argp1);
    {
      try {
        result = (bool)(*arg1)->allowsExtrapolation();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_RelinkableBlackVolTermStructureHandle__SWIG_0) {
  {
    boost::shared_ptr< BlackVolTermStructure > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    RelinkableHandle< BlackVolTermStructure > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_RelinkableBlackVolTermStructureHandle(boost::shared_ptr< BlackVolTermStructure > const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_BlackVolTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_RelinkableBlackVolTermStructureHandle" "', argument " "1"" of type '" "boost::shared_ptr< BlackVolTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_RelinkableBlackVolTermStructureHandle" "', argument " "1"" of type '" "boost::shared_ptr< BlackVolTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< BlackVolTermStructure > * >(argp1);
    {
      try {
        result = (RelinkableHandle< BlackVolTermStructure > *)new RelinkableHandle< BlackVolTermStructure >((boost::shared_ptr< BlackVolTermStructure > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_RelinkableHandleT_BlackVolTermStructure_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_RelinkableBlackVolTermStructureHandle__SWIG_1) {
  {
    int argvi = 0;
    RelinkableHandle< BlackVolTermStructure > *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_RelinkableBlackVolTermStructureHandle();");
    }
    {
      try {
        result = (RelinkableHandle< BlackVolTermStructure > *)new RelinkableHandle< BlackVolTermStructure >();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_RelinkableHandleT_BlackVolTermStructure_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_RelinkableBlackVolTermStructureHandle) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_BlackVolTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_RelinkableBlackVolTermStructureHandle__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_RelinkableBlackVolTermStructureHandle__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_RelinkableBlackVolTermStructureHandle'");
  XSRETURN(0);
}


XS(_wrap_RelinkableBlackVolTermStructureHandle_linkTo) {
  {
    RelinkableHandle< BlackVolTermStructure > *arg1 = (RelinkableHandle< BlackVolTermStructure > *) 0 ;
    boost::shared_ptr< BlackVolTermStructure > *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: RelinkableBlackVolTermStructureHandle_linkTo(self,boost::shared_ptr< BlackVolTermStructure > const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_RelinkableHandleT_BlackVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RelinkableBlackVolTermStructureHandle_linkTo" "', argument " "1"" of type '" "RelinkableHandle< BlackVolTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< RelinkableHandle< BlackVolTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_boost__shared_ptrT_BlackVolTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "RelinkableBlackVolTermStructureHandle_linkTo" "', argument " "2"" of type '" "boost::shared_ptr< BlackVolTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "RelinkableBlackVolTermStructureHandle_linkTo" "', argument " "2"" of type '" "boost::shared_ptr< BlackVolTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< boost::shared_ptr< BlackVolTermStructure > * >(argp2);
    {
      try {
        (arg1)->linkTo((boost::shared_ptr< BlackVolTermStructure > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_RelinkableBlackVolTermStructureHandle) {
  {
    RelinkableHandle< BlackVolTermStructure > *arg1 = (RelinkableHandle< BlackVolTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_RelinkableBlackVolTermStructureHandle(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_RelinkableHandleT_BlackVolTermStructure_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_RelinkableBlackVolTermStructureHandle" "', argument " "1"" of type '" "RelinkableHandle< BlackVolTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< RelinkableHandle< BlackVolTermStructure > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_LocalVolTermStructure___deref__) {
  {
    boost::shared_ptr< LocalVolTermStructure > *arg1 = (boost::shared_ptr< LocalVolTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    LocalVolTermStructure *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: LocalVolTermStructure___deref__(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_LocalVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocalVolTermStructure___deref__" "', argument " "1"" of type '" "boost::shared_ptr< LocalVolTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< LocalVolTermStructure > * >(argp1);
    {
      try {
        result = (LocalVolTermStructure *)(arg1)->operator ->();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_LocalVolTermStructure, 0 | 0); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_LocalVolTermStructure_isNull) {
  {
    boost::shared_ptr< LocalVolTermStructure > *arg1 = (boost::shared_ptr< LocalVolTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: LocalVolTermStructure_isNull(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_LocalVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocalVolTermStructure_isNull" "', argument " "1"" of type '" "boost::shared_ptr< LocalVolTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< LocalVolTermStructure > * >(argp1);
    {
      try {
        result = (bool)boost_shared_ptr_Sl_LocalVolTermStructure_Sg__isNull(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_LocalVolTermStructure_asObservable) {
  {
    boost::shared_ptr< LocalVolTermStructure > *arg1 = (boost::shared_ptr< LocalVolTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    boost::shared_ptr< Observable > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: LocalVolTermStructure_asObservable(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_LocalVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocalVolTermStructure_asObservable" "', argument " "1"" of type '" "boost::shared_ptr< LocalVolTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< LocalVolTermStructure > * >(argp1);
    {
      try {
        result = boost_shared_ptr_Sl_LocalVolTermStructure_Sg__asObservable(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new boost::shared_ptr< Observable >(static_cast< const boost::shared_ptr< Observable >& >(result))), SWIGTYPE_p_boost__shared_ptrT_Observable_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_LocalVolTermStructure) {
  {
    int argvi = 0;
    boost::shared_ptr< LocalVolTermStructure > *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_LocalVolTermStructure();");
    }
    {
      try {
        result = (boost::shared_ptr< LocalVolTermStructure > *)new boost::shared_ptr< LocalVolTermStructure >();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_boost__shared_ptrT_LocalVolTermStructure_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_LocalVolTermStructure) {
  {
    boost::shared_ptr< LocalVolTermStructure > *arg1 = (boost::shared_ptr< LocalVolTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_LocalVolTermStructure(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_LocalVolTermStructure_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_LocalVolTermStructure" "', argument " "1"" of type '" "boost::shared_ptr< LocalVolTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< LocalVolTermStructure > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_LocalVolTermStructure_referenceDate) {
  {
    boost::shared_ptr< LocalVolTermStructure > *arg1 = (boost::shared_ptr< LocalVolTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: LocalVolTermStructure_referenceDate(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_LocalVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocalVolTermStructure_referenceDate" "', argument " "1"" of type '" "boost::shared_ptr< LocalVolTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< LocalVolTermStructure > * >(argp1);
    {
      try {
        result = (*arg1)->referenceDate();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_LocalVolTermStructure_dayCounter) {
  {
    boost::shared_ptr< LocalVolTermStructure > *arg1 = (boost::shared_ptr< LocalVolTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    SwigValueWrapper< DayCounter > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: LocalVolTermStructure_dayCounter(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_LocalVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocalVolTermStructure_dayCounter" "', argument " "1"" of type '" "boost::shared_ptr< LocalVolTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< LocalVolTermStructure > * >(argp1);
    {
      try {
        result = (*arg1)->dayCounter();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new DayCounter(static_cast< const DayCounter& >(result))), SWIGTYPE_p_DayCounter, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_LocalVolTermStructure_calendar) {
  {
    boost::shared_ptr< LocalVolTermStructure > *arg1 = (boost::shared_ptr< LocalVolTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    SwigValueWrapper< Calendar > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: LocalVolTermStructure_calendar(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_LocalVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocalVolTermStructure_calendar" "', argument " "1"" of type '" "boost::shared_ptr< LocalVolTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< LocalVolTermStructure > * >(argp1);
    {
      try {
        result = (*arg1)->calendar();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Calendar(static_cast< const Calendar& >(result))), SWIGTYPE_p_Calendar, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_LocalVolTermStructure_maxDate) {
  {
    boost::shared_ptr< LocalVolTermStructure > *arg1 = (boost::shared_ptr< LocalVolTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: LocalVolTermStructure_maxDate(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_LocalVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocalVolTermStructure_maxDate" "', argument " "1"" of type '" "boost::shared_ptr< LocalVolTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< LocalVolTermStructure > * >(argp1);
    {
      try {
        result = (*arg1)->maxDate();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_LocalVolTermStructure_maxTime) {
  {
    boost::shared_ptr< LocalVolTermStructure > *arg1 = (boost::shared_ptr< LocalVolTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Time result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: LocalVolTermStructure_maxTime(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_LocalVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocalVolTermStructure_maxTime" "', argument " "1"" of type '" "boost::shared_ptr< LocalVolTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< LocalVolTermStructure > * >(argp1);
    {
      try {
        result = (Time)(*arg1)->maxTime();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_LocalVolTermStructure_minStrike) {
  {
    boost::shared_ptr< LocalVolTermStructure > *arg1 = (boost::shared_ptr< LocalVolTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: LocalVolTermStructure_minStrike(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_LocalVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocalVolTermStructure_minStrike" "', argument " "1"" of type '" "boost::shared_ptr< LocalVolTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< LocalVolTermStructure > * >(argp1);
    {
      try {
        result = (Real)(*arg1)->minStrike();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_LocalVolTermStructure_maxStrike) {
  {
    boost::shared_ptr< LocalVolTermStructure > *arg1 = (boost::shared_ptr< LocalVolTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: LocalVolTermStructure_maxStrike(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_LocalVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocalVolTermStructure_maxStrike" "', argument " "1"" of type '" "boost::shared_ptr< LocalVolTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< LocalVolTermStructure > * >(argp1);
    {
      try {
        result = (Real)(*arg1)->maxStrike();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_LocalVolTermStructure_localVol__SWIG_0) {
  {
    boost::shared_ptr< LocalVolTermStructure > *arg1 = (boost::shared_ptr< LocalVolTermStructure > *) 0 ;
    Date *arg2 = 0 ;
    Real arg3 ;
    bool arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Volatility result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: LocalVolTermStructure_localVol(self,Date const &,u,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_LocalVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocalVolTermStructure_localVol" "', argument " "1"" of type '" "boost::shared_ptr< LocalVolTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< LocalVolTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "LocalVolTermStructure_localVol" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "LocalVolTermStructure_localVol" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "LocalVolTermStructure_localVol" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "LocalVolTermStructure_localVol" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    {
      try {
        result = (Volatility)(*arg1)->localVol((Date const &)*arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_LocalVolTermStructure_localVol__SWIG_1) {
  {
    boost::shared_ptr< LocalVolTermStructure > *arg1 = (boost::shared_ptr< LocalVolTermStructure > *) 0 ;
    Date *arg2 = 0 ;
    Real arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Volatility result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: LocalVolTermStructure_localVol(self,Date const &,u);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_LocalVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocalVolTermStructure_localVol" "', argument " "1"" of type '" "boost::shared_ptr< LocalVolTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< LocalVolTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "LocalVolTermStructure_localVol" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "LocalVolTermStructure_localVol" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "LocalVolTermStructure_localVol" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    {
      try {
        result = (Volatility)(*arg1)->localVol((Date const &)*arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_LocalVolTermStructure_localVol__SWIG_2) {
  {
    boost::shared_ptr< LocalVolTermStructure > *arg1 = (boost::shared_ptr< LocalVolTermStructure > *) 0 ;
    Time arg2 ;
    Real arg3 ;
    bool arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Volatility result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: LocalVolTermStructure_localVol(self,Time,u,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_LocalVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocalVolTermStructure_localVol" "', argument " "1"" of type '" "boost::shared_ptr< LocalVolTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< LocalVolTermStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LocalVolTermStructure_localVol" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "LocalVolTermStructure_localVol" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "LocalVolTermStructure_localVol" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    {
      try {
        result = (Volatility)(*arg1)->localVol(arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_LocalVolTermStructure_localVol__SWIG_3) {
  {
    boost::shared_ptr< LocalVolTermStructure > *arg1 = (boost::shared_ptr< LocalVolTermStructure > *) 0 ;
    Time arg2 ;
    Real arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Volatility result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: LocalVolTermStructure_localVol(self,Time,u);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_LocalVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocalVolTermStructure_localVol" "', argument " "1"" of type '" "boost::shared_ptr< LocalVolTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< LocalVolTermStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LocalVolTermStructure_localVol" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "LocalVolTermStructure_localVol" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    {
      try {
        result = (Volatility)(*arg1)->localVol(arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_LocalVolTermStructure_localVol) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_LocalVolTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_LocalVolTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_LocalVolTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_LocalVolTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_LocalVolTermStructure_localVol__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_LocalVolTermStructure_localVol__SWIG_3); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_LocalVolTermStructure_localVol__SWIG_0); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_LocalVolTermStructure_localVol__SWIG_2); return;
    }
  }
  
  croak("No matching function for overloaded 'LocalVolTermStructure_localVol'");
  XSRETURN(0);
}


XS(_wrap_LocalVolTermStructure_enableExtrapolation) {
  {
    boost::shared_ptr< LocalVolTermStructure > *arg1 = (boost::shared_ptr< LocalVolTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: LocalVolTermStructure_enableExtrapolation(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_LocalVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocalVolTermStructure_enableExtrapolation" "', argument " "1"" of type '" "boost::shared_ptr< LocalVolTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< LocalVolTermStructure > * >(argp1);
    {
      try {
        (*arg1)->enableExtrapolation();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_LocalVolTermStructure_disableExtrapolation) {
  {
    boost::shared_ptr< LocalVolTermStructure > *arg1 = (boost::shared_ptr< LocalVolTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: LocalVolTermStructure_disableExtrapolation(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_LocalVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocalVolTermStructure_disableExtrapolation" "', argument " "1"" of type '" "boost::shared_ptr< LocalVolTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< LocalVolTermStructure > * >(argp1);
    {
      try {
        (*arg1)->disableExtrapolation();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_LocalVolTermStructure_allowsExtrapolation) {
  {
    boost::shared_ptr< LocalVolTermStructure > *arg1 = (boost::shared_ptr< LocalVolTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: LocalVolTermStructure_allowsExtrapolation(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_LocalVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocalVolTermStructure_allowsExtrapolation" "', argument " "1"" of type '" "boost::shared_ptr< LocalVolTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< LocalVolTermStructure > * >(argp1);
    {
      try {
        result = (bool)(*arg1)->allowsExtrapolation();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_LocalVolTermStructureHandle__SWIG_0) {
  {
    boost::shared_ptr< LocalVolTermStructure > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Handle< LocalVolTermStructure > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_LocalVolTermStructureHandle(boost::shared_ptr< LocalVolTermStructure > const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_LocalVolTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_LocalVolTermStructureHandle" "', argument " "1"" of type '" "boost::shared_ptr< LocalVolTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LocalVolTermStructureHandle" "', argument " "1"" of type '" "boost::shared_ptr< LocalVolTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< LocalVolTermStructure > * >(argp1);
    {
      try {
        result = (Handle< LocalVolTermStructure > *)new Handle< LocalVolTermStructure >((boost::shared_ptr< LocalVolTermStructure > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_HandleT_LocalVolTermStructure_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_LocalVolTermStructureHandle__SWIG_1) {
  {
    int argvi = 0;
    Handle< LocalVolTermStructure > *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_LocalVolTermStructureHandle();");
    }
    {
      try {
        result = (Handle< LocalVolTermStructure > *)new Handle< LocalVolTermStructure >();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_HandleT_LocalVolTermStructure_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_LocalVolTermStructureHandle) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_LocalVolTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_LocalVolTermStructureHandle__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_LocalVolTermStructureHandle__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_LocalVolTermStructureHandle'");
  XSRETURN(0);
}


XS(_wrap_LocalVolTermStructureHandle___deref__) {
  {
    Handle< LocalVolTermStructure > *arg1 = (Handle< LocalVolTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    boost::shared_ptr< LocalVolTermStructure > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: LocalVolTermStructureHandle___deref__(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_LocalVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocalVolTermStructureHandle___deref__" "', argument " "1"" of type '" "Handle< LocalVolTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< LocalVolTermStructure > * >(argp1);
    {
      try {
        result = (arg1)->operator ->();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new boost::shared_ptr< LocalVolTermStructure >(static_cast< const boost::shared_ptr< LocalVolTermStructure >& >(result))), SWIGTYPE_p_boost__shared_ptrT_LocalVolTermStructure_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_LocalVolTermStructureHandle_empty) {
  {
    Handle< LocalVolTermStructure > *arg1 = (Handle< LocalVolTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: LocalVolTermStructureHandle_empty(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_LocalVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocalVolTermStructureHandle_empty" "', argument " "1"" of type '" "Handle< LocalVolTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< LocalVolTermStructure > * >(argp1);
    {
      try {
        result = (bool)(arg1)->empty();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_LocalVolTermStructureHandle_asObservable) {
  {
    Handle< LocalVolTermStructure > *arg1 = (Handle< LocalVolTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    boost::shared_ptr< Observable > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: LocalVolTermStructureHandle_asObservable(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_LocalVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocalVolTermStructureHandle_asObservable" "', argument " "1"" of type '" "Handle< LocalVolTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< LocalVolTermStructure > * >(argp1);
    {
      try {
        result = Handle_Sl_LocalVolTermStructure_Sg__asObservable(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new boost::shared_ptr< Observable >(static_cast< const boost::shared_ptr< Observable >& >(result))), SWIGTYPE_p_boost__shared_ptrT_Observable_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_LocalVolTermStructureHandle) {
  {
    Handle< LocalVolTermStructure > *arg1 = (Handle< LocalVolTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_LocalVolTermStructureHandle(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_LocalVolTermStructure_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_LocalVolTermStructureHandle" "', argument " "1"" of type '" "Handle< LocalVolTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< LocalVolTermStructure > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_LocalVolTermStructureHandle_referenceDate) {
  {
    Handle< LocalVolTermStructure > *arg1 = (Handle< LocalVolTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: LocalVolTermStructureHandle_referenceDate(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_LocalVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocalVolTermStructureHandle_referenceDate" "', argument " "1"" of type '" "Handle< LocalVolTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< LocalVolTermStructure > * >(argp1);
    {
      try {
        result = (*arg1)->referenceDate();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_LocalVolTermStructureHandle_dayCounter) {
  {
    Handle< LocalVolTermStructure > *arg1 = (Handle< LocalVolTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    SwigValueWrapper< DayCounter > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: LocalVolTermStructureHandle_dayCounter(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_LocalVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocalVolTermStructureHandle_dayCounter" "', argument " "1"" of type '" "Handle< LocalVolTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< LocalVolTermStructure > * >(argp1);
    {
      try {
        result = (*arg1)->dayCounter();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new DayCounter(static_cast< const DayCounter& >(result))), SWIGTYPE_p_DayCounter, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_LocalVolTermStructureHandle_calendar) {
  {
    Handle< LocalVolTermStructure > *arg1 = (Handle< LocalVolTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    SwigValueWrapper< Calendar > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: LocalVolTermStructureHandle_calendar(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_LocalVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocalVolTermStructureHandle_calendar" "', argument " "1"" of type '" "Handle< LocalVolTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< LocalVolTermStructure > * >(argp1);
    {
      try {
        result = (*arg1)->calendar();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Calendar(static_cast< const Calendar& >(result))), SWIGTYPE_p_Calendar, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_LocalVolTermStructureHandle_maxDate) {
  {
    Handle< LocalVolTermStructure > *arg1 = (Handle< LocalVolTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: LocalVolTermStructureHandle_maxDate(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_LocalVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocalVolTermStructureHandle_maxDate" "', argument " "1"" of type '" "Handle< LocalVolTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< LocalVolTermStructure > * >(argp1);
    {
      try {
        result = (*arg1)->maxDate();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_LocalVolTermStructureHandle_maxTime) {
  {
    Handle< LocalVolTermStructure > *arg1 = (Handle< LocalVolTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Time result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: LocalVolTermStructureHandle_maxTime(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_LocalVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocalVolTermStructureHandle_maxTime" "', argument " "1"" of type '" "Handle< LocalVolTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< LocalVolTermStructure > * >(argp1);
    {
      try {
        result = (Time)(*arg1)->maxTime();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_LocalVolTermStructureHandle_minStrike) {
  {
    Handle< LocalVolTermStructure > *arg1 = (Handle< LocalVolTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: LocalVolTermStructureHandle_minStrike(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_LocalVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocalVolTermStructureHandle_minStrike" "', argument " "1"" of type '" "Handle< LocalVolTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< LocalVolTermStructure > * >(argp1);
    {
      try {
        result = (Real)(*arg1)->minStrike();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_LocalVolTermStructureHandle_maxStrike) {
  {
    Handle< LocalVolTermStructure > *arg1 = (Handle< LocalVolTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: LocalVolTermStructureHandle_maxStrike(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_LocalVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocalVolTermStructureHandle_maxStrike" "', argument " "1"" of type '" "Handle< LocalVolTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< LocalVolTermStructure > * >(argp1);
    {
      try {
        result = (Real)(*arg1)->maxStrike();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_LocalVolTermStructureHandle_localVol__SWIG_0) {
  {
    Handle< LocalVolTermStructure > *arg1 = (Handle< LocalVolTermStructure > *) 0 ;
    Date *arg2 = 0 ;
    Real arg3 ;
    bool arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Volatility result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: LocalVolTermStructureHandle_localVol(self,Date const &,u,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_LocalVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocalVolTermStructureHandle_localVol" "', argument " "1"" of type '" "Handle< LocalVolTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< LocalVolTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "LocalVolTermStructureHandle_localVol" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "LocalVolTermStructureHandle_localVol" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "LocalVolTermStructureHandle_localVol" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "LocalVolTermStructureHandle_localVol" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    {
      try {
        result = (Volatility)(*arg1)->localVol((Date const &)*arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_LocalVolTermStructureHandle_localVol__SWIG_1) {
  {
    Handle< LocalVolTermStructure > *arg1 = (Handle< LocalVolTermStructure > *) 0 ;
    Date *arg2 = 0 ;
    Real arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Volatility result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: LocalVolTermStructureHandle_localVol(self,Date const &,u);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_LocalVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocalVolTermStructureHandle_localVol" "', argument " "1"" of type '" "Handle< LocalVolTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< LocalVolTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "LocalVolTermStructureHandle_localVol" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "LocalVolTermStructureHandle_localVol" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "LocalVolTermStructureHandle_localVol" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    {
      try {
        result = (Volatility)(*arg1)->localVol((Date const &)*arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_LocalVolTermStructureHandle_localVol__SWIG_2) {
  {
    Handle< LocalVolTermStructure > *arg1 = (Handle< LocalVolTermStructure > *) 0 ;
    Time arg2 ;
    Real arg3 ;
    bool arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Volatility result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: LocalVolTermStructureHandle_localVol(self,Time,u,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_LocalVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocalVolTermStructureHandle_localVol" "', argument " "1"" of type '" "Handle< LocalVolTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< LocalVolTermStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LocalVolTermStructureHandle_localVol" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "LocalVolTermStructureHandle_localVol" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "LocalVolTermStructureHandle_localVol" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    {
      try {
        result = (Volatility)(*arg1)->localVol(arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_LocalVolTermStructureHandle_localVol__SWIG_3) {
  {
    Handle< LocalVolTermStructure > *arg1 = (Handle< LocalVolTermStructure > *) 0 ;
    Time arg2 ;
    Real arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Volatility result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: LocalVolTermStructureHandle_localVol(self,Time,u);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_LocalVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocalVolTermStructureHandle_localVol" "', argument " "1"" of type '" "Handle< LocalVolTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< LocalVolTermStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LocalVolTermStructureHandle_localVol" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "LocalVolTermStructureHandle_localVol" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    {
      try {
        result = (Volatility)(*arg1)->localVol(arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_LocalVolTermStructureHandle_localVol) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_LocalVolTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_LocalVolTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_LocalVolTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_LocalVolTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_LocalVolTermStructureHandle_localVol__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_LocalVolTermStructureHandle_localVol__SWIG_3); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_LocalVolTermStructureHandle_localVol__SWIG_0); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_LocalVolTermStructureHandle_localVol__SWIG_2); return;
    }
  }
  
  croak("No matching function for overloaded 'LocalVolTermStructureHandle_localVol'");
  XSRETURN(0);
}


XS(_wrap_LocalVolTermStructureHandle_enableExtrapolation) {
  {
    Handle< LocalVolTermStructure > *arg1 = (Handle< LocalVolTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: LocalVolTermStructureHandle_enableExtrapolation(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_LocalVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocalVolTermStructureHandle_enableExtrapolation" "', argument " "1"" of type '" "Handle< LocalVolTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< LocalVolTermStructure > * >(argp1);
    {
      try {
        (*arg1)->enableExtrapolation();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_LocalVolTermStructureHandle_disableExtrapolation) {
  {
    Handle< LocalVolTermStructure > *arg1 = (Handle< LocalVolTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: LocalVolTermStructureHandle_disableExtrapolation(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_LocalVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocalVolTermStructureHandle_disableExtrapolation" "', argument " "1"" of type '" "Handle< LocalVolTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< LocalVolTermStructure > * >(argp1);
    {
      try {
        (*arg1)->disableExtrapolation();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_LocalVolTermStructureHandle_allowsExtrapolation) {
  {
    Handle< LocalVolTermStructure > *arg1 = (Handle< LocalVolTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: LocalVolTermStructureHandle_allowsExtrapolation(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_LocalVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LocalVolTermStructureHandle_allowsExtrapolation" "', argument " "1"" of type '" "Handle< LocalVolTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< LocalVolTermStructure > * >(argp1);
    {
      try {
        result = (bool)(*arg1)->allowsExtrapolation();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_RelinkableLocalVolTermStructureHandle__SWIG_0) {
  {
    boost::shared_ptr< LocalVolTermStructure > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    RelinkableHandle< LocalVolTermStructure > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_RelinkableLocalVolTermStructureHandle(boost::shared_ptr< LocalVolTermStructure > const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_LocalVolTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_RelinkableLocalVolTermStructureHandle" "', argument " "1"" of type '" "boost::shared_ptr< LocalVolTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_RelinkableLocalVolTermStructureHandle" "', argument " "1"" of type '" "boost::shared_ptr< LocalVolTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< LocalVolTermStructure > * >(argp1);
    {
      try {
        result = (RelinkableHandle< LocalVolTermStructure > *)new RelinkableHandle< LocalVolTermStructure >((boost::shared_ptr< LocalVolTermStructure > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_RelinkableHandleT_LocalVolTermStructure_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_RelinkableLocalVolTermStructureHandle__SWIG_1) {
  {
    int argvi = 0;
    RelinkableHandle< LocalVolTermStructure > *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_RelinkableLocalVolTermStructureHandle();");
    }
    {
      try {
        result = (RelinkableHandle< LocalVolTermStructure > *)new RelinkableHandle< LocalVolTermStructure >();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_RelinkableHandleT_LocalVolTermStructure_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_RelinkableLocalVolTermStructureHandle) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_LocalVolTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_RelinkableLocalVolTermStructureHandle__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_RelinkableLocalVolTermStructureHandle__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_RelinkableLocalVolTermStructureHandle'");
  XSRETURN(0);
}


XS(_wrap_RelinkableLocalVolTermStructureHandle_linkTo) {
  {
    RelinkableHandle< LocalVolTermStructure > *arg1 = (RelinkableHandle< LocalVolTermStructure > *) 0 ;
    boost::shared_ptr< LocalVolTermStructure > *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: RelinkableLocalVolTermStructureHandle_linkTo(self,boost::shared_ptr< LocalVolTermStructure > const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_RelinkableHandleT_LocalVolTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RelinkableLocalVolTermStructureHandle_linkTo" "', argument " "1"" of type '" "RelinkableHandle< LocalVolTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< RelinkableHandle< LocalVolTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_boost__shared_ptrT_LocalVolTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "RelinkableLocalVolTermStructureHandle_linkTo" "', argument " "2"" of type '" "boost::shared_ptr< LocalVolTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "RelinkableLocalVolTermStructureHandle_linkTo" "', argument " "2"" of type '" "boost::shared_ptr< LocalVolTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< boost::shared_ptr< LocalVolTermStructure > * >(argp2);
    {
      try {
        (arg1)->linkTo((boost::shared_ptr< LocalVolTermStructure > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_RelinkableLocalVolTermStructureHandle) {
  {
    RelinkableHandle< LocalVolTermStructure > *arg1 = (RelinkableHandle< LocalVolTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_RelinkableLocalVolTermStructureHandle(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_RelinkableHandleT_LocalVolTermStructure_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_RelinkableLocalVolTermStructureHandle" "', argument " "1"" of type '" "RelinkableHandle< LocalVolTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< RelinkableHandle< LocalVolTermStructure > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_OptionletVolatilityStructure___deref__) {
  {
    boost::shared_ptr< OptionletVolatilityStructure > *arg1 = (boost::shared_ptr< OptionletVolatilityStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    OptionletVolatilityStructure *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: OptionletVolatilityStructure___deref__(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_OptionletVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OptionletVolatilityStructure___deref__" "', argument " "1"" of type '" "boost::shared_ptr< OptionletVolatilityStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< OptionletVolatilityStructure > * >(argp1);
    {
      try {
        result = (OptionletVolatilityStructure *)(arg1)->operator ->();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OptionletVolatilityStructure, 0 | 0); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_OptionletVolatilityStructure_isNull) {
  {
    boost::shared_ptr< OptionletVolatilityStructure > *arg1 = (boost::shared_ptr< OptionletVolatilityStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: OptionletVolatilityStructure_isNull(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_OptionletVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OptionletVolatilityStructure_isNull" "', argument " "1"" of type '" "boost::shared_ptr< OptionletVolatilityStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< OptionletVolatilityStructure > * >(argp1);
    {
      try {
        result = (bool)boost_shared_ptr_Sl_OptionletVolatilityStructure_Sg__isNull(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_OptionletVolatilityStructure_asObservable) {
  {
    boost::shared_ptr< OptionletVolatilityStructure > *arg1 = (boost::shared_ptr< OptionletVolatilityStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    boost::shared_ptr< Observable > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: OptionletVolatilityStructure_asObservable(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_OptionletVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OptionletVolatilityStructure_asObservable" "', argument " "1"" of type '" "boost::shared_ptr< OptionletVolatilityStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< OptionletVolatilityStructure > * >(argp1);
    {
      try {
        result = boost_shared_ptr_Sl_OptionletVolatilityStructure_Sg__asObservable(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new boost::shared_ptr< Observable >(static_cast< const boost::shared_ptr< Observable >& >(result))), SWIGTYPE_p_boost__shared_ptrT_Observable_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_OptionletVolatilityStructure) {
  {
    int argvi = 0;
    boost::shared_ptr< OptionletVolatilityStructure > *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_OptionletVolatilityStructure();");
    }
    {
      try {
        result = (boost::shared_ptr< OptionletVolatilityStructure > *)new boost::shared_ptr< OptionletVolatilityStructure >();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_boost__shared_ptrT_OptionletVolatilityStructure_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_OptionletVolatilityStructure) {
  {
    boost::shared_ptr< OptionletVolatilityStructure > *arg1 = (boost::shared_ptr< OptionletVolatilityStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_OptionletVolatilityStructure(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_OptionletVolatilityStructure_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_OptionletVolatilityStructure" "', argument " "1"" of type '" "boost::shared_ptr< OptionletVolatilityStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< OptionletVolatilityStructure > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_OptionletVolatilityStructure_referenceDate) {
  {
    boost::shared_ptr< OptionletVolatilityStructure > *arg1 = (boost::shared_ptr< OptionletVolatilityStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: OptionletVolatilityStructure_referenceDate(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_OptionletVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OptionletVolatilityStructure_referenceDate" "', argument " "1"" of type '" "boost::shared_ptr< OptionletVolatilityStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< OptionletVolatilityStructure > * >(argp1);
    {
      try {
        result = (*arg1)->referenceDate();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_OptionletVolatilityStructure_dayCounter) {
  {
    boost::shared_ptr< OptionletVolatilityStructure > *arg1 = (boost::shared_ptr< OptionletVolatilityStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    SwigValueWrapper< DayCounter > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: OptionletVolatilityStructure_dayCounter(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_OptionletVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OptionletVolatilityStructure_dayCounter" "', argument " "1"" of type '" "boost::shared_ptr< OptionletVolatilityStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< OptionletVolatilityStructure > * >(argp1);
    {
      try {
        result = (*arg1)->dayCounter();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new DayCounter(static_cast< const DayCounter& >(result))), SWIGTYPE_p_DayCounter, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_OptionletVolatilityStructure_calendar) {
  {
    boost::shared_ptr< OptionletVolatilityStructure > *arg1 = (boost::shared_ptr< OptionletVolatilityStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    SwigValueWrapper< Calendar > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: OptionletVolatilityStructure_calendar(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_OptionletVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OptionletVolatilityStructure_calendar" "', argument " "1"" of type '" "boost::shared_ptr< OptionletVolatilityStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< OptionletVolatilityStructure > * >(argp1);
    {
      try {
        result = (*arg1)->calendar();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Calendar(static_cast< const Calendar& >(result))), SWIGTYPE_p_Calendar, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_OptionletVolatilityStructure_maxDate) {
  {
    boost::shared_ptr< OptionletVolatilityStructure > *arg1 = (boost::shared_ptr< OptionletVolatilityStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: OptionletVolatilityStructure_maxDate(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_OptionletVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OptionletVolatilityStructure_maxDate" "', argument " "1"" of type '" "boost::shared_ptr< OptionletVolatilityStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< OptionletVolatilityStructure > * >(argp1);
    {
      try {
        result = (*arg1)->maxDate();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_OptionletVolatilityStructure_maxTime) {
  {
    boost::shared_ptr< OptionletVolatilityStructure > *arg1 = (boost::shared_ptr< OptionletVolatilityStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Time result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: OptionletVolatilityStructure_maxTime(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_OptionletVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OptionletVolatilityStructure_maxTime" "', argument " "1"" of type '" "boost::shared_ptr< OptionletVolatilityStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< OptionletVolatilityStructure > * >(argp1);
    {
      try {
        result = (Time)(*arg1)->maxTime();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_OptionletVolatilityStructure_minStrike) {
  {
    boost::shared_ptr< OptionletVolatilityStructure > *arg1 = (boost::shared_ptr< OptionletVolatilityStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: OptionletVolatilityStructure_minStrike(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_OptionletVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OptionletVolatilityStructure_minStrike" "', argument " "1"" of type '" "boost::shared_ptr< OptionletVolatilityStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< OptionletVolatilityStructure > * >(argp1);
    {
      try {
        result = (Real)(*arg1)->minStrike();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_OptionletVolatilityStructure_maxStrike) {
  {
    boost::shared_ptr< OptionletVolatilityStructure > *arg1 = (boost::shared_ptr< OptionletVolatilityStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: OptionletVolatilityStructure_maxStrike(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_OptionletVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OptionletVolatilityStructure_maxStrike" "', argument " "1"" of type '" "boost::shared_ptr< OptionletVolatilityStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< OptionletVolatilityStructure > * >(argp1);
    {
      try {
        result = (Real)(*arg1)->maxStrike();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_OptionletVolatilityStructure_volatility__SWIG_0) {
  {
    boost::shared_ptr< OptionletVolatilityStructure > *arg1 = (boost::shared_ptr< OptionletVolatilityStructure > *) 0 ;
    Date *arg2 = 0 ;
    Real arg3 ;
    bool arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Volatility result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: OptionletVolatilityStructure_volatility(self,Date const &,strike,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_OptionletVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OptionletVolatilityStructure_volatility" "', argument " "1"" of type '" "boost::shared_ptr< OptionletVolatilityStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< OptionletVolatilityStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "OptionletVolatilityStructure_volatility" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "OptionletVolatilityStructure_volatility" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "OptionletVolatilityStructure_volatility" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "OptionletVolatilityStructure_volatility" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    {
      try {
        result = (Volatility)(*arg1)->volatility((Date const &)*arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_OptionletVolatilityStructure_volatility__SWIG_1) {
  {
    boost::shared_ptr< OptionletVolatilityStructure > *arg1 = (boost::shared_ptr< OptionletVolatilityStructure > *) 0 ;
    Date *arg2 = 0 ;
    Real arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Volatility result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: OptionletVolatilityStructure_volatility(self,Date const &,strike);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_OptionletVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OptionletVolatilityStructure_volatility" "', argument " "1"" of type '" "boost::shared_ptr< OptionletVolatilityStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< OptionletVolatilityStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "OptionletVolatilityStructure_volatility" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "OptionletVolatilityStructure_volatility" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "OptionletVolatilityStructure_volatility" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    {
      try {
        result = (Volatility)(*arg1)->volatility((Date const &)*arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_OptionletVolatilityStructure_volatility__SWIG_2) {
  {
    boost::shared_ptr< OptionletVolatilityStructure > *arg1 = (boost::shared_ptr< OptionletVolatilityStructure > *) 0 ;
    Time arg2 ;
    Real arg3 ;
    bool arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Volatility result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: OptionletVolatilityStructure_volatility(self,Time,strike,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_OptionletVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OptionletVolatilityStructure_volatility" "', argument " "1"" of type '" "boost::shared_ptr< OptionletVolatilityStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< OptionletVolatilityStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OptionletVolatilityStructure_volatility" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "OptionletVolatilityStructure_volatility" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "OptionletVolatilityStructure_volatility" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    {
      try {
        result = (Volatility)(*arg1)->volatility(arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_OptionletVolatilityStructure_volatility__SWIG_3) {
  {
    boost::shared_ptr< OptionletVolatilityStructure > *arg1 = (boost::shared_ptr< OptionletVolatilityStructure > *) 0 ;
    Time arg2 ;
    Real arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Volatility result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: OptionletVolatilityStructure_volatility(self,Time,strike);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_OptionletVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OptionletVolatilityStructure_volatility" "', argument " "1"" of type '" "boost::shared_ptr< OptionletVolatilityStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< OptionletVolatilityStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OptionletVolatilityStructure_volatility" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "OptionletVolatilityStructure_volatility" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    {
      try {
        result = (Volatility)(*arg1)->volatility(arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_OptionletVolatilityStructure_volatility) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_OptionletVolatilityStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_OptionletVolatilityStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_OptionletVolatilityStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_OptionletVolatilityStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_OptionletVolatilityStructure_volatility__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_OptionletVolatilityStructure_volatility__SWIG_3); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_OptionletVolatilityStructure_volatility__SWIG_0); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_OptionletVolatilityStructure_volatility__SWIG_2); return;
    }
  }
  
  croak("No matching function for overloaded 'OptionletVolatilityStructure_volatility'");
  XSRETURN(0);
}


XS(_wrap_OptionletVolatilityStructure_blackVariance__SWIG_0) {
  {
    boost::shared_ptr< OptionletVolatilityStructure > *arg1 = (boost::shared_ptr< OptionletVolatilityStructure > *) 0 ;
    Date *arg2 = 0 ;
    Rate arg3 ;
    bool arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: OptionletVolatilityStructure_blackVariance(self,Date const &,strike,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_OptionletVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OptionletVolatilityStructure_blackVariance" "', argument " "1"" of type '" "boost::shared_ptr< OptionletVolatilityStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< OptionletVolatilityStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "OptionletVolatilityStructure_blackVariance" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "OptionletVolatilityStructure_blackVariance" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "OptionletVolatilityStructure_blackVariance" "', argument " "3"" of type '" "Rate""'");
    } 
    arg3 = static_cast< Rate >(val3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "OptionletVolatilityStructure_blackVariance" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    {
      try {
        result = (Real)(*arg1)->blackVariance((Date const &)*arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_OptionletVolatilityStructure_blackVariance__SWIG_1) {
  {
    boost::shared_ptr< OptionletVolatilityStructure > *arg1 = (boost::shared_ptr< OptionletVolatilityStructure > *) 0 ;
    Date *arg2 = 0 ;
    Rate arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: OptionletVolatilityStructure_blackVariance(self,Date const &,strike);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_OptionletVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OptionletVolatilityStructure_blackVariance" "', argument " "1"" of type '" "boost::shared_ptr< OptionletVolatilityStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< OptionletVolatilityStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "OptionletVolatilityStructure_blackVariance" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "OptionletVolatilityStructure_blackVariance" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "OptionletVolatilityStructure_blackVariance" "', argument " "3"" of type '" "Rate""'");
    } 
    arg3 = static_cast< Rate >(val3);
    {
      try {
        result = (Real)(*arg1)->blackVariance((Date const &)*arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_OptionletVolatilityStructure_blackVariance__SWIG_2) {
  {
    boost::shared_ptr< OptionletVolatilityStructure > *arg1 = (boost::shared_ptr< OptionletVolatilityStructure > *) 0 ;
    Time arg2 ;
    Rate arg3 ;
    bool arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: OptionletVolatilityStructure_blackVariance(self,Time,strike,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_OptionletVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OptionletVolatilityStructure_blackVariance" "', argument " "1"" of type '" "boost::shared_ptr< OptionletVolatilityStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< OptionletVolatilityStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OptionletVolatilityStructure_blackVariance" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "OptionletVolatilityStructure_blackVariance" "', argument " "3"" of type '" "Rate""'");
    } 
    arg3 = static_cast< Rate >(val3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "OptionletVolatilityStructure_blackVariance" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    {
      try {
        result = (Real)(*arg1)->blackVariance(arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_OptionletVolatilityStructure_blackVariance__SWIG_3) {
  {
    boost::shared_ptr< OptionletVolatilityStructure > *arg1 = (boost::shared_ptr< OptionletVolatilityStructure > *) 0 ;
    Time arg2 ;
    Rate arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: OptionletVolatilityStructure_blackVariance(self,Time,strike);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_OptionletVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OptionletVolatilityStructure_blackVariance" "', argument " "1"" of type '" "boost::shared_ptr< OptionletVolatilityStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< OptionletVolatilityStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OptionletVolatilityStructure_blackVariance" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "OptionletVolatilityStructure_blackVariance" "', argument " "3"" of type '" "Rate""'");
    } 
    arg3 = static_cast< Rate >(val3);
    {
      try {
        result = (Real)(*arg1)->blackVariance(arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_OptionletVolatilityStructure_blackVariance) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_OptionletVolatilityStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_OptionletVolatilityStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_OptionletVolatilityStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_OptionletVolatilityStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_OptionletVolatilityStructure_blackVariance__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_OptionletVolatilityStructure_blackVariance__SWIG_3); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_OptionletVolatilityStructure_blackVariance__SWIG_0); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_OptionletVolatilityStructure_blackVariance__SWIG_2); return;
    }
  }
  
  croak("No matching function for overloaded 'OptionletVolatilityStructure_blackVariance'");
  XSRETURN(0);
}


XS(_wrap_OptionletVolatilityStructure_enableExtrapolation) {
  {
    boost::shared_ptr< OptionletVolatilityStructure > *arg1 = (boost::shared_ptr< OptionletVolatilityStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: OptionletVolatilityStructure_enableExtrapolation(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_OptionletVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OptionletVolatilityStructure_enableExtrapolation" "', argument " "1"" of type '" "boost::shared_ptr< OptionletVolatilityStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< OptionletVolatilityStructure > * >(argp1);
    {
      try {
        (*arg1)->enableExtrapolation();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_OptionletVolatilityStructure_disableExtrapolation) {
  {
    boost::shared_ptr< OptionletVolatilityStructure > *arg1 = (boost::shared_ptr< OptionletVolatilityStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: OptionletVolatilityStructure_disableExtrapolation(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_OptionletVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OptionletVolatilityStructure_disableExtrapolation" "', argument " "1"" of type '" "boost::shared_ptr< OptionletVolatilityStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< OptionletVolatilityStructure > * >(argp1);
    {
      try {
        (*arg1)->disableExtrapolation();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_OptionletVolatilityStructure_allowsExtrapolation) {
  {
    boost::shared_ptr< OptionletVolatilityStructure > *arg1 = (boost::shared_ptr< OptionletVolatilityStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: OptionletVolatilityStructure_allowsExtrapolation(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_OptionletVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OptionletVolatilityStructure_allowsExtrapolation" "', argument " "1"" of type '" "boost::shared_ptr< OptionletVolatilityStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< OptionletVolatilityStructure > * >(argp1);
    {
      try {
        result = (bool)(*arg1)->allowsExtrapolation();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_OptionletVolatilityStructureHandle__SWIG_0) {
  {
    boost::shared_ptr< OptionletVolatilityStructure > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Handle< OptionletVolatilityStructure > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_OptionletVolatilityStructureHandle(boost::shared_ptr< OptionletVolatilityStructure > const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_OptionletVolatilityStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_OptionletVolatilityStructureHandle" "', argument " "1"" of type '" "boost::shared_ptr< OptionletVolatilityStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_OptionletVolatilityStructureHandle" "', argument " "1"" of type '" "boost::shared_ptr< OptionletVolatilityStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< OptionletVolatilityStructure > * >(argp1);
    {
      try {
        result = (Handle< OptionletVolatilityStructure > *)new Handle< OptionletVolatilityStructure >((boost::shared_ptr< OptionletVolatilityStructure > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_HandleT_OptionletVolatilityStructure_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_OptionletVolatilityStructureHandle__SWIG_1) {
  {
    int argvi = 0;
    Handle< OptionletVolatilityStructure > *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_OptionletVolatilityStructureHandle();");
    }
    {
      try {
        result = (Handle< OptionletVolatilityStructure > *)new Handle< OptionletVolatilityStructure >();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_HandleT_OptionletVolatilityStructure_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_OptionletVolatilityStructureHandle) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_OptionletVolatilityStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_OptionletVolatilityStructureHandle__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_OptionletVolatilityStructureHandle__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_OptionletVolatilityStructureHandle'");
  XSRETURN(0);
}


XS(_wrap_OptionletVolatilityStructureHandle___deref__) {
  {
    Handle< OptionletVolatilityStructure > *arg1 = (Handle< OptionletVolatilityStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    boost::shared_ptr< OptionletVolatilityStructure > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: OptionletVolatilityStructureHandle___deref__(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_OptionletVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OptionletVolatilityStructureHandle___deref__" "', argument " "1"" of type '" "Handle< OptionletVolatilityStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< OptionletVolatilityStructure > * >(argp1);
    {
      try {
        result = (arg1)->operator ->();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new boost::shared_ptr< OptionletVolatilityStructure >(static_cast< const boost::shared_ptr< OptionletVolatilityStructure >& >(result))), SWIGTYPE_p_boost__shared_ptrT_OptionletVolatilityStructure_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_OptionletVolatilityStructureHandle_empty) {
  {
    Handle< OptionletVolatilityStructure > *arg1 = (Handle< OptionletVolatilityStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: OptionletVolatilityStructureHandle_empty(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_OptionletVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OptionletVolatilityStructureHandle_empty" "', argument " "1"" of type '" "Handle< OptionletVolatilityStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< OptionletVolatilityStructure > * >(argp1);
    {
      try {
        result = (bool)(arg1)->empty();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_OptionletVolatilityStructureHandle_asObservable) {
  {
    Handle< OptionletVolatilityStructure > *arg1 = (Handle< OptionletVolatilityStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    boost::shared_ptr< Observable > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: OptionletVolatilityStructureHandle_asObservable(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_OptionletVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OptionletVolatilityStructureHandle_asObservable" "', argument " "1"" of type '" "Handle< OptionletVolatilityStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< OptionletVolatilityStructure > * >(argp1);
    {
      try {
        result = Handle_Sl_OptionletVolatilityStructure_Sg__asObservable(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new boost::shared_ptr< Observable >(static_cast< const boost::shared_ptr< Observable >& >(result))), SWIGTYPE_p_boost__shared_ptrT_Observable_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_OptionletVolatilityStructureHandle) {
  {
    Handle< OptionletVolatilityStructure > *arg1 = (Handle< OptionletVolatilityStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_OptionletVolatilityStructureHandle(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_OptionletVolatilityStructure_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_OptionletVolatilityStructureHandle" "', argument " "1"" of type '" "Handle< OptionletVolatilityStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< OptionletVolatilityStructure > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_OptionletVolatilityStructureHandle_referenceDate) {
  {
    Handle< OptionletVolatilityStructure > *arg1 = (Handle< OptionletVolatilityStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: OptionletVolatilityStructureHandle_referenceDate(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_OptionletVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OptionletVolatilityStructureHandle_referenceDate" "', argument " "1"" of type '" "Handle< OptionletVolatilityStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< OptionletVolatilityStructure > * >(argp1);
    {
      try {
        result = (*arg1)->referenceDate();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_OptionletVolatilityStructureHandle_dayCounter) {
  {
    Handle< OptionletVolatilityStructure > *arg1 = (Handle< OptionletVolatilityStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    SwigValueWrapper< DayCounter > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: OptionletVolatilityStructureHandle_dayCounter(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_OptionletVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OptionletVolatilityStructureHandle_dayCounter" "', argument " "1"" of type '" "Handle< OptionletVolatilityStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< OptionletVolatilityStructure > * >(argp1);
    {
      try {
        result = (*arg1)->dayCounter();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new DayCounter(static_cast< const DayCounter& >(result))), SWIGTYPE_p_DayCounter, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_OptionletVolatilityStructureHandle_calendar) {
  {
    Handle< OptionletVolatilityStructure > *arg1 = (Handle< OptionletVolatilityStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    SwigValueWrapper< Calendar > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: OptionletVolatilityStructureHandle_calendar(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_OptionletVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OptionletVolatilityStructureHandle_calendar" "', argument " "1"" of type '" "Handle< OptionletVolatilityStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< OptionletVolatilityStructure > * >(argp1);
    {
      try {
        result = (*arg1)->calendar();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Calendar(static_cast< const Calendar& >(result))), SWIGTYPE_p_Calendar, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_OptionletVolatilityStructureHandle_maxDate) {
  {
    Handle< OptionletVolatilityStructure > *arg1 = (Handle< OptionletVolatilityStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: OptionletVolatilityStructureHandle_maxDate(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_OptionletVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OptionletVolatilityStructureHandle_maxDate" "', argument " "1"" of type '" "Handle< OptionletVolatilityStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< OptionletVolatilityStructure > * >(argp1);
    {
      try {
        result = (*arg1)->maxDate();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_OptionletVolatilityStructureHandle_maxTime) {
  {
    Handle< OptionletVolatilityStructure > *arg1 = (Handle< OptionletVolatilityStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Time result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: OptionletVolatilityStructureHandle_maxTime(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_OptionletVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OptionletVolatilityStructureHandle_maxTime" "', argument " "1"" of type '" "Handle< OptionletVolatilityStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< OptionletVolatilityStructure > * >(argp1);
    {
      try {
        result = (Time)(*arg1)->maxTime();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_OptionletVolatilityStructureHandle_minStrike) {
  {
    Handle< OptionletVolatilityStructure > *arg1 = (Handle< OptionletVolatilityStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: OptionletVolatilityStructureHandle_minStrike(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_OptionletVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OptionletVolatilityStructureHandle_minStrike" "', argument " "1"" of type '" "Handle< OptionletVolatilityStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< OptionletVolatilityStructure > * >(argp1);
    {
      try {
        result = (Real)(*arg1)->minStrike();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_OptionletVolatilityStructureHandle_maxStrike) {
  {
    Handle< OptionletVolatilityStructure > *arg1 = (Handle< OptionletVolatilityStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: OptionletVolatilityStructureHandle_maxStrike(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_OptionletVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OptionletVolatilityStructureHandle_maxStrike" "', argument " "1"" of type '" "Handle< OptionletVolatilityStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< OptionletVolatilityStructure > * >(argp1);
    {
      try {
        result = (Real)(*arg1)->maxStrike();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_OptionletVolatilityStructureHandle_volatility__SWIG_0) {
  {
    Handle< OptionletVolatilityStructure > *arg1 = (Handle< OptionletVolatilityStructure > *) 0 ;
    Date *arg2 = 0 ;
    Real arg3 ;
    bool arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Volatility result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: OptionletVolatilityStructureHandle_volatility(self,Date const &,strike,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_OptionletVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OptionletVolatilityStructureHandle_volatility" "', argument " "1"" of type '" "Handle< OptionletVolatilityStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< OptionletVolatilityStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "OptionletVolatilityStructureHandle_volatility" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "OptionletVolatilityStructureHandle_volatility" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "OptionletVolatilityStructureHandle_volatility" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "OptionletVolatilityStructureHandle_volatility" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    {
      try {
        result = (Volatility)(*arg1)->volatility((Date const &)*arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_OptionletVolatilityStructureHandle_volatility__SWIG_1) {
  {
    Handle< OptionletVolatilityStructure > *arg1 = (Handle< OptionletVolatilityStructure > *) 0 ;
    Date *arg2 = 0 ;
    Real arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Volatility result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: OptionletVolatilityStructureHandle_volatility(self,Date const &,strike);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_OptionletVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OptionletVolatilityStructureHandle_volatility" "', argument " "1"" of type '" "Handle< OptionletVolatilityStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< OptionletVolatilityStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "OptionletVolatilityStructureHandle_volatility" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "OptionletVolatilityStructureHandle_volatility" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "OptionletVolatilityStructureHandle_volatility" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    {
      try {
        result = (Volatility)(*arg1)->volatility((Date const &)*arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_OptionletVolatilityStructureHandle_volatility__SWIG_2) {
  {
    Handle< OptionletVolatilityStructure > *arg1 = (Handle< OptionletVolatilityStructure > *) 0 ;
    Time arg2 ;
    Real arg3 ;
    bool arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Volatility result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: OptionletVolatilityStructureHandle_volatility(self,Time,strike,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_OptionletVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OptionletVolatilityStructureHandle_volatility" "', argument " "1"" of type '" "Handle< OptionletVolatilityStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< OptionletVolatilityStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OptionletVolatilityStructureHandle_volatility" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "OptionletVolatilityStructureHandle_volatility" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "OptionletVolatilityStructureHandle_volatility" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    {
      try {
        result = (Volatility)(*arg1)->volatility(arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_OptionletVolatilityStructureHandle_volatility__SWIG_3) {
  {
    Handle< OptionletVolatilityStructure > *arg1 = (Handle< OptionletVolatilityStructure > *) 0 ;
    Time arg2 ;
    Real arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Volatility result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: OptionletVolatilityStructureHandle_volatility(self,Time,strike);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_OptionletVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OptionletVolatilityStructureHandle_volatility" "', argument " "1"" of type '" "Handle< OptionletVolatilityStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< OptionletVolatilityStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OptionletVolatilityStructureHandle_volatility" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "OptionletVolatilityStructureHandle_volatility" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    {
      try {
        result = (Volatility)(*arg1)->volatility(arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_OptionletVolatilityStructureHandle_volatility) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_OptionletVolatilityStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_OptionletVolatilityStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_OptionletVolatilityStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_OptionletVolatilityStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_OptionletVolatilityStructureHandle_volatility__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_OptionletVolatilityStructureHandle_volatility__SWIG_3); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_OptionletVolatilityStructureHandle_volatility__SWIG_0); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_OptionletVolatilityStructureHandle_volatility__SWIG_2); return;
    }
  }
  
  croak("No matching function for overloaded 'OptionletVolatilityStructureHandle_volatility'");
  XSRETURN(0);
}


XS(_wrap_OptionletVolatilityStructureHandle_blackVariance__SWIG_0) {
  {
    Handle< OptionletVolatilityStructure > *arg1 = (Handle< OptionletVolatilityStructure > *) 0 ;
    Date *arg2 = 0 ;
    Rate arg3 ;
    bool arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: OptionletVolatilityStructureHandle_blackVariance(self,Date const &,strike,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_OptionletVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OptionletVolatilityStructureHandle_blackVariance" "', argument " "1"" of type '" "Handle< OptionletVolatilityStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< OptionletVolatilityStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "OptionletVolatilityStructureHandle_blackVariance" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "OptionletVolatilityStructureHandle_blackVariance" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "OptionletVolatilityStructureHandle_blackVariance" "', argument " "3"" of type '" "Rate""'");
    } 
    arg3 = static_cast< Rate >(val3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "OptionletVolatilityStructureHandle_blackVariance" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    {
      try {
        result = (Real)(*arg1)->blackVariance((Date const &)*arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_OptionletVolatilityStructureHandle_blackVariance__SWIG_1) {
  {
    Handle< OptionletVolatilityStructure > *arg1 = (Handle< OptionletVolatilityStructure > *) 0 ;
    Date *arg2 = 0 ;
    Rate arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: OptionletVolatilityStructureHandle_blackVariance(self,Date const &,strike);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_OptionletVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OptionletVolatilityStructureHandle_blackVariance" "', argument " "1"" of type '" "Handle< OptionletVolatilityStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< OptionletVolatilityStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "OptionletVolatilityStructureHandle_blackVariance" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "OptionletVolatilityStructureHandle_blackVariance" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "OptionletVolatilityStructureHandle_blackVariance" "', argument " "3"" of type '" "Rate""'");
    } 
    arg3 = static_cast< Rate >(val3);
    {
      try {
        result = (Real)(*arg1)->blackVariance((Date const &)*arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_OptionletVolatilityStructureHandle_blackVariance__SWIG_2) {
  {
    Handle< OptionletVolatilityStructure > *arg1 = (Handle< OptionletVolatilityStructure > *) 0 ;
    Time arg2 ;
    Rate arg3 ;
    bool arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: OptionletVolatilityStructureHandle_blackVariance(self,Time,strike,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_OptionletVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OptionletVolatilityStructureHandle_blackVariance" "', argument " "1"" of type '" "Handle< OptionletVolatilityStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< OptionletVolatilityStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OptionletVolatilityStructureHandle_blackVariance" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "OptionletVolatilityStructureHandle_blackVariance" "', argument " "3"" of type '" "Rate""'");
    } 
    arg3 = static_cast< Rate >(val3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "OptionletVolatilityStructureHandle_blackVariance" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    {
      try {
        result = (Real)(*arg1)->blackVariance(arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_OptionletVolatilityStructureHandle_blackVariance__SWIG_3) {
  {
    Handle< OptionletVolatilityStructure > *arg1 = (Handle< OptionletVolatilityStructure > *) 0 ;
    Time arg2 ;
    Rate arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: OptionletVolatilityStructureHandle_blackVariance(self,Time,strike);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_OptionletVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OptionletVolatilityStructureHandle_blackVariance" "', argument " "1"" of type '" "Handle< OptionletVolatilityStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< OptionletVolatilityStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OptionletVolatilityStructureHandle_blackVariance" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "OptionletVolatilityStructureHandle_blackVariance" "', argument " "3"" of type '" "Rate""'");
    } 
    arg3 = static_cast< Rate >(val3);
    {
      try {
        result = (Real)(*arg1)->blackVariance(arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_OptionletVolatilityStructureHandle_blackVariance) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_OptionletVolatilityStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_OptionletVolatilityStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_OptionletVolatilityStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_OptionletVolatilityStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_OptionletVolatilityStructureHandle_blackVariance__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_OptionletVolatilityStructureHandle_blackVariance__SWIG_3); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_OptionletVolatilityStructureHandle_blackVariance__SWIG_0); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_OptionletVolatilityStructureHandle_blackVariance__SWIG_2); return;
    }
  }
  
  croak("No matching function for overloaded 'OptionletVolatilityStructureHandle_blackVariance'");
  XSRETURN(0);
}


XS(_wrap_OptionletVolatilityStructureHandle_enableExtrapolation) {
  {
    Handle< OptionletVolatilityStructure > *arg1 = (Handle< OptionletVolatilityStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: OptionletVolatilityStructureHandle_enableExtrapolation(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_OptionletVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OptionletVolatilityStructureHandle_enableExtrapolation" "', argument " "1"" of type '" "Handle< OptionletVolatilityStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< OptionletVolatilityStructure > * >(argp1);
    {
      try {
        (*arg1)->enableExtrapolation();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_OptionletVolatilityStructureHandle_disableExtrapolation) {
  {
    Handle< OptionletVolatilityStructure > *arg1 = (Handle< OptionletVolatilityStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: OptionletVolatilityStructureHandle_disableExtrapolation(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_OptionletVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OptionletVolatilityStructureHandle_disableExtrapolation" "', argument " "1"" of type '" "Handle< OptionletVolatilityStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< OptionletVolatilityStructure > * >(argp1);
    {
      try {
        (*arg1)->disableExtrapolation();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_OptionletVolatilityStructureHandle_allowsExtrapolation) {
  {
    Handle< OptionletVolatilityStructure > *arg1 = (Handle< OptionletVolatilityStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: OptionletVolatilityStructureHandle_allowsExtrapolation(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_OptionletVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OptionletVolatilityStructureHandle_allowsExtrapolation" "', argument " "1"" of type '" "Handle< OptionletVolatilityStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< OptionletVolatilityStructure > * >(argp1);
    {
      try {
        result = (bool)(*arg1)->allowsExtrapolation();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_RelinkableOptionletVolatilityStructureHandle__SWIG_0) {
  {
    boost::shared_ptr< OptionletVolatilityStructure > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    RelinkableHandle< OptionletVolatilityStructure > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_RelinkableOptionletVolatilityStructureHandle(boost::shared_ptr< OptionletVolatilityStructure > const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_OptionletVolatilityStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_RelinkableOptionletVolatilityStructureHandle" "', argument " "1"" of type '" "boost::shared_ptr< OptionletVolatilityStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_RelinkableOptionletVolatilityStructureHandle" "', argument " "1"" of type '" "boost::shared_ptr< OptionletVolatilityStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< OptionletVolatilityStructure > * >(argp1);
    {
      try {
        result = (RelinkableHandle< OptionletVolatilityStructure > *)new RelinkableHandle< OptionletVolatilityStructure >((boost::shared_ptr< OptionletVolatilityStructure > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_RelinkableHandleT_OptionletVolatilityStructure_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_RelinkableOptionletVolatilityStructureHandle__SWIG_1) {
  {
    int argvi = 0;
    RelinkableHandle< OptionletVolatilityStructure > *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_RelinkableOptionletVolatilityStructureHandle();");
    }
    {
      try {
        result = (RelinkableHandle< OptionletVolatilityStructure > *)new RelinkableHandle< OptionletVolatilityStructure >();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_RelinkableHandleT_OptionletVolatilityStructure_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_RelinkableOptionletVolatilityStructureHandle) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_OptionletVolatilityStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_RelinkableOptionletVolatilityStructureHandle__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_RelinkableOptionletVolatilityStructureHandle__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_RelinkableOptionletVolatilityStructureHandle'");
  XSRETURN(0);
}


XS(_wrap_RelinkableOptionletVolatilityStructureHandle_linkTo) {
  {
    RelinkableHandle< OptionletVolatilityStructure > *arg1 = (RelinkableHandle< OptionletVolatilityStructure > *) 0 ;
    boost::shared_ptr< OptionletVolatilityStructure > *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: RelinkableOptionletVolatilityStructureHandle_linkTo(self,boost::shared_ptr< OptionletVolatilityStructure > const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_RelinkableHandleT_OptionletVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RelinkableOptionletVolatilityStructureHandle_linkTo" "', argument " "1"" of type '" "RelinkableHandle< OptionletVolatilityStructure > *""'"); 
    }
    arg1 = reinterpret_cast< RelinkableHandle< OptionletVolatilityStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_boost__shared_ptrT_OptionletVolatilityStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "RelinkableOptionletVolatilityStructureHandle_linkTo" "', argument " "2"" of type '" "boost::shared_ptr< OptionletVolatilityStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "RelinkableOptionletVolatilityStructureHandle_linkTo" "', argument " "2"" of type '" "boost::shared_ptr< OptionletVolatilityStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< boost::shared_ptr< OptionletVolatilityStructure > * >(argp2);
    {
      try {
        (arg1)->linkTo((boost::shared_ptr< OptionletVolatilityStructure > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_RelinkableOptionletVolatilityStructureHandle) {
  {
    RelinkableHandle< OptionletVolatilityStructure > *arg1 = (RelinkableHandle< OptionletVolatilityStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_RelinkableOptionletVolatilityStructureHandle(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_RelinkableHandleT_OptionletVolatilityStructure_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_RelinkableOptionletVolatilityStructureHandle" "', argument " "1"" of type '" "RelinkableHandle< OptionletVolatilityStructure > *""'"); 
    }
    arg1 = reinterpret_cast< RelinkableHandle< OptionletVolatilityStructure > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_SwaptionVolatilityStructure___deref__) {
  {
    boost::shared_ptr< SwaptionVolatilityStructure > *arg1 = (boost::shared_ptr< SwaptionVolatilityStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    SwaptionVolatilityStructure *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: SwaptionVolatilityStructure___deref__(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_SwaptionVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwaptionVolatilityStructure___deref__" "', argument " "1"" of type '" "boost::shared_ptr< SwaptionVolatilityStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< SwaptionVolatilityStructure > * >(argp1);
    {
      try {
        result = (SwaptionVolatilityStructure *)(arg1)->operator ->();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SwaptionVolatilityStructure, 0 | 0); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_SwaptionVolatilityStructure_isNull) {
  {
    boost::shared_ptr< SwaptionVolatilityStructure > *arg1 = (boost::shared_ptr< SwaptionVolatilityStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: SwaptionVolatilityStructure_isNull(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_SwaptionVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwaptionVolatilityStructure_isNull" "', argument " "1"" of type '" "boost::shared_ptr< SwaptionVolatilityStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< SwaptionVolatilityStructure > * >(argp1);
    {
      try {
        result = (bool)boost_shared_ptr_Sl_SwaptionVolatilityStructure_Sg__isNull(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_SwaptionVolatilityStructure_asObservable) {
  {
    boost::shared_ptr< SwaptionVolatilityStructure > *arg1 = (boost::shared_ptr< SwaptionVolatilityStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    boost::shared_ptr< Observable > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: SwaptionVolatilityStructure_asObservable(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_SwaptionVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwaptionVolatilityStructure_asObservable" "', argument " "1"" of type '" "boost::shared_ptr< SwaptionVolatilityStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< SwaptionVolatilityStructure > * >(argp1);
    {
      try {
        result = boost_shared_ptr_Sl_SwaptionVolatilityStructure_Sg__asObservable(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new boost::shared_ptr< Observable >(static_cast< const boost::shared_ptr< Observable >& >(result))), SWIGTYPE_p_boost__shared_ptrT_Observable_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SwaptionVolatilityStructure) {
  {
    int argvi = 0;
    boost::shared_ptr< SwaptionVolatilityStructure > *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_SwaptionVolatilityStructure();");
    }
    {
      try {
        result = (boost::shared_ptr< SwaptionVolatilityStructure > *)new boost::shared_ptr< SwaptionVolatilityStructure >();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_boost__shared_ptrT_SwaptionVolatilityStructure_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_SwaptionVolatilityStructure) {
  {
    boost::shared_ptr< SwaptionVolatilityStructure > *arg1 = (boost::shared_ptr< SwaptionVolatilityStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_SwaptionVolatilityStructure(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_SwaptionVolatilityStructure_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SwaptionVolatilityStructure" "', argument " "1"" of type '" "boost::shared_ptr< SwaptionVolatilityStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< SwaptionVolatilityStructure > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_SwaptionVolatilityStructure_referenceDate) {
  {
    boost::shared_ptr< SwaptionVolatilityStructure > *arg1 = (boost::shared_ptr< SwaptionVolatilityStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: SwaptionVolatilityStructure_referenceDate(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_SwaptionVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwaptionVolatilityStructure_referenceDate" "', argument " "1"" of type '" "boost::shared_ptr< SwaptionVolatilityStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< SwaptionVolatilityStructure > * >(argp1);
    {
      try {
        result = (*arg1)->referenceDate();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_SwaptionVolatilityStructure_dayCounter) {
  {
    boost::shared_ptr< SwaptionVolatilityStructure > *arg1 = (boost::shared_ptr< SwaptionVolatilityStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    SwigValueWrapper< DayCounter > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: SwaptionVolatilityStructure_dayCounter(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_SwaptionVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwaptionVolatilityStructure_dayCounter" "', argument " "1"" of type '" "boost::shared_ptr< SwaptionVolatilityStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< SwaptionVolatilityStructure > * >(argp1);
    {
      try {
        result = (*arg1)->dayCounter();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new DayCounter(static_cast< const DayCounter& >(result))), SWIGTYPE_p_DayCounter, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_SwaptionVolatilityStructure_calendar) {
  {
    boost::shared_ptr< SwaptionVolatilityStructure > *arg1 = (boost::shared_ptr< SwaptionVolatilityStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    SwigValueWrapper< Calendar > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: SwaptionVolatilityStructure_calendar(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_SwaptionVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwaptionVolatilityStructure_calendar" "', argument " "1"" of type '" "boost::shared_ptr< SwaptionVolatilityStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< SwaptionVolatilityStructure > * >(argp1);
    {
      try {
        result = (*arg1)->calendar();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Calendar(static_cast< const Calendar& >(result))), SWIGTYPE_p_Calendar, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_SwaptionVolatilityStructure_maxSwapTenor) {
  {
    boost::shared_ptr< SwaptionVolatilityStructure > *arg1 = (boost::shared_ptr< SwaptionVolatilityStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Period result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: SwaptionVolatilityStructure_maxSwapTenor(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_SwaptionVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwaptionVolatilityStructure_maxSwapTenor" "', argument " "1"" of type '" "boost::shared_ptr< SwaptionVolatilityStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< SwaptionVolatilityStructure > * >(argp1);
    {
      try {
        result = (*arg1)->maxSwapTenor();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Period(static_cast< const Period& >(result))), SWIGTYPE_p_Period, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_SwaptionVolatilityStructure_maxSwapLength) {
  {
    boost::shared_ptr< SwaptionVolatilityStructure > *arg1 = (boost::shared_ptr< SwaptionVolatilityStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Time result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: SwaptionVolatilityStructure_maxSwapLength(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_SwaptionVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwaptionVolatilityStructure_maxSwapLength" "', argument " "1"" of type '" "boost::shared_ptr< SwaptionVolatilityStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< SwaptionVolatilityStructure > * >(argp1);
    {
      try {
        result = (Time)(*arg1)->maxSwapLength();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_SwaptionVolatilityStructure_minStrike) {
  {
    boost::shared_ptr< SwaptionVolatilityStructure > *arg1 = (boost::shared_ptr< SwaptionVolatilityStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: SwaptionVolatilityStructure_minStrike(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_SwaptionVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwaptionVolatilityStructure_minStrike" "', argument " "1"" of type '" "boost::shared_ptr< SwaptionVolatilityStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< SwaptionVolatilityStructure > * >(argp1);
    {
      try {
        result = (Real)(*arg1)->minStrike();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_SwaptionVolatilityStructure_maxStrike) {
  {
    boost::shared_ptr< SwaptionVolatilityStructure > *arg1 = (boost::shared_ptr< SwaptionVolatilityStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: SwaptionVolatilityStructure_maxStrike(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_SwaptionVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwaptionVolatilityStructure_maxStrike" "', argument " "1"" of type '" "boost::shared_ptr< SwaptionVolatilityStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< SwaptionVolatilityStructure > * >(argp1);
    {
      try {
        result = (Real)(*arg1)->maxStrike();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_SwaptionVolatilityStructure_volatility__SWIG_0) {
  {
    boost::shared_ptr< SwaptionVolatilityStructure > *arg1 = (boost::shared_ptr< SwaptionVolatilityStructure > *) 0 ;
    Date *arg2 = 0 ;
    Period *arg3 = 0 ;
    Rate arg4 ;
    bool arg5 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    bool val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    Volatility result;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: SwaptionVolatilityStructure_volatility(self,start,length,strike,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_SwaptionVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwaptionVolatilityStructure_volatility" "', argument " "1"" of type '" "boost::shared_ptr< SwaptionVolatilityStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< SwaptionVolatilityStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwaptionVolatilityStructure_volatility" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwaptionVolatilityStructure_volatility" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SwaptionVolatilityStructure_volatility" "', argument " "3"" of type '" "Period const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwaptionVolatilityStructure_volatility" "', argument " "3"" of type '" "Period const &""'"); 
    }
    arg3 = reinterpret_cast< Period * >(argp3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SwaptionVolatilityStructure_volatility" "', argument " "4"" of type '" "Rate""'");
    } 
    arg4 = static_cast< Rate >(val4);
    ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SwaptionVolatilityStructure_volatility" "', argument " "5"" of type '" "bool""'");
    } 
    arg5 = static_cast< bool >(val5);
    {
      try {
        result = (Volatility)(*arg1)->volatility((Date const &)*arg2,(Period const &)*arg3,arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_SwaptionVolatilityStructure_volatility__SWIG_1) {
  {
    boost::shared_ptr< SwaptionVolatilityStructure > *arg1 = (boost::shared_ptr< SwaptionVolatilityStructure > *) 0 ;
    Date *arg2 = 0 ;
    Period *arg3 = 0 ;
    Rate arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Volatility result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: SwaptionVolatilityStructure_volatility(self,start,length,strike);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_SwaptionVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwaptionVolatilityStructure_volatility" "', argument " "1"" of type '" "boost::shared_ptr< SwaptionVolatilityStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< SwaptionVolatilityStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwaptionVolatilityStructure_volatility" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwaptionVolatilityStructure_volatility" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SwaptionVolatilityStructure_volatility" "', argument " "3"" of type '" "Period const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwaptionVolatilityStructure_volatility" "', argument " "3"" of type '" "Period const &""'"); 
    }
    arg3 = reinterpret_cast< Period * >(argp3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SwaptionVolatilityStructure_volatility" "', argument " "4"" of type '" "Rate""'");
    } 
    arg4 = static_cast< Rate >(val4);
    {
      try {
        result = (Volatility)(*arg1)->volatility((Date const &)*arg2,(Period const &)*arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_SwaptionVolatilityStructure_volatility__SWIG_2) {
  {
    boost::shared_ptr< SwaptionVolatilityStructure > *arg1 = (boost::shared_ptr< SwaptionVolatilityStructure > *) 0 ;
    Time arg2 ;
    Time arg3 ;
    Rate arg4 ;
    bool arg5 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    bool val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    Volatility result;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: SwaptionVolatilityStructure_volatility(self,start,length,strike,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_SwaptionVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwaptionVolatilityStructure_volatility" "', argument " "1"" of type '" "boost::shared_ptr< SwaptionVolatilityStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< SwaptionVolatilityStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwaptionVolatilityStructure_volatility" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SwaptionVolatilityStructure_volatility" "', argument " "3"" of type '" "Time""'");
    } 
    arg3 = static_cast< Time >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SwaptionVolatilityStructure_volatility" "', argument " "4"" of type '" "Rate""'");
    } 
    arg4 = static_cast< Rate >(val4);
    ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SwaptionVolatilityStructure_volatility" "', argument " "5"" of type '" "bool""'");
    } 
    arg5 = static_cast< bool >(val5);
    {
      try {
        result = (Volatility)(*arg1)->volatility(arg2,arg3,arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_SwaptionVolatilityStructure_volatility__SWIG_3) {
  {
    boost::shared_ptr< SwaptionVolatilityStructure > *arg1 = (boost::shared_ptr< SwaptionVolatilityStructure > *) 0 ;
    Time arg2 ;
    Time arg3 ;
    Rate arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Volatility result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: SwaptionVolatilityStructure_volatility(self,start,length,strike);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_SwaptionVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwaptionVolatilityStructure_volatility" "', argument " "1"" of type '" "boost::shared_ptr< SwaptionVolatilityStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< SwaptionVolatilityStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwaptionVolatilityStructure_volatility" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SwaptionVolatilityStructure_volatility" "', argument " "3"" of type '" "Time""'");
    } 
    arg3 = static_cast< Time >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SwaptionVolatilityStructure_volatility" "', argument " "4"" of type '" "Rate""'");
    } 
    arg4 = static_cast< Rate >(val4);
    {
      try {
        result = (Volatility)(*arg1)->volatility(arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_SwaptionVolatilityStructure_volatility) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_SwaptionVolatilityStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_SwaptionVolatilityStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_SwaptionVolatilityStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_SwaptionVolatilityStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_SwaptionVolatilityStructure_volatility__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_SwaptionVolatilityStructure_volatility__SWIG_3); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_SwaptionVolatilityStructure_volatility__SWIG_0); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_SwaptionVolatilityStructure_volatility__SWIG_2); return;
    }
  }
  
  croak("No matching function for overloaded 'SwaptionVolatilityStructure_volatility'");
  XSRETURN(0);
}


XS(_wrap_SwaptionVolatilityStructure_blackVariance__SWIG_0) {
  {
    boost::shared_ptr< SwaptionVolatilityStructure > *arg1 = (boost::shared_ptr< SwaptionVolatilityStructure > *) 0 ;
    Date *arg2 = 0 ;
    Period *arg3 = 0 ;
    Rate arg4 ;
    bool arg5 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    bool val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: SwaptionVolatilityStructure_blackVariance(self,start,length,strike,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_SwaptionVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwaptionVolatilityStructure_blackVariance" "', argument " "1"" of type '" "boost::shared_ptr< SwaptionVolatilityStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< SwaptionVolatilityStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwaptionVolatilityStructure_blackVariance" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwaptionVolatilityStructure_blackVariance" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SwaptionVolatilityStructure_blackVariance" "', argument " "3"" of type '" "Period const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwaptionVolatilityStructure_blackVariance" "', argument " "3"" of type '" "Period const &""'"); 
    }
    arg3 = reinterpret_cast< Period * >(argp3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SwaptionVolatilityStructure_blackVariance" "', argument " "4"" of type '" "Rate""'");
    } 
    arg4 = static_cast< Rate >(val4);
    ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SwaptionVolatilityStructure_blackVariance" "', argument " "5"" of type '" "bool""'");
    } 
    arg5 = static_cast< bool >(val5);
    {
      try {
        result = (Real)(*arg1)->blackVariance((Date const &)*arg2,(Period const &)*arg3,arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_SwaptionVolatilityStructure_blackVariance__SWIG_1) {
  {
    boost::shared_ptr< SwaptionVolatilityStructure > *arg1 = (boost::shared_ptr< SwaptionVolatilityStructure > *) 0 ;
    Date *arg2 = 0 ;
    Period *arg3 = 0 ;
    Rate arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: SwaptionVolatilityStructure_blackVariance(self,start,length,strike);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_SwaptionVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwaptionVolatilityStructure_blackVariance" "', argument " "1"" of type '" "boost::shared_ptr< SwaptionVolatilityStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< SwaptionVolatilityStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwaptionVolatilityStructure_blackVariance" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwaptionVolatilityStructure_blackVariance" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SwaptionVolatilityStructure_blackVariance" "', argument " "3"" of type '" "Period const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwaptionVolatilityStructure_blackVariance" "', argument " "3"" of type '" "Period const &""'"); 
    }
    arg3 = reinterpret_cast< Period * >(argp3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SwaptionVolatilityStructure_blackVariance" "', argument " "4"" of type '" "Rate""'");
    } 
    arg4 = static_cast< Rate >(val4);
    {
      try {
        result = (Real)(*arg1)->blackVariance((Date const &)*arg2,(Period const &)*arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_SwaptionVolatilityStructure_blackVariance__SWIG_2) {
  {
    boost::shared_ptr< SwaptionVolatilityStructure > *arg1 = (boost::shared_ptr< SwaptionVolatilityStructure > *) 0 ;
    Time arg2 ;
    Time arg3 ;
    Rate arg4 ;
    bool arg5 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    bool val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: SwaptionVolatilityStructure_blackVariance(self,start,length,strike,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_SwaptionVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwaptionVolatilityStructure_blackVariance" "', argument " "1"" of type '" "boost::shared_ptr< SwaptionVolatilityStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< SwaptionVolatilityStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwaptionVolatilityStructure_blackVariance" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SwaptionVolatilityStructure_blackVariance" "', argument " "3"" of type '" "Time""'");
    } 
    arg3 = static_cast< Time >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SwaptionVolatilityStructure_blackVariance" "', argument " "4"" of type '" "Rate""'");
    } 
    arg4 = static_cast< Rate >(val4);
    ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SwaptionVolatilityStructure_blackVariance" "', argument " "5"" of type '" "bool""'");
    } 
    arg5 = static_cast< bool >(val5);
    {
      try {
        result = (Real)(*arg1)->blackVariance(arg2,arg3,arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_SwaptionVolatilityStructure_blackVariance__SWIG_3) {
  {
    boost::shared_ptr< SwaptionVolatilityStructure > *arg1 = (boost::shared_ptr< SwaptionVolatilityStructure > *) 0 ;
    Time arg2 ;
    Time arg3 ;
    Rate arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: SwaptionVolatilityStructure_blackVariance(self,start,length,strike);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_SwaptionVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwaptionVolatilityStructure_blackVariance" "', argument " "1"" of type '" "boost::shared_ptr< SwaptionVolatilityStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< SwaptionVolatilityStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwaptionVolatilityStructure_blackVariance" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SwaptionVolatilityStructure_blackVariance" "', argument " "3"" of type '" "Time""'");
    } 
    arg3 = static_cast< Time >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SwaptionVolatilityStructure_blackVariance" "', argument " "4"" of type '" "Rate""'");
    } 
    arg4 = static_cast< Rate >(val4);
    {
      try {
        result = (Real)(*arg1)->blackVariance(arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_SwaptionVolatilityStructure_blackVariance) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_SwaptionVolatilityStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_SwaptionVolatilityStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_SwaptionVolatilityStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_SwaptionVolatilityStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_SwaptionVolatilityStructure_blackVariance__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_SwaptionVolatilityStructure_blackVariance__SWIG_3); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_SwaptionVolatilityStructure_blackVariance__SWIG_0); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_SwaptionVolatilityStructure_blackVariance__SWIG_2); return;
    }
  }
  
  croak("No matching function for overloaded 'SwaptionVolatilityStructure_blackVariance'");
  XSRETURN(0);
}


XS(_wrap_SwaptionVolatilityStructure_optionDateFromTenor) {
  {
    boost::shared_ptr< SwaptionVolatilityStructure > *arg1 = (boost::shared_ptr< SwaptionVolatilityStructure > *) 0 ;
    Period *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: SwaptionVolatilityStructure_optionDateFromTenor(self,p);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_SwaptionVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwaptionVolatilityStructure_optionDateFromTenor" "', argument " "1"" of type '" "boost::shared_ptr< SwaptionVolatilityStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< SwaptionVolatilityStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwaptionVolatilityStructure_optionDateFromTenor" "', argument " "2"" of type '" "Period const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwaptionVolatilityStructure_optionDateFromTenor" "', argument " "2"" of type '" "Period const &""'"); 
    }
    arg2 = reinterpret_cast< Period * >(argp2);
    {
      try {
        result = (*arg1)->optionDateFromTenor((Period const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_SwaptionVolatilityStructure_enableExtrapolation) {
  {
    boost::shared_ptr< SwaptionVolatilityStructure > *arg1 = (boost::shared_ptr< SwaptionVolatilityStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: SwaptionVolatilityStructure_enableExtrapolation(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_SwaptionVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwaptionVolatilityStructure_enableExtrapolation" "', argument " "1"" of type '" "boost::shared_ptr< SwaptionVolatilityStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< SwaptionVolatilityStructure > * >(argp1);
    {
      try {
        (*arg1)->enableExtrapolation();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_SwaptionVolatilityStructure_disableExtrapolation) {
  {
    boost::shared_ptr< SwaptionVolatilityStructure > *arg1 = (boost::shared_ptr< SwaptionVolatilityStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: SwaptionVolatilityStructure_disableExtrapolation(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_SwaptionVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwaptionVolatilityStructure_disableExtrapolation" "', argument " "1"" of type '" "boost::shared_ptr< SwaptionVolatilityStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< SwaptionVolatilityStructure > * >(argp1);
    {
      try {
        (*arg1)->disableExtrapolation();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_SwaptionVolatilityStructure_allowsExtrapolation) {
  {
    boost::shared_ptr< SwaptionVolatilityStructure > *arg1 = (boost::shared_ptr< SwaptionVolatilityStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: SwaptionVolatilityStructure_allowsExtrapolation(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_SwaptionVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwaptionVolatilityStructure_allowsExtrapolation" "', argument " "1"" of type '" "boost::shared_ptr< SwaptionVolatilityStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< SwaptionVolatilityStructure > * >(argp1);
    {
      try {
        result = (bool)(*arg1)->allowsExtrapolation();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SwaptionVolatilityStructureHandle__SWIG_0) {
  {
    boost::shared_ptr< SwaptionVolatilityStructure > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Handle< SwaptionVolatilityStructure > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_SwaptionVolatilityStructureHandle(boost::shared_ptr< SwaptionVolatilityStructure > const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_SwaptionVolatilityStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SwaptionVolatilityStructureHandle" "', argument " "1"" of type '" "boost::shared_ptr< SwaptionVolatilityStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionVolatilityStructureHandle" "', argument " "1"" of type '" "boost::shared_ptr< SwaptionVolatilityStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< SwaptionVolatilityStructure > * >(argp1);
    {
      try {
        result = (Handle< SwaptionVolatilityStructure > *)new Handle< SwaptionVolatilityStructure >((boost::shared_ptr< SwaptionVolatilityStructure > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_HandleT_SwaptionVolatilityStructure_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SwaptionVolatilityStructureHandle__SWIG_1) {
  {
    int argvi = 0;
    Handle< SwaptionVolatilityStructure > *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_SwaptionVolatilityStructureHandle();");
    }
    {
      try {
        result = (Handle< SwaptionVolatilityStructure > *)new Handle< SwaptionVolatilityStructure >();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_HandleT_SwaptionVolatilityStructure_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_SwaptionVolatilityStructureHandle) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_SwaptionVolatilityStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SwaptionVolatilityStructureHandle__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SwaptionVolatilityStructureHandle__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_SwaptionVolatilityStructureHandle'");
  XSRETURN(0);
}


XS(_wrap_SwaptionVolatilityStructureHandle___deref__) {
  {
    Handle< SwaptionVolatilityStructure > *arg1 = (Handle< SwaptionVolatilityStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    boost::shared_ptr< SwaptionVolatilityStructure > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: SwaptionVolatilityStructureHandle___deref__(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_SwaptionVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwaptionVolatilityStructureHandle___deref__" "', argument " "1"" of type '" "Handle< SwaptionVolatilityStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< SwaptionVolatilityStructure > * >(argp1);
    {
      try {
        result = (arg1)->operator ->();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new boost::shared_ptr< SwaptionVolatilityStructure >(static_cast< const boost::shared_ptr< SwaptionVolatilityStructure >& >(result))), SWIGTYPE_p_boost__shared_ptrT_SwaptionVolatilityStructure_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_SwaptionVolatilityStructureHandle_empty) {
  {
    Handle< SwaptionVolatilityStructure > *arg1 = (Handle< SwaptionVolatilityStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: SwaptionVolatilityStructureHandle_empty(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_SwaptionVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwaptionVolatilityStructureHandle_empty" "', argument " "1"" of type '" "Handle< SwaptionVolatilityStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< SwaptionVolatilityStructure > * >(argp1);
    {
      try {
        result = (bool)(arg1)->empty();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_SwaptionVolatilityStructureHandle_asObservable) {
  {
    Handle< SwaptionVolatilityStructure > *arg1 = (Handle< SwaptionVolatilityStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    boost::shared_ptr< Observable > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: SwaptionVolatilityStructureHandle_asObservable(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_SwaptionVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwaptionVolatilityStructureHandle_asObservable" "', argument " "1"" of type '" "Handle< SwaptionVolatilityStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< SwaptionVolatilityStructure > * >(argp1);
    {
      try {
        result = Handle_Sl_SwaptionVolatilityStructure_Sg__asObservable(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new boost::shared_ptr< Observable >(static_cast< const boost::shared_ptr< Observable >& >(result))), SWIGTYPE_p_boost__shared_ptrT_Observable_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_SwaptionVolatilityStructureHandle) {
  {
    Handle< SwaptionVolatilityStructure > *arg1 = (Handle< SwaptionVolatilityStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_SwaptionVolatilityStructureHandle(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_SwaptionVolatilityStructure_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SwaptionVolatilityStructureHandle" "', argument " "1"" of type '" "Handle< SwaptionVolatilityStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< SwaptionVolatilityStructure > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_SwaptionVolatilityStructureHandle_referenceDate) {
  {
    Handle< SwaptionVolatilityStructure > *arg1 = (Handle< SwaptionVolatilityStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: SwaptionVolatilityStructureHandle_referenceDate(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_SwaptionVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwaptionVolatilityStructureHandle_referenceDate" "', argument " "1"" of type '" "Handle< SwaptionVolatilityStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< SwaptionVolatilityStructure > * >(argp1);
    {
      try {
        result = (*arg1)->referenceDate();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_SwaptionVolatilityStructureHandle_dayCounter) {
  {
    Handle< SwaptionVolatilityStructure > *arg1 = (Handle< SwaptionVolatilityStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    SwigValueWrapper< DayCounter > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: SwaptionVolatilityStructureHandle_dayCounter(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_SwaptionVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwaptionVolatilityStructureHandle_dayCounter" "', argument " "1"" of type '" "Handle< SwaptionVolatilityStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< SwaptionVolatilityStructure > * >(argp1);
    {
      try {
        result = (*arg1)->dayCounter();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new DayCounter(static_cast< const DayCounter& >(result))), SWIGTYPE_p_DayCounter, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_SwaptionVolatilityStructureHandle_calendar) {
  {
    Handle< SwaptionVolatilityStructure > *arg1 = (Handle< SwaptionVolatilityStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    SwigValueWrapper< Calendar > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: SwaptionVolatilityStructureHandle_calendar(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_SwaptionVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwaptionVolatilityStructureHandle_calendar" "', argument " "1"" of type '" "Handle< SwaptionVolatilityStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< SwaptionVolatilityStructure > * >(argp1);
    {
      try {
        result = (*arg1)->calendar();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Calendar(static_cast< const Calendar& >(result))), SWIGTYPE_p_Calendar, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_SwaptionVolatilityStructureHandle_maxSwapTenor) {
  {
    Handle< SwaptionVolatilityStructure > *arg1 = (Handle< SwaptionVolatilityStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Period result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: SwaptionVolatilityStructureHandle_maxSwapTenor(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_SwaptionVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwaptionVolatilityStructureHandle_maxSwapTenor" "', argument " "1"" of type '" "Handle< SwaptionVolatilityStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< SwaptionVolatilityStructure > * >(argp1);
    {
      try {
        result = (*arg1)->maxSwapTenor();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Period(static_cast< const Period& >(result))), SWIGTYPE_p_Period, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_SwaptionVolatilityStructureHandle_maxSwapLength) {
  {
    Handle< SwaptionVolatilityStructure > *arg1 = (Handle< SwaptionVolatilityStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Time result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: SwaptionVolatilityStructureHandle_maxSwapLength(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_SwaptionVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwaptionVolatilityStructureHandle_maxSwapLength" "', argument " "1"" of type '" "Handle< SwaptionVolatilityStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< SwaptionVolatilityStructure > * >(argp1);
    {
      try {
        result = (Time)(*arg1)->maxSwapLength();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_SwaptionVolatilityStructureHandle_minStrike) {
  {
    Handle< SwaptionVolatilityStructure > *arg1 = (Handle< SwaptionVolatilityStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: SwaptionVolatilityStructureHandle_minStrike(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_SwaptionVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwaptionVolatilityStructureHandle_minStrike" "', argument " "1"" of type '" "Handle< SwaptionVolatilityStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< SwaptionVolatilityStructure > * >(argp1);
    {
      try {
        result = (Real)(*arg1)->minStrike();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_SwaptionVolatilityStructureHandle_maxStrike) {
  {
    Handle< SwaptionVolatilityStructure > *arg1 = (Handle< SwaptionVolatilityStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: SwaptionVolatilityStructureHandle_maxStrike(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_SwaptionVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwaptionVolatilityStructureHandle_maxStrike" "', argument " "1"" of type '" "Handle< SwaptionVolatilityStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< SwaptionVolatilityStructure > * >(argp1);
    {
      try {
        result = (Real)(*arg1)->maxStrike();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_SwaptionVolatilityStructureHandle_volatility__SWIG_0) {
  {
    Handle< SwaptionVolatilityStructure > *arg1 = (Handle< SwaptionVolatilityStructure > *) 0 ;
    Date *arg2 = 0 ;
    Period *arg3 = 0 ;
    Rate arg4 ;
    bool arg5 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    bool val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    Volatility result;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: SwaptionVolatilityStructureHandle_volatility(self,start,length,strike,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_SwaptionVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwaptionVolatilityStructureHandle_volatility" "', argument " "1"" of type '" "Handle< SwaptionVolatilityStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< SwaptionVolatilityStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwaptionVolatilityStructureHandle_volatility" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwaptionVolatilityStructureHandle_volatility" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SwaptionVolatilityStructureHandle_volatility" "', argument " "3"" of type '" "Period const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwaptionVolatilityStructureHandle_volatility" "', argument " "3"" of type '" "Period const &""'"); 
    }
    arg3 = reinterpret_cast< Period * >(argp3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SwaptionVolatilityStructureHandle_volatility" "', argument " "4"" of type '" "Rate""'");
    } 
    arg4 = static_cast< Rate >(val4);
    ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SwaptionVolatilityStructureHandle_volatility" "', argument " "5"" of type '" "bool""'");
    } 
    arg5 = static_cast< bool >(val5);
    {
      try {
        result = (Volatility)(*arg1)->volatility((Date const &)*arg2,(Period const &)*arg3,arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_SwaptionVolatilityStructureHandle_volatility__SWIG_1) {
  {
    Handle< SwaptionVolatilityStructure > *arg1 = (Handle< SwaptionVolatilityStructure > *) 0 ;
    Date *arg2 = 0 ;
    Period *arg3 = 0 ;
    Rate arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Volatility result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: SwaptionVolatilityStructureHandle_volatility(self,start,length,strike);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_SwaptionVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwaptionVolatilityStructureHandle_volatility" "', argument " "1"" of type '" "Handle< SwaptionVolatilityStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< SwaptionVolatilityStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwaptionVolatilityStructureHandle_volatility" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwaptionVolatilityStructureHandle_volatility" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SwaptionVolatilityStructureHandle_volatility" "', argument " "3"" of type '" "Period const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwaptionVolatilityStructureHandle_volatility" "', argument " "3"" of type '" "Period const &""'"); 
    }
    arg3 = reinterpret_cast< Period * >(argp3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SwaptionVolatilityStructureHandle_volatility" "', argument " "4"" of type '" "Rate""'");
    } 
    arg4 = static_cast< Rate >(val4);
    {
      try {
        result = (Volatility)(*arg1)->volatility((Date const &)*arg2,(Period const &)*arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_SwaptionVolatilityStructureHandle_volatility__SWIG_2) {
  {
    Handle< SwaptionVolatilityStructure > *arg1 = (Handle< SwaptionVolatilityStructure > *) 0 ;
    Time arg2 ;
    Time arg3 ;
    Rate arg4 ;
    bool arg5 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    bool val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    Volatility result;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: SwaptionVolatilityStructureHandle_volatility(self,start,length,strike,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_SwaptionVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwaptionVolatilityStructureHandle_volatility" "', argument " "1"" of type '" "Handle< SwaptionVolatilityStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< SwaptionVolatilityStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwaptionVolatilityStructureHandle_volatility" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SwaptionVolatilityStructureHandle_volatility" "', argument " "3"" of type '" "Time""'");
    } 
    arg3 = static_cast< Time >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SwaptionVolatilityStructureHandle_volatility" "', argument " "4"" of type '" "Rate""'");
    } 
    arg4 = static_cast< Rate >(val4);
    ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SwaptionVolatilityStructureHandle_volatility" "', argument " "5"" of type '" "bool""'");
    } 
    arg5 = static_cast< bool >(val5);
    {
      try {
        result = (Volatility)(*arg1)->volatility(arg2,arg3,arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_SwaptionVolatilityStructureHandle_volatility__SWIG_3) {
  {
    Handle< SwaptionVolatilityStructure > *arg1 = (Handle< SwaptionVolatilityStructure > *) 0 ;
    Time arg2 ;
    Time arg3 ;
    Rate arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Volatility result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: SwaptionVolatilityStructureHandle_volatility(self,start,length,strike);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_SwaptionVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwaptionVolatilityStructureHandle_volatility" "', argument " "1"" of type '" "Handle< SwaptionVolatilityStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< SwaptionVolatilityStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwaptionVolatilityStructureHandle_volatility" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SwaptionVolatilityStructureHandle_volatility" "', argument " "3"" of type '" "Time""'");
    } 
    arg3 = static_cast< Time >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SwaptionVolatilityStructureHandle_volatility" "', argument " "4"" of type '" "Rate""'");
    } 
    arg4 = static_cast< Rate >(val4);
    {
      try {
        result = (Volatility)(*arg1)->volatility(arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_SwaptionVolatilityStructureHandle_volatility) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_SwaptionVolatilityStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_SwaptionVolatilityStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_SwaptionVolatilityStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_SwaptionVolatilityStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_SwaptionVolatilityStructureHandle_volatility__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_SwaptionVolatilityStructureHandle_volatility__SWIG_3); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_SwaptionVolatilityStructureHandle_volatility__SWIG_0); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_SwaptionVolatilityStructureHandle_volatility__SWIG_2); return;
    }
  }
  
  croak("No matching function for overloaded 'SwaptionVolatilityStructureHandle_volatility'");
  XSRETURN(0);
}


XS(_wrap_SwaptionVolatilityStructureHandle_blackVariance__SWIG_0) {
  {
    Handle< SwaptionVolatilityStructure > *arg1 = (Handle< SwaptionVolatilityStructure > *) 0 ;
    Date *arg2 = 0 ;
    Period *arg3 = 0 ;
    Rate arg4 ;
    bool arg5 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    bool val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: SwaptionVolatilityStructureHandle_blackVariance(self,start,length,strike,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_SwaptionVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwaptionVolatilityStructureHandle_blackVariance" "', argument " "1"" of type '" "Handle< SwaptionVolatilityStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< SwaptionVolatilityStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwaptionVolatilityStructureHandle_blackVariance" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwaptionVolatilityStructureHandle_blackVariance" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SwaptionVolatilityStructureHandle_blackVariance" "', argument " "3"" of type '" "Period const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwaptionVolatilityStructureHandle_blackVariance" "', argument " "3"" of type '" "Period const &""'"); 
    }
    arg3 = reinterpret_cast< Period * >(argp3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SwaptionVolatilityStructureHandle_blackVariance" "', argument " "4"" of type '" "Rate""'");
    } 
    arg4 = static_cast< Rate >(val4);
    ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SwaptionVolatilityStructureHandle_blackVariance" "', argument " "5"" of type '" "bool""'");
    } 
    arg5 = static_cast< bool >(val5);
    {
      try {
        result = (Real)(*arg1)->blackVariance((Date const &)*arg2,(Period const &)*arg3,arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_SwaptionVolatilityStructureHandle_blackVariance__SWIG_1) {
  {
    Handle< SwaptionVolatilityStructure > *arg1 = (Handle< SwaptionVolatilityStructure > *) 0 ;
    Date *arg2 = 0 ;
    Period *arg3 = 0 ;
    Rate arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: SwaptionVolatilityStructureHandle_blackVariance(self,start,length,strike);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_SwaptionVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwaptionVolatilityStructureHandle_blackVariance" "', argument " "1"" of type '" "Handle< SwaptionVolatilityStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< SwaptionVolatilityStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwaptionVolatilityStructureHandle_blackVariance" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwaptionVolatilityStructureHandle_blackVariance" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SwaptionVolatilityStructureHandle_blackVariance" "', argument " "3"" of type '" "Period const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwaptionVolatilityStructureHandle_blackVariance" "', argument " "3"" of type '" "Period const &""'"); 
    }
    arg3 = reinterpret_cast< Period * >(argp3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SwaptionVolatilityStructureHandle_blackVariance" "', argument " "4"" of type '" "Rate""'");
    } 
    arg4 = static_cast< Rate >(val4);
    {
      try {
        result = (Real)(*arg1)->blackVariance((Date const &)*arg2,(Period const &)*arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_SwaptionVolatilityStructureHandle_blackVariance__SWIG_2) {
  {
    Handle< SwaptionVolatilityStructure > *arg1 = (Handle< SwaptionVolatilityStructure > *) 0 ;
    Time arg2 ;
    Time arg3 ;
    Rate arg4 ;
    bool arg5 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    bool val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: SwaptionVolatilityStructureHandle_blackVariance(self,start,length,strike,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_SwaptionVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwaptionVolatilityStructureHandle_blackVariance" "', argument " "1"" of type '" "Handle< SwaptionVolatilityStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< SwaptionVolatilityStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwaptionVolatilityStructureHandle_blackVariance" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SwaptionVolatilityStructureHandle_blackVariance" "', argument " "3"" of type '" "Time""'");
    } 
    arg3 = static_cast< Time >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SwaptionVolatilityStructureHandle_blackVariance" "', argument " "4"" of type '" "Rate""'");
    } 
    arg4 = static_cast< Rate >(val4);
    ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SwaptionVolatilityStructureHandle_blackVariance" "', argument " "5"" of type '" "bool""'");
    } 
    arg5 = static_cast< bool >(val5);
    {
      try {
        result = (Real)(*arg1)->blackVariance(arg2,arg3,arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_SwaptionVolatilityStructureHandle_blackVariance__SWIG_3) {
  {
    Handle< SwaptionVolatilityStructure > *arg1 = (Handle< SwaptionVolatilityStructure > *) 0 ;
    Time arg2 ;
    Time arg3 ;
    Rate arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: SwaptionVolatilityStructureHandle_blackVariance(self,start,length,strike);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_SwaptionVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwaptionVolatilityStructureHandle_blackVariance" "', argument " "1"" of type '" "Handle< SwaptionVolatilityStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< SwaptionVolatilityStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwaptionVolatilityStructureHandle_blackVariance" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SwaptionVolatilityStructureHandle_blackVariance" "', argument " "3"" of type '" "Time""'");
    } 
    arg3 = static_cast< Time >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SwaptionVolatilityStructureHandle_blackVariance" "', argument " "4"" of type '" "Rate""'");
    } 
    arg4 = static_cast< Rate >(val4);
    {
      try {
        result = (Real)(*arg1)->blackVariance(arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_SwaptionVolatilityStructureHandle_blackVariance) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_SwaptionVolatilityStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_SwaptionVolatilityStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_SwaptionVolatilityStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_SwaptionVolatilityStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_SwaptionVolatilityStructureHandle_blackVariance__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_SwaptionVolatilityStructureHandle_blackVariance__SWIG_3); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_SwaptionVolatilityStructureHandle_blackVariance__SWIG_0); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_SwaptionVolatilityStructureHandle_blackVariance__SWIG_2); return;
    }
  }
  
  croak("No matching function for overloaded 'SwaptionVolatilityStructureHandle_blackVariance'");
  XSRETURN(0);
}


XS(_wrap_SwaptionVolatilityStructureHandle_optionDateFromTenor) {
  {
    Handle< SwaptionVolatilityStructure > *arg1 = (Handle< SwaptionVolatilityStructure > *) 0 ;
    Period *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: SwaptionVolatilityStructureHandle_optionDateFromTenor(self,p);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_SwaptionVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwaptionVolatilityStructureHandle_optionDateFromTenor" "', argument " "1"" of type '" "Handle< SwaptionVolatilityStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< SwaptionVolatilityStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwaptionVolatilityStructureHandle_optionDateFromTenor" "', argument " "2"" of type '" "Period const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwaptionVolatilityStructureHandle_optionDateFromTenor" "', argument " "2"" of type '" "Period const &""'"); 
    }
    arg2 = reinterpret_cast< Period * >(argp2);
    {
      try {
        result = (*arg1)->optionDateFromTenor((Period const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_SwaptionVolatilityStructureHandle_enableExtrapolation) {
  {
    Handle< SwaptionVolatilityStructure > *arg1 = (Handle< SwaptionVolatilityStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: SwaptionVolatilityStructureHandle_enableExtrapolation(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_SwaptionVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwaptionVolatilityStructureHandle_enableExtrapolation" "', argument " "1"" of type '" "Handle< SwaptionVolatilityStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< SwaptionVolatilityStructure > * >(argp1);
    {
      try {
        (*arg1)->enableExtrapolation();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_SwaptionVolatilityStructureHandle_disableExtrapolation) {
  {
    Handle< SwaptionVolatilityStructure > *arg1 = (Handle< SwaptionVolatilityStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: SwaptionVolatilityStructureHandle_disableExtrapolation(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_SwaptionVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwaptionVolatilityStructureHandle_disableExtrapolation" "', argument " "1"" of type '" "Handle< SwaptionVolatilityStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< SwaptionVolatilityStructure > * >(argp1);
    {
      try {
        (*arg1)->disableExtrapolation();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_SwaptionVolatilityStructureHandle_allowsExtrapolation) {
  {
    Handle< SwaptionVolatilityStructure > *arg1 = (Handle< SwaptionVolatilityStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: SwaptionVolatilityStructureHandle_allowsExtrapolation(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_SwaptionVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwaptionVolatilityStructureHandle_allowsExtrapolation" "', argument " "1"" of type '" "Handle< SwaptionVolatilityStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< SwaptionVolatilityStructure > * >(argp1);
    {
      try {
        result = (bool)(*arg1)->allowsExtrapolation();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_RelinkableSwaptionVolatilityStructureHandle__SWIG_0) {
  {
    boost::shared_ptr< SwaptionVolatilityStructure > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    RelinkableHandle< SwaptionVolatilityStructure > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_RelinkableSwaptionVolatilityStructureHandle(boost::shared_ptr< SwaptionVolatilityStructure > const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_SwaptionVolatilityStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_RelinkableSwaptionVolatilityStructureHandle" "', argument " "1"" of type '" "boost::shared_ptr< SwaptionVolatilityStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_RelinkableSwaptionVolatilityStructureHandle" "', argument " "1"" of type '" "boost::shared_ptr< SwaptionVolatilityStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< SwaptionVolatilityStructure > * >(argp1);
    {
      try {
        result = (RelinkableHandle< SwaptionVolatilityStructure > *)new RelinkableHandle< SwaptionVolatilityStructure >((boost::shared_ptr< SwaptionVolatilityStructure > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_RelinkableHandleT_SwaptionVolatilityStructure_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_RelinkableSwaptionVolatilityStructureHandle__SWIG_1) {
  {
    int argvi = 0;
    RelinkableHandle< SwaptionVolatilityStructure > *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_RelinkableSwaptionVolatilityStructureHandle();");
    }
    {
      try {
        result = (RelinkableHandle< SwaptionVolatilityStructure > *)new RelinkableHandle< SwaptionVolatilityStructure >();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_RelinkableHandleT_SwaptionVolatilityStructure_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_RelinkableSwaptionVolatilityStructureHandle) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_SwaptionVolatilityStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_RelinkableSwaptionVolatilityStructureHandle__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_RelinkableSwaptionVolatilityStructureHandle__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_RelinkableSwaptionVolatilityStructureHandle'");
  XSRETURN(0);
}


XS(_wrap_RelinkableSwaptionVolatilityStructureHandle_linkTo) {
  {
    RelinkableHandle< SwaptionVolatilityStructure > *arg1 = (RelinkableHandle< SwaptionVolatilityStructure > *) 0 ;
    boost::shared_ptr< SwaptionVolatilityStructure > *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: RelinkableSwaptionVolatilityStructureHandle_linkTo(self,boost::shared_ptr< SwaptionVolatilityStructure > const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_RelinkableHandleT_SwaptionVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RelinkableSwaptionVolatilityStructureHandle_linkTo" "', argument " "1"" of type '" "RelinkableHandle< SwaptionVolatilityStructure > *""'"); 
    }
    arg1 = reinterpret_cast< RelinkableHandle< SwaptionVolatilityStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_boost__shared_ptrT_SwaptionVolatilityStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "RelinkableSwaptionVolatilityStructureHandle_linkTo" "', argument " "2"" of type '" "boost::shared_ptr< SwaptionVolatilityStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "RelinkableSwaptionVolatilityStructureHandle_linkTo" "', argument " "2"" of type '" "boost::shared_ptr< SwaptionVolatilityStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< boost::shared_ptr< SwaptionVolatilityStructure > * >(argp2);
    {
      try {
        (arg1)->linkTo((boost::shared_ptr< SwaptionVolatilityStructure > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_RelinkableSwaptionVolatilityStructureHandle) {
  {
    RelinkableHandle< SwaptionVolatilityStructure > *arg1 = (RelinkableHandle< SwaptionVolatilityStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_RelinkableSwaptionVolatilityStructureHandle(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_RelinkableHandleT_SwaptionVolatilityStructure_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_RelinkableSwaptionVolatilityStructureHandle" "', argument " "1"" of type '" "RelinkableHandle< SwaptionVolatilityStructure > *""'"); 
    }
    arg1 = reinterpret_cast< RelinkableHandle< SwaptionVolatilityStructure > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BlackConstantVol__SWIG_0) {
  {
    Date *arg1 = 0 ;
    Calendar *arg2 = 0 ;
    Volatility arg3 ;
    DayCounter *arg4 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int argvi = 0;
    BlackConstantVolPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_BlackConstantVol(referenceDate,c,volatility,dayCounter);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_BlackConstantVol" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BlackConstantVol" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_BlackConstantVol" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BlackConstantVol" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_BlackConstantVol" "', argument " "3"" of type '" "Volatility""'");
    } 
    arg3 = static_cast< Volatility >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_BlackConstantVol" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BlackConstantVol" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    {
      try {
        result = (BlackConstantVolPtr *)new_BlackConstantVolPtr__SWIG_0((Date const &)*arg1,(Calendar const &)*arg2,arg3,(DayCounter const &)*arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BlackConstantVolPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BlackConstantVol__SWIG_1) {
  {
    Date *arg1 = 0 ;
    Calendar *arg2 = 0 ;
    Handle< Quote > *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int argvi = 0;
    BlackConstantVolPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_BlackConstantVol(referenceDate,c,volatility,dayCounter);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_BlackConstantVol" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BlackConstantVol" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_BlackConstantVol" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BlackConstantVol" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_BlackConstantVol" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BlackConstantVol" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< Quote > * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_BlackConstantVol" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BlackConstantVol" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    {
      try {
        result = (BlackConstantVolPtr *)new_BlackConstantVolPtr__SWIG_1((Date const &)*arg1,(Calendar const &)*arg2,(Handle< Quote > const &)*arg3,(DayCounter const &)*arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BlackConstantVolPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BlackConstantVol__SWIG_2) {
  {
    Natural arg1 ;
    Calendar *arg2 = 0 ;
    Volatility arg3 ;
    DayCounter *arg4 = 0 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int argvi = 0;
    BlackConstantVolPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_BlackConstantVol(settlementDays,calendar,volatility,dayCounter);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_BlackConstantVol" "', argument " "1"" of type '" "Natural""'");
    } 
    arg1 = static_cast< Natural >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_BlackConstantVol" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BlackConstantVol" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_BlackConstantVol" "', argument " "3"" of type '" "Volatility""'");
    } 
    arg3 = static_cast< Volatility >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_BlackConstantVol" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BlackConstantVol" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    {
      try {
        result = (BlackConstantVolPtr *)new_BlackConstantVolPtr__SWIG_2(arg1,(Calendar const &)*arg2,arg3,(DayCounter const &)*arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BlackConstantVolPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BlackConstantVol__SWIG_3) {
  {
    Natural arg1 ;
    Calendar *arg2 = 0 ;
    Handle< Quote > *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int argvi = 0;
    BlackConstantVolPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_BlackConstantVol(settlementDays,calendar,volatility,dayCounter);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_BlackConstantVol" "', argument " "1"" of type '" "Natural""'");
    } 
    arg1 = static_cast< Natural >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_BlackConstantVol" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BlackConstantVol" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_BlackConstantVol" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BlackConstantVol" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< Quote > * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_BlackConstantVol" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BlackConstantVol" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    {
      try {
        result = (BlackConstantVolPtr *)new_BlackConstantVolPtr__SWIG_3(arg1,(Calendar const &)*arg2,(Handle< Quote > const &)*arg3,(DayCounter const &)*arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BlackConstantVolPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BlackConstantVol) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_BlackConstantVol__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_BlackConstantVol__SWIG_0); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_BlackConstantVol__SWIG_3); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_BlackConstantVol__SWIG_2); return;
    }
  }
  
  croak("No matching function for overloaded 'new_BlackConstantVol'");
  XSRETURN(0);
}


XS(_wrap_delete_BlackConstantVol) {
  {
    BlackConstantVolPtr *arg1 = (BlackConstantVolPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_BlackConstantVol(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BlackConstantVolPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_BlackConstantVol" "', argument " "1"" of type '" "BlackConstantVolPtr *""'"); 
    }
    arg1 = reinterpret_cast< BlackConstantVolPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BlackVarianceCurve__SWIG_0) {
  {
    Date *arg1 = 0 ;
    std::vector< Date > *arg2 = 0 ;
    std::vector< Real > *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    bool arg5 ;
    void *argp1 ;
    int res1 = 0 ;
    std::vector< Date > temp2 ;
    std::vector< Date > *v2 ;
    std::vector< double > temp3 ;
    std::vector< double > *v3 ;
    void *argp4 ;
    int res4 = 0 ;
    bool val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    BlackVarianceCurvePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_BlackVarianceCurve(referenceDate,dates,volatilities,dayCounter,forceMonotoneVariance);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_BlackVarianceCurve" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BlackVarianceCurve" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_BlackVarianceCurve. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp2.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_BlackVarianceCurve. "
              "Expected an array of " "Date");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_BlackVarianceCurve. "
          "Expected an array of " "Date");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_BlackVarianceCurve. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp3.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_BlackVarianceCurve. "
              "Expected an array of ""double");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_BlackVarianceCurve. "
          "Expected an array of ""double");
      }
    }
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_BlackVarianceCurve" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BlackVarianceCurve" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_BlackVarianceCurve" "', argument " "5"" of type '" "bool""'");
    } 
    arg5 = static_cast< bool >(val5);
    {
      try {
        result = (BlackVarianceCurvePtr *)new_BlackVarianceCurvePtr__SWIG_0((Date const &)*arg1,(std::vector< Date > const &)*arg2,(std::vector< double > const &)*arg3,(DayCounter const &)*arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BlackVarianceCurvePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BlackVarianceCurve__SWIG_1) {
  {
    Date *arg1 = 0 ;
    std::vector< Date > *arg2 = 0 ;
    std::vector< Real > *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    std::vector< Date > temp2 ;
    std::vector< Date > *v2 ;
    std::vector< double > temp3 ;
    std::vector< double > *v3 ;
    void *argp4 ;
    int res4 = 0 ;
    int argvi = 0;
    BlackVarianceCurvePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_BlackVarianceCurve(referenceDate,dates,volatilities,dayCounter);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_BlackVarianceCurve" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BlackVarianceCurve" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_BlackVarianceCurve. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp2.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_BlackVarianceCurve. "
              "Expected an array of " "Date");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_BlackVarianceCurve. "
          "Expected an array of " "Date");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_BlackVarianceCurve. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp3.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_BlackVarianceCurve. "
              "Expected an array of ""double");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_BlackVarianceCurve. "
          "Expected an array of ""double");
      }
    }
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_BlackVarianceCurve" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BlackVarianceCurve" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    {
      try {
        result = (BlackVarianceCurvePtr *)new_BlackVarianceCurvePtr__SWIG_0((Date const &)*arg1,(std::vector< Date > const &)*arg2,(std::vector< double > const &)*arg3,(DayCounter const &)*arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BlackVarianceCurvePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BlackVarianceCurve) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_BlackVarianceCurve__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_BlackVarianceCurve__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_BlackVarianceCurve'");
  XSRETURN(0);
}


XS(_wrap_delete_BlackVarianceCurve) {
  {
    BlackVarianceCurvePtr *arg1 = (BlackVarianceCurvePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_BlackVarianceCurve(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BlackVarianceCurvePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_BlackVarianceCurve" "', argument " "1"" of type '" "BlackVarianceCurvePtr *""'"); 
    }
    arg1 = reinterpret_cast< BlackVarianceCurvePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BlackVarianceSurface__SWIG_0) {
  {
    Date *arg1 = 0 ;
    Calendar *arg2 = 0 ;
    std::vector< Date > *arg3 = 0 ;
    std::vector< Real > *arg4 = 0 ;
    Matrix *arg5 = 0 ;
    DayCounter *arg6 = 0 ;
    BlackVarianceSurface::Extrapolation arg7 ;
    BlackVarianceSurface::Extrapolation arg8 ;
    std::string *arg9 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    std::vector< Date > temp3 ;
    std::vector< Date > *v3 ;
    std::vector< double > temp4 ;
    std::vector< double > *v4 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    int val7 ;
    int ecode7 = 0 ;
    int val8 ;
    int ecode8 = 0 ;
    int res9 = SWIG_OLDOBJ ;
    int argvi = 0;
    BlackVarianceSurfacePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 9) || (items > 9)) {
      SWIG_croak("Usage: new_BlackVarianceSurface(referenceDate,cal,dates,strikes,blackVols,dayCounter,lower,upper,interpolator);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_BlackVarianceSurface" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BlackVarianceSurface" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_BlackVarianceSurface" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BlackVarianceSurface" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_BlackVarianceSurface. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp3.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_BlackVarianceSurface. "
              "Expected an array of " "Date");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_BlackVarianceSurface. "
          "Expected an array of " "Date");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of new_BlackVarianceSurface. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp4.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 4 of "
              "new_BlackVarianceSurface. "
              "Expected an array of ""double");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of new_BlackVarianceSurface. "
          "Expected an array of ""double");
      }
    }
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Matrix,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_BlackVarianceSurface" "', argument " "5"" of type '" "Matrix const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BlackVarianceSurface" "', argument " "5"" of type '" "Matrix const &""'"); 
    }
    arg5 = reinterpret_cast< Matrix * >(argp5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_BlackVarianceSurface" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BlackVarianceSurface" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    arg6 = reinterpret_cast< DayCounter * >(argp6);
    ecode7 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_BlackVarianceSurface" "', argument " "7"" of type '" "BlackVarianceSurface::Extrapolation""'");
    } 
    arg7 = static_cast< BlackVarianceSurface::Extrapolation >(val7);
    ecode8 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_BlackVarianceSurface" "', argument " "8"" of type '" "BlackVarianceSurface::Extrapolation""'");
    } 
    arg8 = static_cast< BlackVarianceSurface::Extrapolation >(val8);
    {
      std::string *ptr = (std::string *)0;
      res9 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(8), &ptr);
      if (!SWIG_IsOK(res9)) {
        SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_BlackVarianceSurface" "', argument " "9"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BlackVarianceSurface" "', argument " "9"" of type '" "std::string const &""'"); 
      }
      arg9 = ptr;
    }
    {
      try {
        result = (BlackVarianceSurfacePtr *)new_BlackVarianceSurfacePtr__SWIG_0((Date const &)*arg1,(Calendar const &)*arg2,(std::vector< Date > const &)*arg3,(std::vector< double > const &)*arg4,(Matrix const &)*arg5,(DayCounter const &)*arg6,arg7,arg8,(std::string const &)*arg9);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BlackVarianceSurfacePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    if (SWIG_IsNewObj(res9)) delete arg9;
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    if (SWIG_IsNewObj(res9)) delete arg9;
    SWIG_croak_null();
  }
}


XS(_wrap_new_BlackVarianceSurface__SWIG_1) {
  {
    Date *arg1 = 0 ;
    Calendar *arg2 = 0 ;
    std::vector< Date > *arg3 = 0 ;
    std::vector< Real > *arg4 = 0 ;
    Matrix *arg5 = 0 ;
    DayCounter *arg6 = 0 ;
    BlackVarianceSurface::Extrapolation arg7 ;
    BlackVarianceSurface::Extrapolation arg8 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    std::vector< Date > temp3 ;
    std::vector< Date > *v3 ;
    std::vector< double > temp4 ;
    std::vector< double > *v4 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    int val7 ;
    int ecode7 = 0 ;
    int val8 ;
    int ecode8 = 0 ;
    int argvi = 0;
    BlackVarianceSurfacePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 8) || (items > 8)) {
      SWIG_croak("Usage: new_BlackVarianceSurface(referenceDate,cal,dates,strikes,blackVols,dayCounter,lower,upper);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_BlackVarianceSurface" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BlackVarianceSurface" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_BlackVarianceSurface" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BlackVarianceSurface" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_BlackVarianceSurface. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp3.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_BlackVarianceSurface. "
              "Expected an array of " "Date");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_BlackVarianceSurface. "
          "Expected an array of " "Date");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of new_BlackVarianceSurface. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp4.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 4 of "
              "new_BlackVarianceSurface. "
              "Expected an array of ""double");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of new_BlackVarianceSurface. "
          "Expected an array of ""double");
      }
    }
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Matrix,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_BlackVarianceSurface" "', argument " "5"" of type '" "Matrix const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BlackVarianceSurface" "', argument " "5"" of type '" "Matrix const &""'"); 
    }
    arg5 = reinterpret_cast< Matrix * >(argp5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_BlackVarianceSurface" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BlackVarianceSurface" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    arg6 = reinterpret_cast< DayCounter * >(argp6);
    ecode7 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_BlackVarianceSurface" "', argument " "7"" of type '" "BlackVarianceSurface::Extrapolation""'");
    } 
    arg7 = static_cast< BlackVarianceSurface::Extrapolation >(val7);
    ecode8 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_BlackVarianceSurface" "', argument " "8"" of type '" "BlackVarianceSurface::Extrapolation""'");
    } 
    arg8 = static_cast< BlackVarianceSurface::Extrapolation >(val8);
    {
      try {
        result = (BlackVarianceSurfacePtr *)new_BlackVarianceSurfacePtr__SWIG_0((Date const &)*arg1,(Calendar const &)*arg2,(std::vector< Date > const &)*arg3,(std::vector< double > const &)*arg4,(Matrix const &)*arg5,(DayCounter const &)*arg6,arg7,arg8);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BlackVarianceSurfacePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BlackVarianceSurface__SWIG_2) {
  {
    Date *arg1 = 0 ;
    Calendar *arg2 = 0 ;
    std::vector< Date > *arg3 = 0 ;
    std::vector< Real > *arg4 = 0 ;
    Matrix *arg5 = 0 ;
    DayCounter *arg6 = 0 ;
    BlackVarianceSurface::Extrapolation arg7 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    std::vector< Date > temp3 ;
    std::vector< Date > *v3 ;
    std::vector< double > temp4 ;
    std::vector< double > *v4 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    int val7 ;
    int ecode7 = 0 ;
    int argvi = 0;
    BlackVarianceSurfacePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: new_BlackVarianceSurface(referenceDate,cal,dates,strikes,blackVols,dayCounter,lower);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_BlackVarianceSurface" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BlackVarianceSurface" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_BlackVarianceSurface" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BlackVarianceSurface" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_BlackVarianceSurface. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp3.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_BlackVarianceSurface. "
              "Expected an array of " "Date");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_BlackVarianceSurface. "
          "Expected an array of " "Date");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of new_BlackVarianceSurface. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp4.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 4 of "
              "new_BlackVarianceSurface. "
              "Expected an array of ""double");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of new_BlackVarianceSurface. "
          "Expected an array of ""double");
      }
    }
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Matrix,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_BlackVarianceSurface" "', argument " "5"" of type '" "Matrix const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BlackVarianceSurface" "', argument " "5"" of type '" "Matrix const &""'"); 
    }
    arg5 = reinterpret_cast< Matrix * >(argp5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_BlackVarianceSurface" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BlackVarianceSurface" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    arg6 = reinterpret_cast< DayCounter * >(argp6);
    ecode7 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_BlackVarianceSurface" "', argument " "7"" of type '" "BlackVarianceSurface::Extrapolation""'");
    } 
    arg7 = static_cast< BlackVarianceSurface::Extrapolation >(val7);
    {
      try {
        result = (BlackVarianceSurfacePtr *)new_BlackVarianceSurfacePtr__SWIG_0((Date const &)*arg1,(Calendar const &)*arg2,(std::vector< Date > const &)*arg3,(std::vector< double > const &)*arg4,(Matrix const &)*arg5,(DayCounter const &)*arg6,arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BlackVarianceSurfacePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BlackVarianceSurface__SWIG_3) {
  {
    Date *arg1 = 0 ;
    Calendar *arg2 = 0 ;
    std::vector< Date > *arg3 = 0 ;
    std::vector< Real > *arg4 = 0 ;
    Matrix *arg5 = 0 ;
    DayCounter *arg6 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    std::vector< Date > temp3 ;
    std::vector< Date > *v3 ;
    std::vector< double > temp4 ;
    std::vector< double > *v4 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    int argvi = 0;
    BlackVarianceSurfacePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_BlackVarianceSurface(referenceDate,cal,dates,strikes,blackVols,dayCounter);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_BlackVarianceSurface" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BlackVarianceSurface" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_BlackVarianceSurface" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BlackVarianceSurface" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_BlackVarianceSurface. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp3.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_BlackVarianceSurface. "
              "Expected an array of " "Date");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_BlackVarianceSurface. "
          "Expected an array of " "Date");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of new_BlackVarianceSurface. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp4.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 4 of "
              "new_BlackVarianceSurface. "
              "Expected an array of ""double");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of new_BlackVarianceSurface. "
          "Expected an array of ""double");
      }
    }
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Matrix,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_BlackVarianceSurface" "', argument " "5"" of type '" "Matrix const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BlackVarianceSurface" "', argument " "5"" of type '" "Matrix const &""'"); 
    }
    arg5 = reinterpret_cast< Matrix * >(argp5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_BlackVarianceSurface" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BlackVarianceSurface" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    arg6 = reinterpret_cast< DayCounter * >(argp6);
    {
      try {
        result = (BlackVarianceSurfacePtr *)new_BlackVarianceSurfacePtr__SWIG_0((Date const &)*arg1,(Calendar const &)*arg2,(std::vector< Date > const &)*arg3,(std::vector< double > const &)*arg4,(Matrix const &)*arg5,(DayCounter const &)*arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BlackVarianceSurfacePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BlackVarianceSurface) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(3),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(3))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(3));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Matrix, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(3),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(3))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(3));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Matrix, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 8) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(3),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(3))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(3));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Matrix, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 9) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(3),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(3))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(3));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Matrix, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(8), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_BlackVarianceSurface__SWIG_3); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_BlackVarianceSurface__SWIG_2); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_BlackVarianceSurface__SWIG_1); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_BlackVarianceSurface__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_BlackVarianceSurface'");
  XSRETURN(0);
}


XS(_wrap_BlackVarianceSurface_setInterpolation__SWIG_0) {
  {
    BlackVarianceSurfacePtr *arg1 = (BlackVarianceSurfacePtr *) 0 ;
    std::string *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: BlackVarianceSurface_setInterpolation(self,interpolator);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BlackVarianceSurfacePtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BlackVarianceSurface_setInterpolation" "', argument " "1"" of type '" "BlackVarianceSurfacePtr *""'"); 
    }
    arg1 = reinterpret_cast< BlackVarianceSurfacePtr * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BlackVarianceSurface_setInterpolation" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BlackVarianceSurface_setInterpolation" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      try {
        BlackVarianceSurfacePtr_setInterpolation__SWIG_0(arg1,(std::string const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_BlackVarianceSurface_setInterpolation__SWIG_1) {
  {
    BlackVarianceSurfacePtr *arg1 = (BlackVarianceSurfacePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BlackVarianceSurface_setInterpolation(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BlackVarianceSurfacePtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BlackVarianceSurface_setInterpolation" "', argument " "1"" of type '" "BlackVarianceSurfacePtr *""'"); 
    }
    arg1 = reinterpret_cast< BlackVarianceSurfacePtr * >(argp1);
    {
      try {
        BlackVarianceSurfacePtr_setInterpolation__SWIG_0(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BlackVarianceSurface_setInterpolation) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BlackVarianceSurfacePtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BlackVarianceSurfacePtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BlackVarianceSurface_setInterpolation__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BlackVarianceSurface_setInterpolation__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'BlackVarianceSurface_setInterpolation'");
  XSRETURN(0);
}


XS(_wrap_delete_BlackVarianceSurface) {
  {
    BlackVarianceSurfacePtr *arg1 = (BlackVarianceSurfacePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_BlackVarianceSurface(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BlackVarianceSurfacePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_BlackVarianceSurface" "', argument " "1"" of type '" "BlackVarianceSurfacePtr *""'"); 
    }
    arg1 = reinterpret_cast< BlackVarianceSurfacePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_LocalConstantVol__SWIG_0) {
  {
    Date *arg1 = 0 ;
    Volatility arg2 ;
    DayCounter *arg3 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    LocalConstantVolPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_LocalConstantVol(referenceDate,volatility,dayCounter);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_LocalConstantVol" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LocalConstantVol" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_LocalConstantVol" "', argument " "2"" of type '" "Volatility""'");
    } 
    arg2 = static_cast< Volatility >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_LocalConstantVol" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LocalConstantVol" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    {
      try {
        result = (LocalConstantVolPtr *)new_LocalConstantVolPtr__SWIG_0((Date const &)*arg1,arg2,(DayCounter const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_LocalConstantVolPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_LocalConstantVol__SWIG_1) {
  {
    Date *arg1 = 0 ;
    Handle< Quote > *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    LocalConstantVolPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_LocalConstantVol(referenceDate,volatility,dayCounter);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_LocalConstantVol" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LocalConstantVol" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_LocalConstantVol" "', argument " "2"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LocalConstantVol" "', argument " "2"" of type '" "Handle< Quote > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< Quote > * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_LocalConstantVol" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LocalConstantVol" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    {
      try {
        result = (LocalConstantVolPtr *)new_LocalConstantVolPtr__SWIG_1((Date const &)*arg1,(Handle< Quote > const &)*arg2,(DayCounter const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_LocalConstantVolPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_LocalConstantVol__SWIG_2) {
  {
    Integer arg1 ;
    Calendar *arg2 = 0 ;
    Volatility arg3 ;
    DayCounter *arg4 = 0 ;
    int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int argvi = 0;
    LocalConstantVolPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_LocalConstantVol(settlementDays,calendar,volatility,dayCounter);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_LocalConstantVol" "', argument " "1"" of type '" "Integer""'");
    } 
    arg1 = static_cast< Integer >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_LocalConstantVol" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LocalConstantVol" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_LocalConstantVol" "', argument " "3"" of type '" "Volatility""'");
    } 
    arg3 = static_cast< Volatility >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_LocalConstantVol" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LocalConstantVol" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    {
      try {
        result = (LocalConstantVolPtr *)new_LocalConstantVolPtr__SWIG_2(arg1,(Calendar const &)*arg2,arg3,(DayCounter const &)*arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_LocalConstantVolPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_LocalConstantVol__SWIG_3) {
  {
    Integer arg1 ;
    Calendar *arg2 = 0 ;
    Handle< Quote > *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int argvi = 0;
    LocalConstantVolPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_LocalConstantVol(settlementDays,calendar,volatility,dayCounter);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_LocalConstantVol" "', argument " "1"" of type '" "Integer""'");
    } 
    arg1 = static_cast< Integer >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_LocalConstantVol" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LocalConstantVol" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_LocalConstantVol" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LocalConstantVol" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< Quote > * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_LocalConstantVol" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LocalConstantVol" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    {
      try {
        result = (LocalConstantVolPtr *)new_LocalConstantVolPtr__SWIG_3(arg1,(Calendar const &)*arg2,(Handle< Quote > const &)*arg3,(DayCounter const &)*arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_LocalConstantVolPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_LocalConstantVol) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_LocalConstantVol__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_LocalConstantVol__SWIG_0); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_LocalConstantVol__SWIG_3); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_LocalConstantVol__SWIG_2); return;
    }
  }
  
  croak("No matching function for overloaded 'new_LocalConstantVol'");
  XSRETURN(0);
}


XS(_wrap_delete_LocalConstantVol) {
  {
    LocalConstantVolPtr *arg1 = (LocalConstantVolPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_LocalConstantVol(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_LocalConstantVolPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_LocalConstantVol" "', argument " "1"" of type '" "LocalConstantVolPtr *""'"); 
    }
    arg1 = reinterpret_cast< LocalConstantVolPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_LocalVolSurface__SWIG_0) {
  {
    Handle< BlackVolTermStructure > *arg1 = 0 ;
    Handle< YieldTermStructure > *arg2 = 0 ;
    Handle< YieldTermStructure > *arg3 = 0 ;
    Handle< Quote > *arg4 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int argvi = 0;
    LocalVolSurfacePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_LocalVolSurface(blackTS,riskFreeTS,dividendTS,underlying);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_BlackVolTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_LocalVolSurface" "', argument " "1"" of type '" "Handle< BlackVolTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LocalVolSurface" "', argument " "1"" of type '" "Handle< BlackVolTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< BlackVolTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_LocalVolSurface" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LocalVolSurface" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< YieldTermStructure > * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_LocalVolSurface" "', argument " "3"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LocalVolSurface" "', argument " "3"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< YieldTermStructure > * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_LocalVolSurface" "', argument " "4"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LocalVolSurface" "', argument " "4"" of type '" "Handle< Quote > const &""'"); 
    }
    arg4 = reinterpret_cast< Handle< Quote > * >(argp4);
    {
      try {
        result = (LocalVolSurfacePtr *)new_LocalVolSurfacePtr__SWIG_0((Handle< BlackVolTermStructure > const &)*arg1,(Handle< YieldTermStructure > const &)*arg2,(Handle< YieldTermStructure > const &)*arg3,(Handle< Quote > const &)*arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_LocalVolSurfacePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_LocalVolSurface__SWIG_1) {
  {
    Handle< BlackVolTermStructure > *arg1 = 0 ;
    Handle< YieldTermStructure > *arg2 = 0 ;
    Handle< YieldTermStructure > *arg3 = 0 ;
    Real arg4 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    LocalVolSurfacePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_LocalVolSurface(blackTS,riskFreeTS,dividendTS,underlying);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_BlackVolTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_LocalVolSurface" "', argument " "1"" of type '" "Handle< BlackVolTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LocalVolSurface" "', argument " "1"" of type '" "Handle< BlackVolTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< BlackVolTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_LocalVolSurface" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LocalVolSurface" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< YieldTermStructure > * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_LocalVolSurface" "', argument " "3"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LocalVolSurface" "', argument " "3"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< YieldTermStructure > * >(argp3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_LocalVolSurface" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    {
      try {
        result = (LocalVolSurfacePtr *)new_LocalVolSurfacePtr__SWIG_1((Handle< BlackVolTermStructure > const &)*arg1,(Handle< YieldTermStructure > const &)*arg2,(Handle< YieldTermStructure > const &)*arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_LocalVolSurfacePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_LocalVolSurface) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_BlackVolTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_BlackVolTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_LocalVolSurface__SWIG_0); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_LocalVolSurface__SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded 'new_LocalVolSurface'");
  XSRETURN(0);
}


XS(_wrap_delete_LocalVolSurface) {
  {
    LocalVolSurfacePtr *arg1 = (LocalVolSurfacePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_LocalVolSurface(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_LocalVolSurfacePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_LocalVolSurface" "', argument " "1"" of type '" "LocalVolSurfacePtr *""'"); 
    }
    arg1 = reinterpret_cast< LocalVolSurfacePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ConstantOptionletVolatility__SWIG_0) {
  {
    Date *arg1 = 0 ;
    Calendar *arg2 = 0 ;
    BusinessDayConvention arg3 ;
    Volatility arg4 ;
    DayCounter *arg5 = 0 ;
    VolatilityType arg6 ;
    Real arg7 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    double val7 ;
    int ecode7 = 0 ;
    int argvi = 0;
    ConstantOptionletVolatilityPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: new_ConstantOptionletVolatility(referenceDate,cal,bdc,volatility,dayCounter,type,shift);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ConstantOptionletVolatility" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConstantOptionletVolatility" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ConstantOptionletVolatility" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConstantOptionletVolatility" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_ConstantOptionletVolatility" "', argument " "3"" of type '" "BusinessDayConvention""'");
    } 
    arg3 = static_cast< BusinessDayConvention >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_ConstantOptionletVolatility" "', argument " "4"" of type '" "Volatility""'");
    } 
    arg4 = static_cast< Volatility >(val4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_ConstantOptionletVolatility" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConstantOptionletVolatility" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    arg5 = reinterpret_cast< DayCounter * >(argp5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_ConstantOptionletVolatility" "', argument " "6"" of type '" "VolatilityType""'");
    } 
    arg6 = static_cast< VolatilityType >(val6);
    ecode7 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_ConstantOptionletVolatility" "', argument " "7"" of type '" "Real""'");
    } 
    arg7 = static_cast< Real >(val7);
    {
      try {
        result = (ConstantOptionletVolatilityPtr *)new_ConstantOptionletVolatilityPtr__SWIG_0((Date const &)*arg1,(Calendar const &)*arg2,arg3,arg4,(DayCounter const &)*arg5,arg6,arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ConstantOptionletVolatilityPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ConstantOptionletVolatility__SWIG_1) {
  {
    Date *arg1 = 0 ;
    Calendar *arg2 = 0 ;
    BusinessDayConvention arg3 ;
    Volatility arg4 ;
    DayCounter *arg5 = 0 ;
    VolatilityType arg6 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    ConstantOptionletVolatilityPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_ConstantOptionletVolatility(referenceDate,cal,bdc,volatility,dayCounter,type);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ConstantOptionletVolatility" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConstantOptionletVolatility" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ConstantOptionletVolatility" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConstantOptionletVolatility" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_ConstantOptionletVolatility" "', argument " "3"" of type '" "BusinessDayConvention""'");
    } 
    arg3 = static_cast< BusinessDayConvention >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_ConstantOptionletVolatility" "', argument " "4"" of type '" "Volatility""'");
    } 
    arg4 = static_cast< Volatility >(val4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_ConstantOptionletVolatility" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConstantOptionletVolatility" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    arg5 = reinterpret_cast< DayCounter * >(argp5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_ConstantOptionletVolatility" "', argument " "6"" of type '" "VolatilityType""'");
    } 
    arg6 = static_cast< VolatilityType >(val6);
    {
      try {
        result = (ConstantOptionletVolatilityPtr *)new_ConstantOptionletVolatilityPtr__SWIG_0((Date const &)*arg1,(Calendar const &)*arg2,arg3,arg4,(DayCounter const &)*arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ConstantOptionletVolatilityPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ConstantOptionletVolatility__SWIG_2) {
  {
    Date *arg1 = 0 ;
    Calendar *arg2 = 0 ;
    BusinessDayConvention arg3 ;
    Volatility arg4 ;
    DayCounter *arg5 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int argvi = 0;
    ConstantOptionletVolatilityPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_ConstantOptionletVolatility(referenceDate,cal,bdc,volatility,dayCounter);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ConstantOptionletVolatility" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConstantOptionletVolatility" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ConstantOptionletVolatility" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConstantOptionletVolatility" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_ConstantOptionletVolatility" "', argument " "3"" of type '" "BusinessDayConvention""'");
    } 
    arg3 = static_cast< BusinessDayConvention >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_ConstantOptionletVolatility" "', argument " "4"" of type '" "Volatility""'");
    } 
    arg4 = static_cast< Volatility >(val4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_ConstantOptionletVolatility" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConstantOptionletVolatility" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    arg5 = reinterpret_cast< DayCounter * >(argp5);
    {
      try {
        result = (ConstantOptionletVolatilityPtr *)new_ConstantOptionletVolatilityPtr__SWIG_0((Date const &)*arg1,(Calendar const &)*arg2,arg3,arg4,(DayCounter const &)*arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ConstantOptionletVolatilityPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ConstantOptionletVolatility__SWIG_3) {
  {
    Date *arg1 = 0 ;
    Calendar *arg2 = 0 ;
    BusinessDayConvention arg3 ;
    Handle< Quote > *arg4 = 0 ;
    DayCounter *arg5 = 0 ;
    VolatilityType arg6 ;
    Real arg7 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    double val7 ;
    int ecode7 = 0 ;
    int argvi = 0;
    ConstantOptionletVolatilityPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: new_ConstantOptionletVolatility(referenceDate,cal,bdc,volatility,dayCounter,type,shift);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ConstantOptionletVolatility" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConstantOptionletVolatility" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ConstantOptionletVolatility" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConstantOptionletVolatility" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_ConstantOptionletVolatility" "', argument " "3"" of type '" "BusinessDayConvention""'");
    } 
    arg3 = static_cast< BusinessDayConvention >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_ConstantOptionletVolatility" "', argument " "4"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConstantOptionletVolatility" "', argument " "4"" of type '" "Handle< Quote > const &""'"); 
    }
    arg4 = reinterpret_cast< Handle< Quote > * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_ConstantOptionletVolatility" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConstantOptionletVolatility" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    arg5 = reinterpret_cast< DayCounter * >(argp5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_ConstantOptionletVolatility" "', argument " "6"" of type '" "VolatilityType""'");
    } 
    arg6 = static_cast< VolatilityType >(val6);
    ecode7 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_ConstantOptionletVolatility" "', argument " "7"" of type '" "Real""'");
    } 
    arg7 = static_cast< Real >(val7);
    {
      try {
        result = (ConstantOptionletVolatilityPtr *)new_ConstantOptionletVolatilityPtr__SWIG_3((Date const &)*arg1,(Calendar const &)*arg2,arg3,(Handle< Quote > const &)*arg4,(DayCounter const &)*arg5,arg6,arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ConstantOptionletVolatilityPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ConstantOptionletVolatility__SWIG_4) {
  {
    Date *arg1 = 0 ;
    Calendar *arg2 = 0 ;
    BusinessDayConvention arg3 ;
    Handle< Quote > *arg4 = 0 ;
    DayCounter *arg5 = 0 ;
    VolatilityType arg6 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    ConstantOptionletVolatilityPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_ConstantOptionletVolatility(referenceDate,cal,bdc,volatility,dayCounter,type);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ConstantOptionletVolatility" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConstantOptionletVolatility" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ConstantOptionletVolatility" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConstantOptionletVolatility" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_ConstantOptionletVolatility" "', argument " "3"" of type '" "BusinessDayConvention""'");
    } 
    arg3 = static_cast< BusinessDayConvention >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_ConstantOptionletVolatility" "', argument " "4"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConstantOptionletVolatility" "', argument " "4"" of type '" "Handle< Quote > const &""'"); 
    }
    arg4 = reinterpret_cast< Handle< Quote > * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_ConstantOptionletVolatility" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConstantOptionletVolatility" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    arg5 = reinterpret_cast< DayCounter * >(argp5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_ConstantOptionletVolatility" "', argument " "6"" of type '" "VolatilityType""'");
    } 
    arg6 = static_cast< VolatilityType >(val6);
    {
      try {
        result = (ConstantOptionletVolatilityPtr *)new_ConstantOptionletVolatilityPtr__SWIG_3((Date const &)*arg1,(Calendar const &)*arg2,arg3,(Handle< Quote > const &)*arg4,(DayCounter const &)*arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ConstantOptionletVolatilityPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ConstantOptionletVolatility__SWIG_5) {
  {
    Date *arg1 = 0 ;
    Calendar *arg2 = 0 ;
    BusinessDayConvention arg3 ;
    Handle< Quote > *arg4 = 0 ;
    DayCounter *arg5 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int argvi = 0;
    ConstantOptionletVolatilityPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_ConstantOptionletVolatility(referenceDate,cal,bdc,volatility,dayCounter);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ConstantOptionletVolatility" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConstantOptionletVolatility" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ConstantOptionletVolatility" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConstantOptionletVolatility" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_ConstantOptionletVolatility" "', argument " "3"" of type '" "BusinessDayConvention""'");
    } 
    arg3 = static_cast< BusinessDayConvention >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_ConstantOptionletVolatility" "', argument " "4"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConstantOptionletVolatility" "', argument " "4"" of type '" "Handle< Quote > const &""'"); 
    }
    arg4 = reinterpret_cast< Handle< Quote > * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_ConstantOptionletVolatility" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConstantOptionletVolatility" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    arg5 = reinterpret_cast< DayCounter * >(argp5);
    {
      try {
        result = (ConstantOptionletVolatilityPtr *)new_ConstantOptionletVolatilityPtr__SWIG_3((Date const &)*arg1,(Calendar const &)*arg2,arg3,(Handle< Quote > const &)*arg4,(DayCounter const &)*arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ConstantOptionletVolatilityPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ConstantOptionletVolatility__SWIG_6) {
  {
    Natural arg1 ;
    Calendar *arg2 = 0 ;
    BusinessDayConvention arg3 ;
    Volatility arg4 ;
    DayCounter *arg5 = 0 ;
    VolatilityType arg6 ;
    Real arg7 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    double val7 ;
    int ecode7 = 0 ;
    int argvi = 0;
    ConstantOptionletVolatilityPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: new_ConstantOptionletVolatility(settlementDays,cal,bdc,volatility,dayCounter,type,shift);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ConstantOptionletVolatility" "', argument " "1"" of type '" "Natural""'");
    } 
    arg1 = static_cast< Natural >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ConstantOptionletVolatility" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConstantOptionletVolatility" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_ConstantOptionletVolatility" "', argument " "3"" of type '" "BusinessDayConvention""'");
    } 
    arg3 = static_cast< BusinessDayConvention >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_ConstantOptionletVolatility" "', argument " "4"" of type '" "Volatility""'");
    } 
    arg4 = static_cast< Volatility >(val4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_ConstantOptionletVolatility" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConstantOptionletVolatility" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    arg5 = reinterpret_cast< DayCounter * >(argp5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_ConstantOptionletVolatility" "', argument " "6"" of type '" "VolatilityType""'");
    } 
    arg6 = static_cast< VolatilityType >(val6);
    ecode7 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_ConstantOptionletVolatility" "', argument " "7"" of type '" "Real""'");
    } 
    arg7 = static_cast< Real >(val7);
    {
      try {
        result = (ConstantOptionletVolatilityPtr *)new_ConstantOptionletVolatilityPtr__SWIG_6(arg1,(Calendar const &)*arg2,arg3,arg4,(DayCounter const &)*arg5,arg6,arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ConstantOptionletVolatilityPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ConstantOptionletVolatility__SWIG_7) {
  {
    Natural arg1 ;
    Calendar *arg2 = 0 ;
    BusinessDayConvention arg3 ;
    Volatility arg4 ;
    DayCounter *arg5 = 0 ;
    VolatilityType arg6 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    ConstantOptionletVolatilityPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_ConstantOptionletVolatility(settlementDays,cal,bdc,volatility,dayCounter,type);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ConstantOptionletVolatility" "', argument " "1"" of type '" "Natural""'");
    } 
    arg1 = static_cast< Natural >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ConstantOptionletVolatility" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConstantOptionletVolatility" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_ConstantOptionletVolatility" "', argument " "3"" of type '" "BusinessDayConvention""'");
    } 
    arg3 = static_cast< BusinessDayConvention >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_ConstantOptionletVolatility" "', argument " "4"" of type '" "Volatility""'");
    } 
    arg4 = static_cast< Volatility >(val4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_ConstantOptionletVolatility" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConstantOptionletVolatility" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    arg5 = reinterpret_cast< DayCounter * >(argp5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_ConstantOptionletVolatility" "', argument " "6"" of type '" "VolatilityType""'");
    } 
    arg6 = static_cast< VolatilityType >(val6);
    {
      try {
        result = (ConstantOptionletVolatilityPtr *)new_ConstantOptionletVolatilityPtr__SWIG_6(arg1,(Calendar const &)*arg2,arg3,arg4,(DayCounter const &)*arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ConstantOptionletVolatilityPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ConstantOptionletVolatility__SWIG_8) {
  {
    Natural arg1 ;
    Calendar *arg2 = 0 ;
    BusinessDayConvention arg3 ;
    Volatility arg4 ;
    DayCounter *arg5 = 0 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int argvi = 0;
    ConstantOptionletVolatilityPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_ConstantOptionletVolatility(settlementDays,cal,bdc,volatility,dayCounter);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ConstantOptionletVolatility" "', argument " "1"" of type '" "Natural""'");
    } 
    arg1 = static_cast< Natural >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ConstantOptionletVolatility" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConstantOptionletVolatility" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_ConstantOptionletVolatility" "', argument " "3"" of type '" "BusinessDayConvention""'");
    } 
    arg3 = static_cast< BusinessDayConvention >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_ConstantOptionletVolatility" "', argument " "4"" of type '" "Volatility""'");
    } 
    arg4 = static_cast< Volatility >(val4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_ConstantOptionletVolatility" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConstantOptionletVolatility" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    arg5 = reinterpret_cast< DayCounter * >(argp5);
    {
      try {
        result = (ConstantOptionletVolatilityPtr *)new_ConstantOptionletVolatilityPtr__SWIG_6(arg1,(Calendar const &)*arg2,arg3,arg4,(DayCounter const &)*arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ConstantOptionletVolatilityPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ConstantOptionletVolatility__SWIG_9) {
  {
    Natural arg1 ;
    Calendar *arg2 = 0 ;
    BusinessDayConvention arg3 ;
    Handle< Quote > *arg4 = 0 ;
    DayCounter *arg5 = 0 ;
    VolatilityType arg6 ;
    Real arg7 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    double val7 ;
    int ecode7 = 0 ;
    int argvi = 0;
    ConstantOptionletVolatilityPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: new_ConstantOptionletVolatility(settlementDays,cal,bdc,volatility,dayCounter,type,shift);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ConstantOptionletVolatility" "', argument " "1"" of type '" "Natural""'");
    } 
    arg1 = static_cast< Natural >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ConstantOptionletVolatility" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConstantOptionletVolatility" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_ConstantOptionletVolatility" "', argument " "3"" of type '" "BusinessDayConvention""'");
    } 
    arg3 = static_cast< BusinessDayConvention >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_ConstantOptionletVolatility" "', argument " "4"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConstantOptionletVolatility" "', argument " "4"" of type '" "Handle< Quote > const &""'"); 
    }
    arg4 = reinterpret_cast< Handle< Quote > * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_ConstantOptionletVolatility" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConstantOptionletVolatility" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    arg5 = reinterpret_cast< DayCounter * >(argp5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_ConstantOptionletVolatility" "', argument " "6"" of type '" "VolatilityType""'");
    } 
    arg6 = static_cast< VolatilityType >(val6);
    ecode7 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_ConstantOptionletVolatility" "', argument " "7"" of type '" "Real""'");
    } 
    arg7 = static_cast< Real >(val7);
    {
      try {
        result = (ConstantOptionletVolatilityPtr *)new_ConstantOptionletVolatilityPtr__SWIG_9(arg1,(Calendar const &)*arg2,arg3,(Handle< Quote > const &)*arg4,(DayCounter const &)*arg5,arg6,arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ConstantOptionletVolatilityPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ConstantOptionletVolatility__SWIG_10) {
  {
    Natural arg1 ;
    Calendar *arg2 = 0 ;
    BusinessDayConvention arg3 ;
    Handle< Quote > *arg4 = 0 ;
    DayCounter *arg5 = 0 ;
    VolatilityType arg6 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    ConstantOptionletVolatilityPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_ConstantOptionletVolatility(settlementDays,cal,bdc,volatility,dayCounter,type);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ConstantOptionletVolatility" "', argument " "1"" of type '" "Natural""'");
    } 
    arg1 = static_cast< Natural >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ConstantOptionletVolatility" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConstantOptionletVolatility" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_ConstantOptionletVolatility" "', argument " "3"" of type '" "BusinessDayConvention""'");
    } 
    arg3 = static_cast< BusinessDayConvention >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_ConstantOptionletVolatility" "', argument " "4"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConstantOptionletVolatility" "', argument " "4"" of type '" "Handle< Quote > const &""'"); 
    }
    arg4 = reinterpret_cast< Handle< Quote > * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_ConstantOptionletVolatility" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConstantOptionletVolatility" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    arg5 = reinterpret_cast< DayCounter * >(argp5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_ConstantOptionletVolatility" "', argument " "6"" of type '" "VolatilityType""'");
    } 
    arg6 = static_cast< VolatilityType >(val6);
    {
      try {
        result = (ConstantOptionletVolatilityPtr *)new_ConstantOptionletVolatilityPtr__SWIG_9(arg1,(Calendar const &)*arg2,arg3,(Handle< Quote > const &)*arg4,(DayCounter const &)*arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ConstantOptionletVolatilityPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ConstantOptionletVolatility__SWIG_11) {
  {
    Natural arg1 ;
    Calendar *arg2 = 0 ;
    BusinessDayConvention arg3 ;
    Handle< Quote > *arg4 = 0 ;
    DayCounter *arg5 = 0 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int argvi = 0;
    ConstantOptionletVolatilityPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_ConstantOptionletVolatility(settlementDays,cal,bdc,volatility,dayCounter);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ConstantOptionletVolatility" "', argument " "1"" of type '" "Natural""'");
    } 
    arg1 = static_cast< Natural >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ConstantOptionletVolatility" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConstantOptionletVolatility" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_ConstantOptionletVolatility" "', argument " "3"" of type '" "BusinessDayConvention""'");
    } 
    arg3 = static_cast< BusinessDayConvention >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_ConstantOptionletVolatility" "', argument " "4"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConstantOptionletVolatility" "', argument " "4"" of type '" "Handle< Quote > const &""'"); 
    }
    arg4 = reinterpret_cast< Handle< Quote > * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_ConstantOptionletVolatility" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConstantOptionletVolatility" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    arg5 = reinterpret_cast< DayCounter * >(argp5);
    {
      try {
        result = (ConstantOptionletVolatilityPtr *)new_ConstantOptionletVolatilityPtr__SWIG_9(arg1,(Calendar const &)*arg2,arg3,(Handle< Quote > const &)*arg4,(DayCounter const &)*arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ConstantOptionletVolatilityPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ConstantOptionletVolatility) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 7;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_7:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 8;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_8:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 9;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_9:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 10;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_10:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 11;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_11:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 12;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_12:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ConstantOptionletVolatility__SWIG_5); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ConstantOptionletVolatility__SWIG_2); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ConstantOptionletVolatility__SWIG_11); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ConstantOptionletVolatility__SWIG_8); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ConstantOptionletVolatility__SWIG_4); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ConstantOptionletVolatility__SWIG_1); return;
    case 7:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ConstantOptionletVolatility__SWIG_10); return;
    case 8:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ConstantOptionletVolatility__SWIG_7); return;
    case 9:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ConstantOptionletVolatility__SWIG_3); return;
    case 10:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ConstantOptionletVolatility__SWIG_0); return;
    case 11:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ConstantOptionletVolatility__SWIG_9); return;
    case 12:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ConstantOptionletVolatility__SWIG_6); return;
    }
  }
  
  croak("No matching function for overloaded 'new_ConstantOptionletVolatility'");
  XSRETURN(0);
}


XS(_wrap_delete_ConstantOptionletVolatility) {
  {
    ConstantOptionletVolatilityPtr *arg1 = (ConstantOptionletVolatilityPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_ConstantOptionletVolatility(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ConstantOptionletVolatilityPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ConstantOptionletVolatility" "', argument " "1"" of type '" "ConstantOptionletVolatilityPtr *""'"); 
    }
    arg1 = reinterpret_cast< ConstantOptionletVolatilityPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ConstantSwaptionVolatility__SWIG_0) {
  {
    Natural arg1 ;
    Calendar *arg2 = 0 ;
    BusinessDayConvention arg3 ;
    Handle< Quote > *arg4 = 0 ;
    DayCounter *arg5 = 0 ;
    VolatilityType arg6 ;
    Real arg7 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    double val7 ;
    int ecode7 = 0 ;
    int argvi = 0;
    ConstantSwaptionVolatilityPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: new_ConstantSwaptionVolatility(settlementDays,cal,bdc,volatility,dc,type,shift);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ConstantSwaptionVolatility" "', argument " "1"" of type '" "Natural""'");
    } 
    arg1 = static_cast< Natural >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ConstantSwaptionVolatility" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConstantSwaptionVolatility" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_ConstantSwaptionVolatility" "', argument " "3"" of type '" "BusinessDayConvention""'");
    } 
    arg3 = static_cast< BusinessDayConvention >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_ConstantSwaptionVolatility" "', argument " "4"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConstantSwaptionVolatility" "', argument " "4"" of type '" "Handle< Quote > const &""'"); 
    }
    arg4 = reinterpret_cast< Handle< Quote > * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_ConstantSwaptionVolatility" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConstantSwaptionVolatility" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    arg5 = reinterpret_cast< DayCounter * >(argp5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_ConstantSwaptionVolatility" "', argument " "6"" of type '" "VolatilityType""'");
    } 
    arg6 = static_cast< VolatilityType >(val6);
    ecode7 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_ConstantSwaptionVolatility" "', argument " "7"" of type '" "Real""'");
    } 
    arg7 = static_cast< Real >(val7);
    {
      try {
        result = (ConstantSwaptionVolatilityPtr *)new_ConstantSwaptionVolatilityPtr__SWIG_0(arg1,(Calendar const &)*arg2,arg3,(Handle< Quote > const &)*arg4,(DayCounter const &)*arg5,arg6,arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ConstantSwaptionVolatilityPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ConstantSwaptionVolatility__SWIG_1) {
  {
    Natural arg1 ;
    Calendar *arg2 = 0 ;
    BusinessDayConvention arg3 ;
    Handle< Quote > *arg4 = 0 ;
    DayCounter *arg5 = 0 ;
    VolatilityType arg6 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    ConstantSwaptionVolatilityPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_ConstantSwaptionVolatility(settlementDays,cal,bdc,volatility,dc,type);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ConstantSwaptionVolatility" "', argument " "1"" of type '" "Natural""'");
    } 
    arg1 = static_cast< Natural >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ConstantSwaptionVolatility" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConstantSwaptionVolatility" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_ConstantSwaptionVolatility" "', argument " "3"" of type '" "BusinessDayConvention""'");
    } 
    arg3 = static_cast< BusinessDayConvention >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_ConstantSwaptionVolatility" "', argument " "4"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConstantSwaptionVolatility" "', argument " "4"" of type '" "Handle< Quote > const &""'"); 
    }
    arg4 = reinterpret_cast< Handle< Quote > * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_ConstantSwaptionVolatility" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConstantSwaptionVolatility" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    arg5 = reinterpret_cast< DayCounter * >(argp5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_ConstantSwaptionVolatility" "', argument " "6"" of type '" "VolatilityType""'");
    } 
    arg6 = static_cast< VolatilityType >(val6);
    {
      try {
        result = (ConstantSwaptionVolatilityPtr *)new_ConstantSwaptionVolatilityPtr__SWIG_0(arg1,(Calendar const &)*arg2,arg3,(Handle< Quote > const &)*arg4,(DayCounter const &)*arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ConstantSwaptionVolatilityPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ConstantSwaptionVolatility__SWIG_2) {
  {
    Natural arg1 ;
    Calendar *arg2 = 0 ;
    BusinessDayConvention arg3 ;
    Handle< Quote > *arg4 = 0 ;
    DayCounter *arg5 = 0 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int argvi = 0;
    ConstantSwaptionVolatilityPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_ConstantSwaptionVolatility(settlementDays,cal,bdc,volatility,dc);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ConstantSwaptionVolatility" "', argument " "1"" of type '" "Natural""'");
    } 
    arg1 = static_cast< Natural >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ConstantSwaptionVolatility" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConstantSwaptionVolatility" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_ConstantSwaptionVolatility" "', argument " "3"" of type '" "BusinessDayConvention""'");
    } 
    arg3 = static_cast< BusinessDayConvention >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_ConstantSwaptionVolatility" "', argument " "4"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConstantSwaptionVolatility" "', argument " "4"" of type '" "Handle< Quote > const &""'"); 
    }
    arg4 = reinterpret_cast< Handle< Quote > * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_ConstantSwaptionVolatility" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConstantSwaptionVolatility" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    arg5 = reinterpret_cast< DayCounter * >(argp5);
    {
      try {
        result = (ConstantSwaptionVolatilityPtr *)new_ConstantSwaptionVolatilityPtr__SWIG_0(arg1,(Calendar const &)*arg2,arg3,(Handle< Quote > const &)*arg4,(DayCounter const &)*arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ConstantSwaptionVolatilityPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ConstantSwaptionVolatility__SWIG_3) {
  {
    Date *arg1 = 0 ;
    Calendar *arg2 = 0 ;
    BusinessDayConvention arg3 ;
    Handle< Quote > *arg4 = 0 ;
    DayCounter *arg5 = 0 ;
    VolatilityType arg6 ;
    Real arg7 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    double val7 ;
    int ecode7 = 0 ;
    int argvi = 0;
    ConstantSwaptionVolatilityPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: new_ConstantSwaptionVolatility(referenceDate,cal,bdc,volatility,dc,type,shift);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ConstantSwaptionVolatility" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConstantSwaptionVolatility" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ConstantSwaptionVolatility" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConstantSwaptionVolatility" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_ConstantSwaptionVolatility" "', argument " "3"" of type '" "BusinessDayConvention""'");
    } 
    arg3 = static_cast< BusinessDayConvention >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_ConstantSwaptionVolatility" "', argument " "4"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConstantSwaptionVolatility" "', argument " "4"" of type '" "Handle< Quote > const &""'"); 
    }
    arg4 = reinterpret_cast< Handle< Quote > * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_ConstantSwaptionVolatility" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConstantSwaptionVolatility" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    arg5 = reinterpret_cast< DayCounter * >(argp5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_ConstantSwaptionVolatility" "', argument " "6"" of type '" "VolatilityType""'");
    } 
    arg6 = static_cast< VolatilityType >(val6);
    ecode7 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_ConstantSwaptionVolatility" "', argument " "7"" of type '" "Real""'");
    } 
    arg7 = static_cast< Real >(val7);
    {
      try {
        result = (ConstantSwaptionVolatilityPtr *)new_ConstantSwaptionVolatilityPtr__SWIG_3((Date const &)*arg1,(Calendar const &)*arg2,arg3,(Handle< Quote > const &)*arg4,(DayCounter const &)*arg5,arg6,arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ConstantSwaptionVolatilityPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ConstantSwaptionVolatility__SWIG_4) {
  {
    Date *arg1 = 0 ;
    Calendar *arg2 = 0 ;
    BusinessDayConvention arg3 ;
    Handle< Quote > *arg4 = 0 ;
    DayCounter *arg5 = 0 ;
    VolatilityType arg6 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    ConstantSwaptionVolatilityPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_ConstantSwaptionVolatility(referenceDate,cal,bdc,volatility,dc,type);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ConstantSwaptionVolatility" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConstantSwaptionVolatility" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ConstantSwaptionVolatility" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConstantSwaptionVolatility" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_ConstantSwaptionVolatility" "', argument " "3"" of type '" "BusinessDayConvention""'");
    } 
    arg3 = static_cast< BusinessDayConvention >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_ConstantSwaptionVolatility" "', argument " "4"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConstantSwaptionVolatility" "', argument " "4"" of type '" "Handle< Quote > const &""'"); 
    }
    arg4 = reinterpret_cast< Handle< Quote > * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_ConstantSwaptionVolatility" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConstantSwaptionVolatility" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    arg5 = reinterpret_cast< DayCounter * >(argp5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_ConstantSwaptionVolatility" "', argument " "6"" of type '" "VolatilityType""'");
    } 
    arg6 = static_cast< VolatilityType >(val6);
    {
      try {
        result = (ConstantSwaptionVolatilityPtr *)new_ConstantSwaptionVolatilityPtr__SWIG_3((Date const &)*arg1,(Calendar const &)*arg2,arg3,(Handle< Quote > const &)*arg4,(DayCounter const &)*arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ConstantSwaptionVolatilityPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ConstantSwaptionVolatility__SWIG_5) {
  {
    Date *arg1 = 0 ;
    Calendar *arg2 = 0 ;
    BusinessDayConvention arg3 ;
    Handle< Quote > *arg4 = 0 ;
    DayCounter *arg5 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int argvi = 0;
    ConstantSwaptionVolatilityPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_ConstantSwaptionVolatility(referenceDate,cal,bdc,volatility,dc);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ConstantSwaptionVolatility" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConstantSwaptionVolatility" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ConstantSwaptionVolatility" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConstantSwaptionVolatility" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_ConstantSwaptionVolatility" "', argument " "3"" of type '" "BusinessDayConvention""'");
    } 
    arg3 = static_cast< BusinessDayConvention >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_ConstantSwaptionVolatility" "', argument " "4"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConstantSwaptionVolatility" "', argument " "4"" of type '" "Handle< Quote > const &""'"); 
    }
    arg4 = reinterpret_cast< Handle< Quote > * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_ConstantSwaptionVolatility" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConstantSwaptionVolatility" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    arg5 = reinterpret_cast< DayCounter * >(argp5);
    {
      try {
        result = (ConstantSwaptionVolatilityPtr *)new_ConstantSwaptionVolatilityPtr__SWIG_3((Date const &)*arg1,(Calendar const &)*arg2,arg3,(Handle< Quote > const &)*arg4,(DayCounter const &)*arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ConstantSwaptionVolatilityPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ConstantSwaptionVolatility__SWIG_6) {
  {
    Natural arg1 ;
    Calendar *arg2 = 0 ;
    BusinessDayConvention arg3 ;
    Volatility arg4 ;
    DayCounter *arg5 = 0 ;
    VolatilityType arg6 ;
    Real arg7 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    double val7 ;
    int ecode7 = 0 ;
    int argvi = 0;
    ConstantSwaptionVolatilityPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: new_ConstantSwaptionVolatility(settlementDays,cal,bdc,volatility,dc,type,shift);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ConstantSwaptionVolatility" "', argument " "1"" of type '" "Natural""'");
    } 
    arg1 = static_cast< Natural >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ConstantSwaptionVolatility" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConstantSwaptionVolatility" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_ConstantSwaptionVolatility" "', argument " "3"" of type '" "BusinessDayConvention""'");
    } 
    arg3 = static_cast< BusinessDayConvention >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_ConstantSwaptionVolatility" "', argument " "4"" of type '" "Volatility""'");
    } 
    arg4 = static_cast< Volatility >(val4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_ConstantSwaptionVolatility" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConstantSwaptionVolatility" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    arg5 = reinterpret_cast< DayCounter * >(argp5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_ConstantSwaptionVolatility" "', argument " "6"" of type '" "VolatilityType""'");
    } 
    arg6 = static_cast< VolatilityType >(val6);
    ecode7 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_ConstantSwaptionVolatility" "', argument " "7"" of type '" "Real""'");
    } 
    arg7 = static_cast< Real >(val7);
    {
      try {
        result = (ConstantSwaptionVolatilityPtr *)new_ConstantSwaptionVolatilityPtr__SWIG_6(arg1,(Calendar const &)*arg2,arg3,arg4,(DayCounter const &)*arg5,arg6,arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ConstantSwaptionVolatilityPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ConstantSwaptionVolatility__SWIG_7) {
  {
    Natural arg1 ;
    Calendar *arg2 = 0 ;
    BusinessDayConvention arg3 ;
    Volatility arg4 ;
    DayCounter *arg5 = 0 ;
    VolatilityType arg6 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    ConstantSwaptionVolatilityPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_ConstantSwaptionVolatility(settlementDays,cal,bdc,volatility,dc,type);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ConstantSwaptionVolatility" "', argument " "1"" of type '" "Natural""'");
    } 
    arg1 = static_cast< Natural >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ConstantSwaptionVolatility" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConstantSwaptionVolatility" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_ConstantSwaptionVolatility" "', argument " "3"" of type '" "BusinessDayConvention""'");
    } 
    arg3 = static_cast< BusinessDayConvention >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_ConstantSwaptionVolatility" "', argument " "4"" of type '" "Volatility""'");
    } 
    arg4 = static_cast< Volatility >(val4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_ConstantSwaptionVolatility" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConstantSwaptionVolatility" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    arg5 = reinterpret_cast< DayCounter * >(argp5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_ConstantSwaptionVolatility" "', argument " "6"" of type '" "VolatilityType""'");
    } 
    arg6 = static_cast< VolatilityType >(val6);
    {
      try {
        result = (ConstantSwaptionVolatilityPtr *)new_ConstantSwaptionVolatilityPtr__SWIG_6(arg1,(Calendar const &)*arg2,arg3,arg4,(DayCounter const &)*arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ConstantSwaptionVolatilityPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ConstantSwaptionVolatility__SWIG_8) {
  {
    Natural arg1 ;
    Calendar *arg2 = 0 ;
    BusinessDayConvention arg3 ;
    Volatility arg4 ;
    DayCounter *arg5 = 0 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int argvi = 0;
    ConstantSwaptionVolatilityPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_ConstantSwaptionVolatility(settlementDays,cal,bdc,volatility,dc);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ConstantSwaptionVolatility" "', argument " "1"" of type '" "Natural""'");
    } 
    arg1 = static_cast< Natural >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ConstantSwaptionVolatility" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConstantSwaptionVolatility" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_ConstantSwaptionVolatility" "', argument " "3"" of type '" "BusinessDayConvention""'");
    } 
    arg3 = static_cast< BusinessDayConvention >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_ConstantSwaptionVolatility" "', argument " "4"" of type '" "Volatility""'");
    } 
    arg4 = static_cast< Volatility >(val4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_ConstantSwaptionVolatility" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConstantSwaptionVolatility" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    arg5 = reinterpret_cast< DayCounter * >(argp5);
    {
      try {
        result = (ConstantSwaptionVolatilityPtr *)new_ConstantSwaptionVolatilityPtr__SWIG_6(arg1,(Calendar const &)*arg2,arg3,arg4,(DayCounter const &)*arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ConstantSwaptionVolatilityPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ConstantSwaptionVolatility__SWIG_9) {
  {
    Date *arg1 = 0 ;
    Calendar *arg2 = 0 ;
    BusinessDayConvention arg3 ;
    Volatility arg4 ;
    DayCounter *arg5 = 0 ;
    VolatilityType arg6 ;
    Real arg7 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    double val7 ;
    int ecode7 = 0 ;
    int argvi = 0;
    ConstantSwaptionVolatilityPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: new_ConstantSwaptionVolatility(referenceDate,cal,bdc,volatility,dc,type,shift);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ConstantSwaptionVolatility" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConstantSwaptionVolatility" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ConstantSwaptionVolatility" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConstantSwaptionVolatility" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_ConstantSwaptionVolatility" "', argument " "3"" of type '" "BusinessDayConvention""'");
    } 
    arg3 = static_cast< BusinessDayConvention >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_ConstantSwaptionVolatility" "', argument " "4"" of type '" "Volatility""'");
    } 
    arg4 = static_cast< Volatility >(val4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_ConstantSwaptionVolatility" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConstantSwaptionVolatility" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    arg5 = reinterpret_cast< DayCounter * >(argp5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_ConstantSwaptionVolatility" "', argument " "6"" of type '" "VolatilityType""'");
    } 
    arg6 = static_cast< VolatilityType >(val6);
    ecode7 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_ConstantSwaptionVolatility" "', argument " "7"" of type '" "Real""'");
    } 
    arg7 = static_cast< Real >(val7);
    {
      try {
        result = (ConstantSwaptionVolatilityPtr *)new_ConstantSwaptionVolatilityPtr__SWIG_9((Date const &)*arg1,(Calendar const &)*arg2,arg3,arg4,(DayCounter const &)*arg5,arg6,arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ConstantSwaptionVolatilityPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ConstantSwaptionVolatility__SWIG_10) {
  {
    Date *arg1 = 0 ;
    Calendar *arg2 = 0 ;
    BusinessDayConvention arg3 ;
    Volatility arg4 ;
    DayCounter *arg5 = 0 ;
    VolatilityType arg6 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    ConstantSwaptionVolatilityPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_ConstantSwaptionVolatility(referenceDate,cal,bdc,volatility,dc,type);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ConstantSwaptionVolatility" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConstantSwaptionVolatility" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ConstantSwaptionVolatility" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConstantSwaptionVolatility" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_ConstantSwaptionVolatility" "', argument " "3"" of type '" "BusinessDayConvention""'");
    } 
    arg3 = static_cast< BusinessDayConvention >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_ConstantSwaptionVolatility" "', argument " "4"" of type '" "Volatility""'");
    } 
    arg4 = static_cast< Volatility >(val4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_ConstantSwaptionVolatility" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConstantSwaptionVolatility" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    arg5 = reinterpret_cast< DayCounter * >(argp5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_ConstantSwaptionVolatility" "', argument " "6"" of type '" "VolatilityType""'");
    } 
    arg6 = static_cast< VolatilityType >(val6);
    {
      try {
        result = (ConstantSwaptionVolatilityPtr *)new_ConstantSwaptionVolatilityPtr__SWIG_9((Date const &)*arg1,(Calendar const &)*arg2,arg3,arg4,(DayCounter const &)*arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ConstantSwaptionVolatilityPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ConstantSwaptionVolatility__SWIG_11) {
  {
    Date *arg1 = 0 ;
    Calendar *arg2 = 0 ;
    BusinessDayConvention arg3 ;
    Volatility arg4 ;
    DayCounter *arg5 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int argvi = 0;
    ConstantSwaptionVolatilityPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_ConstantSwaptionVolatility(referenceDate,cal,bdc,volatility,dc);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ConstantSwaptionVolatility" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConstantSwaptionVolatility" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ConstantSwaptionVolatility" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConstantSwaptionVolatility" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_ConstantSwaptionVolatility" "', argument " "3"" of type '" "BusinessDayConvention""'");
    } 
    arg3 = static_cast< BusinessDayConvention >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_ConstantSwaptionVolatility" "', argument " "4"" of type '" "Volatility""'");
    } 
    arg4 = static_cast< Volatility >(val4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_ConstantSwaptionVolatility" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConstantSwaptionVolatility" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    arg5 = reinterpret_cast< DayCounter * >(argp5);
    {
      try {
        result = (ConstantSwaptionVolatilityPtr *)new_ConstantSwaptionVolatilityPtr__SWIG_9((Date const &)*arg1,(Calendar const &)*arg2,arg3,arg4,(DayCounter const &)*arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ConstantSwaptionVolatilityPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ConstantSwaptionVolatility) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 7;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_7:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 8;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_8:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 9;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_9:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 10;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_10:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 11;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_11:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 12;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_12:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ConstantSwaptionVolatility__SWIG_5); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ConstantSwaptionVolatility__SWIG_11); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ConstantSwaptionVolatility__SWIG_2); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ConstantSwaptionVolatility__SWIG_8); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ConstantSwaptionVolatility__SWIG_4); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ConstantSwaptionVolatility__SWIG_10); return;
    case 7:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ConstantSwaptionVolatility__SWIG_1); return;
    case 8:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ConstantSwaptionVolatility__SWIG_7); return;
    case 9:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ConstantSwaptionVolatility__SWIG_3); return;
    case 10:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ConstantSwaptionVolatility__SWIG_9); return;
    case 11:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ConstantSwaptionVolatility__SWIG_0); return;
    case 12:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ConstantSwaptionVolatility__SWIG_6); return;
    }
  }
  
  croak("No matching function for overloaded 'new_ConstantSwaptionVolatility'");
  XSRETURN(0);
}


XS(_wrap_delete_ConstantSwaptionVolatility) {
  {
    ConstantSwaptionVolatilityPtr *arg1 = (ConstantSwaptionVolatilityPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_ConstantSwaptionVolatility(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ConstantSwaptionVolatilityPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ConstantSwaptionVolatility" "', argument " "1"" of type '" "ConstantSwaptionVolatilityPtr *""'"); 
    }
    arg1 = reinterpret_cast< ConstantSwaptionVolatilityPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SwaptionVolatilityMatrix__SWIG_0) {
  {
    Date *arg1 = 0 ;
    std::vector< Date > *arg2 = 0 ;
    std::vector< Period > *arg3 = 0 ;
    Matrix *arg4 = 0 ;
    DayCounter *arg5 = 0 ;
    bool arg6 ;
    VolatilityType arg7 ;
    Matrix *arg8 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    std::vector< Date > temp2 ;
    std::vector< Date > *v2 ;
    std::vector< Period > temp3 ;
    std::vector< Period > *v3 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    bool val6 ;
    int ecode6 = 0 ;
    int val7 ;
    int ecode7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    int argvi = 0;
    SwaptionVolatilityMatrixPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 8) || (items > 8)) {
      SWIG_croak("Usage: new_SwaptionVolatilityMatrix(referenceDate,dates,lengths,vols,dayCounter,flatExtrapolation,type,shifts);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SwaptionVolatilityMatrix" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionVolatilityMatrix" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_SwaptionVolatilityMatrix. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp2.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_SwaptionVolatilityMatrix. "
              "Expected an array of " "Date");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_SwaptionVolatilityMatrix. "
          "Expected an array of " "Date");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_Period_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_SwaptionVolatilityMatrix. "
          "Expected an array of " "Period");
        SV **tv;
        I32 len = av_len(av) + 1;
        Period* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Period,0) != -1) {
            temp3.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_SwaptionVolatilityMatrix. "
              "Expected an array of " "Period");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_SwaptionVolatilityMatrix. "
          "Expected an array of " "Period");
      }
    }
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Matrix,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_SwaptionVolatilityMatrix" "', argument " "4"" of type '" "Matrix const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionVolatilityMatrix" "', argument " "4"" of type '" "Matrix const &""'"); 
    }
    arg4 = reinterpret_cast< Matrix * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_SwaptionVolatilityMatrix" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionVolatilityMatrix" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    arg5 = reinterpret_cast< DayCounter * >(argp5);
    ecode6 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_SwaptionVolatilityMatrix" "', argument " "6"" of type '" "bool""'");
    } 
    arg6 = static_cast< bool >(val6);
    ecode7 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_SwaptionVolatilityMatrix" "', argument " "7"" of type '" "VolatilityType""'");
    } 
    arg7 = static_cast< VolatilityType >(val7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_Matrix,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_SwaptionVolatilityMatrix" "', argument " "8"" of type '" "Matrix const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionVolatilityMatrix" "', argument " "8"" of type '" "Matrix const &""'"); 
    }
    arg8 = reinterpret_cast< Matrix * >(argp8);
    {
      try {
        result = (SwaptionVolatilityMatrixPtr *)new_SwaptionVolatilityMatrixPtr__SWIG_0((Date const &)*arg1,(std::vector< Date > const &)*arg2,(std::vector< Period > const &)*arg3,(Matrix const &)*arg4,(DayCounter const &)*arg5,arg6,arg7,(Matrix const &)*arg8);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SwaptionVolatilityMatrixPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SwaptionVolatilityMatrix__SWIG_1) {
  {
    Date *arg1 = 0 ;
    std::vector< Date > *arg2 = 0 ;
    std::vector< Period > *arg3 = 0 ;
    Matrix *arg4 = 0 ;
    DayCounter *arg5 = 0 ;
    bool arg6 ;
    VolatilityType arg7 ;
    void *argp1 ;
    int res1 = 0 ;
    std::vector< Date > temp2 ;
    std::vector< Date > *v2 ;
    std::vector< Period > temp3 ;
    std::vector< Period > *v3 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    bool val6 ;
    int ecode6 = 0 ;
    int val7 ;
    int ecode7 = 0 ;
    int argvi = 0;
    SwaptionVolatilityMatrixPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: new_SwaptionVolatilityMatrix(referenceDate,dates,lengths,vols,dayCounter,flatExtrapolation,type);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SwaptionVolatilityMatrix" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionVolatilityMatrix" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_SwaptionVolatilityMatrix. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp2.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_SwaptionVolatilityMatrix. "
              "Expected an array of " "Date");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_SwaptionVolatilityMatrix. "
          "Expected an array of " "Date");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_Period_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_SwaptionVolatilityMatrix. "
          "Expected an array of " "Period");
        SV **tv;
        I32 len = av_len(av) + 1;
        Period* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Period,0) != -1) {
            temp3.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_SwaptionVolatilityMatrix. "
              "Expected an array of " "Period");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_SwaptionVolatilityMatrix. "
          "Expected an array of " "Period");
      }
    }
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Matrix,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_SwaptionVolatilityMatrix" "', argument " "4"" of type '" "Matrix const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionVolatilityMatrix" "', argument " "4"" of type '" "Matrix const &""'"); 
    }
    arg4 = reinterpret_cast< Matrix * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_SwaptionVolatilityMatrix" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionVolatilityMatrix" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    arg5 = reinterpret_cast< DayCounter * >(argp5);
    ecode6 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_SwaptionVolatilityMatrix" "', argument " "6"" of type '" "bool""'");
    } 
    arg6 = static_cast< bool >(val6);
    ecode7 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_SwaptionVolatilityMatrix" "', argument " "7"" of type '" "VolatilityType""'");
    } 
    arg7 = static_cast< VolatilityType >(val7);
    {
      try {
        result = (SwaptionVolatilityMatrixPtr *)new_SwaptionVolatilityMatrixPtr__SWIG_0((Date const &)*arg1,(std::vector< Date > const &)*arg2,(std::vector< Period > const &)*arg3,(Matrix const &)*arg4,(DayCounter const &)*arg5,arg6,arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SwaptionVolatilityMatrixPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SwaptionVolatilityMatrix__SWIG_2) {
  {
    Date *arg1 = 0 ;
    std::vector< Date > *arg2 = 0 ;
    std::vector< Period > *arg3 = 0 ;
    Matrix *arg4 = 0 ;
    DayCounter *arg5 = 0 ;
    bool arg6 ;
    void *argp1 ;
    int res1 = 0 ;
    std::vector< Date > temp2 ;
    std::vector< Date > *v2 ;
    std::vector< Period > temp3 ;
    std::vector< Period > *v3 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    bool val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    SwaptionVolatilityMatrixPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_SwaptionVolatilityMatrix(referenceDate,dates,lengths,vols,dayCounter,flatExtrapolation);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SwaptionVolatilityMatrix" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionVolatilityMatrix" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_SwaptionVolatilityMatrix. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp2.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_SwaptionVolatilityMatrix. "
              "Expected an array of " "Date");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_SwaptionVolatilityMatrix. "
          "Expected an array of " "Date");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_Period_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_SwaptionVolatilityMatrix. "
          "Expected an array of " "Period");
        SV **tv;
        I32 len = av_len(av) + 1;
        Period* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Period,0) != -1) {
            temp3.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_SwaptionVolatilityMatrix. "
              "Expected an array of " "Period");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_SwaptionVolatilityMatrix. "
          "Expected an array of " "Period");
      }
    }
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Matrix,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_SwaptionVolatilityMatrix" "', argument " "4"" of type '" "Matrix const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionVolatilityMatrix" "', argument " "4"" of type '" "Matrix const &""'"); 
    }
    arg4 = reinterpret_cast< Matrix * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_SwaptionVolatilityMatrix" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionVolatilityMatrix" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    arg5 = reinterpret_cast< DayCounter * >(argp5);
    ecode6 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_SwaptionVolatilityMatrix" "', argument " "6"" of type '" "bool""'");
    } 
    arg6 = static_cast< bool >(val6);
    {
      try {
        result = (SwaptionVolatilityMatrixPtr *)new_SwaptionVolatilityMatrixPtr__SWIG_0((Date const &)*arg1,(std::vector< Date > const &)*arg2,(std::vector< Period > const &)*arg3,(Matrix const &)*arg4,(DayCounter const &)*arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SwaptionVolatilityMatrixPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SwaptionVolatilityMatrix__SWIG_3) {
  {
    Date *arg1 = 0 ;
    std::vector< Date > *arg2 = 0 ;
    std::vector< Period > *arg3 = 0 ;
    Matrix *arg4 = 0 ;
    DayCounter *arg5 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    std::vector< Date > temp2 ;
    std::vector< Date > *v2 ;
    std::vector< Period > temp3 ;
    std::vector< Period > *v3 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int argvi = 0;
    SwaptionVolatilityMatrixPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_SwaptionVolatilityMatrix(referenceDate,dates,lengths,vols,dayCounter);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SwaptionVolatilityMatrix" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionVolatilityMatrix" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_SwaptionVolatilityMatrix. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp2.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_SwaptionVolatilityMatrix. "
              "Expected an array of " "Date");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_SwaptionVolatilityMatrix. "
          "Expected an array of " "Date");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_Period_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_SwaptionVolatilityMatrix. "
          "Expected an array of " "Period");
        SV **tv;
        I32 len = av_len(av) + 1;
        Period* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Period,0) != -1) {
            temp3.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_SwaptionVolatilityMatrix. "
              "Expected an array of " "Period");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_SwaptionVolatilityMatrix. "
          "Expected an array of " "Period");
      }
    }
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Matrix,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_SwaptionVolatilityMatrix" "', argument " "4"" of type '" "Matrix const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionVolatilityMatrix" "', argument " "4"" of type '" "Matrix const &""'"); 
    }
    arg4 = reinterpret_cast< Matrix * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_SwaptionVolatilityMatrix" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionVolatilityMatrix" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    arg5 = reinterpret_cast< DayCounter * >(argp5);
    {
      try {
        result = (SwaptionVolatilityMatrixPtr *)new_SwaptionVolatilityMatrixPtr__SWIG_0((Date const &)*arg1,(std::vector< Date > const &)*arg2,(std::vector< Period > const &)*arg3,(Matrix const &)*arg4,(DayCounter const &)*arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SwaptionVolatilityMatrixPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SwaptionVolatilityMatrix__SWIG_4) {
  {
    Calendar *arg1 = 0 ;
    BusinessDayConvention arg2 ;
    std::vector< Period > *arg3 = 0 ;
    std::vector< Period > *arg4 = 0 ;
    std::vector< std::vector< Handle< Quote > > > *arg5 = 0 ;
    DayCounter *arg6 = 0 ;
    bool arg7 ;
    VolatilityType arg8 ;
    std::vector< std::vector< Real > > *arg9 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    std::vector< Period > temp3 ;
    std::vector< Period > *v3 ;
    std::vector< Period > temp4 ;
    std::vector< Period > *v4 ;
    std::vector< std::vector< Handle< Quote > > > temp5 ;
    std::vector< std::vector< Handle< Quote > > > *v5 ;
    void *argp6 ;
    int res6 = 0 ;
    bool val7 ;
    int ecode7 = 0 ;
    int val8 ;
    int ecode8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    int argvi = 0;
    SwaptionVolatilityMatrixPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 9) || (items > 9)) {
      SWIG_croak("Usage: new_SwaptionVolatilityMatrix(calendar,bdc,optionTenors,swapTenors,vols,dayCounter,flatExtrapolation,type,shifts);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SwaptionVolatilityMatrix" "', argument " "1"" of type '" "Calendar const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionVolatilityMatrix" "', argument " "1"" of type '" "Calendar const &""'"); 
    }
    arg1 = reinterpret_cast< Calendar * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_SwaptionVolatilityMatrix" "', argument " "2"" of type '" "BusinessDayConvention""'");
    } 
    arg2 = static_cast< BusinessDayConvention >(val2);
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_Period_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_SwaptionVolatilityMatrix. "
          "Expected an array of " "Period");
        SV **tv;
        I32 len = av_len(av) + 1;
        Period* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Period,0) != -1) {
            temp3.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_SwaptionVolatilityMatrix. "
              "Expected an array of " "Period");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_SwaptionVolatilityMatrix. "
          "Expected an array of " "Period");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_Period_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of new_SwaptionVolatilityMatrix. "
          "Expected an array of " "Period");
        SV **tv;
        I32 len = av_len(av) + 1;
        Period* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Period,0) != -1) {
            temp4.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 4 of "
              "new_SwaptionVolatilityMatrix. "
              "Expected an array of " "Period");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of new_SwaptionVolatilityMatrix. "
          "Expected an array of " "Period");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(4),(void **) &v5, 
          SWIGTYPE_p_std__vectorT_std__vectorT_HandleT_Quote_t_t_t,1) != -1) {
        arg5 = v5;
      } else if (SvROK(ST(4))) {
        AV *av = (AV *)SvRV(ST(4));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 5 of new_SwaptionVolatilityMatrix. "
          "Expected an array of " "std::vector< Handle< Quote > >");
        SV **tv;
        I32 len = av_len(av) + 1;
        std::vector< Handle< Quote > >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,0) != -1) {
            temp5.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 5 of "
              "new_SwaptionVolatilityMatrix. "
              "Expected an array of " "std::vector< Handle< Quote > >");
          }
        }
        arg5 = &temp5;
      } else {
        SWIG_croak("Type error in argument 5 of new_SwaptionVolatilityMatrix. "
          "Expected an array of " "std::vector< Handle< Quote > >");
      }
    }
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_SwaptionVolatilityMatrix" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionVolatilityMatrix" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    arg6 = reinterpret_cast< DayCounter * >(argp6);
    ecode7 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_SwaptionVolatilityMatrix" "', argument " "7"" of type '" "bool""'");
    } 
    arg7 = static_cast< bool >(val7);
    ecode8 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_SwaptionVolatilityMatrix" "', argument " "8"" of type '" "VolatilityType""'");
    } 
    arg8 = static_cast< VolatilityType >(val8);
    res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_std__vectorT_std__vectorT_double_t_t,  0 );
    if (!SWIG_IsOK(res9)) {
      SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_SwaptionVolatilityMatrix" "', argument " "9"" of type '" "std::vector< std::vector< Real > > const &""'"); 
    }
    if (!argp9) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionVolatilityMatrix" "', argument " "9"" of type '" "std::vector< std::vector< Real > > const &""'"); 
    }
    arg9 = reinterpret_cast< std::vector< std::vector< Real > > * >(argp9);
    {
      try {
        result = (SwaptionVolatilityMatrixPtr *)new_SwaptionVolatilityMatrixPtr__SWIG_4((Calendar const &)*arg1,arg2,(std::vector< Period > const &)*arg3,(std::vector< Period > const &)*arg4,(std::vector< std::vector< Handle< Quote > > > const &)*arg5,(DayCounter const &)*arg6,arg7,arg8,(std::vector< std::vector< double > > const &)*arg9);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SwaptionVolatilityMatrixPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SwaptionVolatilityMatrix__SWIG_5) {
  {
    Calendar *arg1 = 0 ;
    BusinessDayConvention arg2 ;
    std::vector< Period > *arg3 = 0 ;
    std::vector< Period > *arg4 = 0 ;
    std::vector< std::vector< Handle< Quote > > > *arg5 = 0 ;
    DayCounter *arg6 = 0 ;
    bool arg7 ;
    VolatilityType arg8 ;
    void *argp1 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    std::vector< Period > temp3 ;
    std::vector< Period > *v3 ;
    std::vector< Period > temp4 ;
    std::vector< Period > *v4 ;
    std::vector< std::vector< Handle< Quote > > > temp5 ;
    std::vector< std::vector< Handle< Quote > > > *v5 ;
    void *argp6 ;
    int res6 = 0 ;
    bool val7 ;
    int ecode7 = 0 ;
    int val8 ;
    int ecode8 = 0 ;
    int argvi = 0;
    SwaptionVolatilityMatrixPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 8) || (items > 8)) {
      SWIG_croak("Usage: new_SwaptionVolatilityMatrix(calendar,bdc,optionTenors,swapTenors,vols,dayCounter,flatExtrapolation,type);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SwaptionVolatilityMatrix" "', argument " "1"" of type '" "Calendar const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionVolatilityMatrix" "', argument " "1"" of type '" "Calendar const &""'"); 
    }
    arg1 = reinterpret_cast< Calendar * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_SwaptionVolatilityMatrix" "', argument " "2"" of type '" "BusinessDayConvention""'");
    } 
    arg2 = static_cast< BusinessDayConvention >(val2);
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_Period_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_SwaptionVolatilityMatrix. "
          "Expected an array of " "Period");
        SV **tv;
        I32 len = av_len(av) + 1;
        Period* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Period,0) != -1) {
            temp3.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_SwaptionVolatilityMatrix. "
              "Expected an array of " "Period");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_SwaptionVolatilityMatrix. "
          "Expected an array of " "Period");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_Period_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of new_SwaptionVolatilityMatrix. "
          "Expected an array of " "Period");
        SV **tv;
        I32 len = av_len(av) + 1;
        Period* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Period,0) != -1) {
            temp4.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 4 of "
              "new_SwaptionVolatilityMatrix. "
              "Expected an array of " "Period");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of new_SwaptionVolatilityMatrix. "
          "Expected an array of " "Period");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(4),(void **) &v5, 
          SWIGTYPE_p_std__vectorT_std__vectorT_HandleT_Quote_t_t_t,1) != -1) {
        arg5 = v5;
      } else if (SvROK(ST(4))) {
        AV *av = (AV *)SvRV(ST(4));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 5 of new_SwaptionVolatilityMatrix. "
          "Expected an array of " "std::vector< Handle< Quote > >");
        SV **tv;
        I32 len = av_len(av) + 1;
        std::vector< Handle< Quote > >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,0) != -1) {
            temp5.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 5 of "
              "new_SwaptionVolatilityMatrix. "
              "Expected an array of " "std::vector< Handle< Quote > >");
          }
        }
        arg5 = &temp5;
      } else {
        SWIG_croak("Type error in argument 5 of new_SwaptionVolatilityMatrix. "
          "Expected an array of " "std::vector< Handle< Quote > >");
      }
    }
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_SwaptionVolatilityMatrix" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionVolatilityMatrix" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    arg6 = reinterpret_cast< DayCounter * >(argp6);
    ecode7 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_SwaptionVolatilityMatrix" "', argument " "7"" of type '" "bool""'");
    } 
    arg7 = static_cast< bool >(val7);
    ecode8 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_SwaptionVolatilityMatrix" "', argument " "8"" of type '" "VolatilityType""'");
    } 
    arg8 = static_cast< VolatilityType >(val8);
    {
      try {
        result = (SwaptionVolatilityMatrixPtr *)new_SwaptionVolatilityMatrixPtr__SWIG_4((Calendar const &)*arg1,arg2,(std::vector< Period > const &)*arg3,(std::vector< Period > const &)*arg4,(std::vector< std::vector< Handle< Quote > > > const &)*arg5,(DayCounter const &)*arg6,arg7,arg8);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SwaptionVolatilityMatrixPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SwaptionVolatilityMatrix__SWIG_6) {
  {
    Calendar *arg1 = 0 ;
    BusinessDayConvention arg2 ;
    std::vector< Period > *arg3 = 0 ;
    std::vector< Period > *arg4 = 0 ;
    std::vector< std::vector< Handle< Quote > > > *arg5 = 0 ;
    DayCounter *arg6 = 0 ;
    bool arg7 ;
    void *argp1 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    std::vector< Period > temp3 ;
    std::vector< Period > *v3 ;
    std::vector< Period > temp4 ;
    std::vector< Period > *v4 ;
    std::vector< std::vector< Handle< Quote > > > temp5 ;
    std::vector< std::vector< Handle< Quote > > > *v5 ;
    void *argp6 ;
    int res6 = 0 ;
    bool val7 ;
    int ecode7 = 0 ;
    int argvi = 0;
    SwaptionVolatilityMatrixPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: new_SwaptionVolatilityMatrix(calendar,bdc,optionTenors,swapTenors,vols,dayCounter,flatExtrapolation);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SwaptionVolatilityMatrix" "', argument " "1"" of type '" "Calendar const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionVolatilityMatrix" "', argument " "1"" of type '" "Calendar const &""'"); 
    }
    arg1 = reinterpret_cast< Calendar * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_SwaptionVolatilityMatrix" "', argument " "2"" of type '" "BusinessDayConvention""'");
    } 
    arg2 = static_cast< BusinessDayConvention >(val2);
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_Period_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_SwaptionVolatilityMatrix. "
          "Expected an array of " "Period");
        SV **tv;
        I32 len = av_len(av) + 1;
        Period* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Period,0) != -1) {
            temp3.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_SwaptionVolatilityMatrix. "
              "Expected an array of " "Period");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_SwaptionVolatilityMatrix. "
          "Expected an array of " "Period");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_Period_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of new_SwaptionVolatilityMatrix. "
          "Expected an array of " "Period");
        SV **tv;
        I32 len = av_len(av) + 1;
        Period* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Period,0) != -1) {
            temp4.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 4 of "
              "new_SwaptionVolatilityMatrix. "
              "Expected an array of " "Period");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of new_SwaptionVolatilityMatrix. "
          "Expected an array of " "Period");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(4),(void **) &v5, 
          SWIGTYPE_p_std__vectorT_std__vectorT_HandleT_Quote_t_t_t,1) != -1) {
        arg5 = v5;
      } else if (SvROK(ST(4))) {
        AV *av = (AV *)SvRV(ST(4));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 5 of new_SwaptionVolatilityMatrix. "
          "Expected an array of " "std::vector< Handle< Quote > >");
        SV **tv;
        I32 len = av_len(av) + 1;
        std::vector< Handle< Quote > >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,0) != -1) {
            temp5.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 5 of "
              "new_SwaptionVolatilityMatrix. "
              "Expected an array of " "std::vector< Handle< Quote > >");
          }
        }
        arg5 = &temp5;
      } else {
        SWIG_croak("Type error in argument 5 of new_SwaptionVolatilityMatrix. "
          "Expected an array of " "std::vector< Handle< Quote > >");
      }
    }
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_SwaptionVolatilityMatrix" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionVolatilityMatrix" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    arg6 = reinterpret_cast< DayCounter * >(argp6);
    ecode7 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_SwaptionVolatilityMatrix" "', argument " "7"" of type '" "bool""'");
    } 
    arg7 = static_cast< bool >(val7);
    {
      try {
        result = (SwaptionVolatilityMatrixPtr *)new_SwaptionVolatilityMatrixPtr__SWIG_4((Calendar const &)*arg1,arg2,(std::vector< Period > const &)*arg3,(std::vector< Period > const &)*arg4,(std::vector< std::vector< Handle< Quote > > > const &)*arg5,(DayCounter const &)*arg6,arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SwaptionVolatilityMatrixPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SwaptionVolatilityMatrix__SWIG_7) {
  {
    Calendar *arg1 = 0 ;
    BusinessDayConvention arg2 ;
    std::vector< Period > *arg3 = 0 ;
    std::vector< Period > *arg4 = 0 ;
    std::vector< std::vector< Handle< Quote > > > *arg5 = 0 ;
    DayCounter *arg6 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    std::vector< Period > temp3 ;
    std::vector< Period > *v3 ;
    std::vector< Period > temp4 ;
    std::vector< Period > *v4 ;
    std::vector< std::vector< Handle< Quote > > > temp5 ;
    std::vector< std::vector< Handle< Quote > > > *v5 ;
    void *argp6 ;
    int res6 = 0 ;
    int argvi = 0;
    SwaptionVolatilityMatrixPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_SwaptionVolatilityMatrix(calendar,bdc,optionTenors,swapTenors,vols,dayCounter);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SwaptionVolatilityMatrix" "', argument " "1"" of type '" "Calendar const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionVolatilityMatrix" "', argument " "1"" of type '" "Calendar const &""'"); 
    }
    arg1 = reinterpret_cast< Calendar * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_SwaptionVolatilityMatrix" "', argument " "2"" of type '" "BusinessDayConvention""'");
    } 
    arg2 = static_cast< BusinessDayConvention >(val2);
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_Period_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_SwaptionVolatilityMatrix. "
          "Expected an array of " "Period");
        SV **tv;
        I32 len = av_len(av) + 1;
        Period* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Period,0) != -1) {
            temp3.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_SwaptionVolatilityMatrix. "
              "Expected an array of " "Period");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_SwaptionVolatilityMatrix. "
          "Expected an array of " "Period");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_Period_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of new_SwaptionVolatilityMatrix. "
          "Expected an array of " "Period");
        SV **tv;
        I32 len = av_len(av) + 1;
        Period* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Period,0) != -1) {
            temp4.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 4 of "
              "new_SwaptionVolatilityMatrix. "
              "Expected an array of " "Period");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of new_SwaptionVolatilityMatrix. "
          "Expected an array of " "Period");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(4),(void **) &v5, 
          SWIGTYPE_p_std__vectorT_std__vectorT_HandleT_Quote_t_t_t,1) != -1) {
        arg5 = v5;
      } else if (SvROK(ST(4))) {
        AV *av = (AV *)SvRV(ST(4));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 5 of new_SwaptionVolatilityMatrix. "
          "Expected an array of " "std::vector< Handle< Quote > >");
        SV **tv;
        I32 len = av_len(av) + 1;
        std::vector< Handle< Quote > >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,0) != -1) {
            temp5.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 5 of "
              "new_SwaptionVolatilityMatrix. "
              "Expected an array of " "std::vector< Handle< Quote > >");
          }
        }
        arg5 = &temp5;
      } else {
        SWIG_croak("Type error in argument 5 of new_SwaptionVolatilityMatrix. "
          "Expected an array of " "std::vector< Handle< Quote > >");
      }
    }
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_SwaptionVolatilityMatrix" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionVolatilityMatrix" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    arg6 = reinterpret_cast< DayCounter * >(argp6);
    {
      try {
        result = (SwaptionVolatilityMatrixPtr *)new_SwaptionVolatilityMatrixPtr__SWIG_4((Calendar const &)*arg1,arg2,(std::vector< Period > const &)*arg3,(std::vector< Period > const &)*arg4,(std::vector< std::vector< Handle< Quote > > > const &)*arg5,(DayCounter const &)*arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SwaptionVolatilityMatrixPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SwaptionVolatilityMatrix__SWIG_8) {
  {
    Calendar *arg1 = 0 ;
    BusinessDayConvention arg2 ;
    std::vector< Period > *arg3 = 0 ;
    std::vector< Period > *arg4 = 0 ;
    Matrix *arg5 = 0 ;
    DayCounter *arg6 = 0 ;
    bool arg7 ;
    VolatilityType arg8 ;
    Matrix *arg9 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    std::vector< Period > temp3 ;
    std::vector< Period > *v3 ;
    std::vector< Period > temp4 ;
    std::vector< Period > *v4 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    bool val7 ;
    int ecode7 = 0 ;
    int val8 ;
    int ecode8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    int argvi = 0;
    SwaptionVolatilityMatrixPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 9) || (items > 9)) {
      SWIG_croak("Usage: new_SwaptionVolatilityMatrix(calendar,bdc,optionTenors,swapTenors,vols,dayCounter,flatExtrapolation,type,shifts);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SwaptionVolatilityMatrix" "', argument " "1"" of type '" "Calendar const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionVolatilityMatrix" "', argument " "1"" of type '" "Calendar const &""'"); 
    }
    arg1 = reinterpret_cast< Calendar * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_SwaptionVolatilityMatrix" "', argument " "2"" of type '" "BusinessDayConvention""'");
    } 
    arg2 = static_cast< BusinessDayConvention >(val2);
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_Period_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_SwaptionVolatilityMatrix. "
          "Expected an array of " "Period");
        SV **tv;
        I32 len = av_len(av) + 1;
        Period* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Period,0) != -1) {
            temp3.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_SwaptionVolatilityMatrix. "
              "Expected an array of " "Period");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_SwaptionVolatilityMatrix. "
          "Expected an array of " "Period");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_Period_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of new_SwaptionVolatilityMatrix. "
          "Expected an array of " "Period");
        SV **tv;
        I32 len = av_len(av) + 1;
        Period* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Period,0) != -1) {
            temp4.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 4 of "
              "new_SwaptionVolatilityMatrix. "
              "Expected an array of " "Period");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of new_SwaptionVolatilityMatrix. "
          "Expected an array of " "Period");
      }
    }
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Matrix,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_SwaptionVolatilityMatrix" "', argument " "5"" of type '" "Matrix const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionVolatilityMatrix" "', argument " "5"" of type '" "Matrix const &""'"); 
    }
    arg5 = reinterpret_cast< Matrix * >(argp5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_SwaptionVolatilityMatrix" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionVolatilityMatrix" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    arg6 = reinterpret_cast< DayCounter * >(argp6);
    ecode7 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_SwaptionVolatilityMatrix" "', argument " "7"" of type '" "bool""'");
    } 
    arg7 = static_cast< bool >(val7);
    ecode8 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_SwaptionVolatilityMatrix" "', argument " "8"" of type '" "VolatilityType""'");
    } 
    arg8 = static_cast< VolatilityType >(val8);
    res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_Matrix,  0 );
    if (!SWIG_IsOK(res9)) {
      SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_SwaptionVolatilityMatrix" "', argument " "9"" of type '" "Matrix const &""'"); 
    }
    if (!argp9) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionVolatilityMatrix" "', argument " "9"" of type '" "Matrix const &""'"); 
    }
    arg9 = reinterpret_cast< Matrix * >(argp9);
    {
      try {
        result = (SwaptionVolatilityMatrixPtr *)new_SwaptionVolatilityMatrixPtr__SWIG_8((Calendar const &)*arg1,arg2,(std::vector< Period > const &)*arg3,(std::vector< Period > const &)*arg4,(Matrix const &)*arg5,(DayCounter const &)*arg6,arg7,arg8,(Matrix const &)*arg9);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SwaptionVolatilityMatrixPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SwaptionVolatilityMatrix__SWIG_9) {
  {
    Calendar *arg1 = 0 ;
    BusinessDayConvention arg2 ;
    std::vector< Period > *arg3 = 0 ;
    std::vector< Period > *arg4 = 0 ;
    Matrix *arg5 = 0 ;
    DayCounter *arg6 = 0 ;
    bool arg7 ;
    VolatilityType arg8 ;
    void *argp1 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    std::vector< Period > temp3 ;
    std::vector< Period > *v3 ;
    std::vector< Period > temp4 ;
    std::vector< Period > *v4 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    bool val7 ;
    int ecode7 = 0 ;
    int val8 ;
    int ecode8 = 0 ;
    int argvi = 0;
    SwaptionVolatilityMatrixPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 8) || (items > 8)) {
      SWIG_croak("Usage: new_SwaptionVolatilityMatrix(calendar,bdc,optionTenors,swapTenors,vols,dayCounter,flatExtrapolation,type);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SwaptionVolatilityMatrix" "', argument " "1"" of type '" "Calendar const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionVolatilityMatrix" "', argument " "1"" of type '" "Calendar const &""'"); 
    }
    arg1 = reinterpret_cast< Calendar * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_SwaptionVolatilityMatrix" "', argument " "2"" of type '" "BusinessDayConvention""'");
    } 
    arg2 = static_cast< BusinessDayConvention >(val2);
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_Period_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_SwaptionVolatilityMatrix. "
          "Expected an array of " "Period");
        SV **tv;
        I32 len = av_len(av) + 1;
        Period* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Period,0) != -1) {
            temp3.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_SwaptionVolatilityMatrix. "
              "Expected an array of " "Period");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_SwaptionVolatilityMatrix. "
          "Expected an array of " "Period");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_Period_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of new_SwaptionVolatilityMatrix. "
          "Expected an array of " "Period");
        SV **tv;
        I32 len = av_len(av) + 1;
        Period* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Period,0) != -1) {
            temp4.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 4 of "
              "new_SwaptionVolatilityMatrix. "
              "Expected an array of " "Period");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of new_SwaptionVolatilityMatrix. "
          "Expected an array of " "Period");
      }
    }
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Matrix,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_SwaptionVolatilityMatrix" "', argument " "5"" of type '" "Matrix const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionVolatilityMatrix" "', argument " "5"" of type '" "Matrix const &""'"); 
    }
    arg5 = reinterpret_cast< Matrix * >(argp5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_SwaptionVolatilityMatrix" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionVolatilityMatrix" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    arg6 = reinterpret_cast< DayCounter * >(argp6);
    ecode7 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_SwaptionVolatilityMatrix" "', argument " "7"" of type '" "bool""'");
    } 
    arg7 = static_cast< bool >(val7);
    ecode8 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_SwaptionVolatilityMatrix" "', argument " "8"" of type '" "VolatilityType""'");
    } 
    arg8 = static_cast< VolatilityType >(val8);
    {
      try {
        result = (SwaptionVolatilityMatrixPtr *)new_SwaptionVolatilityMatrixPtr__SWIG_8((Calendar const &)*arg1,arg2,(std::vector< Period > const &)*arg3,(std::vector< Period > const &)*arg4,(Matrix const &)*arg5,(DayCounter const &)*arg6,arg7,arg8);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SwaptionVolatilityMatrixPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SwaptionVolatilityMatrix__SWIG_10) {
  {
    Calendar *arg1 = 0 ;
    BusinessDayConvention arg2 ;
    std::vector< Period > *arg3 = 0 ;
    std::vector< Period > *arg4 = 0 ;
    Matrix *arg5 = 0 ;
    DayCounter *arg6 = 0 ;
    bool arg7 ;
    void *argp1 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    std::vector< Period > temp3 ;
    std::vector< Period > *v3 ;
    std::vector< Period > temp4 ;
    std::vector< Period > *v4 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    bool val7 ;
    int ecode7 = 0 ;
    int argvi = 0;
    SwaptionVolatilityMatrixPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: new_SwaptionVolatilityMatrix(calendar,bdc,optionTenors,swapTenors,vols,dayCounter,flatExtrapolation);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SwaptionVolatilityMatrix" "', argument " "1"" of type '" "Calendar const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionVolatilityMatrix" "', argument " "1"" of type '" "Calendar const &""'"); 
    }
    arg1 = reinterpret_cast< Calendar * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_SwaptionVolatilityMatrix" "', argument " "2"" of type '" "BusinessDayConvention""'");
    } 
    arg2 = static_cast< BusinessDayConvention >(val2);
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_Period_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_SwaptionVolatilityMatrix. "
          "Expected an array of " "Period");
        SV **tv;
        I32 len = av_len(av) + 1;
        Period* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Period,0) != -1) {
            temp3.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_SwaptionVolatilityMatrix. "
              "Expected an array of " "Period");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_SwaptionVolatilityMatrix. "
          "Expected an array of " "Period");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_Period_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of new_SwaptionVolatilityMatrix. "
          "Expected an array of " "Period");
        SV **tv;
        I32 len = av_len(av) + 1;
        Period* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Period,0) != -1) {
            temp4.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 4 of "
              "new_SwaptionVolatilityMatrix. "
              "Expected an array of " "Period");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of new_SwaptionVolatilityMatrix. "
          "Expected an array of " "Period");
      }
    }
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Matrix,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_SwaptionVolatilityMatrix" "', argument " "5"" of type '" "Matrix const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionVolatilityMatrix" "', argument " "5"" of type '" "Matrix const &""'"); 
    }
    arg5 = reinterpret_cast< Matrix * >(argp5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_SwaptionVolatilityMatrix" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionVolatilityMatrix" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    arg6 = reinterpret_cast< DayCounter * >(argp6);
    ecode7 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_SwaptionVolatilityMatrix" "', argument " "7"" of type '" "bool""'");
    } 
    arg7 = static_cast< bool >(val7);
    {
      try {
        result = (SwaptionVolatilityMatrixPtr *)new_SwaptionVolatilityMatrixPtr__SWIG_8((Calendar const &)*arg1,arg2,(std::vector< Period > const &)*arg3,(std::vector< Period > const &)*arg4,(Matrix const &)*arg5,(DayCounter const &)*arg6,arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SwaptionVolatilityMatrixPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SwaptionVolatilityMatrix__SWIG_11) {
  {
    Calendar *arg1 = 0 ;
    BusinessDayConvention arg2 ;
    std::vector< Period > *arg3 = 0 ;
    std::vector< Period > *arg4 = 0 ;
    Matrix *arg5 = 0 ;
    DayCounter *arg6 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    std::vector< Period > temp3 ;
    std::vector< Period > *v3 ;
    std::vector< Period > temp4 ;
    std::vector< Period > *v4 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    int argvi = 0;
    SwaptionVolatilityMatrixPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_SwaptionVolatilityMatrix(calendar,bdc,optionTenors,swapTenors,vols,dayCounter);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SwaptionVolatilityMatrix" "', argument " "1"" of type '" "Calendar const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionVolatilityMatrix" "', argument " "1"" of type '" "Calendar const &""'"); 
    }
    arg1 = reinterpret_cast< Calendar * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_SwaptionVolatilityMatrix" "', argument " "2"" of type '" "BusinessDayConvention""'");
    } 
    arg2 = static_cast< BusinessDayConvention >(val2);
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_Period_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_SwaptionVolatilityMatrix. "
          "Expected an array of " "Period");
        SV **tv;
        I32 len = av_len(av) + 1;
        Period* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Period,0) != -1) {
            temp3.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_SwaptionVolatilityMatrix. "
              "Expected an array of " "Period");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_SwaptionVolatilityMatrix. "
          "Expected an array of " "Period");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_Period_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of new_SwaptionVolatilityMatrix. "
          "Expected an array of " "Period");
        SV **tv;
        I32 len = av_len(av) + 1;
        Period* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Period,0) != -1) {
            temp4.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 4 of "
              "new_SwaptionVolatilityMatrix. "
              "Expected an array of " "Period");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of new_SwaptionVolatilityMatrix. "
          "Expected an array of " "Period");
      }
    }
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Matrix,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_SwaptionVolatilityMatrix" "', argument " "5"" of type '" "Matrix const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionVolatilityMatrix" "', argument " "5"" of type '" "Matrix const &""'"); 
    }
    arg5 = reinterpret_cast< Matrix * >(argp5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_SwaptionVolatilityMatrix" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionVolatilityMatrix" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    arg6 = reinterpret_cast< DayCounter * >(argp6);
    {
      try {
        result = (SwaptionVolatilityMatrixPtr *)new_SwaptionVolatilityMatrixPtr__SWIG_8((Calendar const &)*arg1,arg2,(std::vector< Period > const &)*arg3,(std::vector< Period > const &)*arg4,(Matrix const &)*arg5,(DayCounter const &)*arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SwaptionVolatilityMatrixPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SwaptionVolatilityMatrix) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Period >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Period_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Period* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Period,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Matrix, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Period >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Period_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Period* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Period,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Matrix, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Period >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Period_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Period* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Period,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Period >* v;
            if (SWIG_ConvertPtr(ST(3),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Period_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(3))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(3));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Period* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Period,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Matrix, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Period >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Period_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Period* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Period,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Period >* v;
            if (SWIG_ConvertPtr(ST(3),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Period_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(3))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(3));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Period* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Period,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< std::vector< Handle< Quote > > >* v;
            if (SWIG_ConvertPtr(ST(4),(void **) &v, 
                SWIGTYPE_p_std__vectorT_std__vectorT_HandleT_Quote_t_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(4))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(4));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  std::vector< Handle< Quote > >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Period >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Period_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Period* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Period,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Matrix, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Period >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Period_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Period* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Period,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Period >* v;
            if (SWIG_ConvertPtr(ST(3),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Period_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(3))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(3));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Period* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Period,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Matrix, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Period >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Period_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Period* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Period,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Period >* v;
            if (SWIG_ConvertPtr(ST(3),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Period_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(3))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(3));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Period* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Period,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< std::vector< Handle< Quote > > >* v;
            if (SWIG_ConvertPtr(ST(4),(void **) &v, 
                SWIGTYPE_p_std__vectorT_std__vectorT_HandleT_Quote_t_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(4))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(4));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  std::vector< Handle< Quote > >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 7;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_7:
    
    if (items == 8) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Period >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Period_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Period* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Period,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Period >* v;
            if (SWIG_ConvertPtr(ST(3),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Period_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(3))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(3));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Period* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Period,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Matrix, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 8;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_8:
    
    if (items == 8) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Period >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Period_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Period* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Period,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Matrix, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_Matrix, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 9;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_9:
    
    if (items == 8) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Period >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Period_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Period* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Period,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Period >* v;
            if (SWIG_ConvertPtr(ST(3),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Period_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(3))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(3));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Period* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Period,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< std::vector< Handle< Quote > > >* v;
            if (SWIG_ConvertPtr(ST(4),(void **) &v, 
                SWIGTYPE_p_std__vectorT_std__vectorT_HandleT_Quote_t_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(4))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(4));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  std::vector< Handle< Quote > >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 10;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_10:
    
    if (items == 9) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Period >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Period_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Period* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Period,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Period >* v;
            if (SWIG_ConvertPtr(ST(3),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Period_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(3))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(3));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Period* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Period,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Matrix, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_Matrix, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 11;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_11:
    
    if (items == 9) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Period >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Period_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Period* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Period,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Period >* v;
            if (SWIG_ConvertPtr(ST(3),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Period_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(3))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(3));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Period* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Period,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< std::vector< Handle< Quote > > >* v;
            if (SWIG_ConvertPtr(ST(4),(void **) &v, 
                SWIGTYPE_p_std__vectorT_std__vectorT_HandleT_Quote_t_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(4))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(4));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  std::vector< Handle< Quote > >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_std__vectorT_std__vectorT_double_t_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 12;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_12:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SwaptionVolatilityMatrix__SWIG_3); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SwaptionVolatilityMatrix__SWIG_2); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SwaptionVolatilityMatrix__SWIG_11); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SwaptionVolatilityMatrix__SWIG_7); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SwaptionVolatilityMatrix__SWIG_1); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SwaptionVolatilityMatrix__SWIG_10); return;
    case 7:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SwaptionVolatilityMatrix__SWIG_6); return;
    case 8:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SwaptionVolatilityMatrix__SWIG_9); return;
    case 9:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SwaptionVolatilityMatrix__SWIG_0); return;
    case 10:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SwaptionVolatilityMatrix__SWIG_5); return;
    case 11:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SwaptionVolatilityMatrix__SWIG_8); return;
    case 12:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SwaptionVolatilityMatrix__SWIG_4); return;
    }
  }
  
  croak("No matching function for overloaded 'new_SwaptionVolatilityMatrix'");
  XSRETURN(0);
}


XS(_wrap_delete_SwaptionVolatilityMatrix) {
  {
    SwaptionVolatilityMatrixPtr *arg1 = (SwaptionVolatilityMatrixPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_SwaptionVolatilityMatrix(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SwaptionVolatilityMatrixPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SwaptionVolatilityMatrix" "', argument " "1"" of type '" "SwaptionVolatilityMatrixPtr *""'"); 
    }
    arg1 = reinterpret_cast< SwaptionVolatilityMatrixPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SwaptionVolCube1__SWIG_0) {
  {
    Handle< SwaptionVolatilityStructure > *arg1 = 0 ;
    std::vector< Period > *arg2 = 0 ;
    std::vector< Period > *arg3 = 0 ;
    std::vector< Spread > *arg4 = 0 ;
    std::vector< std::vector< Handle< Quote > > > *arg5 = 0 ;
    SwapIndexPtr *arg6 = 0 ;
    SwapIndexPtr *arg7 = 0 ;
    bool arg8 ;
    std::vector< std::vector< Handle< Quote > > > *arg9 = 0 ;
    std::vector< bool > *arg10 = 0 ;
    bool arg11 ;
    boost::shared_ptr< EndCriteria > *arg12 = 0 ;
    Real arg13 ;
    boost::shared_ptr< OptimizationMethod > *arg14 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    std::vector< Period > temp2 ;
    std::vector< Period > *v2 ;
    std::vector< Period > temp3 ;
    std::vector< Period > *v3 ;
    std::vector< double > temp4 ;
    std::vector< double > *v4 ;
    std::vector< std::vector< Handle< Quote > > > temp5 ;
    std::vector< std::vector< Handle< Quote > > > *v5 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    bool val8 ;
    int ecode8 = 0 ;
    std::vector< std::vector< Handle< Quote > > > temp9 ;
    std::vector< std::vector< Handle< Quote > > > *v9 ;
    std::vector< bool > temp10 ;
    std::vector< bool > *v10 ;
    bool val11 ;
    int ecode11 = 0 ;
    void *argp12 ;
    int res12 = 0 ;
    double val13 ;
    int ecode13 = 0 ;
    void *argp14 ;
    int res14 = 0 ;
    int argvi = 0;
    SwaptionVolCube1Ptr *result = 0 ;
    dXSARGS;
    
    if ((items < 14) || (items > 14)) {
      SWIG_croak("Usage: new_SwaptionVolCube1(atmVolStructure,optionTenors,swapTenors,strikeSpreads,volSpreads,swapIndexBase,shortSwapIndexBase,vegaWeightedSmileFit,parametersGuess,isParameterFixed,isAtmCalibrated,endCriteria,maxErrorTolerance,optMethod);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_SwaptionVolatilityStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SwaptionVolCube1" "', argument " "1"" of type '" "Handle< SwaptionVolatilityStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionVolCube1" "', argument " "1"" of type '" "Handle< SwaptionVolatilityStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< SwaptionVolatilityStructure > * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_Period_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_SwaptionVolCube1. "
          "Expected an array of " "Period");
        SV **tv;
        I32 len = av_len(av) + 1;
        Period* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Period,0) != -1) {
            temp2.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_SwaptionVolCube1. "
              "Expected an array of " "Period");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_SwaptionVolCube1. "
          "Expected an array of " "Period");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_Period_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_SwaptionVolCube1. "
          "Expected an array of " "Period");
        SV **tv;
        I32 len = av_len(av) + 1;
        Period* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Period,0) != -1) {
            temp3.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_SwaptionVolCube1. "
              "Expected an array of " "Period");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_SwaptionVolCube1. "
          "Expected an array of " "Period");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of new_SwaptionVolCube1. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp4.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 4 of "
              "new_SwaptionVolCube1. "
              "Expected an array of ""double");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of new_SwaptionVolCube1. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(4),(void **) &v5, 
          SWIGTYPE_p_std__vectorT_std__vectorT_HandleT_Quote_t_t_t,1) != -1) {
        arg5 = v5;
      } else if (SvROK(ST(4))) {
        AV *av = (AV *)SvRV(ST(4));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 5 of new_SwaptionVolCube1. "
          "Expected an array of " "std::vector< Handle< Quote > >");
        SV **tv;
        I32 len = av_len(av) + 1;
        std::vector< Handle< Quote > >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,0) != -1) {
            temp5.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 5 of "
              "new_SwaptionVolCube1. "
              "Expected an array of " "std::vector< Handle< Quote > >");
          }
        }
        arg5 = &temp5;
      } else {
        SWIG_croak("Type error in argument 5 of new_SwaptionVolCube1. "
          "Expected an array of " "std::vector< Handle< Quote > >");
      }
    }
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_SwapIndexPtr,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_SwaptionVolCube1" "', argument " "6"" of type '" "SwapIndexPtr const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionVolCube1" "', argument " "6"" of type '" "SwapIndexPtr const &""'"); 
    }
    arg6 = reinterpret_cast< SwapIndexPtr * >(argp6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_SwapIndexPtr,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_SwaptionVolCube1" "', argument " "7"" of type '" "SwapIndexPtr const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionVolCube1" "', argument " "7"" of type '" "SwapIndexPtr const &""'"); 
    }
    arg7 = reinterpret_cast< SwapIndexPtr * >(argp7);
    ecode8 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_SwaptionVolCube1" "', argument " "8"" of type '" "bool""'");
    } 
    arg8 = static_cast< bool >(val8);
    {
      if (SWIG_ConvertPtr(ST(8),(void **) &v9, 
          SWIGTYPE_p_std__vectorT_std__vectorT_HandleT_Quote_t_t_t,1) != -1) {
        arg9 = v9;
      } else if (SvROK(ST(8))) {
        AV *av = (AV *)SvRV(ST(8));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 9 of new_SwaptionVolCube1. "
          "Expected an array of " "std::vector< Handle< Quote > >");
        SV **tv;
        I32 len = av_len(av) + 1;
        std::vector< Handle< Quote > >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,0) != -1) {
            temp9.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 9 of "
              "new_SwaptionVolCube1. "
              "Expected an array of " "std::vector< Handle< Quote > >");
          }
        }
        arg9 = &temp9;
      } else {
        SWIG_croak("Type error in argument 9 of new_SwaptionVolCube1. "
          "Expected an array of " "std::vector< Handle< Quote > >");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(9),(void **) &v10, 
          SWIGTYPE_p_std__vectorT_bool_t,1) != -1) {
        arg10 = v10;
      } else if (SvROK(ST(9))) {
        AV *av = (AV *)SvRV(ST(9));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 10 of new_SwaptionVolCube1. "
          "Expected an array of ""bool");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvIOK(*tv)) {
            temp10.push_back((bool)SvIVX(*tv));
          } else {
            SWIG_croak("Type error in argument 10 of "
              "new_SwaptionVolCube1. "
              "Expected an array of ""bool");
          }
        }
        arg10 = &temp10;
      } else {
        SWIG_croak("Type error in argument 10 of new_SwaptionVolCube1. "
          "Expected an array of ""bool");
      }
    }
    ecode11 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(10), &val11);
    if (!SWIG_IsOK(ecode11)) {
      SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "new_SwaptionVolCube1" "', argument " "11"" of type '" "bool""'");
    } 
    arg11 = static_cast< bool >(val11);
    res12 = SWIG_ConvertPtr(ST(11), &argp12, SWIGTYPE_p_boost__shared_ptrT_EndCriteria_t,  0 );
    if (!SWIG_IsOK(res12)) {
      SWIG_exception_fail(SWIG_ArgError(res12), "in method '" "new_SwaptionVolCube1" "', argument " "12"" of type '" "boost::shared_ptr< EndCriteria > const &""'"); 
    }
    if (!argp12) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionVolCube1" "', argument " "12"" of type '" "boost::shared_ptr< EndCriteria > const &""'"); 
    }
    arg12 = reinterpret_cast< boost::shared_ptr< EndCriteria > * >(argp12);
    ecode13 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(12), &val13);
    if (!SWIG_IsOK(ecode13)) {
      SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "new_SwaptionVolCube1" "', argument " "13"" of type '" "Real""'");
    } 
    arg13 = static_cast< Real >(val13);
    res14 = SWIG_ConvertPtr(ST(13), &argp14, SWIGTYPE_p_boost__shared_ptrT_OptimizationMethod_t,  0 );
    if (!SWIG_IsOK(res14)) {
      SWIG_exception_fail(SWIG_ArgError(res14), "in method '" "new_SwaptionVolCube1" "', argument " "14"" of type '" "boost::shared_ptr< OptimizationMethod > const &""'"); 
    }
    if (!argp14) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionVolCube1" "', argument " "14"" of type '" "boost::shared_ptr< OptimizationMethod > const &""'"); 
    }
    arg14 = reinterpret_cast< boost::shared_ptr< OptimizationMethod > * >(argp14);
    {
      try {
        result = (SwaptionVolCube1Ptr *)new_SwaptionVolCube1Ptr__SWIG_0((Handle< SwaptionVolatilityStructure > const &)*arg1,(std::vector< Period > const &)*arg2,(std::vector< Period > const &)*arg3,(std::vector< double > const &)*arg4,(std::vector< std::vector< Handle< Quote > > > const &)*arg5,(SwapIndexPtr const &)*arg6,(SwapIndexPtr const &)*arg7,arg8,(std::vector< std::vector< Handle< Quote > > > const &)*arg9,(std::vector< bool > const &)*arg10,arg11,(boost::shared_ptr< EndCriteria > const &)*arg12,arg13,(boost::shared_ptr< OptimizationMethod > const &)*arg14);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SwaptionVolCube1Ptr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SwaptionVolCube1__SWIG_1) {
  {
    Handle< SwaptionVolatilityStructure > *arg1 = 0 ;
    std::vector< Period > *arg2 = 0 ;
    std::vector< Period > *arg3 = 0 ;
    std::vector< Spread > *arg4 = 0 ;
    std::vector< std::vector< Handle< Quote > > > *arg5 = 0 ;
    SwapIndexPtr *arg6 = 0 ;
    SwapIndexPtr *arg7 = 0 ;
    bool arg8 ;
    std::vector< std::vector< Handle< Quote > > > *arg9 = 0 ;
    std::vector< bool > *arg10 = 0 ;
    bool arg11 ;
    boost::shared_ptr< EndCriteria > *arg12 = 0 ;
    Real arg13 ;
    void *argp1 ;
    int res1 = 0 ;
    std::vector< Period > temp2 ;
    std::vector< Period > *v2 ;
    std::vector< Period > temp3 ;
    std::vector< Period > *v3 ;
    std::vector< double > temp4 ;
    std::vector< double > *v4 ;
    std::vector< std::vector< Handle< Quote > > > temp5 ;
    std::vector< std::vector< Handle< Quote > > > *v5 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    bool val8 ;
    int ecode8 = 0 ;
    std::vector< std::vector< Handle< Quote > > > temp9 ;
    std::vector< std::vector< Handle< Quote > > > *v9 ;
    std::vector< bool > temp10 ;
    std::vector< bool > *v10 ;
    bool val11 ;
    int ecode11 = 0 ;
    void *argp12 ;
    int res12 = 0 ;
    double val13 ;
    int ecode13 = 0 ;
    int argvi = 0;
    SwaptionVolCube1Ptr *result = 0 ;
    dXSARGS;
    
    if ((items < 13) || (items > 13)) {
      SWIG_croak("Usage: new_SwaptionVolCube1(atmVolStructure,optionTenors,swapTenors,strikeSpreads,volSpreads,swapIndexBase,shortSwapIndexBase,vegaWeightedSmileFit,parametersGuess,isParameterFixed,isAtmCalibrated,endCriteria,maxErrorTolerance);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_SwaptionVolatilityStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SwaptionVolCube1" "', argument " "1"" of type '" "Handle< SwaptionVolatilityStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionVolCube1" "', argument " "1"" of type '" "Handle< SwaptionVolatilityStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< SwaptionVolatilityStructure > * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_Period_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_SwaptionVolCube1. "
          "Expected an array of " "Period");
        SV **tv;
        I32 len = av_len(av) + 1;
        Period* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Period,0) != -1) {
            temp2.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_SwaptionVolCube1. "
              "Expected an array of " "Period");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_SwaptionVolCube1. "
          "Expected an array of " "Period");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_Period_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_SwaptionVolCube1. "
          "Expected an array of " "Period");
        SV **tv;
        I32 len = av_len(av) + 1;
        Period* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Period,0) != -1) {
            temp3.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_SwaptionVolCube1. "
              "Expected an array of " "Period");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_SwaptionVolCube1. "
          "Expected an array of " "Period");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of new_SwaptionVolCube1. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp4.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 4 of "
              "new_SwaptionVolCube1. "
              "Expected an array of ""double");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of new_SwaptionVolCube1. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(4),(void **) &v5, 
          SWIGTYPE_p_std__vectorT_std__vectorT_HandleT_Quote_t_t_t,1) != -1) {
        arg5 = v5;
      } else if (SvROK(ST(4))) {
        AV *av = (AV *)SvRV(ST(4));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 5 of new_SwaptionVolCube1. "
          "Expected an array of " "std::vector< Handle< Quote > >");
        SV **tv;
        I32 len = av_len(av) + 1;
        std::vector< Handle< Quote > >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,0) != -1) {
            temp5.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 5 of "
              "new_SwaptionVolCube1. "
              "Expected an array of " "std::vector< Handle< Quote > >");
          }
        }
        arg5 = &temp5;
      } else {
        SWIG_croak("Type error in argument 5 of new_SwaptionVolCube1. "
          "Expected an array of " "std::vector< Handle< Quote > >");
      }
    }
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_SwapIndexPtr,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_SwaptionVolCube1" "', argument " "6"" of type '" "SwapIndexPtr const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionVolCube1" "', argument " "6"" of type '" "SwapIndexPtr const &""'"); 
    }
    arg6 = reinterpret_cast< SwapIndexPtr * >(argp6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_SwapIndexPtr,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_SwaptionVolCube1" "', argument " "7"" of type '" "SwapIndexPtr const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionVolCube1" "', argument " "7"" of type '" "SwapIndexPtr const &""'"); 
    }
    arg7 = reinterpret_cast< SwapIndexPtr * >(argp7);
    ecode8 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_SwaptionVolCube1" "', argument " "8"" of type '" "bool""'");
    } 
    arg8 = static_cast< bool >(val8);
    {
      if (SWIG_ConvertPtr(ST(8),(void **) &v9, 
          SWIGTYPE_p_std__vectorT_std__vectorT_HandleT_Quote_t_t_t,1) != -1) {
        arg9 = v9;
      } else if (SvROK(ST(8))) {
        AV *av = (AV *)SvRV(ST(8));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 9 of new_SwaptionVolCube1. "
          "Expected an array of " "std::vector< Handle< Quote > >");
        SV **tv;
        I32 len = av_len(av) + 1;
        std::vector< Handle< Quote > >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,0) != -1) {
            temp9.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 9 of "
              "new_SwaptionVolCube1. "
              "Expected an array of " "std::vector< Handle< Quote > >");
          }
        }
        arg9 = &temp9;
      } else {
        SWIG_croak("Type error in argument 9 of new_SwaptionVolCube1. "
          "Expected an array of " "std::vector< Handle< Quote > >");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(9),(void **) &v10, 
          SWIGTYPE_p_std__vectorT_bool_t,1) != -1) {
        arg10 = v10;
      } else if (SvROK(ST(9))) {
        AV *av = (AV *)SvRV(ST(9));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 10 of new_SwaptionVolCube1. "
          "Expected an array of ""bool");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvIOK(*tv)) {
            temp10.push_back((bool)SvIVX(*tv));
          } else {
            SWIG_croak("Type error in argument 10 of "
              "new_SwaptionVolCube1. "
              "Expected an array of ""bool");
          }
        }
        arg10 = &temp10;
      } else {
        SWIG_croak("Type error in argument 10 of new_SwaptionVolCube1. "
          "Expected an array of ""bool");
      }
    }
    ecode11 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(10), &val11);
    if (!SWIG_IsOK(ecode11)) {
      SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "new_SwaptionVolCube1" "', argument " "11"" of type '" "bool""'");
    } 
    arg11 = static_cast< bool >(val11);
    res12 = SWIG_ConvertPtr(ST(11), &argp12, SWIGTYPE_p_boost__shared_ptrT_EndCriteria_t,  0 );
    if (!SWIG_IsOK(res12)) {
      SWIG_exception_fail(SWIG_ArgError(res12), "in method '" "new_SwaptionVolCube1" "', argument " "12"" of type '" "boost::shared_ptr< EndCriteria > const &""'"); 
    }
    if (!argp12) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionVolCube1" "', argument " "12"" of type '" "boost::shared_ptr< EndCriteria > const &""'"); 
    }
    arg12 = reinterpret_cast< boost::shared_ptr< EndCriteria > * >(argp12);
    ecode13 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(12), &val13);
    if (!SWIG_IsOK(ecode13)) {
      SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "new_SwaptionVolCube1" "', argument " "13"" of type '" "Real""'");
    } 
    arg13 = static_cast< Real >(val13);
    {
      try {
        result = (SwaptionVolCube1Ptr *)new_SwaptionVolCube1Ptr__SWIG_0((Handle< SwaptionVolatilityStructure > const &)*arg1,(std::vector< Period > const &)*arg2,(std::vector< Period > const &)*arg3,(std::vector< double > const &)*arg4,(std::vector< std::vector< Handle< Quote > > > const &)*arg5,(SwapIndexPtr const &)*arg6,(SwapIndexPtr const &)*arg7,arg8,(std::vector< std::vector< Handle< Quote > > > const &)*arg9,(std::vector< bool > const &)*arg10,arg11,(boost::shared_ptr< EndCriteria > const &)*arg12,arg13);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SwaptionVolCube1Ptr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SwaptionVolCube1__SWIG_2) {
  {
    Handle< SwaptionVolatilityStructure > *arg1 = 0 ;
    std::vector< Period > *arg2 = 0 ;
    std::vector< Period > *arg3 = 0 ;
    std::vector< Spread > *arg4 = 0 ;
    std::vector< std::vector< Handle< Quote > > > *arg5 = 0 ;
    SwapIndexPtr *arg6 = 0 ;
    SwapIndexPtr *arg7 = 0 ;
    bool arg8 ;
    std::vector< std::vector< Handle< Quote > > > *arg9 = 0 ;
    std::vector< bool > *arg10 = 0 ;
    bool arg11 ;
    boost::shared_ptr< EndCriteria > *arg12 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    std::vector< Period > temp2 ;
    std::vector< Period > *v2 ;
    std::vector< Period > temp3 ;
    std::vector< Period > *v3 ;
    std::vector< double > temp4 ;
    std::vector< double > *v4 ;
    std::vector< std::vector< Handle< Quote > > > temp5 ;
    std::vector< std::vector< Handle< Quote > > > *v5 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    bool val8 ;
    int ecode8 = 0 ;
    std::vector< std::vector< Handle< Quote > > > temp9 ;
    std::vector< std::vector< Handle< Quote > > > *v9 ;
    std::vector< bool > temp10 ;
    std::vector< bool > *v10 ;
    bool val11 ;
    int ecode11 = 0 ;
    void *argp12 ;
    int res12 = 0 ;
    int argvi = 0;
    SwaptionVolCube1Ptr *result = 0 ;
    dXSARGS;
    
    if ((items < 12) || (items > 12)) {
      SWIG_croak("Usage: new_SwaptionVolCube1(atmVolStructure,optionTenors,swapTenors,strikeSpreads,volSpreads,swapIndexBase,shortSwapIndexBase,vegaWeightedSmileFit,parametersGuess,isParameterFixed,isAtmCalibrated,endCriteria);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_SwaptionVolatilityStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SwaptionVolCube1" "', argument " "1"" of type '" "Handle< SwaptionVolatilityStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionVolCube1" "', argument " "1"" of type '" "Handle< SwaptionVolatilityStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< SwaptionVolatilityStructure > * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_Period_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_SwaptionVolCube1. "
          "Expected an array of " "Period");
        SV **tv;
        I32 len = av_len(av) + 1;
        Period* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Period,0) != -1) {
            temp2.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_SwaptionVolCube1. "
              "Expected an array of " "Period");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_SwaptionVolCube1. "
          "Expected an array of " "Period");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_Period_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_SwaptionVolCube1. "
          "Expected an array of " "Period");
        SV **tv;
        I32 len = av_len(av) + 1;
        Period* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Period,0) != -1) {
            temp3.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_SwaptionVolCube1. "
              "Expected an array of " "Period");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_SwaptionVolCube1. "
          "Expected an array of " "Period");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of new_SwaptionVolCube1. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp4.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 4 of "
              "new_SwaptionVolCube1. "
              "Expected an array of ""double");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of new_SwaptionVolCube1. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(4),(void **) &v5, 
          SWIGTYPE_p_std__vectorT_std__vectorT_HandleT_Quote_t_t_t,1) != -1) {
        arg5 = v5;
      } else if (SvROK(ST(4))) {
        AV *av = (AV *)SvRV(ST(4));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 5 of new_SwaptionVolCube1. "
          "Expected an array of " "std::vector< Handle< Quote > >");
        SV **tv;
        I32 len = av_len(av) + 1;
        std::vector< Handle< Quote > >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,0) != -1) {
            temp5.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 5 of "
              "new_SwaptionVolCube1. "
              "Expected an array of " "std::vector< Handle< Quote > >");
          }
        }
        arg5 = &temp5;
      } else {
        SWIG_croak("Type error in argument 5 of new_SwaptionVolCube1. "
          "Expected an array of " "std::vector< Handle< Quote > >");
      }
    }
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_SwapIndexPtr,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_SwaptionVolCube1" "', argument " "6"" of type '" "SwapIndexPtr const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionVolCube1" "', argument " "6"" of type '" "SwapIndexPtr const &""'"); 
    }
    arg6 = reinterpret_cast< SwapIndexPtr * >(argp6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_SwapIndexPtr,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_SwaptionVolCube1" "', argument " "7"" of type '" "SwapIndexPtr const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionVolCube1" "', argument " "7"" of type '" "SwapIndexPtr const &""'"); 
    }
    arg7 = reinterpret_cast< SwapIndexPtr * >(argp7);
    ecode8 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_SwaptionVolCube1" "', argument " "8"" of type '" "bool""'");
    } 
    arg8 = static_cast< bool >(val8);
    {
      if (SWIG_ConvertPtr(ST(8),(void **) &v9, 
          SWIGTYPE_p_std__vectorT_std__vectorT_HandleT_Quote_t_t_t,1) != -1) {
        arg9 = v9;
      } else if (SvROK(ST(8))) {
        AV *av = (AV *)SvRV(ST(8));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 9 of new_SwaptionVolCube1. "
          "Expected an array of " "std::vector< Handle< Quote > >");
        SV **tv;
        I32 len = av_len(av) + 1;
        std::vector< Handle< Quote > >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,0) != -1) {
            temp9.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 9 of "
              "new_SwaptionVolCube1. "
              "Expected an array of " "std::vector< Handle< Quote > >");
          }
        }
        arg9 = &temp9;
      } else {
        SWIG_croak("Type error in argument 9 of new_SwaptionVolCube1. "
          "Expected an array of " "std::vector< Handle< Quote > >");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(9),(void **) &v10, 
          SWIGTYPE_p_std__vectorT_bool_t,1) != -1) {
        arg10 = v10;
      } else if (SvROK(ST(9))) {
        AV *av = (AV *)SvRV(ST(9));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 10 of new_SwaptionVolCube1. "
          "Expected an array of ""bool");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvIOK(*tv)) {
            temp10.push_back((bool)SvIVX(*tv));
          } else {
            SWIG_croak("Type error in argument 10 of "
              "new_SwaptionVolCube1. "
              "Expected an array of ""bool");
          }
        }
        arg10 = &temp10;
      } else {
        SWIG_croak("Type error in argument 10 of new_SwaptionVolCube1. "
          "Expected an array of ""bool");
      }
    }
    ecode11 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(10), &val11);
    if (!SWIG_IsOK(ecode11)) {
      SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "new_SwaptionVolCube1" "', argument " "11"" of type '" "bool""'");
    } 
    arg11 = static_cast< bool >(val11);
    res12 = SWIG_ConvertPtr(ST(11), &argp12, SWIGTYPE_p_boost__shared_ptrT_EndCriteria_t,  0 );
    if (!SWIG_IsOK(res12)) {
      SWIG_exception_fail(SWIG_ArgError(res12), "in method '" "new_SwaptionVolCube1" "', argument " "12"" of type '" "boost::shared_ptr< EndCriteria > const &""'"); 
    }
    if (!argp12) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionVolCube1" "', argument " "12"" of type '" "boost::shared_ptr< EndCriteria > const &""'"); 
    }
    arg12 = reinterpret_cast< boost::shared_ptr< EndCriteria > * >(argp12);
    {
      try {
        result = (SwaptionVolCube1Ptr *)new_SwaptionVolCube1Ptr__SWIG_0((Handle< SwaptionVolatilityStructure > const &)*arg1,(std::vector< Period > const &)*arg2,(std::vector< Period > const &)*arg3,(std::vector< double > const &)*arg4,(std::vector< std::vector< Handle< Quote > > > const &)*arg5,(SwapIndexPtr const &)*arg6,(SwapIndexPtr const &)*arg7,arg8,(std::vector< std::vector< Handle< Quote > > > const &)*arg9,(std::vector< bool > const &)*arg10,arg11,(boost::shared_ptr< EndCriteria > const &)*arg12);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SwaptionVolCube1Ptr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SwaptionVolCube1__SWIG_3) {
  {
    Handle< SwaptionVolatilityStructure > *arg1 = 0 ;
    std::vector< Period > *arg2 = 0 ;
    std::vector< Period > *arg3 = 0 ;
    std::vector< Spread > *arg4 = 0 ;
    std::vector< std::vector< Handle< Quote > > > *arg5 = 0 ;
    SwapIndexPtr *arg6 = 0 ;
    SwapIndexPtr *arg7 = 0 ;
    bool arg8 ;
    std::vector< std::vector< Handle< Quote > > > *arg9 = 0 ;
    std::vector< bool > *arg10 = 0 ;
    bool arg11 ;
    void *argp1 ;
    int res1 = 0 ;
    std::vector< Period > temp2 ;
    std::vector< Period > *v2 ;
    std::vector< Period > temp3 ;
    std::vector< Period > *v3 ;
    std::vector< double > temp4 ;
    std::vector< double > *v4 ;
    std::vector< std::vector< Handle< Quote > > > temp5 ;
    std::vector< std::vector< Handle< Quote > > > *v5 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    bool val8 ;
    int ecode8 = 0 ;
    std::vector< std::vector< Handle< Quote > > > temp9 ;
    std::vector< std::vector< Handle< Quote > > > *v9 ;
    std::vector< bool > temp10 ;
    std::vector< bool > *v10 ;
    bool val11 ;
    int ecode11 = 0 ;
    int argvi = 0;
    SwaptionVolCube1Ptr *result = 0 ;
    dXSARGS;
    
    if ((items < 11) || (items > 11)) {
      SWIG_croak("Usage: new_SwaptionVolCube1(atmVolStructure,optionTenors,swapTenors,strikeSpreads,volSpreads,swapIndexBase,shortSwapIndexBase,vegaWeightedSmileFit,parametersGuess,isParameterFixed,isAtmCalibrated);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_SwaptionVolatilityStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SwaptionVolCube1" "', argument " "1"" of type '" "Handle< SwaptionVolatilityStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionVolCube1" "', argument " "1"" of type '" "Handle< SwaptionVolatilityStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< SwaptionVolatilityStructure > * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_Period_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_SwaptionVolCube1. "
          "Expected an array of " "Period");
        SV **tv;
        I32 len = av_len(av) + 1;
        Period* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Period,0) != -1) {
            temp2.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_SwaptionVolCube1. "
              "Expected an array of " "Period");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_SwaptionVolCube1. "
          "Expected an array of " "Period");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_Period_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_SwaptionVolCube1. "
          "Expected an array of " "Period");
        SV **tv;
        I32 len = av_len(av) + 1;
        Period* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Period,0) != -1) {
            temp3.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_SwaptionVolCube1. "
              "Expected an array of " "Period");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_SwaptionVolCube1. "
          "Expected an array of " "Period");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of new_SwaptionVolCube1. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp4.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 4 of "
              "new_SwaptionVolCube1. "
              "Expected an array of ""double");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of new_SwaptionVolCube1. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(4),(void **) &v5, 
          SWIGTYPE_p_std__vectorT_std__vectorT_HandleT_Quote_t_t_t,1) != -1) {
        arg5 = v5;
      } else if (SvROK(ST(4))) {
        AV *av = (AV *)SvRV(ST(4));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 5 of new_SwaptionVolCube1. "
          "Expected an array of " "std::vector< Handle< Quote > >");
        SV **tv;
        I32 len = av_len(av) + 1;
        std::vector< Handle< Quote > >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,0) != -1) {
            temp5.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 5 of "
              "new_SwaptionVolCube1. "
              "Expected an array of " "std::vector< Handle< Quote > >");
          }
        }
        arg5 = &temp5;
      } else {
        SWIG_croak("Type error in argument 5 of new_SwaptionVolCube1. "
          "Expected an array of " "std::vector< Handle< Quote > >");
      }
    }
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_SwapIndexPtr,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_SwaptionVolCube1" "', argument " "6"" of type '" "SwapIndexPtr const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionVolCube1" "', argument " "6"" of type '" "SwapIndexPtr const &""'"); 
    }
    arg6 = reinterpret_cast< SwapIndexPtr * >(argp6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_SwapIndexPtr,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_SwaptionVolCube1" "', argument " "7"" of type '" "SwapIndexPtr const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionVolCube1" "', argument " "7"" of type '" "SwapIndexPtr const &""'"); 
    }
    arg7 = reinterpret_cast< SwapIndexPtr * >(argp7);
    ecode8 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_SwaptionVolCube1" "', argument " "8"" of type '" "bool""'");
    } 
    arg8 = static_cast< bool >(val8);
    {
      if (SWIG_ConvertPtr(ST(8),(void **) &v9, 
          SWIGTYPE_p_std__vectorT_std__vectorT_HandleT_Quote_t_t_t,1) != -1) {
        arg9 = v9;
      } else if (SvROK(ST(8))) {
        AV *av = (AV *)SvRV(ST(8));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 9 of new_SwaptionVolCube1. "
          "Expected an array of " "std::vector< Handle< Quote > >");
        SV **tv;
        I32 len = av_len(av) + 1;
        std::vector< Handle< Quote > >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,0) != -1) {
            temp9.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 9 of "
              "new_SwaptionVolCube1. "
              "Expected an array of " "std::vector< Handle< Quote > >");
          }
        }
        arg9 = &temp9;
      } else {
        SWIG_croak("Type error in argument 9 of new_SwaptionVolCube1. "
          "Expected an array of " "std::vector< Handle< Quote > >");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(9),(void **) &v10, 
          SWIGTYPE_p_std__vectorT_bool_t,1) != -1) {
        arg10 = v10;
      } else if (SvROK(ST(9))) {
        AV *av = (AV *)SvRV(ST(9));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 10 of new_SwaptionVolCube1. "
          "Expected an array of ""bool");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvIOK(*tv)) {
            temp10.push_back((bool)SvIVX(*tv));
          } else {
            SWIG_croak("Type error in argument 10 of "
              "new_SwaptionVolCube1. "
              "Expected an array of ""bool");
          }
        }
        arg10 = &temp10;
      } else {
        SWIG_croak("Type error in argument 10 of new_SwaptionVolCube1. "
          "Expected an array of ""bool");
      }
    }
    ecode11 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(10), &val11);
    if (!SWIG_IsOK(ecode11)) {
      SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "new_SwaptionVolCube1" "', argument " "11"" of type '" "bool""'");
    } 
    arg11 = static_cast< bool >(val11);
    {
      try {
        result = (SwaptionVolCube1Ptr *)new_SwaptionVolCube1Ptr__SWIG_0((Handle< SwaptionVolatilityStructure > const &)*arg1,(std::vector< Period > const &)*arg2,(std::vector< Period > const &)*arg3,(std::vector< double > const &)*arg4,(std::vector< std::vector< Handle< Quote > > > const &)*arg5,(SwapIndexPtr const &)*arg6,(SwapIndexPtr const &)*arg7,arg8,(std::vector< std::vector< Handle< Quote > > > const &)*arg9,(std::vector< bool > const &)*arg10,arg11);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SwaptionVolCube1Ptr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SwaptionVolCube1) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 11) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_SwaptionVolatilityStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Period >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Period_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Period* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Period,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Period >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Period_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Period* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Period,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(3),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(3))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(3));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< std::vector< Handle< Quote > > >* v;
            if (SWIG_ConvertPtr(ST(4),(void **) &v, 
                SWIGTYPE_p_std__vectorT_std__vectorT_HandleT_Quote_t_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(4))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(4));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  std::vector< Handle< Quote > >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_SwapIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_SwapIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< std::vector< Handle< Quote > > >* v;
            if (SWIG_ConvertPtr(ST(8),(void **) &v, 
                SWIGTYPE_p_std__vectorT_std__vectorT_HandleT_Quote_t_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(8))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(8));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  std::vector< Handle< Quote > >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< bool >* v;
            if (SWIG_ConvertPtr(ST(9),(void **) &v, 
                SWIGTYPE_p_std__vectorT_bool_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(9))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(9));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(10), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 12) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_SwaptionVolatilityStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Period >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Period_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Period* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Period,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Period >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Period_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Period* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Period,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(3),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(3))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(3));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< std::vector< Handle< Quote > > >* v;
            if (SWIG_ConvertPtr(ST(4),(void **) &v, 
                SWIGTYPE_p_std__vectorT_std__vectorT_HandleT_Quote_t_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(4))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(4));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  std::vector< Handle< Quote > >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_SwapIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_SwapIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< std::vector< Handle< Quote > > >* v;
            if (SWIG_ConvertPtr(ST(8),(void **) &v, 
                SWIGTYPE_p_std__vectorT_std__vectorT_HandleT_Quote_t_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(8))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(8));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  std::vector< Handle< Quote > >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< bool >* v;
            if (SWIG_ConvertPtr(ST(9),(void **) &v, 
                SWIGTYPE_p_std__vectorT_bool_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(9))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(9));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(10), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(11), &vptr, SWIGTYPE_p_boost__shared_ptrT_EndCriteria_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 13) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_SwaptionVolatilityStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Period >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Period_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Period* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Period,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Period >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Period_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Period* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Period,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(3),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(3))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(3));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< std::vector< Handle< Quote > > >* v;
            if (SWIG_ConvertPtr(ST(4),(void **) &v, 
                SWIGTYPE_p_std__vectorT_std__vectorT_HandleT_Quote_t_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(4))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(4));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  std::vector< Handle< Quote > >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_SwapIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_SwapIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< std::vector< Handle< Quote > > >* v;
            if (SWIG_ConvertPtr(ST(8),(void **) &v, 
                SWIGTYPE_p_std__vectorT_std__vectorT_HandleT_Quote_t_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(8))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(8));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  std::vector< Handle< Quote > >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< bool >* v;
            if (SWIG_ConvertPtr(ST(9),(void **) &v, 
                SWIGTYPE_p_std__vectorT_bool_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(9))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(9));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(10), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(11), &vptr, SWIGTYPE_p_boost__shared_ptrT_EndCriteria_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(12), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 14) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_SwaptionVolatilityStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Period >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Period_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Period* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Period,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Period >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Period_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Period* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Period,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(3),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(3))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(3));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< std::vector< Handle< Quote > > >* v;
            if (SWIG_ConvertPtr(ST(4),(void **) &v, 
                SWIGTYPE_p_std__vectorT_std__vectorT_HandleT_Quote_t_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(4))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(4));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  std::vector< Handle< Quote > >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_SwapIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_SwapIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< std::vector< Handle< Quote > > >* v;
            if (SWIG_ConvertPtr(ST(8),(void **) &v, 
                SWIGTYPE_p_std__vectorT_std__vectorT_HandleT_Quote_t_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(8))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(8));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  std::vector< Handle< Quote > >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< bool >* v;
            if (SWIG_ConvertPtr(ST(9),(void **) &v, 
                SWIGTYPE_p_std__vectorT_bool_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(9))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(9));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(10), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(11), &vptr, SWIGTYPE_p_boost__shared_ptrT_EndCriteria_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(12), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(13), &vptr, SWIGTYPE_p_boost__shared_ptrT_OptimizationMethod_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SwaptionVolCube1__SWIG_3); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SwaptionVolCube1__SWIG_2); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SwaptionVolCube1__SWIG_1); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SwaptionVolCube1__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_SwaptionVolCube1'");
  XSRETURN(0);
}


XS(_wrap_SwaptionVolCube1_sparseSabrParameters) {
  {
    SwaptionVolCube1Ptr *arg1 = (SwaptionVolCube1Ptr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Matrix result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: SwaptionVolCube1_sparseSabrParameters(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SwaptionVolCube1Ptr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwaptionVolCube1_sparseSabrParameters" "', argument " "1"" of type '" "SwaptionVolCube1Ptr const *""'"); 
    }
    arg1 = reinterpret_cast< SwaptionVolCube1Ptr * >(argp1);
    {
      try {
        result = SwaptionVolCube1Ptr_sparseSabrParameters((SwaptionVolCube1Ptr const *)arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Matrix(static_cast< const Matrix& >(result))), SWIGTYPE_p_Matrix, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_SwaptionVolCube1_denseSabrParameters) {
  {
    SwaptionVolCube1Ptr *arg1 = (SwaptionVolCube1Ptr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Matrix result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: SwaptionVolCube1_denseSabrParameters(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SwaptionVolCube1Ptr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwaptionVolCube1_denseSabrParameters" "', argument " "1"" of type '" "SwaptionVolCube1Ptr const *""'"); 
    }
    arg1 = reinterpret_cast< SwaptionVolCube1Ptr * >(argp1);
    {
      try {
        result = SwaptionVolCube1Ptr_denseSabrParameters((SwaptionVolCube1Ptr const *)arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Matrix(static_cast< const Matrix& >(result))), SWIGTYPE_p_Matrix, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_SwaptionVolCube1_marketVolCube) {
  {
    SwaptionVolCube1Ptr *arg1 = (SwaptionVolCube1Ptr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Matrix result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: SwaptionVolCube1_marketVolCube(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SwaptionVolCube1Ptr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwaptionVolCube1_marketVolCube" "', argument " "1"" of type '" "SwaptionVolCube1Ptr const *""'"); 
    }
    arg1 = reinterpret_cast< SwaptionVolCube1Ptr * >(argp1);
    {
      try {
        result = SwaptionVolCube1Ptr_marketVolCube((SwaptionVolCube1Ptr const *)arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Matrix(static_cast< const Matrix& >(result))), SWIGTYPE_p_Matrix, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_SwaptionVolCube1_volCubeAtmCalibrated) {
  {
    SwaptionVolCube1Ptr *arg1 = (SwaptionVolCube1Ptr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Matrix result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: SwaptionVolCube1_volCubeAtmCalibrated(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SwaptionVolCube1Ptr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwaptionVolCube1_volCubeAtmCalibrated" "', argument " "1"" of type '" "SwaptionVolCube1Ptr const *""'"); 
    }
    arg1 = reinterpret_cast< SwaptionVolCube1Ptr * >(argp1);
    {
      try {
        result = SwaptionVolCube1Ptr_volCubeAtmCalibrated((SwaptionVolCube1Ptr const *)arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Matrix(static_cast< const Matrix& >(result))), SWIGTYPE_p_Matrix, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_SwaptionVolCube1) {
  {
    SwaptionVolCube1Ptr *arg1 = (SwaptionVolCube1Ptr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_SwaptionVolCube1(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SwaptionVolCube1Ptr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SwaptionVolCube1" "', argument " "1"" of type '" "SwaptionVolCube1Ptr *""'"); 
    }
    arg1 = reinterpret_cast< SwaptionVolCube1Ptr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SwaptionVolCube2) {
  {
    Handle< SwaptionVolatilityStructure > *arg1 = 0 ;
    std::vector< Period > *arg2 = 0 ;
    std::vector< Period > *arg3 = 0 ;
    std::vector< Spread > *arg4 = 0 ;
    std::vector< std::vector< Handle< Quote > > > *arg5 = 0 ;
    SwapIndexPtr *arg6 = 0 ;
    SwapIndexPtr *arg7 = 0 ;
    bool arg8 ;
    void *argp1 ;
    int res1 = 0 ;
    std::vector< Period > temp2 ;
    std::vector< Period > *v2 ;
    std::vector< Period > temp3 ;
    std::vector< Period > *v3 ;
    std::vector< double > temp4 ;
    std::vector< double > *v4 ;
    std::vector< std::vector< Handle< Quote > > > temp5 ;
    std::vector< std::vector< Handle< Quote > > > *v5 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    bool val8 ;
    int ecode8 = 0 ;
    int argvi = 0;
    SwaptionVolCube2Ptr *result = 0 ;
    dXSARGS;
    
    if ((items < 8) || (items > 8)) {
      SWIG_croak("Usage: new_SwaptionVolCube2(atmVolStructure,optionTenors,swapTenors,strikeSpreads,volSpreads,swapIndexBase,shortSwapIndexBase,vegaWeightedSmileFit);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_SwaptionVolatilityStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SwaptionVolCube2" "', argument " "1"" of type '" "Handle< SwaptionVolatilityStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionVolCube2" "', argument " "1"" of type '" "Handle< SwaptionVolatilityStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< SwaptionVolatilityStructure > * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_Period_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_SwaptionVolCube2. "
          "Expected an array of " "Period");
        SV **tv;
        I32 len = av_len(av) + 1;
        Period* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Period,0) != -1) {
            temp2.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_SwaptionVolCube2. "
              "Expected an array of " "Period");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_SwaptionVolCube2. "
          "Expected an array of " "Period");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_Period_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_SwaptionVolCube2. "
          "Expected an array of " "Period");
        SV **tv;
        I32 len = av_len(av) + 1;
        Period* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Period,0) != -1) {
            temp3.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_SwaptionVolCube2. "
              "Expected an array of " "Period");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_SwaptionVolCube2. "
          "Expected an array of " "Period");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of new_SwaptionVolCube2. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp4.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 4 of "
              "new_SwaptionVolCube2. "
              "Expected an array of ""double");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of new_SwaptionVolCube2. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(4),(void **) &v5, 
          SWIGTYPE_p_std__vectorT_std__vectorT_HandleT_Quote_t_t_t,1) != -1) {
        arg5 = v5;
      } else if (SvROK(ST(4))) {
        AV *av = (AV *)SvRV(ST(4));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 5 of new_SwaptionVolCube2. "
          "Expected an array of " "std::vector< Handle< Quote > >");
        SV **tv;
        I32 len = av_len(av) + 1;
        std::vector< Handle< Quote > >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,0) != -1) {
            temp5.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 5 of "
              "new_SwaptionVolCube2. "
              "Expected an array of " "std::vector< Handle< Quote > >");
          }
        }
        arg5 = &temp5;
      } else {
        SWIG_croak("Type error in argument 5 of new_SwaptionVolCube2. "
          "Expected an array of " "std::vector< Handle< Quote > >");
      }
    }
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_SwapIndexPtr,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_SwaptionVolCube2" "', argument " "6"" of type '" "SwapIndexPtr const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionVolCube2" "', argument " "6"" of type '" "SwapIndexPtr const &""'"); 
    }
    arg6 = reinterpret_cast< SwapIndexPtr * >(argp6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_SwapIndexPtr,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_SwaptionVolCube2" "', argument " "7"" of type '" "SwapIndexPtr const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionVolCube2" "', argument " "7"" of type '" "SwapIndexPtr const &""'"); 
    }
    arg7 = reinterpret_cast< SwapIndexPtr * >(argp7);
    ecode8 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_SwaptionVolCube2" "', argument " "8"" of type '" "bool""'");
    } 
    arg8 = static_cast< bool >(val8);
    {
      try {
        result = (SwaptionVolCube2Ptr *)new_SwaptionVolCube2Ptr((Handle< SwaptionVolatilityStructure > const &)*arg1,(std::vector< Period > const &)*arg2,(std::vector< Period > const &)*arg3,(std::vector< double > const &)*arg4,(std::vector< std::vector< Handle< Quote > > > const &)*arg5,(SwapIndexPtr const &)*arg6,(SwapIndexPtr const &)*arg7,arg8);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SwaptionVolCube2Ptr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_SwaptionVolCube2) {
  {
    SwaptionVolCube2Ptr *arg1 = (SwaptionVolCube2Ptr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_SwaptionVolCube2(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SwaptionVolCube2Ptr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SwaptionVolCube2" "', argument " "1"" of type '" "SwaptionVolCube2Ptr *""'"); 
    }
    arg1 = reinterpret_cast< SwaptionVolCube2Ptr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_StochasticProcess___deref__) {
  {
    boost::shared_ptr< StochasticProcess > *arg1 = (boost::shared_ptr< StochasticProcess > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    StochasticProcess *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: StochasticProcess___deref__(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_StochasticProcess_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StochasticProcess___deref__" "', argument " "1"" of type '" "boost::shared_ptr< StochasticProcess > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< StochasticProcess > * >(argp1);
    {
      try {
        result = (StochasticProcess *)(arg1)->operator ->();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_StochasticProcess, 0 | 0); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_StochasticProcess_isNull) {
  {
    boost::shared_ptr< StochasticProcess > *arg1 = (boost::shared_ptr< StochasticProcess > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: StochasticProcess_isNull(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_StochasticProcess_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StochasticProcess_isNull" "', argument " "1"" of type '" "boost::shared_ptr< StochasticProcess > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< StochasticProcess > * >(argp1);
    {
      try {
        result = (bool)boost_shared_ptr_Sl_StochasticProcess_Sg__isNull(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_StochasticProcess_asObservable) {
  {
    boost::shared_ptr< StochasticProcess > *arg1 = (boost::shared_ptr< StochasticProcess > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    boost::shared_ptr< Observable > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: StochasticProcess_asObservable(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_StochasticProcess_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StochasticProcess_asObservable" "', argument " "1"" of type '" "boost::shared_ptr< StochasticProcess > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< StochasticProcess > * >(argp1);
    {
      try {
        result = boost_shared_ptr_Sl_StochasticProcess_Sg__asObservable(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new boost::shared_ptr< Observable >(static_cast< const boost::shared_ptr< Observable >& >(result))), SWIGTYPE_p_boost__shared_ptrT_Observable_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_StochasticProcess) {
  {
    int argvi = 0;
    boost::shared_ptr< StochasticProcess > *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_StochasticProcess();");
    }
    {
      try {
        result = (boost::shared_ptr< StochasticProcess > *)new boost::shared_ptr< StochasticProcess >();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_boost__shared_ptrT_StochasticProcess_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_StochasticProcess) {
  {
    boost::shared_ptr< StochasticProcess > *arg1 = (boost::shared_ptr< StochasticProcess > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_StochasticProcess(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_StochasticProcess_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_StochasticProcess" "', argument " "1"" of type '" "boost::shared_ptr< StochasticProcess > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< StochasticProcess > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_StochasticProcess_size) {
  {
    boost::shared_ptr< StochasticProcess > *arg1 = (boost::shared_ptr< StochasticProcess > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Size result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: StochasticProcess_size(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_StochasticProcess_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StochasticProcess_size" "', argument " "1"" of type '" "boost::shared_ptr< StochasticProcess > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< StochasticProcess > * >(argp1);
    {
      try {
        result = (*arg1)->size();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_size_t  SWIG_PERL_CALL_ARGS_1(static_cast< size_t >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_StochasticProcess_factors) {
  {
    boost::shared_ptr< StochasticProcess > *arg1 = (boost::shared_ptr< StochasticProcess > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Size result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: StochasticProcess_factors(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_StochasticProcess_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StochasticProcess_factors" "', argument " "1"" of type '" "boost::shared_ptr< StochasticProcess > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< StochasticProcess > * >(argp1);
    {
      try {
        result = (*arg1)->factors();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_size_t  SWIG_PERL_CALL_ARGS_1(static_cast< size_t >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_StochasticProcess_initialValues) {
  {
    boost::shared_ptr< StochasticProcess > *arg1 = (boost::shared_ptr< StochasticProcess > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Array result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: StochasticProcess_initialValues(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_StochasticProcess_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StochasticProcess_initialValues" "', argument " "1"" of type '" "boost::shared_ptr< StochasticProcess > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< StochasticProcess > * >(argp1);
    {
      try {
        result = (*arg1)->initialValues();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Array(static_cast< const Array& >(result))), SWIGTYPE_p_Array, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_StochasticProcess_drift) {
  {
    boost::shared_ptr< StochasticProcess > *arg1 = (boost::shared_ptr< StochasticProcess > *) 0 ;
    Time arg2 ;
    Array *arg3 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    Array result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: StochasticProcess_drift(self,t,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_StochasticProcess_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StochasticProcess_drift" "', argument " "1"" of type '" "boost::shared_ptr< StochasticProcess > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< StochasticProcess > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StochasticProcess_drift" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "StochasticProcess_drift" "', argument " "3"" of type '" "Array const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StochasticProcess_drift" "', argument " "3"" of type '" "Array const &""'"); 
    }
    arg3 = reinterpret_cast< Array * >(argp3);
    {
      try {
        result = (*arg1)->drift(arg2,(Array const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Array(static_cast< const Array& >(result))), SWIGTYPE_p_Array, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_StochasticProcess_diffusion) {
  {
    boost::shared_ptr< StochasticProcess > *arg1 = (boost::shared_ptr< StochasticProcess > *) 0 ;
    Time arg2 ;
    Array *arg3 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    Matrix result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: StochasticProcess_diffusion(self,t,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_StochasticProcess_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StochasticProcess_diffusion" "', argument " "1"" of type '" "boost::shared_ptr< StochasticProcess > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< StochasticProcess > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StochasticProcess_diffusion" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "StochasticProcess_diffusion" "', argument " "3"" of type '" "Array const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StochasticProcess_diffusion" "', argument " "3"" of type '" "Array const &""'"); 
    }
    arg3 = reinterpret_cast< Array * >(argp3);
    {
      try {
        result = (*arg1)->diffusion(arg2,(Array const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Matrix(static_cast< const Matrix& >(result))), SWIGTYPE_p_Matrix, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_StochasticProcess_expectation) {
  {
    boost::shared_ptr< StochasticProcess > *arg1 = (boost::shared_ptr< StochasticProcess > *) 0 ;
    Time arg2 ;
    Array *arg3 = 0 ;
    Time arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Array result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: StochasticProcess_expectation(self,t0,x0,dt);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_StochasticProcess_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StochasticProcess_expectation" "', argument " "1"" of type '" "boost::shared_ptr< StochasticProcess > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< StochasticProcess > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StochasticProcess_expectation" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "StochasticProcess_expectation" "', argument " "3"" of type '" "Array const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StochasticProcess_expectation" "', argument " "3"" of type '" "Array const &""'"); 
    }
    arg3 = reinterpret_cast< Array * >(argp3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "StochasticProcess_expectation" "', argument " "4"" of type '" "Time""'");
    } 
    arg4 = static_cast< Time >(val4);
    {
      try {
        result = (*arg1)->expectation(arg2,(Array const &)*arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Array(static_cast< const Array& >(result))), SWIGTYPE_p_Array, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_StochasticProcess_stdDeviation) {
  {
    boost::shared_ptr< StochasticProcess > *arg1 = (boost::shared_ptr< StochasticProcess > *) 0 ;
    Time arg2 ;
    Array *arg3 = 0 ;
    Time arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Matrix result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: StochasticProcess_stdDeviation(self,t0,x0,dt);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_StochasticProcess_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StochasticProcess_stdDeviation" "', argument " "1"" of type '" "boost::shared_ptr< StochasticProcess > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< StochasticProcess > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StochasticProcess_stdDeviation" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "StochasticProcess_stdDeviation" "', argument " "3"" of type '" "Array const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StochasticProcess_stdDeviation" "', argument " "3"" of type '" "Array const &""'"); 
    }
    arg3 = reinterpret_cast< Array * >(argp3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "StochasticProcess_stdDeviation" "', argument " "4"" of type '" "Time""'");
    } 
    arg4 = static_cast< Time >(val4);
    {
      try {
        result = (*arg1)->stdDeviation(arg2,(Array const &)*arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Matrix(static_cast< const Matrix& >(result))), SWIGTYPE_p_Matrix, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_StochasticProcess_covariance) {
  {
    boost::shared_ptr< StochasticProcess > *arg1 = (boost::shared_ptr< StochasticProcess > *) 0 ;
    Time arg2 ;
    Array *arg3 = 0 ;
    Time arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Matrix result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: StochasticProcess_covariance(self,t0,x0,dt);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_StochasticProcess_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StochasticProcess_covariance" "', argument " "1"" of type '" "boost::shared_ptr< StochasticProcess > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< StochasticProcess > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StochasticProcess_covariance" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "StochasticProcess_covariance" "', argument " "3"" of type '" "Array const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StochasticProcess_covariance" "', argument " "3"" of type '" "Array const &""'"); 
    }
    arg3 = reinterpret_cast< Array * >(argp3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "StochasticProcess_covariance" "', argument " "4"" of type '" "Time""'");
    } 
    arg4 = static_cast< Time >(val4);
    {
      try {
        result = (*arg1)->covariance(arg2,(Array const &)*arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Matrix(static_cast< const Matrix& >(result))), SWIGTYPE_p_Matrix, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_StochasticProcess_evolve) {
  {
    boost::shared_ptr< StochasticProcess > *arg1 = (boost::shared_ptr< StochasticProcess > *) 0 ;
    Time arg2 ;
    Array *arg3 = 0 ;
    Time arg4 ;
    Array *arg5 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int argvi = 0;
    Array result;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: StochasticProcess_evolve(self,t0,x0,dt,dw);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_StochasticProcess_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StochasticProcess_evolve" "', argument " "1"" of type '" "boost::shared_ptr< StochasticProcess > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< StochasticProcess > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StochasticProcess_evolve" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "StochasticProcess_evolve" "', argument " "3"" of type '" "Array const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StochasticProcess_evolve" "', argument " "3"" of type '" "Array const &""'"); 
    }
    arg3 = reinterpret_cast< Array * >(argp3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "StochasticProcess_evolve" "', argument " "4"" of type '" "Time""'");
    } 
    arg4 = static_cast< Time >(val4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "StochasticProcess_evolve" "', argument " "5"" of type '" "Array const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StochasticProcess_evolve" "', argument " "5"" of type '" "Array const &""'"); 
    }
    arg5 = reinterpret_cast< Array * >(argp5);
    {
      try {
        result = (*arg1)->evolve(arg2,(Array const &)*arg3,arg4,(Array const &)*arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Array(static_cast< const Array& >(result))), SWIGTYPE_p_Array, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_StochasticProcessVector__SWIG_0) {
  {
    unsigned int arg1 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    std::vector< boost::shared_ptr< StochasticProcess > > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_StochasticProcessVector(size);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_StochasticProcessVector" "', argument " "1"" of type '" "unsigned int""'");
    } 
    arg1 = static_cast< unsigned int >(val1);
    {
      try {
        result = (std::vector< boost::shared_ptr< StochasticProcess > > *)new std::vector< boost::shared_ptr< StochasticProcess > >(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_boost__shared_ptrT_StochasticProcess_t_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_StochasticProcessVector__SWIG_1) {
  {
    int argvi = 0;
    std::vector< boost::shared_ptr< StochasticProcess > > *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_StochasticProcessVector();");
    }
    {
      try {
        result = (std::vector< boost::shared_ptr< StochasticProcess > > *)new std::vector< boost::shared_ptr< StochasticProcess > >();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_boost__shared_ptrT_StochasticProcess_t_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_StochasticProcessVector__SWIG_2) {
  {
    unsigned int arg1 ;
    boost::shared_ptr< StochasticProcess > *arg2 = 0 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    std::vector< boost::shared_ptr< StochasticProcess > > *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_StochasticProcessVector(size,value);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_StochasticProcessVector" "', argument " "1"" of type '" "unsigned int""'");
    } 
    arg1 = static_cast< unsigned int >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_boost__shared_ptrT_StochasticProcess_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_StochasticProcessVector" "', argument " "2"" of type '" "boost::shared_ptr< StochasticProcess > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_StochasticProcessVector" "', argument " "2"" of type '" "boost::shared_ptr< StochasticProcess > const &""'"); 
    }
    arg2 = reinterpret_cast< boost::shared_ptr< StochasticProcess > * >(argp2);
    {
      try {
        result = (std::vector< boost::shared_ptr< StochasticProcess > > *)new std::vector< boost::shared_ptr< StochasticProcess > >(arg1,(boost::shared_ptr< StochasticProcess > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_boost__shared_ptrT_StochasticProcess_t_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_StochasticProcessVector__SWIG_3) {
  {
    std::vector< boost::shared_ptr< StochasticProcess > > *arg1 = 0 ;
    std::vector< boost::shared_ptr< StochasticProcess > > temp1 ;
    std::vector< boost::shared_ptr< StochasticProcess > > *v1 ;
    int argvi = 0;
    std::vector< boost::shared_ptr< StochasticProcess > > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_StochasticProcessVector(std::vector< boost::shared_ptr< StochasticProcess > > const &);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_StochasticProcess_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_StochasticProcessVector. "
          "Expected an array of " "boost::shared_ptr< StochasticProcess >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< StochasticProcess >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_StochasticProcess_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_StochasticProcessVector. "
              "Expected an array of " "boost::shared_ptr< StochasticProcess >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_StochasticProcessVector. "
          "Expected an array of " "boost::shared_ptr< StochasticProcess >");
      }
    }
    {
      try {
        result = (std::vector< boost::shared_ptr< StochasticProcess > > *)new std::vector< boost::shared_ptr< StochasticProcess > >((std::vector< boost::shared_ptr< StochasticProcess > > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_boost__shared_ptrT_StochasticProcess_t_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_StochasticProcessVector) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< StochasticProcess > >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_StochasticProcess_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< StochasticProcess >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_StochasticProcess_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_boost__shared_ptrT_StochasticProcess_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_StochasticProcessVector__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_StochasticProcessVector__SWIG_0); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_StochasticProcessVector__SWIG_3); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_StochasticProcessVector__SWIG_2); return;
    }
  }
  
  croak("No matching function for overloaded 'new_StochasticProcessVector'");
  XSRETURN(0);
}


XS(_wrap_StochasticProcessVector_size) {
  {
    std::vector< boost::shared_ptr< StochasticProcess > > *arg1 = (std::vector< boost::shared_ptr< StochasticProcess > > *) 0 ;
    std::vector< boost::shared_ptr< StochasticProcess > > temp1 ;
    std::vector< boost::shared_ptr< StochasticProcess > > *v1 ;
    int argvi = 0;
    unsigned int result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: StochasticProcessVector_size(self);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_StochasticProcess_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of StochasticProcessVector_size. "
          "Expected an array of " "boost::shared_ptr< StochasticProcess >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< StochasticProcess >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_StochasticProcess_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "StochasticProcessVector_size. "
              "Expected an array of " "boost::shared_ptr< StochasticProcess >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of StochasticProcessVector_size. "
          "Expected an array of " "boost::shared_ptr< StochasticProcess >");
      }
    }
    {
      try {
        result = (unsigned int)((std::vector< boost::shared_ptr< StochasticProcess > > const *)arg1)->size();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_StochasticProcessVector_empty) {
  {
    std::vector< boost::shared_ptr< StochasticProcess > > *arg1 = (std::vector< boost::shared_ptr< StochasticProcess > > *) 0 ;
    std::vector< boost::shared_ptr< StochasticProcess > > temp1 ;
    std::vector< boost::shared_ptr< StochasticProcess > > *v1 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: StochasticProcessVector_empty(self);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_StochasticProcess_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of StochasticProcessVector_empty. "
          "Expected an array of " "boost::shared_ptr< StochasticProcess >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< StochasticProcess >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_StochasticProcess_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "StochasticProcessVector_empty. "
              "Expected an array of " "boost::shared_ptr< StochasticProcess >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of StochasticProcessVector_empty. "
          "Expected an array of " "boost::shared_ptr< StochasticProcess >");
      }
    }
    {
      try {
        result = (bool)((std::vector< boost::shared_ptr< StochasticProcess > > const *)arg1)->empty();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_StochasticProcessVector_clear) {
  {
    std::vector< boost::shared_ptr< StochasticProcess > > *arg1 = (std::vector< boost::shared_ptr< StochasticProcess > > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: StochasticProcessVector_clear(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_boost__shared_ptrT_StochasticProcess_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StochasticProcessVector_clear" "', argument " "1"" of type '" "std::vector< boost::shared_ptr< StochasticProcess > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< boost::shared_ptr< StochasticProcess > > * >(argp1);
    {
      try {
        (arg1)->clear();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_StochasticProcessVector_push) {
  {
    std::vector< boost::shared_ptr< StochasticProcess > > *arg1 = (std::vector< boost::shared_ptr< StochasticProcess > > *) 0 ;
    boost::shared_ptr< StochasticProcess > *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: StochasticProcessVector_push(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_boost__shared_ptrT_StochasticProcess_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StochasticProcessVector_push" "', argument " "1"" of type '" "std::vector< boost::shared_ptr< StochasticProcess > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< boost::shared_ptr< StochasticProcess > > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_boost__shared_ptrT_StochasticProcess_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StochasticProcessVector_push" "', argument " "2"" of type '" "boost::shared_ptr< StochasticProcess > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StochasticProcessVector_push" "', argument " "2"" of type '" "boost::shared_ptr< StochasticProcess > const &""'"); 
    }
    arg2 = reinterpret_cast< boost::shared_ptr< StochasticProcess > * >(argp2);
    {
      try {
        (arg1)->push_back((boost::shared_ptr< StochasticProcess > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_StochasticProcessVector_pop) {
  {
    std::vector< boost::shared_ptr< StochasticProcess > > *arg1 = (std::vector< boost::shared_ptr< StochasticProcess > > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    boost::shared_ptr< StochasticProcess > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: StochasticProcessVector_pop(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_boost__shared_ptrT_StochasticProcess_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StochasticProcessVector_pop" "', argument " "1"" of type '" "std::vector< boost::shared_ptr< StochasticProcess > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< boost::shared_ptr< StochasticProcess > > * >(argp1);
    {
      try {
        try {
          result = std_vector_Sl_boost_shared_ptr_Sl_StochasticProcess_Sg__Sg__pop(arg1);
        }
        catch(std::out_of_range &_e) {
          sv_setsv(get_sv("@", GV_ADD), SWIG_NewPointerObj((new std::out_of_range(static_cast< const std::out_of_range& >(_e))),SWIGTYPE_p_std__out_of_range,SWIG_POINTER_OWN)); SWIG_fail ;
        }
        
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new boost::shared_ptr< StochasticProcess >(static_cast< const boost::shared_ptr< StochasticProcess >& >(result))), SWIGTYPE_p_boost__shared_ptrT_StochasticProcess_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_StochasticProcessVector_get) {
  {
    std::vector< boost::shared_ptr< StochasticProcess > > *arg1 = (std::vector< boost::shared_ptr< StochasticProcess > > *) 0 ;
    int arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    boost::shared_ptr< StochasticProcess > *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: StochasticProcessVector_get(self,i);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_boost__shared_ptrT_StochasticProcess_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StochasticProcessVector_get" "', argument " "1"" of type '" "std::vector< boost::shared_ptr< StochasticProcess > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< boost::shared_ptr< StochasticProcess > > * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StochasticProcessVector_get" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    {
      try {
        try {
          result = (boost::shared_ptr< StochasticProcess > *) &std_vector_Sl_boost_shared_ptr_Sl_StochasticProcess_Sg__Sg__get(arg1,arg2);
        }
        catch(std::out_of_range &_e) {
          sv_setsv(get_sv("@", GV_ADD), SWIG_NewPointerObj((new std::out_of_range(static_cast< const std::out_of_range& >(_e))),SWIGTYPE_p_std__out_of_range,SWIG_POINTER_OWN)); SWIG_fail ;
        }
        
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_boost__shared_ptrT_StochasticProcess_t, 0 | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_StochasticProcessVector_set) {
  {
    std::vector< boost::shared_ptr< StochasticProcess > > *arg1 = (std::vector< boost::shared_ptr< StochasticProcess > > *) 0 ;
    int arg2 ;
    boost::shared_ptr< StochasticProcess > *arg3 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: StochasticProcessVector_set(self,i,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_boost__shared_ptrT_StochasticProcess_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StochasticProcessVector_set" "', argument " "1"" of type '" "std::vector< boost::shared_ptr< StochasticProcess > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< boost::shared_ptr< StochasticProcess > > * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StochasticProcessVector_set" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_boost__shared_ptrT_StochasticProcess_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "StochasticProcessVector_set" "', argument " "3"" of type '" "boost::shared_ptr< StochasticProcess > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StochasticProcessVector_set" "', argument " "3"" of type '" "boost::shared_ptr< StochasticProcess > const &""'"); 
    }
    arg3 = reinterpret_cast< boost::shared_ptr< StochasticProcess > * >(argp3);
    {
      try {
        try {
          std_vector_Sl_boost_shared_ptr_Sl_StochasticProcess_Sg__Sg__set(arg1,arg2,(boost::shared_ptr< StochasticProcess > const &)*arg3);
        }
        catch(std::out_of_range &_e) {
          sv_setsv(get_sv("@", GV_ADD), SWIG_NewPointerObj((new std::out_of_range(static_cast< const std::out_of_range& >(_e))),SWIGTYPE_p_std__out_of_range,SWIG_POINTER_OWN)); SWIG_fail ;
        }
        
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_StochasticProcessVector) {
  {
    std::vector< boost::shared_ptr< StochasticProcess > > *arg1 = (std::vector< boost::shared_ptr< StochasticProcess > > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_StochasticProcessVector(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_boost__shared_ptrT_StochasticProcess_t_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_StochasticProcessVector" "', argument " "1"" of type '" "std::vector< boost::shared_ptr< StochasticProcess > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< boost::shared_ptr< StochasticProcess > > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_StochasticProcess1D_x0) {
  {
    StochasticProcess1DPtr *arg1 = (StochasticProcess1DPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: StochasticProcess1D_x0(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_StochasticProcess1DPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StochasticProcess1D_x0" "', argument " "1"" of type '" "StochasticProcess1DPtr *""'"); 
    }
    arg1 = reinterpret_cast< StochasticProcess1DPtr * >(argp1);
    {
      try {
        result = (Real)StochasticProcess1DPtr_x0(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_StochasticProcess1D_drift) {
  {
    StochasticProcess1DPtr *arg1 = (StochasticProcess1DPtr *) 0 ;
    Time arg2 ;
    Real arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: StochasticProcess1D_drift(self,t,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_StochasticProcess1DPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StochasticProcess1D_drift" "', argument " "1"" of type '" "StochasticProcess1DPtr *""'"); 
    }
    arg1 = reinterpret_cast< StochasticProcess1DPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StochasticProcess1D_drift" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "StochasticProcess1D_drift" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    {
      try {
        result = (Real)StochasticProcess1DPtr_drift(arg1,arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_StochasticProcess1D_diffusion) {
  {
    StochasticProcess1DPtr *arg1 = (StochasticProcess1DPtr *) 0 ;
    Time arg2 ;
    Real arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: StochasticProcess1D_diffusion(self,t,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_StochasticProcess1DPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StochasticProcess1D_diffusion" "', argument " "1"" of type '" "StochasticProcess1DPtr *""'"); 
    }
    arg1 = reinterpret_cast< StochasticProcess1DPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StochasticProcess1D_diffusion" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "StochasticProcess1D_diffusion" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    {
      try {
        result = (Real)StochasticProcess1DPtr_diffusion(arg1,arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_StochasticProcess1D_expectation) {
  {
    StochasticProcess1DPtr *arg1 = (StochasticProcess1DPtr *) 0 ;
    Time arg2 ;
    Real arg3 ;
    Time arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: StochasticProcess1D_expectation(self,t0,x0,dt);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_StochasticProcess1DPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StochasticProcess1D_expectation" "', argument " "1"" of type '" "StochasticProcess1DPtr *""'"); 
    }
    arg1 = reinterpret_cast< StochasticProcess1DPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StochasticProcess1D_expectation" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "StochasticProcess1D_expectation" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "StochasticProcess1D_expectation" "', argument " "4"" of type '" "Time""'");
    } 
    arg4 = static_cast< Time >(val4);
    {
      try {
        result = (Real)StochasticProcess1DPtr_expectation(arg1,arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_StochasticProcess1D_stdDeviation) {
  {
    StochasticProcess1DPtr *arg1 = (StochasticProcess1DPtr *) 0 ;
    Time arg2 ;
    Real arg3 ;
    Time arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: StochasticProcess1D_stdDeviation(self,t0,x0,dt);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_StochasticProcess1DPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StochasticProcess1D_stdDeviation" "', argument " "1"" of type '" "StochasticProcess1DPtr *""'"); 
    }
    arg1 = reinterpret_cast< StochasticProcess1DPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StochasticProcess1D_stdDeviation" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "StochasticProcess1D_stdDeviation" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "StochasticProcess1D_stdDeviation" "', argument " "4"" of type '" "Time""'");
    } 
    arg4 = static_cast< Time >(val4);
    {
      try {
        result = (Real)StochasticProcess1DPtr_stdDeviation(arg1,arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_StochasticProcess1D_variance) {
  {
    StochasticProcess1DPtr *arg1 = (StochasticProcess1DPtr *) 0 ;
    Time arg2 ;
    Real arg3 ;
    Time arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: StochasticProcess1D_variance(self,t0,x0,dt);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_StochasticProcess1DPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StochasticProcess1D_variance" "', argument " "1"" of type '" "StochasticProcess1DPtr *""'"); 
    }
    arg1 = reinterpret_cast< StochasticProcess1DPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StochasticProcess1D_variance" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "StochasticProcess1D_variance" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "StochasticProcess1D_variance" "', argument " "4"" of type '" "Time""'");
    } 
    arg4 = static_cast< Time >(val4);
    {
      try {
        result = (Real)StochasticProcess1DPtr_variance(arg1,arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_StochasticProcess1D_evolve) {
  {
    StochasticProcess1DPtr *arg1 = (StochasticProcess1DPtr *) 0 ;
    Time arg2 ;
    Real arg3 ;
    Time arg4 ;
    Real arg5 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    double val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: StochasticProcess1D_evolve(self,t0,x0,dt,dw);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_StochasticProcess1DPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StochasticProcess1D_evolve" "', argument " "1"" of type '" "StochasticProcess1DPtr *""'"); 
    }
    arg1 = reinterpret_cast< StochasticProcess1DPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StochasticProcess1D_evolve" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "StochasticProcess1D_evolve" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "StochasticProcess1D_evolve" "', argument " "4"" of type '" "Time""'");
    } 
    arg4 = static_cast< Time >(val4);
    ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "StochasticProcess1D_evolve" "', argument " "5"" of type '" "Real""'");
    } 
    arg5 = static_cast< Real >(val5);
    {
      try {
        result = (Real)StochasticProcess1DPtr_evolve(arg1,arg2,arg3,arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_StochasticProcess1D_apply) {
  {
    StochasticProcess1DPtr *arg1 = (StochasticProcess1DPtr *) 0 ;
    Real arg2 ;
    Real arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: StochasticProcess1D_apply(self,x0,dx);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_StochasticProcess1DPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StochasticProcess1D_apply" "', argument " "1"" of type '" "StochasticProcess1DPtr *""'"); 
    }
    arg1 = reinterpret_cast< StochasticProcess1DPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StochasticProcess1D_apply" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "StochasticProcess1D_apply" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    {
      try {
        result = (Real)StochasticProcess1DPtr_apply(arg1,arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_StochasticProcess1D) {
  {
    StochasticProcess1DPtr *arg1 = (StochasticProcess1DPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_StochasticProcess1D(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_StochasticProcess1DPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_StochasticProcess1D" "', argument " "1"" of type '" "StochasticProcess1DPtr *""'"); 
    }
    arg1 = reinterpret_cast< StochasticProcess1DPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_GeneralizedBlackScholesProcess) {
  {
    Handle< Quote > *arg1 = 0 ;
    Handle< YieldTermStructure > *arg2 = 0 ;
    Handle< YieldTermStructure > *arg3 = 0 ;
    Handle< BlackVolTermStructure > *arg4 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int argvi = 0;
    GeneralizedBlackScholesProcessPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_GeneralizedBlackScholesProcess(s0,dividendTS,riskFreeTS,volTS);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_GeneralizedBlackScholesProcess" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GeneralizedBlackScholesProcess" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< Quote > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_GeneralizedBlackScholesProcess" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GeneralizedBlackScholesProcess" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< YieldTermStructure > * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_GeneralizedBlackScholesProcess" "', argument " "3"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GeneralizedBlackScholesProcess" "', argument " "3"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< YieldTermStructure > * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_HandleT_BlackVolTermStructure_t,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_GeneralizedBlackScholesProcess" "', argument " "4"" of type '" "Handle< BlackVolTermStructure > const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GeneralizedBlackScholesProcess" "', argument " "4"" of type '" "Handle< BlackVolTermStructure > const &""'"); 
    }
    arg4 = reinterpret_cast< Handle< BlackVolTermStructure > * >(argp4);
    {
      try {
        result = (GeneralizedBlackScholesProcessPtr *)new_GeneralizedBlackScholesProcessPtr((Handle< Quote > const &)*arg1,(Handle< YieldTermStructure > const &)*arg2,(Handle< YieldTermStructure > const &)*arg3,(Handle< BlackVolTermStructure > const &)*arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_GeneralizedBlackScholesProcess_stateVariable) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = (GeneralizedBlackScholesProcessPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Handle< Quote > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: GeneralizedBlackScholesProcess_stateVariable(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GeneralizedBlackScholesProcess_stateVariable" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr *""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    {
      try {
        result = GeneralizedBlackScholesProcessPtr_stateVariable(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Handle< Quote >(static_cast< const Handle< Quote >& >(result))), SWIGTYPE_p_HandleT_Quote_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_GeneralizedBlackScholesProcess_dividendYield) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = (GeneralizedBlackScholesProcessPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Handle< YieldTermStructure > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: GeneralizedBlackScholesProcess_dividendYield(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GeneralizedBlackScholesProcess_dividendYield" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr *""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    {
      try {
        result = GeneralizedBlackScholesProcessPtr_dividendYield(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Handle< YieldTermStructure >(static_cast< const Handle< YieldTermStructure >& >(result))), SWIGTYPE_p_HandleT_YieldTermStructure_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_GeneralizedBlackScholesProcess_riskFreeRate) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = (GeneralizedBlackScholesProcessPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Handle< YieldTermStructure > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: GeneralizedBlackScholesProcess_riskFreeRate(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GeneralizedBlackScholesProcess_riskFreeRate" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr *""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    {
      try {
        result = GeneralizedBlackScholesProcessPtr_riskFreeRate(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Handle< YieldTermStructure >(static_cast< const Handle< YieldTermStructure >& >(result))), SWIGTYPE_p_HandleT_YieldTermStructure_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_GeneralizedBlackScholesProcess_blackVolatility) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = (GeneralizedBlackScholesProcessPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Handle< BlackVolTermStructure > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: GeneralizedBlackScholesProcess_blackVolatility(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GeneralizedBlackScholesProcess_blackVolatility" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const *""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    {
      try {
        result = GeneralizedBlackScholesProcessPtr_blackVolatility((GeneralizedBlackScholesProcessPtr const *)arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Handle< BlackVolTermStructure >(static_cast< const Handle< BlackVolTermStructure >& >(result))), SWIGTYPE_p_HandleT_BlackVolTermStructure_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_GeneralizedBlackScholesProcess) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = (GeneralizedBlackScholesProcessPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_GeneralizedBlackScholesProcess(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GeneralizedBlackScholesProcess" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr *""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BlackScholesProcess) {
  {
    Handle< Quote > *arg1 = 0 ;
    Handle< YieldTermStructure > *arg2 = 0 ;
    Handle< BlackVolTermStructure > *arg3 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    BlackScholesProcessPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_BlackScholesProcess(s0,riskFreeTS,volTS);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_BlackScholesProcess" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BlackScholesProcess" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< Quote > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_BlackScholesProcess" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BlackScholesProcess" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< YieldTermStructure > * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_BlackVolTermStructure_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_BlackScholesProcess" "', argument " "3"" of type '" "Handle< BlackVolTermStructure > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BlackScholesProcess" "', argument " "3"" of type '" "Handle< BlackVolTermStructure > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< BlackVolTermStructure > * >(argp3);
    {
      try {
        result = (BlackScholesProcessPtr *)new_BlackScholesProcessPtr((Handle< Quote > const &)*arg1,(Handle< YieldTermStructure > const &)*arg2,(Handle< BlackVolTermStructure > const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BlackScholesProcessPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_BlackScholesProcess) {
  {
    BlackScholesProcessPtr *arg1 = (BlackScholesProcessPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_BlackScholesProcess(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BlackScholesProcessPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_BlackScholesProcess" "', argument " "1"" of type '" "BlackScholesProcessPtr *""'"); 
    }
    arg1 = reinterpret_cast< BlackScholesProcessPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BlackScholesMertonProcess) {
  {
    Handle< Quote > *arg1 = 0 ;
    Handle< YieldTermStructure > *arg2 = 0 ;
    Handle< YieldTermStructure > *arg3 = 0 ;
    Handle< BlackVolTermStructure > *arg4 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int argvi = 0;
    BlackScholesMertonProcessPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_BlackScholesMertonProcess(s0,dividendTS,riskFreeTS,volTS);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_BlackScholesMertonProcess" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BlackScholesMertonProcess" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< Quote > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_BlackScholesMertonProcess" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BlackScholesMertonProcess" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< YieldTermStructure > * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_BlackScholesMertonProcess" "', argument " "3"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BlackScholesMertonProcess" "', argument " "3"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< YieldTermStructure > * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_HandleT_BlackVolTermStructure_t,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_BlackScholesMertonProcess" "', argument " "4"" of type '" "Handle< BlackVolTermStructure > const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BlackScholesMertonProcess" "', argument " "4"" of type '" "Handle< BlackVolTermStructure > const &""'"); 
    }
    arg4 = reinterpret_cast< Handle< BlackVolTermStructure > * >(argp4);
    {
      try {
        result = (BlackScholesMertonProcessPtr *)new_BlackScholesMertonProcessPtr((Handle< Quote > const &)*arg1,(Handle< YieldTermStructure > const &)*arg2,(Handle< YieldTermStructure > const &)*arg3,(Handle< BlackVolTermStructure > const &)*arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BlackScholesMertonProcessPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_BlackScholesMertonProcess) {
  {
    BlackScholesMertonProcessPtr *arg1 = (BlackScholesMertonProcessPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_BlackScholesMertonProcess(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BlackScholesMertonProcessPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_BlackScholesMertonProcess" "', argument " "1"" of type '" "BlackScholesMertonProcessPtr *""'"); 
    }
    arg1 = reinterpret_cast< BlackScholesMertonProcessPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BlackProcess) {
  {
    Handle< Quote > *arg1 = 0 ;
    Handle< YieldTermStructure > *arg2 = 0 ;
    Handle< BlackVolTermStructure > *arg3 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    BlackProcessPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_BlackProcess(s0,riskFreeTS,volTS);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_BlackProcess" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BlackProcess" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< Quote > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_BlackProcess" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BlackProcess" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< YieldTermStructure > * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_BlackVolTermStructure_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_BlackProcess" "', argument " "3"" of type '" "Handle< BlackVolTermStructure > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BlackProcess" "', argument " "3"" of type '" "Handle< BlackVolTermStructure > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< BlackVolTermStructure > * >(argp3);
    {
      try {
        result = (BlackProcessPtr *)new_BlackProcessPtr((Handle< Quote > const &)*arg1,(Handle< YieldTermStructure > const &)*arg2,(Handle< BlackVolTermStructure > const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BlackProcessPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_BlackProcess) {
  {
    BlackProcessPtr *arg1 = (BlackProcessPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_BlackProcess(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BlackProcessPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_BlackProcess" "', argument " "1"" of type '" "BlackProcessPtr *""'"); 
    }
    arg1 = reinterpret_cast< BlackProcessPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_GarmanKohlagenProcess) {
  {
    Handle< Quote > *arg1 = 0 ;
    Handle< YieldTermStructure > *arg2 = 0 ;
    Handle< YieldTermStructure > *arg3 = 0 ;
    Handle< BlackVolTermStructure > *arg4 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int argvi = 0;
    GarmanKohlagenProcessPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_GarmanKohlagenProcess(s0,foreignRiskFreeTS,domesticRiskFreeTS,volTS);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_GarmanKohlagenProcess" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GarmanKohlagenProcess" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< Quote > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_GarmanKohlagenProcess" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GarmanKohlagenProcess" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< YieldTermStructure > * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_GarmanKohlagenProcess" "', argument " "3"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GarmanKohlagenProcess" "', argument " "3"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< YieldTermStructure > * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_HandleT_BlackVolTermStructure_t,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_GarmanKohlagenProcess" "', argument " "4"" of type '" "Handle< BlackVolTermStructure > const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GarmanKohlagenProcess" "', argument " "4"" of type '" "Handle< BlackVolTermStructure > const &""'"); 
    }
    arg4 = reinterpret_cast< Handle< BlackVolTermStructure > * >(argp4);
    {
      try {
        result = (GarmanKohlagenProcessPtr *)new_GarmanKohlagenProcessPtr((Handle< Quote > const &)*arg1,(Handle< YieldTermStructure > const &)*arg2,(Handle< YieldTermStructure > const &)*arg3,(Handle< BlackVolTermStructure > const &)*arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GarmanKohlagenProcessPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_GarmanKohlagenProcess) {
  {
    GarmanKohlagenProcessPtr *arg1 = (GarmanKohlagenProcessPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_GarmanKohlagenProcess(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GarmanKohlagenProcessPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GarmanKohlagenProcess" "', argument " "1"" of type '" "GarmanKohlagenProcessPtr *""'"); 
    }
    arg1 = reinterpret_cast< GarmanKohlagenProcessPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Merton76Process) {
  {
    Handle< Quote > *arg1 = 0 ;
    Handle< YieldTermStructure > *arg2 = 0 ;
    Handle< YieldTermStructure > *arg3 = 0 ;
    Handle< BlackVolTermStructure > *arg4 = 0 ;
    Handle< Quote > *arg5 = 0 ;
    Handle< Quote > *arg6 = 0 ;
    Handle< Quote > *arg7 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    int argvi = 0;
    Merton76ProcessPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: new_Merton76Process(stateVariable,dividendTS,riskFreeTS,volTS,jumpIntensity,meanLogJump,jumpVolatility);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Merton76Process" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Merton76Process" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< Quote > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Merton76Process" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Merton76Process" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< YieldTermStructure > * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_Merton76Process" "', argument " "3"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Merton76Process" "', argument " "3"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< YieldTermStructure > * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_HandleT_BlackVolTermStructure_t,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_Merton76Process" "', argument " "4"" of type '" "Handle< BlackVolTermStructure > const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Merton76Process" "', argument " "4"" of type '" "Handle< BlackVolTermStructure > const &""'"); 
    }
    arg4 = reinterpret_cast< Handle< BlackVolTermStructure > * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_Merton76Process" "', argument " "5"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Merton76Process" "', argument " "5"" of type '" "Handle< Quote > const &""'"); 
    }
    arg5 = reinterpret_cast< Handle< Quote > * >(argp5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_Merton76Process" "', argument " "6"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Merton76Process" "', argument " "6"" of type '" "Handle< Quote > const &""'"); 
    }
    arg6 = reinterpret_cast< Handle< Quote > * >(argp6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_Merton76Process" "', argument " "7"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Merton76Process" "', argument " "7"" of type '" "Handle< Quote > const &""'"); 
    }
    arg7 = reinterpret_cast< Handle< Quote > * >(argp7);
    {
      try {
        result = (Merton76ProcessPtr *)new_Merton76ProcessPtr((Handle< Quote > const &)*arg1,(Handle< YieldTermStructure > const &)*arg2,(Handle< YieldTermStructure > const &)*arg3,(Handle< BlackVolTermStructure > const &)*arg4,(Handle< Quote > const &)*arg5,(Handle< Quote > const &)*arg6,(Handle< Quote > const &)*arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Merton76ProcessPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_Merton76Process) {
  {
    Merton76ProcessPtr *arg1 = (Merton76ProcessPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Merton76Process(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Merton76ProcessPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Merton76Process" "', argument " "1"" of type '" "Merton76ProcessPtr *""'"); 
    }
    arg1 = reinterpret_cast< Merton76ProcessPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_StochasticProcessArray) {
  {
    std::vector< boost::shared_ptr< StochasticProcess > > *arg1 = 0 ;
    Matrix *arg2 = 0 ;
    std::vector< boost::shared_ptr< StochasticProcess > > temp1 ;
    std::vector< boost::shared_ptr< StochasticProcess > > *v1 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    StochasticProcessArrayPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_StochasticProcessArray(array,correlation);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_StochasticProcess_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_StochasticProcessArray. "
          "Expected an array of " "boost::shared_ptr< StochasticProcess >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< StochasticProcess >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_StochasticProcess_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_StochasticProcessArray. "
              "Expected an array of " "boost::shared_ptr< StochasticProcess >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_StochasticProcessArray. "
          "Expected an array of " "boost::shared_ptr< StochasticProcess >");
      }
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Matrix,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_StochasticProcessArray" "', argument " "2"" of type '" "Matrix const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_StochasticProcessArray" "', argument " "2"" of type '" "Matrix const &""'"); 
    }
    arg2 = reinterpret_cast< Matrix * >(argp2);
    {
      try {
        result = (StochasticProcessArrayPtr *)new_StochasticProcessArrayPtr((std::vector< boost::shared_ptr< StochasticProcess > > const &)*arg1,(Matrix const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_StochasticProcessArrayPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_StochasticProcessArray) {
  {
    StochasticProcessArrayPtr *arg1 = (StochasticProcessArrayPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_StochasticProcessArray(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_StochasticProcessArrayPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_StochasticProcessArray" "', argument " "1"" of type '" "StochasticProcessArrayPtr *""'"); 
    }
    arg1 = reinterpret_cast< StochasticProcessArrayPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_GeometricBrownianMotionProcess) {
  {
    Real arg1 ;
    Real arg2 ;
    Real arg3 ;
    double val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    GeometricBrownianMotionProcessPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_GeometricBrownianMotionProcess(initialValue,mu,sigma);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_GeometricBrownianMotionProcess" "', argument " "1"" of type '" "Real""'");
    } 
    arg1 = static_cast< Real >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_GeometricBrownianMotionProcess" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_GeometricBrownianMotionProcess" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    {
      try {
        result = (GeometricBrownianMotionProcessPtr *)new_GeometricBrownianMotionProcessPtr(arg1,arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GeometricBrownianMotionProcessPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_GeometricBrownianMotionProcess) {
  {
    GeometricBrownianMotionProcessPtr *arg1 = (GeometricBrownianMotionProcessPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_GeometricBrownianMotionProcess(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GeometricBrownianMotionProcessPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GeometricBrownianMotionProcess" "', argument " "1"" of type '" "GeometricBrownianMotionProcessPtr *""'"); 
    }
    arg1 = reinterpret_cast< GeometricBrownianMotionProcessPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_VarianceGammaProcess) {
  {
    Handle< Quote > *arg1 = 0 ;
    Handle< YieldTermStructure > *arg2 = 0 ;
    Handle< YieldTermStructure > *arg3 = 0 ;
    Real arg4 ;
    Real arg5 ;
    Real arg6 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    double val5 ;
    int ecode5 = 0 ;
    double val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    VarianceGammaProcessPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_VarianceGammaProcess(s0,dividendYield,riskFreeRate,sigma,nu,theta);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_VarianceGammaProcess" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_VarianceGammaProcess" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< Quote > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_VarianceGammaProcess" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_VarianceGammaProcess" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< YieldTermStructure > * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_VarianceGammaProcess" "', argument " "3"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_VarianceGammaProcess" "', argument " "3"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< YieldTermStructure > * >(argp3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_VarianceGammaProcess" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_VarianceGammaProcess" "', argument " "5"" of type '" "Real""'");
    } 
    arg5 = static_cast< Real >(val5);
    ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_VarianceGammaProcess" "', argument " "6"" of type '" "Real""'");
    } 
    arg6 = static_cast< Real >(val6);
    {
      try {
        result = (VarianceGammaProcessPtr *)new_VarianceGammaProcessPtr((Handle< Quote > const &)*arg1,(Handle< YieldTermStructure > const &)*arg2,(Handle< YieldTermStructure > const &)*arg3,arg4,arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VarianceGammaProcessPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_VarianceGammaProcess) {
  {
    VarianceGammaProcessPtr *arg1 = (VarianceGammaProcessPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_VarianceGammaProcess(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_VarianceGammaProcessPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_VarianceGammaProcess" "', argument " "1"" of type '" "VarianceGammaProcessPtr *""'"); 
    }
    arg1 = reinterpret_cast< VarianceGammaProcessPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_HestonProcess) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    Handle< YieldTermStructure > *arg2 = 0 ;
    Handle< Quote > *arg3 = 0 ;
    Real arg4 ;
    Real arg5 ;
    Real arg6 ;
    Real arg7 ;
    Real arg8 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    double val5 ;
    int ecode5 = 0 ;
    double val6 ;
    int ecode6 = 0 ;
    double val7 ;
    int ecode7 = 0 ;
    double val8 ;
    int ecode8 = 0 ;
    int argvi = 0;
    HestonProcessPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 8) || (items > 8)) {
      SWIG_croak("Usage: new_HestonProcess(riskFreeTS,dividendTS,s0,v0,kappa,theta,sigma,rho);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_HestonProcess" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_HestonProcess" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_HestonProcess" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_HestonProcess" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< YieldTermStructure > * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_HestonProcess" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_HestonProcess" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< Quote > * >(argp3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_HestonProcess" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_HestonProcess" "', argument " "5"" of type '" "Real""'");
    } 
    arg5 = static_cast< Real >(val5);
    ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_HestonProcess" "', argument " "6"" of type '" "Real""'");
    } 
    arg6 = static_cast< Real >(val6);
    ecode7 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_HestonProcess" "', argument " "7"" of type '" "Real""'");
    } 
    arg7 = static_cast< Real >(val7);
    ecode8 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_HestonProcess" "', argument " "8"" of type '" "Real""'");
    } 
    arg8 = static_cast< Real >(val8);
    {
      try {
        result = (HestonProcessPtr *)new_HestonProcessPtr((Handle< YieldTermStructure > const &)*arg1,(Handle< YieldTermStructure > const &)*arg2,(Handle< Quote > const &)*arg3,arg4,arg5,arg6,arg7,arg8);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_HestonProcessPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_HestonProcess_s0) {
  {
    HestonProcessPtr *arg1 = (HestonProcessPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Handle< Quote > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: HestonProcess_s0(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HestonProcessPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HestonProcess_s0" "', argument " "1"" of type '" "HestonProcessPtr *""'"); 
    }
    arg1 = reinterpret_cast< HestonProcessPtr * >(argp1);
    {
      try {
        result = HestonProcessPtr_s0(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Handle< Quote >(static_cast< const Handle< Quote >& >(result))), SWIGTYPE_p_HandleT_Quote_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_HestonProcess_dividendYield) {
  {
    HestonProcessPtr *arg1 = (HestonProcessPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Handle< YieldTermStructure > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: HestonProcess_dividendYield(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HestonProcessPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HestonProcess_dividendYield" "', argument " "1"" of type '" "HestonProcessPtr *""'"); 
    }
    arg1 = reinterpret_cast< HestonProcessPtr * >(argp1);
    {
      try {
        result = HestonProcessPtr_dividendYield(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Handle< YieldTermStructure >(static_cast< const Handle< YieldTermStructure >& >(result))), SWIGTYPE_p_HandleT_YieldTermStructure_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_HestonProcess_riskFreeRate) {
  {
    HestonProcessPtr *arg1 = (HestonProcessPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Handle< YieldTermStructure > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: HestonProcess_riskFreeRate(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HestonProcessPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HestonProcess_riskFreeRate" "', argument " "1"" of type '" "HestonProcessPtr *""'"); 
    }
    arg1 = reinterpret_cast< HestonProcessPtr * >(argp1);
    {
      try {
        result = HestonProcessPtr_riskFreeRate(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Handle< YieldTermStructure >(static_cast< const Handle< YieldTermStructure >& >(result))), SWIGTYPE_p_HandleT_YieldTermStructure_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_HestonProcess) {
  {
    HestonProcessPtr *arg1 = (HestonProcessPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_HestonProcess(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HestonProcessPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_HestonProcess" "', argument " "1"" of type '" "HestonProcessPtr *""'"); 
    }
    arg1 = reinterpret_cast< HestonProcessPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BatesProcess) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    Handle< YieldTermStructure > *arg2 = 0 ;
    Handle< Quote > *arg3 = 0 ;
    Real arg4 ;
    Real arg5 ;
    Real arg6 ;
    Real arg7 ;
    Real arg8 ;
    Real arg9 ;
    Real arg10 ;
    Real arg11 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    double val5 ;
    int ecode5 = 0 ;
    double val6 ;
    int ecode6 = 0 ;
    double val7 ;
    int ecode7 = 0 ;
    double val8 ;
    int ecode8 = 0 ;
    double val9 ;
    int ecode9 = 0 ;
    double val10 ;
    int ecode10 = 0 ;
    double val11 ;
    int ecode11 = 0 ;
    int argvi = 0;
    BatesProcessPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 11) || (items > 11)) {
      SWIG_croak("Usage: new_BatesProcess(riskFreeRate,dividendYield,s0,v0,kappa,theta,sigma,rho,lambda,nu,delta);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_BatesProcess" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BatesProcess" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_BatesProcess" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BatesProcess" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< YieldTermStructure > * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_BatesProcess" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BatesProcess" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< Quote > * >(argp3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_BatesProcess" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_BatesProcess" "', argument " "5"" of type '" "Real""'");
    } 
    arg5 = static_cast< Real >(val5);
    ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_BatesProcess" "', argument " "6"" of type '" "Real""'");
    } 
    arg6 = static_cast< Real >(val6);
    ecode7 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_BatesProcess" "', argument " "7"" of type '" "Real""'");
    } 
    arg7 = static_cast< Real >(val7);
    ecode8 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_BatesProcess" "', argument " "8"" of type '" "Real""'");
    } 
    arg8 = static_cast< Real >(val8);
    ecode9 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(8), &val9);
    if (!SWIG_IsOK(ecode9)) {
      SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "new_BatesProcess" "', argument " "9"" of type '" "Real""'");
    } 
    arg9 = static_cast< Real >(val9);
    ecode10 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), &val10);
    if (!SWIG_IsOK(ecode10)) {
      SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "new_BatesProcess" "', argument " "10"" of type '" "Real""'");
    } 
    arg10 = static_cast< Real >(val10);
    ecode11 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(10), &val11);
    if (!SWIG_IsOK(ecode11)) {
      SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "new_BatesProcess" "', argument " "11"" of type '" "Real""'");
    } 
    arg11 = static_cast< Real >(val11);
    {
      try {
        result = (BatesProcessPtr *)new_BatesProcessPtr((Handle< YieldTermStructure > const &)*arg1,(Handle< YieldTermStructure > const &)*arg2,(Handle< Quote > const &)*arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BatesProcessPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_BatesProcess) {
  {
    BatesProcessPtr *arg1 = (BatesProcessPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_BatesProcess(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BatesProcessPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_BatesProcess" "', argument " "1"" of type '" "BatesProcessPtr *""'"); 
    }
    arg1 = reinterpret_cast< BatesProcessPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_HullWhiteProcess) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    Real arg2 ;
    Real arg3 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    HullWhiteProcessPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_HullWhiteProcess(riskFreeTS,a,sigma);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_HullWhiteProcess" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_HullWhiteProcess" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_HullWhiteProcess" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_HullWhiteProcess" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    {
      try {
        result = (HullWhiteProcessPtr *)new_HullWhiteProcessPtr((Handle< YieldTermStructure > const &)*arg1,arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_HullWhiteProcessPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_HullWhiteProcess) {
  {
    HullWhiteProcessPtr *arg1 = (HullWhiteProcessPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_HullWhiteProcess(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HullWhiteProcessPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_HullWhiteProcess" "', argument " "1"" of type '" "HullWhiteProcessPtr *""'"); 
    }
    arg1 = reinterpret_cast< HullWhiteProcessPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_HullWhiteForwardProcess) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    Real arg2 ;
    Real arg3 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    HullWhiteForwardProcessPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_HullWhiteForwardProcess(riskFreeTS,a,sigma);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_HullWhiteForwardProcess" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_HullWhiteForwardProcess" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_HullWhiteForwardProcess" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_HullWhiteForwardProcess" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    {
      try {
        result = (HullWhiteForwardProcessPtr *)new_HullWhiteForwardProcessPtr((Handle< YieldTermStructure > const &)*arg1,arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_HullWhiteForwardProcessPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_HullWhiteForwardProcess_alpha) {
  {
    HullWhiteForwardProcessPtr *arg1 = (HullWhiteForwardProcessPtr *) 0 ;
    Time arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: HullWhiteForwardProcess_alpha(self,t);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HullWhiteForwardProcessPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HullWhiteForwardProcess_alpha" "', argument " "1"" of type '" "HullWhiteForwardProcessPtr const *""'"); 
    }
    arg1 = reinterpret_cast< HullWhiteForwardProcessPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HullWhiteForwardProcess_alpha" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    {
      try {
        result = (Real)HullWhiteForwardProcessPtr_alpha((HullWhiteForwardProcessPtr const *)arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_HullWhiteForwardProcess_M_T) {
  {
    HullWhiteForwardProcessPtr *arg1 = (HullWhiteForwardProcessPtr *) 0 ;
    Real arg2 ;
    Real arg3 ;
    Real arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: HullWhiteForwardProcess_M_T(self,s,t,T);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HullWhiteForwardProcessPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HullWhiteForwardProcess_M_T" "', argument " "1"" of type '" "HullWhiteForwardProcessPtr const *""'"); 
    }
    arg1 = reinterpret_cast< HullWhiteForwardProcessPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HullWhiteForwardProcess_M_T" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HullWhiteForwardProcess_M_T" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "HullWhiteForwardProcess_M_T" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    {
      try {
        result = (Real)HullWhiteForwardProcessPtr_M_T((HullWhiteForwardProcessPtr const *)arg1,arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_HullWhiteForwardProcess_B) {
  {
    HullWhiteForwardProcessPtr *arg1 = (HullWhiteForwardProcessPtr *) 0 ;
    Time arg2 ;
    Time arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: HullWhiteForwardProcess_B(self,t,T);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HullWhiteForwardProcessPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HullWhiteForwardProcess_B" "', argument " "1"" of type '" "HullWhiteForwardProcessPtr const *""'"); 
    }
    arg1 = reinterpret_cast< HullWhiteForwardProcessPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HullWhiteForwardProcess_B" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HullWhiteForwardProcess_B" "', argument " "3"" of type '" "Time""'");
    } 
    arg3 = static_cast< Time >(val3);
    {
      try {
        result = (Real)HullWhiteForwardProcessPtr_B((HullWhiteForwardProcessPtr const *)arg1,arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_HullWhiteForwardProcess_setForwardMeasureTime) {
  {
    HullWhiteForwardProcessPtr *arg1 = (HullWhiteForwardProcessPtr *) 0 ;
    Time arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: HullWhiteForwardProcess_setForwardMeasureTime(self,t);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HullWhiteForwardProcessPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HullWhiteForwardProcess_setForwardMeasureTime" "', argument " "1"" of type '" "HullWhiteForwardProcessPtr *""'"); 
    }
    arg1 = reinterpret_cast< HullWhiteForwardProcessPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HullWhiteForwardProcess_setForwardMeasureTime" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    {
      try {
        HullWhiteForwardProcessPtr_setForwardMeasureTime(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_HullWhiteForwardProcess) {
  {
    HullWhiteForwardProcessPtr *arg1 = (HullWhiteForwardProcessPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_HullWhiteForwardProcess(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HullWhiteForwardProcessPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_HullWhiteForwardProcess" "', argument " "1"" of type '" "HullWhiteForwardProcessPtr *""'"); 
    }
    arg1 = reinterpret_cast< HullWhiteForwardProcessPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_GsrProcess__SWIG_0) {
  {
    Array *arg1 = 0 ;
    Array *arg2 = 0 ;
    Array *arg3 = 0 ;
    Real arg4 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    GsrProcessPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_GsrProcess(times,vols,reversions,T);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_GsrProcess" "', argument " "1"" of type '" "Array const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GsrProcess" "', argument " "1"" of type '" "Array const &""'"); 
    }
    arg1 = reinterpret_cast< Array * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_GsrProcess" "', argument " "2"" of type '" "Array const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GsrProcess" "', argument " "2"" of type '" "Array const &""'"); 
    }
    arg2 = reinterpret_cast< Array * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_GsrProcess" "', argument " "3"" of type '" "Array const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GsrProcess" "', argument " "3"" of type '" "Array const &""'"); 
    }
    arg3 = reinterpret_cast< Array * >(argp3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_GsrProcess" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    {
      try {
        result = (GsrProcessPtr *)new_GsrProcessPtr__SWIG_0((Array const &)*arg1,(Array const &)*arg2,(Array const &)*arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GsrProcessPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_GsrProcess__SWIG_1) {
  {
    Array *arg1 = 0 ;
    Array *arg2 = 0 ;
    Array *arg3 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    GsrProcessPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_GsrProcess(times,vols,reversions);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_GsrProcess" "', argument " "1"" of type '" "Array const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GsrProcess" "', argument " "1"" of type '" "Array const &""'"); 
    }
    arg1 = reinterpret_cast< Array * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_GsrProcess" "', argument " "2"" of type '" "Array const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GsrProcess" "', argument " "2"" of type '" "Array const &""'"); 
    }
    arg2 = reinterpret_cast< Array * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_GsrProcess" "', argument " "3"" of type '" "Array const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GsrProcess" "', argument " "3"" of type '" "Array const &""'"); 
    }
    arg3 = reinterpret_cast< Array * >(argp3);
    {
      try {
        result = (GsrProcessPtr *)new_GsrProcessPtr__SWIG_0((Array const &)*arg1,(Array const &)*arg2,(Array const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GsrProcessPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_GsrProcess) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Array, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Array, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Array, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Array, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Array, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Array, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_GsrProcess__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_GsrProcess__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_GsrProcess'");
  XSRETURN(0);
}


XS(_wrap_GsrProcess_sigma) {
  {
    GsrProcessPtr *arg1 = (GsrProcessPtr *) 0 ;
    Time arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: GsrProcess_sigma(self,t);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GsrProcessPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GsrProcess_sigma" "', argument " "1"" of type '" "GsrProcessPtr *""'"); 
    }
    arg1 = reinterpret_cast< GsrProcessPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GsrProcess_sigma" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    {
      try {
        result = (Real)GsrProcessPtr_sigma(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_GsrProcess_reversion) {
  {
    GsrProcessPtr *arg1 = (GsrProcessPtr *) 0 ;
    Time arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: GsrProcess_reversion(self,t);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GsrProcessPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GsrProcess_reversion" "', argument " "1"" of type '" "GsrProcessPtr *""'"); 
    }
    arg1 = reinterpret_cast< GsrProcessPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GsrProcess_reversion" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    {
      try {
        result = (Real)GsrProcessPtr_reversion(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_GsrProcess_y) {
  {
    GsrProcessPtr *arg1 = (GsrProcessPtr *) 0 ;
    Time arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: GsrProcess_y(self,t);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GsrProcessPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GsrProcess_y" "', argument " "1"" of type '" "GsrProcessPtr *""'"); 
    }
    arg1 = reinterpret_cast< GsrProcessPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GsrProcess_y" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    {
      try {
        result = (Real)GsrProcessPtr_y(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_GsrProcess_G) {
  {
    GsrProcessPtr *arg1 = (GsrProcessPtr *) 0 ;
    Time arg2 ;
    Time arg3 ;
    Real arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: GsrProcess_G(self,t,T,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GsrProcessPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GsrProcess_G" "', argument " "1"" of type '" "GsrProcessPtr *""'"); 
    }
    arg1 = reinterpret_cast< GsrProcessPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GsrProcess_G" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "GsrProcess_G" "', argument " "3"" of type '" "Time""'");
    } 
    arg3 = static_cast< Time >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "GsrProcess_G" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    {
      try {
        result = (Real)GsrProcessPtr_G(arg1,arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_GsrProcess_setForwardMeasureTime) {
  {
    GsrProcessPtr *arg1 = (GsrProcessPtr *) 0 ;
    Time arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: GsrProcess_setForwardMeasureTime(self,t);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GsrProcessPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GsrProcess_setForwardMeasureTime" "', argument " "1"" of type '" "GsrProcessPtr *""'"); 
    }
    arg1 = reinterpret_cast< GsrProcessPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GsrProcess_setForwardMeasureTime" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    {
      try {
        GsrProcessPtr_setForwardMeasureTime(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_GsrProcess) {
  {
    GsrProcessPtr *arg1 = (GsrProcessPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_GsrProcess(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GsrProcessPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GsrProcess" "', argument " "1"" of type '" "GsrProcessPtr *""'"); 
    }
    arg1 = reinterpret_cast< GsrProcessPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_as_gsr_process) {
  {
    boost::shared_ptr< StochasticProcess > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    SwigValueWrapper< GsrProcessPtr > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: as_gsr_process(proc);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_StochasticProcess_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "as_gsr_process" "', argument " "1"" of type '" "boost::shared_ptr< StochasticProcess > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "as_gsr_process" "', argument " "1"" of type '" "boost::shared_ptr< StochasticProcess > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< StochasticProcess > * >(argp1);
    {
      try {
        result = as_gsr_process((boost::shared_ptr< StochasticProcess > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new GsrProcessPtr(static_cast< const GsrProcessPtr& >(result))), SWIGTYPE_p_GsrProcessPtr, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_PricingEngine___deref__) {
  {
    boost::shared_ptr< PricingEngine > *arg1 = (boost::shared_ptr< PricingEngine > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    PricingEngine *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: PricingEngine___deref__(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_PricingEngine_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PricingEngine___deref__" "', argument " "1"" of type '" "boost::shared_ptr< PricingEngine > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< PricingEngine > * >(argp1);
    {
      try {
        result = (PricingEngine *)(arg1)->operator ->();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PricingEngine, 0 | 0); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_PricingEngine_isNull) {
  {
    boost::shared_ptr< PricingEngine > *arg1 = (boost::shared_ptr< PricingEngine > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: PricingEngine_isNull(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_PricingEngine_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PricingEngine_isNull" "', argument " "1"" of type '" "boost::shared_ptr< PricingEngine > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< PricingEngine > * >(argp1);
    {
      try {
        result = (bool)boost_shared_ptr_Sl_PricingEngine_Sg__isNull(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PricingEngine) {
  {
    int argvi = 0;
    boost::shared_ptr< PricingEngine > *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_PricingEngine();");
    }
    {
      try {
        result = (boost::shared_ptr< PricingEngine > *)new boost::shared_ptr< PricingEngine >();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_boost__shared_ptrT_PricingEngine_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_PricingEngine) {
  {
    boost::shared_ptr< PricingEngine > *arg1 = (boost::shared_ptr< PricingEngine > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_PricingEngine(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_PricingEngine_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_PricingEngine" "', argument " "1"" of type '" "boost::shared_ptr< PricingEngine > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< PricingEngine > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Instrument___deref__) {
  {
    boost::shared_ptr< Instrument > *arg1 = (boost::shared_ptr< Instrument > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Instrument *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Instrument___deref__(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Instrument_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Instrument___deref__" "', argument " "1"" of type '" "boost::shared_ptr< Instrument > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Instrument > * >(argp1);
    {
      try {
        result = (Instrument *)(arg1)->operator ->();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Instrument, 0 | 0); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Instrument_isNull) {
  {
    boost::shared_ptr< Instrument > *arg1 = (boost::shared_ptr< Instrument > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Instrument_isNull(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Instrument_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Instrument_isNull" "', argument " "1"" of type '" "boost::shared_ptr< Instrument > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Instrument > * >(argp1);
    {
      try {
        result = (bool)boost_shared_ptr_Sl_Instrument_Sg__isNull(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Instrument_asObservable) {
  {
    boost::shared_ptr< Instrument > *arg1 = (boost::shared_ptr< Instrument > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    boost::shared_ptr< Observable > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Instrument_asObservable(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Instrument_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Instrument_asObservable" "', argument " "1"" of type '" "boost::shared_ptr< Instrument > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Instrument > * >(argp1);
    {
      try {
        result = boost_shared_ptr_Sl_Instrument_Sg__asObservable(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new boost::shared_ptr< Observable >(static_cast< const boost::shared_ptr< Observable >& >(result))), SWIGTYPE_p_boost__shared_ptrT_Observable_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Instrument) {
  {
    int argvi = 0;
    boost::shared_ptr< Instrument > *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Instrument();");
    }
    {
      try {
        result = (boost::shared_ptr< Instrument > *)new boost::shared_ptr< Instrument >();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_boost__shared_ptrT_Instrument_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_Instrument) {
  {
    boost::shared_ptr< Instrument > *arg1 = (boost::shared_ptr< Instrument > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Instrument(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Instrument_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Instrument" "', argument " "1"" of type '" "boost::shared_ptr< Instrument > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Instrument > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Instrument_NPV) {
  {
    boost::shared_ptr< Instrument > *arg1 = (boost::shared_ptr< Instrument > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Instrument_NPV(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Instrument_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Instrument_NPV" "', argument " "1"" of type '" "boost::shared_ptr< Instrument > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Instrument > * >(argp1);
    {
      try {
        result = (Real)(*arg1)->NPV();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Instrument_errorEstimate) {
  {
    boost::shared_ptr< Instrument > *arg1 = (boost::shared_ptr< Instrument > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Instrument_errorEstimate(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Instrument_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Instrument_errorEstimate" "', argument " "1"" of type '" "boost::shared_ptr< Instrument > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Instrument > * >(argp1);
    {
      try {
        result = (Real)(*arg1)->errorEstimate();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Instrument_isExpired) {
  {
    boost::shared_ptr< Instrument > *arg1 = (boost::shared_ptr< Instrument > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Instrument_isExpired(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Instrument_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Instrument_isExpired" "', argument " "1"" of type '" "boost::shared_ptr< Instrument > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Instrument > * >(argp1);
    {
      try {
        result = (bool)(*arg1)->isExpired();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Instrument_setPricingEngine) {
  {
    boost::shared_ptr< Instrument > *arg1 = (boost::shared_ptr< Instrument > *) 0 ;
    boost::shared_ptr< PricingEngine > *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Instrument_setPricingEngine(self,boost::shared_ptr< PricingEngine > const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Instrument_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Instrument_setPricingEngine" "', argument " "1"" of type '" "boost::shared_ptr< Instrument > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Instrument > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_boost__shared_ptrT_PricingEngine_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Instrument_setPricingEngine" "', argument " "2"" of type '" "boost::shared_ptr< PricingEngine > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Instrument_setPricingEngine" "', argument " "2"" of type '" "boost::shared_ptr< PricingEngine > const &""'"); 
    }
    arg2 = reinterpret_cast< boost::shared_ptr< PricingEngine > * >(argp2);
    {
      try {
        (*arg1)->setPricingEngine((boost::shared_ptr< PricingEngine > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Instrument_recalculate) {
  {
    boost::shared_ptr< Instrument > *arg1 = (boost::shared_ptr< Instrument > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Instrument_recalculate(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Instrument_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Instrument_recalculate" "', argument " "1"" of type '" "boost::shared_ptr< Instrument > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Instrument > * >(argp1);
    {
      try {
        (*arg1)->recalculate();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Instrument_freeze) {
  {
    boost::shared_ptr< Instrument > *arg1 = (boost::shared_ptr< Instrument > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Instrument_freeze(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Instrument_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Instrument_freeze" "', argument " "1"" of type '" "boost::shared_ptr< Instrument > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Instrument > * >(argp1);
    {
      try {
        (*arg1)->freeze();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Instrument_unfreeze) {
  {
    boost::shared_ptr< Instrument > *arg1 = (boost::shared_ptr< Instrument > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Instrument_unfreeze(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Instrument_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Instrument_unfreeze" "', argument " "1"" of type '" "boost::shared_ptr< Instrument > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Instrument > * >(argp1);
    {
      try {
        (*arg1)->unfreeze();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_InstrumentVector__SWIG_0) {
  {
    unsigned int arg1 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    std::vector< boost::shared_ptr< Instrument > > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_InstrumentVector(size);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_InstrumentVector" "', argument " "1"" of type '" "unsigned int""'");
    } 
    arg1 = static_cast< unsigned int >(val1);
    {
      try {
        result = (std::vector< boost::shared_ptr< Instrument > > *)new std::vector< boost::shared_ptr< Instrument > >(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Instrument_t_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_InstrumentVector__SWIG_1) {
  {
    int argvi = 0;
    std::vector< boost::shared_ptr< Instrument > > *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_InstrumentVector();");
    }
    {
      try {
        result = (std::vector< boost::shared_ptr< Instrument > > *)new std::vector< boost::shared_ptr< Instrument > >();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Instrument_t_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_InstrumentVector__SWIG_2) {
  {
    unsigned int arg1 ;
    boost::shared_ptr< Instrument > *arg2 = 0 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    std::vector< boost::shared_ptr< Instrument > > *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_InstrumentVector(size,value);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_InstrumentVector" "', argument " "1"" of type '" "unsigned int""'");
    } 
    arg1 = static_cast< unsigned int >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_boost__shared_ptrT_Instrument_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_InstrumentVector" "', argument " "2"" of type '" "boost::shared_ptr< Instrument > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_InstrumentVector" "', argument " "2"" of type '" "boost::shared_ptr< Instrument > const &""'"); 
    }
    arg2 = reinterpret_cast< boost::shared_ptr< Instrument > * >(argp2);
    {
      try {
        result = (std::vector< boost::shared_ptr< Instrument > > *)new std::vector< boost::shared_ptr< Instrument > >(arg1,(boost::shared_ptr< Instrument > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Instrument_t_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_InstrumentVector__SWIG_3) {
  {
    std::vector< boost::shared_ptr< Instrument > > *arg1 = 0 ;
    std::vector< boost::shared_ptr< Instrument > > temp1 ;
    std::vector< boost::shared_ptr< Instrument > > *v1 ;
    int argvi = 0;
    std::vector< boost::shared_ptr< Instrument > > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_InstrumentVector(std::vector< boost::shared_ptr< Instrument > > const &);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Instrument_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_InstrumentVector. "
          "Expected an array of " "boost::shared_ptr< Instrument >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< Instrument >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_Instrument_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_InstrumentVector. "
              "Expected an array of " "boost::shared_ptr< Instrument >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_InstrumentVector. "
          "Expected an array of " "boost::shared_ptr< Instrument >");
      }
    }
    {
      try {
        result = (std::vector< boost::shared_ptr< Instrument > > *)new std::vector< boost::shared_ptr< Instrument > >((std::vector< boost::shared_ptr< Instrument > > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Instrument_t_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_InstrumentVector) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< Instrument > >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Instrument_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< Instrument >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_Instrument_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_boost__shared_ptrT_Instrument_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_InstrumentVector__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_InstrumentVector__SWIG_0); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_InstrumentVector__SWIG_3); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_InstrumentVector__SWIG_2); return;
    }
  }
  
  croak("No matching function for overloaded 'new_InstrumentVector'");
  XSRETURN(0);
}


XS(_wrap_InstrumentVector_size) {
  {
    std::vector< boost::shared_ptr< Instrument > > *arg1 = (std::vector< boost::shared_ptr< Instrument > > *) 0 ;
    std::vector< boost::shared_ptr< Instrument > > temp1 ;
    std::vector< boost::shared_ptr< Instrument > > *v1 ;
    int argvi = 0;
    unsigned int result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: InstrumentVector_size(self);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Instrument_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of InstrumentVector_size. "
          "Expected an array of " "boost::shared_ptr< Instrument >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< Instrument >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_Instrument_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "InstrumentVector_size. "
              "Expected an array of " "boost::shared_ptr< Instrument >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of InstrumentVector_size. "
          "Expected an array of " "boost::shared_ptr< Instrument >");
      }
    }
    {
      try {
        result = (unsigned int)((std::vector< boost::shared_ptr< Instrument > > const *)arg1)->size();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_InstrumentVector_empty) {
  {
    std::vector< boost::shared_ptr< Instrument > > *arg1 = (std::vector< boost::shared_ptr< Instrument > > *) 0 ;
    std::vector< boost::shared_ptr< Instrument > > temp1 ;
    std::vector< boost::shared_ptr< Instrument > > *v1 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: InstrumentVector_empty(self);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Instrument_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of InstrumentVector_empty. "
          "Expected an array of " "boost::shared_ptr< Instrument >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< Instrument >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_Instrument_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "InstrumentVector_empty. "
              "Expected an array of " "boost::shared_ptr< Instrument >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of InstrumentVector_empty. "
          "Expected an array of " "boost::shared_ptr< Instrument >");
      }
    }
    {
      try {
        result = (bool)((std::vector< boost::shared_ptr< Instrument > > const *)arg1)->empty();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_InstrumentVector_clear) {
  {
    std::vector< boost::shared_ptr< Instrument > > *arg1 = (std::vector< boost::shared_ptr< Instrument > > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: InstrumentVector_clear(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Instrument_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InstrumentVector_clear" "', argument " "1"" of type '" "std::vector< boost::shared_ptr< Instrument > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< boost::shared_ptr< Instrument > > * >(argp1);
    {
      try {
        (arg1)->clear();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_InstrumentVector_push) {
  {
    std::vector< boost::shared_ptr< Instrument > > *arg1 = (std::vector< boost::shared_ptr< Instrument > > *) 0 ;
    boost::shared_ptr< Instrument > *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: InstrumentVector_push(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Instrument_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InstrumentVector_push" "', argument " "1"" of type '" "std::vector< boost::shared_ptr< Instrument > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< boost::shared_ptr< Instrument > > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_boost__shared_ptrT_Instrument_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "InstrumentVector_push" "', argument " "2"" of type '" "boost::shared_ptr< Instrument > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "InstrumentVector_push" "', argument " "2"" of type '" "boost::shared_ptr< Instrument > const &""'"); 
    }
    arg2 = reinterpret_cast< boost::shared_ptr< Instrument > * >(argp2);
    {
      try {
        (arg1)->push_back((boost::shared_ptr< Instrument > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_InstrumentVector_pop) {
  {
    std::vector< boost::shared_ptr< Instrument > > *arg1 = (std::vector< boost::shared_ptr< Instrument > > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    boost::shared_ptr< Instrument > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: InstrumentVector_pop(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Instrument_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InstrumentVector_pop" "', argument " "1"" of type '" "std::vector< boost::shared_ptr< Instrument > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< boost::shared_ptr< Instrument > > * >(argp1);
    {
      try {
        try {
          result = std_vector_Sl_boost_shared_ptr_Sl_Instrument_Sg__Sg__pop(arg1);
        }
        catch(std::out_of_range &_e) {
          sv_setsv(get_sv("@", GV_ADD), SWIG_NewPointerObj((new std::out_of_range(static_cast< const std::out_of_range& >(_e))),SWIGTYPE_p_std__out_of_range,SWIG_POINTER_OWN)); SWIG_fail ;
        }
        
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new boost::shared_ptr< Instrument >(static_cast< const boost::shared_ptr< Instrument >& >(result))), SWIGTYPE_p_boost__shared_ptrT_Instrument_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_InstrumentVector_get) {
  {
    std::vector< boost::shared_ptr< Instrument > > *arg1 = (std::vector< boost::shared_ptr< Instrument > > *) 0 ;
    int arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    boost::shared_ptr< Instrument > *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: InstrumentVector_get(self,i);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Instrument_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InstrumentVector_get" "', argument " "1"" of type '" "std::vector< boost::shared_ptr< Instrument > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< boost::shared_ptr< Instrument > > * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "InstrumentVector_get" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    {
      try {
        try {
          result = (boost::shared_ptr< Instrument > *) &std_vector_Sl_boost_shared_ptr_Sl_Instrument_Sg__Sg__get(arg1,arg2);
        }
        catch(std::out_of_range &_e) {
          sv_setsv(get_sv("@", GV_ADD), SWIG_NewPointerObj((new std::out_of_range(static_cast< const std::out_of_range& >(_e))),SWIGTYPE_p_std__out_of_range,SWIG_POINTER_OWN)); SWIG_fail ;
        }
        
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_boost__shared_ptrT_Instrument_t, 0 | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_InstrumentVector_set) {
  {
    std::vector< boost::shared_ptr< Instrument > > *arg1 = (std::vector< boost::shared_ptr< Instrument > > *) 0 ;
    int arg2 ;
    boost::shared_ptr< Instrument > *arg3 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: InstrumentVector_set(self,i,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Instrument_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InstrumentVector_set" "', argument " "1"" of type '" "std::vector< boost::shared_ptr< Instrument > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< boost::shared_ptr< Instrument > > * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "InstrumentVector_set" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_boost__shared_ptrT_Instrument_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "InstrumentVector_set" "', argument " "3"" of type '" "boost::shared_ptr< Instrument > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "InstrumentVector_set" "', argument " "3"" of type '" "boost::shared_ptr< Instrument > const &""'"); 
    }
    arg3 = reinterpret_cast< boost::shared_ptr< Instrument > * >(argp3);
    {
      try {
        try {
          std_vector_Sl_boost_shared_ptr_Sl_Instrument_Sg__Sg__set(arg1,arg2,(boost::shared_ptr< Instrument > const &)*arg3);
        }
        catch(std::out_of_range &_e) {
          sv_setsv(get_sv("@", GV_ADD), SWIG_NewPointerObj((new std::out_of_range(static_cast< const std::out_of_range& >(_e))),SWIGTYPE_p_std__out_of_range,SWIG_POINTER_OWN)); SWIG_fail ;
        }
        
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_InstrumentVector) {
  {
    std::vector< boost::shared_ptr< Instrument > > *arg1 = (std::vector< boost::shared_ptr< Instrument > > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_InstrumentVector(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Instrument_t_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_InstrumentVector" "', argument " "1"" of type '" "std::vector< boost::shared_ptr< Instrument > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< boost::shared_ptr< Instrument > > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Stock) {
  {
    Handle< Quote > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    StockPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Stock(quote);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Stock" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Stock" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< Quote > * >(argp1);
    {
      try {
        result = (StockPtr *)new_StockPtr((Handle< Quote > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_StockPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_Stock) {
  {
    StockPtr *arg1 = (StockPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Stock(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_StockPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Stock" "', argument " "1"" of type '" "StockPtr *""'"); 
    }
    arg1 = reinterpret_cast< StockPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CompositeInstrument) {
  {
    int argvi = 0;
    CompositeInstrumentPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_CompositeInstrument();");
    }
    {
      try {
        result = (CompositeInstrumentPtr *)new_CompositeInstrumentPtr();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CompositeInstrumentPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_CompositeInstrument_add__SWIG_0) {
  {
    CompositeInstrumentPtr *arg1 = (CompositeInstrumentPtr *) 0 ;
    boost::shared_ptr< Instrument > *arg2 = 0 ;
    Real arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: CompositeInstrument_add(self,instrument,multiplier);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CompositeInstrumentPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CompositeInstrument_add" "', argument " "1"" of type '" "CompositeInstrumentPtr *""'"); 
    }
    arg1 = reinterpret_cast< CompositeInstrumentPtr * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_boost__shared_ptrT_Instrument_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CompositeInstrument_add" "', argument " "2"" of type '" "boost::shared_ptr< Instrument > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CompositeInstrument_add" "', argument " "2"" of type '" "boost::shared_ptr< Instrument > const &""'"); 
    }
    arg2 = reinterpret_cast< boost::shared_ptr< Instrument > * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CompositeInstrument_add" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    {
      try {
        CompositeInstrumentPtr_add__SWIG_0(arg1,(boost::shared_ptr< Instrument > const &)*arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CompositeInstrument_add__SWIG_1) {
  {
    CompositeInstrumentPtr *arg1 = (CompositeInstrumentPtr *) 0 ;
    boost::shared_ptr< Instrument > *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: CompositeInstrument_add(self,instrument);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CompositeInstrumentPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CompositeInstrument_add" "', argument " "1"" of type '" "CompositeInstrumentPtr *""'"); 
    }
    arg1 = reinterpret_cast< CompositeInstrumentPtr * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_boost__shared_ptrT_Instrument_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CompositeInstrument_add" "', argument " "2"" of type '" "boost::shared_ptr< Instrument > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CompositeInstrument_add" "', argument " "2"" of type '" "boost::shared_ptr< Instrument > const &""'"); 
    }
    arg2 = reinterpret_cast< boost::shared_ptr< Instrument > * >(argp2);
    {
      try {
        CompositeInstrumentPtr_add__SWIG_0(arg1,(boost::shared_ptr< Instrument > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CompositeInstrument_add) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_CompositeInstrumentPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_boost__shared_ptrT_Instrument_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_CompositeInstrumentPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_boost__shared_ptrT_Instrument_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CompositeInstrument_add__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CompositeInstrument_add__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'CompositeInstrument_add'");
  XSRETURN(0);
}


XS(_wrap_CompositeInstrument_subtract__SWIG_0) {
  {
    CompositeInstrumentPtr *arg1 = (CompositeInstrumentPtr *) 0 ;
    boost::shared_ptr< Instrument > *arg2 = 0 ;
    Real arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: CompositeInstrument_subtract(self,instrument,multiplier);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CompositeInstrumentPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CompositeInstrument_subtract" "', argument " "1"" of type '" "CompositeInstrumentPtr *""'"); 
    }
    arg1 = reinterpret_cast< CompositeInstrumentPtr * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_boost__shared_ptrT_Instrument_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CompositeInstrument_subtract" "', argument " "2"" of type '" "boost::shared_ptr< Instrument > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CompositeInstrument_subtract" "', argument " "2"" of type '" "boost::shared_ptr< Instrument > const &""'"); 
    }
    arg2 = reinterpret_cast< boost::shared_ptr< Instrument > * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CompositeInstrument_subtract" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    {
      try {
        CompositeInstrumentPtr_subtract__SWIG_0(arg1,(boost::shared_ptr< Instrument > const &)*arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CompositeInstrument_subtract__SWIG_1) {
  {
    CompositeInstrumentPtr *arg1 = (CompositeInstrumentPtr *) 0 ;
    boost::shared_ptr< Instrument > *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: CompositeInstrument_subtract(self,instrument);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CompositeInstrumentPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CompositeInstrument_subtract" "', argument " "1"" of type '" "CompositeInstrumentPtr *""'"); 
    }
    arg1 = reinterpret_cast< CompositeInstrumentPtr * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_boost__shared_ptrT_Instrument_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CompositeInstrument_subtract" "', argument " "2"" of type '" "boost::shared_ptr< Instrument > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CompositeInstrument_subtract" "', argument " "2"" of type '" "boost::shared_ptr< Instrument > const &""'"); 
    }
    arg2 = reinterpret_cast< boost::shared_ptr< Instrument > * >(argp2);
    {
      try {
        CompositeInstrumentPtr_subtract__SWIG_0(arg1,(boost::shared_ptr< Instrument > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CompositeInstrument_subtract) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_CompositeInstrumentPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_boost__shared_ptrT_Instrument_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_CompositeInstrumentPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_boost__shared_ptrT_Instrument_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CompositeInstrument_subtract__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CompositeInstrument_subtract__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'CompositeInstrument_subtract'");
  XSRETURN(0);
}


XS(_wrap_delete_CompositeInstrument) {
  {
    CompositeInstrumentPtr *arg1 = (CompositeInstrumentPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_CompositeInstrument(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CompositeInstrumentPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CompositeInstrument" "', argument " "1"" of type '" "CompositeInstrumentPtr *""'"); 
    }
    arg1 = reinterpret_cast< CompositeInstrumentPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DateGeneration) {
  {
    int argvi = 0;
    DateGeneration *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_DateGeneration();");
    }
    {
      try {
        result = (DateGeneration *)new DateGeneration();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DateGeneration, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_DateGeneration) {
  {
    DateGeneration *arg1 = (DateGeneration *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_DateGeneration(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_DateGeneration, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DateGeneration" "', argument " "1"" of type '" "DateGeneration *""'"); 
    }
    arg1 = reinterpret_cast< DateGeneration * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Schedule__SWIG_0) {
  {
    std::vector< Date > *arg1 = 0 ;
    Calendar *arg2 = 0 ;
    BusinessDayConvention arg3 ;
    std::vector< Date > temp1 ;
    std::vector< Date > *v1 ;
    void *argp2 ;
    int res2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Schedule *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_Schedule(std::vector< Date > const &,calendar,convention);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_Schedule. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_Schedule. "
              "Expected an array of " "Date");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_Schedule. "
          "Expected an array of " "Date");
      }
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Schedule" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Schedule" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Schedule" "', argument " "3"" of type '" "BusinessDayConvention""'");
    } 
    arg3 = static_cast< BusinessDayConvention >(val3);
    {
      try {
        result = (Schedule *)new Schedule((std::vector< Date > const &)*arg1,(Calendar const &)*arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Schedule, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Schedule__SWIG_1) {
  {
    std::vector< Date > *arg1 = 0 ;
    Calendar *arg2 = 0 ;
    std::vector< Date > temp1 ;
    std::vector< Date > *v1 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    Schedule *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_Schedule(std::vector< Date > const &,calendar);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_Schedule. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_Schedule. "
              "Expected an array of " "Date");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_Schedule. "
          "Expected an array of " "Date");
      }
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Schedule" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Schedule" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    {
      try {
        result = (Schedule *)new Schedule((std::vector< Date > const &)*arg1,(Calendar const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Schedule, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Schedule__SWIG_2) {
  {
    std::vector< Date > *arg1 = 0 ;
    std::vector< Date > temp1 ;
    std::vector< Date > *v1 ;
    int argvi = 0;
    Schedule *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Schedule(std::vector< Date > const &);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_Schedule. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_Schedule. "
              "Expected an array of " "Date");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_Schedule. "
          "Expected an array of " "Date");
      }
    }
    {
      try {
        result = (Schedule *)new Schedule((std::vector< Date > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Schedule, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Schedule__SWIG_3) {
  {
    Date *arg1 = 0 ;
    Date *arg2 = 0 ;
    Period *arg3 = 0 ;
    Calendar *arg4 = 0 ;
    BusinessDayConvention arg5 ;
    BusinessDayConvention arg6 ;
    DateGeneration::Rule arg7 ;
    bool arg8 ;
    Date *arg9 = 0 ;
    Date *arg10 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    int val7 ;
    int ecode7 = 0 ;
    bool val8 ;
    int ecode8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    void *argp10 ;
    int res10 = 0 ;
    int argvi = 0;
    Schedule *result = 0 ;
    dXSARGS;
    
    if ((items < 10) || (items > 10)) {
      SWIG_croak("Usage: new_Schedule(effectiveDate,terminationDate,tenor,calendar,convention,terminationDateConvention,rule,endOfMonth,firstDate,nextToLastDate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Schedule" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Schedule" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Schedule" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Schedule" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_Schedule" "', argument " "3"" of type '" "Period const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Schedule" "', argument " "3"" of type '" "Period const &""'"); 
    }
    arg3 = reinterpret_cast< Period * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_Schedule" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Schedule" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    arg4 = reinterpret_cast< Calendar * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_Schedule" "', argument " "5"" of type '" "BusinessDayConvention""'");
    } 
    arg5 = static_cast< BusinessDayConvention >(val5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_Schedule" "', argument " "6"" of type '" "BusinessDayConvention""'");
    } 
    arg6 = static_cast< BusinessDayConvention >(val6);
    ecode7 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_Schedule" "', argument " "7"" of type '" "DateGeneration::Rule""'");
    } 
    arg7 = static_cast< DateGeneration::Rule >(val7);
    ecode8 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_Schedule" "', argument " "8"" of type '" "bool""'");
    } 
    arg8 = static_cast< bool >(val8);
    res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res9)) {
      SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_Schedule" "', argument " "9"" of type '" "Date const &""'"); 
    }
    if (!argp9) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Schedule" "', argument " "9"" of type '" "Date const &""'"); 
    }
    arg9 = reinterpret_cast< Date * >(argp9);
    res10 = SWIG_ConvertPtr(ST(9), &argp10, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res10)) {
      SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "new_Schedule" "', argument " "10"" of type '" "Date const &""'"); 
    }
    if (!argp10) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Schedule" "', argument " "10"" of type '" "Date const &""'"); 
    }
    arg10 = reinterpret_cast< Date * >(argp10);
    {
      try {
        result = (Schedule *)new Schedule((Date const &)*arg1,(Date const &)*arg2,(Period const &)*arg3,(Calendar const &)*arg4,arg5,arg6,arg7,arg8,(Date const &)*arg9,(Date const &)*arg10);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Schedule, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Schedule__SWIG_4) {
  {
    Date *arg1 = 0 ;
    Date *arg2 = 0 ;
    Period *arg3 = 0 ;
    Calendar *arg4 = 0 ;
    BusinessDayConvention arg5 ;
    BusinessDayConvention arg6 ;
    DateGeneration::Rule arg7 ;
    bool arg8 ;
    Date *arg9 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    int val7 ;
    int ecode7 = 0 ;
    bool val8 ;
    int ecode8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    int argvi = 0;
    Schedule *result = 0 ;
    dXSARGS;
    
    if ((items < 9) || (items > 9)) {
      SWIG_croak("Usage: new_Schedule(effectiveDate,terminationDate,tenor,calendar,convention,terminationDateConvention,rule,endOfMonth,firstDate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Schedule" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Schedule" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Schedule" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Schedule" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_Schedule" "', argument " "3"" of type '" "Period const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Schedule" "', argument " "3"" of type '" "Period const &""'"); 
    }
    arg3 = reinterpret_cast< Period * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_Schedule" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Schedule" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    arg4 = reinterpret_cast< Calendar * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_Schedule" "', argument " "5"" of type '" "BusinessDayConvention""'");
    } 
    arg5 = static_cast< BusinessDayConvention >(val5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_Schedule" "', argument " "6"" of type '" "BusinessDayConvention""'");
    } 
    arg6 = static_cast< BusinessDayConvention >(val6);
    ecode7 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_Schedule" "', argument " "7"" of type '" "DateGeneration::Rule""'");
    } 
    arg7 = static_cast< DateGeneration::Rule >(val7);
    ecode8 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_Schedule" "', argument " "8"" of type '" "bool""'");
    } 
    arg8 = static_cast< bool >(val8);
    res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res9)) {
      SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_Schedule" "', argument " "9"" of type '" "Date const &""'"); 
    }
    if (!argp9) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Schedule" "', argument " "9"" of type '" "Date const &""'"); 
    }
    arg9 = reinterpret_cast< Date * >(argp9);
    {
      try {
        result = (Schedule *)new Schedule((Date const &)*arg1,(Date const &)*arg2,(Period const &)*arg3,(Calendar const &)*arg4,arg5,arg6,arg7,arg8,(Date const &)*arg9);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Schedule, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Schedule__SWIG_5) {
  {
    Date *arg1 = 0 ;
    Date *arg2 = 0 ;
    Period *arg3 = 0 ;
    Calendar *arg4 = 0 ;
    BusinessDayConvention arg5 ;
    BusinessDayConvention arg6 ;
    DateGeneration::Rule arg7 ;
    bool arg8 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    int val7 ;
    int ecode7 = 0 ;
    bool val8 ;
    int ecode8 = 0 ;
    int argvi = 0;
    Schedule *result = 0 ;
    dXSARGS;
    
    if ((items < 8) || (items > 8)) {
      SWIG_croak("Usage: new_Schedule(effectiveDate,terminationDate,tenor,calendar,convention,terminationDateConvention,rule,endOfMonth);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Schedule" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Schedule" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Schedule" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Schedule" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_Schedule" "', argument " "3"" of type '" "Period const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Schedule" "', argument " "3"" of type '" "Period const &""'"); 
    }
    arg3 = reinterpret_cast< Period * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_Schedule" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Schedule" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    arg4 = reinterpret_cast< Calendar * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_Schedule" "', argument " "5"" of type '" "BusinessDayConvention""'");
    } 
    arg5 = static_cast< BusinessDayConvention >(val5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_Schedule" "', argument " "6"" of type '" "BusinessDayConvention""'");
    } 
    arg6 = static_cast< BusinessDayConvention >(val6);
    ecode7 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_Schedule" "', argument " "7"" of type '" "DateGeneration::Rule""'");
    } 
    arg7 = static_cast< DateGeneration::Rule >(val7);
    ecode8 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_Schedule" "', argument " "8"" of type '" "bool""'");
    } 
    arg8 = static_cast< bool >(val8);
    {
      try {
        result = (Schedule *)new Schedule((Date const &)*arg1,(Date const &)*arg2,(Period const &)*arg3,(Calendar const &)*arg4,arg5,arg6,arg7,arg8);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Schedule, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Schedule__SWIG_6) {
  {
    int argvi = 0;
    Schedule *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Schedule();");
    }
    {
      try {
        result = (Schedule *)new Schedule();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Schedule, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_Schedule) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 8) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 9) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
    if (items == 10) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(9), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 7;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_7:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Schedule__SWIG_6); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Schedule__SWIG_2); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Schedule__SWIG_1); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Schedule__SWIG_0); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Schedule__SWIG_5); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Schedule__SWIG_4); return;
    case 7:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Schedule__SWIG_3); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Schedule'");
  XSRETURN(0);
}


XS(_wrap_Schedule_size) {
  {
    Schedule *arg1 = (Schedule *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Size result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Schedule_size(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Schedule, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Schedule_size" "', argument " "1"" of type '" "Schedule const *""'"); 
    }
    arg1 = reinterpret_cast< Schedule * >(argp1);
    {
      try {
        result = ((Schedule const *)arg1)->size();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_size_t  SWIG_PERL_CALL_ARGS_1(static_cast< size_t >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Schedule_date) {
  {
    Schedule *arg1 = (Schedule *) 0 ;
    Size arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Schedule_date(self,i);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Schedule, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Schedule_date" "', argument " "1"" of type '" "Schedule const *""'"); 
    }
    arg1 = reinterpret_cast< Schedule * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Schedule_date" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    {
      try {
        result = ((Schedule const *)arg1)->date(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Schedule_isRegular) {
  {
    Schedule *arg1 = (Schedule *) 0 ;
    Size arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Schedule_isRegular(self,i);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Schedule, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Schedule_isRegular" "', argument " "1"" of type '" "Schedule const *""'"); 
    }
    arg1 = reinterpret_cast< Schedule * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Schedule_isRegular" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    {
      try {
        result = (bool)((Schedule const *)arg1)->isRegular(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Schedule_until) {
  {
    Schedule *arg1 = (Schedule *) 0 ;
    Date arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    Schedule result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Schedule_until(self,truncationDate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Schedule, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Schedule_until" "', argument " "1"" of type '" "Schedule const *""'"); 
    }
    arg1 = reinterpret_cast< Schedule * >(argp1);
    {
      res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Schedule_until" "', argument " "2"" of type '" "Date""'"); 
      }  
      if (!argp2) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Schedule_until" "', argument " "2"" of type '" "Date""'");
      } else {
        arg2 = *(reinterpret_cast< Date * >(argp2));
      }
    }
    {
      try {
        result = ((Schedule const *)arg1)->until(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Schedule(static_cast< const Schedule& >(result))), SWIGTYPE_p_Schedule, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_Schedule) {
  {
    Schedule *arg1 = (Schedule *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Schedule(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Schedule, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Schedule" "', argument " "1"" of type '" "Schedule *""'"); 
    }
    arg1 = reinterpret_cast< Schedule * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CashFlow___deref__) {
  {
    boost::shared_ptr< CashFlow > *arg1 = (boost::shared_ptr< CashFlow > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    CashFlow *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CashFlow___deref__(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_CashFlow_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CashFlow___deref__" "', argument " "1"" of type '" "boost::shared_ptr< CashFlow > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< CashFlow > * >(argp1);
    {
      try {
        result = (CashFlow *)(arg1)->operator ->();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CashFlow, 0 | 0); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CashFlow_isNull) {
  {
    boost::shared_ptr< CashFlow > *arg1 = (boost::shared_ptr< CashFlow > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CashFlow_isNull(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_CashFlow_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CashFlow_isNull" "', argument " "1"" of type '" "boost::shared_ptr< CashFlow > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< CashFlow > * >(argp1);
    {
      try {
        result = (bool)boost_shared_ptr_Sl_CashFlow_Sg__isNull(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CashFlow_asObservable) {
  {
    boost::shared_ptr< CashFlow > *arg1 = (boost::shared_ptr< CashFlow > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    boost::shared_ptr< Observable > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CashFlow_asObservable(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_CashFlow_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CashFlow_asObservable" "', argument " "1"" of type '" "boost::shared_ptr< CashFlow > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< CashFlow > * >(argp1);
    {
      try {
        result = boost_shared_ptr_Sl_CashFlow_Sg__asObservable(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new boost::shared_ptr< Observable >(static_cast< const boost::shared_ptr< Observable >& >(result))), SWIGTYPE_p_boost__shared_ptrT_Observable_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CashFlow) {
  {
    int argvi = 0;
    boost::shared_ptr< CashFlow > *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_CashFlow();");
    }
    {
      try {
        result = (boost::shared_ptr< CashFlow > *)new boost::shared_ptr< CashFlow >();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_boost__shared_ptrT_CashFlow_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_CashFlow) {
  {
    boost::shared_ptr< CashFlow > *arg1 = (boost::shared_ptr< CashFlow > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_CashFlow(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_CashFlow_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CashFlow" "', argument " "1"" of type '" "boost::shared_ptr< CashFlow > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< CashFlow > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CashFlow_amount) {
  {
    boost::shared_ptr< CashFlow > *arg1 = (boost::shared_ptr< CashFlow > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CashFlow_amount(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_CashFlow_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CashFlow_amount" "', argument " "1"" of type '" "boost::shared_ptr< CashFlow > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< CashFlow > * >(argp1);
    {
      try {
        result = (Real)(*arg1)->amount();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CashFlow_date) {
  {
    boost::shared_ptr< CashFlow > *arg1 = (boost::shared_ptr< CashFlow > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CashFlow_date(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_CashFlow_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CashFlow_date" "', argument " "1"" of type '" "boost::shared_ptr< CashFlow > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< CashFlow > * >(argp1);
    {
      try {
        result = (*arg1)->date();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Leg__SWIG_0) {
  {
    unsigned int arg1 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    std::vector< boost::shared_ptr< CashFlow > > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Leg(size);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Leg" "', argument " "1"" of type '" "unsigned int""'");
    } 
    arg1 = static_cast< unsigned int >(val1);
    {
      try {
        result = (std::vector< boost::shared_ptr< CashFlow > > *)new std::vector< boost::shared_ptr< CashFlow > >(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Leg__SWIG_1) {
  {
    int argvi = 0;
    std::vector< boost::shared_ptr< CashFlow > > *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Leg();");
    }
    {
      try {
        result = (std::vector< boost::shared_ptr< CashFlow > > *)new std::vector< boost::shared_ptr< CashFlow > >();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_Leg__SWIG_2) {
  {
    unsigned int arg1 ;
    boost::shared_ptr< CashFlow > *arg2 = 0 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    std::vector< boost::shared_ptr< CashFlow > > *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_Leg(size,value);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Leg" "', argument " "1"" of type '" "unsigned int""'");
    } 
    arg1 = static_cast< unsigned int >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Leg" "', argument " "2"" of type '" "boost::shared_ptr< CashFlow > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Leg" "', argument " "2"" of type '" "boost::shared_ptr< CashFlow > const &""'"); 
    }
    arg2 = reinterpret_cast< boost::shared_ptr< CashFlow > * >(argp2);
    {
      try {
        result = (std::vector< boost::shared_ptr< CashFlow > > *)new std::vector< boost::shared_ptr< CashFlow > >(arg1,(boost::shared_ptr< CashFlow > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Leg__SWIG_3) {
  {
    std::vector< boost::shared_ptr< CashFlow > > *arg1 = 0 ;
    std::vector< boost::shared_ptr< CashFlow > > temp1 ;
    std::vector< boost::shared_ptr< CashFlow > > *v1 ;
    int argvi = 0;
    std::vector< boost::shared_ptr< CashFlow > > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Leg(std::vector< boost::shared_ptr< CashFlow > > const &);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_Leg. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CashFlow >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_Leg. "
              "Expected an array of " "boost::shared_ptr< CashFlow >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_Leg. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
      }
    }
    {
      try {
        result = (std::vector< boost::shared_ptr< CashFlow > > *)new std::vector< boost::shared_ptr< CashFlow > >((std::vector< boost::shared_ptr< CashFlow > > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Leg) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< CashFlow > >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< CashFlow >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_boost__shared_ptrT_CashFlow_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Leg__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Leg__SWIG_0); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Leg__SWIG_3); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Leg__SWIG_2); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Leg'");
  XSRETURN(0);
}


XS(_wrap_Leg_size) {
  {
    std::vector< boost::shared_ptr< CashFlow > > *arg1 = (std::vector< boost::shared_ptr< CashFlow > > *) 0 ;
    std::vector< boost::shared_ptr< CashFlow > > temp1 ;
    std::vector< boost::shared_ptr< CashFlow > > *v1 ;
    int argvi = 0;
    unsigned int result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Leg_size(self);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of Leg_size. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CashFlow >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "Leg_size. "
              "Expected an array of " "boost::shared_ptr< CashFlow >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of Leg_size. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
      }
    }
    {
      try {
        result = (unsigned int)((std::vector< boost::shared_ptr< CashFlow > > const *)arg1)->size();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Leg_empty) {
  {
    std::vector< boost::shared_ptr< CashFlow > > *arg1 = (std::vector< boost::shared_ptr< CashFlow > > *) 0 ;
    std::vector< boost::shared_ptr< CashFlow > > temp1 ;
    std::vector< boost::shared_ptr< CashFlow > > *v1 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Leg_empty(self);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of Leg_empty. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CashFlow >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "Leg_empty. "
              "Expected an array of " "boost::shared_ptr< CashFlow >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of Leg_empty. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
      }
    }
    {
      try {
        result = (bool)((std::vector< boost::shared_ptr< CashFlow > > const *)arg1)->empty();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Leg_clear) {
  {
    std::vector< boost::shared_ptr< CashFlow > > *arg1 = (std::vector< boost::shared_ptr< CashFlow > > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Leg_clear(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Leg_clear" "', argument " "1"" of type '" "std::vector< boost::shared_ptr< CashFlow > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< boost::shared_ptr< CashFlow > > * >(argp1);
    {
      try {
        (arg1)->clear();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Leg_push) {
  {
    std::vector< boost::shared_ptr< CashFlow > > *arg1 = (std::vector< boost::shared_ptr< CashFlow > > *) 0 ;
    boost::shared_ptr< CashFlow > *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Leg_push(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Leg_push" "', argument " "1"" of type '" "std::vector< boost::shared_ptr< CashFlow > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< boost::shared_ptr< CashFlow > > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Leg_push" "', argument " "2"" of type '" "boost::shared_ptr< CashFlow > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Leg_push" "', argument " "2"" of type '" "boost::shared_ptr< CashFlow > const &""'"); 
    }
    arg2 = reinterpret_cast< boost::shared_ptr< CashFlow > * >(argp2);
    {
      try {
        (arg1)->push_back((boost::shared_ptr< CashFlow > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Leg_pop) {
  {
    std::vector< boost::shared_ptr< CashFlow > > *arg1 = (std::vector< boost::shared_ptr< CashFlow > > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    boost::shared_ptr< CashFlow > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Leg_pop(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Leg_pop" "', argument " "1"" of type '" "std::vector< boost::shared_ptr< CashFlow > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< boost::shared_ptr< CashFlow > > * >(argp1);
    {
      try {
        try {
          result = std_vector_Sl_boost_shared_ptr_Sl_CashFlow_Sg__Sg__pop(arg1);
        }
        catch(std::out_of_range &_e) {
          sv_setsv(get_sv("@", GV_ADD), SWIG_NewPointerObj((new std::out_of_range(static_cast< const std::out_of_range& >(_e))),SWIGTYPE_p_std__out_of_range,SWIG_POINTER_OWN)); SWIG_fail ;
        }
        
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new boost::shared_ptr< CashFlow >(static_cast< const boost::shared_ptr< CashFlow >& >(result))), SWIGTYPE_p_boost__shared_ptrT_CashFlow_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Leg_get) {
  {
    std::vector< boost::shared_ptr< CashFlow > > *arg1 = (std::vector< boost::shared_ptr< CashFlow > > *) 0 ;
    int arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    boost::shared_ptr< CashFlow > *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Leg_get(self,i);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Leg_get" "', argument " "1"" of type '" "std::vector< boost::shared_ptr< CashFlow > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< boost::shared_ptr< CashFlow > > * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Leg_get" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    {
      try {
        try {
          result = (boost::shared_ptr< CashFlow > *) &std_vector_Sl_boost_shared_ptr_Sl_CashFlow_Sg__Sg__get(arg1,arg2);
        }
        catch(std::out_of_range &_e) {
          sv_setsv(get_sv("@", GV_ADD), SWIG_NewPointerObj((new std::out_of_range(static_cast< const std::out_of_range& >(_e))),SWIGTYPE_p_std__out_of_range,SWIG_POINTER_OWN)); SWIG_fail ;
        }
        
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_boost__shared_ptrT_CashFlow_t, 0 | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Leg_set) {
  {
    std::vector< boost::shared_ptr< CashFlow > > *arg1 = (std::vector< boost::shared_ptr< CashFlow > > *) 0 ;
    int arg2 ;
    boost::shared_ptr< CashFlow > *arg3 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: Leg_set(self,i,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Leg_set" "', argument " "1"" of type '" "std::vector< boost::shared_ptr< CashFlow > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< boost::shared_ptr< CashFlow > > * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Leg_set" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Leg_set" "', argument " "3"" of type '" "boost::shared_ptr< CashFlow > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Leg_set" "', argument " "3"" of type '" "boost::shared_ptr< CashFlow > const &""'"); 
    }
    arg3 = reinterpret_cast< boost::shared_ptr< CashFlow > * >(argp3);
    {
      try {
        try {
          std_vector_Sl_boost_shared_ptr_Sl_CashFlow_Sg__Sg__set(arg1,arg2,(boost::shared_ptr< CashFlow > const &)*arg3);
        }
        catch(std::out_of_range &_e) {
          sv_setsv(get_sv("@", GV_ADD), SWIG_NewPointerObj((new std::out_of_range(static_cast< const std::out_of_range& >(_e))),SWIGTYPE_p_std__out_of_range,SWIG_POINTER_OWN)); SWIG_fail ;
        }
        
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_Leg) {
  {
    std::vector< boost::shared_ptr< CashFlow > > *arg1 = (std::vector< boost::shared_ptr< CashFlow > > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Leg(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Leg" "', argument " "1"" of type '" "std::vector< boost::shared_ptr< CashFlow > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< boost::shared_ptr< CashFlow > > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SimpleCashFlow) {
  {
    Real arg1 ;
    Date *arg2 = 0 ;
    double val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    SimpleCashFlowPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_SimpleCashFlow(amount,date);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_SimpleCashFlow" "', argument " "1"" of type '" "Real""'");
    } 
    arg1 = static_cast< Real >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SimpleCashFlow" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SimpleCashFlow" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    {
      try {
        result = (SimpleCashFlowPtr *)new_SimpleCashFlowPtr(arg1,(Date const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SimpleCashFlowPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_SimpleCashFlow) {
  {
    SimpleCashFlowPtr *arg1 = (SimpleCashFlowPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_SimpleCashFlow(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SimpleCashFlowPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SimpleCashFlow" "', argument " "1"" of type '" "SimpleCashFlowPtr *""'"); 
    }
    arg1 = reinterpret_cast< SimpleCashFlowPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Redemption) {
  {
    Real arg1 ;
    Date *arg2 = 0 ;
    double val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    RedemptionPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_Redemption(amount,date);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Redemption" "', argument " "1"" of type '" "Real""'");
    } 
    arg1 = static_cast< Real >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Redemption" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Redemption" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    {
      try {
        result = (RedemptionPtr *)new_RedemptionPtr(arg1,(Date const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_RedemptionPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_Redemption) {
  {
    RedemptionPtr *arg1 = (RedemptionPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Redemption(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_RedemptionPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Redemption" "', argument " "1"" of type '" "RedemptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< RedemptionPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_AmortizingPayment) {
  {
    Real arg1 ;
    Date *arg2 = 0 ;
    double val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    AmortizingPaymentPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_AmortizingPayment(amount,date);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_AmortizingPayment" "', argument " "1"" of type '" "Real""'");
    } 
    arg1 = static_cast< Real >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_AmortizingPayment" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AmortizingPayment" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    {
      try {
        result = (AmortizingPaymentPtr *)new_AmortizingPaymentPtr(arg1,(Date const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_AmortizingPaymentPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_AmortizingPayment) {
  {
    AmortizingPaymentPtr *arg1 = (AmortizingPaymentPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_AmortizingPayment(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_AmortizingPaymentPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_AmortizingPayment" "', argument " "1"" of type '" "AmortizingPaymentPtr *""'"); 
    }
    arg1 = reinterpret_cast< AmortizingPaymentPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Coupon_nominal) {
  {
    CouponPtr *arg1 = (CouponPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Coupon_nominal(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CouponPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Coupon_nominal" "', argument " "1"" of type '" "CouponPtr *""'"); 
    }
    arg1 = reinterpret_cast< CouponPtr * >(argp1);
    {
      try {
        result = (Real)CouponPtr_nominal(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Coupon_accrualStartDate) {
  {
    CouponPtr *arg1 = (CouponPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Coupon_accrualStartDate(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CouponPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Coupon_accrualStartDate" "', argument " "1"" of type '" "CouponPtr *""'"); 
    }
    arg1 = reinterpret_cast< CouponPtr * >(argp1);
    {
      try {
        result = CouponPtr_accrualStartDate(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Coupon_accrualEndDate) {
  {
    CouponPtr *arg1 = (CouponPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Coupon_accrualEndDate(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CouponPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Coupon_accrualEndDate" "', argument " "1"" of type '" "CouponPtr *""'"); 
    }
    arg1 = reinterpret_cast< CouponPtr * >(argp1);
    {
      try {
        result = CouponPtr_accrualEndDate(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Coupon_referencePeriodStart) {
  {
    CouponPtr *arg1 = (CouponPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Coupon_referencePeriodStart(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CouponPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Coupon_referencePeriodStart" "', argument " "1"" of type '" "CouponPtr *""'"); 
    }
    arg1 = reinterpret_cast< CouponPtr * >(argp1);
    {
      try {
        result = CouponPtr_referencePeriodStart(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Coupon_referencePeriodEnd) {
  {
    CouponPtr *arg1 = (CouponPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Coupon_referencePeriodEnd(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CouponPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Coupon_referencePeriodEnd" "', argument " "1"" of type '" "CouponPtr *""'"); 
    }
    arg1 = reinterpret_cast< CouponPtr * >(argp1);
    {
      try {
        result = CouponPtr_referencePeriodEnd(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Coupon_exCouponDate) {
  {
    CouponPtr *arg1 = (CouponPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Coupon_exCouponDate(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CouponPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Coupon_exCouponDate" "', argument " "1"" of type '" "CouponPtr *""'"); 
    }
    arg1 = reinterpret_cast< CouponPtr * >(argp1);
    {
      try {
        result = CouponPtr_exCouponDate(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Coupon_rate) {
  {
    CouponPtr *arg1 = (CouponPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Coupon_rate(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CouponPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Coupon_rate" "', argument " "1"" of type '" "CouponPtr *""'"); 
    }
    arg1 = reinterpret_cast< CouponPtr * >(argp1);
    {
      try {
        result = (Real)CouponPtr_rate(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Coupon_accrualPeriod) {
  {
    CouponPtr *arg1 = (CouponPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Time result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Coupon_accrualPeriod(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CouponPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Coupon_accrualPeriod" "', argument " "1"" of type '" "CouponPtr *""'"); 
    }
    arg1 = reinterpret_cast< CouponPtr * >(argp1);
    {
      try {
        result = (Time)CouponPtr_accrualPeriod(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Coupon_accrualDays) {
  {
    CouponPtr *arg1 = (CouponPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    BigInteger result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Coupon_accrualDays(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CouponPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Coupon_accrualDays" "', argument " "1"" of type '" "CouponPtr *""'"); 
    }
    arg1 = reinterpret_cast< CouponPtr * >(argp1);
    {
      try {
        result = (BigInteger)CouponPtr_accrualDays(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_long  SWIG_PERL_CALL_ARGS_1(static_cast< long >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Coupon_dayCounter) {
  {
    CouponPtr *arg1 = (CouponPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    SwigValueWrapper< DayCounter > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Coupon_dayCounter(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CouponPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Coupon_dayCounter" "', argument " "1"" of type '" "CouponPtr const *""'"); 
    }
    arg1 = reinterpret_cast< CouponPtr * >(argp1);
    {
      try {
        result = CouponPtr_dayCounter((CouponPtr const *)arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new DayCounter(static_cast< const DayCounter& >(result))), SWIGTYPE_p_DayCounter, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Coupon_accruedAmount) {
  {
    CouponPtr *arg1 = (CouponPtr *) 0 ;
    Date *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Coupon_accruedAmount(self,date);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CouponPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Coupon_accruedAmount" "', argument " "1"" of type '" "CouponPtr *""'"); 
    }
    arg1 = reinterpret_cast< CouponPtr * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Coupon_accruedAmount" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Coupon_accruedAmount" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    {
      try {
        result = (Real)CouponPtr_accruedAmount(arg1,(Date const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_Coupon) {
  {
    CouponPtr *arg1 = (CouponPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Coupon(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CouponPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Coupon" "', argument " "1"" of type '" "CouponPtr *""'"); 
    }
    arg1 = reinterpret_cast< CouponPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_as_coupon) {
  {
    boost::shared_ptr< CashFlow > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    SwigValueWrapper< CouponPtr > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: as_coupon(cf);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "as_coupon" "', argument " "1"" of type '" "boost::shared_ptr< CashFlow > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "as_coupon" "', argument " "1"" of type '" "boost::shared_ptr< CashFlow > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< CashFlow > * >(argp1);
    {
      try {
        result = as_coupon((boost::shared_ptr< CashFlow > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new CouponPtr(static_cast< const CouponPtr& >(result))), SWIGTYPE_p_CouponPtr, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FixedRateCoupon__SWIG_0) {
  {
    Date *arg1 = 0 ;
    Real arg2 ;
    Rate arg3 ;
    DayCounter *arg4 = 0 ;
    Date *arg5 = 0 ;
    Date *arg6 = 0 ;
    Date *arg7 = 0 ;
    Date *arg8 = 0 ;
    Date *arg9 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    int argvi = 0;
    FixedRateCouponPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 9) || (items > 9)) {
      SWIG_croak("Usage: new_FixedRateCoupon(paymentDate,nominal,rate,dayCounter,startDate,endDate,refPeriodStart,refPeriodEnd,exCouponDate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FixedRateCoupon" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateCoupon" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FixedRateCoupon" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_FixedRateCoupon" "', argument " "3"" of type '" "Rate""'");
    } 
    arg3 = static_cast< Rate >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FixedRateCoupon" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateCoupon" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_FixedRateCoupon" "', argument " "5"" of type '" "Date const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateCoupon" "', argument " "5"" of type '" "Date const &""'"); 
    }
    arg5 = reinterpret_cast< Date * >(argp5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_FixedRateCoupon" "', argument " "6"" of type '" "Date const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateCoupon" "', argument " "6"" of type '" "Date const &""'"); 
    }
    arg6 = reinterpret_cast< Date * >(argp6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_FixedRateCoupon" "', argument " "7"" of type '" "Date const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateCoupon" "', argument " "7"" of type '" "Date const &""'"); 
    }
    arg7 = reinterpret_cast< Date * >(argp7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_FixedRateCoupon" "', argument " "8"" of type '" "Date const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateCoupon" "', argument " "8"" of type '" "Date const &""'"); 
    }
    arg8 = reinterpret_cast< Date * >(argp8);
    res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res9)) {
      SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_FixedRateCoupon" "', argument " "9"" of type '" "Date const &""'"); 
    }
    if (!argp9) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateCoupon" "', argument " "9"" of type '" "Date const &""'"); 
    }
    arg9 = reinterpret_cast< Date * >(argp9);
    {
      try {
        result = (FixedRateCouponPtr *)new_FixedRateCouponPtr__SWIG_0((Date const &)*arg1,arg2,arg3,(DayCounter const &)*arg4,(Date const &)*arg5,(Date const &)*arg6,(Date const &)*arg7,(Date const &)*arg8,(Date const &)*arg9);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FixedRateCouponPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FixedRateCoupon__SWIG_1) {
  {
    Date *arg1 = 0 ;
    Real arg2 ;
    Rate arg3 ;
    DayCounter *arg4 = 0 ;
    Date *arg5 = 0 ;
    Date *arg6 = 0 ;
    Date *arg7 = 0 ;
    Date *arg8 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    int argvi = 0;
    FixedRateCouponPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 8) || (items > 8)) {
      SWIG_croak("Usage: new_FixedRateCoupon(paymentDate,nominal,rate,dayCounter,startDate,endDate,refPeriodStart,refPeriodEnd);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FixedRateCoupon" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateCoupon" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FixedRateCoupon" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_FixedRateCoupon" "', argument " "3"" of type '" "Rate""'");
    } 
    arg3 = static_cast< Rate >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FixedRateCoupon" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateCoupon" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_FixedRateCoupon" "', argument " "5"" of type '" "Date const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateCoupon" "', argument " "5"" of type '" "Date const &""'"); 
    }
    arg5 = reinterpret_cast< Date * >(argp5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_FixedRateCoupon" "', argument " "6"" of type '" "Date const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateCoupon" "', argument " "6"" of type '" "Date const &""'"); 
    }
    arg6 = reinterpret_cast< Date * >(argp6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_FixedRateCoupon" "', argument " "7"" of type '" "Date const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateCoupon" "', argument " "7"" of type '" "Date const &""'"); 
    }
    arg7 = reinterpret_cast< Date * >(argp7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_FixedRateCoupon" "', argument " "8"" of type '" "Date const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateCoupon" "', argument " "8"" of type '" "Date const &""'"); 
    }
    arg8 = reinterpret_cast< Date * >(argp8);
    {
      try {
        result = (FixedRateCouponPtr *)new_FixedRateCouponPtr__SWIG_0((Date const &)*arg1,arg2,arg3,(DayCounter const &)*arg4,(Date const &)*arg5,(Date const &)*arg6,(Date const &)*arg7,(Date const &)*arg8);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FixedRateCouponPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FixedRateCoupon__SWIG_2) {
  {
    Date *arg1 = 0 ;
    Real arg2 ;
    Rate arg3 ;
    DayCounter *arg4 = 0 ;
    Date *arg5 = 0 ;
    Date *arg6 = 0 ;
    Date *arg7 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    int argvi = 0;
    FixedRateCouponPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: new_FixedRateCoupon(paymentDate,nominal,rate,dayCounter,startDate,endDate,refPeriodStart);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FixedRateCoupon" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateCoupon" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FixedRateCoupon" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_FixedRateCoupon" "', argument " "3"" of type '" "Rate""'");
    } 
    arg3 = static_cast< Rate >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FixedRateCoupon" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateCoupon" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_FixedRateCoupon" "', argument " "5"" of type '" "Date const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateCoupon" "', argument " "5"" of type '" "Date const &""'"); 
    }
    arg5 = reinterpret_cast< Date * >(argp5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_FixedRateCoupon" "', argument " "6"" of type '" "Date const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateCoupon" "', argument " "6"" of type '" "Date const &""'"); 
    }
    arg6 = reinterpret_cast< Date * >(argp6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_FixedRateCoupon" "', argument " "7"" of type '" "Date const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateCoupon" "', argument " "7"" of type '" "Date const &""'"); 
    }
    arg7 = reinterpret_cast< Date * >(argp7);
    {
      try {
        result = (FixedRateCouponPtr *)new_FixedRateCouponPtr__SWIG_0((Date const &)*arg1,arg2,arg3,(DayCounter const &)*arg4,(Date const &)*arg5,(Date const &)*arg6,(Date const &)*arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FixedRateCouponPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FixedRateCoupon__SWIG_3) {
  {
    Date *arg1 = 0 ;
    Real arg2 ;
    Rate arg3 ;
    DayCounter *arg4 = 0 ;
    Date *arg5 = 0 ;
    Date *arg6 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    int argvi = 0;
    FixedRateCouponPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_FixedRateCoupon(paymentDate,nominal,rate,dayCounter,startDate,endDate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FixedRateCoupon" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateCoupon" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FixedRateCoupon" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_FixedRateCoupon" "', argument " "3"" of type '" "Rate""'");
    } 
    arg3 = static_cast< Rate >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FixedRateCoupon" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateCoupon" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_FixedRateCoupon" "', argument " "5"" of type '" "Date const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateCoupon" "', argument " "5"" of type '" "Date const &""'"); 
    }
    arg5 = reinterpret_cast< Date * >(argp5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_FixedRateCoupon" "', argument " "6"" of type '" "Date const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateCoupon" "', argument " "6"" of type '" "Date const &""'"); 
    }
    arg6 = reinterpret_cast< Date * >(argp6);
    {
      try {
        result = (FixedRateCouponPtr *)new_FixedRateCouponPtr__SWIG_0((Date const &)*arg1,arg2,arg3,(DayCounter const &)*arg4,(Date const &)*arg5,(Date const &)*arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FixedRateCouponPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FixedRateCoupon) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 8) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 9) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FixedRateCoupon__SWIG_3); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FixedRateCoupon__SWIG_2); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FixedRateCoupon__SWIG_1); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FixedRateCoupon__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_FixedRateCoupon'");
  XSRETURN(0);
}


XS(_wrap_FixedRateCoupon_interestRate) {
  {
    FixedRateCouponPtr *arg1 = (FixedRateCouponPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    InterestRate result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: FixedRateCoupon_interestRate(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_FixedRateCouponPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FixedRateCoupon_interestRate" "', argument " "1"" of type '" "FixedRateCouponPtr *""'"); 
    }
    arg1 = reinterpret_cast< FixedRateCouponPtr * >(argp1);
    {
      try {
        result = FixedRateCouponPtr_interestRate(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new InterestRate(static_cast< const InterestRate& >(result))), SWIGTYPE_p_InterestRate, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_FixedRateCoupon) {
  {
    FixedRateCouponPtr *arg1 = (FixedRateCouponPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_FixedRateCoupon(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_FixedRateCouponPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FixedRateCoupon" "', argument " "1"" of type '" "FixedRateCouponPtr *""'"); 
    }
    arg1 = reinterpret_cast< FixedRateCouponPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_as_fixed_rate_coupon) {
  {
    boost::shared_ptr< CashFlow > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    SwigValueWrapper< FixedRateCouponPtr > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: as_fixed_rate_coupon(cf);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "as_fixed_rate_coupon" "', argument " "1"" of type '" "boost::shared_ptr< CashFlow > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "as_fixed_rate_coupon" "', argument " "1"" of type '" "boost::shared_ptr< CashFlow > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< CashFlow > * >(argp1);
    {
      try {
        result = as_fixed_rate_coupon((boost::shared_ptr< CashFlow > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new FixedRateCouponPtr(static_cast< const FixedRateCouponPtr& >(result))), SWIGTYPE_p_FixedRateCouponPtr, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_FloatingRateCouponPricer___deref__) {
  {
    boost::shared_ptr< FloatingRateCouponPricer > *arg1 = (boost::shared_ptr< FloatingRateCouponPricer > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    FloatingRateCouponPricer *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: FloatingRateCouponPricer___deref__(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_FloatingRateCouponPricer_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FloatingRateCouponPricer___deref__" "', argument " "1"" of type '" "boost::shared_ptr< FloatingRateCouponPricer > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< FloatingRateCouponPricer > * >(argp1);
    {
      try {
        result = (FloatingRateCouponPricer *)(arg1)->operator ->();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FloatingRateCouponPricer, 0 | 0); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_FloatingRateCouponPricer_isNull) {
  {
    boost::shared_ptr< FloatingRateCouponPricer > *arg1 = (boost::shared_ptr< FloatingRateCouponPricer > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: FloatingRateCouponPricer_isNull(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_FloatingRateCouponPricer_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FloatingRateCouponPricer_isNull" "', argument " "1"" of type '" "boost::shared_ptr< FloatingRateCouponPricer > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< FloatingRateCouponPricer > * >(argp1);
    {
      try {
        result = (bool)boost_shared_ptr_Sl_FloatingRateCouponPricer_Sg__isNull(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FloatingRateCouponPricer) {
  {
    int argvi = 0;
    boost::shared_ptr< FloatingRateCouponPricer > *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_FloatingRateCouponPricer();");
    }
    {
      try {
        result = (boost::shared_ptr< FloatingRateCouponPricer > *)new boost::shared_ptr< FloatingRateCouponPricer >();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_boost__shared_ptrT_FloatingRateCouponPricer_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_FloatingRateCouponPricer) {
  {
    boost::shared_ptr< FloatingRateCouponPricer > *arg1 = (boost::shared_ptr< FloatingRateCouponPricer > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_FloatingRateCouponPricer(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_FloatingRateCouponPricer_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FloatingRateCouponPricer" "', argument " "1"" of type '" "boost::shared_ptr< FloatingRateCouponPricer > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< FloatingRateCouponPricer > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_setCouponPricer) {
  {
    Leg *arg1 = 0 ;
    boost::shared_ptr< FloatingRateCouponPricer > *arg2 = 0 ;
    std::vector< boost::shared_ptr< CashFlow > > temp1 ;
    std::vector< boost::shared_ptr< CashFlow > > *v1 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: setCouponPricer(Leg const &,boost::shared_ptr< FloatingRateCouponPricer > const &);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of setCouponPricer. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CashFlow >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "setCouponPricer. "
              "Expected an array of " "boost::shared_ptr< CashFlow >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of setCouponPricer. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
      }
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_boost__shared_ptrT_FloatingRateCouponPricer_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "setCouponPricer" "', argument " "2"" of type '" "boost::shared_ptr< FloatingRateCouponPricer > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "setCouponPricer" "', argument " "2"" of type '" "boost::shared_ptr< FloatingRateCouponPricer > const &""'"); 
    }
    arg2 = reinterpret_cast< boost::shared_ptr< FloatingRateCouponPricer > * >(argp2);
    {
      try {
        setCouponPricer((std::vector< boost::shared_ptr< CashFlow > > const &)*arg1,(boost::shared_ptr< FloatingRateCouponPricer > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_FloatingRateCoupon_fixingDate) {
  {
    FloatingRateCouponPtr *arg1 = (FloatingRateCouponPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: FloatingRateCoupon_fixingDate(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_FloatingRateCouponPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FloatingRateCoupon_fixingDate" "', argument " "1"" of type '" "FloatingRateCouponPtr *""'"); 
    }
    arg1 = reinterpret_cast< FloatingRateCouponPtr * >(argp1);
    {
      try {
        result = FloatingRateCouponPtr_fixingDate(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_FloatingRateCoupon_fixingDays) {
  {
    FloatingRateCouponPtr *arg1 = (FloatingRateCouponPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Integer result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: FloatingRateCoupon_fixingDays(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_FloatingRateCouponPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FloatingRateCoupon_fixingDays" "', argument " "1"" of type '" "FloatingRateCouponPtr *""'"); 
    }
    arg1 = reinterpret_cast< FloatingRateCouponPtr * >(argp1);
    {
      try {
        result = (Integer)FloatingRateCouponPtr_fixingDays(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_FloatingRateCoupon_isInArrears) {
  {
    FloatingRateCouponPtr *arg1 = (FloatingRateCouponPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: FloatingRateCoupon_isInArrears(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_FloatingRateCouponPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FloatingRateCoupon_isInArrears" "', argument " "1"" of type '" "FloatingRateCouponPtr *""'"); 
    }
    arg1 = reinterpret_cast< FloatingRateCouponPtr * >(argp1);
    {
      try {
        result = (bool)FloatingRateCouponPtr_isInArrears(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_FloatingRateCoupon_gearing) {
  {
    FloatingRateCouponPtr *arg1 = (FloatingRateCouponPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: FloatingRateCoupon_gearing(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_FloatingRateCouponPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FloatingRateCoupon_gearing" "', argument " "1"" of type '" "FloatingRateCouponPtr *""'"); 
    }
    arg1 = reinterpret_cast< FloatingRateCouponPtr * >(argp1);
    {
      try {
        result = (Real)FloatingRateCouponPtr_gearing(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_FloatingRateCoupon_spread) {
  {
    FloatingRateCouponPtr *arg1 = (FloatingRateCouponPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: FloatingRateCoupon_spread(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_FloatingRateCouponPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FloatingRateCoupon_spread" "', argument " "1"" of type '" "FloatingRateCouponPtr *""'"); 
    }
    arg1 = reinterpret_cast< FloatingRateCouponPtr * >(argp1);
    {
      try {
        result = (Rate)FloatingRateCouponPtr_spread(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_FloatingRateCoupon_indexFixing) {
  {
    FloatingRateCouponPtr *arg1 = (FloatingRateCouponPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: FloatingRateCoupon_indexFixing(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_FloatingRateCouponPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FloatingRateCoupon_indexFixing" "', argument " "1"" of type '" "FloatingRateCouponPtr *""'"); 
    }
    arg1 = reinterpret_cast< FloatingRateCouponPtr * >(argp1);
    {
      try {
        result = (Rate)FloatingRateCouponPtr_indexFixing(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_FloatingRateCoupon_adjustedFixing) {
  {
    FloatingRateCouponPtr *arg1 = (FloatingRateCouponPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: FloatingRateCoupon_adjustedFixing(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_FloatingRateCouponPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FloatingRateCoupon_adjustedFixing" "', argument " "1"" of type '" "FloatingRateCouponPtr *""'"); 
    }
    arg1 = reinterpret_cast< FloatingRateCouponPtr * >(argp1);
    {
      try {
        result = (Rate)FloatingRateCouponPtr_adjustedFixing(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_FloatingRateCoupon_convexityAdjustment) {
  {
    FloatingRateCouponPtr *arg1 = (FloatingRateCouponPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: FloatingRateCoupon_convexityAdjustment(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_FloatingRateCouponPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FloatingRateCoupon_convexityAdjustment" "', argument " "1"" of type '" "FloatingRateCouponPtr *""'"); 
    }
    arg1 = reinterpret_cast< FloatingRateCouponPtr * >(argp1);
    {
      try {
        result = (Rate)FloatingRateCouponPtr_convexityAdjustment(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_FloatingRateCoupon_price) {
  {
    FloatingRateCouponPtr *arg1 = (FloatingRateCouponPtr *) 0 ;
    Handle< YieldTermStructure > *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: FloatingRateCoupon_price(self,discountCurve);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_FloatingRateCouponPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FloatingRateCoupon_price" "', argument " "1"" of type '" "FloatingRateCouponPtr *""'"); 
    }
    arg1 = reinterpret_cast< FloatingRateCouponPtr * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FloatingRateCoupon_price" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FloatingRateCoupon_price" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< YieldTermStructure > * >(argp2);
    {
      try {
        result = (Real)FloatingRateCouponPtr_price(arg1,(Handle< YieldTermStructure > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_FloatingRateCoupon_index) {
  {
    FloatingRateCouponPtr *arg1 = (FloatingRateCouponPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    SwigValueWrapper< InterestRateIndexPtr > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: FloatingRateCoupon_index(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_FloatingRateCouponPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FloatingRateCoupon_index" "', argument " "1"" of type '" "FloatingRateCouponPtr const *""'"); 
    }
    arg1 = reinterpret_cast< FloatingRateCouponPtr * >(argp1);
    {
      try {
        result = FloatingRateCouponPtr_index((FloatingRateCouponPtr const *)arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new InterestRateIndexPtr(static_cast< const InterestRateIndexPtr& >(result))), SWIGTYPE_p_InterestRateIndexPtr, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_FloatingRateCoupon_setPricer) {
  {
    FloatingRateCouponPtr *arg1 = (FloatingRateCouponPtr *) 0 ;
    boost::shared_ptr< FloatingRateCouponPricer > *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: FloatingRateCoupon_setPricer(self,p);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_FloatingRateCouponPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FloatingRateCoupon_setPricer" "', argument " "1"" of type '" "FloatingRateCouponPtr *""'"); 
    }
    arg1 = reinterpret_cast< FloatingRateCouponPtr * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_boost__shared_ptrT_FloatingRateCouponPricer_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FloatingRateCoupon_setPricer" "', argument " "2"" of type '" "boost::shared_ptr< FloatingRateCouponPricer > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FloatingRateCoupon_setPricer" "', argument " "2"" of type '" "boost::shared_ptr< FloatingRateCouponPricer > const &""'"); 
    }
    arg2 = reinterpret_cast< boost::shared_ptr< FloatingRateCouponPricer > * >(argp2);
    {
      try {
        FloatingRateCouponPtr_setPricer(arg1,(boost::shared_ptr< FloatingRateCouponPricer > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_FloatingRateCoupon) {
  {
    FloatingRateCouponPtr *arg1 = (FloatingRateCouponPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_FloatingRateCoupon(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_FloatingRateCouponPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FloatingRateCoupon" "', argument " "1"" of type '" "FloatingRateCouponPtr *""'"); 
    }
    arg1 = reinterpret_cast< FloatingRateCouponPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_as_floating_rate_coupon) {
  {
    boost::shared_ptr< CashFlow > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    SwigValueWrapper< FloatingRateCouponPtr > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: as_floating_rate_coupon(cf);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "as_floating_rate_coupon" "', argument " "1"" of type '" "boost::shared_ptr< CashFlow > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "as_floating_rate_coupon" "', argument " "1"" of type '" "boost::shared_ptr< CashFlow > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< CashFlow > * >(argp1);
    {
      try {
        result = as_floating_rate_coupon((boost::shared_ptr< CashFlow > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new FloatingRateCouponPtr(static_cast< const FloatingRateCouponPtr& >(result))), SWIGTYPE_p_FloatingRateCouponPtr, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CappedFlooredCoupon__SWIG_0) {
  {
    FloatingRateCouponPtr *arg1 = 0 ;
    Rate arg2 ;
    Rate arg3 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    CappedFlooredCouponPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_CappedFlooredCoupon(underlying,cap,floor);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_FloatingRateCouponPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CappedFlooredCoupon" "', argument " "1"" of type '" "FloatingRateCouponPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CappedFlooredCoupon" "', argument " "1"" of type '" "FloatingRateCouponPtr const &""'"); 
    }
    arg1 = reinterpret_cast< FloatingRateCouponPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_CappedFlooredCoupon" "', argument " "2"" of type '" "Rate""'");
    } 
    arg2 = static_cast< Rate >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_CappedFlooredCoupon" "', argument " "3"" of type '" "Rate""'");
    } 
    arg3 = static_cast< Rate >(val3);
    {
      try {
        result = (CappedFlooredCouponPtr *)new_CappedFlooredCouponPtr__SWIG_0((FloatingRateCouponPtr const &)*arg1,arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CappedFlooredCouponPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CappedFlooredCoupon__SWIG_1) {
  {
    FloatingRateCouponPtr *arg1 = 0 ;
    Rate arg2 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    CappedFlooredCouponPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_CappedFlooredCoupon(underlying,cap);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_FloatingRateCouponPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CappedFlooredCoupon" "', argument " "1"" of type '" "FloatingRateCouponPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CappedFlooredCoupon" "', argument " "1"" of type '" "FloatingRateCouponPtr const &""'"); 
    }
    arg1 = reinterpret_cast< FloatingRateCouponPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_CappedFlooredCoupon" "', argument " "2"" of type '" "Rate""'");
    } 
    arg2 = static_cast< Rate >(val2);
    {
      try {
        result = (CappedFlooredCouponPtr *)new_CappedFlooredCouponPtr__SWIG_0((FloatingRateCouponPtr const &)*arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CappedFlooredCouponPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CappedFlooredCoupon__SWIG_2) {
  {
    FloatingRateCouponPtr *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    CappedFlooredCouponPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_CappedFlooredCoupon(underlying);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_FloatingRateCouponPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CappedFlooredCoupon" "', argument " "1"" of type '" "FloatingRateCouponPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CappedFlooredCoupon" "', argument " "1"" of type '" "FloatingRateCouponPtr const &""'"); 
    }
    arg1 = reinterpret_cast< FloatingRateCouponPtr * >(argp1);
    {
      try {
        result = (CappedFlooredCouponPtr *)new_CappedFlooredCouponPtr__SWIG_0((FloatingRateCouponPtr const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CappedFlooredCouponPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CappedFlooredCoupon) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_FloatingRateCouponPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_FloatingRateCouponPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_FloatingRateCouponPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_CappedFlooredCoupon__SWIG_2); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_CappedFlooredCoupon__SWIG_1); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_CappedFlooredCoupon__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_CappedFlooredCoupon'");
  XSRETURN(0);
}


XS(_wrap_CappedFlooredCoupon_cap) {
  {
    CappedFlooredCouponPtr *arg1 = (CappedFlooredCouponPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CappedFlooredCoupon_cap(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CappedFlooredCouponPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CappedFlooredCoupon_cap" "', argument " "1"" of type '" "CappedFlooredCouponPtr *""'"); 
    }
    arg1 = reinterpret_cast< CappedFlooredCouponPtr * >(argp1);
    {
      try {
        result = (Rate)CappedFlooredCouponPtr_cap(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CappedFlooredCoupon_floor) {
  {
    CappedFlooredCouponPtr *arg1 = (CappedFlooredCouponPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CappedFlooredCoupon_floor(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CappedFlooredCouponPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CappedFlooredCoupon_floor" "', argument " "1"" of type '" "CappedFlooredCouponPtr *""'"); 
    }
    arg1 = reinterpret_cast< CappedFlooredCouponPtr * >(argp1);
    {
      try {
        result = (Rate)CappedFlooredCouponPtr_floor(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CappedFlooredCoupon_effectiveCap) {
  {
    CappedFlooredCouponPtr *arg1 = (CappedFlooredCouponPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CappedFlooredCoupon_effectiveCap(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CappedFlooredCouponPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CappedFlooredCoupon_effectiveCap" "', argument " "1"" of type '" "CappedFlooredCouponPtr *""'"); 
    }
    arg1 = reinterpret_cast< CappedFlooredCouponPtr * >(argp1);
    {
      try {
        result = (Rate)CappedFlooredCouponPtr_effectiveCap(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CappedFlooredCoupon_effectiveFloor) {
  {
    CappedFlooredCouponPtr *arg1 = (CappedFlooredCouponPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CappedFlooredCoupon_effectiveFloor(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CappedFlooredCouponPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CappedFlooredCoupon_effectiveFloor" "', argument " "1"" of type '" "CappedFlooredCouponPtr *""'"); 
    }
    arg1 = reinterpret_cast< CappedFlooredCouponPtr * >(argp1);
    {
      try {
        result = (Rate)CappedFlooredCouponPtr_effectiveFloor(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CappedFlooredCoupon_isCapped) {
  {
    CappedFlooredCouponPtr *arg1 = (CappedFlooredCouponPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CappedFlooredCoupon_isCapped(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CappedFlooredCouponPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CappedFlooredCoupon_isCapped" "', argument " "1"" of type '" "CappedFlooredCouponPtr *""'"); 
    }
    arg1 = reinterpret_cast< CappedFlooredCouponPtr * >(argp1);
    {
      try {
        result = (bool)CappedFlooredCouponPtr_isCapped(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CappedFlooredCoupon_isFloored) {
  {
    CappedFlooredCouponPtr *arg1 = (CappedFlooredCouponPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CappedFlooredCoupon_isFloored(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CappedFlooredCouponPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CappedFlooredCoupon_isFloored" "', argument " "1"" of type '" "CappedFlooredCouponPtr *""'"); 
    }
    arg1 = reinterpret_cast< CappedFlooredCouponPtr * >(argp1);
    {
      try {
        result = (bool)CappedFlooredCouponPtr_isFloored(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CappedFlooredCoupon_setPricer) {
  {
    CappedFlooredCouponPtr *arg1 = (CappedFlooredCouponPtr *) 0 ;
    boost::shared_ptr< FloatingRateCouponPricer > *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: CappedFlooredCoupon_setPricer(self,p);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CappedFlooredCouponPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CappedFlooredCoupon_setPricer" "', argument " "1"" of type '" "CappedFlooredCouponPtr *""'"); 
    }
    arg1 = reinterpret_cast< CappedFlooredCouponPtr * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_boost__shared_ptrT_FloatingRateCouponPricer_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CappedFlooredCoupon_setPricer" "', argument " "2"" of type '" "boost::shared_ptr< FloatingRateCouponPricer > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CappedFlooredCoupon_setPricer" "', argument " "2"" of type '" "boost::shared_ptr< FloatingRateCouponPricer > const &""'"); 
    }
    arg2 = reinterpret_cast< boost::shared_ptr< FloatingRateCouponPricer > * >(argp2);
    {
      try {
        CappedFlooredCouponPtr_setPricer(arg1,(boost::shared_ptr< FloatingRateCouponPricer > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_CappedFlooredCoupon) {
  {
    CappedFlooredCouponPtr *arg1 = (CappedFlooredCouponPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_CappedFlooredCoupon(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CappedFlooredCouponPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CappedFlooredCoupon" "', argument " "1"" of type '" "CappedFlooredCouponPtr *""'"); 
    }
    arg1 = reinterpret_cast< CappedFlooredCouponPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_IborCoupon__SWIG_0) {
  {
    Date *arg1 = 0 ;
    Real arg2 ;
    Date *arg3 = 0 ;
    Date *arg4 = 0 ;
    Integer arg5 ;
    InterestRateIndexPtr *arg6 = 0 ;
    Real arg7 ;
    Spread arg8 ;
    Date *arg9 = 0 ;
    Date *arg10 = 0 ;
    DayCounter *arg11 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    void *argp6 = 0 ;
    int res6 = 0 ;
    double val7 ;
    int ecode7 = 0 ;
    double val8 ;
    int ecode8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    void *argp10 ;
    int res10 = 0 ;
    void *argp11 ;
    int res11 = 0 ;
    int argvi = 0;
    IborCouponPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 11) || (items > 11)) {
      SWIG_croak("Usage: new_IborCoupon(paymentDate,nominal,startDate,endDate,fixingDays,index,gearing,spread,refPeriodStart,refPeriodEnd,dayCounter);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_IborCoupon" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_IborCoupon" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_IborCoupon" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_IborCoupon" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_IborCoupon" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_IborCoupon" "', argument " "4"" of type '" "Date const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_IborCoupon" "', argument " "4"" of type '" "Date const &""'"); 
    }
    arg4 = reinterpret_cast< Date * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_IborCoupon" "', argument " "5"" of type '" "Integer""'");
    } 
    arg5 = static_cast< Integer >(val5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_InterestRateIndexPtr,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_IborCoupon" "', argument " "6"" of type '" "InterestRateIndexPtr &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_IborCoupon" "', argument " "6"" of type '" "InterestRateIndexPtr &""'"); 
    }
    arg6 = reinterpret_cast< InterestRateIndexPtr * >(argp6);
    ecode7 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_IborCoupon" "', argument " "7"" of type '" "Real""'");
    } 
    arg7 = static_cast< Real >(val7);
    ecode8 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_IborCoupon" "', argument " "8"" of type '" "Spread""'");
    } 
    arg8 = static_cast< Spread >(val8);
    res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res9)) {
      SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_IborCoupon" "', argument " "9"" of type '" "Date const &""'"); 
    }
    if (!argp9) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_IborCoupon" "', argument " "9"" of type '" "Date const &""'"); 
    }
    arg9 = reinterpret_cast< Date * >(argp9);
    res10 = SWIG_ConvertPtr(ST(9), &argp10, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res10)) {
      SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "new_IborCoupon" "', argument " "10"" of type '" "Date const &""'"); 
    }
    if (!argp10) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_IborCoupon" "', argument " "10"" of type '" "Date const &""'"); 
    }
    arg10 = reinterpret_cast< Date * >(argp10);
    res11 = SWIG_ConvertPtr(ST(10), &argp11, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res11)) {
      SWIG_exception_fail(SWIG_ArgError(res11), "in method '" "new_IborCoupon" "', argument " "11"" of type '" "DayCounter const &""'"); 
    }
    if (!argp11) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_IborCoupon" "', argument " "11"" of type '" "DayCounter const &""'"); 
    }
    arg11 = reinterpret_cast< DayCounter * >(argp11);
    {
      try {
        result = (IborCouponPtr *)new_IborCouponPtr__SWIG_0((Date const &)*arg1,arg2,(Date const &)*arg3,(Date const &)*arg4,arg5,*arg6,arg7,arg8,(Date const &)*arg9,(Date const &)*arg10,(DayCounter const &)*arg11);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IborCouponPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_IborCoupon__SWIG_1) {
  {
    Date *arg1 = 0 ;
    Real arg2 ;
    Date *arg3 = 0 ;
    Date *arg4 = 0 ;
    Integer arg5 ;
    InterestRateIndexPtr *arg6 = 0 ;
    Real arg7 ;
    Spread arg8 ;
    Date *arg9 = 0 ;
    Date *arg10 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    void *argp6 = 0 ;
    int res6 = 0 ;
    double val7 ;
    int ecode7 = 0 ;
    double val8 ;
    int ecode8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    void *argp10 ;
    int res10 = 0 ;
    int argvi = 0;
    IborCouponPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 10) || (items > 10)) {
      SWIG_croak("Usage: new_IborCoupon(paymentDate,nominal,startDate,endDate,fixingDays,index,gearing,spread,refPeriodStart,refPeriodEnd);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_IborCoupon" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_IborCoupon" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_IborCoupon" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_IborCoupon" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_IborCoupon" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_IborCoupon" "', argument " "4"" of type '" "Date const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_IborCoupon" "', argument " "4"" of type '" "Date const &""'"); 
    }
    arg4 = reinterpret_cast< Date * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_IborCoupon" "', argument " "5"" of type '" "Integer""'");
    } 
    arg5 = static_cast< Integer >(val5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_InterestRateIndexPtr,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_IborCoupon" "', argument " "6"" of type '" "InterestRateIndexPtr &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_IborCoupon" "', argument " "6"" of type '" "InterestRateIndexPtr &""'"); 
    }
    arg6 = reinterpret_cast< InterestRateIndexPtr * >(argp6);
    ecode7 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_IborCoupon" "', argument " "7"" of type '" "Real""'");
    } 
    arg7 = static_cast< Real >(val7);
    ecode8 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_IborCoupon" "', argument " "8"" of type '" "Spread""'");
    } 
    arg8 = static_cast< Spread >(val8);
    res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res9)) {
      SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_IborCoupon" "', argument " "9"" of type '" "Date const &""'"); 
    }
    if (!argp9) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_IborCoupon" "', argument " "9"" of type '" "Date const &""'"); 
    }
    arg9 = reinterpret_cast< Date * >(argp9);
    res10 = SWIG_ConvertPtr(ST(9), &argp10, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res10)) {
      SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "new_IborCoupon" "', argument " "10"" of type '" "Date const &""'"); 
    }
    if (!argp10) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_IborCoupon" "', argument " "10"" of type '" "Date const &""'"); 
    }
    arg10 = reinterpret_cast< Date * >(argp10);
    {
      try {
        result = (IborCouponPtr *)new_IborCouponPtr__SWIG_0((Date const &)*arg1,arg2,(Date const &)*arg3,(Date const &)*arg4,arg5,*arg6,arg7,arg8,(Date const &)*arg9,(Date const &)*arg10);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IborCouponPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_IborCoupon__SWIG_2) {
  {
    Date *arg1 = 0 ;
    Real arg2 ;
    Date *arg3 = 0 ;
    Date *arg4 = 0 ;
    Integer arg5 ;
    InterestRateIndexPtr *arg6 = 0 ;
    Real arg7 ;
    Spread arg8 ;
    Date *arg9 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    void *argp6 = 0 ;
    int res6 = 0 ;
    double val7 ;
    int ecode7 = 0 ;
    double val8 ;
    int ecode8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    int argvi = 0;
    IborCouponPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 9) || (items > 9)) {
      SWIG_croak("Usage: new_IborCoupon(paymentDate,nominal,startDate,endDate,fixingDays,index,gearing,spread,refPeriodStart);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_IborCoupon" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_IborCoupon" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_IborCoupon" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_IborCoupon" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_IborCoupon" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_IborCoupon" "', argument " "4"" of type '" "Date const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_IborCoupon" "', argument " "4"" of type '" "Date const &""'"); 
    }
    arg4 = reinterpret_cast< Date * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_IborCoupon" "', argument " "5"" of type '" "Integer""'");
    } 
    arg5 = static_cast< Integer >(val5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_InterestRateIndexPtr,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_IborCoupon" "', argument " "6"" of type '" "InterestRateIndexPtr &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_IborCoupon" "', argument " "6"" of type '" "InterestRateIndexPtr &""'"); 
    }
    arg6 = reinterpret_cast< InterestRateIndexPtr * >(argp6);
    ecode7 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_IborCoupon" "', argument " "7"" of type '" "Real""'");
    } 
    arg7 = static_cast< Real >(val7);
    ecode8 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_IborCoupon" "', argument " "8"" of type '" "Spread""'");
    } 
    arg8 = static_cast< Spread >(val8);
    res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res9)) {
      SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_IborCoupon" "', argument " "9"" of type '" "Date const &""'"); 
    }
    if (!argp9) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_IborCoupon" "', argument " "9"" of type '" "Date const &""'"); 
    }
    arg9 = reinterpret_cast< Date * >(argp9);
    {
      try {
        result = (IborCouponPtr *)new_IborCouponPtr__SWIG_0((Date const &)*arg1,arg2,(Date const &)*arg3,(Date const &)*arg4,arg5,*arg6,arg7,arg8,(Date const &)*arg9);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IborCouponPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_IborCoupon__SWIG_3) {
  {
    Date *arg1 = 0 ;
    Real arg2 ;
    Date *arg3 = 0 ;
    Date *arg4 = 0 ;
    Integer arg5 ;
    InterestRateIndexPtr *arg6 = 0 ;
    Real arg7 ;
    Spread arg8 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    void *argp6 = 0 ;
    int res6 = 0 ;
    double val7 ;
    int ecode7 = 0 ;
    double val8 ;
    int ecode8 = 0 ;
    int argvi = 0;
    IborCouponPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 8) || (items > 8)) {
      SWIG_croak("Usage: new_IborCoupon(paymentDate,nominal,startDate,endDate,fixingDays,index,gearing,spread);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_IborCoupon" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_IborCoupon" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_IborCoupon" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_IborCoupon" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_IborCoupon" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_IborCoupon" "', argument " "4"" of type '" "Date const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_IborCoupon" "', argument " "4"" of type '" "Date const &""'"); 
    }
    arg4 = reinterpret_cast< Date * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_IborCoupon" "', argument " "5"" of type '" "Integer""'");
    } 
    arg5 = static_cast< Integer >(val5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_InterestRateIndexPtr,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_IborCoupon" "', argument " "6"" of type '" "InterestRateIndexPtr &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_IborCoupon" "', argument " "6"" of type '" "InterestRateIndexPtr &""'"); 
    }
    arg6 = reinterpret_cast< InterestRateIndexPtr * >(argp6);
    ecode7 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_IborCoupon" "', argument " "7"" of type '" "Real""'");
    } 
    arg7 = static_cast< Real >(val7);
    ecode8 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_IborCoupon" "', argument " "8"" of type '" "Spread""'");
    } 
    arg8 = static_cast< Spread >(val8);
    {
      try {
        result = (IborCouponPtr *)new_IborCouponPtr__SWIG_0((Date const &)*arg1,arg2,(Date const &)*arg3,(Date const &)*arg4,arg5,*arg6,arg7,arg8);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IborCouponPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_IborCoupon__SWIG_4) {
  {
    Date *arg1 = 0 ;
    Real arg2 ;
    Date *arg3 = 0 ;
    Date *arg4 = 0 ;
    Integer arg5 ;
    InterestRateIndexPtr *arg6 = 0 ;
    Real arg7 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    void *argp6 = 0 ;
    int res6 = 0 ;
    double val7 ;
    int ecode7 = 0 ;
    int argvi = 0;
    IborCouponPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: new_IborCoupon(paymentDate,nominal,startDate,endDate,fixingDays,index,gearing);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_IborCoupon" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_IborCoupon" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_IborCoupon" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_IborCoupon" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_IborCoupon" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_IborCoupon" "', argument " "4"" of type '" "Date const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_IborCoupon" "', argument " "4"" of type '" "Date const &""'"); 
    }
    arg4 = reinterpret_cast< Date * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_IborCoupon" "', argument " "5"" of type '" "Integer""'");
    } 
    arg5 = static_cast< Integer >(val5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_InterestRateIndexPtr,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_IborCoupon" "', argument " "6"" of type '" "InterestRateIndexPtr &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_IborCoupon" "', argument " "6"" of type '" "InterestRateIndexPtr &""'"); 
    }
    arg6 = reinterpret_cast< InterestRateIndexPtr * >(argp6);
    ecode7 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_IborCoupon" "', argument " "7"" of type '" "Real""'");
    } 
    arg7 = static_cast< Real >(val7);
    {
      try {
        result = (IborCouponPtr *)new_IborCouponPtr__SWIG_0((Date const &)*arg1,arg2,(Date const &)*arg3,(Date const &)*arg4,arg5,*arg6,arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IborCouponPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_IborCoupon__SWIG_5) {
  {
    Date *arg1 = 0 ;
    Real arg2 ;
    Date *arg3 = 0 ;
    Date *arg4 = 0 ;
    Integer arg5 ;
    InterestRateIndexPtr *arg6 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    void *argp6 = 0 ;
    int res6 = 0 ;
    int argvi = 0;
    IborCouponPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_IborCoupon(paymentDate,nominal,startDate,endDate,fixingDays,index);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_IborCoupon" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_IborCoupon" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_IborCoupon" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_IborCoupon" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_IborCoupon" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_IborCoupon" "', argument " "4"" of type '" "Date const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_IborCoupon" "', argument " "4"" of type '" "Date const &""'"); 
    }
    arg4 = reinterpret_cast< Date * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_IborCoupon" "', argument " "5"" of type '" "Integer""'");
    } 
    arg5 = static_cast< Integer >(val5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_InterestRateIndexPtr,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_IborCoupon" "', argument " "6"" of type '" "InterestRateIndexPtr &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_IborCoupon" "', argument " "6"" of type '" "InterestRateIndexPtr &""'"); 
    }
    arg6 = reinterpret_cast< InterestRateIndexPtr * >(argp6);
    {
      try {
        result = (IborCouponPtr *)new_IborCouponPtr__SWIG_0((Date const &)*arg1,arg2,(Date const &)*arg3,(Date const &)*arg4,arg5,*arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IborCouponPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_IborCoupon) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_InterestRateIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_InterestRateIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 8) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_InterestRateIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 9) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_InterestRateIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 10) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_InterestRateIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(9), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 11) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_InterestRateIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(9), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(10), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_IborCoupon__SWIG_5); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_IborCoupon__SWIG_4); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_IborCoupon__SWIG_3); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_IborCoupon__SWIG_2); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_IborCoupon__SWIG_1); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_IborCoupon__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_IborCoupon'");
  XSRETURN(0);
}


XS(_wrap_delete_IborCoupon) {
  {
    IborCouponPtr *arg1 = (IborCouponPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_IborCoupon(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_IborCouponPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IborCoupon" "', argument " "1"" of type '" "IborCouponPtr *""'"); 
    }
    arg1 = reinterpret_cast< IborCouponPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_IborCouponPricer_capletVolatility) {
  {
    IborCouponPricerPtr *arg1 = (IborCouponPricerPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Handle< OptionletVolatilityStructure > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: IborCouponPricer_capletVolatility(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_IborCouponPricerPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IborCouponPricer_capletVolatility" "', argument " "1"" of type '" "IborCouponPricerPtr *""'"); 
    }
    arg1 = reinterpret_cast< IborCouponPricerPtr * >(argp1);
    {
      try {
        result = IborCouponPricerPtr_capletVolatility(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Handle< OptionletVolatilityStructure >(static_cast< const Handle< OptionletVolatilityStructure >& >(result))), SWIGTYPE_p_HandleT_OptionletVolatilityStructure_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_IborCouponPricer_setCapletVolatility__SWIG_0) {
  {
    IborCouponPricerPtr *arg1 = (IborCouponPricerPtr *) 0 ;
    Handle< OptionletVolatilityStructure > *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: IborCouponPricer_setCapletVolatility(self,v);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_IborCouponPricerPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IborCouponPricer_setCapletVolatility" "', argument " "1"" of type '" "IborCouponPricerPtr *""'"); 
    }
    arg1 = reinterpret_cast< IborCouponPricerPtr * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_OptionletVolatilityStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IborCouponPricer_setCapletVolatility" "', argument " "2"" of type '" "Handle< OptionletVolatilityStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IborCouponPricer_setCapletVolatility" "', argument " "2"" of type '" "Handle< OptionletVolatilityStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< OptionletVolatilityStructure > * >(argp2);
    {
      try {
        IborCouponPricerPtr_setCapletVolatility__SWIG_0(arg1,(Handle< OptionletVolatilityStructure > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_IborCouponPricer_setCapletVolatility__SWIG_1) {
  {
    IborCouponPricerPtr *arg1 = (IborCouponPricerPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: IborCouponPricer_setCapletVolatility(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_IborCouponPricerPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IborCouponPricer_setCapletVolatility" "', argument " "1"" of type '" "IborCouponPricerPtr *""'"); 
    }
    arg1 = reinterpret_cast< IborCouponPricerPtr * >(argp1);
    {
      try {
        IborCouponPricerPtr_setCapletVolatility__SWIG_0(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_IborCouponPricer_setCapletVolatility) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_IborCouponPricerPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_IborCouponPricerPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_OptionletVolatilityStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_IborCouponPricer_setCapletVolatility__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_IborCouponPricer_setCapletVolatility__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'IborCouponPricer_setCapletVolatility'");
  XSRETURN(0);
}


XS(_wrap_delete_IborCouponPricer) {
  {
    IborCouponPricerPtr *arg1 = (IborCouponPricerPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_IborCouponPricer(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_IborCouponPricerPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IborCouponPricer" "', argument " "1"" of type '" "IborCouponPricerPtr *""'"); 
    }
    arg1 = reinterpret_cast< IborCouponPricerPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BlackIborCouponPricer__SWIG_0) {
  {
    Handle< OptionletVolatilityStructure > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    BlackIborCouponPricerPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_BlackIborCouponPricer(v);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_OptionletVolatilityStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_BlackIborCouponPricer" "', argument " "1"" of type '" "Handle< OptionletVolatilityStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BlackIborCouponPricer" "', argument " "1"" of type '" "Handle< OptionletVolatilityStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< OptionletVolatilityStructure > * >(argp1);
    {
      try {
        result = (BlackIborCouponPricerPtr *)new_BlackIborCouponPricerPtr__SWIG_0((Handle< OptionletVolatilityStructure > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BlackIborCouponPricerPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BlackIborCouponPricer__SWIG_1) {
  {
    int argvi = 0;
    BlackIborCouponPricerPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_BlackIborCouponPricer();");
    }
    {
      try {
        result = (BlackIborCouponPricerPtr *)new_BlackIborCouponPricerPtr__SWIG_0();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BlackIborCouponPricerPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_BlackIborCouponPricer) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_OptionletVolatilityStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_BlackIborCouponPricer__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_BlackIborCouponPricer__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_BlackIborCouponPricer'");
  XSRETURN(0);
}


XS(_wrap_delete_BlackIborCouponPricer) {
  {
    BlackIborCouponPricerPtr *arg1 = (BlackIborCouponPricerPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_BlackIborCouponPricer(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BlackIborCouponPricerPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_BlackIborCouponPricer" "', argument " "1"" of type '" "BlackIborCouponPricerPtr *""'"); 
    }
    arg1 = reinterpret_cast< BlackIborCouponPricerPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CmsCoupon__SWIG_0) {
  {
    Date *arg1 = 0 ;
    Real arg2 ;
    Date *arg3 = 0 ;
    Date *arg4 = 0 ;
    Integer arg5 ;
    SwapIndexPtr *arg6 = 0 ;
    Real arg7 ;
    Spread arg8 ;
    Date *arg9 = 0 ;
    Date *arg10 = 0 ;
    DayCounter *arg11 = 0 ;
    bool arg12 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    double val7 ;
    int ecode7 = 0 ;
    double val8 ;
    int ecode8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    void *argp10 ;
    int res10 = 0 ;
    void *argp11 ;
    int res11 = 0 ;
    bool val12 ;
    int ecode12 = 0 ;
    int argvi = 0;
    CmsCouponPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 12) || (items > 12)) {
      SWIG_croak("Usage: new_CmsCoupon(paymentDate,nominal,startDate,endDate,fixingDays,index,gearing,spread,refPeriodStart,refPeriodEnd,dayCounter,isInArrears);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CmsCoupon" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CmsCoupon" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_CmsCoupon" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CmsCoupon" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CmsCoupon" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_CmsCoupon" "', argument " "4"" of type '" "Date const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CmsCoupon" "', argument " "4"" of type '" "Date const &""'"); 
    }
    arg4 = reinterpret_cast< Date * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_CmsCoupon" "', argument " "5"" of type '" "Integer""'");
    } 
    arg5 = static_cast< Integer >(val5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_SwapIndexPtr,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_CmsCoupon" "', argument " "6"" of type '" "SwapIndexPtr const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CmsCoupon" "', argument " "6"" of type '" "SwapIndexPtr const &""'"); 
    }
    arg6 = reinterpret_cast< SwapIndexPtr * >(argp6);
    ecode7 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_CmsCoupon" "', argument " "7"" of type '" "Real""'");
    } 
    arg7 = static_cast< Real >(val7);
    ecode8 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_CmsCoupon" "', argument " "8"" of type '" "Spread""'");
    } 
    arg8 = static_cast< Spread >(val8);
    res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res9)) {
      SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_CmsCoupon" "', argument " "9"" of type '" "Date const &""'"); 
    }
    if (!argp9) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CmsCoupon" "', argument " "9"" of type '" "Date const &""'"); 
    }
    arg9 = reinterpret_cast< Date * >(argp9);
    res10 = SWIG_ConvertPtr(ST(9), &argp10, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res10)) {
      SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "new_CmsCoupon" "', argument " "10"" of type '" "Date const &""'"); 
    }
    if (!argp10) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CmsCoupon" "', argument " "10"" of type '" "Date const &""'"); 
    }
    arg10 = reinterpret_cast< Date * >(argp10);
    res11 = SWIG_ConvertPtr(ST(10), &argp11, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res11)) {
      SWIG_exception_fail(SWIG_ArgError(res11), "in method '" "new_CmsCoupon" "', argument " "11"" of type '" "DayCounter const &""'"); 
    }
    if (!argp11) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CmsCoupon" "', argument " "11"" of type '" "DayCounter const &""'"); 
    }
    arg11 = reinterpret_cast< DayCounter * >(argp11);
    ecode12 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(11), &val12);
    if (!SWIG_IsOK(ecode12)) {
      SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "new_CmsCoupon" "', argument " "12"" of type '" "bool""'");
    } 
    arg12 = static_cast< bool >(val12);
    {
      try {
        result = (CmsCouponPtr *)new_CmsCouponPtr__SWIG_0((Date const &)*arg1,arg2,(Date const &)*arg3,(Date const &)*arg4,arg5,(SwapIndexPtr const &)*arg6,arg7,arg8,(Date const &)*arg9,(Date const &)*arg10,(DayCounter const &)*arg11,arg12);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CmsCouponPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CmsCoupon__SWIG_1) {
  {
    Date *arg1 = 0 ;
    Real arg2 ;
    Date *arg3 = 0 ;
    Date *arg4 = 0 ;
    Integer arg5 ;
    SwapIndexPtr *arg6 = 0 ;
    Real arg7 ;
    Spread arg8 ;
    Date *arg9 = 0 ;
    Date *arg10 = 0 ;
    DayCounter *arg11 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    double val7 ;
    int ecode7 = 0 ;
    double val8 ;
    int ecode8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    void *argp10 ;
    int res10 = 0 ;
    void *argp11 ;
    int res11 = 0 ;
    int argvi = 0;
    CmsCouponPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 11) || (items > 11)) {
      SWIG_croak("Usage: new_CmsCoupon(paymentDate,nominal,startDate,endDate,fixingDays,index,gearing,spread,refPeriodStart,refPeriodEnd,dayCounter);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CmsCoupon" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CmsCoupon" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_CmsCoupon" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CmsCoupon" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CmsCoupon" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_CmsCoupon" "', argument " "4"" of type '" "Date const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CmsCoupon" "', argument " "4"" of type '" "Date const &""'"); 
    }
    arg4 = reinterpret_cast< Date * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_CmsCoupon" "', argument " "5"" of type '" "Integer""'");
    } 
    arg5 = static_cast< Integer >(val5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_SwapIndexPtr,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_CmsCoupon" "', argument " "6"" of type '" "SwapIndexPtr const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CmsCoupon" "', argument " "6"" of type '" "SwapIndexPtr const &""'"); 
    }
    arg6 = reinterpret_cast< SwapIndexPtr * >(argp6);
    ecode7 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_CmsCoupon" "', argument " "7"" of type '" "Real""'");
    } 
    arg7 = static_cast< Real >(val7);
    ecode8 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_CmsCoupon" "', argument " "8"" of type '" "Spread""'");
    } 
    arg8 = static_cast< Spread >(val8);
    res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res9)) {
      SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_CmsCoupon" "', argument " "9"" of type '" "Date const &""'"); 
    }
    if (!argp9) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CmsCoupon" "', argument " "9"" of type '" "Date const &""'"); 
    }
    arg9 = reinterpret_cast< Date * >(argp9);
    res10 = SWIG_ConvertPtr(ST(9), &argp10, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res10)) {
      SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "new_CmsCoupon" "', argument " "10"" of type '" "Date const &""'"); 
    }
    if (!argp10) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CmsCoupon" "', argument " "10"" of type '" "Date const &""'"); 
    }
    arg10 = reinterpret_cast< Date * >(argp10);
    res11 = SWIG_ConvertPtr(ST(10), &argp11, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res11)) {
      SWIG_exception_fail(SWIG_ArgError(res11), "in method '" "new_CmsCoupon" "', argument " "11"" of type '" "DayCounter const &""'"); 
    }
    if (!argp11) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CmsCoupon" "', argument " "11"" of type '" "DayCounter const &""'"); 
    }
    arg11 = reinterpret_cast< DayCounter * >(argp11);
    {
      try {
        result = (CmsCouponPtr *)new_CmsCouponPtr__SWIG_0((Date const &)*arg1,arg2,(Date const &)*arg3,(Date const &)*arg4,arg5,(SwapIndexPtr const &)*arg6,arg7,arg8,(Date const &)*arg9,(Date const &)*arg10,(DayCounter const &)*arg11);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CmsCouponPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CmsCoupon__SWIG_2) {
  {
    Date *arg1 = 0 ;
    Real arg2 ;
    Date *arg3 = 0 ;
    Date *arg4 = 0 ;
    Integer arg5 ;
    SwapIndexPtr *arg6 = 0 ;
    Real arg7 ;
    Spread arg8 ;
    Date *arg9 = 0 ;
    Date *arg10 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    double val7 ;
    int ecode7 = 0 ;
    double val8 ;
    int ecode8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    void *argp10 ;
    int res10 = 0 ;
    int argvi = 0;
    CmsCouponPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 10) || (items > 10)) {
      SWIG_croak("Usage: new_CmsCoupon(paymentDate,nominal,startDate,endDate,fixingDays,index,gearing,spread,refPeriodStart,refPeriodEnd);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CmsCoupon" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CmsCoupon" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_CmsCoupon" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CmsCoupon" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CmsCoupon" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_CmsCoupon" "', argument " "4"" of type '" "Date const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CmsCoupon" "', argument " "4"" of type '" "Date const &""'"); 
    }
    arg4 = reinterpret_cast< Date * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_CmsCoupon" "', argument " "5"" of type '" "Integer""'");
    } 
    arg5 = static_cast< Integer >(val5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_SwapIndexPtr,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_CmsCoupon" "', argument " "6"" of type '" "SwapIndexPtr const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CmsCoupon" "', argument " "6"" of type '" "SwapIndexPtr const &""'"); 
    }
    arg6 = reinterpret_cast< SwapIndexPtr * >(argp6);
    ecode7 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_CmsCoupon" "', argument " "7"" of type '" "Real""'");
    } 
    arg7 = static_cast< Real >(val7);
    ecode8 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_CmsCoupon" "', argument " "8"" of type '" "Spread""'");
    } 
    arg8 = static_cast< Spread >(val8);
    res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res9)) {
      SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_CmsCoupon" "', argument " "9"" of type '" "Date const &""'"); 
    }
    if (!argp9) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CmsCoupon" "', argument " "9"" of type '" "Date const &""'"); 
    }
    arg9 = reinterpret_cast< Date * >(argp9);
    res10 = SWIG_ConvertPtr(ST(9), &argp10, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res10)) {
      SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "new_CmsCoupon" "', argument " "10"" of type '" "Date const &""'"); 
    }
    if (!argp10) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CmsCoupon" "', argument " "10"" of type '" "Date const &""'"); 
    }
    arg10 = reinterpret_cast< Date * >(argp10);
    {
      try {
        result = (CmsCouponPtr *)new_CmsCouponPtr__SWIG_0((Date const &)*arg1,arg2,(Date const &)*arg3,(Date const &)*arg4,arg5,(SwapIndexPtr const &)*arg6,arg7,arg8,(Date const &)*arg9,(Date const &)*arg10);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CmsCouponPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CmsCoupon__SWIG_3) {
  {
    Date *arg1 = 0 ;
    Real arg2 ;
    Date *arg3 = 0 ;
    Date *arg4 = 0 ;
    Integer arg5 ;
    SwapIndexPtr *arg6 = 0 ;
    Real arg7 ;
    Spread arg8 ;
    Date *arg9 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    double val7 ;
    int ecode7 = 0 ;
    double val8 ;
    int ecode8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    int argvi = 0;
    CmsCouponPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 9) || (items > 9)) {
      SWIG_croak("Usage: new_CmsCoupon(paymentDate,nominal,startDate,endDate,fixingDays,index,gearing,spread,refPeriodStart);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CmsCoupon" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CmsCoupon" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_CmsCoupon" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CmsCoupon" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CmsCoupon" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_CmsCoupon" "', argument " "4"" of type '" "Date const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CmsCoupon" "', argument " "4"" of type '" "Date const &""'"); 
    }
    arg4 = reinterpret_cast< Date * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_CmsCoupon" "', argument " "5"" of type '" "Integer""'");
    } 
    arg5 = static_cast< Integer >(val5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_SwapIndexPtr,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_CmsCoupon" "', argument " "6"" of type '" "SwapIndexPtr const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CmsCoupon" "', argument " "6"" of type '" "SwapIndexPtr const &""'"); 
    }
    arg6 = reinterpret_cast< SwapIndexPtr * >(argp6);
    ecode7 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_CmsCoupon" "', argument " "7"" of type '" "Real""'");
    } 
    arg7 = static_cast< Real >(val7);
    ecode8 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_CmsCoupon" "', argument " "8"" of type '" "Spread""'");
    } 
    arg8 = static_cast< Spread >(val8);
    res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res9)) {
      SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_CmsCoupon" "', argument " "9"" of type '" "Date const &""'"); 
    }
    if (!argp9) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CmsCoupon" "', argument " "9"" of type '" "Date const &""'"); 
    }
    arg9 = reinterpret_cast< Date * >(argp9);
    {
      try {
        result = (CmsCouponPtr *)new_CmsCouponPtr__SWIG_0((Date const &)*arg1,arg2,(Date const &)*arg3,(Date const &)*arg4,arg5,(SwapIndexPtr const &)*arg6,arg7,arg8,(Date const &)*arg9);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CmsCouponPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CmsCoupon__SWIG_4) {
  {
    Date *arg1 = 0 ;
    Real arg2 ;
    Date *arg3 = 0 ;
    Date *arg4 = 0 ;
    Integer arg5 ;
    SwapIndexPtr *arg6 = 0 ;
    Real arg7 ;
    Spread arg8 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    double val7 ;
    int ecode7 = 0 ;
    double val8 ;
    int ecode8 = 0 ;
    int argvi = 0;
    CmsCouponPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 8) || (items > 8)) {
      SWIG_croak("Usage: new_CmsCoupon(paymentDate,nominal,startDate,endDate,fixingDays,index,gearing,spread);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CmsCoupon" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CmsCoupon" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_CmsCoupon" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CmsCoupon" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CmsCoupon" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_CmsCoupon" "', argument " "4"" of type '" "Date const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CmsCoupon" "', argument " "4"" of type '" "Date const &""'"); 
    }
    arg4 = reinterpret_cast< Date * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_CmsCoupon" "', argument " "5"" of type '" "Integer""'");
    } 
    arg5 = static_cast< Integer >(val5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_SwapIndexPtr,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_CmsCoupon" "', argument " "6"" of type '" "SwapIndexPtr const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CmsCoupon" "', argument " "6"" of type '" "SwapIndexPtr const &""'"); 
    }
    arg6 = reinterpret_cast< SwapIndexPtr * >(argp6);
    ecode7 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_CmsCoupon" "', argument " "7"" of type '" "Real""'");
    } 
    arg7 = static_cast< Real >(val7);
    ecode8 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_CmsCoupon" "', argument " "8"" of type '" "Spread""'");
    } 
    arg8 = static_cast< Spread >(val8);
    {
      try {
        result = (CmsCouponPtr *)new_CmsCouponPtr__SWIG_0((Date const &)*arg1,arg2,(Date const &)*arg3,(Date const &)*arg4,arg5,(SwapIndexPtr const &)*arg6,arg7,arg8);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CmsCouponPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CmsCoupon__SWIG_5) {
  {
    Date *arg1 = 0 ;
    Real arg2 ;
    Date *arg3 = 0 ;
    Date *arg4 = 0 ;
    Integer arg5 ;
    SwapIndexPtr *arg6 = 0 ;
    Real arg7 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    double val7 ;
    int ecode7 = 0 ;
    int argvi = 0;
    CmsCouponPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: new_CmsCoupon(paymentDate,nominal,startDate,endDate,fixingDays,index,gearing);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CmsCoupon" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CmsCoupon" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_CmsCoupon" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CmsCoupon" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CmsCoupon" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_CmsCoupon" "', argument " "4"" of type '" "Date const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CmsCoupon" "', argument " "4"" of type '" "Date const &""'"); 
    }
    arg4 = reinterpret_cast< Date * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_CmsCoupon" "', argument " "5"" of type '" "Integer""'");
    } 
    arg5 = static_cast< Integer >(val5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_SwapIndexPtr,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_CmsCoupon" "', argument " "6"" of type '" "SwapIndexPtr const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CmsCoupon" "', argument " "6"" of type '" "SwapIndexPtr const &""'"); 
    }
    arg6 = reinterpret_cast< SwapIndexPtr * >(argp6);
    ecode7 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_CmsCoupon" "', argument " "7"" of type '" "Real""'");
    } 
    arg7 = static_cast< Real >(val7);
    {
      try {
        result = (CmsCouponPtr *)new_CmsCouponPtr__SWIG_0((Date const &)*arg1,arg2,(Date const &)*arg3,(Date const &)*arg4,arg5,(SwapIndexPtr const &)*arg6,arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CmsCouponPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CmsCoupon__SWIG_6) {
  {
    Date *arg1 = 0 ;
    Real arg2 ;
    Date *arg3 = 0 ;
    Date *arg4 = 0 ;
    Integer arg5 ;
    SwapIndexPtr *arg6 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    int argvi = 0;
    CmsCouponPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_CmsCoupon(paymentDate,nominal,startDate,endDate,fixingDays,index);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CmsCoupon" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CmsCoupon" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_CmsCoupon" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CmsCoupon" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CmsCoupon" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_CmsCoupon" "', argument " "4"" of type '" "Date const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CmsCoupon" "', argument " "4"" of type '" "Date const &""'"); 
    }
    arg4 = reinterpret_cast< Date * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_CmsCoupon" "', argument " "5"" of type '" "Integer""'");
    } 
    arg5 = static_cast< Integer >(val5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_SwapIndexPtr,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_CmsCoupon" "', argument " "6"" of type '" "SwapIndexPtr const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CmsCoupon" "', argument " "6"" of type '" "SwapIndexPtr const &""'"); 
    }
    arg6 = reinterpret_cast< SwapIndexPtr * >(argp6);
    {
      try {
        result = (CmsCouponPtr *)new_CmsCouponPtr__SWIG_0((Date const &)*arg1,arg2,(Date const &)*arg3,(Date const &)*arg4,arg5,(SwapIndexPtr const &)*arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CmsCouponPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CmsCoupon) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_SwapIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_SwapIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 8) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_SwapIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 9) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_SwapIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 10) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_SwapIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(9), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 11) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_SwapIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(9), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(10), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
    if (items == 12) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_SwapIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(9), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(10), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(11), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 7;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_7:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_CmsCoupon__SWIG_6); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_CmsCoupon__SWIG_5); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_CmsCoupon__SWIG_4); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_CmsCoupon__SWIG_3); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_CmsCoupon__SWIG_2); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_CmsCoupon__SWIG_1); return;
    case 7:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_CmsCoupon__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_CmsCoupon'");
  XSRETURN(0);
}


XS(_wrap_delete_CmsCoupon) {
  {
    CmsCouponPtr *arg1 = (CmsCouponPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_CmsCoupon(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CmsCouponPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CmsCoupon" "', argument " "1"" of type '" "CmsCouponPtr *""'"); 
    }
    arg1 = reinterpret_cast< CmsCouponPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CmsCouponPricer_swaptionVolatility) {
  {
    CmsCouponPricerPtr *arg1 = (CmsCouponPricerPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Handle< SwaptionVolatilityStructure > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CmsCouponPricer_swaptionVolatility(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CmsCouponPricerPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CmsCouponPricer_swaptionVolatility" "', argument " "1"" of type '" "CmsCouponPricerPtr *""'"); 
    }
    arg1 = reinterpret_cast< CmsCouponPricerPtr * >(argp1);
    {
      try {
        result = CmsCouponPricerPtr_swaptionVolatility(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Handle< SwaptionVolatilityStructure >(static_cast< const Handle< SwaptionVolatilityStructure >& >(result))), SWIGTYPE_p_HandleT_SwaptionVolatilityStructure_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CmsCouponPricer_setSwaptionVolatility__SWIG_0) {
  {
    CmsCouponPricerPtr *arg1 = (CmsCouponPricerPtr *) 0 ;
    Handle< SwaptionVolatilityStructure > *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: CmsCouponPricer_setSwaptionVolatility(self,v);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CmsCouponPricerPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CmsCouponPricer_setSwaptionVolatility" "', argument " "1"" of type '" "CmsCouponPricerPtr *""'"); 
    }
    arg1 = reinterpret_cast< CmsCouponPricerPtr * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_SwaptionVolatilityStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CmsCouponPricer_setSwaptionVolatility" "', argument " "2"" of type '" "Handle< SwaptionVolatilityStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CmsCouponPricer_setSwaptionVolatility" "', argument " "2"" of type '" "Handle< SwaptionVolatilityStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< SwaptionVolatilityStructure > * >(argp2);
    {
      try {
        CmsCouponPricerPtr_setSwaptionVolatility__SWIG_0(arg1,(Handle< SwaptionVolatilityStructure > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CmsCouponPricer_setSwaptionVolatility__SWIG_1) {
  {
    CmsCouponPricerPtr *arg1 = (CmsCouponPricerPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CmsCouponPricer_setSwaptionVolatility(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CmsCouponPricerPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CmsCouponPricer_setSwaptionVolatility" "', argument " "1"" of type '" "CmsCouponPricerPtr *""'"); 
    }
    arg1 = reinterpret_cast< CmsCouponPricerPtr * >(argp1);
    {
      try {
        CmsCouponPricerPtr_setSwaptionVolatility__SWIG_0(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CmsCouponPricer_setSwaptionVolatility) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_CmsCouponPricerPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_CmsCouponPricerPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_SwaptionVolatilityStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CmsCouponPricer_setSwaptionVolatility__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CmsCouponPricer_setSwaptionVolatility__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'CmsCouponPricer_setSwaptionVolatility'");
  XSRETURN(0);
}


XS(_wrap_delete_CmsCouponPricer) {
  {
    CmsCouponPricerPtr *arg1 = (CmsCouponPricerPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_CmsCouponPricer(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CmsCouponPricerPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CmsCouponPricer" "', argument " "1"" of type '" "CmsCouponPricerPtr *""'"); 
    }
    arg1 = reinterpret_cast< CmsCouponPricerPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_GFunctionFactory) {
  {
    GFunctionFactory *arg1 = (GFunctionFactory *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_GFunctionFactory(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GFunctionFactory, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GFunctionFactory" "', argument " "1"" of type '" "GFunctionFactory *""'"); 
    }
    arg1 = reinterpret_cast< GFunctionFactory * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_AnalyticHaganPricer) {
  {
    Handle< SwaptionVolatilityStructure > *arg1 = 0 ;
    GFunctionFactory::YieldCurveModel arg2 ;
    Handle< Quote > *arg3 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    AnalyticHaganPricerPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_AnalyticHaganPricer(v,model,meanReversion);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_SwaptionVolatilityStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_AnalyticHaganPricer" "', argument " "1"" of type '" "Handle< SwaptionVolatilityStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AnalyticHaganPricer" "', argument " "1"" of type '" "Handle< SwaptionVolatilityStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< SwaptionVolatilityStructure > * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_AnalyticHaganPricer" "', argument " "2"" of type '" "GFunctionFactory::YieldCurveModel""'");
    } 
    arg2 = static_cast< GFunctionFactory::YieldCurveModel >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_AnalyticHaganPricer" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AnalyticHaganPricer" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< Quote > * >(argp3);
    {
      try {
        result = (AnalyticHaganPricerPtr *)new_AnalyticHaganPricerPtr((Handle< SwaptionVolatilityStructure > const &)*arg1,arg2,(Handle< Quote > const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_AnalyticHaganPricerPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_AnalyticHaganPricer) {
  {
    AnalyticHaganPricerPtr *arg1 = (AnalyticHaganPricerPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_AnalyticHaganPricer(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_AnalyticHaganPricerPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_AnalyticHaganPricer" "', argument " "1"" of type '" "AnalyticHaganPricerPtr *""'"); 
    }
    arg1 = reinterpret_cast< AnalyticHaganPricerPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_NumericHaganPricer__SWIG_0) {
  {
    Handle< SwaptionVolatilityStructure > *arg1 = 0 ;
    GFunctionFactory::YieldCurveModel arg2 ;
    Handle< Quote > *arg3 = 0 ;
    Rate arg4 ;
    Rate arg5 ;
    Real arg6 ;
    void *argp1 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    double val5 ;
    int ecode5 = 0 ;
    double val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    NumericHaganPricerPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_NumericHaganPricer(v,model,meanReversion,lowerLimit,upperLimit,precision);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_SwaptionVolatilityStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_NumericHaganPricer" "', argument " "1"" of type '" "Handle< SwaptionVolatilityStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NumericHaganPricer" "', argument " "1"" of type '" "Handle< SwaptionVolatilityStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< SwaptionVolatilityStructure > * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_NumericHaganPricer" "', argument " "2"" of type '" "GFunctionFactory::YieldCurveModel""'");
    } 
    arg2 = static_cast< GFunctionFactory::YieldCurveModel >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_NumericHaganPricer" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NumericHaganPricer" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< Quote > * >(argp3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_NumericHaganPricer" "', argument " "4"" of type '" "Rate""'");
    } 
    arg4 = static_cast< Rate >(val4);
    ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_NumericHaganPricer" "', argument " "5"" of type '" "Rate""'");
    } 
    arg5 = static_cast< Rate >(val5);
    ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_NumericHaganPricer" "', argument " "6"" of type '" "Real""'");
    } 
    arg6 = static_cast< Real >(val6);
    {
      try {
        result = (NumericHaganPricerPtr *)new_NumericHaganPricerPtr__SWIG_0((Handle< SwaptionVolatilityStructure > const &)*arg1,arg2,(Handle< Quote > const &)*arg3,arg4,arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_NumericHaganPricerPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_NumericHaganPricer__SWIG_1) {
  {
    Handle< SwaptionVolatilityStructure > *arg1 = 0 ;
    GFunctionFactory::YieldCurveModel arg2 ;
    Handle< Quote > *arg3 = 0 ;
    Rate arg4 ;
    Rate arg5 ;
    void *argp1 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    double val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    NumericHaganPricerPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_NumericHaganPricer(v,model,meanReversion,lowerLimit,upperLimit);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_SwaptionVolatilityStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_NumericHaganPricer" "', argument " "1"" of type '" "Handle< SwaptionVolatilityStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NumericHaganPricer" "', argument " "1"" of type '" "Handle< SwaptionVolatilityStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< SwaptionVolatilityStructure > * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_NumericHaganPricer" "', argument " "2"" of type '" "GFunctionFactory::YieldCurveModel""'");
    } 
    arg2 = static_cast< GFunctionFactory::YieldCurveModel >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_NumericHaganPricer" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NumericHaganPricer" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< Quote > * >(argp3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_NumericHaganPricer" "', argument " "4"" of type '" "Rate""'");
    } 
    arg4 = static_cast< Rate >(val4);
    ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_NumericHaganPricer" "', argument " "5"" of type '" "Rate""'");
    } 
    arg5 = static_cast< Rate >(val5);
    {
      try {
        result = (NumericHaganPricerPtr *)new_NumericHaganPricerPtr__SWIG_0((Handle< SwaptionVolatilityStructure > const &)*arg1,arg2,(Handle< Quote > const &)*arg3,arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_NumericHaganPricerPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_NumericHaganPricer__SWIG_2) {
  {
    Handle< SwaptionVolatilityStructure > *arg1 = 0 ;
    GFunctionFactory::YieldCurveModel arg2 ;
    Handle< Quote > *arg3 = 0 ;
    Rate arg4 ;
    void *argp1 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    NumericHaganPricerPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_NumericHaganPricer(v,model,meanReversion,lowerLimit);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_SwaptionVolatilityStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_NumericHaganPricer" "', argument " "1"" of type '" "Handle< SwaptionVolatilityStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NumericHaganPricer" "', argument " "1"" of type '" "Handle< SwaptionVolatilityStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< SwaptionVolatilityStructure > * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_NumericHaganPricer" "', argument " "2"" of type '" "GFunctionFactory::YieldCurveModel""'");
    } 
    arg2 = static_cast< GFunctionFactory::YieldCurveModel >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_NumericHaganPricer" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NumericHaganPricer" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< Quote > * >(argp3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_NumericHaganPricer" "', argument " "4"" of type '" "Rate""'");
    } 
    arg4 = static_cast< Rate >(val4);
    {
      try {
        result = (NumericHaganPricerPtr *)new_NumericHaganPricerPtr__SWIG_0((Handle< SwaptionVolatilityStructure > const &)*arg1,arg2,(Handle< Quote > const &)*arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_NumericHaganPricerPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_NumericHaganPricer__SWIG_3) {
  {
    Handle< SwaptionVolatilityStructure > *arg1 = 0 ;
    GFunctionFactory::YieldCurveModel arg2 ;
    Handle< Quote > *arg3 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    NumericHaganPricerPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_NumericHaganPricer(v,model,meanReversion);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_SwaptionVolatilityStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_NumericHaganPricer" "', argument " "1"" of type '" "Handle< SwaptionVolatilityStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NumericHaganPricer" "', argument " "1"" of type '" "Handle< SwaptionVolatilityStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< SwaptionVolatilityStructure > * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_NumericHaganPricer" "', argument " "2"" of type '" "GFunctionFactory::YieldCurveModel""'");
    } 
    arg2 = static_cast< GFunctionFactory::YieldCurveModel >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_NumericHaganPricer" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NumericHaganPricer" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< Quote > * >(argp3);
    {
      try {
        result = (NumericHaganPricerPtr *)new_NumericHaganPricerPtr__SWIG_0((Handle< SwaptionVolatilityStructure > const &)*arg1,arg2,(Handle< Quote > const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_NumericHaganPricerPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_NumericHaganPricer) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_SwaptionVolatilityStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_SwaptionVolatilityStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_SwaptionVolatilityStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_SwaptionVolatilityStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_NumericHaganPricer__SWIG_3); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_NumericHaganPricer__SWIG_2); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_NumericHaganPricer__SWIG_1); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_NumericHaganPricer__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_NumericHaganPricer'");
  XSRETURN(0);
}


XS(_wrap_delete_NumericHaganPricer) {
  {
    NumericHaganPricerPtr *arg1 = (NumericHaganPricerPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_NumericHaganPricer(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_NumericHaganPricerPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_NumericHaganPricer" "', argument " "1"" of type '" "NumericHaganPricerPtr *""'"); 
    }
    arg1 = reinterpret_cast< NumericHaganPricerPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CappedFlooredCmsCoupon__SWIG_0) {
  {
    Date *arg1 = 0 ;
    Real arg2 ;
    Date *arg3 = 0 ;
    Date *arg4 = 0 ;
    Natural arg5 ;
    SwapIndexPtr *arg6 = 0 ;
    Real arg7 ;
    Spread arg8 ;
    Rate arg9 ;
    Rate arg10 ;
    Date *arg11 = 0 ;
    Date *arg12 = 0 ;
    DayCounter *arg13 = 0 ;
    bool arg14 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    unsigned int val5 ;
    int ecode5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    double val7 ;
    int ecode7 = 0 ;
    double val8 ;
    int ecode8 = 0 ;
    double val9 ;
    int ecode9 = 0 ;
    double val10 ;
    int ecode10 = 0 ;
    void *argp11 ;
    int res11 = 0 ;
    void *argp12 ;
    int res12 = 0 ;
    void *argp13 ;
    int res13 = 0 ;
    bool val14 ;
    int ecode14 = 0 ;
    int argvi = 0;
    CappedFlooredCmsCouponPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 14) || (items > 14)) {
      SWIG_croak("Usage: new_CappedFlooredCmsCoupon(paymentDate,nominal,startDate,endDate,fixingDays,index,gearing,spread,cap,floor,refPeriodStart,refPeriodEnd,dayCounter,isInArrears);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CappedFlooredCmsCoupon" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CappedFlooredCmsCoupon" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "4"" of type '" "Date const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CappedFlooredCmsCoupon" "', argument " "4"" of type '" "Date const &""'"); 
    }
    arg4 = reinterpret_cast< Date * >(argp4);
    ecode5 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "5"" of type '" "Natural""'");
    } 
    arg5 = static_cast< Natural >(val5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_SwapIndexPtr,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "6"" of type '" "SwapIndexPtr const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CappedFlooredCmsCoupon" "', argument " "6"" of type '" "SwapIndexPtr const &""'"); 
    }
    arg6 = reinterpret_cast< SwapIndexPtr * >(argp6);
    ecode7 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "7"" of type '" "Real""'");
    } 
    arg7 = static_cast< Real >(val7);
    ecode8 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "8"" of type '" "Spread""'");
    } 
    arg8 = static_cast< Spread >(val8);
    ecode9 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(8), &val9);
    if (!SWIG_IsOK(ecode9)) {
      SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "9"" of type '" "Rate""'");
    } 
    arg9 = static_cast< Rate >(val9);
    ecode10 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), &val10);
    if (!SWIG_IsOK(ecode10)) {
      SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "10"" of type '" "Rate""'");
    } 
    arg10 = static_cast< Rate >(val10);
    res11 = SWIG_ConvertPtr(ST(10), &argp11, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res11)) {
      SWIG_exception_fail(SWIG_ArgError(res11), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "11"" of type '" "Date const &""'"); 
    }
    if (!argp11) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CappedFlooredCmsCoupon" "', argument " "11"" of type '" "Date const &""'"); 
    }
    arg11 = reinterpret_cast< Date * >(argp11);
    res12 = SWIG_ConvertPtr(ST(11), &argp12, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res12)) {
      SWIG_exception_fail(SWIG_ArgError(res12), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "12"" of type '" "Date const &""'"); 
    }
    if (!argp12) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CappedFlooredCmsCoupon" "', argument " "12"" of type '" "Date const &""'"); 
    }
    arg12 = reinterpret_cast< Date * >(argp12);
    res13 = SWIG_ConvertPtr(ST(12), &argp13, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res13)) {
      SWIG_exception_fail(SWIG_ArgError(res13), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "13"" of type '" "DayCounter const &""'"); 
    }
    if (!argp13) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CappedFlooredCmsCoupon" "', argument " "13"" of type '" "DayCounter const &""'"); 
    }
    arg13 = reinterpret_cast< DayCounter * >(argp13);
    ecode14 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(13), &val14);
    if (!SWIG_IsOK(ecode14)) {
      SWIG_exception_fail(SWIG_ArgError(ecode14), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "14"" of type '" "bool""'");
    } 
    arg14 = static_cast< bool >(val14);
    {
      try {
        result = (CappedFlooredCmsCouponPtr *)new_CappedFlooredCmsCouponPtr__SWIG_0((Date const &)*arg1,arg2,(Date const &)*arg3,(Date const &)*arg4,arg5,(SwapIndexPtr const &)*arg6,arg7,arg8,arg9,arg10,(Date const &)*arg11,(Date const &)*arg12,(DayCounter const &)*arg13,arg14);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CappedFlooredCmsCouponPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CappedFlooredCmsCoupon__SWIG_1) {
  {
    Date *arg1 = 0 ;
    Real arg2 ;
    Date *arg3 = 0 ;
    Date *arg4 = 0 ;
    Natural arg5 ;
    SwapIndexPtr *arg6 = 0 ;
    Real arg7 ;
    Spread arg8 ;
    Rate arg9 ;
    Rate arg10 ;
    Date *arg11 = 0 ;
    Date *arg12 = 0 ;
    DayCounter *arg13 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    unsigned int val5 ;
    int ecode5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    double val7 ;
    int ecode7 = 0 ;
    double val8 ;
    int ecode8 = 0 ;
    double val9 ;
    int ecode9 = 0 ;
    double val10 ;
    int ecode10 = 0 ;
    void *argp11 ;
    int res11 = 0 ;
    void *argp12 ;
    int res12 = 0 ;
    void *argp13 ;
    int res13 = 0 ;
    int argvi = 0;
    CappedFlooredCmsCouponPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 13) || (items > 13)) {
      SWIG_croak("Usage: new_CappedFlooredCmsCoupon(paymentDate,nominal,startDate,endDate,fixingDays,index,gearing,spread,cap,floor,refPeriodStart,refPeriodEnd,dayCounter);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CappedFlooredCmsCoupon" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CappedFlooredCmsCoupon" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "4"" of type '" "Date const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CappedFlooredCmsCoupon" "', argument " "4"" of type '" "Date const &""'"); 
    }
    arg4 = reinterpret_cast< Date * >(argp4);
    ecode5 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "5"" of type '" "Natural""'");
    } 
    arg5 = static_cast< Natural >(val5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_SwapIndexPtr,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "6"" of type '" "SwapIndexPtr const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CappedFlooredCmsCoupon" "', argument " "6"" of type '" "SwapIndexPtr const &""'"); 
    }
    arg6 = reinterpret_cast< SwapIndexPtr * >(argp6);
    ecode7 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "7"" of type '" "Real""'");
    } 
    arg7 = static_cast< Real >(val7);
    ecode8 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "8"" of type '" "Spread""'");
    } 
    arg8 = static_cast< Spread >(val8);
    ecode9 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(8), &val9);
    if (!SWIG_IsOK(ecode9)) {
      SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "9"" of type '" "Rate""'");
    } 
    arg9 = static_cast< Rate >(val9);
    ecode10 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), &val10);
    if (!SWIG_IsOK(ecode10)) {
      SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "10"" of type '" "Rate""'");
    } 
    arg10 = static_cast< Rate >(val10);
    res11 = SWIG_ConvertPtr(ST(10), &argp11, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res11)) {
      SWIG_exception_fail(SWIG_ArgError(res11), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "11"" of type '" "Date const &""'"); 
    }
    if (!argp11) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CappedFlooredCmsCoupon" "', argument " "11"" of type '" "Date const &""'"); 
    }
    arg11 = reinterpret_cast< Date * >(argp11);
    res12 = SWIG_ConvertPtr(ST(11), &argp12, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res12)) {
      SWIG_exception_fail(SWIG_ArgError(res12), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "12"" of type '" "Date const &""'"); 
    }
    if (!argp12) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CappedFlooredCmsCoupon" "', argument " "12"" of type '" "Date const &""'"); 
    }
    arg12 = reinterpret_cast< Date * >(argp12);
    res13 = SWIG_ConvertPtr(ST(12), &argp13, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res13)) {
      SWIG_exception_fail(SWIG_ArgError(res13), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "13"" of type '" "DayCounter const &""'"); 
    }
    if (!argp13) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CappedFlooredCmsCoupon" "', argument " "13"" of type '" "DayCounter const &""'"); 
    }
    arg13 = reinterpret_cast< DayCounter * >(argp13);
    {
      try {
        result = (CappedFlooredCmsCouponPtr *)new_CappedFlooredCmsCouponPtr__SWIG_0((Date const &)*arg1,arg2,(Date const &)*arg3,(Date const &)*arg4,arg5,(SwapIndexPtr const &)*arg6,arg7,arg8,arg9,arg10,(Date const &)*arg11,(Date const &)*arg12,(DayCounter const &)*arg13);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CappedFlooredCmsCouponPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CappedFlooredCmsCoupon__SWIG_2) {
  {
    Date *arg1 = 0 ;
    Real arg2 ;
    Date *arg3 = 0 ;
    Date *arg4 = 0 ;
    Natural arg5 ;
    SwapIndexPtr *arg6 = 0 ;
    Real arg7 ;
    Spread arg8 ;
    Rate arg9 ;
    Rate arg10 ;
    Date *arg11 = 0 ;
    Date *arg12 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    unsigned int val5 ;
    int ecode5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    double val7 ;
    int ecode7 = 0 ;
    double val8 ;
    int ecode8 = 0 ;
    double val9 ;
    int ecode9 = 0 ;
    double val10 ;
    int ecode10 = 0 ;
    void *argp11 ;
    int res11 = 0 ;
    void *argp12 ;
    int res12 = 0 ;
    int argvi = 0;
    CappedFlooredCmsCouponPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 12) || (items > 12)) {
      SWIG_croak("Usage: new_CappedFlooredCmsCoupon(paymentDate,nominal,startDate,endDate,fixingDays,index,gearing,spread,cap,floor,refPeriodStart,refPeriodEnd);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CappedFlooredCmsCoupon" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CappedFlooredCmsCoupon" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "4"" of type '" "Date const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CappedFlooredCmsCoupon" "', argument " "4"" of type '" "Date const &""'"); 
    }
    arg4 = reinterpret_cast< Date * >(argp4);
    ecode5 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "5"" of type '" "Natural""'");
    } 
    arg5 = static_cast< Natural >(val5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_SwapIndexPtr,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "6"" of type '" "SwapIndexPtr const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CappedFlooredCmsCoupon" "', argument " "6"" of type '" "SwapIndexPtr const &""'"); 
    }
    arg6 = reinterpret_cast< SwapIndexPtr * >(argp6);
    ecode7 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "7"" of type '" "Real""'");
    } 
    arg7 = static_cast< Real >(val7);
    ecode8 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "8"" of type '" "Spread""'");
    } 
    arg8 = static_cast< Spread >(val8);
    ecode9 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(8), &val9);
    if (!SWIG_IsOK(ecode9)) {
      SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "9"" of type '" "Rate""'");
    } 
    arg9 = static_cast< Rate >(val9);
    ecode10 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), &val10);
    if (!SWIG_IsOK(ecode10)) {
      SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "10"" of type '" "Rate""'");
    } 
    arg10 = static_cast< Rate >(val10);
    res11 = SWIG_ConvertPtr(ST(10), &argp11, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res11)) {
      SWIG_exception_fail(SWIG_ArgError(res11), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "11"" of type '" "Date const &""'"); 
    }
    if (!argp11) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CappedFlooredCmsCoupon" "', argument " "11"" of type '" "Date const &""'"); 
    }
    arg11 = reinterpret_cast< Date * >(argp11);
    res12 = SWIG_ConvertPtr(ST(11), &argp12, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res12)) {
      SWIG_exception_fail(SWIG_ArgError(res12), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "12"" of type '" "Date const &""'"); 
    }
    if (!argp12) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CappedFlooredCmsCoupon" "', argument " "12"" of type '" "Date const &""'"); 
    }
    arg12 = reinterpret_cast< Date * >(argp12);
    {
      try {
        result = (CappedFlooredCmsCouponPtr *)new_CappedFlooredCmsCouponPtr__SWIG_0((Date const &)*arg1,arg2,(Date const &)*arg3,(Date const &)*arg4,arg5,(SwapIndexPtr const &)*arg6,arg7,arg8,arg9,arg10,(Date const &)*arg11,(Date const &)*arg12);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CappedFlooredCmsCouponPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CappedFlooredCmsCoupon__SWIG_3) {
  {
    Date *arg1 = 0 ;
    Real arg2 ;
    Date *arg3 = 0 ;
    Date *arg4 = 0 ;
    Natural arg5 ;
    SwapIndexPtr *arg6 = 0 ;
    Real arg7 ;
    Spread arg8 ;
    Rate arg9 ;
    Rate arg10 ;
    Date *arg11 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    unsigned int val5 ;
    int ecode5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    double val7 ;
    int ecode7 = 0 ;
    double val8 ;
    int ecode8 = 0 ;
    double val9 ;
    int ecode9 = 0 ;
    double val10 ;
    int ecode10 = 0 ;
    void *argp11 ;
    int res11 = 0 ;
    int argvi = 0;
    CappedFlooredCmsCouponPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 11) || (items > 11)) {
      SWIG_croak("Usage: new_CappedFlooredCmsCoupon(paymentDate,nominal,startDate,endDate,fixingDays,index,gearing,spread,cap,floor,refPeriodStart);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CappedFlooredCmsCoupon" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CappedFlooredCmsCoupon" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "4"" of type '" "Date const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CappedFlooredCmsCoupon" "', argument " "4"" of type '" "Date const &""'"); 
    }
    arg4 = reinterpret_cast< Date * >(argp4);
    ecode5 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "5"" of type '" "Natural""'");
    } 
    arg5 = static_cast< Natural >(val5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_SwapIndexPtr,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "6"" of type '" "SwapIndexPtr const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CappedFlooredCmsCoupon" "', argument " "6"" of type '" "SwapIndexPtr const &""'"); 
    }
    arg6 = reinterpret_cast< SwapIndexPtr * >(argp6);
    ecode7 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "7"" of type '" "Real""'");
    } 
    arg7 = static_cast< Real >(val7);
    ecode8 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "8"" of type '" "Spread""'");
    } 
    arg8 = static_cast< Spread >(val8);
    ecode9 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(8), &val9);
    if (!SWIG_IsOK(ecode9)) {
      SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "9"" of type '" "Rate""'");
    } 
    arg9 = static_cast< Rate >(val9);
    ecode10 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), &val10);
    if (!SWIG_IsOK(ecode10)) {
      SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "10"" of type '" "Rate""'");
    } 
    arg10 = static_cast< Rate >(val10);
    res11 = SWIG_ConvertPtr(ST(10), &argp11, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res11)) {
      SWIG_exception_fail(SWIG_ArgError(res11), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "11"" of type '" "Date const &""'"); 
    }
    if (!argp11) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CappedFlooredCmsCoupon" "', argument " "11"" of type '" "Date const &""'"); 
    }
    arg11 = reinterpret_cast< Date * >(argp11);
    {
      try {
        result = (CappedFlooredCmsCouponPtr *)new_CappedFlooredCmsCouponPtr__SWIG_0((Date const &)*arg1,arg2,(Date const &)*arg3,(Date const &)*arg4,arg5,(SwapIndexPtr const &)*arg6,arg7,arg8,arg9,arg10,(Date const &)*arg11);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CappedFlooredCmsCouponPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CappedFlooredCmsCoupon__SWIG_4) {
  {
    Date *arg1 = 0 ;
    Real arg2 ;
    Date *arg3 = 0 ;
    Date *arg4 = 0 ;
    Natural arg5 ;
    SwapIndexPtr *arg6 = 0 ;
    Real arg7 ;
    Spread arg8 ;
    Rate arg9 ;
    Rate arg10 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    unsigned int val5 ;
    int ecode5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    double val7 ;
    int ecode7 = 0 ;
    double val8 ;
    int ecode8 = 0 ;
    double val9 ;
    int ecode9 = 0 ;
    double val10 ;
    int ecode10 = 0 ;
    int argvi = 0;
    CappedFlooredCmsCouponPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 10) || (items > 10)) {
      SWIG_croak("Usage: new_CappedFlooredCmsCoupon(paymentDate,nominal,startDate,endDate,fixingDays,index,gearing,spread,cap,floor);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CappedFlooredCmsCoupon" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CappedFlooredCmsCoupon" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "4"" of type '" "Date const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CappedFlooredCmsCoupon" "', argument " "4"" of type '" "Date const &""'"); 
    }
    arg4 = reinterpret_cast< Date * >(argp4);
    ecode5 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "5"" of type '" "Natural""'");
    } 
    arg5 = static_cast< Natural >(val5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_SwapIndexPtr,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "6"" of type '" "SwapIndexPtr const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CappedFlooredCmsCoupon" "', argument " "6"" of type '" "SwapIndexPtr const &""'"); 
    }
    arg6 = reinterpret_cast< SwapIndexPtr * >(argp6);
    ecode7 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "7"" of type '" "Real""'");
    } 
    arg7 = static_cast< Real >(val7);
    ecode8 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "8"" of type '" "Spread""'");
    } 
    arg8 = static_cast< Spread >(val8);
    ecode9 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(8), &val9);
    if (!SWIG_IsOK(ecode9)) {
      SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "9"" of type '" "Rate""'");
    } 
    arg9 = static_cast< Rate >(val9);
    ecode10 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), &val10);
    if (!SWIG_IsOK(ecode10)) {
      SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "10"" of type '" "Rate""'");
    } 
    arg10 = static_cast< Rate >(val10);
    {
      try {
        result = (CappedFlooredCmsCouponPtr *)new_CappedFlooredCmsCouponPtr__SWIG_0((Date const &)*arg1,arg2,(Date const &)*arg3,(Date const &)*arg4,arg5,(SwapIndexPtr const &)*arg6,arg7,arg8,arg9,arg10);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CappedFlooredCmsCouponPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CappedFlooredCmsCoupon__SWIG_5) {
  {
    Date *arg1 = 0 ;
    Real arg2 ;
    Date *arg3 = 0 ;
    Date *arg4 = 0 ;
    Natural arg5 ;
    SwapIndexPtr *arg6 = 0 ;
    Real arg7 ;
    Spread arg8 ;
    Rate arg9 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    unsigned int val5 ;
    int ecode5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    double val7 ;
    int ecode7 = 0 ;
    double val8 ;
    int ecode8 = 0 ;
    double val9 ;
    int ecode9 = 0 ;
    int argvi = 0;
    CappedFlooredCmsCouponPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 9) || (items > 9)) {
      SWIG_croak("Usage: new_CappedFlooredCmsCoupon(paymentDate,nominal,startDate,endDate,fixingDays,index,gearing,spread,cap);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CappedFlooredCmsCoupon" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CappedFlooredCmsCoupon" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "4"" of type '" "Date const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CappedFlooredCmsCoupon" "', argument " "4"" of type '" "Date const &""'"); 
    }
    arg4 = reinterpret_cast< Date * >(argp4);
    ecode5 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "5"" of type '" "Natural""'");
    } 
    arg5 = static_cast< Natural >(val5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_SwapIndexPtr,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "6"" of type '" "SwapIndexPtr const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CappedFlooredCmsCoupon" "', argument " "6"" of type '" "SwapIndexPtr const &""'"); 
    }
    arg6 = reinterpret_cast< SwapIndexPtr * >(argp6);
    ecode7 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "7"" of type '" "Real""'");
    } 
    arg7 = static_cast< Real >(val7);
    ecode8 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "8"" of type '" "Spread""'");
    } 
    arg8 = static_cast< Spread >(val8);
    ecode9 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(8), &val9);
    if (!SWIG_IsOK(ecode9)) {
      SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "9"" of type '" "Rate""'");
    } 
    arg9 = static_cast< Rate >(val9);
    {
      try {
        result = (CappedFlooredCmsCouponPtr *)new_CappedFlooredCmsCouponPtr__SWIG_0((Date const &)*arg1,arg2,(Date const &)*arg3,(Date const &)*arg4,arg5,(SwapIndexPtr const &)*arg6,arg7,arg8,arg9);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CappedFlooredCmsCouponPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CappedFlooredCmsCoupon__SWIG_6) {
  {
    Date *arg1 = 0 ;
    Real arg2 ;
    Date *arg3 = 0 ;
    Date *arg4 = 0 ;
    Natural arg5 ;
    SwapIndexPtr *arg6 = 0 ;
    Real arg7 ;
    Spread arg8 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    unsigned int val5 ;
    int ecode5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    double val7 ;
    int ecode7 = 0 ;
    double val8 ;
    int ecode8 = 0 ;
    int argvi = 0;
    CappedFlooredCmsCouponPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 8) || (items > 8)) {
      SWIG_croak("Usage: new_CappedFlooredCmsCoupon(paymentDate,nominal,startDate,endDate,fixingDays,index,gearing,spread);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CappedFlooredCmsCoupon" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CappedFlooredCmsCoupon" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "4"" of type '" "Date const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CappedFlooredCmsCoupon" "', argument " "4"" of type '" "Date const &""'"); 
    }
    arg4 = reinterpret_cast< Date * >(argp4);
    ecode5 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "5"" of type '" "Natural""'");
    } 
    arg5 = static_cast< Natural >(val5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_SwapIndexPtr,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "6"" of type '" "SwapIndexPtr const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CappedFlooredCmsCoupon" "', argument " "6"" of type '" "SwapIndexPtr const &""'"); 
    }
    arg6 = reinterpret_cast< SwapIndexPtr * >(argp6);
    ecode7 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "7"" of type '" "Real""'");
    } 
    arg7 = static_cast< Real >(val7);
    ecode8 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "8"" of type '" "Spread""'");
    } 
    arg8 = static_cast< Spread >(val8);
    {
      try {
        result = (CappedFlooredCmsCouponPtr *)new_CappedFlooredCmsCouponPtr__SWIG_0((Date const &)*arg1,arg2,(Date const &)*arg3,(Date const &)*arg4,arg5,(SwapIndexPtr const &)*arg6,arg7,arg8);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CappedFlooredCmsCouponPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CappedFlooredCmsCoupon__SWIG_7) {
  {
    Date *arg1 = 0 ;
    Real arg2 ;
    Date *arg3 = 0 ;
    Date *arg4 = 0 ;
    Natural arg5 ;
    SwapIndexPtr *arg6 = 0 ;
    Real arg7 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    unsigned int val5 ;
    int ecode5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    double val7 ;
    int ecode7 = 0 ;
    int argvi = 0;
    CappedFlooredCmsCouponPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: new_CappedFlooredCmsCoupon(paymentDate,nominal,startDate,endDate,fixingDays,index,gearing);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CappedFlooredCmsCoupon" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CappedFlooredCmsCoupon" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "4"" of type '" "Date const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CappedFlooredCmsCoupon" "', argument " "4"" of type '" "Date const &""'"); 
    }
    arg4 = reinterpret_cast< Date * >(argp4);
    ecode5 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "5"" of type '" "Natural""'");
    } 
    arg5 = static_cast< Natural >(val5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_SwapIndexPtr,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "6"" of type '" "SwapIndexPtr const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CappedFlooredCmsCoupon" "', argument " "6"" of type '" "SwapIndexPtr const &""'"); 
    }
    arg6 = reinterpret_cast< SwapIndexPtr * >(argp6);
    ecode7 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "7"" of type '" "Real""'");
    } 
    arg7 = static_cast< Real >(val7);
    {
      try {
        result = (CappedFlooredCmsCouponPtr *)new_CappedFlooredCmsCouponPtr__SWIG_0((Date const &)*arg1,arg2,(Date const &)*arg3,(Date const &)*arg4,arg5,(SwapIndexPtr const &)*arg6,arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CappedFlooredCmsCouponPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CappedFlooredCmsCoupon__SWIG_8) {
  {
    Date *arg1 = 0 ;
    Real arg2 ;
    Date *arg3 = 0 ;
    Date *arg4 = 0 ;
    Natural arg5 ;
    SwapIndexPtr *arg6 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    unsigned int val5 ;
    int ecode5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    int argvi = 0;
    CappedFlooredCmsCouponPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_CappedFlooredCmsCoupon(paymentDate,nominal,startDate,endDate,fixingDays,index);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CappedFlooredCmsCoupon" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CappedFlooredCmsCoupon" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "4"" of type '" "Date const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CappedFlooredCmsCoupon" "', argument " "4"" of type '" "Date const &""'"); 
    }
    arg4 = reinterpret_cast< Date * >(argp4);
    ecode5 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "5"" of type '" "Natural""'");
    } 
    arg5 = static_cast< Natural >(val5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_SwapIndexPtr,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_CappedFlooredCmsCoupon" "', argument " "6"" of type '" "SwapIndexPtr const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CappedFlooredCmsCoupon" "', argument " "6"" of type '" "SwapIndexPtr const &""'"); 
    }
    arg6 = reinterpret_cast< SwapIndexPtr * >(argp6);
    {
      try {
        result = (CappedFlooredCmsCouponPtr *)new_CappedFlooredCmsCouponPtr__SWIG_0((Date const &)*arg1,arg2,(Date const &)*arg3,(Date const &)*arg4,arg5,(SwapIndexPtr const &)*arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CappedFlooredCmsCouponPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CappedFlooredCmsCoupon) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_SwapIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_SwapIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 8) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_SwapIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 9) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_SwapIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(8), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 10) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_SwapIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(8), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 11) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_SwapIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(8), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(10), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
    if (items == 12) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_SwapIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(8), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(10), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(11), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 7;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_7:
    
    if (items == 13) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_SwapIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(8), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(10), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(11), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(12), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 8;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_8:
    
    if (items == 14) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_SwapIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(8), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(10), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(11), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(12), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(13), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 9;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_9:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_CappedFlooredCmsCoupon__SWIG_8); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_CappedFlooredCmsCoupon__SWIG_7); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_CappedFlooredCmsCoupon__SWIG_6); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_CappedFlooredCmsCoupon__SWIG_5); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_CappedFlooredCmsCoupon__SWIG_4); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_CappedFlooredCmsCoupon__SWIG_3); return;
    case 7:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_CappedFlooredCmsCoupon__SWIG_2); return;
    case 8:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_CappedFlooredCmsCoupon__SWIG_1); return;
    case 9:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_CappedFlooredCmsCoupon__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_CappedFlooredCmsCoupon'");
  XSRETURN(0);
}


XS(_wrap_delete_CappedFlooredCmsCoupon) {
  {
    CappedFlooredCmsCouponPtr *arg1 = (CappedFlooredCmsCouponPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_CappedFlooredCmsCoupon(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CappedFlooredCmsCouponPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CappedFlooredCmsCoupon" "', argument " "1"" of type '" "CappedFlooredCmsCouponPtr *""'"); 
    }
    arg1 = reinterpret_cast< CappedFlooredCmsCouponPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_LinearTsrPricer__SWIG_0) {
  {
    Handle< SwaptionVolatilityStructure > *arg1 = 0 ;
    Handle< Quote > *arg2 = 0 ;
    Handle< YieldTermStructure > *arg3 = 0 ;
    LinearTsrPricer::Settings *arg4 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int argvi = 0;
    LinearTsrPricerPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_LinearTsrPricer(swaptionVol,meanReversion,couponDiscountCurve,settings);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_SwaptionVolatilityStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_LinearTsrPricer" "', argument " "1"" of type '" "Handle< SwaptionVolatilityStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LinearTsrPricer" "', argument " "1"" of type '" "Handle< SwaptionVolatilityStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< SwaptionVolatilityStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_LinearTsrPricer" "', argument " "2"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LinearTsrPricer" "', argument " "2"" of type '" "Handle< Quote > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< Quote > * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_LinearTsrPricer" "', argument " "3"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LinearTsrPricer" "', argument " "3"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< YieldTermStructure > * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_LinearTsrPricer__Settings,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_LinearTsrPricer" "', argument " "4"" of type '" "LinearTsrPricer::Settings const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LinearTsrPricer" "', argument " "4"" of type '" "LinearTsrPricer::Settings const &""'"); 
    }
    arg4 = reinterpret_cast< LinearTsrPricer::Settings * >(argp4);
    {
      try {
        result = (LinearTsrPricerPtr *)new_LinearTsrPricerPtr__SWIG_0((Handle< SwaptionVolatilityStructure > const &)*arg1,(Handle< Quote > const &)*arg2,(Handle< YieldTermStructure > const &)*arg3,(LinearTsrPricer::Settings const &)*arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_LinearTsrPricerPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_LinearTsrPricer__SWIG_1) {
  {
    Handle< SwaptionVolatilityStructure > *arg1 = 0 ;
    Handle< Quote > *arg2 = 0 ;
    Handle< YieldTermStructure > *arg3 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    LinearTsrPricerPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_LinearTsrPricer(swaptionVol,meanReversion,couponDiscountCurve);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_SwaptionVolatilityStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_LinearTsrPricer" "', argument " "1"" of type '" "Handle< SwaptionVolatilityStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LinearTsrPricer" "', argument " "1"" of type '" "Handle< SwaptionVolatilityStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< SwaptionVolatilityStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_LinearTsrPricer" "', argument " "2"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LinearTsrPricer" "', argument " "2"" of type '" "Handle< Quote > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< Quote > * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_LinearTsrPricer" "', argument " "3"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LinearTsrPricer" "', argument " "3"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< YieldTermStructure > * >(argp3);
    {
      try {
        result = (LinearTsrPricerPtr *)new_LinearTsrPricerPtr__SWIG_0((Handle< SwaptionVolatilityStructure > const &)*arg1,(Handle< Quote > const &)*arg2,(Handle< YieldTermStructure > const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_LinearTsrPricerPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_LinearTsrPricer__SWIG_2) {
  {
    Handle< SwaptionVolatilityStructure > *arg1 = 0 ;
    Handle< Quote > *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    LinearTsrPricerPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_LinearTsrPricer(swaptionVol,meanReversion);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_SwaptionVolatilityStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_LinearTsrPricer" "', argument " "1"" of type '" "Handle< SwaptionVolatilityStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LinearTsrPricer" "', argument " "1"" of type '" "Handle< SwaptionVolatilityStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< SwaptionVolatilityStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_LinearTsrPricer" "', argument " "2"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LinearTsrPricer" "', argument " "2"" of type '" "Handle< Quote > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< Quote > * >(argp2);
    {
      try {
        result = (LinearTsrPricerPtr *)new_LinearTsrPricerPtr__SWIG_0((Handle< SwaptionVolatilityStructure > const &)*arg1,(Handle< Quote > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_LinearTsrPricerPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_LinearTsrPricer) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_SwaptionVolatilityStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_SwaptionVolatilityStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_SwaptionVolatilityStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_LinearTsrPricer__Settings, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_LinearTsrPricer__SWIG_2); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_LinearTsrPricer__SWIG_1); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_LinearTsrPricer__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_LinearTsrPricer'");
  XSRETURN(0);
}


XS(_wrap_delete_LinearTsrPricer) {
  {
    LinearTsrPricerPtr *arg1 = (LinearTsrPricerPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_LinearTsrPricer(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_LinearTsrPricerPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_LinearTsrPricer" "', argument " "1"" of type '" "LinearTsrPricerPtr *""'"); 
    }
    arg1 = reinterpret_cast< LinearTsrPricerPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_FixedRateLeg__SWIG_0) {
  {
    Schedule *arg1 = 0 ;
    DayCounter *arg2 = 0 ;
    std::vector< Real > *arg3 = 0 ;
    std::vector< Rate > *arg4 = 0 ;
    BusinessDayConvention arg5 ;
    DayCounter *arg6 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    std::vector< double > temp3 ;
    std::vector< double > *v3 ;
    std::vector< double > temp4 ;
    std::vector< double > *v4 ;
    int val5 ;
    int ecode5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    int argvi = 0;
    Leg result;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: FixedRateLeg(schedule,dayCount,nominals,couponRates,paymentAdjustment,firstPeriodDayCount);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FixedRateLeg" "', argument " "1"" of type '" "Schedule const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FixedRateLeg" "', argument " "1"" of type '" "Schedule const &""'"); 
    }
    arg1 = reinterpret_cast< Schedule * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FixedRateLeg" "', argument " "2"" of type '" "DayCounter const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FixedRateLeg" "', argument " "2"" of type '" "DayCounter const &""'"); 
    }
    arg2 = reinterpret_cast< DayCounter * >(argp2);
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of FixedRateLeg. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp3.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 3 of "
              "FixedRateLeg. "
              "Expected an array of ""double");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of FixedRateLeg. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of FixedRateLeg. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp4.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 4 of "
              "FixedRateLeg. "
              "Expected an array of ""double");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of FixedRateLeg. "
          "Expected an array of ""double");
      }
    }
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "FixedRateLeg" "', argument " "5"" of type '" "BusinessDayConvention""'");
    } 
    arg5 = static_cast< BusinessDayConvention >(val5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "FixedRateLeg" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FixedRateLeg" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    arg6 = reinterpret_cast< DayCounter * >(argp6);
    {
      try {
        result = _FixedRateLeg((Schedule const &)*arg1,(DayCounter const &)*arg2,(std::vector< double > const &)*arg3,(std::vector< double > const &)*arg4,arg5,(DayCounter const &)*arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        boost::shared_ptr< CashFlow >* ptr = new boost::shared_ptr< CashFlow >(result[i]);
        svs[i] = sv_newmortal();
        SWIG_MakePtr(svs[i], (void*) ptr, 
          SWIGTYPE_p_boost__shared_ptrT_CashFlow_t, SWIG_SHADOW|0);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_FixedRateLeg__SWIG_1) {
  {
    Schedule *arg1 = 0 ;
    DayCounter *arg2 = 0 ;
    std::vector< Real > *arg3 = 0 ;
    std::vector< Rate > *arg4 = 0 ;
    BusinessDayConvention arg5 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    std::vector< double > temp3 ;
    std::vector< double > *v3 ;
    std::vector< double > temp4 ;
    std::vector< double > *v4 ;
    int val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    Leg result;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: FixedRateLeg(schedule,dayCount,nominals,couponRates,paymentAdjustment);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FixedRateLeg" "', argument " "1"" of type '" "Schedule const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FixedRateLeg" "', argument " "1"" of type '" "Schedule const &""'"); 
    }
    arg1 = reinterpret_cast< Schedule * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FixedRateLeg" "', argument " "2"" of type '" "DayCounter const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FixedRateLeg" "', argument " "2"" of type '" "DayCounter const &""'"); 
    }
    arg2 = reinterpret_cast< DayCounter * >(argp2);
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of FixedRateLeg. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp3.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 3 of "
              "FixedRateLeg. "
              "Expected an array of ""double");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of FixedRateLeg. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of FixedRateLeg. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp4.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 4 of "
              "FixedRateLeg. "
              "Expected an array of ""double");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of FixedRateLeg. "
          "Expected an array of ""double");
      }
    }
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "FixedRateLeg" "', argument " "5"" of type '" "BusinessDayConvention""'");
    } 
    arg5 = static_cast< BusinessDayConvention >(val5);
    {
      try {
        result = _FixedRateLeg((Schedule const &)*arg1,(DayCounter const &)*arg2,(std::vector< double > const &)*arg3,(std::vector< double > const &)*arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        boost::shared_ptr< CashFlow >* ptr = new boost::shared_ptr< CashFlow >(result[i]);
        svs[i] = sv_newmortal();
        SWIG_MakePtr(svs[i], (void*) ptr, 
          SWIGTYPE_p_boost__shared_ptrT_CashFlow_t, SWIG_SHADOW|0);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_FixedRateLeg__SWIG_2) {
  {
    Schedule *arg1 = 0 ;
    DayCounter *arg2 = 0 ;
    std::vector< Real > *arg3 = 0 ;
    std::vector< Rate > *arg4 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    std::vector< double > temp3 ;
    std::vector< double > *v3 ;
    std::vector< double > temp4 ;
    std::vector< double > *v4 ;
    int argvi = 0;
    Leg result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: FixedRateLeg(schedule,dayCount,nominals,couponRates);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FixedRateLeg" "', argument " "1"" of type '" "Schedule const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FixedRateLeg" "', argument " "1"" of type '" "Schedule const &""'"); 
    }
    arg1 = reinterpret_cast< Schedule * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FixedRateLeg" "', argument " "2"" of type '" "DayCounter const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FixedRateLeg" "', argument " "2"" of type '" "DayCounter const &""'"); 
    }
    arg2 = reinterpret_cast< DayCounter * >(argp2);
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of FixedRateLeg. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp3.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 3 of "
              "FixedRateLeg. "
              "Expected an array of ""double");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of FixedRateLeg. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of FixedRateLeg. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp4.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 4 of "
              "FixedRateLeg. "
              "Expected an array of ""double");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of FixedRateLeg. "
          "Expected an array of ""double");
      }
    }
    {
      try {
        result = _FixedRateLeg((Schedule const &)*arg1,(DayCounter const &)*arg2,(std::vector< double > const &)*arg3,(std::vector< double > const &)*arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        boost::shared_ptr< CashFlow >* ptr = new boost::shared_ptr< CashFlow >(result[i]);
        svs[i] = sv_newmortal();
        SWIG_MakePtr(svs[i], (void*) ptr, 
          SWIGTYPE_p_boost__shared_ptrT_CashFlow_t, SWIG_SHADOW|0);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_FixedRateLeg) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(3),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(3))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(3));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(3),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(3))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(3));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(3),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(3))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(3));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_FixedRateLeg__SWIG_2); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_FixedRateLeg__SWIG_1); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_FixedRateLeg__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'FixedRateLeg'");
  XSRETURN(0);
}


XS(_wrap_IborLeg__SWIG_0) {
  {
    std::vector< Real > *arg1 = 0 ;
    Schedule *arg2 = 0 ;
    IborIndexPtr *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    BusinessDayConvention arg5 ;
    std::vector< Natural > *arg6 = 0 ;
    std::vector< Real > *arg7 = 0 ;
    std::vector< Spread > *arg8 = 0 ;
    std::vector< Rate > *arg9 = 0 ;
    std::vector< Rate > *arg10 = 0 ;
    bool arg11 ;
    std::vector< double > temp1 ;
    std::vector< double > *v1 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    std::vector< unsigned int > temp6 ;
    std::vector< unsigned int > *v6 ;
    std::vector< double > temp7 ;
    std::vector< double > *v7 ;
    std::vector< double > temp8 ;
    std::vector< double > *v8 ;
    std::vector< double > temp9 ;
    std::vector< double > *v9 ;
    std::vector< double > temp10 ;
    std::vector< double > *v10 ;
    bool val11 ;
    int ecode11 = 0 ;
    int argvi = 0;
    Leg result;
    dXSARGS;
    
    if ((items < 11) || (items > 11)) {
      SWIG_croak("Usage: IborLeg(nominals,schedule,index,paymentDayCounter,paymentConvention,fixingDays,gearings,spreads,caps,floors,isInArrears);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of IborLeg. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp1.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 1 of "
              "IborLeg. "
              "Expected an array of ""double");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of IborLeg. "
          "Expected an array of ""double");
      }
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IborLeg" "', argument " "2"" of type '" "Schedule const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IborLeg" "', argument " "2"" of type '" "Schedule const &""'"); 
    }
    arg2 = reinterpret_cast< Schedule * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_IborIndexPtr,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IborLeg" "', argument " "3"" of type '" "IborIndexPtr const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IborLeg" "', argument " "3"" of type '" "IborIndexPtr const &""'"); 
    }
    arg3 = reinterpret_cast< IborIndexPtr * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IborLeg" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IborLeg" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "IborLeg" "', argument " "5"" of type '" "BusinessDayConvention""'");
    } 
    arg5 = static_cast< BusinessDayConvention >(val5);
    {
      if (SWIG_ConvertPtr(ST(5),(void **) &v6, 
          SWIGTYPE_p_std__vectorT_unsigned_int_t,1) != -1) {
        arg6 = v6;
      } else if (SvROK(ST(5))) {
        AV *av = (AV *)SvRV(ST(5));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 6 of IborLeg. "
          "Expected an array of ""unsigned int");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvIOK(*tv)) {
            temp6.push_back((unsigned int)SvIVX(*tv));
          } else {
            SWIG_croak("Type error in argument 6 of "
              "IborLeg. "
              "Expected an array of ""unsigned int");
          }
        }
        arg6 = &temp6;
      } else {
        SWIG_croak("Type error in argument 6 of IborLeg. "
          "Expected an array of ""unsigned int");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(6),(void **) &v7, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg7 = v7;
      } else if (SvROK(ST(6))) {
        AV *av = (AV *)SvRV(ST(6));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 7 of IborLeg. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp7.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 7 of "
              "IborLeg. "
              "Expected an array of ""double");
          }
        }
        arg7 = &temp7;
      } else {
        SWIG_croak("Type error in argument 7 of IborLeg. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(7),(void **) &v8, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg8 = v8;
      } else if (SvROK(ST(7))) {
        AV *av = (AV *)SvRV(ST(7));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 8 of IborLeg. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp8.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 8 of "
              "IborLeg. "
              "Expected an array of ""double");
          }
        }
        arg8 = &temp8;
      } else {
        SWIG_croak("Type error in argument 8 of IborLeg. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(8),(void **) &v9, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg9 = v9;
      } else if (SvROK(ST(8))) {
        AV *av = (AV *)SvRV(ST(8));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 9 of IborLeg. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp9.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 9 of "
              "IborLeg. "
              "Expected an array of ""double");
          }
        }
        arg9 = &temp9;
      } else {
        SWIG_croak("Type error in argument 9 of IborLeg. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(9),(void **) &v10, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg10 = v10;
      } else if (SvROK(ST(9))) {
        AV *av = (AV *)SvRV(ST(9));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 10 of IborLeg. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp10.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 10 of "
              "IborLeg. "
              "Expected an array of ""double");
          }
        }
        arg10 = &temp10;
      } else {
        SWIG_croak("Type error in argument 10 of IborLeg. "
          "Expected an array of ""double");
      }
    }
    ecode11 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(10), &val11);
    if (!SWIG_IsOK(ecode11)) {
      SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "IborLeg" "', argument " "11"" of type '" "bool""'");
    } 
    arg11 = static_cast< bool >(val11);
    {
      try {
        result = _IborLeg((std::vector< double > const &)*arg1,(Schedule const &)*arg2,(IborIndexPtr const &)*arg3,(DayCounter const &)*arg4,arg5,(std::vector< unsigned int > const &)*arg6,(std::vector< double > const &)*arg7,(std::vector< double > const &)*arg8,(std::vector< double > const &)*arg9,(std::vector< double > const &)*arg10,arg11);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        boost::shared_ptr< CashFlow >* ptr = new boost::shared_ptr< CashFlow >(result[i]);
        svs[i] = sv_newmortal();
        SWIG_MakePtr(svs[i], (void*) ptr, 
          SWIGTYPE_p_boost__shared_ptrT_CashFlow_t, SWIG_SHADOW|0);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_IborLeg__SWIG_1) {
  {
    std::vector< Real > *arg1 = 0 ;
    Schedule *arg2 = 0 ;
    IborIndexPtr *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    BusinessDayConvention arg5 ;
    std::vector< Natural > *arg6 = 0 ;
    std::vector< Real > *arg7 = 0 ;
    std::vector< Spread > *arg8 = 0 ;
    std::vector< Rate > *arg9 = 0 ;
    std::vector< Rate > *arg10 = 0 ;
    std::vector< double > temp1 ;
    std::vector< double > *v1 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    std::vector< unsigned int > temp6 ;
    std::vector< unsigned int > *v6 ;
    std::vector< double > temp7 ;
    std::vector< double > *v7 ;
    std::vector< double > temp8 ;
    std::vector< double > *v8 ;
    std::vector< double > temp9 ;
    std::vector< double > *v9 ;
    std::vector< double > temp10 ;
    std::vector< double > *v10 ;
    int argvi = 0;
    Leg result;
    dXSARGS;
    
    if ((items < 10) || (items > 10)) {
      SWIG_croak("Usage: IborLeg(nominals,schedule,index,paymentDayCounter,paymentConvention,fixingDays,gearings,spreads,caps,floors);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of IborLeg. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp1.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 1 of "
              "IborLeg. "
              "Expected an array of ""double");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of IborLeg. "
          "Expected an array of ""double");
      }
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IborLeg" "', argument " "2"" of type '" "Schedule const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IborLeg" "', argument " "2"" of type '" "Schedule const &""'"); 
    }
    arg2 = reinterpret_cast< Schedule * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_IborIndexPtr,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IborLeg" "', argument " "3"" of type '" "IborIndexPtr const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IborLeg" "', argument " "3"" of type '" "IborIndexPtr const &""'"); 
    }
    arg3 = reinterpret_cast< IborIndexPtr * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IborLeg" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IborLeg" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "IborLeg" "', argument " "5"" of type '" "BusinessDayConvention""'");
    } 
    arg5 = static_cast< BusinessDayConvention >(val5);
    {
      if (SWIG_ConvertPtr(ST(5),(void **) &v6, 
          SWIGTYPE_p_std__vectorT_unsigned_int_t,1) != -1) {
        arg6 = v6;
      } else if (SvROK(ST(5))) {
        AV *av = (AV *)SvRV(ST(5));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 6 of IborLeg. "
          "Expected an array of ""unsigned int");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvIOK(*tv)) {
            temp6.push_back((unsigned int)SvIVX(*tv));
          } else {
            SWIG_croak("Type error in argument 6 of "
              "IborLeg. "
              "Expected an array of ""unsigned int");
          }
        }
        arg6 = &temp6;
      } else {
        SWIG_croak("Type error in argument 6 of IborLeg. "
          "Expected an array of ""unsigned int");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(6),(void **) &v7, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg7 = v7;
      } else if (SvROK(ST(6))) {
        AV *av = (AV *)SvRV(ST(6));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 7 of IborLeg. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp7.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 7 of "
              "IborLeg. "
              "Expected an array of ""double");
          }
        }
        arg7 = &temp7;
      } else {
        SWIG_croak("Type error in argument 7 of IborLeg. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(7),(void **) &v8, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg8 = v8;
      } else if (SvROK(ST(7))) {
        AV *av = (AV *)SvRV(ST(7));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 8 of IborLeg. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp8.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 8 of "
              "IborLeg. "
              "Expected an array of ""double");
          }
        }
        arg8 = &temp8;
      } else {
        SWIG_croak("Type error in argument 8 of IborLeg. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(8),(void **) &v9, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg9 = v9;
      } else if (SvROK(ST(8))) {
        AV *av = (AV *)SvRV(ST(8));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 9 of IborLeg. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp9.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 9 of "
              "IborLeg. "
              "Expected an array of ""double");
          }
        }
        arg9 = &temp9;
      } else {
        SWIG_croak("Type error in argument 9 of IborLeg. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(9),(void **) &v10, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg10 = v10;
      } else if (SvROK(ST(9))) {
        AV *av = (AV *)SvRV(ST(9));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 10 of IborLeg. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp10.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 10 of "
              "IborLeg. "
              "Expected an array of ""double");
          }
        }
        arg10 = &temp10;
      } else {
        SWIG_croak("Type error in argument 10 of IborLeg. "
          "Expected an array of ""double");
      }
    }
    {
      try {
        result = _IborLeg((std::vector< double > const &)*arg1,(Schedule const &)*arg2,(IborIndexPtr const &)*arg3,(DayCounter const &)*arg4,arg5,(std::vector< unsigned int > const &)*arg6,(std::vector< double > const &)*arg7,(std::vector< double > const &)*arg8,(std::vector< double > const &)*arg9,(std::vector< double > const &)*arg10);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        boost::shared_ptr< CashFlow >* ptr = new boost::shared_ptr< CashFlow >(result[i]);
        svs[i] = sv_newmortal();
        SWIG_MakePtr(svs[i], (void*) ptr, 
          SWIGTYPE_p_boost__shared_ptrT_CashFlow_t, SWIG_SHADOW|0);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_IborLeg__SWIG_2) {
  {
    std::vector< Real > *arg1 = 0 ;
    Schedule *arg2 = 0 ;
    IborIndexPtr *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    BusinessDayConvention arg5 ;
    std::vector< Natural > *arg6 = 0 ;
    std::vector< Real > *arg7 = 0 ;
    std::vector< Spread > *arg8 = 0 ;
    std::vector< Rate > *arg9 = 0 ;
    std::vector< double > temp1 ;
    std::vector< double > *v1 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    std::vector< unsigned int > temp6 ;
    std::vector< unsigned int > *v6 ;
    std::vector< double > temp7 ;
    std::vector< double > *v7 ;
    std::vector< double > temp8 ;
    std::vector< double > *v8 ;
    std::vector< double > temp9 ;
    std::vector< double > *v9 ;
    int argvi = 0;
    Leg result;
    dXSARGS;
    
    if ((items < 9) || (items > 9)) {
      SWIG_croak("Usage: IborLeg(nominals,schedule,index,paymentDayCounter,paymentConvention,fixingDays,gearings,spreads,caps);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of IborLeg. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp1.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 1 of "
              "IborLeg. "
              "Expected an array of ""double");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of IborLeg. "
          "Expected an array of ""double");
      }
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IborLeg" "', argument " "2"" of type '" "Schedule const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IborLeg" "', argument " "2"" of type '" "Schedule const &""'"); 
    }
    arg2 = reinterpret_cast< Schedule * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_IborIndexPtr,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IborLeg" "', argument " "3"" of type '" "IborIndexPtr const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IborLeg" "', argument " "3"" of type '" "IborIndexPtr const &""'"); 
    }
    arg3 = reinterpret_cast< IborIndexPtr * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IborLeg" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IborLeg" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "IborLeg" "', argument " "5"" of type '" "BusinessDayConvention""'");
    } 
    arg5 = static_cast< BusinessDayConvention >(val5);
    {
      if (SWIG_ConvertPtr(ST(5),(void **) &v6, 
          SWIGTYPE_p_std__vectorT_unsigned_int_t,1) != -1) {
        arg6 = v6;
      } else if (SvROK(ST(5))) {
        AV *av = (AV *)SvRV(ST(5));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 6 of IborLeg. "
          "Expected an array of ""unsigned int");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvIOK(*tv)) {
            temp6.push_back((unsigned int)SvIVX(*tv));
          } else {
            SWIG_croak("Type error in argument 6 of "
              "IborLeg. "
              "Expected an array of ""unsigned int");
          }
        }
        arg6 = &temp6;
      } else {
        SWIG_croak("Type error in argument 6 of IborLeg. "
          "Expected an array of ""unsigned int");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(6),(void **) &v7, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg7 = v7;
      } else if (SvROK(ST(6))) {
        AV *av = (AV *)SvRV(ST(6));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 7 of IborLeg. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp7.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 7 of "
              "IborLeg. "
              "Expected an array of ""double");
          }
        }
        arg7 = &temp7;
      } else {
        SWIG_croak("Type error in argument 7 of IborLeg. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(7),(void **) &v8, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg8 = v8;
      } else if (SvROK(ST(7))) {
        AV *av = (AV *)SvRV(ST(7));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 8 of IborLeg. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp8.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 8 of "
              "IborLeg. "
              "Expected an array of ""double");
          }
        }
        arg8 = &temp8;
      } else {
        SWIG_croak("Type error in argument 8 of IborLeg. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(8),(void **) &v9, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg9 = v9;
      } else if (SvROK(ST(8))) {
        AV *av = (AV *)SvRV(ST(8));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 9 of IborLeg. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp9.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 9 of "
              "IborLeg. "
              "Expected an array of ""double");
          }
        }
        arg9 = &temp9;
      } else {
        SWIG_croak("Type error in argument 9 of IborLeg. "
          "Expected an array of ""double");
      }
    }
    {
      try {
        result = _IborLeg((std::vector< double > const &)*arg1,(Schedule const &)*arg2,(IborIndexPtr const &)*arg3,(DayCounter const &)*arg4,arg5,(std::vector< unsigned int > const &)*arg6,(std::vector< double > const &)*arg7,(std::vector< double > const &)*arg8,(std::vector< double > const &)*arg9);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        boost::shared_ptr< CashFlow >* ptr = new boost::shared_ptr< CashFlow >(result[i]);
        svs[i] = sv_newmortal();
        SWIG_MakePtr(svs[i], (void*) ptr, 
          SWIGTYPE_p_boost__shared_ptrT_CashFlow_t, SWIG_SHADOW|0);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_IborLeg__SWIG_3) {
  {
    std::vector< Real > *arg1 = 0 ;
    Schedule *arg2 = 0 ;
    IborIndexPtr *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    BusinessDayConvention arg5 ;
    std::vector< Natural > *arg6 = 0 ;
    std::vector< Real > *arg7 = 0 ;
    std::vector< Spread > *arg8 = 0 ;
    std::vector< double > temp1 ;
    std::vector< double > *v1 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    std::vector< unsigned int > temp6 ;
    std::vector< unsigned int > *v6 ;
    std::vector< double > temp7 ;
    std::vector< double > *v7 ;
    std::vector< double > temp8 ;
    std::vector< double > *v8 ;
    int argvi = 0;
    Leg result;
    dXSARGS;
    
    if ((items < 8) || (items > 8)) {
      SWIG_croak("Usage: IborLeg(nominals,schedule,index,paymentDayCounter,paymentConvention,fixingDays,gearings,spreads);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of IborLeg. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp1.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 1 of "
              "IborLeg. "
              "Expected an array of ""double");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of IborLeg. "
          "Expected an array of ""double");
      }
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IborLeg" "', argument " "2"" of type '" "Schedule const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IborLeg" "', argument " "2"" of type '" "Schedule const &""'"); 
    }
    arg2 = reinterpret_cast< Schedule * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_IborIndexPtr,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IborLeg" "', argument " "3"" of type '" "IborIndexPtr const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IborLeg" "', argument " "3"" of type '" "IborIndexPtr const &""'"); 
    }
    arg3 = reinterpret_cast< IborIndexPtr * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IborLeg" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IborLeg" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "IborLeg" "', argument " "5"" of type '" "BusinessDayConvention""'");
    } 
    arg5 = static_cast< BusinessDayConvention >(val5);
    {
      if (SWIG_ConvertPtr(ST(5),(void **) &v6, 
          SWIGTYPE_p_std__vectorT_unsigned_int_t,1) != -1) {
        arg6 = v6;
      } else if (SvROK(ST(5))) {
        AV *av = (AV *)SvRV(ST(5));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 6 of IborLeg. "
          "Expected an array of ""unsigned int");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvIOK(*tv)) {
            temp6.push_back((unsigned int)SvIVX(*tv));
          } else {
            SWIG_croak("Type error in argument 6 of "
              "IborLeg. "
              "Expected an array of ""unsigned int");
          }
        }
        arg6 = &temp6;
      } else {
        SWIG_croak("Type error in argument 6 of IborLeg. "
          "Expected an array of ""unsigned int");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(6),(void **) &v7, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg7 = v7;
      } else if (SvROK(ST(6))) {
        AV *av = (AV *)SvRV(ST(6));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 7 of IborLeg. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp7.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 7 of "
              "IborLeg. "
              "Expected an array of ""double");
          }
        }
        arg7 = &temp7;
      } else {
        SWIG_croak("Type error in argument 7 of IborLeg. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(7),(void **) &v8, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg8 = v8;
      } else if (SvROK(ST(7))) {
        AV *av = (AV *)SvRV(ST(7));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 8 of IborLeg. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp8.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 8 of "
              "IborLeg. "
              "Expected an array of ""double");
          }
        }
        arg8 = &temp8;
      } else {
        SWIG_croak("Type error in argument 8 of IborLeg. "
          "Expected an array of ""double");
      }
    }
    {
      try {
        result = _IborLeg((std::vector< double > const &)*arg1,(Schedule const &)*arg2,(IborIndexPtr const &)*arg3,(DayCounter const &)*arg4,arg5,(std::vector< unsigned int > const &)*arg6,(std::vector< double > const &)*arg7,(std::vector< double > const &)*arg8);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        boost::shared_ptr< CashFlow >* ptr = new boost::shared_ptr< CashFlow >(result[i]);
        svs[i] = sv_newmortal();
        SWIG_MakePtr(svs[i], (void*) ptr, 
          SWIGTYPE_p_boost__shared_ptrT_CashFlow_t, SWIG_SHADOW|0);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_IborLeg__SWIG_4) {
  {
    std::vector< Real > *arg1 = 0 ;
    Schedule *arg2 = 0 ;
    IborIndexPtr *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    BusinessDayConvention arg5 ;
    std::vector< Natural > *arg6 = 0 ;
    std::vector< Real > *arg7 = 0 ;
    std::vector< double > temp1 ;
    std::vector< double > *v1 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    std::vector< unsigned int > temp6 ;
    std::vector< unsigned int > *v6 ;
    std::vector< double > temp7 ;
    std::vector< double > *v7 ;
    int argvi = 0;
    Leg result;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: IborLeg(nominals,schedule,index,paymentDayCounter,paymentConvention,fixingDays,gearings);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of IborLeg. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp1.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 1 of "
              "IborLeg. "
              "Expected an array of ""double");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of IborLeg. "
          "Expected an array of ""double");
      }
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IborLeg" "', argument " "2"" of type '" "Schedule const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IborLeg" "', argument " "2"" of type '" "Schedule const &""'"); 
    }
    arg2 = reinterpret_cast< Schedule * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_IborIndexPtr,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IborLeg" "', argument " "3"" of type '" "IborIndexPtr const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IborLeg" "', argument " "3"" of type '" "IborIndexPtr const &""'"); 
    }
    arg3 = reinterpret_cast< IborIndexPtr * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IborLeg" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IborLeg" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "IborLeg" "', argument " "5"" of type '" "BusinessDayConvention""'");
    } 
    arg5 = static_cast< BusinessDayConvention >(val5);
    {
      if (SWIG_ConvertPtr(ST(5),(void **) &v6, 
          SWIGTYPE_p_std__vectorT_unsigned_int_t,1) != -1) {
        arg6 = v6;
      } else if (SvROK(ST(5))) {
        AV *av = (AV *)SvRV(ST(5));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 6 of IborLeg. "
          "Expected an array of ""unsigned int");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvIOK(*tv)) {
            temp6.push_back((unsigned int)SvIVX(*tv));
          } else {
            SWIG_croak("Type error in argument 6 of "
              "IborLeg. "
              "Expected an array of ""unsigned int");
          }
        }
        arg6 = &temp6;
      } else {
        SWIG_croak("Type error in argument 6 of IborLeg. "
          "Expected an array of ""unsigned int");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(6),(void **) &v7, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg7 = v7;
      } else if (SvROK(ST(6))) {
        AV *av = (AV *)SvRV(ST(6));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 7 of IborLeg. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp7.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 7 of "
              "IborLeg. "
              "Expected an array of ""double");
          }
        }
        arg7 = &temp7;
      } else {
        SWIG_croak("Type error in argument 7 of IborLeg. "
          "Expected an array of ""double");
      }
    }
    {
      try {
        result = _IborLeg((std::vector< double > const &)*arg1,(Schedule const &)*arg2,(IborIndexPtr const &)*arg3,(DayCounter const &)*arg4,arg5,(std::vector< unsigned int > const &)*arg6,(std::vector< double > const &)*arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        boost::shared_ptr< CashFlow >* ptr = new boost::shared_ptr< CashFlow >(result[i]);
        svs[i] = sv_newmortal();
        SWIG_MakePtr(svs[i], (void*) ptr, 
          SWIGTYPE_p_boost__shared_ptrT_CashFlow_t, SWIG_SHADOW|0);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_IborLeg__SWIG_5) {
  {
    std::vector< Real > *arg1 = 0 ;
    Schedule *arg2 = 0 ;
    IborIndexPtr *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    BusinessDayConvention arg5 ;
    std::vector< Natural > *arg6 = 0 ;
    std::vector< double > temp1 ;
    std::vector< double > *v1 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    std::vector< unsigned int > temp6 ;
    std::vector< unsigned int > *v6 ;
    int argvi = 0;
    Leg result;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: IborLeg(nominals,schedule,index,paymentDayCounter,paymentConvention,fixingDays);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of IborLeg. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp1.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 1 of "
              "IborLeg. "
              "Expected an array of ""double");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of IborLeg. "
          "Expected an array of ""double");
      }
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IborLeg" "', argument " "2"" of type '" "Schedule const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IborLeg" "', argument " "2"" of type '" "Schedule const &""'"); 
    }
    arg2 = reinterpret_cast< Schedule * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_IborIndexPtr,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IborLeg" "', argument " "3"" of type '" "IborIndexPtr const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IborLeg" "', argument " "3"" of type '" "IborIndexPtr const &""'"); 
    }
    arg3 = reinterpret_cast< IborIndexPtr * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IborLeg" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IborLeg" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "IborLeg" "', argument " "5"" of type '" "BusinessDayConvention""'");
    } 
    arg5 = static_cast< BusinessDayConvention >(val5);
    {
      if (SWIG_ConvertPtr(ST(5),(void **) &v6, 
          SWIGTYPE_p_std__vectorT_unsigned_int_t,1) != -1) {
        arg6 = v6;
      } else if (SvROK(ST(5))) {
        AV *av = (AV *)SvRV(ST(5));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 6 of IborLeg. "
          "Expected an array of ""unsigned int");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvIOK(*tv)) {
            temp6.push_back((unsigned int)SvIVX(*tv));
          } else {
            SWIG_croak("Type error in argument 6 of "
              "IborLeg. "
              "Expected an array of ""unsigned int");
          }
        }
        arg6 = &temp6;
      } else {
        SWIG_croak("Type error in argument 6 of IborLeg. "
          "Expected an array of ""unsigned int");
      }
    }
    {
      try {
        result = _IborLeg((std::vector< double > const &)*arg1,(Schedule const &)*arg2,(IborIndexPtr const &)*arg3,(DayCounter const &)*arg4,arg5,(std::vector< unsigned int > const &)*arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        boost::shared_ptr< CashFlow >* ptr = new boost::shared_ptr< CashFlow >(result[i]);
        svs[i] = sv_newmortal();
        SWIG_MakePtr(svs[i], (void*) ptr, 
          SWIGTYPE_p_boost__shared_ptrT_CashFlow_t, SWIG_SHADOW|0);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_IborLeg__SWIG_6) {
  {
    std::vector< Real > *arg1 = 0 ;
    Schedule *arg2 = 0 ;
    IborIndexPtr *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    BusinessDayConvention arg5 ;
    std::vector< double > temp1 ;
    std::vector< double > *v1 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    Leg result;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: IborLeg(nominals,schedule,index,paymentDayCounter,paymentConvention);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of IborLeg. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp1.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 1 of "
              "IborLeg. "
              "Expected an array of ""double");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of IborLeg. "
          "Expected an array of ""double");
      }
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IborLeg" "', argument " "2"" of type '" "Schedule const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IborLeg" "', argument " "2"" of type '" "Schedule const &""'"); 
    }
    arg2 = reinterpret_cast< Schedule * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_IborIndexPtr,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IborLeg" "', argument " "3"" of type '" "IborIndexPtr const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IborLeg" "', argument " "3"" of type '" "IborIndexPtr const &""'"); 
    }
    arg3 = reinterpret_cast< IborIndexPtr * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IborLeg" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IborLeg" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "IborLeg" "', argument " "5"" of type '" "BusinessDayConvention""'");
    } 
    arg5 = static_cast< BusinessDayConvention >(val5);
    {
      try {
        result = _IborLeg((std::vector< double > const &)*arg1,(Schedule const &)*arg2,(IborIndexPtr const &)*arg3,(DayCounter const &)*arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        boost::shared_ptr< CashFlow >* ptr = new boost::shared_ptr< CashFlow >(result[i]);
        svs[i] = sv_newmortal();
        SWIG_MakePtr(svs[i], (void*) ptr, 
          SWIGTYPE_p_boost__shared_ptrT_CashFlow_t, SWIG_SHADOW|0);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_IborLeg__SWIG_7) {
  {
    std::vector< Real > *arg1 = 0 ;
    Schedule *arg2 = 0 ;
    IborIndexPtr *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    std::vector< double > temp1 ;
    std::vector< double > *v1 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int argvi = 0;
    Leg result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: IborLeg(nominals,schedule,index,paymentDayCounter);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of IborLeg. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp1.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 1 of "
              "IborLeg. "
              "Expected an array of ""double");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of IborLeg. "
          "Expected an array of ""double");
      }
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IborLeg" "', argument " "2"" of type '" "Schedule const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IborLeg" "', argument " "2"" of type '" "Schedule const &""'"); 
    }
    arg2 = reinterpret_cast< Schedule * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_IborIndexPtr,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IborLeg" "', argument " "3"" of type '" "IborIndexPtr const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IborLeg" "', argument " "3"" of type '" "IborIndexPtr const &""'"); 
    }
    arg3 = reinterpret_cast< IborIndexPtr * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IborLeg" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IborLeg" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    {
      try {
        result = _IborLeg((std::vector< double > const &)*arg1,(Schedule const &)*arg2,(IborIndexPtr const &)*arg3,(DayCounter const &)*arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        boost::shared_ptr< CashFlow >* ptr = new boost::shared_ptr< CashFlow >(result[i]);
        svs[i] = sv_newmortal();
        SWIG_MakePtr(svs[i], (void*) ptr, 
          SWIGTYPE_p_boost__shared_ptrT_CashFlow_t, SWIG_SHADOW|0);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_IborLeg__SWIG_8) {
  {
    std::vector< Real > *arg1 = 0 ;
    Schedule *arg2 = 0 ;
    IborIndexPtr *arg3 = 0 ;
    std::vector< double > temp1 ;
    std::vector< double > *v1 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    Leg result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: IborLeg(nominals,schedule,index);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of IborLeg. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp1.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 1 of "
              "IborLeg. "
              "Expected an array of ""double");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of IborLeg. "
          "Expected an array of ""double");
      }
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IborLeg" "', argument " "2"" of type '" "Schedule const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IborLeg" "', argument " "2"" of type '" "Schedule const &""'"); 
    }
    arg2 = reinterpret_cast< Schedule * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_IborIndexPtr,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IborLeg" "', argument " "3"" of type '" "IborIndexPtr const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IborLeg" "', argument " "3"" of type '" "IborIndexPtr const &""'"); 
    }
    arg3 = reinterpret_cast< IborIndexPtr * >(argp3);
    {
      try {
        result = _IborLeg((std::vector< double > const &)*arg1,(Schedule const &)*arg2,(IborIndexPtr const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        boost::shared_ptr< CashFlow >* ptr = new boost::shared_ptr< CashFlow >(result[i]);
        svs[i] = sv_newmortal();
        SWIG_MakePtr(svs[i], (void*) ptr, 
          SWIGTYPE_p_boost__shared_ptrT_CashFlow_t, SWIG_SHADOW|0);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_IborLeg) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_IborIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_IborIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_IborIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_IborIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< unsigned int >* v;
            if (SWIG_ConvertPtr(ST(5),(void **) &v, 
                SWIGTYPE_p_std__vectorT_unsigned_int_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(5))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(5));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_IborIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< unsigned int >* v;
            if (SWIG_ConvertPtr(ST(5),(void **) &v, 
                SWIGTYPE_p_std__vectorT_unsigned_int_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(5))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(5));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(6),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(6))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(6));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 8) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_IborIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< unsigned int >* v;
            if (SWIG_ConvertPtr(ST(5),(void **) &v, 
                SWIGTYPE_p_std__vectorT_unsigned_int_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(5))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(5));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(6),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(6))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(6));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(7),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(7))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(7));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
    if (items == 9) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_IborIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< unsigned int >* v;
            if (SWIG_ConvertPtr(ST(5),(void **) &v, 
                SWIGTYPE_p_std__vectorT_unsigned_int_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(5))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(5));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(6),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(6))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(6));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(7),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(7))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(7));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(8),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(8))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(8));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 7;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_7:
    
    if (items == 10) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_IborIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< unsigned int >* v;
            if (SWIG_ConvertPtr(ST(5),(void **) &v, 
                SWIGTYPE_p_std__vectorT_unsigned_int_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(5))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(5));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(6),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(6))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(6));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(7),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(7))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(7));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(8),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(8))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(8));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(9),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(9))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(9));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 8;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_8:
    
    if (items == 11) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_IborIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< unsigned int >* v;
            if (SWIG_ConvertPtr(ST(5),(void **) &v, 
                SWIGTYPE_p_std__vectorT_unsigned_int_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(5))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(5));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(6),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(6))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(6));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(7),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(7))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(7));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(8),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(8))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(8));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(9),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(9))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(9));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(10), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 9;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_9:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_IborLeg__SWIG_8); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_IborLeg__SWIG_7); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_IborLeg__SWIG_6); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_IborLeg__SWIG_5); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_IborLeg__SWIG_4); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_IborLeg__SWIG_3); return;
    case 7:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_IborLeg__SWIG_2); return;
    case 8:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_IborLeg__SWIG_1); return;
    case 9:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_IborLeg__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'IborLeg'");
  XSRETURN(0);
}


XS(_wrap_CmsLeg__SWIG_0) {
  {
    std::vector< Real > *arg1 = 0 ;
    Schedule *arg2 = 0 ;
    SwapIndexPtr *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    BusinessDayConvention arg5 ;
    std::vector< Natural > *arg6 = 0 ;
    std::vector< Real > *arg7 = 0 ;
    std::vector< Spread > *arg8 = 0 ;
    std::vector< Rate > *arg9 = 0 ;
    std::vector< Rate > *arg10 = 0 ;
    bool arg11 ;
    std::vector< double > temp1 ;
    std::vector< double > *v1 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    std::vector< unsigned int > temp6 ;
    std::vector< unsigned int > *v6 ;
    std::vector< double > temp7 ;
    std::vector< double > *v7 ;
    std::vector< double > temp8 ;
    std::vector< double > *v8 ;
    std::vector< double > temp9 ;
    std::vector< double > *v9 ;
    std::vector< double > temp10 ;
    std::vector< double > *v10 ;
    bool val11 ;
    int ecode11 = 0 ;
    int argvi = 0;
    Leg result;
    dXSARGS;
    
    if ((items < 11) || (items > 11)) {
      SWIG_croak("Usage: CmsLeg(nominals,schedule,index,paymentDayCounter,paymentConvention,fixingDays,gearings,spreads,caps,floors,isInArrears);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of CmsLeg. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp1.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 1 of "
              "CmsLeg. "
              "Expected an array of ""double");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of CmsLeg. "
          "Expected an array of ""double");
      }
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CmsLeg" "', argument " "2"" of type '" "Schedule const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CmsLeg" "', argument " "2"" of type '" "Schedule const &""'"); 
    }
    arg2 = reinterpret_cast< Schedule * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_SwapIndexPtr,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CmsLeg" "', argument " "3"" of type '" "SwapIndexPtr const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CmsLeg" "', argument " "3"" of type '" "SwapIndexPtr const &""'"); 
    }
    arg3 = reinterpret_cast< SwapIndexPtr * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "CmsLeg" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CmsLeg" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CmsLeg" "', argument " "5"" of type '" "BusinessDayConvention""'");
    } 
    arg5 = static_cast< BusinessDayConvention >(val5);
    {
      if (SWIG_ConvertPtr(ST(5),(void **) &v6, 
          SWIGTYPE_p_std__vectorT_unsigned_int_t,1) != -1) {
        arg6 = v6;
      } else if (SvROK(ST(5))) {
        AV *av = (AV *)SvRV(ST(5));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 6 of CmsLeg. "
          "Expected an array of ""unsigned int");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvIOK(*tv)) {
            temp6.push_back((unsigned int)SvIVX(*tv));
          } else {
            SWIG_croak("Type error in argument 6 of "
              "CmsLeg. "
              "Expected an array of ""unsigned int");
          }
        }
        arg6 = &temp6;
      } else {
        SWIG_croak("Type error in argument 6 of CmsLeg. "
          "Expected an array of ""unsigned int");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(6),(void **) &v7, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg7 = v7;
      } else if (SvROK(ST(6))) {
        AV *av = (AV *)SvRV(ST(6));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 7 of CmsLeg. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp7.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 7 of "
              "CmsLeg. "
              "Expected an array of ""double");
          }
        }
        arg7 = &temp7;
      } else {
        SWIG_croak("Type error in argument 7 of CmsLeg. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(7),(void **) &v8, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg8 = v8;
      } else if (SvROK(ST(7))) {
        AV *av = (AV *)SvRV(ST(7));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 8 of CmsLeg. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp8.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 8 of "
              "CmsLeg. "
              "Expected an array of ""double");
          }
        }
        arg8 = &temp8;
      } else {
        SWIG_croak("Type error in argument 8 of CmsLeg. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(8),(void **) &v9, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg9 = v9;
      } else if (SvROK(ST(8))) {
        AV *av = (AV *)SvRV(ST(8));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 9 of CmsLeg. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp9.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 9 of "
              "CmsLeg. "
              "Expected an array of ""double");
          }
        }
        arg9 = &temp9;
      } else {
        SWIG_croak("Type error in argument 9 of CmsLeg. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(9),(void **) &v10, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg10 = v10;
      } else if (SvROK(ST(9))) {
        AV *av = (AV *)SvRV(ST(9));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 10 of CmsLeg. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp10.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 10 of "
              "CmsLeg. "
              "Expected an array of ""double");
          }
        }
        arg10 = &temp10;
      } else {
        SWIG_croak("Type error in argument 10 of CmsLeg. "
          "Expected an array of ""double");
      }
    }
    ecode11 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(10), &val11);
    if (!SWIG_IsOK(ecode11)) {
      SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "CmsLeg" "', argument " "11"" of type '" "bool""'");
    } 
    arg11 = static_cast< bool >(val11);
    {
      try {
        result = _CmsLeg((std::vector< double > const &)*arg1,(Schedule const &)*arg2,(SwapIndexPtr const &)*arg3,(DayCounter const &)*arg4,arg5,(std::vector< unsigned int > const &)*arg6,(std::vector< double > const &)*arg7,(std::vector< double > const &)*arg8,(std::vector< double > const &)*arg9,(std::vector< double > const &)*arg10,arg11);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        boost::shared_ptr< CashFlow >* ptr = new boost::shared_ptr< CashFlow >(result[i]);
        svs[i] = sv_newmortal();
        SWIG_MakePtr(svs[i], (void*) ptr, 
          SWIGTYPE_p_boost__shared_ptrT_CashFlow_t, SWIG_SHADOW|0);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CmsLeg__SWIG_1) {
  {
    std::vector< Real > *arg1 = 0 ;
    Schedule *arg2 = 0 ;
    SwapIndexPtr *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    BusinessDayConvention arg5 ;
    std::vector< Natural > *arg6 = 0 ;
    std::vector< Real > *arg7 = 0 ;
    std::vector< Spread > *arg8 = 0 ;
    std::vector< Rate > *arg9 = 0 ;
    std::vector< Rate > *arg10 = 0 ;
    std::vector< double > temp1 ;
    std::vector< double > *v1 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    std::vector< unsigned int > temp6 ;
    std::vector< unsigned int > *v6 ;
    std::vector< double > temp7 ;
    std::vector< double > *v7 ;
    std::vector< double > temp8 ;
    std::vector< double > *v8 ;
    std::vector< double > temp9 ;
    std::vector< double > *v9 ;
    std::vector< double > temp10 ;
    std::vector< double > *v10 ;
    int argvi = 0;
    Leg result;
    dXSARGS;
    
    if ((items < 10) || (items > 10)) {
      SWIG_croak("Usage: CmsLeg(nominals,schedule,index,paymentDayCounter,paymentConvention,fixingDays,gearings,spreads,caps,floors);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of CmsLeg. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp1.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 1 of "
              "CmsLeg. "
              "Expected an array of ""double");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of CmsLeg. "
          "Expected an array of ""double");
      }
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CmsLeg" "', argument " "2"" of type '" "Schedule const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CmsLeg" "', argument " "2"" of type '" "Schedule const &""'"); 
    }
    arg2 = reinterpret_cast< Schedule * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_SwapIndexPtr,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CmsLeg" "', argument " "3"" of type '" "SwapIndexPtr const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CmsLeg" "', argument " "3"" of type '" "SwapIndexPtr const &""'"); 
    }
    arg3 = reinterpret_cast< SwapIndexPtr * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "CmsLeg" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CmsLeg" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CmsLeg" "', argument " "5"" of type '" "BusinessDayConvention""'");
    } 
    arg5 = static_cast< BusinessDayConvention >(val5);
    {
      if (SWIG_ConvertPtr(ST(5),(void **) &v6, 
          SWIGTYPE_p_std__vectorT_unsigned_int_t,1) != -1) {
        arg6 = v6;
      } else if (SvROK(ST(5))) {
        AV *av = (AV *)SvRV(ST(5));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 6 of CmsLeg. "
          "Expected an array of ""unsigned int");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvIOK(*tv)) {
            temp6.push_back((unsigned int)SvIVX(*tv));
          } else {
            SWIG_croak("Type error in argument 6 of "
              "CmsLeg. "
              "Expected an array of ""unsigned int");
          }
        }
        arg6 = &temp6;
      } else {
        SWIG_croak("Type error in argument 6 of CmsLeg. "
          "Expected an array of ""unsigned int");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(6),(void **) &v7, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg7 = v7;
      } else if (SvROK(ST(6))) {
        AV *av = (AV *)SvRV(ST(6));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 7 of CmsLeg. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp7.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 7 of "
              "CmsLeg. "
              "Expected an array of ""double");
          }
        }
        arg7 = &temp7;
      } else {
        SWIG_croak("Type error in argument 7 of CmsLeg. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(7),(void **) &v8, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg8 = v8;
      } else if (SvROK(ST(7))) {
        AV *av = (AV *)SvRV(ST(7));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 8 of CmsLeg. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp8.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 8 of "
              "CmsLeg. "
              "Expected an array of ""double");
          }
        }
        arg8 = &temp8;
      } else {
        SWIG_croak("Type error in argument 8 of CmsLeg. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(8),(void **) &v9, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg9 = v9;
      } else if (SvROK(ST(8))) {
        AV *av = (AV *)SvRV(ST(8));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 9 of CmsLeg. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp9.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 9 of "
              "CmsLeg. "
              "Expected an array of ""double");
          }
        }
        arg9 = &temp9;
      } else {
        SWIG_croak("Type error in argument 9 of CmsLeg. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(9),(void **) &v10, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg10 = v10;
      } else if (SvROK(ST(9))) {
        AV *av = (AV *)SvRV(ST(9));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 10 of CmsLeg. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp10.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 10 of "
              "CmsLeg. "
              "Expected an array of ""double");
          }
        }
        arg10 = &temp10;
      } else {
        SWIG_croak("Type error in argument 10 of CmsLeg. "
          "Expected an array of ""double");
      }
    }
    {
      try {
        result = _CmsLeg((std::vector< double > const &)*arg1,(Schedule const &)*arg2,(SwapIndexPtr const &)*arg3,(DayCounter const &)*arg4,arg5,(std::vector< unsigned int > const &)*arg6,(std::vector< double > const &)*arg7,(std::vector< double > const &)*arg8,(std::vector< double > const &)*arg9,(std::vector< double > const &)*arg10);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        boost::shared_ptr< CashFlow >* ptr = new boost::shared_ptr< CashFlow >(result[i]);
        svs[i] = sv_newmortal();
        SWIG_MakePtr(svs[i], (void*) ptr, 
          SWIGTYPE_p_boost__shared_ptrT_CashFlow_t, SWIG_SHADOW|0);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CmsLeg__SWIG_2) {
  {
    std::vector< Real > *arg1 = 0 ;
    Schedule *arg2 = 0 ;
    SwapIndexPtr *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    BusinessDayConvention arg5 ;
    std::vector< Natural > *arg6 = 0 ;
    std::vector< Real > *arg7 = 0 ;
    std::vector< Spread > *arg8 = 0 ;
    std::vector< Rate > *arg9 = 0 ;
    std::vector< double > temp1 ;
    std::vector< double > *v1 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    std::vector< unsigned int > temp6 ;
    std::vector< unsigned int > *v6 ;
    std::vector< double > temp7 ;
    std::vector< double > *v7 ;
    std::vector< double > temp8 ;
    std::vector< double > *v8 ;
    std::vector< double > temp9 ;
    std::vector< double > *v9 ;
    int argvi = 0;
    Leg result;
    dXSARGS;
    
    if ((items < 9) || (items > 9)) {
      SWIG_croak("Usage: CmsLeg(nominals,schedule,index,paymentDayCounter,paymentConvention,fixingDays,gearings,spreads,caps);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of CmsLeg. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp1.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 1 of "
              "CmsLeg. "
              "Expected an array of ""double");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of CmsLeg. "
          "Expected an array of ""double");
      }
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CmsLeg" "', argument " "2"" of type '" "Schedule const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CmsLeg" "', argument " "2"" of type '" "Schedule const &""'"); 
    }
    arg2 = reinterpret_cast< Schedule * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_SwapIndexPtr,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CmsLeg" "', argument " "3"" of type '" "SwapIndexPtr const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CmsLeg" "', argument " "3"" of type '" "SwapIndexPtr const &""'"); 
    }
    arg3 = reinterpret_cast< SwapIndexPtr * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "CmsLeg" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CmsLeg" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CmsLeg" "', argument " "5"" of type '" "BusinessDayConvention""'");
    } 
    arg5 = static_cast< BusinessDayConvention >(val5);
    {
      if (SWIG_ConvertPtr(ST(5),(void **) &v6, 
          SWIGTYPE_p_std__vectorT_unsigned_int_t,1) != -1) {
        arg6 = v6;
      } else if (SvROK(ST(5))) {
        AV *av = (AV *)SvRV(ST(5));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 6 of CmsLeg. "
          "Expected an array of ""unsigned int");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvIOK(*tv)) {
            temp6.push_back((unsigned int)SvIVX(*tv));
          } else {
            SWIG_croak("Type error in argument 6 of "
              "CmsLeg. "
              "Expected an array of ""unsigned int");
          }
        }
        arg6 = &temp6;
      } else {
        SWIG_croak("Type error in argument 6 of CmsLeg. "
          "Expected an array of ""unsigned int");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(6),(void **) &v7, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg7 = v7;
      } else if (SvROK(ST(6))) {
        AV *av = (AV *)SvRV(ST(6));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 7 of CmsLeg. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp7.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 7 of "
              "CmsLeg. "
              "Expected an array of ""double");
          }
        }
        arg7 = &temp7;
      } else {
        SWIG_croak("Type error in argument 7 of CmsLeg. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(7),(void **) &v8, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg8 = v8;
      } else if (SvROK(ST(7))) {
        AV *av = (AV *)SvRV(ST(7));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 8 of CmsLeg. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp8.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 8 of "
              "CmsLeg. "
              "Expected an array of ""double");
          }
        }
        arg8 = &temp8;
      } else {
        SWIG_croak("Type error in argument 8 of CmsLeg. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(8),(void **) &v9, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg9 = v9;
      } else if (SvROK(ST(8))) {
        AV *av = (AV *)SvRV(ST(8));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 9 of CmsLeg. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp9.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 9 of "
              "CmsLeg. "
              "Expected an array of ""double");
          }
        }
        arg9 = &temp9;
      } else {
        SWIG_croak("Type error in argument 9 of CmsLeg. "
          "Expected an array of ""double");
      }
    }
    {
      try {
        result = _CmsLeg((std::vector< double > const &)*arg1,(Schedule const &)*arg2,(SwapIndexPtr const &)*arg3,(DayCounter const &)*arg4,arg5,(std::vector< unsigned int > const &)*arg6,(std::vector< double > const &)*arg7,(std::vector< double > const &)*arg8,(std::vector< double > const &)*arg9);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        boost::shared_ptr< CashFlow >* ptr = new boost::shared_ptr< CashFlow >(result[i]);
        svs[i] = sv_newmortal();
        SWIG_MakePtr(svs[i], (void*) ptr, 
          SWIGTYPE_p_boost__shared_ptrT_CashFlow_t, SWIG_SHADOW|0);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CmsLeg__SWIG_3) {
  {
    std::vector< Real > *arg1 = 0 ;
    Schedule *arg2 = 0 ;
    SwapIndexPtr *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    BusinessDayConvention arg5 ;
    std::vector< Natural > *arg6 = 0 ;
    std::vector< Real > *arg7 = 0 ;
    std::vector< Spread > *arg8 = 0 ;
    std::vector< double > temp1 ;
    std::vector< double > *v1 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    std::vector< unsigned int > temp6 ;
    std::vector< unsigned int > *v6 ;
    std::vector< double > temp7 ;
    std::vector< double > *v7 ;
    std::vector< double > temp8 ;
    std::vector< double > *v8 ;
    int argvi = 0;
    Leg result;
    dXSARGS;
    
    if ((items < 8) || (items > 8)) {
      SWIG_croak("Usage: CmsLeg(nominals,schedule,index,paymentDayCounter,paymentConvention,fixingDays,gearings,spreads);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of CmsLeg. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp1.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 1 of "
              "CmsLeg. "
              "Expected an array of ""double");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of CmsLeg. "
          "Expected an array of ""double");
      }
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CmsLeg" "', argument " "2"" of type '" "Schedule const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CmsLeg" "', argument " "2"" of type '" "Schedule const &""'"); 
    }
    arg2 = reinterpret_cast< Schedule * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_SwapIndexPtr,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CmsLeg" "', argument " "3"" of type '" "SwapIndexPtr const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CmsLeg" "', argument " "3"" of type '" "SwapIndexPtr const &""'"); 
    }
    arg3 = reinterpret_cast< SwapIndexPtr * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "CmsLeg" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CmsLeg" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CmsLeg" "', argument " "5"" of type '" "BusinessDayConvention""'");
    } 
    arg5 = static_cast< BusinessDayConvention >(val5);
    {
      if (SWIG_ConvertPtr(ST(5),(void **) &v6, 
          SWIGTYPE_p_std__vectorT_unsigned_int_t,1) != -1) {
        arg6 = v6;
      } else if (SvROK(ST(5))) {
        AV *av = (AV *)SvRV(ST(5));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 6 of CmsLeg. "
          "Expected an array of ""unsigned int");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvIOK(*tv)) {
            temp6.push_back((unsigned int)SvIVX(*tv));
          } else {
            SWIG_croak("Type error in argument 6 of "
              "CmsLeg. "
              "Expected an array of ""unsigned int");
          }
        }
        arg6 = &temp6;
      } else {
        SWIG_croak("Type error in argument 6 of CmsLeg. "
          "Expected an array of ""unsigned int");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(6),(void **) &v7, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg7 = v7;
      } else if (SvROK(ST(6))) {
        AV *av = (AV *)SvRV(ST(6));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 7 of CmsLeg. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp7.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 7 of "
              "CmsLeg. "
              "Expected an array of ""double");
          }
        }
        arg7 = &temp7;
      } else {
        SWIG_croak("Type error in argument 7 of CmsLeg. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(7),(void **) &v8, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg8 = v8;
      } else if (SvROK(ST(7))) {
        AV *av = (AV *)SvRV(ST(7));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 8 of CmsLeg. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp8.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 8 of "
              "CmsLeg. "
              "Expected an array of ""double");
          }
        }
        arg8 = &temp8;
      } else {
        SWIG_croak("Type error in argument 8 of CmsLeg. "
          "Expected an array of ""double");
      }
    }
    {
      try {
        result = _CmsLeg((std::vector< double > const &)*arg1,(Schedule const &)*arg2,(SwapIndexPtr const &)*arg3,(DayCounter const &)*arg4,arg5,(std::vector< unsigned int > const &)*arg6,(std::vector< double > const &)*arg7,(std::vector< double > const &)*arg8);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        boost::shared_ptr< CashFlow >* ptr = new boost::shared_ptr< CashFlow >(result[i]);
        svs[i] = sv_newmortal();
        SWIG_MakePtr(svs[i], (void*) ptr, 
          SWIGTYPE_p_boost__shared_ptrT_CashFlow_t, SWIG_SHADOW|0);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CmsLeg__SWIG_4) {
  {
    std::vector< Real > *arg1 = 0 ;
    Schedule *arg2 = 0 ;
    SwapIndexPtr *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    BusinessDayConvention arg5 ;
    std::vector< Natural > *arg6 = 0 ;
    std::vector< Real > *arg7 = 0 ;
    std::vector< double > temp1 ;
    std::vector< double > *v1 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    std::vector< unsigned int > temp6 ;
    std::vector< unsigned int > *v6 ;
    std::vector< double > temp7 ;
    std::vector< double > *v7 ;
    int argvi = 0;
    Leg result;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: CmsLeg(nominals,schedule,index,paymentDayCounter,paymentConvention,fixingDays,gearings);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of CmsLeg. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp1.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 1 of "
              "CmsLeg. "
              "Expected an array of ""double");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of CmsLeg. "
          "Expected an array of ""double");
      }
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CmsLeg" "', argument " "2"" of type '" "Schedule const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CmsLeg" "', argument " "2"" of type '" "Schedule const &""'"); 
    }
    arg2 = reinterpret_cast< Schedule * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_SwapIndexPtr,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CmsLeg" "', argument " "3"" of type '" "SwapIndexPtr const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CmsLeg" "', argument " "3"" of type '" "SwapIndexPtr const &""'"); 
    }
    arg3 = reinterpret_cast< SwapIndexPtr * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "CmsLeg" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CmsLeg" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CmsLeg" "', argument " "5"" of type '" "BusinessDayConvention""'");
    } 
    arg5 = static_cast< BusinessDayConvention >(val5);
    {
      if (SWIG_ConvertPtr(ST(5),(void **) &v6, 
          SWIGTYPE_p_std__vectorT_unsigned_int_t,1) != -1) {
        arg6 = v6;
      } else if (SvROK(ST(5))) {
        AV *av = (AV *)SvRV(ST(5));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 6 of CmsLeg. "
          "Expected an array of ""unsigned int");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvIOK(*tv)) {
            temp6.push_back((unsigned int)SvIVX(*tv));
          } else {
            SWIG_croak("Type error in argument 6 of "
              "CmsLeg. "
              "Expected an array of ""unsigned int");
          }
        }
        arg6 = &temp6;
      } else {
        SWIG_croak("Type error in argument 6 of CmsLeg. "
          "Expected an array of ""unsigned int");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(6),(void **) &v7, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg7 = v7;
      } else if (SvROK(ST(6))) {
        AV *av = (AV *)SvRV(ST(6));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 7 of CmsLeg. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp7.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 7 of "
              "CmsLeg. "
              "Expected an array of ""double");
          }
        }
        arg7 = &temp7;
      } else {
        SWIG_croak("Type error in argument 7 of CmsLeg. "
          "Expected an array of ""double");
      }
    }
    {
      try {
        result = _CmsLeg((std::vector< double > const &)*arg1,(Schedule const &)*arg2,(SwapIndexPtr const &)*arg3,(DayCounter const &)*arg4,arg5,(std::vector< unsigned int > const &)*arg6,(std::vector< double > const &)*arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        boost::shared_ptr< CashFlow >* ptr = new boost::shared_ptr< CashFlow >(result[i]);
        svs[i] = sv_newmortal();
        SWIG_MakePtr(svs[i], (void*) ptr, 
          SWIGTYPE_p_boost__shared_ptrT_CashFlow_t, SWIG_SHADOW|0);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CmsLeg__SWIG_5) {
  {
    std::vector< Real > *arg1 = 0 ;
    Schedule *arg2 = 0 ;
    SwapIndexPtr *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    BusinessDayConvention arg5 ;
    std::vector< Natural > *arg6 = 0 ;
    std::vector< double > temp1 ;
    std::vector< double > *v1 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    std::vector< unsigned int > temp6 ;
    std::vector< unsigned int > *v6 ;
    int argvi = 0;
    Leg result;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: CmsLeg(nominals,schedule,index,paymentDayCounter,paymentConvention,fixingDays);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of CmsLeg. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp1.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 1 of "
              "CmsLeg. "
              "Expected an array of ""double");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of CmsLeg. "
          "Expected an array of ""double");
      }
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CmsLeg" "', argument " "2"" of type '" "Schedule const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CmsLeg" "', argument " "2"" of type '" "Schedule const &""'"); 
    }
    arg2 = reinterpret_cast< Schedule * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_SwapIndexPtr,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CmsLeg" "', argument " "3"" of type '" "SwapIndexPtr const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CmsLeg" "', argument " "3"" of type '" "SwapIndexPtr const &""'"); 
    }
    arg3 = reinterpret_cast< SwapIndexPtr * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "CmsLeg" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CmsLeg" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CmsLeg" "', argument " "5"" of type '" "BusinessDayConvention""'");
    } 
    arg5 = static_cast< BusinessDayConvention >(val5);
    {
      if (SWIG_ConvertPtr(ST(5),(void **) &v6, 
          SWIGTYPE_p_std__vectorT_unsigned_int_t,1) != -1) {
        arg6 = v6;
      } else if (SvROK(ST(5))) {
        AV *av = (AV *)SvRV(ST(5));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 6 of CmsLeg. "
          "Expected an array of ""unsigned int");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvIOK(*tv)) {
            temp6.push_back((unsigned int)SvIVX(*tv));
          } else {
            SWIG_croak("Type error in argument 6 of "
              "CmsLeg. "
              "Expected an array of ""unsigned int");
          }
        }
        arg6 = &temp6;
      } else {
        SWIG_croak("Type error in argument 6 of CmsLeg. "
          "Expected an array of ""unsigned int");
      }
    }
    {
      try {
        result = _CmsLeg((std::vector< double > const &)*arg1,(Schedule const &)*arg2,(SwapIndexPtr const &)*arg3,(DayCounter const &)*arg4,arg5,(std::vector< unsigned int > const &)*arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        boost::shared_ptr< CashFlow >* ptr = new boost::shared_ptr< CashFlow >(result[i]);
        svs[i] = sv_newmortal();
        SWIG_MakePtr(svs[i], (void*) ptr, 
          SWIGTYPE_p_boost__shared_ptrT_CashFlow_t, SWIG_SHADOW|0);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CmsLeg__SWIG_6) {
  {
    std::vector< Real > *arg1 = 0 ;
    Schedule *arg2 = 0 ;
    SwapIndexPtr *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    BusinessDayConvention arg5 ;
    std::vector< double > temp1 ;
    std::vector< double > *v1 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    Leg result;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: CmsLeg(nominals,schedule,index,paymentDayCounter,paymentConvention);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of CmsLeg. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp1.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 1 of "
              "CmsLeg. "
              "Expected an array of ""double");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of CmsLeg. "
          "Expected an array of ""double");
      }
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CmsLeg" "', argument " "2"" of type '" "Schedule const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CmsLeg" "', argument " "2"" of type '" "Schedule const &""'"); 
    }
    arg2 = reinterpret_cast< Schedule * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_SwapIndexPtr,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CmsLeg" "', argument " "3"" of type '" "SwapIndexPtr const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CmsLeg" "', argument " "3"" of type '" "SwapIndexPtr const &""'"); 
    }
    arg3 = reinterpret_cast< SwapIndexPtr * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "CmsLeg" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CmsLeg" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CmsLeg" "', argument " "5"" of type '" "BusinessDayConvention""'");
    } 
    arg5 = static_cast< BusinessDayConvention >(val5);
    {
      try {
        result = _CmsLeg((std::vector< double > const &)*arg1,(Schedule const &)*arg2,(SwapIndexPtr const &)*arg3,(DayCounter const &)*arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        boost::shared_ptr< CashFlow >* ptr = new boost::shared_ptr< CashFlow >(result[i]);
        svs[i] = sv_newmortal();
        SWIG_MakePtr(svs[i], (void*) ptr, 
          SWIGTYPE_p_boost__shared_ptrT_CashFlow_t, SWIG_SHADOW|0);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CmsLeg__SWIG_7) {
  {
    std::vector< Real > *arg1 = 0 ;
    Schedule *arg2 = 0 ;
    SwapIndexPtr *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    std::vector< double > temp1 ;
    std::vector< double > *v1 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int argvi = 0;
    Leg result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: CmsLeg(nominals,schedule,index,paymentDayCounter);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of CmsLeg. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp1.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 1 of "
              "CmsLeg. "
              "Expected an array of ""double");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of CmsLeg. "
          "Expected an array of ""double");
      }
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CmsLeg" "', argument " "2"" of type '" "Schedule const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CmsLeg" "', argument " "2"" of type '" "Schedule const &""'"); 
    }
    arg2 = reinterpret_cast< Schedule * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_SwapIndexPtr,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CmsLeg" "', argument " "3"" of type '" "SwapIndexPtr const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CmsLeg" "', argument " "3"" of type '" "SwapIndexPtr const &""'"); 
    }
    arg3 = reinterpret_cast< SwapIndexPtr * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "CmsLeg" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CmsLeg" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    {
      try {
        result = _CmsLeg((std::vector< double > const &)*arg1,(Schedule const &)*arg2,(SwapIndexPtr const &)*arg3,(DayCounter const &)*arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        boost::shared_ptr< CashFlow >* ptr = new boost::shared_ptr< CashFlow >(result[i]);
        svs[i] = sv_newmortal();
        SWIG_MakePtr(svs[i], (void*) ptr, 
          SWIGTYPE_p_boost__shared_ptrT_CashFlow_t, SWIG_SHADOW|0);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CmsLeg__SWIG_8) {
  {
    std::vector< Real > *arg1 = 0 ;
    Schedule *arg2 = 0 ;
    SwapIndexPtr *arg3 = 0 ;
    std::vector< double > temp1 ;
    std::vector< double > *v1 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    Leg result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: CmsLeg(nominals,schedule,index);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of CmsLeg. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp1.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 1 of "
              "CmsLeg. "
              "Expected an array of ""double");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of CmsLeg. "
          "Expected an array of ""double");
      }
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CmsLeg" "', argument " "2"" of type '" "Schedule const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CmsLeg" "', argument " "2"" of type '" "Schedule const &""'"); 
    }
    arg2 = reinterpret_cast< Schedule * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_SwapIndexPtr,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CmsLeg" "', argument " "3"" of type '" "SwapIndexPtr const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CmsLeg" "', argument " "3"" of type '" "SwapIndexPtr const &""'"); 
    }
    arg3 = reinterpret_cast< SwapIndexPtr * >(argp3);
    {
      try {
        result = _CmsLeg((std::vector< double > const &)*arg1,(Schedule const &)*arg2,(SwapIndexPtr const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        boost::shared_ptr< CashFlow >* ptr = new boost::shared_ptr< CashFlow >(result[i]);
        svs[i] = sv_newmortal();
        SWIG_MakePtr(svs[i], (void*) ptr, 
          SWIGTYPE_p_boost__shared_ptrT_CashFlow_t, SWIG_SHADOW|0);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CmsLeg) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_SwapIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_SwapIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_SwapIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_SwapIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< unsigned int >* v;
            if (SWIG_ConvertPtr(ST(5),(void **) &v, 
                SWIGTYPE_p_std__vectorT_unsigned_int_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(5))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(5));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_SwapIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< unsigned int >* v;
            if (SWIG_ConvertPtr(ST(5),(void **) &v, 
                SWIGTYPE_p_std__vectorT_unsigned_int_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(5))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(5));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(6),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(6))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(6));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 8) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_SwapIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< unsigned int >* v;
            if (SWIG_ConvertPtr(ST(5),(void **) &v, 
                SWIGTYPE_p_std__vectorT_unsigned_int_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(5))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(5));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(6),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(6))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(6));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(7),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(7))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(7));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
    if (items == 9) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_SwapIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< unsigned int >* v;
            if (SWIG_ConvertPtr(ST(5),(void **) &v, 
                SWIGTYPE_p_std__vectorT_unsigned_int_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(5))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(5));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(6),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(6))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(6));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(7),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(7))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(7));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(8),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(8))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(8));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 7;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_7:
    
    if (items == 10) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_SwapIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< unsigned int >* v;
            if (SWIG_ConvertPtr(ST(5),(void **) &v, 
                SWIGTYPE_p_std__vectorT_unsigned_int_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(5))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(5));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(6),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(6))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(6));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(7),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(7))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(7));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(8),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(8))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(8));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(9),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(9))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(9));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 8;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_8:
    
    if (items == 11) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_SwapIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< unsigned int >* v;
            if (SWIG_ConvertPtr(ST(5),(void **) &v, 
                SWIGTYPE_p_std__vectorT_unsigned_int_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(5))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(5));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(6),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(6))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(6));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(7),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(7))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(7));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(8),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(8))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(8));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(9),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(9))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(9));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(10), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 9;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_9:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CmsLeg__SWIG_8); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CmsLeg__SWIG_7); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CmsLeg__SWIG_6); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CmsLeg__SWIG_5); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CmsLeg__SWIG_4); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CmsLeg__SWIG_3); return;
    case 7:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CmsLeg__SWIG_2); return;
    case 8:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CmsLeg__SWIG_1); return;
    case 9:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CmsLeg__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'CmsLeg'");
  XSRETURN(0);
}


XS(_wrap_CmsZeroLeg__SWIG_0) {
  {
    std::vector< Real > *arg1 = 0 ;
    Schedule *arg2 = 0 ;
    SwapIndexPtr *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    BusinessDayConvention arg5 ;
    std::vector< Natural > *arg6 = 0 ;
    std::vector< Real > *arg7 = 0 ;
    std::vector< Spread > *arg8 = 0 ;
    std::vector< Rate > *arg9 = 0 ;
    std::vector< Rate > *arg10 = 0 ;
    std::vector< double > temp1 ;
    std::vector< double > *v1 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    std::vector< unsigned int > temp6 ;
    std::vector< unsigned int > *v6 ;
    std::vector< double > temp7 ;
    std::vector< double > *v7 ;
    std::vector< double > temp8 ;
    std::vector< double > *v8 ;
    std::vector< double > temp9 ;
    std::vector< double > *v9 ;
    std::vector< double > temp10 ;
    std::vector< double > *v10 ;
    int argvi = 0;
    Leg result;
    dXSARGS;
    
    if ((items < 10) || (items > 10)) {
      SWIG_croak("Usage: CmsZeroLeg(nominals,schedule,index,paymentDayCounter,paymentConvention,fixingDays,gearings,spreads,caps,floors);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of CmsZeroLeg. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp1.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 1 of "
              "CmsZeroLeg. "
              "Expected an array of ""double");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of CmsZeroLeg. "
          "Expected an array of ""double");
      }
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CmsZeroLeg" "', argument " "2"" of type '" "Schedule const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CmsZeroLeg" "', argument " "2"" of type '" "Schedule const &""'"); 
    }
    arg2 = reinterpret_cast< Schedule * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_SwapIndexPtr,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CmsZeroLeg" "', argument " "3"" of type '" "SwapIndexPtr const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CmsZeroLeg" "', argument " "3"" of type '" "SwapIndexPtr const &""'"); 
    }
    arg3 = reinterpret_cast< SwapIndexPtr * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "CmsZeroLeg" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CmsZeroLeg" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CmsZeroLeg" "', argument " "5"" of type '" "BusinessDayConvention""'");
    } 
    arg5 = static_cast< BusinessDayConvention >(val5);
    {
      if (SWIG_ConvertPtr(ST(5),(void **) &v6, 
          SWIGTYPE_p_std__vectorT_unsigned_int_t,1) != -1) {
        arg6 = v6;
      } else if (SvROK(ST(5))) {
        AV *av = (AV *)SvRV(ST(5));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 6 of CmsZeroLeg. "
          "Expected an array of ""unsigned int");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvIOK(*tv)) {
            temp6.push_back((unsigned int)SvIVX(*tv));
          } else {
            SWIG_croak("Type error in argument 6 of "
              "CmsZeroLeg. "
              "Expected an array of ""unsigned int");
          }
        }
        arg6 = &temp6;
      } else {
        SWIG_croak("Type error in argument 6 of CmsZeroLeg. "
          "Expected an array of ""unsigned int");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(6),(void **) &v7, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg7 = v7;
      } else if (SvROK(ST(6))) {
        AV *av = (AV *)SvRV(ST(6));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 7 of CmsZeroLeg. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp7.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 7 of "
              "CmsZeroLeg. "
              "Expected an array of ""double");
          }
        }
        arg7 = &temp7;
      } else {
        SWIG_croak("Type error in argument 7 of CmsZeroLeg. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(7),(void **) &v8, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg8 = v8;
      } else if (SvROK(ST(7))) {
        AV *av = (AV *)SvRV(ST(7));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 8 of CmsZeroLeg. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp8.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 8 of "
              "CmsZeroLeg. "
              "Expected an array of ""double");
          }
        }
        arg8 = &temp8;
      } else {
        SWIG_croak("Type error in argument 8 of CmsZeroLeg. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(8),(void **) &v9, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg9 = v9;
      } else if (SvROK(ST(8))) {
        AV *av = (AV *)SvRV(ST(8));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 9 of CmsZeroLeg. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp9.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 9 of "
              "CmsZeroLeg. "
              "Expected an array of ""double");
          }
        }
        arg9 = &temp9;
      } else {
        SWIG_croak("Type error in argument 9 of CmsZeroLeg. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(9),(void **) &v10, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg10 = v10;
      } else if (SvROK(ST(9))) {
        AV *av = (AV *)SvRV(ST(9));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 10 of CmsZeroLeg. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp10.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 10 of "
              "CmsZeroLeg. "
              "Expected an array of ""double");
          }
        }
        arg10 = &temp10;
      } else {
        SWIG_croak("Type error in argument 10 of CmsZeroLeg. "
          "Expected an array of ""double");
      }
    }
    {
      try {
        result = _CmsZeroLeg((std::vector< double > const &)*arg1,(Schedule const &)*arg2,(SwapIndexPtr const &)*arg3,(DayCounter const &)*arg4,arg5,(std::vector< unsigned int > const &)*arg6,(std::vector< double > const &)*arg7,(std::vector< double > const &)*arg8,(std::vector< double > const &)*arg9,(std::vector< double > const &)*arg10);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        boost::shared_ptr< CashFlow >* ptr = new boost::shared_ptr< CashFlow >(result[i]);
        svs[i] = sv_newmortal();
        SWIG_MakePtr(svs[i], (void*) ptr, 
          SWIGTYPE_p_boost__shared_ptrT_CashFlow_t, SWIG_SHADOW|0);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CmsZeroLeg__SWIG_1) {
  {
    std::vector< Real > *arg1 = 0 ;
    Schedule *arg2 = 0 ;
    SwapIndexPtr *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    BusinessDayConvention arg5 ;
    std::vector< Natural > *arg6 = 0 ;
    std::vector< Real > *arg7 = 0 ;
    std::vector< Spread > *arg8 = 0 ;
    std::vector< Rate > *arg9 = 0 ;
    std::vector< double > temp1 ;
    std::vector< double > *v1 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    std::vector< unsigned int > temp6 ;
    std::vector< unsigned int > *v6 ;
    std::vector< double > temp7 ;
    std::vector< double > *v7 ;
    std::vector< double > temp8 ;
    std::vector< double > *v8 ;
    std::vector< double > temp9 ;
    std::vector< double > *v9 ;
    int argvi = 0;
    Leg result;
    dXSARGS;
    
    if ((items < 9) || (items > 9)) {
      SWIG_croak("Usage: CmsZeroLeg(nominals,schedule,index,paymentDayCounter,paymentConvention,fixingDays,gearings,spreads,caps);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of CmsZeroLeg. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp1.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 1 of "
              "CmsZeroLeg. "
              "Expected an array of ""double");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of CmsZeroLeg. "
          "Expected an array of ""double");
      }
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CmsZeroLeg" "', argument " "2"" of type '" "Schedule const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CmsZeroLeg" "', argument " "2"" of type '" "Schedule const &""'"); 
    }
    arg2 = reinterpret_cast< Schedule * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_SwapIndexPtr,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CmsZeroLeg" "', argument " "3"" of type '" "SwapIndexPtr const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CmsZeroLeg" "', argument " "3"" of type '" "SwapIndexPtr const &""'"); 
    }
    arg3 = reinterpret_cast< SwapIndexPtr * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "CmsZeroLeg" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CmsZeroLeg" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CmsZeroLeg" "', argument " "5"" of type '" "BusinessDayConvention""'");
    } 
    arg5 = static_cast< BusinessDayConvention >(val5);
    {
      if (SWIG_ConvertPtr(ST(5),(void **) &v6, 
          SWIGTYPE_p_std__vectorT_unsigned_int_t,1) != -1) {
        arg6 = v6;
      } else if (SvROK(ST(5))) {
        AV *av = (AV *)SvRV(ST(5));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 6 of CmsZeroLeg. "
          "Expected an array of ""unsigned int");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvIOK(*tv)) {
            temp6.push_back((unsigned int)SvIVX(*tv));
          } else {
            SWIG_croak("Type error in argument 6 of "
              "CmsZeroLeg. "
              "Expected an array of ""unsigned int");
          }
        }
        arg6 = &temp6;
      } else {
        SWIG_croak("Type error in argument 6 of CmsZeroLeg. "
          "Expected an array of ""unsigned int");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(6),(void **) &v7, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg7 = v7;
      } else if (SvROK(ST(6))) {
        AV *av = (AV *)SvRV(ST(6));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 7 of CmsZeroLeg. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp7.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 7 of "
              "CmsZeroLeg. "
              "Expected an array of ""double");
          }
        }
        arg7 = &temp7;
      } else {
        SWIG_croak("Type error in argument 7 of CmsZeroLeg. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(7),(void **) &v8, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg8 = v8;
      } else if (SvROK(ST(7))) {
        AV *av = (AV *)SvRV(ST(7));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 8 of CmsZeroLeg. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp8.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 8 of "
              "CmsZeroLeg. "
              "Expected an array of ""double");
          }
        }
        arg8 = &temp8;
      } else {
        SWIG_croak("Type error in argument 8 of CmsZeroLeg. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(8),(void **) &v9, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg9 = v9;
      } else if (SvROK(ST(8))) {
        AV *av = (AV *)SvRV(ST(8));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 9 of CmsZeroLeg. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp9.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 9 of "
              "CmsZeroLeg. "
              "Expected an array of ""double");
          }
        }
        arg9 = &temp9;
      } else {
        SWIG_croak("Type error in argument 9 of CmsZeroLeg. "
          "Expected an array of ""double");
      }
    }
    {
      try {
        result = _CmsZeroLeg((std::vector< double > const &)*arg1,(Schedule const &)*arg2,(SwapIndexPtr const &)*arg3,(DayCounter const &)*arg4,arg5,(std::vector< unsigned int > const &)*arg6,(std::vector< double > const &)*arg7,(std::vector< double > const &)*arg8,(std::vector< double > const &)*arg9);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        boost::shared_ptr< CashFlow >* ptr = new boost::shared_ptr< CashFlow >(result[i]);
        svs[i] = sv_newmortal();
        SWIG_MakePtr(svs[i], (void*) ptr, 
          SWIGTYPE_p_boost__shared_ptrT_CashFlow_t, SWIG_SHADOW|0);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CmsZeroLeg__SWIG_2) {
  {
    std::vector< Real > *arg1 = 0 ;
    Schedule *arg2 = 0 ;
    SwapIndexPtr *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    BusinessDayConvention arg5 ;
    std::vector< Natural > *arg6 = 0 ;
    std::vector< Real > *arg7 = 0 ;
    std::vector< Spread > *arg8 = 0 ;
    std::vector< double > temp1 ;
    std::vector< double > *v1 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    std::vector< unsigned int > temp6 ;
    std::vector< unsigned int > *v6 ;
    std::vector< double > temp7 ;
    std::vector< double > *v7 ;
    std::vector< double > temp8 ;
    std::vector< double > *v8 ;
    int argvi = 0;
    Leg result;
    dXSARGS;
    
    if ((items < 8) || (items > 8)) {
      SWIG_croak("Usage: CmsZeroLeg(nominals,schedule,index,paymentDayCounter,paymentConvention,fixingDays,gearings,spreads);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of CmsZeroLeg. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp1.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 1 of "
              "CmsZeroLeg. "
              "Expected an array of ""double");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of CmsZeroLeg. "
          "Expected an array of ""double");
      }
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CmsZeroLeg" "', argument " "2"" of type '" "Schedule const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CmsZeroLeg" "', argument " "2"" of type '" "Schedule const &""'"); 
    }
    arg2 = reinterpret_cast< Schedule * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_SwapIndexPtr,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CmsZeroLeg" "', argument " "3"" of type '" "SwapIndexPtr const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CmsZeroLeg" "', argument " "3"" of type '" "SwapIndexPtr const &""'"); 
    }
    arg3 = reinterpret_cast< SwapIndexPtr * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "CmsZeroLeg" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CmsZeroLeg" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CmsZeroLeg" "', argument " "5"" of type '" "BusinessDayConvention""'");
    } 
    arg5 = static_cast< BusinessDayConvention >(val5);
    {
      if (SWIG_ConvertPtr(ST(5),(void **) &v6, 
          SWIGTYPE_p_std__vectorT_unsigned_int_t,1) != -1) {
        arg6 = v6;
      } else if (SvROK(ST(5))) {
        AV *av = (AV *)SvRV(ST(5));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 6 of CmsZeroLeg. "
          "Expected an array of ""unsigned int");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvIOK(*tv)) {
            temp6.push_back((unsigned int)SvIVX(*tv));
          } else {
            SWIG_croak("Type error in argument 6 of "
              "CmsZeroLeg. "
              "Expected an array of ""unsigned int");
          }
        }
        arg6 = &temp6;
      } else {
        SWIG_croak("Type error in argument 6 of CmsZeroLeg. "
          "Expected an array of ""unsigned int");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(6),(void **) &v7, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg7 = v7;
      } else if (SvROK(ST(6))) {
        AV *av = (AV *)SvRV(ST(6));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 7 of CmsZeroLeg. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp7.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 7 of "
              "CmsZeroLeg. "
              "Expected an array of ""double");
          }
        }
        arg7 = &temp7;
      } else {
        SWIG_croak("Type error in argument 7 of CmsZeroLeg. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(7),(void **) &v8, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg8 = v8;
      } else if (SvROK(ST(7))) {
        AV *av = (AV *)SvRV(ST(7));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 8 of CmsZeroLeg. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp8.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 8 of "
              "CmsZeroLeg. "
              "Expected an array of ""double");
          }
        }
        arg8 = &temp8;
      } else {
        SWIG_croak("Type error in argument 8 of CmsZeroLeg. "
          "Expected an array of ""double");
      }
    }
    {
      try {
        result = _CmsZeroLeg((std::vector< double > const &)*arg1,(Schedule const &)*arg2,(SwapIndexPtr const &)*arg3,(DayCounter const &)*arg4,arg5,(std::vector< unsigned int > const &)*arg6,(std::vector< double > const &)*arg7,(std::vector< double > const &)*arg8);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        boost::shared_ptr< CashFlow >* ptr = new boost::shared_ptr< CashFlow >(result[i]);
        svs[i] = sv_newmortal();
        SWIG_MakePtr(svs[i], (void*) ptr, 
          SWIGTYPE_p_boost__shared_ptrT_CashFlow_t, SWIG_SHADOW|0);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CmsZeroLeg__SWIG_3) {
  {
    std::vector< Real > *arg1 = 0 ;
    Schedule *arg2 = 0 ;
    SwapIndexPtr *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    BusinessDayConvention arg5 ;
    std::vector< Natural > *arg6 = 0 ;
    std::vector< Real > *arg7 = 0 ;
    std::vector< double > temp1 ;
    std::vector< double > *v1 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    std::vector< unsigned int > temp6 ;
    std::vector< unsigned int > *v6 ;
    std::vector< double > temp7 ;
    std::vector< double > *v7 ;
    int argvi = 0;
    Leg result;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: CmsZeroLeg(nominals,schedule,index,paymentDayCounter,paymentConvention,fixingDays,gearings);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of CmsZeroLeg. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp1.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 1 of "
              "CmsZeroLeg. "
              "Expected an array of ""double");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of CmsZeroLeg. "
          "Expected an array of ""double");
      }
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CmsZeroLeg" "', argument " "2"" of type '" "Schedule const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CmsZeroLeg" "', argument " "2"" of type '" "Schedule const &""'"); 
    }
    arg2 = reinterpret_cast< Schedule * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_SwapIndexPtr,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CmsZeroLeg" "', argument " "3"" of type '" "SwapIndexPtr const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CmsZeroLeg" "', argument " "3"" of type '" "SwapIndexPtr const &""'"); 
    }
    arg3 = reinterpret_cast< SwapIndexPtr * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "CmsZeroLeg" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CmsZeroLeg" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CmsZeroLeg" "', argument " "5"" of type '" "BusinessDayConvention""'");
    } 
    arg5 = static_cast< BusinessDayConvention >(val5);
    {
      if (SWIG_ConvertPtr(ST(5),(void **) &v6, 
          SWIGTYPE_p_std__vectorT_unsigned_int_t,1) != -1) {
        arg6 = v6;
      } else if (SvROK(ST(5))) {
        AV *av = (AV *)SvRV(ST(5));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 6 of CmsZeroLeg. "
          "Expected an array of ""unsigned int");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvIOK(*tv)) {
            temp6.push_back((unsigned int)SvIVX(*tv));
          } else {
            SWIG_croak("Type error in argument 6 of "
              "CmsZeroLeg. "
              "Expected an array of ""unsigned int");
          }
        }
        arg6 = &temp6;
      } else {
        SWIG_croak("Type error in argument 6 of CmsZeroLeg. "
          "Expected an array of ""unsigned int");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(6),(void **) &v7, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg7 = v7;
      } else if (SvROK(ST(6))) {
        AV *av = (AV *)SvRV(ST(6));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 7 of CmsZeroLeg. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp7.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 7 of "
              "CmsZeroLeg. "
              "Expected an array of ""double");
          }
        }
        arg7 = &temp7;
      } else {
        SWIG_croak("Type error in argument 7 of CmsZeroLeg. "
          "Expected an array of ""double");
      }
    }
    {
      try {
        result = _CmsZeroLeg((std::vector< double > const &)*arg1,(Schedule const &)*arg2,(SwapIndexPtr const &)*arg3,(DayCounter const &)*arg4,arg5,(std::vector< unsigned int > const &)*arg6,(std::vector< double > const &)*arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        boost::shared_ptr< CashFlow >* ptr = new boost::shared_ptr< CashFlow >(result[i]);
        svs[i] = sv_newmortal();
        SWIG_MakePtr(svs[i], (void*) ptr, 
          SWIGTYPE_p_boost__shared_ptrT_CashFlow_t, SWIG_SHADOW|0);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CmsZeroLeg__SWIG_4) {
  {
    std::vector< Real > *arg1 = 0 ;
    Schedule *arg2 = 0 ;
    SwapIndexPtr *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    BusinessDayConvention arg5 ;
    std::vector< Natural > *arg6 = 0 ;
    std::vector< double > temp1 ;
    std::vector< double > *v1 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    std::vector< unsigned int > temp6 ;
    std::vector< unsigned int > *v6 ;
    int argvi = 0;
    Leg result;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: CmsZeroLeg(nominals,schedule,index,paymentDayCounter,paymentConvention,fixingDays);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of CmsZeroLeg. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp1.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 1 of "
              "CmsZeroLeg. "
              "Expected an array of ""double");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of CmsZeroLeg. "
          "Expected an array of ""double");
      }
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CmsZeroLeg" "', argument " "2"" of type '" "Schedule const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CmsZeroLeg" "', argument " "2"" of type '" "Schedule const &""'"); 
    }
    arg2 = reinterpret_cast< Schedule * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_SwapIndexPtr,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CmsZeroLeg" "', argument " "3"" of type '" "SwapIndexPtr const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CmsZeroLeg" "', argument " "3"" of type '" "SwapIndexPtr const &""'"); 
    }
    arg3 = reinterpret_cast< SwapIndexPtr * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "CmsZeroLeg" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CmsZeroLeg" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CmsZeroLeg" "', argument " "5"" of type '" "BusinessDayConvention""'");
    } 
    arg5 = static_cast< BusinessDayConvention >(val5);
    {
      if (SWIG_ConvertPtr(ST(5),(void **) &v6, 
          SWIGTYPE_p_std__vectorT_unsigned_int_t,1) != -1) {
        arg6 = v6;
      } else if (SvROK(ST(5))) {
        AV *av = (AV *)SvRV(ST(5));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 6 of CmsZeroLeg. "
          "Expected an array of ""unsigned int");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvIOK(*tv)) {
            temp6.push_back((unsigned int)SvIVX(*tv));
          } else {
            SWIG_croak("Type error in argument 6 of "
              "CmsZeroLeg. "
              "Expected an array of ""unsigned int");
          }
        }
        arg6 = &temp6;
      } else {
        SWIG_croak("Type error in argument 6 of CmsZeroLeg. "
          "Expected an array of ""unsigned int");
      }
    }
    {
      try {
        result = _CmsZeroLeg((std::vector< double > const &)*arg1,(Schedule const &)*arg2,(SwapIndexPtr const &)*arg3,(DayCounter const &)*arg4,arg5,(std::vector< unsigned int > const &)*arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        boost::shared_ptr< CashFlow >* ptr = new boost::shared_ptr< CashFlow >(result[i]);
        svs[i] = sv_newmortal();
        SWIG_MakePtr(svs[i], (void*) ptr, 
          SWIGTYPE_p_boost__shared_ptrT_CashFlow_t, SWIG_SHADOW|0);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CmsZeroLeg__SWIG_5) {
  {
    std::vector< Real > *arg1 = 0 ;
    Schedule *arg2 = 0 ;
    SwapIndexPtr *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    BusinessDayConvention arg5 ;
    std::vector< double > temp1 ;
    std::vector< double > *v1 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    Leg result;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: CmsZeroLeg(nominals,schedule,index,paymentDayCounter,paymentConvention);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of CmsZeroLeg. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp1.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 1 of "
              "CmsZeroLeg. "
              "Expected an array of ""double");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of CmsZeroLeg. "
          "Expected an array of ""double");
      }
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CmsZeroLeg" "', argument " "2"" of type '" "Schedule const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CmsZeroLeg" "', argument " "2"" of type '" "Schedule const &""'"); 
    }
    arg2 = reinterpret_cast< Schedule * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_SwapIndexPtr,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CmsZeroLeg" "', argument " "3"" of type '" "SwapIndexPtr const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CmsZeroLeg" "', argument " "3"" of type '" "SwapIndexPtr const &""'"); 
    }
    arg3 = reinterpret_cast< SwapIndexPtr * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "CmsZeroLeg" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CmsZeroLeg" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CmsZeroLeg" "', argument " "5"" of type '" "BusinessDayConvention""'");
    } 
    arg5 = static_cast< BusinessDayConvention >(val5);
    {
      try {
        result = _CmsZeroLeg((std::vector< double > const &)*arg1,(Schedule const &)*arg2,(SwapIndexPtr const &)*arg3,(DayCounter const &)*arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        boost::shared_ptr< CashFlow >* ptr = new boost::shared_ptr< CashFlow >(result[i]);
        svs[i] = sv_newmortal();
        SWIG_MakePtr(svs[i], (void*) ptr, 
          SWIGTYPE_p_boost__shared_ptrT_CashFlow_t, SWIG_SHADOW|0);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CmsZeroLeg__SWIG_6) {
  {
    std::vector< Real > *arg1 = 0 ;
    Schedule *arg2 = 0 ;
    SwapIndexPtr *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    std::vector< double > temp1 ;
    std::vector< double > *v1 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int argvi = 0;
    Leg result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: CmsZeroLeg(nominals,schedule,index,paymentDayCounter);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of CmsZeroLeg. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp1.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 1 of "
              "CmsZeroLeg. "
              "Expected an array of ""double");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of CmsZeroLeg. "
          "Expected an array of ""double");
      }
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CmsZeroLeg" "', argument " "2"" of type '" "Schedule const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CmsZeroLeg" "', argument " "2"" of type '" "Schedule const &""'"); 
    }
    arg2 = reinterpret_cast< Schedule * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_SwapIndexPtr,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CmsZeroLeg" "', argument " "3"" of type '" "SwapIndexPtr const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CmsZeroLeg" "', argument " "3"" of type '" "SwapIndexPtr const &""'"); 
    }
    arg3 = reinterpret_cast< SwapIndexPtr * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "CmsZeroLeg" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CmsZeroLeg" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    {
      try {
        result = _CmsZeroLeg((std::vector< double > const &)*arg1,(Schedule const &)*arg2,(SwapIndexPtr const &)*arg3,(DayCounter const &)*arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        boost::shared_ptr< CashFlow >* ptr = new boost::shared_ptr< CashFlow >(result[i]);
        svs[i] = sv_newmortal();
        SWIG_MakePtr(svs[i], (void*) ptr, 
          SWIGTYPE_p_boost__shared_ptrT_CashFlow_t, SWIG_SHADOW|0);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CmsZeroLeg__SWIG_7) {
  {
    std::vector< Real > *arg1 = 0 ;
    Schedule *arg2 = 0 ;
    SwapIndexPtr *arg3 = 0 ;
    std::vector< double > temp1 ;
    std::vector< double > *v1 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    Leg result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: CmsZeroLeg(nominals,schedule,index);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of CmsZeroLeg. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp1.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 1 of "
              "CmsZeroLeg. "
              "Expected an array of ""double");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of CmsZeroLeg. "
          "Expected an array of ""double");
      }
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CmsZeroLeg" "', argument " "2"" of type '" "Schedule const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CmsZeroLeg" "', argument " "2"" of type '" "Schedule const &""'"); 
    }
    arg2 = reinterpret_cast< Schedule * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_SwapIndexPtr,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CmsZeroLeg" "', argument " "3"" of type '" "SwapIndexPtr const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CmsZeroLeg" "', argument " "3"" of type '" "SwapIndexPtr const &""'"); 
    }
    arg3 = reinterpret_cast< SwapIndexPtr * >(argp3);
    {
      try {
        result = _CmsZeroLeg((std::vector< double > const &)*arg1,(Schedule const &)*arg2,(SwapIndexPtr const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        boost::shared_ptr< CashFlow >* ptr = new boost::shared_ptr< CashFlow >(result[i]);
        svs[i] = sv_newmortal();
        SWIG_MakePtr(svs[i], (void*) ptr, 
          SWIGTYPE_p_boost__shared_ptrT_CashFlow_t, SWIG_SHADOW|0);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CmsZeroLeg) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_SwapIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_SwapIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_SwapIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_SwapIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< unsigned int >* v;
            if (SWIG_ConvertPtr(ST(5),(void **) &v, 
                SWIGTYPE_p_std__vectorT_unsigned_int_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(5))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(5));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_SwapIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< unsigned int >* v;
            if (SWIG_ConvertPtr(ST(5),(void **) &v, 
                SWIGTYPE_p_std__vectorT_unsigned_int_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(5))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(5));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(6),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(6))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(6));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 8) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_SwapIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< unsigned int >* v;
            if (SWIG_ConvertPtr(ST(5),(void **) &v, 
                SWIGTYPE_p_std__vectorT_unsigned_int_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(5))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(5));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(6),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(6))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(6));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(7),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(7))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(7));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
    if (items == 9) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_SwapIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< unsigned int >* v;
            if (SWIG_ConvertPtr(ST(5),(void **) &v, 
                SWIGTYPE_p_std__vectorT_unsigned_int_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(5))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(5));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(6),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(6))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(6));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(7),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(7))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(7));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(8),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(8))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(8));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 7;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_7:
    
    if (items == 10) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_SwapIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< unsigned int >* v;
            if (SWIG_ConvertPtr(ST(5),(void **) &v, 
                SWIGTYPE_p_std__vectorT_unsigned_int_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(5))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(5));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(6),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(6))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(6));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(7),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(7))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(7));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(8),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(8))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(8));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(9),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(9))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(9));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 8;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_8:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CmsZeroLeg__SWIG_7); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CmsZeroLeg__SWIG_6); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CmsZeroLeg__SWIG_5); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CmsZeroLeg__SWIG_4); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CmsZeroLeg__SWIG_3); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CmsZeroLeg__SWIG_2); return;
    case 7:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CmsZeroLeg__SWIG_1); return;
    case 8:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CmsZeroLeg__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'CmsZeroLeg'");
  XSRETURN(0);
}


XS(_wrap_new_Duration) {
  {
    int argvi = 0;
    Duration *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Duration();");
    }
    {
      try {
        result = (Duration *)new Duration();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Duration, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_Duration) {
  {
    Duration *arg1 = (Duration *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Duration(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Duration, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Duration" "', argument " "1"" of type '" "Duration *""'"); 
    }
    arg1 = reinterpret_cast< Duration * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CashFlows_startDate) {
  {
    Leg *arg1 = 0 ;
    std::vector< boost::shared_ptr< CashFlow > > temp1 ;
    std::vector< boost::shared_ptr< CashFlow > > *v1 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CashFlows_startDate(Leg const &);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of CashFlows_startDate. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CashFlow >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "CashFlows_startDate. "
              "Expected an array of " "boost::shared_ptr< CashFlow >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of CashFlows_startDate. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
      }
    }
    {
      try {
        result = CashFlows::startDate((std::vector< boost::shared_ptr< CashFlow > > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CashFlows_maturityDate) {
  {
    Leg *arg1 = 0 ;
    std::vector< boost::shared_ptr< CashFlow > > temp1 ;
    std::vector< boost::shared_ptr< CashFlow > > *v1 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CashFlows_maturityDate(Leg const &);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of CashFlows_maturityDate. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CashFlow >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "CashFlows_maturityDate. "
              "Expected an array of " "boost::shared_ptr< CashFlow >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of CashFlows_maturityDate. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
      }
    }
    {
      try {
        result = CashFlows::maturityDate((std::vector< boost::shared_ptr< CashFlow > > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CashFlows_npv__SWIG_0) {
  {
    Leg *arg1 = 0 ;
    boost::shared_ptr< YieldTermStructure > *arg2 = 0 ;
    Spread arg3 ;
    DayCounter *arg4 = 0 ;
    Compounding arg5 ;
    Frequency arg6 ;
    bool arg7 ;
    Date *arg8 = 0 ;
    Date *arg9 = 0 ;
    std::vector< boost::shared_ptr< CashFlow > > temp1 ;
    std::vector< boost::shared_ptr< CashFlow > > *v1 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    bool val7 ;
    int ecode7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 9) || (items > 9)) {
      SWIG_croak("Usage: CashFlows_npv(leg,discountCurve,zSpread,dayCounter,compounding,frequency,includeSettlementDateFlows,settlementDate,npvDate);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of CashFlows_npv. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CashFlow >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "CashFlows_npv. "
              "Expected an array of " "boost::shared_ptr< CashFlow >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of CashFlows_npv. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
      }
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CashFlows_npv" "', argument " "2"" of type '" "boost::shared_ptr< YieldTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_npv" "', argument " "2"" of type '" "boost::shared_ptr< YieldTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< boost::shared_ptr< YieldTermStructure > * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CashFlows_npv" "', argument " "3"" of type '" "Spread""'");
    } 
    arg3 = static_cast< Spread >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "CashFlows_npv" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_npv" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CashFlows_npv" "', argument " "5"" of type '" "Compounding""'");
    } 
    arg5 = static_cast< Compounding >(val5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "CashFlows_npv" "', argument " "6"" of type '" "Frequency""'");
    } 
    arg6 = static_cast< Frequency >(val6);
    ecode7 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "CashFlows_npv" "', argument " "7"" of type '" "bool""'");
    } 
    arg7 = static_cast< bool >(val7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "CashFlows_npv" "', argument " "8"" of type '" "Date const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_npv" "', argument " "8"" of type '" "Date const &""'"); 
    }
    arg8 = reinterpret_cast< Date * >(argp8);
    res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res9)) {
      SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "CashFlows_npv" "', argument " "9"" of type '" "Date const &""'"); 
    }
    if (!argp9) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_npv" "', argument " "9"" of type '" "Date const &""'"); 
    }
    arg9 = reinterpret_cast< Date * >(argp9);
    {
      try {
        result = (Real)CashFlows_npv__SWIG_0((std::vector< boost::shared_ptr< CashFlow > > const &)*arg1,(boost::shared_ptr< YieldTermStructure > const &)*arg2,arg3,(DayCounter const &)*arg4,arg5,arg6,arg7,(Date const &)*arg8,(Date const &)*arg9);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CashFlows_npv__SWIG_1) {
  {
    Leg *arg1 = 0 ;
    boost::shared_ptr< YieldTermStructure > *arg2 = 0 ;
    Spread arg3 ;
    DayCounter *arg4 = 0 ;
    Compounding arg5 ;
    Frequency arg6 ;
    bool arg7 ;
    Date *arg8 = 0 ;
    std::vector< boost::shared_ptr< CashFlow > > temp1 ;
    std::vector< boost::shared_ptr< CashFlow > > *v1 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    bool val7 ;
    int ecode7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 8) || (items > 8)) {
      SWIG_croak("Usage: CashFlows_npv(leg,discountCurve,zSpread,dayCounter,compounding,frequency,includeSettlementDateFlows,settlementDate);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of CashFlows_npv. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CashFlow >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "CashFlows_npv. "
              "Expected an array of " "boost::shared_ptr< CashFlow >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of CashFlows_npv. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
      }
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CashFlows_npv" "', argument " "2"" of type '" "boost::shared_ptr< YieldTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_npv" "', argument " "2"" of type '" "boost::shared_ptr< YieldTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< boost::shared_ptr< YieldTermStructure > * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CashFlows_npv" "', argument " "3"" of type '" "Spread""'");
    } 
    arg3 = static_cast< Spread >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "CashFlows_npv" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_npv" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CashFlows_npv" "', argument " "5"" of type '" "Compounding""'");
    } 
    arg5 = static_cast< Compounding >(val5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "CashFlows_npv" "', argument " "6"" of type '" "Frequency""'");
    } 
    arg6 = static_cast< Frequency >(val6);
    ecode7 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "CashFlows_npv" "', argument " "7"" of type '" "bool""'");
    } 
    arg7 = static_cast< bool >(val7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "CashFlows_npv" "', argument " "8"" of type '" "Date const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_npv" "', argument " "8"" of type '" "Date const &""'"); 
    }
    arg8 = reinterpret_cast< Date * >(argp8);
    {
      try {
        result = (Real)CashFlows_npv__SWIG_0((std::vector< boost::shared_ptr< CashFlow > > const &)*arg1,(boost::shared_ptr< YieldTermStructure > const &)*arg2,arg3,(DayCounter const &)*arg4,arg5,arg6,arg7,(Date const &)*arg8);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CashFlows_npv__SWIG_2) {
  {
    Leg *arg1 = 0 ;
    boost::shared_ptr< YieldTermStructure > *arg2 = 0 ;
    Spread arg3 ;
    DayCounter *arg4 = 0 ;
    Compounding arg5 ;
    Frequency arg6 ;
    bool arg7 ;
    std::vector< boost::shared_ptr< CashFlow > > temp1 ;
    std::vector< boost::shared_ptr< CashFlow > > *v1 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    bool val7 ;
    int ecode7 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: CashFlows_npv(leg,discountCurve,zSpread,dayCounter,compounding,frequency,includeSettlementDateFlows);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of CashFlows_npv. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CashFlow >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "CashFlows_npv. "
              "Expected an array of " "boost::shared_ptr< CashFlow >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of CashFlows_npv. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
      }
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CashFlows_npv" "', argument " "2"" of type '" "boost::shared_ptr< YieldTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_npv" "', argument " "2"" of type '" "boost::shared_ptr< YieldTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< boost::shared_ptr< YieldTermStructure > * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CashFlows_npv" "', argument " "3"" of type '" "Spread""'");
    } 
    arg3 = static_cast< Spread >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "CashFlows_npv" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_npv" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CashFlows_npv" "', argument " "5"" of type '" "Compounding""'");
    } 
    arg5 = static_cast< Compounding >(val5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "CashFlows_npv" "', argument " "6"" of type '" "Frequency""'");
    } 
    arg6 = static_cast< Frequency >(val6);
    ecode7 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "CashFlows_npv" "', argument " "7"" of type '" "bool""'");
    } 
    arg7 = static_cast< bool >(val7);
    {
      try {
        result = (Real)CashFlows_npv__SWIG_0((std::vector< boost::shared_ptr< CashFlow > > const &)*arg1,(boost::shared_ptr< YieldTermStructure > const &)*arg2,arg3,(DayCounter const &)*arg4,arg5,arg6,arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CashFlows_npv__SWIG_3) {
  {
    Leg *arg1 = 0 ;
    Handle< YieldTermStructure > *arg2 = 0 ;
    bool arg3 ;
    Date *arg4 = 0 ;
    Date *arg5 = 0 ;
    std::vector< boost::shared_ptr< CashFlow > > temp1 ;
    std::vector< boost::shared_ptr< CashFlow > > *v1 ;
    void *argp2 ;
    int res2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: CashFlows_npv(leg,discountCurve,includeSettlementDateFlows,settlementDate,npvDate);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of CashFlows_npv. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CashFlow >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "CashFlows_npv. "
              "Expected an array of " "boost::shared_ptr< CashFlow >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of CashFlows_npv. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
      }
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CashFlows_npv" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_npv" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< YieldTermStructure > * >(argp2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CashFlows_npv" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "CashFlows_npv" "', argument " "4"" of type '" "Date const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_npv" "', argument " "4"" of type '" "Date const &""'"); 
    }
    arg4 = reinterpret_cast< Date * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "CashFlows_npv" "', argument " "5"" of type '" "Date const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_npv" "', argument " "5"" of type '" "Date const &""'"); 
    }
    arg5 = reinterpret_cast< Date * >(argp5);
    {
      try {
        result = (Real)CashFlows_npv__SWIG_3((std::vector< boost::shared_ptr< CashFlow > > const &)*arg1,(Handle< YieldTermStructure > const &)*arg2,arg3,(Date const &)*arg4,(Date const &)*arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CashFlows_npv__SWIG_4) {
  {
    Leg *arg1 = 0 ;
    Handle< YieldTermStructure > *arg2 = 0 ;
    bool arg3 ;
    Date *arg4 = 0 ;
    std::vector< boost::shared_ptr< CashFlow > > temp1 ;
    std::vector< boost::shared_ptr< CashFlow > > *v1 ;
    void *argp2 ;
    int res2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: CashFlows_npv(leg,discountCurve,includeSettlementDateFlows,settlementDate);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of CashFlows_npv. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CashFlow >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "CashFlows_npv. "
              "Expected an array of " "boost::shared_ptr< CashFlow >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of CashFlows_npv. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
      }
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CashFlows_npv" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_npv" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< YieldTermStructure > * >(argp2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CashFlows_npv" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "CashFlows_npv" "', argument " "4"" of type '" "Date const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_npv" "', argument " "4"" of type '" "Date const &""'"); 
    }
    arg4 = reinterpret_cast< Date * >(argp4);
    {
      try {
        result = (Real)CashFlows_npv__SWIG_3((std::vector< boost::shared_ptr< CashFlow > > const &)*arg1,(Handle< YieldTermStructure > const &)*arg2,arg3,(Date const &)*arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CashFlows_npv__SWIG_5) {
  {
    Leg *arg1 = 0 ;
    Handle< YieldTermStructure > *arg2 = 0 ;
    bool arg3 ;
    std::vector< boost::shared_ptr< CashFlow > > temp1 ;
    std::vector< boost::shared_ptr< CashFlow > > *v1 ;
    void *argp2 ;
    int res2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: CashFlows_npv(leg,discountCurve,includeSettlementDateFlows);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of CashFlows_npv. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CashFlow >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "CashFlows_npv. "
              "Expected an array of " "boost::shared_ptr< CashFlow >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of CashFlows_npv. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
      }
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CashFlows_npv" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_npv" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< YieldTermStructure > * >(argp2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CashFlows_npv" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (Real)CashFlows_npv__SWIG_3((std::vector< boost::shared_ptr< CashFlow > > const &)*arg1,(Handle< YieldTermStructure > const &)*arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CashFlows_npv__SWIG_6) {
  {
    Leg *arg1 = 0 ;
    InterestRate *arg2 = 0 ;
    bool arg3 ;
    Date arg4 ;
    Date arg5 ;
    std::vector< boost::shared_ptr< CashFlow > > temp1 ;
    std::vector< boost::shared_ptr< CashFlow > > *v1 ;
    void *argp2 ;
    int res2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: CashFlows_npv(Leg const &,InterestRate const &,includeSettlementDateFlows,settlementDate,npvDate);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of CashFlows_npv. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CashFlow >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "CashFlows_npv. "
              "Expected an array of " "boost::shared_ptr< CashFlow >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of CashFlows_npv. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
      }
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_InterestRate,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CashFlows_npv" "', argument " "2"" of type '" "InterestRate const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_npv" "', argument " "2"" of type '" "InterestRate const &""'"); 
    }
    arg2 = reinterpret_cast< InterestRate * >(argp2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CashFlows_npv" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res4)) {
        SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "CashFlows_npv" "', argument " "4"" of type '" "Date""'"); 
      }  
      if (!argp4) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_npv" "', argument " "4"" of type '" "Date""'");
      } else {
        arg4 = *(reinterpret_cast< Date * >(argp4));
      }
    }
    {
      res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res5)) {
        SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "CashFlows_npv" "', argument " "5"" of type '" "Date""'"); 
      }  
      if (!argp5) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_npv" "', argument " "5"" of type '" "Date""'");
      } else {
        arg5 = *(reinterpret_cast< Date * >(argp5));
      }
    }
    {
      try {
        result = (Real)CashFlows::npv((std::vector< boost::shared_ptr< CashFlow > > const &)*arg1,(InterestRate const &)*arg2,arg3,arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CashFlows_npv__SWIG_7) {
  {
    Leg *arg1 = 0 ;
    InterestRate *arg2 = 0 ;
    bool arg3 ;
    Date arg4 ;
    std::vector< boost::shared_ptr< CashFlow > > temp1 ;
    std::vector< boost::shared_ptr< CashFlow > > *v1 ;
    void *argp2 ;
    int res2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: CashFlows_npv(Leg const &,InterestRate const &,includeSettlementDateFlows,settlementDate);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of CashFlows_npv. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CashFlow >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "CashFlows_npv. "
              "Expected an array of " "boost::shared_ptr< CashFlow >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of CashFlows_npv. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
      }
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_InterestRate,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CashFlows_npv" "', argument " "2"" of type '" "InterestRate const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_npv" "', argument " "2"" of type '" "InterestRate const &""'"); 
    }
    arg2 = reinterpret_cast< InterestRate * >(argp2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CashFlows_npv" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res4)) {
        SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "CashFlows_npv" "', argument " "4"" of type '" "Date""'"); 
      }  
      if (!argp4) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_npv" "', argument " "4"" of type '" "Date""'");
      } else {
        arg4 = *(reinterpret_cast< Date * >(argp4));
      }
    }
    {
      try {
        result = (Real)CashFlows::npv((std::vector< boost::shared_ptr< CashFlow > > const &)*arg1,(InterestRate const &)*arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CashFlows_npv__SWIG_8) {
  {
    Leg *arg1 = 0 ;
    InterestRate *arg2 = 0 ;
    bool arg3 ;
    std::vector< boost::shared_ptr< CashFlow > > temp1 ;
    std::vector< boost::shared_ptr< CashFlow > > *v1 ;
    void *argp2 ;
    int res2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: CashFlows_npv(Leg const &,InterestRate const &,includeSettlementDateFlows);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of CashFlows_npv. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CashFlow >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "CashFlows_npv. "
              "Expected an array of " "boost::shared_ptr< CashFlow >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of CashFlows_npv. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
      }
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_InterestRate,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CashFlows_npv" "', argument " "2"" of type '" "InterestRate const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_npv" "', argument " "2"" of type '" "InterestRate const &""'"); 
    }
    arg2 = reinterpret_cast< InterestRate * >(argp2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CashFlows_npv" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (Real)CashFlows::npv((std::vector< boost::shared_ptr< CashFlow > > const &)*arg1,(InterestRate const &)*arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CashFlows_npv__SWIG_9) {
  {
    Leg *arg1 = 0 ;
    Rate arg2 ;
    DayCounter *arg3 = 0 ;
    Compounding arg4 ;
    Frequency arg5 ;
    bool arg6 ;
    Date arg7 ;
    Date arg8 ;
    std::vector< boost::shared_ptr< CashFlow > > temp1 ;
    std::vector< boost::shared_ptr< CashFlow > > *v1 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    bool val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 8) || (items > 8)) {
      SWIG_croak("Usage: CashFlows_npv(Leg const &,yield,dayCounter,compounding,frequency,includeSettlementDateFlows,settlementDate,npvDate);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of CashFlows_npv. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CashFlow >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "CashFlows_npv. "
              "Expected an array of " "boost::shared_ptr< CashFlow >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of CashFlows_npv. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
      }
    }
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CashFlows_npv" "', argument " "2"" of type '" "Rate""'");
    } 
    arg2 = static_cast< Rate >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CashFlows_npv" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_npv" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CashFlows_npv" "', argument " "4"" of type '" "Compounding""'");
    } 
    arg4 = static_cast< Compounding >(val4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CashFlows_npv" "', argument " "5"" of type '" "Frequency""'");
    } 
    arg5 = static_cast< Frequency >(val5);
    ecode6 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "CashFlows_npv" "', argument " "6"" of type '" "bool""'");
    } 
    arg6 = static_cast< bool >(val6);
    {
      res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res7)) {
        SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "CashFlows_npv" "', argument " "7"" of type '" "Date""'"); 
      }  
      if (!argp7) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_npv" "', argument " "7"" of type '" "Date""'");
      } else {
        arg7 = *(reinterpret_cast< Date * >(argp7));
      }
    }
    {
      res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res8)) {
        SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "CashFlows_npv" "', argument " "8"" of type '" "Date""'"); 
      }  
      if (!argp8) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_npv" "', argument " "8"" of type '" "Date""'");
      } else {
        arg8 = *(reinterpret_cast< Date * >(argp8));
      }
    }
    {
      try {
        result = (Real)CashFlows::npv((std::vector< boost::shared_ptr< CashFlow > > const &)*arg1,arg2,(DayCounter const &)*arg3,arg4,arg5,arg6,arg7,arg8);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CashFlows_npv__SWIG_10) {
  {
    Leg *arg1 = 0 ;
    Rate arg2 ;
    DayCounter *arg3 = 0 ;
    Compounding arg4 ;
    Frequency arg5 ;
    bool arg6 ;
    Date arg7 ;
    std::vector< boost::shared_ptr< CashFlow > > temp1 ;
    std::vector< boost::shared_ptr< CashFlow > > *v1 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    bool val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: CashFlows_npv(Leg const &,yield,dayCounter,compounding,frequency,includeSettlementDateFlows,settlementDate);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of CashFlows_npv. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CashFlow >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "CashFlows_npv. "
              "Expected an array of " "boost::shared_ptr< CashFlow >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of CashFlows_npv. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
      }
    }
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CashFlows_npv" "', argument " "2"" of type '" "Rate""'");
    } 
    arg2 = static_cast< Rate >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CashFlows_npv" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_npv" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CashFlows_npv" "', argument " "4"" of type '" "Compounding""'");
    } 
    arg4 = static_cast< Compounding >(val4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CashFlows_npv" "', argument " "5"" of type '" "Frequency""'");
    } 
    arg5 = static_cast< Frequency >(val5);
    ecode6 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "CashFlows_npv" "', argument " "6"" of type '" "bool""'");
    } 
    arg6 = static_cast< bool >(val6);
    {
      res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res7)) {
        SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "CashFlows_npv" "', argument " "7"" of type '" "Date""'"); 
      }  
      if (!argp7) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_npv" "', argument " "7"" of type '" "Date""'");
      } else {
        arg7 = *(reinterpret_cast< Date * >(argp7));
      }
    }
    {
      try {
        result = (Real)CashFlows::npv((std::vector< boost::shared_ptr< CashFlow > > const &)*arg1,arg2,(DayCounter const &)*arg3,arg4,arg5,arg6,arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CashFlows_npv__SWIG_11) {
  {
    Leg *arg1 = 0 ;
    Rate arg2 ;
    DayCounter *arg3 = 0 ;
    Compounding arg4 ;
    Frequency arg5 ;
    bool arg6 ;
    std::vector< boost::shared_ptr< CashFlow > > temp1 ;
    std::vector< boost::shared_ptr< CashFlow > > *v1 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    bool val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: CashFlows_npv(Leg const &,yield,dayCounter,compounding,frequency,includeSettlementDateFlows);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of CashFlows_npv. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CashFlow >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "CashFlows_npv. "
              "Expected an array of " "boost::shared_ptr< CashFlow >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of CashFlows_npv. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
      }
    }
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CashFlows_npv" "', argument " "2"" of type '" "Rate""'");
    } 
    arg2 = static_cast< Rate >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CashFlows_npv" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_npv" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CashFlows_npv" "', argument " "4"" of type '" "Compounding""'");
    } 
    arg4 = static_cast< Compounding >(val4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CashFlows_npv" "', argument " "5"" of type '" "Frequency""'");
    } 
    arg5 = static_cast< Frequency >(val5);
    ecode6 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "CashFlows_npv" "', argument " "6"" of type '" "bool""'");
    } 
    arg6 = static_cast< bool >(val6);
    {
      try {
        result = (Real)CashFlows::npv((std::vector< boost::shared_ptr< CashFlow > > const &)*arg1,arg2,(DayCounter const &)*arg3,arg4,arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CashFlows_npv) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< CashFlow > >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< CashFlow >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< CashFlow > >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< CashFlow >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_InterestRate, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< CashFlow > >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< CashFlow >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_InterestRate, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< CashFlow > >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< CashFlow >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< CashFlow > >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< CashFlow >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< CashFlow > >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< CashFlow >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_InterestRate, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< CashFlow > >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< CashFlow >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 7;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_7:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< CashFlow > >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< CashFlow >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 8;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_8:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< CashFlow > >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< CashFlow >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 9;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_9:
    
    if (items == 8) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< CashFlow > >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< CashFlow >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 10;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_10:
    
    if (items == 8) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< CashFlow > >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< CashFlow >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 11;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_11:
    
    if (items == 9) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< CashFlow > >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< CashFlow >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 12;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_12:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CashFlows_npv__SWIG_5); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CashFlows_npv__SWIG_8); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CashFlows_npv__SWIG_7); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CashFlows_npv__SWIG_4); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CashFlows_npv__SWIG_3); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CashFlows_npv__SWIG_6); return;
    case 7:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CashFlows_npv__SWIG_11); return;
    case 8:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CashFlows_npv__SWIG_2); return;
    case 9:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CashFlows_npv__SWIG_10); return;
    case 10:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CashFlows_npv__SWIG_1); return;
    case 11:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CashFlows_npv__SWIG_9); return;
    case 12:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CashFlows_npv__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'CashFlows_npv'");
  XSRETURN(0);
}


XS(_wrap_CashFlows_bps__SWIG_0) {
  {
    Leg *arg1 = 0 ;
    boost::shared_ptr< YieldTermStructure > *arg2 = 0 ;
    bool arg3 ;
    Date *arg4 = 0 ;
    Date *arg5 = 0 ;
    std::vector< boost::shared_ptr< CashFlow > > temp1 ;
    std::vector< boost::shared_ptr< CashFlow > > *v1 ;
    void *argp2 ;
    int res2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: CashFlows_bps(leg,discountCurve,includeSettlementDateFlows,settlementDate,npvDate);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of CashFlows_bps. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CashFlow >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "CashFlows_bps. "
              "Expected an array of " "boost::shared_ptr< CashFlow >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of CashFlows_bps. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
      }
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CashFlows_bps" "', argument " "2"" of type '" "boost::shared_ptr< YieldTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_bps" "', argument " "2"" of type '" "boost::shared_ptr< YieldTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< boost::shared_ptr< YieldTermStructure > * >(argp2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CashFlows_bps" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "CashFlows_bps" "', argument " "4"" of type '" "Date const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_bps" "', argument " "4"" of type '" "Date const &""'"); 
    }
    arg4 = reinterpret_cast< Date * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "CashFlows_bps" "', argument " "5"" of type '" "Date const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_bps" "', argument " "5"" of type '" "Date const &""'"); 
    }
    arg5 = reinterpret_cast< Date * >(argp5);
    {
      try {
        result = (Real)CashFlows_bps__SWIG_0((std::vector< boost::shared_ptr< CashFlow > > const &)*arg1,(boost::shared_ptr< YieldTermStructure > const &)*arg2,arg3,(Date const &)*arg4,(Date const &)*arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CashFlows_bps__SWIG_1) {
  {
    Leg *arg1 = 0 ;
    boost::shared_ptr< YieldTermStructure > *arg2 = 0 ;
    bool arg3 ;
    Date *arg4 = 0 ;
    std::vector< boost::shared_ptr< CashFlow > > temp1 ;
    std::vector< boost::shared_ptr< CashFlow > > *v1 ;
    void *argp2 ;
    int res2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: CashFlows_bps(leg,discountCurve,includeSettlementDateFlows,settlementDate);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of CashFlows_bps. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CashFlow >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "CashFlows_bps. "
              "Expected an array of " "boost::shared_ptr< CashFlow >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of CashFlows_bps. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
      }
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CashFlows_bps" "', argument " "2"" of type '" "boost::shared_ptr< YieldTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_bps" "', argument " "2"" of type '" "boost::shared_ptr< YieldTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< boost::shared_ptr< YieldTermStructure > * >(argp2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CashFlows_bps" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "CashFlows_bps" "', argument " "4"" of type '" "Date const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_bps" "', argument " "4"" of type '" "Date const &""'"); 
    }
    arg4 = reinterpret_cast< Date * >(argp4);
    {
      try {
        result = (Real)CashFlows_bps__SWIG_0((std::vector< boost::shared_ptr< CashFlow > > const &)*arg1,(boost::shared_ptr< YieldTermStructure > const &)*arg2,arg3,(Date const &)*arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CashFlows_bps__SWIG_2) {
  {
    Leg *arg1 = 0 ;
    boost::shared_ptr< YieldTermStructure > *arg2 = 0 ;
    bool arg3 ;
    std::vector< boost::shared_ptr< CashFlow > > temp1 ;
    std::vector< boost::shared_ptr< CashFlow > > *v1 ;
    void *argp2 ;
    int res2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: CashFlows_bps(leg,discountCurve,includeSettlementDateFlows);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of CashFlows_bps. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CashFlow >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "CashFlows_bps. "
              "Expected an array of " "boost::shared_ptr< CashFlow >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of CashFlows_bps. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
      }
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CashFlows_bps" "', argument " "2"" of type '" "boost::shared_ptr< YieldTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_bps" "', argument " "2"" of type '" "boost::shared_ptr< YieldTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< boost::shared_ptr< YieldTermStructure > * >(argp2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CashFlows_bps" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (Real)CashFlows_bps__SWIG_0((std::vector< boost::shared_ptr< CashFlow > > const &)*arg1,(boost::shared_ptr< YieldTermStructure > const &)*arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CashFlows_bps__SWIG_3) {
  {
    Leg *arg1 = 0 ;
    Handle< YieldTermStructure > *arg2 = 0 ;
    bool arg3 ;
    Date *arg4 = 0 ;
    Date *arg5 = 0 ;
    std::vector< boost::shared_ptr< CashFlow > > temp1 ;
    std::vector< boost::shared_ptr< CashFlow > > *v1 ;
    void *argp2 ;
    int res2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: CashFlows_bps(leg,discountCurve,includeSettlementDateFlows,settlementDate,npvDate);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of CashFlows_bps. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CashFlow >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "CashFlows_bps. "
              "Expected an array of " "boost::shared_ptr< CashFlow >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of CashFlows_bps. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
      }
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CashFlows_bps" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_bps" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< YieldTermStructure > * >(argp2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CashFlows_bps" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "CashFlows_bps" "', argument " "4"" of type '" "Date const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_bps" "', argument " "4"" of type '" "Date const &""'"); 
    }
    arg4 = reinterpret_cast< Date * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "CashFlows_bps" "', argument " "5"" of type '" "Date const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_bps" "', argument " "5"" of type '" "Date const &""'"); 
    }
    arg5 = reinterpret_cast< Date * >(argp5);
    {
      try {
        result = (Real)CashFlows_bps__SWIG_3((std::vector< boost::shared_ptr< CashFlow > > const &)*arg1,(Handle< YieldTermStructure > const &)*arg2,arg3,(Date const &)*arg4,(Date const &)*arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CashFlows_bps__SWIG_4) {
  {
    Leg *arg1 = 0 ;
    Handle< YieldTermStructure > *arg2 = 0 ;
    bool arg3 ;
    Date *arg4 = 0 ;
    std::vector< boost::shared_ptr< CashFlow > > temp1 ;
    std::vector< boost::shared_ptr< CashFlow > > *v1 ;
    void *argp2 ;
    int res2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: CashFlows_bps(leg,discountCurve,includeSettlementDateFlows,settlementDate);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of CashFlows_bps. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CashFlow >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "CashFlows_bps. "
              "Expected an array of " "boost::shared_ptr< CashFlow >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of CashFlows_bps. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
      }
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CashFlows_bps" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_bps" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< YieldTermStructure > * >(argp2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CashFlows_bps" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "CashFlows_bps" "', argument " "4"" of type '" "Date const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_bps" "', argument " "4"" of type '" "Date const &""'"); 
    }
    arg4 = reinterpret_cast< Date * >(argp4);
    {
      try {
        result = (Real)CashFlows_bps__SWIG_3((std::vector< boost::shared_ptr< CashFlow > > const &)*arg1,(Handle< YieldTermStructure > const &)*arg2,arg3,(Date const &)*arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CashFlows_bps__SWIG_5) {
  {
    Leg *arg1 = 0 ;
    Handle< YieldTermStructure > *arg2 = 0 ;
    bool arg3 ;
    std::vector< boost::shared_ptr< CashFlow > > temp1 ;
    std::vector< boost::shared_ptr< CashFlow > > *v1 ;
    void *argp2 ;
    int res2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: CashFlows_bps(leg,discountCurve,includeSettlementDateFlows);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of CashFlows_bps. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CashFlow >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "CashFlows_bps. "
              "Expected an array of " "boost::shared_ptr< CashFlow >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of CashFlows_bps. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
      }
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CashFlows_bps" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_bps" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< YieldTermStructure > * >(argp2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CashFlows_bps" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (Real)CashFlows_bps__SWIG_3((std::vector< boost::shared_ptr< CashFlow > > const &)*arg1,(Handle< YieldTermStructure > const &)*arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CashFlows_bps__SWIG_6) {
  {
    Leg *arg1 = 0 ;
    InterestRate *arg2 = 0 ;
    bool arg3 ;
    Date arg4 ;
    Date arg5 ;
    std::vector< boost::shared_ptr< CashFlow > > temp1 ;
    std::vector< boost::shared_ptr< CashFlow > > *v1 ;
    void *argp2 ;
    int res2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: CashFlows_bps(Leg const &,InterestRate const &,includeSettlementDateFlows,settlementDate,npvDate);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of CashFlows_bps. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CashFlow >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "CashFlows_bps. "
              "Expected an array of " "boost::shared_ptr< CashFlow >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of CashFlows_bps. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
      }
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_InterestRate,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CashFlows_bps" "', argument " "2"" of type '" "InterestRate const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_bps" "', argument " "2"" of type '" "InterestRate const &""'"); 
    }
    arg2 = reinterpret_cast< InterestRate * >(argp2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CashFlows_bps" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res4)) {
        SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "CashFlows_bps" "', argument " "4"" of type '" "Date""'"); 
      }  
      if (!argp4) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_bps" "', argument " "4"" of type '" "Date""'");
      } else {
        arg4 = *(reinterpret_cast< Date * >(argp4));
      }
    }
    {
      res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res5)) {
        SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "CashFlows_bps" "', argument " "5"" of type '" "Date""'"); 
      }  
      if (!argp5) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_bps" "', argument " "5"" of type '" "Date""'");
      } else {
        arg5 = *(reinterpret_cast< Date * >(argp5));
      }
    }
    {
      try {
        result = (Real)CashFlows::bps((std::vector< boost::shared_ptr< CashFlow > > const &)*arg1,(InterestRate const &)*arg2,arg3,arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CashFlows_bps__SWIG_7) {
  {
    Leg *arg1 = 0 ;
    InterestRate *arg2 = 0 ;
    bool arg3 ;
    Date arg4 ;
    std::vector< boost::shared_ptr< CashFlow > > temp1 ;
    std::vector< boost::shared_ptr< CashFlow > > *v1 ;
    void *argp2 ;
    int res2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: CashFlows_bps(Leg const &,InterestRate const &,includeSettlementDateFlows,settlementDate);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of CashFlows_bps. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CashFlow >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "CashFlows_bps. "
              "Expected an array of " "boost::shared_ptr< CashFlow >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of CashFlows_bps. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
      }
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_InterestRate,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CashFlows_bps" "', argument " "2"" of type '" "InterestRate const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_bps" "', argument " "2"" of type '" "InterestRate const &""'"); 
    }
    arg2 = reinterpret_cast< InterestRate * >(argp2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CashFlows_bps" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res4)) {
        SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "CashFlows_bps" "', argument " "4"" of type '" "Date""'"); 
      }  
      if (!argp4) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_bps" "', argument " "4"" of type '" "Date""'");
      } else {
        arg4 = *(reinterpret_cast< Date * >(argp4));
      }
    }
    {
      try {
        result = (Real)CashFlows::bps((std::vector< boost::shared_ptr< CashFlow > > const &)*arg1,(InterestRate const &)*arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CashFlows_bps__SWIG_8) {
  {
    Leg *arg1 = 0 ;
    InterestRate *arg2 = 0 ;
    bool arg3 ;
    std::vector< boost::shared_ptr< CashFlow > > temp1 ;
    std::vector< boost::shared_ptr< CashFlow > > *v1 ;
    void *argp2 ;
    int res2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: CashFlows_bps(Leg const &,InterestRate const &,includeSettlementDateFlows);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of CashFlows_bps. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CashFlow >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "CashFlows_bps. "
              "Expected an array of " "boost::shared_ptr< CashFlow >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of CashFlows_bps. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
      }
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_InterestRate,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CashFlows_bps" "', argument " "2"" of type '" "InterestRate const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_bps" "', argument " "2"" of type '" "InterestRate const &""'"); 
    }
    arg2 = reinterpret_cast< InterestRate * >(argp2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CashFlows_bps" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (Real)CashFlows::bps((std::vector< boost::shared_ptr< CashFlow > > const &)*arg1,(InterestRate const &)*arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CashFlows_bps__SWIG_9) {
  {
    Leg *arg1 = 0 ;
    Rate arg2 ;
    DayCounter *arg3 = 0 ;
    Compounding arg4 ;
    Frequency arg5 ;
    bool arg6 ;
    Date arg7 ;
    Date arg8 ;
    std::vector< boost::shared_ptr< CashFlow > > temp1 ;
    std::vector< boost::shared_ptr< CashFlow > > *v1 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    bool val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 8) || (items > 8)) {
      SWIG_croak("Usage: CashFlows_bps(Leg const &,yield,dayCounter,compounding,frequency,includeSettlementDateFlows,settlementDate,npvDate);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of CashFlows_bps. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CashFlow >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "CashFlows_bps. "
              "Expected an array of " "boost::shared_ptr< CashFlow >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of CashFlows_bps. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
      }
    }
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CashFlows_bps" "', argument " "2"" of type '" "Rate""'");
    } 
    arg2 = static_cast< Rate >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CashFlows_bps" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_bps" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CashFlows_bps" "', argument " "4"" of type '" "Compounding""'");
    } 
    arg4 = static_cast< Compounding >(val4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CashFlows_bps" "', argument " "5"" of type '" "Frequency""'");
    } 
    arg5 = static_cast< Frequency >(val5);
    ecode6 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "CashFlows_bps" "', argument " "6"" of type '" "bool""'");
    } 
    arg6 = static_cast< bool >(val6);
    {
      res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res7)) {
        SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "CashFlows_bps" "', argument " "7"" of type '" "Date""'"); 
      }  
      if (!argp7) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_bps" "', argument " "7"" of type '" "Date""'");
      } else {
        arg7 = *(reinterpret_cast< Date * >(argp7));
      }
    }
    {
      res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res8)) {
        SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "CashFlows_bps" "', argument " "8"" of type '" "Date""'"); 
      }  
      if (!argp8) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_bps" "', argument " "8"" of type '" "Date""'");
      } else {
        arg8 = *(reinterpret_cast< Date * >(argp8));
      }
    }
    {
      try {
        result = (Real)CashFlows::bps((std::vector< boost::shared_ptr< CashFlow > > const &)*arg1,arg2,(DayCounter const &)*arg3,arg4,arg5,arg6,arg7,arg8);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CashFlows_bps__SWIG_10) {
  {
    Leg *arg1 = 0 ;
    Rate arg2 ;
    DayCounter *arg3 = 0 ;
    Compounding arg4 ;
    Frequency arg5 ;
    bool arg6 ;
    Date arg7 ;
    std::vector< boost::shared_ptr< CashFlow > > temp1 ;
    std::vector< boost::shared_ptr< CashFlow > > *v1 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    bool val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: CashFlows_bps(Leg const &,yield,dayCounter,compounding,frequency,includeSettlementDateFlows,settlementDate);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of CashFlows_bps. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CashFlow >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "CashFlows_bps. "
              "Expected an array of " "boost::shared_ptr< CashFlow >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of CashFlows_bps. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
      }
    }
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CashFlows_bps" "', argument " "2"" of type '" "Rate""'");
    } 
    arg2 = static_cast< Rate >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CashFlows_bps" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_bps" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CashFlows_bps" "', argument " "4"" of type '" "Compounding""'");
    } 
    arg4 = static_cast< Compounding >(val4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CashFlows_bps" "', argument " "5"" of type '" "Frequency""'");
    } 
    arg5 = static_cast< Frequency >(val5);
    ecode6 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "CashFlows_bps" "', argument " "6"" of type '" "bool""'");
    } 
    arg6 = static_cast< bool >(val6);
    {
      res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res7)) {
        SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "CashFlows_bps" "', argument " "7"" of type '" "Date""'"); 
      }  
      if (!argp7) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_bps" "', argument " "7"" of type '" "Date""'");
      } else {
        arg7 = *(reinterpret_cast< Date * >(argp7));
      }
    }
    {
      try {
        result = (Real)CashFlows::bps((std::vector< boost::shared_ptr< CashFlow > > const &)*arg1,arg2,(DayCounter const &)*arg3,arg4,arg5,arg6,arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CashFlows_bps__SWIG_11) {
  {
    Leg *arg1 = 0 ;
    Rate arg2 ;
    DayCounter *arg3 = 0 ;
    Compounding arg4 ;
    Frequency arg5 ;
    bool arg6 ;
    std::vector< boost::shared_ptr< CashFlow > > temp1 ;
    std::vector< boost::shared_ptr< CashFlow > > *v1 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    bool val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: CashFlows_bps(Leg const &,yield,dayCounter,compounding,frequency,includeSettlementDateFlows);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of CashFlows_bps. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CashFlow >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "CashFlows_bps. "
              "Expected an array of " "boost::shared_ptr< CashFlow >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of CashFlows_bps. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
      }
    }
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CashFlows_bps" "', argument " "2"" of type '" "Rate""'");
    } 
    arg2 = static_cast< Rate >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CashFlows_bps" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_bps" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CashFlows_bps" "', argument " "4"" of type '" "Compounding""'");
    } 
    arg4 = static_cast< Compounding >(val4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CashFlows_bps" "', argument " "5"" of type '" "Frequency""'");
    } 
    arg5 = static_cast< Frequency >(val5);
    ecode6 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "CashFlows_bps" "', argument " "6"" of type '" "bool""'");
    } 
    arg6 = static_cast< bool >(val6);
    {
      try {
        result = (Real)CashFlows::bps((std::vector< boost::shared_ptr< CashFlow > > const &)*arg1,arg2,(DayCounter const &)*arg3,arg4,arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CashFlows_bps) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< CashFlow > >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< CashFlow >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< CashFlow > >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< CashFlow >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< CashFlow > >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< CashFlow >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_InterestRate, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< CashFlow > >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< CashFlow >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< CashFlow > >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< CashFlow >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_InterestRate, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< CashFlow > >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< CashFlow >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< CashFlow > >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< CashFlow >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_InterestRate, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 7;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_7:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< CashFlow > >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< CashFlow >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 8;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_8:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< CashFlow > >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< CashFlow >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 9;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_9:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< CashFlow > >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< CashFlow >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 10;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_10:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< CashFlow > >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< CashFlow >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 11;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_11:
    
    if (items == 8) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< CashFlow > >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< CashFlow >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 12;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_12:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CashFlows_bps__SWIG_2); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CashFlows_bps__SWIG_5); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CashFlows_bps__SWIG_8); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CashFlows_bps__SWIG_1); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CashFlows_bps__SWIG_7); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CashFlows_bps__SWIG_4); return;
    case 7:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CashFlows_bps__SWIG_6); return;
    case 8:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CashFlows_bps__SWIG_0); return;
    case 9:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CashFlows_bps__SWIG_3); return;
    case 10:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CashFlows_bps__SWIG_11); return;
    case 11:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CashFlows_bps__SWIG_10); return;
    case 12:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CashFlows_bps__SWIG_9); return;
    }
  }
  
  croak("No matching function for overloaded 'CashFlows_bps'");
  XSRETURN(0);
}


XS(_wrap_CashFlows_atmRate__SWIG_0) {
  {
    Leg *arg1 = 0 ;
    boost::shared_ptr< YieldTermStructure > *arg2 = 0 ;
    bool arg3 ;
    Date *arg4 = 0 ;
    Date *arg5 = 0 ;
    Real arg6 ;
    std::vector< boost::shared_ptr< CashFlow > > temp1 ;
    std::vector< boost::shared_ptr< CashFlow > > *v1 ;
    void *argp2 ;
    int res2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    double val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: CashFlows_atmRate(leg,discountCurve,includeSettlementDateFlows,settlementDate,npvDate,npv);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of CashFlows_atmRate. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CashFlow >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "CashFlows_atmRate. "
              "Expected an array of " "boost::shared_ptr< CashFlow >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of CashFlows_atmRate. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
      }
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CashFlows_atmRate" "', argument " "2"" of type '" "boost::shared_ptr< YieldTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_atmRate" "', argument " "2"" of type '" "boost::shared_ptr< YieldTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< boost::shared_ptr< YieldTermStructure > * >(argp2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CashFlows_atmRate" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "CashFlows_atmRate" "', argument " "4"" of type '" "Date const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_atmRate" "', argument " "4"" of type '" "Date const &""'"); 
    }
    arg4 = reinterpret_cast< Date * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "CashFlows_atmRate" "', argument " "5"" of type '" "Date const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_atmRate" "', argument " "5"" of type '" "Date const &""'"); 
    }
    arg5 = reinterpret_cast< Date * >(argp5);
    ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "CashFlows_atmRate" "', argument " "6"" of type '" "Real""'");
    } 
    arg6 = static_cast< Real >(val6);
    {
      try {
        result = (Rate)CashFlows_atmRate__SWIG_0((std::vector< boost::shared_ptr< CashFlow > > const &)*arg1,(boost::shared_ptr< YieldTermStructure > const &)*arg2,arg3,(Date const &)*arg4,(Date const &)*arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CashFlows_atmRate__SWIG_1) {
  {
    Leg *arg1 = 0 ;
    boost::shared_ptr< YieldTermStructure > *arg2 = 0 ;
    bool arg3 ;
    Date *arg4 = 0 ;
    Date *arg5 = 0 ;
    std::vector< boost::shared_ptr< CashFlow > > temp1 ;
    std::vector< boost::shared_ptr< CashFlow > > *v1 ;
    void *argp2 ;
    int res2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: CashFlows_atmRate(leg,discountCurve,includeSettlementDateFlows,settlementDate,npvDate);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of CashFlows_atmRate. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CashFlow >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "CashFlows_atmRate. "
              "Expected an array of " "boost::shared_ptr< CashFlow >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of CashFlows_atmRate. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
      }
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CashFlows_atmRate" "', argument " "2"" of type '" "boost::shared_ptr< YieldTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_atmRate" "', argument " "2"" of type '" "boost::shared_ptr< YieldTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< boost::shared_ptr< YieldTermStructure > * >(argp2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CashFlows_atmRate" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "CashFlows_atmRate" "', argument " "4"" of type '" "Date const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_atmRate" "', argument " "4"" of type '" "Date const &""'"); 
    }
    arg4 = reinterpret_cast< Date * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "CashFlows_atmRate" "', argument " "5"" of type '" "Date const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_atmRate" "', argument " "5"" of type '" "Date const &""'"); 
    }
    arg5 = reinterpret_cast< Date * >(argp5);
    {
      try {
        result = (Rate)CashFlows_atmRate__SWIG_0((std::vector< boost::shared_ptr< CashFlow > > const &)*arg1,(boost::shared_ptr< YieldTermStructure > const &)*arg2,arg3,(Date const &)*arg4,(Date const &)*arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CashFlows_atmRate__SWIG_2) {
  {
    Leg *arg1 = 0 ;
    boost::shared_ptr< YieldTermStructure > *arg2 = 0 ;
    bool arg3 ;
    Date *arg4 = 0 ;
    std::vector< boost::shared_ptr< CashFlow > > temp1 ;
    std::vector< boost::shared_ptr< CashFlow > > *v1 ;
    void *argp2 ;
    int res2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: CashFlows_atmRate(leg,discountCurve,includeSettlementDateFlows,settlementDate);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of CashFlows_atmRate. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CashFlow >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "CashFlows_atmRate. "
              "Expected an array of " "boost::shared_ptr< CashFlow >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of CashFlows_atmRate. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
      }
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CashFlows_atmRate" "', argument " "2"" of type '" "boost::shared_ptr< YieldTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_atmRate" "', argument " "2"" of type '" "boost::shared_ptr< YieldTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< boost::shared_ptr< YieldTermStructure > * >(argp2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CashFlows_atmRate" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "CashFlows_atmRate" "', argument " "4"" of type '" "Date const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_atmRate" "', argument " "4"" of type '" "Date const &""'"); 
    }
    arg4 = reinterpret_cast< Date * >(argp4);
    {
      try {
        result = (Rate)CashFlows_atmRate__SWIG_0((std::vector< boost::shared_ptr< CashFlow > > const &)*arg1,(boost::shared_ptr< YieldTermStructure > const &)*arg2,arg3,(Date const &)*arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CashFlows_atmRate__SWIG_3) {
  {
    Leg *arg1 = 0 ;
    boost::shared_ptr< YieldTermStructure > *arg2 = 0 ;
    bool arg3 ;
    std::vector< boost::shared_ptr< CashFlow > > temp1 ;
    std::vector< boost::shared_ptr< CashFlow > > *v1 ;
    void *argp2 ;
    int res2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: CashFlows_atmRate(leg,discountCurve,includeSettlementDateFlows);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of CashFlows_atmRate. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CashFlow >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "CashFlows_atmRate. "
              "Expected an array of " "boost::shared_ptr< CashFlow >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of CashFlows_atmRate. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
      }
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CashFlows_atmRate" "', argument " "2"" of type '" "boost::shared_ptr< YieldTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_atmRate" "', argument " "2"" of type '" "boost::shared_ptr< YieldTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< boost::shared_ptr< YieldTermStructure > * >(argp2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CashFlows_atmRate" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (Rate)CashFlows_atmRate__SWIG_0((std::vector< boost::shared_ptr< CashFlow > > const &)*arg1,(boost::shared_ptr< YieldTermStructure > const &)*arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CashFlows_atmRate) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< CashFlow > >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< CashFlow >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< CashFlow > >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< CashFlow >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< CashFlow > >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< CashFlow >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< CashFlow > >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< CashFlow >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CashFlows_atmRate__SWIG_3); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CashFlows_atmRate__SWIG_2); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CashFlows_atmRate__SWIG_1); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CashFlows_atmRate__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'CashFlows_atmRate'");
  XSRETURN(0);
}


XS(_wrap_CashFlows_yield__SWIG_0) {
  {
    Leg *arg1 = 0 ;
    Real arg2 ;
    DayCounter *arg3 = 0 ;
    Compounding arg4 ;
    Frequency arg5 ;
    bool arg6 ;
    Date arg7 ;
    Date arg8 ;
    Real arg9 ;
    Size arg10 ;
    Rate arg11 ;
    std::vector< boost::shared_ptr< CashFlow > > temp1 ;
    std::vector< boost::shared_ptr< CashFlow > > *v1 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    bool val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    double val9 ;
    int ecode9 = 0 ;
    size_t val10 ;
    int ecode10 = 0 ;
    double val11 ;
    int ecode11 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 11) || (items > 11)) {
      SWIG_croak("Usage: CashFlows_yield(Leg const &,npv,dayCounter,compounding,frequency,includeSettlementDateFlows,settlementDate,npvDate,accuracy,maxIterations,guess);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of CashFlows_yield. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CashFlow >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "CashFlows_yield. "
              "Expected an array of " "boost::shared_ptr< CashFlow >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of CashFlows_yield. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
      }
    }
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CashFlows_yield" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CashFlows_yield" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_yield" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CashFlows_yield" "', argument " "4"" of type '" "Compounding""'");
    } 
    arg4 = static_cast< Compounding >(val4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CashFlows_yield" "', argument " "5"" of type '" "Frequency""'");
    } 
    arg5 = static_cast< Frequency >(val5);
    ecode6 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "CashFlows_yield" "', argument " "6"" of type '" "bool""'");
    } 
    arg6 = static_cast< bool >(val6);
    {
      res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res7)) {
        SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "CashFlows_yield" "', argument " "7"" of type '" "Date""'"); 
      }  
      if (!argp7) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_yield" "', argument " "7"" of type '" "Date""'");
      } else {
        arg7 = *(reinterpret_cast< Date * >(argp7));
      }
    }
    {
      res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res8)) {
        SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "CashFlows_yield" "', argument " "8"" of type '" "Date""'"); 
      }  
      if (!argp8) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_yield" "', argument " "8"" of type '" "Date""'");
      } else {
        arg8 = *(reinterpret_cast< Date * >(argp8));
      }
    }
    ecode9 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(8), &val9);
    if (!SWIG_IsOK(ecode9)) {
      SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "CashFlows_yield" "', argument " "9"" of type '" "Real""'");
    } 
    arg9 = static_cast< Real >(val9);
    ecode10 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(9), &val10);
    if (!SWIG_IsOK(ecode10)) {
      SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "CashFlows_yield" "', argument " "10"" of type '" "Size""'");
    } 
    arg10 = static_cast< Size >(val10);
    ecode11 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(10), &val11);
    if (!SWIG_IsOK(ecode11)) {
      SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "CashFlows_yield" "', argument " "11"" of type '" "Rate""'");
    } 
    arg11 = static_cast< Rate >(val11);
    {
      try {
        result = (Rate)CashFlows::yield((std::vector< boost::shared_ptr< CashFlow > > const &)*arg1,arg2,(DayCounter const &)*arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CashFlows_yield__SWIG_1) {
  {
    Leg *arg1 = 0 ;
    Real arg2 ;
    DayCounter *arg3 = 0 ;
    Compounding arg4 ;
    Frequency arg5 ;
    bool arg6 ;
    Date arg7 ;
    Date arg8 ;
    Real arg9 ;
    Size arg10 ;
    std::vector< boost::shared_ptr< CashFlow > > temp1 ;
    std::vector< boost::shared_ptr< CashFlow > > *v1 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    bool val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    double val9 ;
    int ecode9 = 0 ;
    size_t val10 ;
    int ecode10 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 10) || (items > 10)) {
      SWIG_croak("Usage: CashFlows_yield(Leg const &,npv,dayCounter,compounding,frequency,includeSettlementDateFlows,settlementDate,npvDate,accuracy,maxIterations);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of CashFlows_yield. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CashFlow >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "CashFlows_yield. "
              "Expected an array of " "boost::shared_ptr< CashFlow >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of CashFlows_yield. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
      }
    }
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CashFlows_yield" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CashFlows_yield" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_yield" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CashFlows_yield" "', argument " "4"" of type '" "Compounding""'");
    } 
    arg4 = static_cast< Compounding >(val4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CashFlows_yield" "', argument " "5"" of type '" "Frequency""'");
    } 
    arg5 = static_cast< Frequency >(val5);
    ecode6 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "CashFlows_yield" "', argument " "6"" of type '" "bool""'");
    } 
    arg6 = static_cast< bool >(val6);
    {
      res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res7)) {
        SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "CashFlows_yield" "', argument " "7"" of type '" "Date""'"); 
      }  
      if (!argp7) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_yield" "', argument " "7"" of type '" "Date""'");
      } else {
        arg7 = *(reinterpret_cast< Date * >(argp7));
      }
    }
    {
      res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res8)) {
        SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "CashFlows_yield" "', argument " "8"" of type '" "Date""'"); 
      }  
      if (!argp8) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_yield" "', argument " "8"" of type '" "Date""'");
      } else {
        arg8 = *(reinterpret_cast< Date * >(argp8));
      }
    }
    ecode9 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(8), &val9);
    if (!SWIG_IsOK(ecode9)) {
      SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "CashFlows_yield" "', argument " "9"" of type '" "Real""'");
    } 
    arg9 = static_cast< Real >(val9);
    ecode10 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(9), &val10);
    if (!SWIG_IsOK(ecode10)) {
      SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "CashFlows_yield" "', argument " "10"" of type '" "Size""'");
    } 
    arg10 = static_cast< Size >(val10);
    {
      try {
        result = (Rate)CashFlows::yield((std::vector< boost::shared_ptr< CashFlow > > const &)*arg1,arg2,(DayCounter const &)*arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CashFlows_yield__SWIG_2) {
  {
    Leg *arg1 = 0 ;
    Real arg2 ;
    DayCounter *arg3 = 0 ;
    Compounding arg4 ;
    Frequency arg5 ;
    bool arg6 ;
    Date arg7 ;
    Date arg8 ;
    Real arg9 ;
    std::vector< boost::shared_ptr< CashFlow > > temp1 ;
    std::vector< boost::shared_ptr< CashFlow > > *v1 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    bool val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    double val9 ;
    int ecode9 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 9) || (items > 9)) {
      SWIG_croak("Usage: CashFlows_yield(Leg const &,npv,dayCounter,compounding,frequency,includeSettlementDateFlows,settlementDate,npvDate,accuracy);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of CashFlows_yield. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CashFlow >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "CashFlows_yield. "
              "Expected an array of " "boost::shared_ptr< CashFlow >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of CashFlows_yield. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
      }
    }
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CashFlows_yield" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CashFlows_yield" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_yield" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CashFlows_yield" "', argument " "4"" of type '" "Compounding""'");
    } 
    arg4 = static_cast< Compounding >(val4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CashFlows_yield" "', argument " "5"" of type '" "Frequency""'");
    } 
    arg5 = static_cast< Frequency >(val5);
    ecode6 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "CashFlows_yield" "', argument " "6"" of type '" "bool""'");
    } 
    arg6 = static_cast< bool >(val6);
    {
      res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res7)) {
        SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "CashFlows_yield" "', argument " "7"" of type '" "Date""'"); 
      }  
      if (!argp7) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_yield" "', argument " "7"" of type '" "Date""'");
      } else {
        arg7 = *(reinterpret_cast< Date * >(argp7));
      }
    }
    {
      res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res8)) {
        SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "CashFlows_yield" "', argument " "8"" of type '" "Date""'"); 
      }  
      if (!argp8) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_yield" "', argument " "8"" of type '" "Date""'");
      } else {
        arg8 = *(reinterpret_cast< Date * >(argp8));
      }
    }
    ecode9 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(8), &val9);
    if (!SWIG_IsOK(ecode9)) {
      SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "CashFlows_yield" "', argument " "9"" of type '" "Real""'");
    } 
    arg9 = static_cast< Real >(val9);
    {
      try {
        result = (Rate)CashFlows::yield((std::vector< boost::shared_ptr< CashFlow > > const &)*arg1,arg2,(DayCounter const &)*arg3,arg4,arg5,arg6,arg7,arg8,arg9);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CashFlows_yield__SWIG_3) {
  {
    Leg *arg1 = 0 ;
    Real arg2 ;
    DayCounter *arg3 = 0 ;
    Compounding arg4 ;
    Frequency arg5 ;
    bool arg6 ;
    Date arg7 ;
    Date arg8 ;
    std::vector< boost::shared_ptr< CashFlow > > temp1 ;
    std::vector< boost::shared_ptr< CashFlow > > *v1 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    bool val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 8) || (items > 8)) {
      SWIG_croak("Usage: CashFlows_yield(Leg const &,npv,dayCounter,compounding,frequency,includeSettlementDateFlows,settlementDate,npvDate);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of CashFlows_yield. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CashFlow >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "CashFlows_yield. "
              "Expected an array of " "boost::shared_ptr< CashFlow >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of CashFlows_yield. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
      }
    }
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CashFlows_yield" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CashFlows_yield" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_yield" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CashFlows_yield" "', argument " "4"" of type '" "Compounding""'");
    } 
    arg4 = static_cast< Compounding >(val4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CashFlows_yield" "', argument " "5"" of type '" "Frequency""'");
    } 
    arg5 = static_cast< Frequency >(val5);
    ecode6 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "CashFlows_yield" "', argument " "6"" of type '" "bool""'");
    } 
    arg6 = static_cast< bool >(val6);
    {
      res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res7)) {
        SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "CashFlows_yield" "', argument " "7"" of type '" "Date""'"); 
      }  
      if (!argp7) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_yield" "', argument " "7"" of type '" "Date""'");
      } else {
        arg7 = *(reinterpret_cast< Date * >(argp7));
      }
    }
    {
      res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res8)) {
        SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "CashFlows_yield" "', argument " "8"" of type '" "Date""'"); 
      }  
      if (!argp8) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_yield" "', argument " "8"" of type '" "Date""'");
      } else {
        arg8 = *(reinterpret_cast< Date * >(argp8));
      }
    }
    {
      try {
        result = (Rate)CashFlows::yield((std::vector< boost::shared_ptr< CashFlow > > const &)*arg1,arg2,(DayCounter const &)*arg3,arg4,arg5,arg6,arg7,arg8);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CashFlows_yield__SWIG_4) {
  {
    Leg *arg1 = 0 ;
    Real arg2 ;
    DayCounter *arg3 = 0 ;
    Compounding arg4 ;
    Frequency arg5 ;
    bool arg6 ;
    Date arg7 ;
    std::vector< boost::shared_ptr< CashFlow > > temp1 ;
    std::vector< boost::shared_ptr< CashFlow > > *v1 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    bool val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: CashFlows_yield(Leg const &,npv,dayCounter,compounding,frequency,includeSettlementDateFlows,settlementDate);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of CashFlows_yield. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CashFlow >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "CashFlows_yield. "
              "Expected an array of " "boost::shared_ptr< CashFlow >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of CashFlows_yield. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
      }
    }
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CashFlows_yield" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CashFlows_yield" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_yield" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CashFlows_yield" "', argument " "4"" of type '" "Compounding""'");
    } 
    arg4 = static_cast< Compounding >(val4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CashFlows_yield" "', argument " "5"" of type '" "Frequency""'");
    } 
    arg5 = static_cast< Frequency >(val5);
    ecode6 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "CashFlows_yield" "', argument " "6"" of type '" "bool""'");
    } 
    arg6 = static_cast< bool >(val6);
    {
      res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res7)) {
        SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "CashFlows_yield" "', argument " "7"" of type '" "Date""'"); 
      }  
      if (!argp7) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_yield" "', argument " "7"" of type '" "Date""'");
      } else {
        arg7 = *(reinterpret_cast< Date * >(argp7));
      }
    }
    {
      try {
        result = (Rate)CashFlows::yield((std::vector< boost::shared_ptr< CashFlow > > const &)*arg1,arg2,(DayCounter const &)*arg3,arg4,arg5,arg6,arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CashFlows_yield__SWIG_5) {
  {
    Leg *arg1 = 0 ;
    Real arg2 ;
    DayCounter *arg3 = 0 ;
    Compounding arg4 ;
    Frequency arg5 ;
    bool arg6 ;
    std::vector< boost::shared_ptr< CashFlow > > temp1 ;
    std::vector< boost::shared_ptr< CashFlow > > *v1 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    bool val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: CashFlows_yield(Leg const &,npv,dayCounter,compounding,frequency,includeSettlementDateFlows);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of CashFlows_yield. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CashFlow >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "CashFlows_yield. "
              "Expected an array of " "boost::shared_ptr< CashFlow >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of CashFlows_yield. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
      }
    }
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CashFlows_yield" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CashFlows_yield" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_yield" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CashFlows_yield" "', argument " "4"" of type '" "Compounding""'");
    } 
    arg4 = static_cast< Compounding >(val4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CashFlows_yield" "', argument " "5"" of type '" "Frequency""'");
    } 
    arg5 = static_cast< Frequency >(val5);
    ecode6 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "CashFlows_yield" "', argument " "6"" of type '" "bool""'");
    } 
    arg6 = static_cast< bool >(val6);
    {
      try {
        result = (Rate)CashFlows::yield((std::vector< boost::shared_ptr< CashFlow > > const &)*arg1,arg2,(DayCounter const &)*arg3,arg4,arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CashFlows_yield) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< CashFlow > >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< CashFlow >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< CashFlow > >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< CashFlow >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 8) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< CashFlow > >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< CashFlow >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 9) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< CashFlow > >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< CashFlow >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(8), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 10) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< CashFlow > >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< CashFlow >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(8), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(9), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 11) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< CashFlow > >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< CashFlow >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(8), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(9), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(10), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CashFlows_yield__SWIG_5); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CashFlows_yield__SWIG_4); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CashFlows_yield__SWIG_3); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CashFlows_yield__SWIG_2); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CashFlows_yield__SWIG_1); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CashFlows_yield__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'CashFlows_yield'");
  XSRETURN(0);
}


XS(_wrap_CashFlows_duration__SWIG_0) {
  {
    Leg *arg1 = 0 ;
    InterestRate *arg2 = 0 ;
    Duration::Type arg3 ;
    bool arg4 ;
    Date arg5 ;
    std::vector< boost::shared_ptr< CashFlow > > temp1 ;
    std::vector< boost::shared_ptr< CashFlow > > *v1 ;
    void *argp2 ;
    int res2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int argvi = 0;
    Time result;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: CashFlows_duration(Leg const &,InterestRate const &,type,includeSettlementDateFlows,settlementDate);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of CashFlows_duration. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CashFlow >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "CashFlows_duration. "
              "Expected an array of " "boost::shared_ptr< CashFlow >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of CashFlows_duration. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
      }
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_InterestRate,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CashFlows_duration" "', argument " "2"" of type '" "InterestRate const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_duration" "', argument " "2"" of type '" "InterestRate const &""'"); 
    }
    arg2 = reinterpret_cast< InterestRate * >(argp2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CashFlows_duration" "', argument " "3"" of type '" "Duration::Type""'");
    } 
    arg3 = static_cast< Duration::Type >(val3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CashFlows_duration" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    {
      res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res5)) {
        SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "CashFlows_duration" "', argument " "5"" of type '" "Date""'"); 
      }  
      if (!argp5) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_duration" "', argument " "5"" of type '" "Date""'");
      } else {
        arg5 = *(reinterpret_cast< Date * >(argp5));
      }
    }
    {
      try {
        result = (Time)CashFlows::duration((std::vector< boost::shared_ptr< CashFlow > > const &)*arg1,(InterestRate const &)*arg2,arg3,arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CashFlows_duration__SWIG_1) {
  {
    Leg *arg1 = 0 ;
    InterestRate *arg2 = 0 ;
    Duration::Type arg3 ;
    bool arg4 ;
    std::vector< boost::shared_ptr< CashFlow > > temp1 ;
    std::vector< boost::shared_ptr< CashFlow > > *v1 ;
    void *argp2 ;
    int res2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Time result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: CashFlows_duration(Leg const &,InterestRate const &,type,includeSettlementDateFlows);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of CashFlows_duration. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CashFlow >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "CashFlows_duration. "
              "Expected an array of " "boost::shared_ptr< CashFlow >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of CashFlows_duration. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
      }
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_InterestRate,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CashFlows_duration" "', argument " "2"" of type '" "InterestRate const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_duration" "', argument " "2"" of type '" "InterestRate const &""'"); 
    }
    arg2 = reinterpret_cast< InterestRate * >(argp2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CashFlows_duration" "', argument " "3"" of type '" "Duration::Type""'");
    } 
    arg3 = static_cast< Duration::Type >(val3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CashFlows_duration" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    {
      try {
        result = (Time)CashFlows::duration((std::vector< boost::shared_ptr< CashFlow > > const &)*arg1,(InterestRate const &)*arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CashFlows_duration__SWIG_2) {
  {
    Leg *arg1 = 0 ;
    Rate arg2 ;
    DayCounter *arg3 = 0 ;
    Compounding arg4 ;
    Frequency arg5 ;
    Duration::Type arg6 ;
    bool arg7 ;
    Date arg8 ;
    Date arg9 ;
    std::vector< boost::shared_ptr< CashFlow > > temp1 ;
    std::vector< boost::shared_ptr< CashFlow > > *v1 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    bool val7 ;
    int ecode7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    int argvi = 0;
    Time result;
    dXSARGS;
    
    if ((items < 9) || (items > 9)) {
      SWIG_croak("Usage: CashFlows_duration(Leg const &,yield,dayCounter,compounding,frequency,type,includeSettlementDateFlows,settlementDate,npvDate);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of CashFlows_duration. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CashFlow >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "CashFlows_duration. "
              "Expected an array of " "boost::shared_ptr< CashFlow >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of CashFlows_duration. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
      }
    }
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CashFlows_duration" "', argument " "2"" of type '" "Rate""'");
    } 
    arg2 = static_cast< Rate >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CashFlows_duration" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_duration" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CashFlows_duration" "', argument " "4"" of type '" "Compounding""'");
    } 
    arg4 = static_cast< Compounding >(val4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CashFlows_duration" "', argument " "5"" of type '" "Frequency""'");
    } 
    arg5 = static_cast< Frequency >(val5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "CashFlows_duration" "', argument " "6"" of type '" "Duration::Type""'");
    } 
    arg6 = static_cast< Duration::Type >(val6);
    ecode7 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "CashFlows_duration" "', argument " "7"" of type '" "bool""'");
    } 
    arg7 = static_cast< bool >(val7);
    {
      res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res8)) {
        SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "CashFlows_duration" "', argument " "8"" of type '" "Date""'"); 
      }  
      if (!argp8) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_duration" "', argument " "8"" of type '" "Date""'");
      } else {
        arg8 = *(reinterpret_cast< Date * >(argp8));
      }
    }
    {
      res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res9)) {
        SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "CashFlows_duration" "', argument " "9"" of type '" "Date""'"); 
      }  
      if (!argp9) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_duration" "', argument " "9"" of type '" "Date""'");
      } else {
        arg9 = *(reinterpret_cast< Date * >(argp9));
      }
    }
    {
      try {
        result = (Time)CashFlows::duration((std::vector< boost::shared_ptr< CashFlow > > const &)*arg1,arg2,(DayCounter const &)*arg3,arg4,arg5,arg6,arg7,arg8,arg9);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CashFlows_duration__SWIG_3) {
  {
    Leg *arg1 = 0 ;
    Rate arg2 ;
    DayCounter *arg3 = 0 ;
    Compounding arg4 ;
    Frequency arg5 ;
    Duration::Type arg6 ;
    bool arg7 ;
    Date arg8 ;
    std::vector< boost::shared_ptr< CashFlow > > temp1 ;
    std::vector< boost::shared_ptr< CashFlow > > *v1 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    bool val7 ;
    int ecode7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    int argvi = 0;
    Time result;
    dXSARGS;
    
    if ((items < 8) || (items > 8)) {
      SWIG_croak("Usage: CashFlows_duration(Leg const &,yield,dayCounter,compounding,frequency,type,includeSettlementDateFlows,settlementDate);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of CashFlows_duration. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CashFlow >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "CashFlows_duration. "
              "Expected an array of " "boost::shared_ptr< CashFlow >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of CashFlows_duration. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
      }
    }
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CashFlows_duration" "', argument " "2"" of type '" "Rate""'");
    } 
    arg2 = static_cast< Rate >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CashFlows_duration" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_duration" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CashFlows_duration" "', argument " "4"" of type '" "Compounding""'");
    } 
    arg4 = static_cast< Compounding >(val4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CashFlows_duration" "', argument " "5"" of type '" "Frequency""'");
    } 
    arg5 = static_cast< Frequency >(val5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "CashFlows_duration" "', argument " "6"" of type '" "Duration::Type""'");
    } 
    arg6 = static_cast< Duration::Type >(val6);
    ecode7 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "CashFlows_duration" "', argument " "7"" of type '" "bool""'");
    } 
    arg7 = static_cast< bool >(val7);
    {
      res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res8)) {
        SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "CashFlows_duration" "', argument " "8"" of type '" "Date""'"); 
      }  
      if (!argp8) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_duration" "', argument " "8"" of type '" "Date""'");
      } else {
        arg8 = *(reinterpret_cast< Date * >(argp8));
      }
    }
    {
      try {
        result = (Time)CashFlows::duration((std::vector< boost::shared_ptr< CashFlow > > const &)*arg1,arg2,(DayCounter const &)*arg3,arg4,arg5,arg6,arg7,arg8);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CashFlows_duration__SWIG_4) {
  {
    Leg *arg1 = 0 ;
    Rate arg2 ;
    DayCounter *arg3 = 0 ;
    Compounding arg4 ;
    Frequency arg5 ;
    Duration::Type arg6 ;
    bool arg7 ;
    std::vector< boost::shared_ptr< CashFlow > > temp1 ;
    std::vector< boost::shared_ptr< CashFlow > > *v1 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    bool val7 ;
    int ecode7 = 0 ;
    int argvi = 0;
    Time result;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: CashFlows_duration(Leg const &,yield,dayCounter,compounding,frequency,type,includeSettlementDateFlows);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of CashFlows_duration. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CashFlow >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "CashFlows_duration. "
              "Expected an array of " "boost::shared_ptr< CashFlow >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of CashFlows_duration. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
      }
    }
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CashFlows_duration" "', argument " "2"" of type '" "Rate""'");
    } 
    arg2 = static_cast< Rate >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CashFlows_duration" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_duration" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CashFlows_duration" "', argument " "4"" of type '" "Compounding""'");
    } 
    arg4 = static_cast< Compounding >(val4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CashFlows_duration" "', argument " "5"" of type '" "Frequency""'");
    } 
    arg5 = static_cast< Frequency >(val5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "CashFlows_duration" "', argument " "6"" of type '" "Duration::Type""'");
    } 
    arg6 = static_cast< Duration::Type >(val6);
    ecode7 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "CashFlows_duration" "', argument " "7"" of type '" "bool""'");
    } 
    arg7 = static_cast< bool >(val7);
    {
      try {
        result = (Time)CashFlows::duration((std::vector< boost::shared_ptr< CashFlow > > const &)*arg1,arg2,(DayCounter const &)*arg3,arg4,arg5,arg6,arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CashFlows_duration) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< CashFlow > >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< CashFlow >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_InterestRate, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< CashFlow > >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< CashFlow >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_InterestRate, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< CashFlow > >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< CashFlow >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 8) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< CashFlow > >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< CashFlow >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 9) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< CashFlow > >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< CashFlow >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CashFlows_duration__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CashFlows_duration__SWIG_0); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CashFlows_duration__SWIG_4); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CashFlows_duration__SWIG_3); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CashFlows_duration__SWIG_2); return;
    }
  }
  
  croak("No matching function for overloaded 'CashFlows_duration'");
  XSRETURN(0);
}


XS(_wrap_CashFlows_convexity__SWIG_0) {
  {
    Leg *arg1 = 0 ;
    InterestRate *arg2 = 0 ;
    bool arg3 ;
    Date arg4 ;
    Date arg5 ;
    std::vector< boost::shared_ptr< CashFlow > > temp1 ;
    std::vector< boost::shared_ptr< CashFlow > > *v1 ;
    void *argp2 ;
    int res2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: CashFlows_convexity(Leg const &,InterestRate const &,includeSettlementDateFlows,settlementDate,npvDate);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of CashFlows_convexity. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CashFlow >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "CashFlows_convexity. "
              "Expected an array of " "boost::shared_ptr< CashFlow >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of CashFlows_convexity. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
      }
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_InterestRate,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CashFlows_convexity" "', argument " "2"" of type '" "InterestRate const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_convexity" "', argument " "2"" of type '" "InterestRate const &""'"); 
    }
    arg2 = reinterpret_cast< InterestRate * >(argp2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CashFlows_convexity" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res4)) {
        SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "CashFlows_convexity" "', argument " "4"" of type '" "Date""'"); 
      }  
      if (!argp4) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_convexity" "', argument " "4"" of type '" "Date""'");
      } else {
        arg4 = *(reinterpret_cast< Date * >(argp4));
      }
    }
    {
      res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res5)) {
        SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "CashFlows_convexity" "', argument " "5"" of type '" "Date""'"); 
      }  
      if (!argp5) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_convexity" "', argument " "5"" of type '" "Date""'");
      } else {
        arg5 = *(reinterpret_cast< Date * >(argp5));
      }
    }
    {
      try {
        result = (Real)CashFlows::convexity((std::vector< boost::shared_ptr< CashFlow > > const &)*arg1,(InterestRate const &)*arg2,arg3,arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CashFlows_convexity__SWIG_1) {
  {
    Leg *arg1 = 0 ;
    InterestRate *arg2 = 0 ;
    bool arg3 ;
    Date arg4 ;
    std::vector< boost::shared_ptr< CashFlow > > temp1 ;
    std::vector< boost::shared_ptr< CashFlow > > *v1 ;
    void *argp2 ;
    int res2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: CashFlows_convexity(Leg const &,InterestRate const &,includeSettlementDateFlows,settlementDate);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of CashFlows_convexity. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CashFlow >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "CashFlows_convexity. "
              "Expected an array of " "boost::shared_ptr< CashFlow >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of CashFlows_convexity. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
      }
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_InterestRate,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CashFlows_convexity" "', argument " "2"" of type '" "InterestRate const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_convexity" "', argument " "2"" of type '" "InterestRate const &""'"); 
    }
    arg2 = reinterpret_cast< InterestRate * >(argp2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CashFlows_convexity" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res4)) {
        SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "CashFlows_convexity" "', argument " "4"" of type '" "Date""'"); 
      }  
      if (!argp4) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_convexity" "', argument " "4"" of type '" "Date""'");
      } else {
        arg4 = *(reinterpret_cast< Date * >(argp4));
      }
    }
    {
      try {
        result = (Real)CashFlows::convexity((std::vector< boost::shared_ptr< CashFlow > > const &)*arg1,(InterestRate const &)*arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CashFlows_convexity__SWIG_2) {
  {
    Leg *arg1 = 0 ;
    InterestRate *arg2 = 0 ;
    bool arg3 ;
    std::vector< boost::shared_ptr< CashFlow > > temp1 ;
    std::vector< boost::shared_ptr< CashFlow > > *v1 ;
    void *argp2 ;
    int res2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: CashFlows_convexity(Leg const &,InterestRate const &,includeSettlementDateFlows);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of CashFlows_convexity. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CashFlow >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "CashFlows_convexity. "
              "Expected an array of " "boost::shared_ptr< CashFlow >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of CashFlows_convexity. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
      }
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_InterestRate,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CashFlows_convexity" "', argument " "2"" of type '" "InterestRate const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_convexity" "', argument " "2"" of type '" "InterestRate const &""'"); 
    }
    arg2 = reinterpret_cast< InterestRate * >(argp2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CashFlows_convexity" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (Real)CashFlows::convexity((std::vector< boost::shared_ptr< CashFlow > > const &)*arg1,(InterestRate const &)*arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CashFlows_convexity__SWIG_3) {
  {
    Leg *arg1 = 0 ;
    Rate arg2 ;
    DayCounter *arg3 = 0 ;
    Compounding arg4 ;
    Frequency arg5 ;
    bool arg6 ;
    Date arg7 ;
    Date arg8 ;
    std::vector< boost::shared_ptr< CashFlow > > temp1 ;
    std::vector< boost::shared_ptr< CashFlow > > *v1 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    bool val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 8) || (items > 8)) {
      SWIG_croak("Usage: CashFlows_convexity(Leg const &,yield,dayCounter,compounding,frequency,includeSettlementDateFlows,settlementDate,npvDate);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of CashFlows_convexity. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CashFlow >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "CashFlows_convexity. "
              "Expected an array of " "boost::shared_ptr< CashFlow >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of CashFlows_convexity. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
      }
    }
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CashFlows_convexity" "', argument " "2"" of type '" "Rate""'");
    } 
    arg2 = static_cast< Rate >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CashFlows_convexity" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_convexity" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CashFlows_convexity" "', argument " "4"" of type '" "Compounding""'");
    } 
    arg4 = static_cast< Compounding >(val4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CashFlows_convexity" "', argument " "5"" of type '" "Frequency""'");
    } 
    arg5 = static_cast< Frequency >(val5);
    ecode6 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "CashFlows_convexity" "', argument " "6"" of type '" "bool""'");
    } 
    arg6 = static_cast< bool >(val6);
    {
      res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res7)) {
        SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "CashFlows_convexity" "', argument " "7"" of type '" "Date""'"); 
      }  
      if (!argp7) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_convexity" "', argument " "7"" of type '" "Date""'");
      } else {
        arg7 = *(reinterpret_cast< Date * >(argp7));
      }
    }
    {
      res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res8)) {
        SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "CashFlows_convexity" "', argument " "8"" of type '" "Date""'"); 
      }  
      if (!argp8) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_convexity" "', argument " "8"" of type '" "Date""'");
      } else {
        arg8 = *(reinterpret_cast< Date * >(argp8));
      }
    }
    {
      try {
        result = (Real)CashFlows::convexity((std::vector< boost::shared_ptr< CashFlow > > const &)*arg1,arg2,(DayCounter const &)*arg3,arg4,arg5,arg6,arg7,arg8);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CashFlows_convexity__SWIG_4) {
  {
    Leg *arg1 = 0 ;
    Rate arg2 ;
    DayCounter *arg3 = 0 ;
    Compounding arg4 ;
    Frequency arg5 ;
    bool arg6 ;
    Date arg7 ;
    std::vector< boost::shared_ptr< CashFlow > > temp1 ;
    std::vector< boost::shared_ptr< CashFlow > > *v1 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    bool val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: CashFlows_convexity(Leg const &,yield,dayCounter,compounding,frequency,includeSettlementDateFlows,settlementDate);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of CashFlows_convexity. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CashFlow >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "CashFlows_convexity. "
              "Expected an array of " "boost::shared_ptr< CashFlow >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of CashFlows_convexity. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
      }
    }
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CashFlows_convexity" "', argument " "2"" of type '" "Rate""'");
    } 
    arg2 = static_cast< Rate >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CashFlows_convexity" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_convexity" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CashFlows_convexity" "', argument " "4"" of type '" "Compounding""'");
    } 
    arg4 = static_cast< Compounding >(val4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CashFlows_convexity" "', argument " "5"" of type '" "Frequency""'");
    } 
    arg5 = static_cast< Frequency >(val5);
    ecode6 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "CashFlows_convexity" "', argument " "6"" of type '" "bool""'");
    } 
    arg6 = static_cast< bool >(val6);
    {
      res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res7)) {
        SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "CashFlows_convexity" "', argument " "7"" of type '" "Date""'"); 
      }  
      if (!argp7) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_convexity" "', argument " "7"" of type '" "Date""'");
      } else {
        arg7 = *(reinterpret_cast< Date * >(argp7));
      }
    }
    {
      try {
        result = (Real)CashFlows::convexity((std::vector< boost::shared_ptr< CashFlow > > const &)*arg1,arg2,(DayCounter const &)*arg3,arg4,arg5,arg6,arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CashFlows_convexity__SWIG_5) {
  {
    Leg *arg1 = 0 ;
    Rate arg2 ;
    DayCounter *arg3 = 0 ;
    Compounding arg4 ;
    Frequency arg5 ;
    bool arg6 ;
    std::vector< boost::shared_ptr< CashFlow > > temp1 ;
    std::vector< boost::shared_ptr< CashFlow > > *v1 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    bool val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: CashFlows_convexity(Leg const &,yield,dayCounter,compounding,frequency,includeSettlementDateFlows);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of CashFlows_convexity. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CashFlow >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "CashFlows_convexity. "
              "Expected an array of " "boost::shared_ptr< CashFlow >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of CashFlows_convexity. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
      }
    }
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CashFlows_convexity" "', argument " "2"" of type '" "Rate""'");
    } 
    arg2 = static_cast< Rate >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CashFlows_convexity" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_convexity" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CashFlows_convexity" "', argument " "4"" of type '" "Compounding""'");
    } 
    arg4 = static_cast< Compounding >(val4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CashFlows_convexity" "', argument " "5"" of type '" "Frequency""'");
    } 
    arg5 = static_cast< Frequency >(val5);
    ecode6 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "CashFlows_convexity" "', argument " "6"" of type '" "bool""'");
    } 
    arg6 = static_cast< bool >(val6);
    {
      try {
        result = (Real)CashFlows::convexity((std::vector< boost::shared_ptr< CashFlow > > const &)*arg1,arg2,(DayCounter const &)*arg3,arg4,arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CashFlows_convexity) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< CashFlow > >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< CashFlow >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_InterestRate, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< CashFlow > >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< CashFlow >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_InterestRate, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< CashFlow > >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< CashFlow >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_InterestRate, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< CashFlow > >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< CashFlow >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< CashFlow > >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< CashFlow >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 8) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< CashFlow > >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< CashFlow >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CashFlows_convexity__SWIG_2); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CashFlows_convexity__SWIG_1); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CashFlows_convexity__SWIG_0); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CashFlows_convexity__SWIG_5); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CashFlows_convexity__SWIG_4); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CashFlows_convexity__SWIG_3); return;
    }
  }
  
  croak("No matching function for overloaded 'CashFlows_convexity'");
  XSRETURN(0);
}


XS(_wrap_CashFlows_basisPointValue__SWIG_0) {
  {
    Leg *arg1 = 0 ;
    InterestRate *arg2 = 0 ;
    bool arg3 ;
    Date arg4 ;
    Date arg5 ;
    std::vector< boost::shared_ptr< CashFlow > > temp1 ;
    std::vector< boost::shared_ptr< CashFlow > > *v1 ;
    void *argp2 ;
    int res2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: CashFlows_basisPointValue(leg,yield,includeSettlementDateFlows,settlementDate,npvDate);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of CashFlows_basisPointValue. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CashFlow >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "CashFlows_basisPointValue. "
              "Expected an array of " "boost::shared_ptr< CashFlow >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of CashFlows_basisPointValue. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
      }
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_InterestRate,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CashFlows_basisPointValue" "', argument " "2"" of type '" "InterestRate const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_basisPointValue" "', argument " "2"" of type '" "InterestRate const &""'"); 
    }
    arg2 = reinterpret_cast< InterestRate * >(argp2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CashFlows_basisPointValue" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res4)) {
        SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "CashFlows_basisPointValue" "', argument " "4"" of type '" "Date""'"); 
      }  
      if (!argp4) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_basisPointValue" "', argument " "4"" of type '" "Date""'");
      } else {
        arg4 = *(reinterpret_cast< Date * >(argp4));
      }
    }
    {
      res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res5)) {
        SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "CashFlows_basisPointValue" "', argument " "5"" of type '" "Date""'"); 
      }  
      if (!argp5) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_basisPointValue" "', argument " "5"" of type '" "Date""'");
      } else {
        arg5 = *(reinterpret_cast< Date * >(argp5));
      }
    }
    {
      try {
        result = (Real)CashFlows::basisPointValue((std::vector< boost::shared_ptr< CashFlow > > const &)*arg1,(InterestRate const &)*arg2,arg3,arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CashFlows_basisPointValue__SWIG_1) {
  {
    Leg *arg1 = 0 ;
    InterestRate *arg2 = 0 ;
    bool arg3 ;
    Date arg4 ;
    std::vector< boost::shared_ptr< CashFlow > > temp1 ;
    std::vector< boost::shared_ptr< CashFlow > > *v1 ;
    void *argp2 ;
    int res2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: CashFlows_basisPointValue(leg,yield,includeSettlementDateFlows,settlementDate);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of CashFlows_basisPointValue. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CashFlow >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "CashFlows_basisPointValue. "
              "Expected an array of " "boost::shared_ptr< CashFlow >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of CashFlows_basisPointValue. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
      }
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_InterestRate,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CashFlows_basisPointValue" "', argument " "2"" of type '" "InterestRate const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_basisPointValue" "', argument " "2"" of type '" "InterestRate const &""'"); 
    }
    arg2 = reinterpret_cast< InterestRate * >(argp2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CashFlows_basisPointValue" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res4)) {
        SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "CashFlows_basisPointValue" "', argument " "4"" of type '" "Date""'"); 
      }  
      if (!argp4) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_basisPointValue" "', argument " "4"" of type '" "Date""'");
      } else {
        arg4 = *(reinterpret_cast< Date * >(argp4));
      }
    }
    {
      try {
        result = (Real)CashFlows::basisPointValue((std::vector< boost::shared_ptr< CashFlow > > const &)*arg1,(InterestRate const &)*arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CashFlows_basisPointValue__SWIG_2) {
  {
    Leg *arg1 = 0 ;
    InterestRate *arg2 = 0 ;
    bool arg3 ;
    std::vector< boost::shared_ptr< CashFlow > > temp1 ;
    std::vector< boost::shared_ptr< CashFlow > > *v1 ;
    void *argp2 ;
    int res2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: CashFlows_basisPointValue(leg,yield,includeSettlementDateFlows);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of CashFlows_basisPointValue. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CashFlow >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "CashFlows_basisPointValue. "
              "Expected an array of " "boost::shared_ptr< CashFlow >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of CashFlows_basisPointValue. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
      }
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_InterestRate,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CashFlows_basisPointValue" "', argument " "2"" of type '" "InterestRate const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_basisPointValue" "', argument " "2"" of type '" "InterestRate const &""'"); 
    }
    arg2 = reinterpret_cast< InterestRate * >(argp2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CashFlows_basisPointValue" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (Real)CashFlows::basisPointValue((std::vector< boost::shared_ptr< CashFlow > > const &)*arg1,(InterestRate const &)*arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CashFlows_basisPointValue__SWIG_3) {
  {
    Leg *arg1 = 0 ;
    Rate arg2 ;
    DayCounter *arg3 = 0 ;
    Compounding arg4 ;
    Frequency arg5 ;
    bool arg6 ;
    Date arg7 ;
    Date arg8 ;
    std::vector< boost::shared_ptr< CashFlow > > temp1 ;
    std::vector< boost::shared_ptr< CashFlow > > *v1 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    bool val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 8) || (items > 8)) {
      SWIG_croak("Usage: CashFlows_basisPointValue(leg,yield,dayCounter,compounding,frequency,includeSettlementDateFlows,settlementDate,npvDate);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of CashFlows_basisPointValue. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CashFlow >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "CashFlows_basisPointValue. "
              "Expected an array of " "boost::shared_ptr< CashFlow >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of CashFlows_basisPointValue. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
      }
    }
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CashFlows_basisPointValue" "', argument " "2"" of type '" "Rate""'");
    } 
    arg2 = static_cast< Rate >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CashFlows_basisPointValue" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_basisPointValue" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CashFlows_basisPointValue" "', argument " "4"" of type '" "Compounding""'");
    } 
    arg4 = static_cast< Compounding >(val4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CashFlows_basisPointValue" "', argument " "5"" of type '" "Frequency""'");
    } 
    arg5 = static_cast< Frequency >(val5);
    ecode6 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "CashFlows_basisPointValue" "', argument " "6"" of type '" "bool""'");
    } 
    arg6 = static_cast< bool >(val6);
    {
      res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res7)) {
        SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "CashFlows_basisPointValue" "', argument " "7"" of type '" "Date""'"); 
      }  
      if (!argp7) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_basisPointValue" "', argument " "7"" of type '" "Date""'");
      } else {
        arg7 = *(reinterpret_cast< Date * >(argp7));
      }
    }
    {
      res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res8)) {
        SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "CashFlows_basisPointValue" "', argument " "8"" of type '" "Date""'"); 
      }  
      if (!argp8) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_basisPointValue" "', argument " "8"" of type '" "Date""'");
      } else {
        arg8 = *(reinterpret_cast< Date * >(argp8));
      }
    }
    {
      try {
        result = (Real)CashFlows::basisPointValue((std::vector< boost::shared_ptr< CashFlow > > const &)*arg1,arg2,(DayCounter const &)*arg3,arg4,arg5,arg6,arg7,arg8);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CashFlows_basisPointValue__SWIG_4) {
  {
    Leg *arg1 = 0 ;
    Rate arg2 ;
    DayCounter *arg3 = 0 ;
    Compounding arg4 ;
    Frequency arg5 ;
    bool arg6 ;
    Date arg7 ;
    std::vector< boost::shared_ptr< CashFlow > > temp1 ;
    std::vector< boost::shared_ptr< CashFlow > > *v1 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    bool val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: CashFlows_basisPointValue(leg,yield,dayCounter,compounding,frequency,includeSettlementDateFlows,settlementDate);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of CashFlows_basisPointValue. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CashFlow >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "CashFlows_basisPointValue. "
              "Expected an array of " "boost::shared_ptr< CashFlow >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of CashFlows_basisPointValue. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
      }
    }
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CashFlows_basisPointValue" "', argument " "2"" of type '" "Rate""'");
    } 
    arg2 = static_cast< Rate >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CashFlows_basisPointValue" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_basisPointValue" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CashFlows_basisPointValue" "', argument " "4"" of type '" "Compounding""'");
    } 
    arg4 = static_cast< Compounding >(val4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CashFlows_basisPointValue" "', argument " "5"" of type '" "Frequency""'");
    } 
    arg5 = static_cast< Frequency >(val5);
    ecode6 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "CashFlows_basisPointValue" "', argument " "6"" of type '" "bool""'");
    } 
    arg6 = static_cast< bool >(val6);
    {
      res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res7)) {
        SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "CashFlows_basisPointValue" "', argument " "7"" of type '" "Date""'"); 
      }  
      if (!argp7) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_basisPointValue" "', argument " "7"" of type '" "Date""'");
      } else {
        arg7 = *(reinterpret_cast< Date * >(argp7));
      }
    }
    {
      try {
        result = (Real)CashFlows::basisPointValue((std::vector< boost::shared_ptr< CashFlow > > const &)*arg1,arg2,(DayCounter const &)*arg3,arg4,arg5,arg6,arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CashFlows_basisPointValue__SWIG_5) {
  {
    Leg *arg1 = 0 ;
    Rate arg2 ;
    DayCounter *arg3 = 0 ;
    Compounding arg4 ;
    Frequency arg5 ;
    bool arg6 ;
    std::vector< boost::shared_ptr< CashFlow > > temp1 ;
    std::vector< boost::shared_ptr< CashFlow > > *v1 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    bool val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: CashFlows_basisPointValue(leg,yield,dayCounter,compounding,frequency,includeSettlementDateFlows);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of CashFlows_basisPointValue. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CashFlow >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "CashFlows_basisPointValue. "
              "Expected an array of " "boost::shared_ptr< CashFlow >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of CashFlows_basisPointValue. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
      }
    }
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CashFlows_basisPointValue" "', argument " "2"" of type '" "Rate""'");
    } 
    arg2 = static_cast< Rate >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CashFlows_basisPointValue" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_basisPointValue" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CashFlows_basisPointValue" "', argument " "4"" of type '" "Compounding""'");
    } 
    arg4 = static_cast< Compounding >(val4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CashFlows_basisPointValue" "', argument " "5"" of type '" "Frequency""'");
    } 
    arg5 = static_cast< Frequency >(val5);
    ecode6 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "CashFlows_basisPointValue" "', argument " "6"" of type '" "bool""'");
    } 
    arg6 = static_cast< bool >(val6);
    {
      try {
        result = (Real)CashFlows::basisPointValue((std::vector< boost::shared_ptr< CashFlow > > const &)*arg1,arg2,(DayCounter const &)*arg3,arg4,arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CashFlows_basisPointValue) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< CashFlow > >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< CashFlow >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_InterestRate, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< CashFlow > >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< CashFlow >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_InterestRate, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< CashFlow > >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< CashFlow >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_InterestRate, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< CashFlow > >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< CashFlow >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< CashFlow > >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< CashFlow >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 8) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< CashFlow > >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< CashFlow >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CashFlows_basisPointValue__SWIG_2); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CashFlows_basisPointValue__SWIG_1); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CashFlows_basisPointValue__SWIG_0); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CashFlows_basisPointValue__SWIG_5); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CashFlows_basisPointValue__SWIG_4); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CashFlows_basisPointValue__SWIG_3); return;
    }
  }
  
  croak("No matching function for overloaded 'CashFlows_basisPointValue'");
  XSRETURN(0);
}


XS(_wrap_CashFlows_zSpread__SWIG_0) {
  {
    Leg *arg1 = 0 ;
    Real arg2 ;
    boost::shared_ptr< YieldTermStructure > *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    Compounding arg5 ;
    Frequency arg6 ;
    bool arg7 ;
    Date arg8 ;
    Date arg9 ;
    Real arg10 ;
    Size arg11 ;
    Rate arg12 ;
    std::vector< boost::shared_ptr< CashFlow > > temp1 ;
    std::vector< boost::shared_ptr< CashFlow > > *v1 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    bool val7 ;
    int ecode7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    double val10 ;
    int ecode10 = 0 ;
    size_t val11 ;
    int ecode11 = 0 ;
    double val12 ;
    int ecode12 = 0 ;
    int argvi = 0;
    Spread result;
    dXSARGS;
    
    if ((items < 12) || (items > 12)) {
      SWIG_croak("Usage: CashFlows_zSpread(leg,npv,boost::shared_ptr< YieldTermStructure > const &,dayCounter,compounding,frequency,includeSettlementDateFlows,settlementDate,npvDate,accuracy,maxIterations,guess);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of CashFlows_zSpread. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CashFlow >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "CashFlows_zSpread. "
              "Expected an array of " "boost::shared_ptr< CashFlow >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of CashFlows_zSpread. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
      }
    }
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CashFlows_zSpread" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CashFlows_zSpread" "', argument " "3"" of type '" "boost::shared_ptr< YieldTermStructure > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_zSpread" "', argument " "3"" of type '" "boost::shared_ptr< YieldTermStructure > const &""'"); 
    }
    arg3 = reinterpret_cast< boost::shared_ptr< YieldTermStructure > * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "CashFlows_zSpread" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_zSpread" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CashFlows_zSpread" "', argument " "5"" of type '" "Compounding""'");
    } 
    arg5 = static_cast< Compounding >(val5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "CashFlows_zSpread" "', argument " "6"" of type '" "Frequency""'");
    } 
    arg6 = static_cast< Frequency >(val6);
    ecode7 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "CashFlows_zSpread" "', argument " "7"" of type '" "bool""'");
    } 
    arg7 = static_cast< bool >(val7);
    {
      res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res8)) {
        SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "CashFlows_zSpread" "', argument " "8"" of type '" "Date""'"); 
      }  
      if (!argp8) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_zSpread" "', argument " "8"" of type '" "Date""'");
      } else {
        arg8 = *(reinterpret_cast< Date * >(argp8));
      }
    }
    {
      res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res9)) {
        SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "CashFlows_zSpread" "', argument " "9"" of type '" "Date""'"); 
      }  
      if (!argp9) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_zSpread" "', argument " "9"" of type '" "Date""'");
      } else {
        arg9 = *(reinterpret_cast< Date * >(argp9));
      }
    }
    ecode10 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), &val10);
    if (!SWIG_IsOK(ecode10)) {
      SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "CashFlows_zSpread" "', argument " "10"" of type '" "Real""'");
    } 
    arg10 = static_cast< Real >(val10);
    ecode11 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(10), &val11);
    if (!SWIG_IsOK(ecode11)) {
      SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "CashFlows_zSpread" "', argument " "11"" of type '" "Size""'");
    } 
    arg11 = static_cast< Size >(val11);
    ecode12 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(11), &val12);
    if (!SWIG_IsOK(ecode12)) {
      SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "CashFlows_zSpread" "', argument " "12"" of type '" "Rate""'");
    } 
    arg12 = static_cast< Rate >(val12);
    {
      try {
        result = (Spread)CashFlows::zSpread((std::vector< boost::shared_ptr< CashFlow > > const &)*arg1,arg2,(boost::shared_ptr< YieldTermStructure > const &)*arg3,(DayCounter const &)*arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CashFlows_zSpread__SWIG_1) {
  {
    Leg *arg1 = 0 ;
    Real arg2 ;
    boost::shared_ptr< YieldTermStructure > *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    Compounding arg5 ;
    Frequency arg6 ;
    bool arg7 ;
    Date arg8 ;
    Date arg9 ;
    Real arg10 ;
    Size arg11 ;
    std::vector< boost::shared_ptr< CashFlow > > temp1 ;
    std::vector< boost::shared_ptr< CashFlow > > *v1 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    bool val7 ;
    int ecode7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    double val10 ;
    int ecode10 = 0 ;
    size_t val11 ;
    int ecode11 = 0 ;
    int argvi = 0;
    Spread result;
    dXSARGS;
    
    if ((items < 11) || (items > 11)) {
      SWIG_croak("Usage: CashFlows_zSpread(leg,npv,boost::shared_ptr< YieldTermStructure > const &,dayCounter,compounding,frequency,includeSettlementDateFlows,settlementDate,npvDate,accuracy,maxIterations);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of CashFlows_zSpread. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CashFlow >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "CashFlows_zSpread. "
              "Expected an array of " "boost::shared_ptr< CashFlow >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of CashFlows_zSpread. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
      }
    }
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CashFlows_zSpread" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CashFlows_zSpread" "', argument " "3"" of type '" "boost::shared_ptr< YieldTermStructure > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_zSpread" "', argument " "3"" of type '" "boost::shared_ptr< YieldTermStructure > const &""'"); 
    }
    arg3 = reinterpret_cast< boost::shared_ptr< YieldTermStructure > * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "CashFlows_zSpread" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_zSpread" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CashFlows_zSpread" "', argument " "5"" of type '" "Compounding""'");
    } 
    arg5 = static_cast< Compounding >(val5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "CashFlows_zSpread" "', argument " "6"" of type '" "Frequency""'");
    } 
    arg6 = static_cast< Frequency >(val6);
    ecode7 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "CashFlows_zSpread" "', argument " "7"" of type '" "bool""'");
    } 
    arg7 = static_cast< bool >(val7);
    {
      res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res8)) {
        SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "CashFlows_zSpread" "', argument " "8"" of type '" "Date""'"); 
      }  
      if (!argp8) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_zSpread" "', argument " "8"" of type '" "Date""'");
      } else {
        arg8 = *(reinterpret_cast< Date * >(argp8));
      }
    }
    {
      res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res9)) {
        SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "CashFlows_zSpread" "', argument " "9"" of type '" "Date""'"); 
      }  
      if (!argp9) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_zSpread" "', argument " "9"" of type '" "Date""'");
      } else {
        arg9 = *(reinterpret_cast< Date * >(argp9));
      }
    }
    ecode10 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), &val10);
    if (!SWIG_IsOK(ecode10)) {
      SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "CashFlows_zSpread" "', argument " "10"" of type '" "Real""'");
    } 
    arg10 = static_cast< Real >(val10);
    ecode11 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(10), &val11);
    if (!SWIG_IsOK(ecode11)) {
      SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "CashFlows_zSpread" "', argument " "11"" of type '" "Size""'");
    } 
    arg11 = static_cast< Size >(val11);
    {
      try {
        result = (Spread)CashFlows::zSpread((std::vector< boost::shared_ptr< CashFlow > > const &)*arg1,arg2,(boost::shared_ptr< YieldTermStructure > const &)*arg3,(DayCounter const &)*arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CashFlows_zSpread__SWIG_2) {
  {
    Leg *arg1 = 0 ;
    Real arg2 ;
    boost::shared_ptr< YieldTermStructure > *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    Compounding arg5 ;
    Frequency arg6 ;
    bool arg7 ;
    Date arg8 ;
    Date arg9 ;
    Real arg10 ;
    std::vector< boost::shared_ptr< CashFlow > > temp1 ;
    std::vector< boost::shared_ptr< CashFlow > > *v1 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    bool val7 ;
    int ecode7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    double val10 ;
    int ecode10 = 0 ;
    int argvi = 0;
    Spread result;
    dXSARGS;
    
    if ((items < 10) || (items > 10)) {
      SWIG_croak("Usage: CashFlows_zSpread(leg,npv,boost::shared_ptr< YieldTermStructure > const &,dayCounter,compounding,frequency,includeSettlementDateFlows,settlementDate,npvDate,accuracy);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of CashFlows_zSpread. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CashFlow >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "CashFlows_zSpread. "
              "Expected an array of " "boost::shared_ptr< CashFlow >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of CashFlows_zSpread. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
      }
    }
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CashFlows_zSpread" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CashFlows_zSpread" "', argument " "3"" of type '" "boost::shared_ptr< YieldTermStructure > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_zSpread" "', argument " "3"" of type '" "boost::shared_ptr< YieldTermStructure > const &""'"); 
    }
    arg3 = reinterpret_cast< boost::shared_ptr< YieldTermStructure > * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "CashFlows_zSpread" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_zSpread" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CashFlows_zSpread" "', argument " "5"" of type '" "Compounding""'");
    } 
    arg5 = static_cast< Compounding >(val5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "CashFlows_zSpread" "', argument " "6"" of type '" "Frequency""'");
    } 
    arg6 = static_cast< Frequency >(val6);
    ecode7 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "CashFlows_zSpread" "', argument " "7"" of type '" "bool""'");
    } 
    arg7 = static_cast< bool >(val7);
    {
      res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res8)) {
        SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "CashFlows_zSpread" "', argument " "8"" of type '" "Date""'"); 
      }  
      if (!argp8) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_zSpread" "', argument " "8"" of type '" "Date""'");
      } else {
        arg8 = *(reinterpret_cast< Date * >(argp8));
      }
    }
    {
      res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res9)) {
        SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "CashFlows_zSpread" "', argument " "9"" of type '" "Date""'"); 
      }  
      if (!argp9) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_zSpread" "', argument " "9"" of type '" "Date""'");
      } else {
        arg9 = *(reinterpret_cast< Date * >(argp9));
      }
    }
    ecode10 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), &val10);
    if (!SWIG_IsOK(ecode10)) {
      SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "CashFlows_zSpread" "', argument " "10"" of type '" "Real""'");
    } 
    arg10 = static_cast< Real >(val10);
    {
      try {
        result = (Spread)CashFlows::zSpread((std::vector< boost::shared_ptr< CashFlow > > const &)*arg1,arg2,(boost::shared_ptr< YieldTermStructure > const &)*arg3,(DayCounter const &)*arg4,arg5,arg6,arg7,arg8,arg9,arg10);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CashFlows_zSpread__SWIG_3) {
  {
    Leg *arg1 = 0 ;
    Real arg2 ;
    boost::shared_ptr< YieldTermStructure > *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    Compounding arg5 ;
    Frequency arg6 ;
    bool arg7 ;
    Date arg8 ;
    Date arg9 ;
    std::vector< boost::shared_ptr< CashFlow > > temp1 ;
    std::vector< boost::shared_ptr< CashFlow > > *v1 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    bool val7 ;
    int ecode7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    int argvi = 0;
    Spread result;
    dXSARGS;
    
    if ((items < 9) || (items > 9)) {
      SWIG_croak("Usage: CashFlows_zSpread(leg,npv,boost::shared_ptr< YieldTermStructure > const &,dayCounter,compounding,frequency,includeSettlementDateFlows,settlementDate,npvDate);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of CashFlows_zSpread. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CashFlow >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "CashFlows_zSpread. "
              "Expected an array of " "boost::shared_ptr< CashFlow >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of CashFlows_zSpread. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
      }
    }
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CashFlows_zSpread" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CashFlows_zSpread" "', argument " "3"" of type '" "boost::shared_ptr< YieldTermStructure > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_zSpread" "', argument " "3"" of type '" "boost::shared_ptr< YieldTermStructure > const &""'"); 
    }
    arg3 = reinterpret_cast< boost::shared_ptr< YieldTermStructure > * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "CashFlows_zSpread" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_zSpread" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CashFlows_zSpread" "', argument " "5"" of type '" "Compounding""'");
    } 
    arg5 = static_cast< Compounding >(val5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "CashFlows_zSpread" "', argument " "6"" of type '" "Frequency""'");
    } 
    arg6 = static_cast< Frequency >(val6);
    ecode7 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "CashFlows_zSpread" "', argument " "7"" of type '" "bool""'");
    } 
    arg7 = static_cast< bool >(val7);
    {
      res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res8)) {
        SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "CashFlows_zSpread" "', argument " "8"" of type '" "Date""'"); 
      }  
      if (!argp8) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_zSpread" "', argument " "8"" of type '" "Date""'");
      } else {
        arg8 = *(reinterpret_cast< Date * >(argp8));
      }
    }
    {
      res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res9)) {
        SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "CashFlows_zSpread" "', argument " "9"" of type '" "Date""'"); 
      }  
      if (!argp9) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_zSpread" "', argument " "9"" of type '" "Date""'");
      } else {
        arg9 = *(reinterpret_cast< Date * >(argp9));
      }
    }
    {
      try {
        result = (Spread)CashFlows::zSpread((std::vector< boost::shared_ptr< CashFlow > > const &)*arg1,arg2,(boost::shared_ptr< YieldTermStructure > const &)*arg3,(DayCounter const &)*arg4,arg5,arg6,arg7,arg8,arg9);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CashFlows_zSpread__SWIG_4) {
  {
    Leg *arg1 = 0 ;
    Real arg2 ;
    boost::shared_ptr< YieldTermStructure > *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    Compounding arg5 ;
    Frequency arg6 ;
    bool arg7 ;
    Date arg8 ;
    std::vector< boost::shared_ptr< CashFlow > > temp1 ;
    std::vector< boost::shared_ptr< CashFlow > > *v1 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    bool val7 ;
    int ecode7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    int argvi = 0;
    Spread result;
    dXSARGS;
    
    if ((items < 8) || (items > 8)) {
      SWIG_croak("Usage: CashFlows_zSpread(leg,npv,boost::shared_ptr< YieldTermStructure > const &,dayCounter,compounding,frequency,includeSettlementDateFlows,settlementDate);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of CashFlows_zSpread. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CashFlow >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "CashFlows_zSpread. "
              "Expected an array of " "boost::shared_ptr< CashFlow >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of CashFlows_zSpread. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
      }
    }
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CashFlows_zSpread" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CashFlows_zSpread" "', argument " "3"" of type '" "boost::shared_ptr< YieldTermStructure > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_zSpread" "', argument " "3"" of type '" "boost::shared_ptr< YieldTermStructure > const &""'"); 
    }
    arg3 = reinterpret_cast< boost::shared_ptr< YieldTermStructure > * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "CashFlows_zSpread" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_zSpread" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CashFlows_zSpread" "', argument " "5"" of type '" "Compounding""'");
    } 
    arg5 = static_cast< Compounding >(val5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "CashFlows_zSpread" "', argument " "6"" of type '" "Frequency""'");
    } 
    arg6 = static_cast< Frequency >(val6);
    ecode7 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "CashFlows_zSpread" "', argument " "7"" of type '" "bool""'");
    } 
    arg7 = static_cast< bool >(val7);
    {
      res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res8)) {
        SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "CashFlows_zSpread" "', argument " "8"" of type '" "Date""'"); 
      }  
      if (!argp8) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_zSpread" "', argument " "8"" of type '" "Date""'");
      } else {
        arg8 = *(reinterpret_cast< Date * >(argp8));
      }
    }
    {
      try {
        result = (Spread)CashFlows::zSpread((std::vector< boost::shared_ptr< CashFlow > > const &)*arg1,arg2,(boost::shared_ptr< YieldTermStructure > const &)*arg3,(DayCounter const &)*arg4,arg5,arg6,arg7,arg8);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CashFlows_zSpread__SWIG_5) {
  {
    Leg *arg1 = 0 ;
    Real arg2 ;
    boost::shared_ptr< YieldTermStructure > *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    Compounding arg5 ;
    Frequency arg6 ;
    bool arg7 ;
    std::vector< boost::shared_ptr< CashFlow > > temp1 ;
    std::vector< boost::shared_ptr< CashFlow > > *v1 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    bool val7 ;
    int ecode7 = 0 ;
    int argvi = 0;
    Spread result;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: CashFlows_zSpread(leg,npv,boost::shared_ptr< YieldTermStructure > const &,dayCounter,compounding,frequency,includeSettlementDateFlows);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of CashFlows_zSpread. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CashFlow >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "CashFlows_zSpread. "
              "Expected an array of " "boost::shared_ptr< CashFlow >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of CashFlows_zSpread. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
      }
    }
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CashFlows_zSpread" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CashFlows_zSpread" "', argument " "3"" of type '" "boost::shared_ptr< YieldTermStructure > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_zSpread" "', argument " "3"" of type '" "boost::shared_ptr< YieldTermStructure > const &""'"); 
    }
    arg3 = reinterpret_cast< boost::shared_ptr< YieldTermStructure > * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "CashFlows_zSpread" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CashFlows_zSpread" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CashFlows_zSpread" "', argument " "5"" of type '" "Compounding""'");
    } 
    arg5 = static_cast< Compounding >(val5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "CashFlows_zSpread" "', argument " "6"" of type '" "Frequency""'");
    } 
    arg6 = static_cast< Frequency >(val6);
    ecode7 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "CashFlows_zSpread" "', argument " "7"" of type '" "bool""'");
    } 
    arg7 = static_cast< bool >(val7);
    {
      try {
        result = (Spread)CashFlows::zSpread((std::vector< boost::shared_ptr< CashFlow > > const &)*arg1,arg2,(boost::shared_ptr< YieldTermStructure > const &)*arg3,(DayCounter const &)*arg4,arg5,arg6,arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CashFlows_zSpread) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< CashFlow > >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< CashFlow >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 8) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< CashFlow > >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< CashFlow >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 9) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< CashFlow > >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< CashFlow >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 10) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< CashFlow > >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< CashFlow >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 11) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< CashFlow > >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< CashFlow >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(10), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 12) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< CashFlow > >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< CashFlow >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(10), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(11), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CashFlows_zSpread__SWIG_5); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CashFlows_zSpread__SWIG_4); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CashFlows_zSpread__SWIG_3); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CashFlows_zSpread__SWIG_2); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CashFlows_zSpread__SWIG_1); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CashFlows_zSpread__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'CashFlows_zSpread'");
  XSRETURN(0);
}


XS(_wrap_delete_CashFlows) {
  {
    CashFlows *arg1 = (CashFlows *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_CashFlows(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CashFlows, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CashFlows" "', argument " "1"" of type '" "CashFlows *""'"); 
    }
    arg1 = reinterpret_cast< CashFlows * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CalibrationHelper___deref__) {
  {
    boost::shared_ptr< CalibrationHelper > *arg1 = (boost::shared_ptr< CalibrationHelper > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    CalibrationHelper *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CalibrationHelper___deref__(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_CalibrationHelper_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CalibrationHelper___deref__" "', argument " "1"" of type '" "boost::shared_ptr< CalibrationHelper > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< CalibrationHelper > * >(argp1);
    {
      try {
        result = (CalibrationHelper *)(arg1)->operator ->();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CalibrationHelper, 0 | 0); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CalibrationHelper_isNull) {
  {
    boost::shared_ptr< CalibrationHelper > *arg1 = (boost::shared_ptr< CalibrationHelper > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CalibrationHelper_isNull(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_CalibrationHelper_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CalibrationHelper_isNull" "', argument " "1"" of type '" "boost::shared_ptr< CalibrationHelper > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< CalibrationHelper > * >(argp1);
    {
      try {
        result = (bool)boost_shared_ptr_Sl_CalibrationHelper_Sg__isNull(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CalibrationHelper_swaptionExpiryDate) {
  {
    boost::shared_ptr< CalibrationHelper > *arg1 = (boost::shared_ptr< CalibrationHelper > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CalibrationHelper_swaptionExpiryDate(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_CalibrationHelper_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CalibrationHelper_swaptionExpiryDate" "', argument " "1"" of type '" "boost::shared_ptr< CalibrationHelper > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< CalibrationHelper > * >(argp1);
    {
      try {
        result = boost_shared_ptr_Sl_CalibrationHelper_Sg__swaptionExpiryDate(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CalibrationHelper_swaptionStrike) {
  {
    boost::shared_ptr< CalibrationHelper > *arg1 = (boost::shared_ptr< CalibrationHelper > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CalibrationHelper_swaptionStrike(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_CalibrationHelper_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CalibrationHelper_swaptionStrike" "', argument " "1"" of type '" "boost::shared_ptr< CalibrationHelper > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< CalibrationHelper > * >(argp1);
    {
      try {
        result = (Real)boost_shared_ptr_Sl_CalibrationHelper_Sg__swaptionStrike(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CalibrationHelper_swaptionNominal) {
  {
    boost::shared_ptr< CalibrationHelper > *arg1 = (boost::shared_ptr< CalibrationHelper > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CalibrationHelper_swaptionNominal(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_CalibrationHelper_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CalibrationHelper_swaptionNominal" "', argument " "1"" of type '" "boost::shared_ptr< CalibrationHelper > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< CalibrationHelper > * >(argp1);
    {
      try {
        result = (Real)boost_shared_ptr_Sl_CalibrationHelper_Sg__swaptionNominal(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CalibrationHelper_swaptionMaturityDate) {
  {
    boost::shared_ptr< CalibrationHelper > *arg1 = (boost::shared_ptr< CalibrationHelper > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CalibrationHelper_swaptionMaturityDate(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_CalibrationHelper_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CalibrationHelper_swaptionMaturityDate" "', argument " "1"" of type '" "boost::shared_ptr< CalibrationHelper > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< CalibrationHelper > * >(argp1);
    {
      try {
        result = boost_shared_ptr_Sl_CalibrationHelper_Sg__swaptionMaturityDate(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CalibrationHelper) {
  {
    int argvi = 0;
    boost::shared_ptr< CalibrationHelper > *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_CalibrationHelper();");
    }
    {
      try {
        result = (boost::shared_ptr< CalibrationHelper > *)new boost::shared_ptr< CalibrationHelper >();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_boost__shared_ptrT_CalibrationHelper_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_CalibrationHelper) {
  {
    boost::shared_ptr< CalibrationHelper > *arg1 = (boost::shared_ptr< CalibrationHelper > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_CalibrationHelper(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_CalibrationHelper_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CalibrationHelper" "', argument " "1"" of type '" "boost::shared_ptr< CalibrationHelper > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< CalibrationHelper > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CalibrationHelper_setPricingEngine) {
  {
    boost::shared_ptr< CalibrationHelper > *arg1 = (boost::shared_ptr< CalibrationHelper > *) 0 ;
    boost::shared_ptr< PricingEngine > *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: CalibrationHelper_setPricingEngine(self,engine);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_CalibrationHelper_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CalibrationHelper_setPricingEngine" "', argument " "1"" of type '" "boost::shared_ptr< CalibrationHelper > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< CalibrationHelper > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_boost__shared_ptrT_PricingEngine_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CalibrationHelper_setPricingEngine" "', argument " "2"" of type '" "boost::shared_ptr< PricingEngine > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CalibrationHelper_setPricingEngine" "', argument " "2"" of type '" "boost::shared_ptr< PricingEngine > const &""'"); 
    }
    arg2 = reinterpret_cast< boost::shared_ptr< PricingEngine > * >(argp2);
    {
      try {
        (*arg1)->setPricingEngine((boost::shared_ptr< PricingEngine > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CalibrationHelper_marketValue) {
  {
    boost::shared_ptr< CalibrationHelper > *arg1 = (boost::shared_ptr< CalibrationHelper > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CalibrationHelper_marketValue(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_CalibrationHelper_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CalibrationHelper_marketValue" "', argument " "1"" of type '" "boost::shared_ptr< CalibrationHelper > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< CalibrationHelper > * >(argp1);
    {
      try {
        result = (Real)(*arg1)->marketValue();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CalibrationHelper_modelValue) {
  {
    boost::shared_ptr< CalibrationHelper > *arg1 = (boost::shared_ptr< CalibrationHelper > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CalibrationHelper_modelValue(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_CalibrationHelper_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CalibrationHelper_modelValue" "', argument " "1"" of type '" "boost::shared_ptr< CalibrationHelper > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< CalibrationHelper > * >(argp1);
    {
      try {
        result = (Real)(*arg1)->modelValue();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CalibrationHelper_calibrationError) {
  {
    boost::shared_ptr< CalibrationHelper > *arg1 = (boost::shared_ptr< CalibrationHelper > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CalibrationHelper_calibrationError(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_CalibrationHelper_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CalibrationHelper_calibrationError" "', argument " "1"" of type '" "boost::shared_ptr< CalibrationHelper > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< CalibrationHelper > * >(argp1);
    {
      try {
        result = (Real)(*arg1)->calibrationError();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CalibrationHelper_impliedVolatility) {
  {
    boost::shared_ptr< CalibrationHelper > *arg1 = (boost::shared_ptr< CalibrationHelper > *) 0 ;
    Real arg2 ;
    Real arg3 ;
    Size arg4 ;
    Volatility arg5 ;
    Volatility arg6 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    size_t val4 ;
    int ecode4 = 0 ;
    double val5 ;
    int ecode5 = 0 ;
    double val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    Volatility result;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: CalibrationHelper_impliedVolatility(self,targetValue,accuracy,maxEvaluations,minVol,maxVol);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_CalibrationHelper_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CalibrationHelper_impliedVolatility" "', argument " "1"" of type '" "boost::shared_ptr< CalibrationHelper > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< CalibrationHelper > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CalibrationHelper_impliedVolatility" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CalibrationHelper_impliedVolatility" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    ecode4 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CalibrationHelper_impliedVolatility" "', argument " "4"" of type '" "Size""'");
    } 
    arg4 = static_cast< Size >(val4);
    ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CalibrationHelper_impliedVolatility" "', argument " "5"" of type '" "Volatility""'");
    } 
    arg5 = static_cast< Volatility >(val5);
    ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "CalibrationHelper_impliedVolatility" "', argument " "6"" of type '" "Volatility""'");
    } 
    arg6 = static_cast< Volatility >(val6);
    {
      try {
        result = (Volatility)(*arg1)->impliedVolatility(arg2,arg3,arg4,arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CalibrationHelper_blackPrice) {
  {
    boost::shared_ptr< CalibrationHelper > *arg1 = (boost::shared_ptr< CalibrationHelper > *) 0 ;
    Volatility arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: CalibrationHelper_blackPrice(self,volatility);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_CalibrationHelper_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CalibrationHelper_blackPrice" "', argument " "1"" of type '" "boost::shared_ptr< CalibrationHelper > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< CalibrationHelper > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CalibrationHelper_blackPrice" "', argument " "2"" of type '" "Volatility""'");
    } 
    arg2 = static_cast< Volatility >(val2);
    {
      try {
        result = (Real)(*arg1)->blackPrice(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CalibrationHelper_volatility) {
  {
    boost::shared_ptr< CalibrationHelper > *arg1 = (boost::shared_ptr< CalibrationHelper > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Handle< Quote > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CalibrationHelper_volatility(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_CalibrationHelper_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CalibrationHelper_volatility" "', argument " "1"" of type '" "boost::shared_ptr< CalibrationHelper > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< CalibrationHelper > * >(argp1);
    {
      try {
        result = (*arg1)->volatility();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Handle< Quote >(static_cast< const Handle< Quote >& >(result))), SWIGTYPE_p_HandleT_Quote_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CalibrationHelper_volatilityType) {
  {
    boost::shared_ptr< CalibrationHelper > *arg1 = (boost::shared_ptr< CalibrationHelper > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    VolatilityType result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CalibrationHelper_volatilityType(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_CalibrationHelper_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CalibrationHelper_volatilityType" "', argument " "1"" of type '" "boost::shared_ptr< CalibrationHelper > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< CalibrationHelper > * >(argp1);
    {
      try {
        result = (VolatilityType)(*arg1)->volatilityType();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SwaptionHelper__SWIG_0) {
  {
    Period *arg1 = 0 ;
    Period *arg2 = 0 ;
    Handle< Quote > *arg3 = 0 ;
    IborIndexPtr *arg4 = 0 ;
    Period *arg5 = 0 ;
    DayCounter *arg6 = 0 ;
    DayCounter *arg7 = 0 ;
    Handle< YieldTermStructure > *arg8 = 0 ;
    CalibrationHelper::CalibrationErrorType arg9 ;
    Real arg10 ;
    Real arg11 ;
    VolatilityType arg12 ;
    Real arg13 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    int val9 ;
    int ecode9 = 0 ;
    double val10 ;
    int ecode10 = 0 ;
    double val11 ;
    int ecode11 = 0 ;
    int val12 ;
    int ecode12 = 0 ;
    double val13 ;
    int ecode13 = 0 ;
    int argvi = 0;
    SwaptionHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 13) || (items > 13)) {
      SWIG_croak("Usage: new_SwaptionHelper(maturity,length,volatility,index,fixedLegTenor,fixedLegDayCounter,floatingLegDayCounter,termStructure,errorType,strike,nominal,type,shift);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SwaptionHelper" "', argument " "1"" of type '" "Period const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "1"" of type '" "Period const &""'"); 
    }
    arg1 = reinterpret_cast< Period * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SwaptionHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    arg2 = reinterpret_cast< Period * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_SwaptionHelper" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< Quote > * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_IborIndexPtr,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_SwaptionHelper" "', argument " "4"" of type '" "IborIndexPtr const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "4"" of type '" "IborIndexPtr const &""'"); 
    }
    arg4 = reinterpret_cast< IborIndexPtr * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_SwaptionHelper" "', argument " "5"" of type '" "Period const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "5"" of type '" "Period const &""'"); 
    }
    arg5 = reinterpret_cast< Period * >(argp5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_SwaptionHelper" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    arg6 = reinterpret_cast< DayCounter * >(argp6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_SwaptionHelper" "', argument " "7"" of type '" "DayCounter const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "7"" of type '" "DayCounter const &""'"); 
    }
    arg7 = reinterpret_cast< DayCounter * >(argp7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_SwaptionHelper" "', argument " "8"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "8"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg8 = reinterpret_cast< Handle< YieldTermStructure > * >(argp8);
    ecode9 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(8), &val9);
    if (!SWIG_IsOK(ecode9)) {
      SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "new_SwaptionHelper" "', argument " "9"" of type '" "CalibrationHelper::CalibrationErrorType""'");
    } 
    arg9 = static_cast< CalibrationHelper::CalibrationErrorType >(val9);
    ecode10 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), &val10);
    if (!SWIG_IsOK(ecode10)) {
      SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "new_SwaptionHelper" "', argument " "10"" of type '" "Real""'");
    } 
    arg10 = static_cast< Real >(val10);
    ecode11 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(10), &val11);
    if (!SWIG_IsOK(ecode11)) {
      SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "new_SwaptionHelper" "', argument " "11"" of type '" "Real""'");
    } 
    arg11 = static_cast< Real >(val11);
    ecode12 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(11), &val12);
    if (!SWIG_IsOK(ecode12)) {
      SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "new_SwaptionHelper" "', argument " "12"" of type '" "VolatilityType""'");
    } 
    arg12 = static_cast< VolatilityType >(val12);
    ecode13 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(12), &val13);
    if (!SWIG_IsOK(ecode13)) {
      SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "new_SwaptionHelper" "', argument " "13"" of type '" "Real""'");
    } 
    arg13 = static_cast< Real >(val13);
    {
      try {
        result = (SwaptionHelperPtr *)new_SwaptionHelperPtr__SWIG_0((Period const &)*arg1,(Period const &)*arg2,(Handle< Quote > const &)*arg3,(IborIndexPtr const &)*arg4,(Period const &)*arg5,(DayCounter const &)*arg6,(DayCounter const &)*arg7,(Handle< YieldTermStructure > const &)*arg8,arg9,arg10,arg11,arg12,arg13);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SwaptionHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SwaptionHelper__SWIG_1) {
  {
    Period *arg1 = 0 ;
    Period *arg2 = 0 ;
    Handle< Quote > *arg3 = 0 ;
    IborIndexPtr *arg4 = 0 ;
    Period *arg5 = 0 ;
    DayCounter *arg6 = 0 ;
    DayCounter *arg7 = 0 ;
    Handle< YieldTermStructure > *arg8 = 0 ;
    CalibrationHelper::CalibrationErrorType arg9 ;
    Real arg10 ;
    Real arg11 ;
    VolatilityType arg12 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    int val9 ;
    int ecode9 = 0 ;
    double val10 ;
    int ecode10 = 0 ;
    double val11 ;
    int ecode11 = 0 ;
    int val12 ;
    int ecode12 = 0 ;
    int argvi = 0;
    SwaptionHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 12) || (items > 12)) {
      SWIG_croak("Usage: new_SwaptionHelper(maturity,length,volatility,index,fixedLegTenor,fixedLegDayCounter,floatingLegDayCounter,termStructure,errorType,strike,nominal,type);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SwaptionHelper" "', argument " "1"" of type '" "Period const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "1"" of type '" "Period const &""'"); 
    }
    arg1 = reinterpret_cast< Period * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SwaptionHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    arg2 = reinterpret_cast< Period * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_SwaptionHelper" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< Quote > * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_IborIndexPtr,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_SwaptionHelper" "', argument " "4"" of type '" "IborIndexPtr const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "4"" of type '" "IborIndexPtr const &""'"); 
    }
    arg4 = reinterpret_cast< IborIndexPtr * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_SwaptionHelper" "', argument " "5"" of type '" "Period const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "5"" of type '" "Period const &""'"); 
    }
    arg5 = reinterpret_cast< Period * >(argp5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_SwaptionHelper" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    arg6 = reinterpret_cast< DayCounter * >(argp6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_SwaptionHelper" "', argument " "7"" of type '" "DayCounter const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "7"" of type '" "DayCounter const &""'"); 
    }
    arg7 = reinterpret_cast< DayCounter * >(argp7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_SwaptionHelper" "', argument " "8"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "8"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg8 = reinterpret_cast< Handle< YieldTermStructure > * >(argp8);
    ecode9 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(8), &val9);
    if (!SWIG_IsOK(ecode9)) {
      SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "new_SwaptionHelper" "', argument " "9"" of type '" "CalibrationHelper::CalibrationErrorType""'");
    } 
    arg9 = static_cast< CalibrationHelper::CalibrationErrorType >(val9);
    ecode10 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), &val10);
    if (!SWIG_IsOK(ecode10)) {
      SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "new_SwaptionHelper" "', argument " "10"" of type '" "Real""'");
    } 
    arg10 = static_cast< Real >(val10);
    ecode11 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(10), &val11);
    if (!SWIG_IsOK(ecode11)) {
      SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "new_SwaptionHelper" "', argument " "11"" of type '" "Real""'");
    } 
    arg11 = static_cast< Real >(val11);
    ecode12 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(11), &val12);
    if (!SWIG_IsOK(ecode12)) {
      SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "new_SwaptionHelper" "', argument " "12"" of type '" "VolatilityType""'");
    } 
    arg12 = static_cast< VolatilityType >(val12);
    {
      try {
        result = (SwaptionHelperPtr *)new_SwaptionHelperPtr__SWIG_0((Period const &)*arg1,(Period const &)*arg2,(Handle< Quote > const &)*arg3,(IborIndexPtr const &)*arg4,(Period const &)*arg5,(DayCounter const &)*arg6,(DayCounter const &)*arg7,(Handle< YieldTermStructure > const &)*arg8,arg9,arg10,arg11,arg12);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SwaptionHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SwaptionHelper__SWIG_2) {
  {
    Period *arg1 = 0 ;
    Period *arg2 = 0 ;
    Handle< Quote > *arg3 = 0 ;
    IborIndexPtr *arg4 = 0 ;
    Period *arg5 = 0 ;
    DayCounter *arg6 = 0 ;
    DayCounter *arg7 = 0 ;
    Handle< YieldTermStructure > *arg8 = 0 ;
    CalibrationHelper::CalibrationErrorType arg9 ;
    Real arg10 ;
    Real arg11 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    int val9 ;
    int ecode9 = 0 ;
    double val10 ;
    int ecode10 = 0 ;
    double val11 ;
    int ecode11 = 0 ;
    int argvi = 0;
    SwaptionHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 11) || (items > 11)) {
      SWIG_croak("Usage: new_SwaptionHelper(maturity,length,volatility,index,fixedLegTenor,fixedLegDayCounter,floatingLegDayCounter,termStructure,errorType,strike,nominal);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SwaptionHelper" "', argument " "1"" of type '" "Period const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "1"" of type '" "Period const &""'"); 
    }
    arg1 = reinterpret_cast< Period * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SwaptionHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    arg2 = reinterpret_cast< Period * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_SwaptionHelper" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< Quote > * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_IborIndexPtr,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_SwaptionHelper" "', argument " "4"" of type '" "IborIndexPtr const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "4"" of type '" "IborIndexPtr const &""'"); 
    }
    arg4 = reinterpret_cast< IborIndexPtr * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_SwaptionHelper" "', argument " "5"" of type '" "Period const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "5"" of type '" "Period const &""'"); 
    }
    arg5 = reinterpret_cast< Period * >(argp5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_SwaptionHelper" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    arg6 = reinterpret_cast< DayCounter * >(argp6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_SwaptionHelper" "', argument " "7"" of type '" "DayCounter const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "7"" of type '" "DayCounter const &""'"); 
    }
    arg7 = reinterpret_cast< DayCounter * >(argp7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_SwaptionHelper" "', argument " "8"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "8"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg8 = reinterpret_cast< Handle< YieldTermStructure > * >(argp8);
    ecode9 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(8), &val9);
    if (!SWIG_IsOK(ecode9)) {
      SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "new_SwaptionHelper" "', argument " "9"" of type '" "CalibrationHelper::CalibrationErrorType""'");
    } 
    arg9 = static_cast< CalibrationHelper::CalibrationErrorType >(val9);
    ecode10 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), &val10);
    if (!SWIG_IsOK(ecode10)) {
      SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "new_SwaptionHelper" "', argument " "10"" of type '" "Real""'");
    } 
    arg10 = static_cast< Real >(val10);
    ecode11 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(10), &val11);
    if (!SWIG_IsOK(ecode11)) {
      SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "new_SwaptionHelper" "', argument " "11"" of type '" "Real""'");
    } 
    arg11 = static_cast< Real >(val11);
    {
      try {
        result = (SwaptionHelperPtr *)new_SwaptionHelperPtr__SWIG_0((Period const &)*arg1,(Period const &)*arg2,(Handle< Quote > const &)*arg3,(IborIndexPtr const &)*arg4,(Period const &)*arg5,(DayCounter const &)*arg6,(DayCounter const &)*arg7,(Handle< YieldTermStructure > const &)*arg8,arg9,arg10,arg11);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SwaptionHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SwaptionHelper__SWIG_3) {
  {
    Period *arg1 = 0 ;
    Period *arg2 = 0 ;
    Handle< Quote > *arg3 = 0 ;
    IborIndexPtr *arg4 = 0 ;
    Period *arg5 = 0 ;
    DayCounter *arg6 = 0 ;
    DayCounter *arg7 = 0 ;
    Handle< YieldTermStructure > *arg8 = 0 ;
    CalibrationHelper::CalibrationErrorType arg9 ;
    Real arg10 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    int val9 ;
    int ecode9 = 0 ;
    double val10 ;
    int ecode10 = 0 ;
    int argvi = 0;
    SwaptionHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 10) || (items > 10)) {
      SWIG_croak("Usage: new_SwaptionHelper(maturity,length,volatility,index,fixedLegTenor,fixedLegDayCounter,floatingLegDayCounter,termStructure,errorType,strike);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SwaptionHelper" "', argument " "1"" of type '" "Period const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "1"" of type '" "Period const &""'"); 
    }
    arg1 = reinterpret_cast< Period * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SwaptionHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    arg2 = reinterpret_cast< Period * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_SwaptionHelper" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< Quote > * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_IborIndexPtr,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_SwaptionHelper" "', argument " "4"" of type '" "IborIndexPtr const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "4"" of type '" "IborIndexPtr const &""'"); 
    }
    arg4 = reinterpret_cast< IborIndexPtr * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_SwaptionHelper" "', argument " "5"" of type '" "Period const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "5"" of type '" "Period const &""'"); 
    }
    arg5 = reinterpret_cast< Period * >(argp5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_SwaptionHelper" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    arg6 = reinterpret_cast< DayCounter * >(argp6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_SwaptionHelper" "', argument " "7"" of type '" "DayCounter const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "7"" of type '" "DayCounter const &""'"); 
    }
    arg7 = reinterpret_cast< DayCounter * >(argp7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_SwaptionHelper" "', argument " "8"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "8"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg8 = reinterpret_cast< Handle< YieldTermStructure > * >(argp8);
    ecode9 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(8), &val9);
    if (!SWIG_IsOK(ecode9)) {
      SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "new_SwaptionHelper" "', argument " "9"" of type '" "CalibrationHelper::CalibrationErrorType""'");
    } 
    arg9 = static_cast< CalibrationHelper::CalibrationErrorType >(val9);
    ecode10 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), &val10);
    if (!SWIG_IsOK(ecode10)) {
      SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "new_SwaptionHelper" "', argument " "10"" of type '" "Real""'");
    } 
    arg10 = static_cast< Real >(val10);
    {
      try {
        result = (SwaptionHelperPtr *)new_SwaptionHelperPtr__SWIG_0((Period const &)*arg1,(Period const &)*arg2,(Handle< Quote > const &)*arg3,(IborIndexPtr const &)*arg4,(Period const &)*arg5,(DayCounter const &)*arg6,(DayCounter const &)*arg7,(Handle< YieldTermStructure > const &)*arg8,arg9,arg10);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SwaptionHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SwaptionHelper__SWIG_4) {
  {
    Period *arg1 = 0 ;
    Period *arg2 = 0 ;
    Handle< Quote > *arg3 = 0 ;
    IborIndexPtr *arg4 = 0 ;
    Period *arg5 = 0 ;
    DayCounter *arg6 = 0 ;
    DayCounter *arg7 = 0 ;
    Handle< YieldTermStructure > *arg8 = 0 ;
    CalibrationHelper::CalibrationErrorType arg9 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    int val9 ;
    int ecode9 = 0 ;
    int argvi = 0;
    SwaptionHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 9) || (items > 9)) {
      SWIG_croak("Usage: new_SwaptionHelper(maturity,length,volatility,index,fixedLegTenor,fixedLegDayCounter,floatingLegDayCounter,termStructure,errorType);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SwaptionHelper" "', argument " "1"" of type '" "Period const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "1"" of type '" "Period const &""'"); 
    }
    arg1 = reinterpret_cast< Period * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SwaptionHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    arg2 = reinterpret_cast< Period * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_SwaptionHelper" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< Quote > * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_IborIndexPtr,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_SwaptionHelper" "', argument " "4"" of type '" "IborIndexPtr const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "4"" of type '" "IborIndexPtr const &""'"); 
    }
    arg4 = reinterpret_cast< IborIndexPtr * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_SwaptionHelper" "', argument " "5"" of type '" "Period const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "5"" of type '" "Period const &""'"); 
    }
    arg5 = reinterpret_cast< Period * >(argp5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_SwaptionHelper" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    arg6 = reinterpret_cast< DayCounter * >(argp6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_SwaptionHelper" "', argument " "7"" of type '" "DayCounter const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "7"" of type '" "DayCounter const &""'"); 
    }
    arg7 = reinterpret_cast< DayCounter * >(argp7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_SwaptionHelper" "', argument " "8"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "8"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg8 = reinterpret_cast< Handle< YieldTermStructure > * >(argp8);
    ecode9 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(8), &val9);
    if (!SWIG_IsOK(ecode9)) {
      SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "new_SwaptionHelper" "', argument " "9"" of type '" "CalibrationHelper::CalibrationErrorType""'");
    } 
    arg9 = static_cast< CalibrationHelper::CalibrationErrorType >(val9);
    {
      try {
        result = (SwaptionHelperPtr *)new_SwaptionHelperPtr__SWIG_0((Period const &)*arg1,(Period const &)*arg2,(Handle< Quote > const &)*arg3,(IborIndexPtr const &)*arg4,(Period const &)*arg5,(DayCounter const &)*arg6,(DayCounter const &)*arg7,(Handle< YieldTermStructure > const &)*arg8,arg9);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SwaptionHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SwaptionHelper__SWIG_5) {
  {
    Period *arg1 = 0 ;
    Period *arg2 = 0 ;
    Handle< Quote > *arg3 = 0 ;
    IborIndexPtr *arg4 = 0 ;
    Period *arg5 = 0 ;
    DayCounter *arg6 = 0 ;
    DayCounter *arg7 = 0 ;
    Handle< YieldTermStructure > *arg8 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    int argvi = 0;
    SwaptionHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 8) || (items > 8)) {
      SWIG_croak("Usage: new_SwaptionHelper(maturity,length,volatility,index,fixedLegTenor,fixedLegDayCounter,floatingLegDayCounter,termStructure);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SwaptionHelper" "', argument " "1"" of type '" "Period const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "1"" of type '" "Period const &""'"); 
    }
    arg1 = reinterpret_cast< Period * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SwaptionHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    arg2 = reinterpret_cast< Period * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_SwaptionHelper" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< Quote > * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_IborIndexPtr,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_SwaptionHelper" "', argument " "4"" of type '" "IborIndexPtr const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "4"" of type '" "IborIndexPtr const &""'"); 
    }
    arg4 = reinterpret_cast< IborIndexPtr * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_SwaptionHelper" "', argument " "5"" of type '" "Period const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "5"" of type '" "Period const &""'"); 
    }
    arg5 = reinterpret_cast< Period * >(argp5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_SwaptionHelper" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    arg6 = reinterpret_cast< DayCounter * >(argp6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_SwaptionHelper" "', argument " "7"" of type '" "DayCounter const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "7"" of type '" "DayCounter const &""'"); 
    }
    arg7 = reinterpret_cast< DayCounter * >(argp7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_SwaptionHelper" "', argument " "8"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "8"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg8 = reinterpret_cast< Handle< YieldTermStructure > * >(argp8);
    {
      try {
        result = (SwaptionHelperPtr *)new_SwaptionHelperPtr__SWIG_0((Period const &)*arg1,(Period const &)*arg2,(Handle< Quote > const &)*arg3,(IborIndexPtr const &)*arg4,(Period const &)*arg5,(DayCounter const &)*arg6,(DayCounter const &)*arg7,(Handle< YieldTermStructure > const &)*arg8);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SwaptionHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SwaptionHelper__SWIG_6) {
  {
    Date *arg1 = 0 ;
    Period *arg2 = 0 ;
    Handle< Quote > *arg3 = 0 ;
    IborIndexPtr *arg4 = 0 ;
    Period *arg5 = 0 ;
    DayCounter *arg6 = 0 ;
    DayCounter *arg7 = 0 ;
    Handle< YieldTermStructure > *arg8 = 0 ;
    CalibrationHelper::CalibrationErrorType arg9 ;
    Real arg10 ;
    Real arg11 ;
    VolatilityType arg12 ;
    Real arg13 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    int val9 ;
    int ecode9 = 0 ;
    double val10 ;
    int ecode10 = 0 ;
    double val11 ;
    int ecode11 = 0 ;
    int val12 ;
    int ecode12 = 0 ;
    double val13 ;
    int ecode13 = 0 ;
    int argvi = 0;
    SwaptionHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 13) || (items > 13)) {
      SWIG_croak("Usage: new_SwaptionHelper(exerciseDate,length,volatility,index,fixedLegTenor,fixedLegDayCounter,floatingLegDayCounter,termStructure,errorType,strike,nominal,type,shift);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SwaptionHelper" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SwaptionHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    arg2 = reinterpret_cast< Period * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_SwaptionHelper" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< Quote > * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_IborIndexPtr,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_SwaptionHelper" "', argument " "4"" of type '" "IborIndexPtr const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "4"" of type '" "IborIndexPtr const &""'"); 
    }
    arg4 = reinterpret_cast< IborIndexPtr * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_SwaptionHelper" "', argument " "5"" of type '" "Period const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "5"" of type '" "Period const &""'"); 
    }
    arg5 = reinterpret_cast< Period * >(argp5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_SwaptionHelper" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    arg6 = reinterpret_cast< DayCounter * >(argp6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_SwaptionHelper" "', argument " "7"" of type '" "DayCounter const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "7"" of type '" "DayCounter const &""'"); 
    }
    arg7 = reinterpret_cast< DayCounter * >(argp7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_SwaptionHelper" "', argument " "8"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "8"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg8 = reinterpret_cast< Handle< YieldTermStructure > * >(argp8);
    ecode9 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(8), &val9);
    if (!SWIG_IsOK(ecode9)) {
      SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "new_SwaptionHelper" "', argument " "9"" of type '" "CalibrationHelper::CalibrationErrorType""'");
    } 
    arg9 = static_cast< CalibrationHelper::CalibrationErrorType >(val9);
    ecode10 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), &val10);
    if (!SWIG_IsOK(ecode10)) {
      SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "new_SwaptionHelper" "', argument " "10"" of type '" "Real""'");
    } 
    arg10 = static_cast< Real >(val10);
    ecode11 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(10), &val11);
    if (!SWIG_IsOK(ecode11)) {
      SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "new_SwaptionHelper" "', argument " "11"" of type '" "Real""'");
    } 
    arg11 = static_cast< Real >(val11);
    ecode12 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(11), &val12);
    if (!SWIG_IsOK(ecode12)) {
      SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "new_SwaptionHelper" "', argument " "12"" of type '" "VolatilityType""'");
    } 
    arg12 = static_cast< VolatilityType >(val12);
    ecode13 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(12), &val13);
    if (!SWIG_IsOK(ecode13)) {
      SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "new_SwaptionHelper" "', argument " "13"" of type '" "Real""'");
    } 
    arg13 = static_cast< Real >(val13);
    {
      try {
        result = (SwaptionHelperPtr *)new_SwaptionHelperPtr__SWIG_6((Date const &)*arg1,(Period const &)*arg2,(Handle< Quote > const &)*arg3,(IborIndexPtr const &)*arg4,(Period const &)*arg5,(DayCounter const &)*arg6,(DayCounter const &)*arg7,(Handle< YieldTermStructure > const &)*arg8,arg9,arg10,arg11,arg12,arg13);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SwaptionHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SwaptionHelper__SWIG_7) {
  {
    Date *arg1 = 0 ;
    Period *arg2 = 0 ;
    Handle< Quote > *arg3 = 0 ;
    IborIndexPtr *arg4 = 0 ;
    Period *arg5 = 0 ;
    DayCounter *arg6 = 0 ;
    DayCounter *arg7 = 0 ;
    Handle< YieldTermStructure > *arg8 = 0 ;
    CalibrationHelper::CalibrationErrorType arg9 ;
    Real arg10 ;
    Real arg11 ;
    VolatilityType arg12 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    int val9 ;
    int ecode9 = 0 ;
    double val10 ;
    int ecode10 = 0 ;
    double val11 ;
    int ecode11 = 0 ;
    int val12 ;
    int ecode12 = 0 ;
    int argvi = 0;
    SwaptionHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 12) || (items > 12)) {
      SWIG_croak("Usage: new_SwaptionHelper(exerciseDate,length,volatility,index,fixedLegTenor,fixedLegDayCounter,floatingLegDayCounter,termStructure,errorType,strike,nominal,type);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SwaptionHelper" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SwaptionHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    arg2 = reinterpret_cast< Period * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_SwaptionHelper" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< Quote > * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_IborIndexPtr,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_SwaptionHelper" "', argument " "4"" of type '" "IborIndexPtr const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "4"" of type '" "IborIndexPtr const &""'"); 
    }
    arg4 = reinterpret_cast< IborIndexPtr * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_SwaptionHelper" "', argument " "5"" of type '" "Period const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "5"" of type '" "Period const &""'"); 
    }
    arg5 = reinterpret_cast< Period * >(argp5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_SwaptionHelper" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    arg6 = reinterpret_cast< DayCounter * >(argp6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_SwaptionHelper" "', argument " "7"" of type '" "DayCounter const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "7"" of type '" "DayCounter const &""'"); 
    }
    arg7 = reinterpret_cast< DayCounter * >(argp7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_SwaptionHelper" "', argument " "8"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "8"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg8 = reinterpret_cast< Handle< YieldTermStructure > * >(argp8);
    ecode9 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(8), &val9);
    if (!SWIG_IsOK(ecode9)) {
      SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "new_SwaptionHelper" "', argument " "9"" of type '" "CalibrationHelper::CalibrationErrorType""'");
    } 
    arg9 = static_cast< CalibrationHelper::CalibrationErrorType >(val9);
    ecode10 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), &val10);
    if (!SWIG_IsOK(ecode10)) {
      SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "new_SwaptionHelper" "', argument " "10"" of type '" "Real""'");
    } 
    arg10 = static_cast< Real >(val10);
    ecode11 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(10), &val11);
    if (!SWIG_IsOK(ecode11)) {
      SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "new_SwaptionHelper" "', argument " "11"" of type '" "Real""'");
    } 
    arg11 = static_cast< Real >(val11);
    ecode12 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(11), &val12);
    if (!SWIG_IsOK(ecode12)) {
      SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "new_SwaptionHelper" "', argument " "12"" of type '" "VolatilityType""'");
    } 
    arg12 = static_cast< VolatilityType >(val12);
    {
      try {
        result = (SwaptionHelperPtr *)new_SwaptionHelperPtr__SWIG_6((Date const &)*arg1,(Period const &)*arg2,(Handle< Quote > const &)*arg3,(IborIndexPtr const &)*arg4,(Period const &)*arg5,(DayCounter const &)*arg6,(DayCounter const &)*arg7,(Handle< YieldTermStructure > const &)*arg8,arg9,arg10,arg11,arg12);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SwaptionHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SwaptionHelper__SWIG_8) {
  {
    Date *arg1 = 0 ;
    Period *arg2 = 0 ;
    Handle< Quote > *arg3 = 0 ;
    IborIndexPtr *arg4 = 0 ;
    Period *arg5 = 0 ;
    DayCounter *arg6 = 0 ;
    DayCounter *arg7 = 0 ;
    Handle< YieldTermStructure > *arg8 = 0 ;
    CalibrationHelper::CalibrationErrorType arg9 ;
    Real arg10 ;
    Real arg11 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    int val9 ;
    int ecode9 = 0 ;
    double val10 ;
    int ecode10 = 0 ;
    double val11 ;
    int ecode11 = 0 ;
    int argvi = 0;
    SwaptionHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 11) || (items > 11)) {
      SWIG_croak("Usage: new_SwaptionHelper(exerciseDate,length,volatility,index,fixedLegTenor,fixedLegDayCounter,floatingLegDayCounter,termStructure,errorType,strike,nominal);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SwaptionHelper" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SwaptionHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    arg2 = reinterpret_cast< Period * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_SwaptionHelper" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< Quote > * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_IborIndexPtr,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_SwaptionHelper" "', argument " "4"" of type '" "IborIndexPtr const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "4"" of type '" "IborIndexPtr const &""'"); 
    }
    arg4 = reinterpret_cast< IborIndexPtr * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_SwaptionHelper" "', argument " "5"" of type '" "Period const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "5"" of type '" "Period const &""'"); 
    }
    arg5 = reinterpret_cast< Period * >(argp5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_SwaptionHelper" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    arg6 = reinterpret_cast< DayCounter * >(argp6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_SwaptionHelper" "', argument " "7"" of type '" "DayCounter const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "7"" of type '" "DayCounter const &""'"); 
    }
    arg7 = reinterpret_cast< DayCounter * >(argp7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_SwaptionHelper" "', argument " "8"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "8"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg8 = reinterpret_cast< Handle< YieldTermStructure > * >(argp8);
    ecode9 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(8), &val9);
    if (!SWIG_IsOK(ecode9)) {
      SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "new_SwaptionHelper" "', argument " "9"" of type '" "CalibrationHelper::CalibrationErrorType""'");
    } 
    arg9 = static_cast< CalibrationHelper::CalibrationErrorType >(val9);
    ecode10 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), &val10);
    if (!SWIG_IsOK(ecode10)) {
      SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "new_SwaptionHelper" "', argument " "10"" of type '" "Real""'");
    } 
    arg10 = static_cast< Real >(val10);
    ecode11 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(10), &val11);
    if (!SWIG_IsOK(ecode11)) {
      SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "new_SwaptionHelper" "', argument " "11"" of type '" "Real""'");
    } 
    arg11 = static_cast< Real >(val11);
    {
      try {
        result = (SwaptionHelperPtr *)new_SwaptionHelperPtr__SWIG_6((Date const &)*arg1,(Period const &)*arg2,(Handle< Quote > const &)*arg3,(IborIndexPtr const &)*arg4,(Period const &)*arg5,(DayCounter const &)*arg6,(DayCounter const &)*arg7,(Handle< YieldTermStructure > const &)*arg8,arg9,arg10,arg11);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SwaptionHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SwaptionHelper__SWIG_9) {
  {
    Date *arg1 = 0 ;
    Period *arg2 = 0 ;
    Handle< Quote > *arg3 = 0 ;
    IborIndexPtr *arg4 = 0 ;
    Period *arg5 = 0 ;
    DayCounter *arg6 = 0 ;
    DayCounter *arg7 = 0 ;
    Handle< YieldTermStructure > *arg8 = 0 ;
    CalibrationHelper::CalibrationErrorType arg9 ;
    Real arg10 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    int val9 ;
    int ecode9 = 0 ;
    double val10 ;
    int ecode10 = 0 ;
    int argvi = 0;
    SwaptionHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 10) || (items > 10)) {
      SWIG_croak("Usage: new_SwaptionHelper(exerciseDate,length,volatility,index,fixedLegTenor,fixedLegDayCounter,floatingLegDayCounter,termStructure,errorType,strike);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SwaptionHelper" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SwaptionHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    arg2 = reinterpret_cast< Period * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_SwaptionHelper" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< Quote > * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_IborIndexPtr,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_SwaptionHelper" "', argument " "4"" of type '" "IborIndexPtr const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "4"" of type '" "IborIndexPtr const &""'"); 
    }
    arg4 = reinterpret_cast< IborIndexPtr * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_SwaptionHelper" "', argument " "5"" of type '" "Period const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "5"" of type '" "Period const &""'"); 
    }
    arg5 = reinterpret_cast< Period * >(argp5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_SwaptionHelper" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    arg6 = reinterpret_cast< DayCounter * >(argp6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_SwaptionHelper" "', argument " "7"" of type '" "DayCounter const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "7"" of type '" "DayCounter const &""'"); 
    }
    arg7 = reinterpret_cast< DayCounter * >(argp7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_SwaptionHelper" "', argument " "8"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "8"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg8 = reinterpret_cast< Handle< YieldTermStructure > * >(argp8);
    ecode9 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(8), &val9);
    if (!SWIG_IsOK(ecode9)) {
      SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "new_SwaptionHelper" "', argument " "9"" of type '" "CalibrationHelper::CalibrationErrorType""'");
    } 
    arg9 = static_cast< CalibrationHelper::CalibrationErrorType >(val9);
    ecode10 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), &val10);
    if (!SWIG_IsOK(ecode10)) {
      SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "new_SwaptionHelper" "', argument " "10"" of type '" "Real""'");
    } 
    arg10 = static_cast< Real >(val10);
    {
      try {
        result = (SwaptionHelperPtr *)new_SwaptionHelperPtr__SWIG_6((Date const &)*arg1,(Period const &)*arg2,(Handle< Quote > const &)*arg3,(IborIndexPtr const &)*arg4,(Period const &)*arg5,(DayCounter const &)*arg6,(DayCounter const &)*arg7,(Handle< YieldTermStructure > const &)*arg8,arg9,arg10);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SwaptionHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SwaptionHelper__SWIG_10) {
  {
    Date *arg1 = 0 ;
    Period *arg2 = 0 ;
    Handle< Quote > *arg3 = 0 ;
    IborIndexPtr *arg4 = 0 ;
    Period *arg5 = 0 ;
    DayCounter *arg6 = 0 ;
    DayCounter *arg7 = 0 ;
    Handle< YieldTermStructure > *arg8 = 0 ;
    CalibrationHelper::CalibrationErrorType arg9 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    int val9 ;
    int ecode9 = 0 ;
    int argvi = 0;
    SwaptionHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 9) || (items > 9)) {
      SWIG_croak("Usage: new_SwaptionHelper(exerciseDate,length,volatility,index,fixedLegTenor,fixedLegDayCounter,floatingLegDayCounter,termStructure,errorType);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SwaptionHelper" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SwaptionHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    arg2 = reinterpret_cast< Period * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_SwaptionHelper" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< Quote > * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_IborIndexPtr,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_SwaptionHelper" "', argument " "4"" of type '" "IborIndexPtr const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "4"" of type '" "IborIndexPtr const &""'"); 
    }
    arg4 = reinterpret_cast< IborIndexPtr * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_SwaptionHelper" "', argument " "5"" of type '" "Period const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "5"" of type '" "Period const &""'"); 
    }
    arg5 = reinterpret_cast< Period * >(argp5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_SwaptionHelper" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    arg6 = reinterpret_cast< DayCounter * >(argp6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_SwaptionHelper" "', argument " "7"" of type '" "DayCounter const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "7"" of type '" "DayCounter const &""'"); 
    }
    arg7 = reinterpret_cast< DayCounter * >(argp7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_SwaptionHelper" "', argument " "8"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "8"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg8 = reinterpret_cast< Handle< YieldTermStructure > * >(argp8);
    ecode9 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(8), &val9);
    if (!SWIG_IsOK(ecode9)) {
      SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "new_SwaptionHelper" "', argument " "9"" of type '" "CalibrationHelper::CalibrationErrorType""'");
    } 
    arg9 = static_cast< CalibrationHelper::CalibrationErrorType >(val9);
    {
      try {
        result = (SwaptionHelperPtr *)new_SwaptionHelperPtr__SWIG_6((Date const &)*arg1,(Period const &)*arg2,(Handle< Quote > const &)*arg3,(IborIndexPtr const &)*arg4,(Period const &)*arg5,(DayCounter const &)*arg6,(DayCounter const &)*arg7,(Handle< YieldTermStructure > const &)*arg8,arg9);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SwaptionHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SwaptionHelper__SWIG_11) {
  {
    Date *arg1 = 0 ;
    Period *arg2 = 0 ;
    Handle< Quote > *arg3 = 0 ;
    IborIndexPtr *arg4 = 0 ;
    Period *arg5 = 0 ;
    DayCounter *arg6 = 0 ;
    DayCounter *arg7 = 0 ;
    Handle< YieldTermStructure > *arg8 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    int argvi = 0;
    SwaptionHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 8) || (items > 8)) {
      SWIG_croak("Usage: new_SwaptionHelper(exerciseDate,length,volatility,index,fixedLegTenor,fixedLegDayCounter,floatingLegDayCounter,termStructure);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SwaptionHelper" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SwaptionHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    arg2 = reinterpret_cast< Period * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_SwaptionHelper" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< Quote > * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_IborIndexPtr,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_SwaptionHelper" "', argument " "4"" of type '" "IborIndexPtr const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "4"" of type '" "IborIndexPtr const &""'"); 
    }
    arg4 = reinterpret_cast< IborIndexPtr * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_SwaptionHelper" "', argument " "5"" of type '" "Period const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "5"" of type '" "Period const &""'"); 
    }
    arg5 = reinterpret_cast< Period * >(argp5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_SwaptionHelper" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    arg6 = reinterpret_cast< DayCounter * >(argp6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_SwaptionHelper" "', argument " "7"" of type '" "DayCounter const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "7"" of type '" "DayCounter const &""'"); 
    }
    arg7 = reinterpret_cast< DayCounter * >(argp7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_SwaptionHelper" "', argument " "8"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "8"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg8 = reinterpret_cast< Handle< YieldTermStructure > * >(argp8);
    {
      try {
        result = (SwaptionHelperPtr *)new_SwaptionHelperPtr__SWIG_6((Date const &)*arg1,(Period const &)*arg2,(Handle< Quote > const &)*arg3,(IborIndexPtr const &)*arg4,(Period const &)*arg5,(DayCounter const &)*arg6,(DayCounter const &)*arg7,(Handle< YieldTermStructure > const &)*arg8);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SwaptionHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SwaptionHelper__SWIG_12) {
  {
    Date *arg1 = 0 ;
    Date *arg2 = 0 ;
    Handle< Quote > *arg3 = 0 ;
    IborIndexPtr *arg4 = 0 ;
    Period *arg5 = 0 ;
    DayCounter *arg6 = 0 ;
    DayCounter *arg7 = 0 ;
    Handle< YieldTermStructure > *arg8 = 0 ;
    CalibrationHelper::CalibrationErrorType arg9 ;
    Real arg10 ;
    Real arg11 ;
    VolatilityType arg12 ;
    Real arg13 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    int val9 ;
    int ecode9 = 0 ;
    double val10 ;
    int ecode10 = 0 ;
    double val11 ;
    int ecode11 = 0 ;
    int val12 ;
    int ecode12 = 0 ;
    double val13 ;
    int ecode13 = 0 ;
    int argvi = 0;
    SwaptionHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 13) || (items > 13)) {
      SWIG_croak("Usage: new_SwaptionHelper(exerciseDate,endDate,volatility,index,fixedLegTenor,fixedLegDayCounter,floatingLegDayCounter,termStructure,errorType,strike,nominal,type,shift);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SwaptionHelper" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SwaptionHelper" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_SwaptionHelper" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< Quote > * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_IborIndexPtr,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_SwaptionHelper" "', argument " "4"" of type '" "IborIndexPtr const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "4"" of type '" "IborIndexPtr const &""'"); 
    }
    arg4 = reinterpret_cast< IborIndexPtr * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_SwaptionHelper" "', argument " "5"" of type '" "Period const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "5"" of type '" "Period const &""'"); 
    }
    arg5 = reinterpret_cast< Period * >(argp5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_SwaptionHelper" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    arg6 = reinterpret_cast< DayCounter * >(argp6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_SwaptionHelper" "', argument " "7"" of type '" "DayCounter const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "7"" of type '" "DayCounter const &""'"); 
    }
    arg7 = reinterpret_cast< DayCounter * >(argp7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_SwaptionHelper" "', argument " "8"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "8"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg8 = reinterpret_cast< Handle< YieldTermStructure > * >(argp8);
    ecode9 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(8), &val9);
    if (!SWIG_IsOK(ecode9)) {
      SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "new_SwaptionHelper" "', argument " "9"" of type '" "CalibrationHelper::CalibrationErrorType""'");
    } 
    arg9 = static_cast< CalibrationHelper::CalibrationErrorType >(val9);
    ecode10 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), &val10);
    if (!SWIG_IsOK(ecode10)) {
      SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "new_SwaptionHelper" "', argument " "10"" of type '" "Real""'");
    } 
    arg10 = static_cast< Real >(val10);
    ecode11 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(10), &val11);
    if (!SWIG_IsOK(ecode11)) {
      SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "new_SwaptionHelper" "', argument " "11"" of type '" "Real""'");
    } 
    arg11 = static_cast< Real >(val11);
    ecode12 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(11), &val12);
    if (!SWIG_IsOK(ecode12)) {
      SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "new_SwaptionHelper" "', argument " "12"" of type '" "VolatilityType""'");
    } 
    arg12 = static_cast< VolatilityType >(val12);
    ecode13 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(12), &val13);
    if (!SWIG_IsOK(ecode13)) {
      SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "new_SwaptionHelper" "', argument " "13"" of type '" "Real""'");
    } 
    arg13 = static_cast< Real >(val13);
    {
      try {
        result = (SwaptionHelperPtr *)new_SwaptionHelperPtr__SWIG_12((Date const &)*arg1,(Date const &)*arg2,(Handle< Quote > const &)*arg3,(IborIndexPtr const &)*arg4,(Period const &)*arg5,(DayCounter const &)*arg6,(DayCounter const &)*arg7,(Handle< YieldTermStructure > const &)*arg8,arg9,arg10,arg11,arg12,arg13);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SwaptionHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SwaptionHelper__SWIG_13) {
  {
    Date *arg1 = 0 ;
    Date *arg2 = 0 ;
    Handle< Quote > *arg3 = 0 ;
    IborIndexPtr *arg4 = 0 ;
    Period *arg5 = 0 ;
    DayCounter *arg6 = 0 ;
    DayCounter *arg7 = 0 ;
    Handle< YieldTermStructure > *arg8 = 0 ;
    CalibrationHelper::CalibrationErrorType arg9 ;
    Real arg10 ;
    Real arg11 ;
    VolatilityType arg12 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    int val9 ;
    int ecode9 = 0 ;
    double val10 ;
    int ecode10 = 0 ;
    double val11 ;
    int ecode11 = 0 ;
    int val12 ;
    int ecode12 = 0 ;
    int argvi = 0;
    SwaptionHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 12) || (items > 12)) {
      SWIG_croak("Usage: new_SwaptionHelper(exerciseDate,endDate,volatility,index,fixedLegTenor,fixedLegDayCounter,floatingLegDayCounter,termStructure,errorType,strike,nominal,type);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SwaptionHelper" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SwaptionHelper" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_SwaptionHelper" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< Quote > * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_IborIndexPtr,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_SwaptionHelper" "', argument " "4"" of type '" "IborIndexPtr const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "4"" of type '" "IborIndexPtr const &""'"); 
    }
    arg4 = reinterpret_cast< IborIndexPtr * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_SwaptionHelper" "', argument " "5"" of type '" "Period const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "5"" of type '" "Period const &""'"); 
    }
    arg5 = reinterpret_cast< Period * >(argp5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_SwaptionHelper" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    arg6 = reinterpret_cast< DayCounter * >(argp6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_SwaptionHelper" "', argument " "7"" of type '" "DayCounter const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "7"" of type '" "DayCounter const &""'"); 
    }
    arg7 = reinterpret_cast< DayCounter * >(argp7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_SwaptionHelper" "', argument " "8"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "8"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg8 = reinterpret_cast< Handle< YieldTermStructure > * >(argp8);
    ecode9 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(8), &val9);
    if (!SWIG_IsOK(ecode9)) {
      SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "new_SwaptionHelper" "', argument " "9"" of type '" "CalibrationHelper::CalibrationErrorType""'");
    } 
    arg9 = static_cast< CalibrationHelper::CalibrationErrorType >(val9);
    ecode10 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), &val10);
    if (!SWIG_IsOK(ecode10)) {
      SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "new_SwaptionHelper" "', argument " "10"" of type '" "Real""'");
    } 
    arg10 = static_cast< Real >(val10);
    ecode11 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(10), &val11);
    if (!SWIG_IsOK(ecode11)) {
      SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "new_SwaptionHelper" "', argument " "11"" of type '" "Real""'");
    } 
    arg11 = static_cast< Real >(val11);
    ecode12 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(11), &val12);
    if (!SWIG_IsOK(ecode12)) {
      SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "new_SwaptionHelper" "', argument " "12"" of type '" "VolatilityType""'");
    } 
    arg12 = static_cast< VolatilityType >(val12);
    {
      try {
        result = (SwaptionHelperPtr *)new_SwaptionHelperPtr__SWIG_12((Date const &)*arg1,(Date const &)*arg2,(Handle< Quote > const &)*arg3,(IborIndexPtr const &)*arg4,(Period const &)*arg5,(DayCounter const &)*arg6,(DayCounter const &)*arg7,(Handle< YieldTermStructure > const &)*arg8,arg9,arg10,arg11,arg12);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SwaptionHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SwaptionHelper__SWIG_14) {
  {
    Date *arg1 = 0 ;
    Date *arg2 = 0 ;
    Handle< Quote > *arg3 = 0 ;
    IborIndexPtr *arg4 = 0 ;
    Period *arg5 = 0 ;
    DayCounter *arg6 = 0 ;
    DayCounter *arg7 = 0 ;
    Handle< YieldTermStructure > *arg8 = 0 ;
    CalibrationHelper::CalibrationErrorType arg9 ;
    Real arg10 ;
    Real arg11 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    int val9 ;
    int ecode9 = 0 ;
    double val10 ;
    int ecode10 = 0 ;
    double val11 ;
    int ecode11 = 0 ;
    int argvi = 0;
    SwaptionHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 11) || (items > 11)) {
      SWIG_croak("Usage: new_SwaptionHelper(exerciseDate,endDate,volatility,index,fixedLegTenor,fixedLegDayCounter,floatingLegDayCounter,termStructure,errorType,strike,nominal);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SwaptionHelper" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SwaptionHelper" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_SwaptionHelper" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< Quote > * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_IborIndexPtr,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_SwaptionHelper" "', argument " "4"" of type '" "IborIndexPtr const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "4"" of type '" "IborIndexPtr const &""'"); 
    }
    arg4 = reinterpret_cast< IborIndexPtr * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_SwaptionHelper" "', argument " "5"" of type '" "Period const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "5"" of type '" "Period const &""'"); 
    }
    arg5 = reinterpret_cast< Period * >(argp5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_SwaptionHelper" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    arg6 = reinterpret_cast< DayCounter * >(argp6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_SwaptionHelper" "', argument " "7"" of type '" "DayCounter const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "7"" of type '" "DayCounter const &""'"); 
    }
    arg7 = reinterpret_cast< DayCounter * >(argp7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_SwaptionHelper" "', argument " "8"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "8"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg8 = reinterpret_cast< Handle< YieldTermStructure > * >(argp8);
    ecode9 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(8), &val9);
    if (!SWIG_IsOK(ecode9)) {
      SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "new_SwaptionHelper" "', argument " "9"" of type '" "CalibrationHelper::CalibrationErrorType""'");
    } 
    arg9 = static_cast< CalibrationHelper::CalibrationErrorType >(val9);
    ecode10 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), &val10);
    if (!SWIG_IsOK(ecode10)) {
      SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "new_SwaptionHelper" "', argument " "10"" of type '" "Real""'");
    } 
    arg10 = static_cast< Real >(val10);
    ecode11 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(10), &val11);
    if (!SWIG_IsOK(ecode11)) {
      SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "new_SwaptionHelper" "', argument " "11"" of type '" "Real""'");
    } 
    arg11 = static_cast< Real >(val11);
    {
      try {
        result = (SwaptionHelperPtr *)new_SwaptionHelperPtr__SWIG_12((Date const &)*arg1,(Date const &)*arg2,(Handle< Quote > const &)*arg3,(IborIndexPtr const &)*arg4,(Period const &)*arg5,(DayCounter const &)*arg6,(DayCounter const &)*arg7,(Handle< YieldTermStructure > const &)*arg8,arg9,arg10,arg11);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SwaptionHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SwaptionHelper__SWIG_15) {
  {
    Date *arg1 = 0 ;
    Date *arg2 = 0 ;
    Handle< Quote > *arg3 = 0 ;
    IborIndexPtr *arg4 = 0 ;
    Period *arg5 = 0 ;
    DayCounter *arg6 = 0 ;
    DayCounter *arg7 = 0 ;
    Handle< YieldTermStructure > *arg8 = 0 ;
    CalibrationHelper::CalibrationErrorType arg9 ;
    Real arg10 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    int val9 ;
    int ecode9 = 0 ;
    double val10 ;
    int ecode10 = 0 ;
    int argvi = 0;
    SwaptionHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 10) || (items > 10)) {
      SWIG_croak("Usage: new_SwaptionHelper(exerciseDate,endDate,volatility,index,fixedLegTenor,fixedLegDayCounter,floatingLegDayCounter,termStructure,errorType,strike);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SwaptionHelper" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SwaptionHelper" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_SwaptionHelper" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< Quote > * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_IborIndexPtr,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_SwaptionHelper" "', argument " "4"" of type '" "IborIndexPtr const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "4"" of type '" "IborIndexPtr const &""'"); 
    }
    arg4 = reinterpret_cast< IborIndexPtr * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_SwaptionHelper" "', argument " "5"" of type '" "Period const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "5"" of type '" "Period const &""'"); 
    }
    arg5 = reinterpret_cast< Period * >(argp5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_SwaptionHelper" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    arg6 = reinterpret_cast< DayCounter * >(argp6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_SwaptionHelper" "', argument " "7"" of type '" "DayCounter const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "7"" of type '" "DayCounter const &""'"); 
    }
    arg7 = reinterpret_cast< DayCounter * >(argp7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_SwaptionHelper" "', argument " "8"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "8"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg8 = reinterpret_cast< Handle< YieldTermStructure > * >(argp8);
    ecode9 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(8), &val9);
    if (!SWIG_IsOK(ecode9)) {
      SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "new_SwaptionHelper" "', argument " "9"" of type '" "CalibrationHelper::CalibrationErrorType""'");
    } 
    arg9 = static_cast< CalibrationHelper::CalibrationErrorType >(val9);
    ecode10 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), &val10);
    if (!SWIG_IsOK(ecode10)) {
      SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "new_SwaptionHelper" "', argument " "10"" of type '" "Real""'");
    } 
    arg10 = static_cast< Real >(val10);
    {
      try {
        result = (SwaptionHelperPtr *)new_SwaptionHelperPtr__SWIG_12((Date const &)*arg1,(Date const &)*arg2,(Handle< Quote > const &)*arg3,(IborIndexPtr const &)*arg4,(Period const &)*arg5,(DayCounter const &)*arg6,(DayCounter const &)*arg7,(Handle< YieldTermStructure > const &)*arg8,arg9,arg10);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SwaptionHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SwaptionHelper__SWIG_16) {
  {
    Date *arg1 = 0 ;
    Date *arg2 = 0 ;
    Handle< Quote > *arg3 = 0 ;
    IborIndexPtr *arg4 = 0 ;
    Period *arg5 = 0 ;
    DayCounter *arg6 = 0 ;
    DayCounter *arg7 = 0 ;
    Handle< YieldTermStructure > *arg8 = 0 ;
    CalibrationHelper::CalibrationErrorType arg9 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    int val9 ;
    int ecode9 = 0 ;
    int argvi = 0;
    SwaptionHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 9) || (items > 9)) {
      SWIG_croak("Usage: new_SwaptionHelper(exerciseDate,endDate,volatility,index,fixedLegTenor,fixedLegDayCounter,floatingLegDayCounter,termStructure,errorType);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SwaptionHelper" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SwaptionHelper" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_SwaptionHelper" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< Quote > * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_IborIndexPtr,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_SwaptionHelper" "', argument " "4"" of type '" "IborIndexPtr const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "4"" of type '" "IborIndexPtr const &""'"); 
    }
    arg4 = reinterpret_cast< IborIndexPtr * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_SwaptionHelper" "', argument " "5"" of type '" "Period const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "5"" of type '" "Period const &""'"); 
    }
    arg5 = reinterpret_cast< Period * >(argp5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_SwaptionHelper" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    arg6 = reinterpret_cast< DayCounter * >(argp6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_SwaptionHelper" "', argument " "7"" of type '" "DayCounter const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "7"" of type '" "DayCounter const &""'"); 
    }
    arg7 = reinterpret_cast< DayCounter * >(argp7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_SwaptionHelper" "', argument " "8"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "8"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg8 = reinterpret_cast< Handle< YieldTermStructure > * >(argp8);
    ecode9 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(8), &val9);
    if (!SWIG_IsOK(ecode9)) {
      SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "new_SwaptionHelper" "', argument " "9"" of type '" "CalibrationHelper::CalibrationErrorType""'");
    } 
    arg9 = static_cast< CalibrationHelper::CalibrationErrorType >(val9);
    {
      try {
        result = (SwaptionHelperPtr *)new_SwaptionHelperPtr__SWIG_12((Date const &)*arg1,(Date const &)*arg2,(Handle< Quote > const &)*arg3,(IborIndexPtr const &)*arg4,(Period const &)*arg5,(DayCounter const &)*arg6,(DayCounter const &)*arg7,(Handle< YieldTermStructure > const &)*arg8,arg9);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SwaptionHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SwaptionHelper__SWIG_17) {
  {
    Date *arg1 = 0 ;
    Date *arg2 = 0 ;
    Handle< Quote > *arg3 = 0 ;
    IborIndexPtr *arg4 = 0 ;
    Period *arg5 = 0 ;
    DayCounter *arg6 = 0 ;
    DayCounter *arg7 = 0 ;
    Handle< YieldTermStructure > *arg8 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    int argvi = 0;
    SwaptionHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 8) || (items > 8)) {
      SWIG_croak("Usage: new_SwaptionHelper(exerciseDate,endDate,volatility,index,fixedLegTenor,fixedLegDayCounter,floatingLegDayCounter,termStructure);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SwaptionHelper" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SwaptionHelper" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_SwaptionHelper" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< Quote > * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_IborIndexPtr,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_SwaptionHelper" "', argument " "4"" of type '" "IborIndexPtr const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "4"" of type '" "IborIndexPtr const &""'"); 
    }
    arg4 = reinterpret_cast< IborIndexPtr * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_SwaptionHelper" "', argument " "5"" of type '" "Period const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "5"" of type '" "Period const &""'"); 
    }
    arg5 = reinterpret_cast< Period * >(argp5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_SwaptionHelper" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    arg6 = reinterpret_cast< DayCounter * >(argp6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_SwaptionHelper" "', argument " "7"" of type '" "DayCounter const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "7"" of type '" "DayCounter const &""'"); 
    }
    arg7 = reinterpret_cast< DayCounter * >(argp7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_SwaptionHelper" "', argument " "8"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwaptionHelper" "', argument " "8"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg8 = reinterpret_cast< Handle< YieldTermStructure > * >(argp8);
    {
      try {
        result = (SwaptionHelperPtr *)new_SwaptionHelperPtr__SWIG_12((Date const &)*arg1,(Date const &)*arg2,(Handle< Quote > const &)*arg3,(IborIndexPtr const &)*arg4,(Period const &)*arg5,(DayCounter const &)*arg6,(DayCounter const &)*arg7,(Handle< YieldTermStructure > const &)*arg8);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SwaptionHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SwaptionHelper) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 8) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_IborIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 8) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_IborIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 8) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_IborIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 9) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_IborIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(8), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 9) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_IborIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(8), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 9) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_IborIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(8), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
    if (items == 10) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_IborIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(8), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 7;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_7:
    
    if (items == 10) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_IborIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(8), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 8;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_8:
    
    if (items == 10) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_IborIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(8), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 9;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_9:
    
    if (items == 11) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_IborIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(8), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(10), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 10;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_10:
    
    if (items == 11) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_IborIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(8), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(10), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 11;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_11:
    
    if (items == 11) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_IborIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(8), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(10), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 12;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_12:
    
    if (items == 12) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_13;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_13;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_13;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_IborIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_13;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_13;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_13;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_13;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_13;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(8), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_13;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_13;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(10), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_13;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(11), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_13;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 13;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_13:
    
    if (items == 12) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_14;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_14;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_14;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_IborIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_14;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_14;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_14;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_14;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_14;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(8), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_14;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_14;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(10), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_14;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(11), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_14;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 14;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_14:
    
    if (items == 12) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_15;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_15;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_15;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_IborIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_15;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_15;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_15;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_15;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_15;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(8), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_15;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_15;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(10), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_15;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(11), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_15;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 15;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_15:
    
    if (items == 13) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_16;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_16;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_16;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_IborIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_16;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_16;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_16;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_16;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_16;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(8), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_16;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_16;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(10), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_16;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(11), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_16;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(12), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_16;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 16;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_16:
    
    if (items == 13) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_17;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_17;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_17;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_IborIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_17;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_17;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_17;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_17;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_17;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(8), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_17;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_17;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(10), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_17;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(11), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_17;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(12), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_17;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 17;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_17:
    
    if (items == 13) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_18;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_18;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_18;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_IborIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_18;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_18;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_18;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_18;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_18;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(8), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_18;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_18;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(10), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_18;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(11), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_18;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(12), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_18;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 18;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_18:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SwaptionHelper__SWIG_5); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SwaptionHelper__SWIG_11); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SwaptionHelper__SWIG_17); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SwaptionHelper__SWIG_4); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SwaptionHelper__SWIG_16); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SwaptionHelper__SWIG_10); return;
    case 7:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SwaptionHelper__SWIG_15); return;
    case 8:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SwaptionHelper__SWIG_3); return;
    case 9:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SwaptionHelper__SWIG_9); return;
    case 10:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SwaptionHelper__SWIG_8); return;
    case 11:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SwaptionHelper__SWIG_2); return;
    case 12:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SwaptionHelper__SWIG_14); return;
    case 13:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SwaptionHelper__SWIG_7); return;
    case 14:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SwaptionHelper__SWIG_13); return;
    case 15:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SwaptionHelper__SWIG_1); return;
    case 16:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SwaptionHelper__SWIG_12); return;
    case 17:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SwaptionHelper__SWIG_6); return;
    case 18:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SwaptionHelper__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_SwaptionHelper'");
  XSRETURN(0);
}


XS(_wrap_SwaptionHelper_times) {
  {
    SwaptionHelperPtr *arg1 = (SwaptionHelperPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Time > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: SwaptionHelper_times(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SwaptionHelperPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwaptionHelper_times" "', argument " "1"" of type '" "SwaptionHelperPtr *""'"); 
    }
    arg1 = reinterpret_cast< SwaptionHelperPtr * >(argp1);
    {
      try {
        result = SwaptionHelperPtr_times(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        svs[i] = sv_newmortal();
        sv_setnv(svs[i], result[i]);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_SwaptionHelper) {
  {
    SwaptionHelperPtr *arg1 = (SwaptionHelperPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_SwaptionHelper(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SwaptionHelperPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SwaptionHelper" "', argument " "1"" of type '" "SwaptionHelperPtr *""'"); 
    }
    arg1 = reinterpret_cast< SwaptionHelperPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CapHelper__SWIG_0) {
  {
    Period *arg1 = 0 ;
    Handle< Quote > *arg2 = 0 ;
    IborIndexPtr *arg3 = 0 ;
    Frequency arg4 ;
    DayCounter *arg5 = 0 ;
    bool arg6 ;
    Handle< YieldTermStructure > *arg7 = 0 ;
    CalibrationHelper::CalibrationErrorType arg8 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    bool val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    int val8 ;
    int ecode8 = 0 ;
    int argvi = 0;
    CapHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 8) || (items > 8)) {
      SWIG_croak("Usage: new_CapHelper(length,volatility,index,fixedLegFrequency,fixedLegDayCounter,includeFirstSwaplet,termStructure,errorType);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CapHelper" "', argument " "1"" of type '" "Period const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CapHelper" "', argument " "1"" of type '" "Period const &""'"); 
    }
    arg1 = reinterpret_cast< Period * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CapHelper" "', argument " "2"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CapHelper" "', argument " "2"" of type '" "Handle< Quote > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< Quote > * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_IborIndexPtr,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CapHelper" "', argument " "3"" of type '" "IborIndexPtr const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CapHelper" "', argument " "3"" of type '" "IborIndexPtr const &""'"); 
    }
    arg3 = reinterpret_cast< IborIndexPtr * >(argp3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_CapHelper" "', argument " "4"" of type '" "Frequency""'");
    } 
    arg4 = static_cast< Frequency >(val4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_CapHelper" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CapHelper" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    arg5 = reinterpret_cast< DayCounter * >(argp5);
    ecode6 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_CapHelper" "', argument " "6"" of type '" "bool""'");
    } 
    arg6 = static_cast< bool >(val6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_CapHelper" "', argument " "7"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CapHelper" "', argument " "7"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg7 = reinterpret_cast< Handle< YieldTermStructure > * >(argp7);
    ecode8 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_CapHelper" "', argument " "8"" of type '" "CalibrationHelper::CalibrationErrorType""'");
    } 
    arg8 = static_cast< CalibrationHelper::CalibrationErrorType >(val8);
    {
      try {
        result = (CapHelperPtr *)new_CapHelperPtr__SWIG_0((Period const &)*arg1,(Handle< Quote > const &)*arg2,(IborIndexPtr const &)*arg3,arg4,(DayCounter const &)*arg5,arg6,(Handle< YieldTermStructure > const &)*arg7,arg8);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CapHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CapHelper__SWIG_1) {
  {
    Period *arg1 = 0 ;
    Handle< Quote > *arg2 = 0 ;
    IborIndexPtr *arg3 = 0 ;
    Frequency arg4 ;
    DayCounter *arg5 = 0 ;
    bool arg6 ;
    Handle< YieldTermStructure > *arg7 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    bool val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    int argvi = 0;
    CapHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: new_CapHelper(length,volatility,index,fixedLegFrequency,fixedLegDayCounter,includeFirstSwaplet,termStructure);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CapHelper" "', argument " "1"" of type '" "Period const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CapHelper" "', argument " "1"" of type '" "Period const &""'"); 
    }
    arg1 = reinterpret_cast< Period * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CapHelper" "', argument " "2"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CapHelper" "', argument " "2"" of type '" "Handle< Quote > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< Quote > * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_IborIndexPtr,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CapHelper" "', argument " "3"" of type '" "IborIndexPtr const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CapHelper" "', argument " "3"" of type '" "IborIndexPtr const &""'"); 
    }
    arg3 = reinterpret_cast< IborIndexPtr * >(argp3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_CapHelper" "', argument " "4"" of type '" "Frequency""'");
    } 
    arg4 = static_cast< Frequency >(val4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_CapHelper" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CapHelper" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    arg5 = reinterpret_cast< DayCounter * >(argp5);
    ecode6 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_CapHelper" "', argument " "6"" of type '" "bool""'");
    } 
    arg6 = static_cast< bool >(val6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_CapHelper" "', argument " "7"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CapHelper" "', argument " "7"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg7 = reinterpret_cast< Handle< YieldTermStructure > * >(argp7);
    {
      try {
        result = (CapHelperPtr *)new_CapHelperPtr__SWIG_0((Period const &)*arg1,(Handle< Quote > const &)*arg2,(IborIndexPtr const &)*arg3,arg4,(DayCounter const &)*arg5,arg6,(Handle< YieldTermStructure > const &)*arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CapHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CapHelper) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_IborIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 8) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_IborIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_CapHelper__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_CapHelper__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_CapHelper'");
  XSRETURN(0);
}


XS(_wrap_CapHelper_times) {
  {
    CapHelperPtr *arg1 = (CapHelperPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Time > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CapHelper_times(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CapHelperPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CapHelper_times" "', argument " "1"" of type '" "CapHelperPtr *""'"); 
    }
    arg1 = reinterpret_cast< CapHelperPtr * >(argp1);
    {
      try {
        result = CapHelperPtr_times(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        svs[i] = sv_newmortal();
        sv_setnv(svs[i], result[i]);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_CapHelper) {
  {
    CapHelperPtr *arg1 = (CapHelperPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_CapHelper(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CapHelperPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CapHelper" "', argument " "1"" of type '" "CapHelperPtr *""'"); 
    }
    arg1 = reinterpret_cast< CapHelperPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_HestonModelHelper__SWIG_0) {
  {
    Period *arg1 = 0 ;
    Calendar *arg2 = 0 ;
    Real arg3 ;
    Real arg4 ;
    Handle< Quote > *arg5 = 0 ;
    Handle< YieldTermStructure > *arg6 = 0 ;
    Handle< YieldTermStructure > *arg7 = 0 ;
    CalibrationHelper::CalibrationErrorType arg8 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    int val8 ;
    int ecode8 = 0 ;
    int argvi = 0;
    HestonModelHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 8) || (items > 8)) {
      SWIG_croak("Usage: new_HestonModelHelper(maturity,calendar,s0,strikePrice,volatility,riskFreeRate,dividendYield,errorType);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_HestonModelHelper" "', argument " "1"" of type '" "Period const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_HestonModelHelper" "', argument " "1"" of type '" "Period const &""'"); 
    }
    arg1 = reinterpret_cast< Period * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_HestonModelHelper" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_HestonModelHelper" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_HestonModelHelper" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_HestonModelHelper" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_HestonModelHelper" "', argument " "5"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_HestonModelHelper" "', argument " "5"" of type '" "Handle< Quote > const &""'"); 
    }
    arg5 = reinterpret_cast< Handle< Quote > * >(argp5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_HestonModelHelper" "', argument " "6"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_HestonModelHelper" "', argument " "6"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg6 = reinterpret_cast< Handle< YieldTermStructure > * >(argp6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_HestonModelHelper" "', argument " "7"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_HestonModelHelper" "', argument " "7"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg7 = reinterpret_cast< Handle< YieldTermStructure > * >(argp7);
    ecode8 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_HestonModelHelper" "', argument " "8"" of type '" "CalibrationHelper::CalibrationErrorType""'");
    } 
    arg8 = static_cast< CalibrationHelper::CalibrationErrorType >(val8);
    {
      try {
        result = (HestonModelHelperPtr *)new_HestonModelHelperPtr__SWIG_0((Period const &)*arg1,(Calendar const &)*arg2,arg3,arg4,(Handle< Quote > const &)*arg5,(Handle< YieldTermStructure > const &)*arg6,(Handle< YieldTermStructure > const &)*arg7,arg8);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_HestonModelHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_HestonModelHelper__SWIG_1) {
  {
    Period *arg1 = 0 ;
    Calendar *arg2 = 0 ;
    Real arg3 ;
    Real arg4 ;
    Handle< Quote > *arg5 = 0 ;
    Handle< YieldTermStructure > *arg6 = 0 ;
    Handle< YieldTermStructure > *arg7 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    int argvi = 0;
    HestonModelHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: new_HestonModelHelper(maturity,calendar,s0,strikePrice,volatility,riskFreeRate,dividendYield);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_HestonModelHelper" "', argument " "1"" of type '" "Period const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_HestonModelHelper" "', argument " "1"" of type '" "Period const &""'"); 
    }
    arg1 = reinterpret_cast< Period * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_HestonModelHelper" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_HestonModelHelper" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_HestonModelHelper" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_HestonModelHelper" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_HestonModelHelper" "', argument " "5"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_HestonModelHelper" "', argument " "5"" of type '" "Handle< Quote > const &""'"); 
    }
    arg5 = reinterpret_cast< Handle< Quote > * >(argp5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_HestonModelHelper" "', argument " "6"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_HestonModelHelper" "', argument " "6"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg6 = reinterpret_cast< Handle< YieldTermStructure > * >(argp6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_HestonModelHelper" "', argument " "7"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_HestonModelHelper" "', argument " "7"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg7 = reinterpret_cast< Handle< YieldTermStructure > * >(argp7);
    {
      try {
        result = (HestonModelHelperPtr *)new_HestonModelHelperPtr__SWIG_0((Period const &)*arg1,(Calendar const &)*arg2,arg3,arg4,(Handle< Quote > const &)*arg5,(Handle< YieldTermStructure > const &)*arg6,(Handle< YieldTermStructure > const &)*arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_HestonModelHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_HestonModelHelper) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 8) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_HestonModelHelper__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_HestonModelHelper__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_HestonModelHelper'");
  XSRETURN(0);
}


XS(_wrap_delete_HestonModelHelper) {
  {
    HestonModelHelperPtr *arg1 = (HestonModelHelperPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_HestonModelHelper(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HestonModelHelperPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_HestonModelHelper" "', argument " "1"" of type '" "HestonModelHelperPtr *""'"); 
    }
    arg1 = reinterpret_cast< HestonModelHelperPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CalibrationHelperVector__SWIG_0) {
  {
    unsigned int arg1 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    std::vector< boost::shared_ptr< CalibrationHelper > > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_CalibrationHelperVector(size);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_CalibrationHelperVector" "', argument " "1"" of type '" "unsigned int""'");
    } 
    arg1 = static_cast< unsigned int >(val1);
    {
      try {
        result = (std::vector< boost::shared_ptr< CalibrationHelper > > *)new std::vector< boost::shared_ptr< CalibrationHelper > >(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CalibrationHelper_t_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CalibrationHelperVector__SWIG_1) {
  {
    int argvi = 0;
    std::vector< boost::shared_ptr< CalibrationHelper > > *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_CalibrationHelperVector();");
    }
    {
      try {
        result = (std::vector< boost::shared_ptr< CalibrationHelper > > *)new std::vector< boost::shared_ptr< CalibrationHelper > >();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CalibrationHelper_t_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_CalibrationHelperVector__SWIG_2) {
  {
    unsigned int arg1 ;
    boost::shared_ptr< CalibrationHelper > *arg2 = 0 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    std::vector< boost::shared_ptr< CalibrationHelper > > *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_CalibrationHelperVector(size,value);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_CalibrationHelperVector" "', argument " "1"" of type '" "unsigned int""'");
    } 
    arg1 = static_cast< unsigned int >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_boost__shared_ptrT_CalibrationHelper_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CalibrationHelperVector" "', argument " "2"" of type '" "boost::shared_ptr< CalibrationHelper > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CalibrationHelperVector" "', argument " "2"" of type '" "boost::shared_ptr< CalibrationHelper > const &""'"); 
    }
    arg2 = reinterpret_cast< boost::shared_ptr< CalibrationHelper > * >(argp2);
    {
      try {
        result = (std::vector< boost::shared_ptr< CalibrationHelper > > *)new std::vector< boost::shared_ptr< CalibrationHelper > >(arg1,(boost::shared_ptr< CalibrationHelper > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CalibrationHelper_t_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CalibrationHelperVector__SWIG_3) {
  {
    std::vector< boost::shared_ptr< CalibrationHelper > > *arg1 = 0 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > temp1 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > *v1 ;
    int argvi = 0;
    std::vector< boost::shared_ptr< CalibrationHelper > > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_CalibrationHelperVector(std::vector< boost::shared_ptr< CalibrationHelper > > const &);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CalibrationHelper_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_CalibrationHelperVector. "
          "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CalibrationHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CalibrationHelper_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_CalibrationHelperVector. "
              "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_CalibrationHelperVector. "
          "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
      }
    }
    {
      try {
        result = (std::vector< boost::shared_ptr< CalibrationHelper > > *)new std::vector< boost::shared_ptr< CalibrationHelper > >((std::vector< boost::shared_ptr< CalibrationHelper > > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CalibrationHelper_t_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CalibrationHelperVector) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< CalibrationHelper > >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CalibrationHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< CalibrationHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_CalibrationHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_boost__shared_ptrT_CalibrationHelper_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_CalibrationHelperVector__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_CalibrationHelperVector__SWIG_0); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_CalibrationHelperVector__SWIG_3); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_CalibrationHelperVector__SWIG_2); return;
    }
  }
  
  croak("No matching function for overloaded 'new_CalibrationHelperVector'");
  XSRETURN(0);
}


XS(_wrap_CalibrationHelperVector_size) {
  {
    std::vector< boost::shared_ptr< CalibrationHelper > > *arg1 = (std::vector< boost::shared_ptr< CalibrationHelper > > *) 0 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > temp1 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > *v1 ;
    int argvi = 0;
    unsigned int result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CalibrationHelperVector_size(self);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CalibrationHelper_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of CalibrationHelperVector_size. "
          "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CalibrationHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CalibrationHelper_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "CalibrationHelperVector_size. "
              "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of CalibrationHelperVector_size. "
          "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
      }
    }
    {
      try {
        result = (unsigned int)((std::vector< boost::shared_ptr< CalibrationHelper > > const *)arg1)->size();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CalibrationHelperVector_empty) {
  {
    std::vector< boost::shared_ptr< CalibrationHelper > > *arg1 = (std::vector< boost::shared_ptr< CalibrationHelper > > *) 0 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > temp1 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > *v1 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CalibrationHelperVector_empty(self);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CalibrationHelper_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of CalibrationHelperVector_empty. "
          "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CalibrationHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CalibrationHelper_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "CalibrationHelperVector_empty. "
              "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of CalibrationHelperVector_empty. "
          "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
      }
    }
    {
      try {
        result = (bool)((std::vector< boost::shared_ptr< CalibrationHelper > > const *)arg1)->empty();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CalibrationHelperVector_clear) {
  {
    std::vector< boost::shared_ptr< CalibrationHelper > > *arg1 = (std::vector< boost::shared_ptr< CalibrationHelper > > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CalibrationHelperVector_clear(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CalibrationHelper_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CalibrationHelperVector_clear" "', argument " "1"" of type '" "std::vector< boost::shared_ptr< CalibrationHelper > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< boost::shared_ptr< CalibrationHelper > > * >(argp1);
    {
      try {
        (arg1)->clear();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CalibrationHelperVector_push) {
  {
    std::vector< boost::shared_ptr< CalibrationHelper > > *arg1 = (std::vector< boost::shared_ptr< CalibrationHelper > > *) 0 ;
    boost::shared_ptr< CalibrationHelper > *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: CalibrationHelperVector_push(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CalibrationHelper_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CalibrationHelperVector_push" "', argument " "1"" of type '" "std::vector< boost::shared_ptr< CalibrationHelper > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< boost::shared_ptr< CalibrationHelper > > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_boost__shared_ptrT_CalibrationHelper_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CalibrationHelperVector_push" "', argument " "2"" of type '" "boost::shared_ptr< CalibrationHelper > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CalibrationHelperVector_push" "', argument " "2"" of type '" "boost::shared_ptr< CalibrationHelper > const &""'"); 
    }
    arg2 = reinterpret_cast< boost::shared_ptr< CalibrationHelper > * >(argp2);
    {
      try {
        (arg1)->push_back((boost::shared_ptr< CalibrationHelper > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CalibrationHelperVector_pop) {
  {
    std::vector< boost::shared_ptr< CalibrationHelper > > *arg1 = (std::vector< boost::shared_ptr< CalibrationHelper > > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    boost::shared_ptr< CalibrationHelper > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CalibrationHelperVector_pop(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CalibrationHelper_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CalibrationHelperVector_pop" "', argument " "1"" of type '" "std::vector< boost::shared_ptr< CalibrationHelper > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< boost::shared_ptr< CalibrationHelper > > * >(argp1);
    {
      try {
        try {
          result = std_vector_Sl_boost_shared_ptr_Sl_CalibrationHelper_Sg__Sg__pop(arg1);
        }
        catch(std::out_of_range &_e) {
          sv_setsv(get_sv("@", GV_ADD), SWIG_NewPointerObj((new std::out_of_range(static_cast< const std::out_of_range& >(_e))),SWIGTYPE_p_std__out_of_range,SWIG_POINTER_OWN)); SWIG_fail ;
        }
        
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new boost::shared_ptr< CalibrationHelper >(static_cast< const boost::shared_ptr< CalibrationHelper >& >(result))), SWIGTYPE_p_boost__shared_ptrT_CalibrationHelper_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CalibrationHelperVector_get) {
  {
    std::vector< boost::shared_ptr< CalibrationHelper > > *arg1 = (std::vector< boost::shared_ptr< CalibrationHelper > > *) 0 ;
    int arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    boost::shared_ptr< CalibrationHelper > *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: CalibrationHelperVector_get(self,i);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CalibrationHelper_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CalibrationHelperVector_get" "', argument " "1"" of type '" "std::vector< boost::shared_ptr< CalibrationHelper > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< boost::shared_ptr< CalibrationHelper > > * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CalibrationHelperVector_get" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    {
      try {
        try {
          result = (boost::shared_ptr< CalibrationHelper > *) &std_vector_Sl_boost_shared_ptr_Sl_CalibrationHelper_Sg__Sg__get(arg1,arg2);
        }
        catch(std::out_of_range &_e) {
          sv_setsv(get_sv("@", GV_ADD), SWIG_NewPointerObj((new std::out_of_range(static_cast< const std::out_of_range& >(_e))),SWIGTYPE_p_std__out_of_range,SWIG_POINTER_OWN)); SWIG_fail ;
        }
        
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_boost__shared_ptrT_CalibrationHelper_t, 0 | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CalibrationHelperVector_set) {
  {
    std::vector< boost::shared_ptr< CalibrationHelper > > *arg1 = (std::vector< boost::shared_ptr< CalibrationHelper > > *) 0 ;
    int arg2 ;
    boost::shared_ptr< CalibrationHelper > *arg3 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: CalibrationHelperVector_set(self,i,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CalibrationHelper_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CalibrationHelperVector_set" "', argument " "1"" of type '" "std::vector< boost::shared_ptr< CalibrationHelper > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< boost::shared_ptr< CalibrationHelper > > * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CalibrationHelperVector_set" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_boost__shared_ptrT_CalibrationHelper_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CalibrationHelperVector_set" "', argument " "3"" of type '" "boost::shared_ptr< CalibrationHelper > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CalibrationHelperVector_set" "', argument " "3"" of type '" "boost::shared_ptr< CalibrationHelper > const &""'"); 
    }
    arg3 = reinterpret_cast< boost::shared_ptr< CalibrationHelper > * >(argp3);
    {
      try {
        try {
          std_vector_Sl_boost_shared_ptr_Sl_CalibrationHelper_Sg__Sg__set(arg1,arg2,(boost::shared_ptr< CalibrationHelper > const &)*arg3);
        }
        catch(std::out_of_range &_e) {
          sv_setsv(get_sv("@", GV_ADD), SWIG_NewPointerObj((new std::out_of_range(static_cast< const std::out_of_range& >(_e))),SWIGTYPE_p_std__out_of_range,SWIG_POINTER_OWN)); SWIG_fail ;
        }
        
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_CalibrationHelperVector) {
  {
    std::vector< boost::shared_ptr< CalibrationHelper > > *arg1 = (std::vector< boost::shared_ptr< CalibrationHelper > > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_CalibrationHelperVector(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CalibrationHelper_t_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CalibrationHelperVector" "', argument " "1"" of type '" "std::vector< boost::shared_ptr< CalibrationHelper > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< boost::shared_ptr< CalibrationHelper > > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CalibratedModel___deref__) {
  {
    boost::shared_ptr< CalibratedModel > *arg1 = (boost::shared_ptr< CalibratedModel > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    CalibratedModel *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CalibratedModel___deref__(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_CalibratedModel_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CalibratedModel___deref__" "', argument " "1"" of type '" "boost::shared_ptr< CalibratedModel > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< CalibratedModel > * >(argp1);
    {
      try {
        result = (CalibratedModel *)(arg1)->operator ->();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CalibratedModel, 0 | 0); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CalibratedModel_isNull) {
  {
    boost::shared_ptr< CalibratedModel > *arg1 = (boost::shared_ptr< CalibratedModel > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CalibratedModel_isNull(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_CalibratedModel_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CalibratedModel_isNull" "', argument " "1"" of type '" "boost::shared_ptr< CalibratedModel > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< CalibratedModel > * >(argp1);
    {
      try {
        result = (bool)boost_shared_ptr_Sl_CalibratedModel_Sg__isNull(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CalibratedModel_asObservable) {
  {
    boost::shared_ptr< CalibratedModel > *arg1 = (boost::shared_ptr< CalibratedModel > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    boost::shared_ptr< Observable > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CalibratedModel_asObservable(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_CalibratedModel_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CalibratedModel_asObservable" "', argument " "1"" of type '" "boost::shared_ptr< CalibratedModel > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< CalibratedModel > * >(argp1);
    {
      try {
        result = boost_shared_ptr_Sl_CalibratedModel_Sg__asObservable(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new boost::shared_ptr< Observable >(static_cast< const boost::shared_ptr< Observable >& >(result))), SWIGTYPE_p_boost__shared_ptrT_Observable_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CalibratedModel) {
  {
    int argvi = 0;
    boost::shared_ptr< CalibratedModel > *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_CalibratedModel();");
    }
    {
      try {
        result = (boost::shared_ptr< CalibratedModel > *)new boost::shared_ptr< CalibratedModel >();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_boost__shared_ptrT_CalibratedModel_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_CalibratedModel) {
  {
    boost::shared_ptr< CalibratedModel > *arg1 = (boost::shared_ptr< CalibratedModel > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_CalibratedModel(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_CalibratedModel_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CalibratedModel" "', argument " "1"" of type '" "boost::shared_ptr< CalibratedModel > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< CalibratedModel > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CalibratedModel_params) {
  {
    boost::shared_ptr< CalibratedModel > *arg1 = (boost::shared_ptr< CalibratedModel > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Array result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CalibratedModel_params(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_CalibratedModel_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CalibratedModel_params" "', argument " "1"" of type '" "boost::shared_ptr< CalibratedModel > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< CalibratedModel > * >(argp1);
    {
      try {
        result = (*arg1)->params();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Array(static_cast< const Array& >(result))), SWIGTYPE_p_Array, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CalibratedModel_calibrate__SWIG_0) {
  {
    boost::shared_ptr< CalibratedModel > *arg1 = (boost::shared_ptr< CalibratedModel > *) 0 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > *arg2 = 0 ;
    OptimizationMethod *arg3 = 0 ;
    EndCriteria *arg4 = 0 ;
    Constraint *arg5 = 0 ;
    std::vector< Real > *arg6 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > temp2 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > *v2 ;
    void *argp3 = 0 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    std::vector< double > temp6 ;
    std::vector< double > *v6 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: CalibratedModel_calibrate(self,std::vector< boost::shared_ptr< CalibrationHelper > > const &,OptimizationMethod &,EndCriteria const &,constraint,weights);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_CalibratedModel_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CalibratedModel_calibrate" "', argument " "1"" of type '" "boost::shared_ptr< CalibratedModel > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< CalibratedModel > * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CalibrationHelper_t_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of CalibratedModel_calibrate. "
          "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CalibrationHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CalibrationHelper_t,0) != -1) {
            temp2.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 2 of "
              "CalibratedModel_calibrate. "
              "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of CalibratedModel_calibrate. "
          "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_OptimizationMethod,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CalibratedModel_calibrate" "', argument " "3"" of type '" "OptimizationMethod &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CalibratedModel_calibrate" "', argument " "3"" of type '" "OptimizationMethod &""'"); 
    }
    arg3 = reinterpret_cast< OptimizationMethod * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_EndCriteria,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "CalibratedModel_calibrate" "', argument " "4"" of type '" "EndCriteria const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CalibratedModel_calibrate" "', argument " "4"" of type '" "EndCriteria const &""'"); 
    }
    arg4 = reinterpret_cast< EndCriteria * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Constraint,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "CalibratedModel_calibrate" "', argument " "5"" of type '" "Constraint const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CalibratedModel_calibrate" "', argument " "5"" of type '" "Constraint const &""'"); 
    }
    arg5 = reinterpret_cast< Constraint * >(argp5);
    {
      if (SWIG_ConvertPtr(ST(5),(void **) &v6, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg6 = v6;
      } else if (SvROK(ST(5))) {
        AV *av = (AV *)SvRV(ST(5));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 6 of CalibratedModel_calibrate. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp6.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 6 of "
              "CalibratedModel_calibrate. "
              "Expected an array of ""double");
          }
        }
        arg6 = &temp6;
      } else {
        SWIG_croak("Type error in argument 6 of CalibratedModel_calibrate. "
          "Expected an array of ""double");
      }
    }
    {
      try {
        (*arg1)->calibrate((std::vector< boost::shared_ptr< CalibrationHelper > > const &)*arg2,*arg3,(EndCriteria const &)*arg4,(Constraint const &)*arg5,(std::vector< Real > const &)*arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CalibratedModel_calibrate__SWIG_1) {
  {
    boost::shared_ptr< CalibratedModel > *arg1 = (boost::shared_ptr< CalibratedModel > *) 0 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > *arg2 = 0 ;
    OptimizationMethod *arg3 = 0 ;
    EndCriteria *arg4 = 0 ;
    Constraint *arg5 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > temp2 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > *v2 ;
    void *argp3 = 0 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: CalibratedModel_calibrate(self,std::vector< boost::shared_ptr< CalibrationHelper > > const &,OptimizationMethod &,EndCriteria const &,constraint);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_CalibratedModel_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CalibratedModel_calibrate" "', argument " "1"" of type '" "boost::shared_ptr< CalibratedModel > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< CalibratedModel > * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CalibrationHelper_t_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of CalibratedModel_calibrate. "
          "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CalibrationHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CalibrationHelper_t,0) != -1) {
            temp2.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 2 of "
              "CalibratedModel_calibrate. "
              "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of CalibratedModel_calibrate. "
          "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_OptimizationMethod,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CalibratedModel_calibrate" "', argument " "3"" of type '" "OptimizationMethod &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CalibratedModel_calibrate" "', argument " "3"" of type '" "OptimizationMethod &""'"); 
    }
    arg3 = reinterpret_cast< OptimizationMethod * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_EndCriteria,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "CalibratedModel_calibrate" "', argument " "4"" of type '" "EndCriteria const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CalibratedModel_calibrate" "', argument " "4"" of type '" "EndCriteria const &""'"); 
    }
    arg4 = reinterpret_cast< EndCriteria * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Constraint,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "CalibratedModel_calibrate" "', argument " "5"" of type '" "Constraint const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CalibratedModel_calibrate" "', argument " "5"" of type '" "Constraint const &""'"); 
    }
    arg5 = reinterpret_cast< Constraint * >(argp5);
    {
      try {
        (*arg1)->calibrate((std::vector< boost::shared_ptr< CalibrationHelper > > const &)*arg2,*arg3,(EndCriteria const &)*arg4,(Constraint const &)*arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CalibratedModel_calibrate__SWIG_2) {
  {
    boost::shared_ptr< CalibratedModel > *arg1 = (boost::shared_ptr< CalibratedModel > *) 0 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > *arg2 = 0 ;
    OptimizationMethod *arg3 = 0 ;
    EndCriteria *arg4 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > temp2 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > *v2 ;
    void *argp3 = 0 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: CalibratedModel_calibrate(self,std::vector< boost::shared_ptr< CalibrationHelper > > const &,OptimizationMethod &,EndCriteria const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_CalibratedModel_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CalibratedModel_calibrate" "', argument " "1"" of type '" "boost::shared_ptr< CalibratedModel > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< CalibratedModel > * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CalibrationHelper_t_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of CalibratedModel_calibrate. "
          "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CalibrationHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CalibrationHelper_t,0) != -1) {
            temp2.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 2 of "
              "CalibratedModel_calibrate. "
              "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of CalibratedModel_calibrate. "
          "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_OptimizationMethod,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CalibratedModel_calibrate" "', argument " "3"" of type '" "OptimizationMethod &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CalibratedModel_calibrate" "', argument " "3"" of type '" "OptimizationMethod &""'"); 
    }
    arg3 = reinterpret_cast< OptimizationMethod * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_EndCriteria,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "CalibratedModel_calibrate" "', argument " "4"" of type '" "EndCriteria const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CalibratedModel_calibrate" "', argument " "4"" of type '" "EndCriteria const &""'"); 
    }
    arg4 = reinterpret_cast< EndCriteria * >(argp4);
    {
      try {
        (*arg1)->calibrate((std::vector< boost::shared_ptr< CalibrationHelper > > const &)*arg2,*arg3,(EndCriteria const &)*arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CalibratedModel_calibrate) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_CalibratedModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< CalibrationHelper > >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CalibrationHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< CalibrationHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_CalibrationHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_OptimizationMethod, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_EndCriteria, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_CalibratedModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< CalibrationHelper > >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CalibrationHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< CalibrationHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_CalibrationHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_OptimizationMethod, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_EndCriteria, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Constraint, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_CalibratedModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< CalibrationHelper > >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CalibrationHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< CalibrationHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_CalibrationHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_OptimizationMethod, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_EndCriteria, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Constraint, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(5),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(5))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(5));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CalibratedModel_calibrate__SWIG_2); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CalibratedModel_calibrate__SWIG_1); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CalibratedModel_calibrate__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'CalibratedModel_calibrate'");
  XSRETURN(0);
}


XS(_wrap_CalibratedModel_setParams) {
  {
    boost::shared_ptr< CalibratedModel > *arg1 = (boost::shared_ptr< CalibratedModel > *) 0 ;
    Array *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: CalibratedModel_setParams(self,params);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_CalibratedModel_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CalibratedModel_setParams" "', argument " "1"" of type '" "boost::shared_ptr< CalibratedModel > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< CalibratedModel > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CalibratedModel_setParams" "', argument " "2"" of type '" "Array const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CalibratedModel_setParams" "', argument " "2"" of type '" "Array const &""'"); 
    }
    arg2 = reinterpret_cast< Array * >(argp2);
    {
      try {
        (*arg1)->setParams((Array const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CalibratedModel_value) {
  {
    boost::shared_ptr< CalibratedModel > *arg1 = (boost::shared_ptr< CalibratedModel > *) 0 ;
    Array *arg2 = 0 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > *arg3 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > temp3 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > *v3 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: CalibratedModel_value(self,params,std::vector< boost::shared_ptr< CalibrationHelper > > const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_CalibratedModel_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CalibratedModel_value" "', argument " "1"" of type '" "boost::shared_ptr< CalibratedModel > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< CalibratedModel > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CalibratedModel_value" "', argument " "2"" of type '" "Array const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CalibratedModel_value" "', argument " "2"" of type '" "Array const &""'"); 
    }
    arg2 = reinterpret_cast< Array * >(argp2);
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CalibrationHelper_t_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of CalibratedModel_value. "
          "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CalibrationHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CalibrationHelper_t,0) != -1) {
            temp3.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 3 of "
              "CalibratedModel_value. "
              "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of CalibratedModel_value. "
          "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
      }
    }
    {
      try {
        result = (Real)(*arg1)->value((Array const &)*arg2,(std::vector< boost::shared_ptr< CalibrationHelper > > const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CalibratedModelHandle__SWIG_0) {
  {
    boost::shared_ptr< CalibratedModel > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Handle< CalibratedModel > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_CalibratedModelHandle(boost::shared_ptr< CalibratedModel > const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_CalibratedModel_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CalibratedModelHandle" "', argument " "1"" of type '" "boost::shared_ptr< CalibratedModel > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CalibratedModelHandle" "', argument " "1"" of type '" "boost::shared_ptr< CalibratedModel > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< CalibratedModel > * >(argp1);
    {
      try {
        result = (Handle< CalibratedModel > *)new Handle< CalibratedModel >((boost::shared_ptr< CalibratedModel > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_HandleT_CalibratedModel_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CalibratedModelHandle__SWIG_1) {
  {
    int argvi = 0;
    Handle< CalibratedModel > *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_CalibratedModelHandle();");
    }
    {
      try {
        result = (Handle< CalibratedModel > *)new Handle< CalibratedModel >();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_HandleT_CalibratedModel_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_CalibratedModelHandle) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_CalibratedModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_CalibratedModelHandle__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_CalibratedModelHandle__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_CalibratedModelHandle'");
  XSRETURN(0);
}


XS(_wrap_CalibratedModelHandle___deref__) {
  {
    Handle< CalibratedModel > *arg1 = (Handle< CalibratedModel > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    boost::shared_ptr< CalibratedModel > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CalibratedModelHandle___deref__(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_CalibratedModel_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CalibratedModelHandle___deref__" "', argument " "1"" of type '" "Handle< CalibratedModel > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< CalibratedModel > * >(argp1);
    {
      try {
        result = (arg1)->operator ->();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new boost::shared_ptr< CalibratedModel >(static_cast< const boost::shared_ptr< CalibratedModel >& >(result))), SWIGTYPE_p_boost__shared_ptrT_CalibratedModel_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CalibratedModelHandle_empty) {
  {
    Handle< CalibratedModel > *arg1 = (Handle< CalibratedModel > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CalibratedModelHandle_empty(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_CalibratedModel_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CalibratedModelHandle_empty" "', argument " "1"" of type '" "Handle< CalibratedModel > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< CalibratedModel > * >(argp1);
    {
      try {
        result = (bool)(arg1)->empty();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CalibratedModelHandle_asObservable) {
  {
    Handle< CalibratedModel > *arg1 = (Handle< CalibratedModel > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    boost::shared_ptr< Observable > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CalibratedModelHandle_asObservable(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_CalibratedModel_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CalibratedModelHandle_asObservable" "', argument " "1"" of type '" "Handle< CalibratedModel > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< CalibratedModel > * >(argp1);
    {
      try {
        result = Handle_Sl_CalibratedModel_Sg__asObservable(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new boost::shared_ptr< Observable >(static_cast< const boost::shared_ptr< Observable >& >(result))), SWIGTYPE_p_boost__shared_ptrT_Observable_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_CalibratedModelHandle) {
  {
    Handle< CalibratedModel > *arg1 = (Handle< CalibratedModel > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_CalibratedModelHandle(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_CalibratedModel_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CalibratedModelHandle" "', argument " "1"" of type '" "Handle< CalibratedModel > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< CalibratedModel > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CalibratedModelHandle_params) {
  {
    Handle< CalibratedModel > *arg1 = (Handle< CalibratedModel > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Array result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CalibratedModelHandle_params(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_CalibratedModel_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CalibratedModelHandle_params" "', argument " "1"" of type '" "Handle< CalibratedModel > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< CalibratedModel > * >(argp1);
    {
      try {
        result = (*arg1)->params();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Array(static_cast< const Array& >(result))), SWIGTYPE_p_Array, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CalibratedModelHandle_calibrate__SWIG_0) {
  {
    Handle< CalibratedModel > *arg1 = (Handle< CalibratedModel > *) 0 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > *arg2 = 0 ;
    OptimizationMethod *arg3 = 0 ;
    EndCriteria *arg4 = 0 ;
    Constraint *arg5 = 0 ;
    std::vector< Real > *arg6 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > temp2 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > *v2 ;
    void *argp3 = 0 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    std::vector< double > temp6 ;
    std::vector< double > *v6 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: CalibratedModelHandle_calibrate(self,std::vector< boost::shared_ptr< CalibrationHelper > > const &,OptimizationMethod &,EndCriteria const &,constraint,weights);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_CalibratedModel_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CalibratedModelHandle_calibrate" "', argument " "1"" of type '" "Handle< CalibratedModel > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< CalibratedModel > * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CalibrationHelper_t_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of CalibratedModelHandle_calibrate. "
          "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CalibrationHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CalibrationHelper_t,0) != -1) {
            temp2.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 2 of "
              "CalibratedModelHandle_calibrate. "
              "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of CalibratedModelHandle_calibrate. "
          "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_OptimizationMethod,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CalibratedModelHandle_calibrate" "', argument " "3"" of type '" "OptimizationMethod &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CalibratedModelHandle_calibrate" "', argument " "3"" of type '" "OptimizationMethod &""'"); 
    }
    arg3 = reinterpret_cast< OptimizationMethod * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_EndCriteria,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "CalibratedModelHandle_calibrate" "', argument " "4"" of type '" "EndCriteria const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CalibratedModelHandle_calibrate" "', argument " "4"" of type '" "EndCriteria const &""'"); 
    }
    arg4 = reinterpret_cast< EndCriteria * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Constraint,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "CalibratedModelHandle_calibrate" "', argument " "5"" of type '" "Constraint const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CalibratedModelHandle_calibrate" "', argument " "5"" of type '" "Constraint const &""'"); 
    }
    arg5 = reinterpret_cast< Constraint * >(argp5);
    {
      if (SWIG_ConvertPtr(ST(5),(void **) &v6, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg6 = v6;
      } else if (SvROK(ST(5))) {
        AV *av = (AV *)SvRV(ST(5));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 6 of CalibratedModelHandle_calibrate. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp6.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 6 of "
              "CalibratedModelHandle_calibrate. "
              "Expected an array of ""double");
          }
        }
        arg6 = &temp6;
      } else {
        SWIG_croak("Type error in argument 6 of CalibratedModelHandle_calibrate. "
          "Expected an array of ""double");
      }
    }
    {
      try {
        (*arg1)->calibrate((std::vector< boost::shared_ptr< CalibrationHelper > > const &)*arg2,*arg3,(EndCriteria const &)*arg4,(Constraint const &)*arg5,(std::vector< Real > const &)*arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CalibratedModelHandle_calibrate__SWIG_1) {
  {
    Handle< CalibratedModel > *arg1 = (Handle< CalibratedModel > *) 0 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > *arg2 = 0 ;
    OptimizationMethod *arg3 = 0 ;
    EndCriteria *arg4 = 0 ;
    Constraint *arg5 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > temp2 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > *v2 ;
    void *argp3 = 0 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: CalibratedModelHandle_calibrate(self,std::vector< boost::shared_ptr< CalibrationHelper > > const &,OptimizationMethod &,EndCriteria const &,constraint);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_CalibratedModel_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CalibratedModelHandle_calibrate" "', argument " "1"" of type '" "Handle< CalibratedModel > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< CalibratedModel > * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CalibrationHelper_t_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of CalibratedModelHandle_calibrate. "
          "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CalibrationHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CalibrationHelper_t,0) != -1) {
            temp2.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 2 of "
              "CalibratedModelHandle_calibrate. "
              "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of CalibratedModelHandle_calibrate. "
          "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_OptimizationMethod,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CalibratedModelHandle_calibrate" "', argument " "3"" of type '" "OptimizationMethod &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CalibratedModelHandle_calibrate" "', argument " "3"" of type '" "OptimizationMethod &""'"); 
    }
    arg3 = reinterpret_cast< OptimizationMethod * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_EndCriteria,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "CalibratedModelHandle_calibrate" "', argument " "4"" of type '" "EndCriteria const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CalibratedModelHandle_calibrate" "', argument " "4"" of type '" "EndCriteria const &""'"); 
    }
    arg4 = reinterpret_cast< EndCriteria * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Constraint,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "CalibratedModelHandle_calibrate" "', argument " "5"" of type '" "Constraint const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CalibratedModelHandle_calibrate" "', argument " "5"" of type '" "Constraint const &""'"); 
    }
    arg5 = reinterpret_cast< Constraint * >(argp5);
    {
      try {
        (*arg1)->calibrate((std::vector< boost::shared_ptr< CalibrationHelper > > const &)*arg2,*arg3,(EndCriteria const &)*arg4,(Constraint const &)*arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CalibratedModelHandle_calibrate__SWIG_2) {
  {
    Handle< CalibratedModel > *arg1 = (Handle< CalibratedModel > *) 0 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > *arg2 = 0 ;
    OptimizationMethod *arg3 = 0 ;
    EndCriteria *arg4 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > temp2 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > *v2 ;
    void *argp3 = 0 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: CalibratedModelHandle_calibrate(self,std::vector< boost::shared_ptr< CalibrationHelper > > const &,OptimizationMethod &,EndCriteria const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_CalibratedModel_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CalibratedModelHandle_calibrate" "', argument " "1"" of type '" "Handle< CalibratedModel > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< CalibratedModel > * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CalibrationHelper_t_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of CalibratedModelHandle_calibrate. "
          "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CalibrationHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CalibrationHelper_t,0) != -1) {
            temp2.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 2 of "
              "CalibratedModelHandle_calibrate. "
              "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of CalibratedModelHandle_calibrate. "
          "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_OptimizationMethod,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CalibratedModelHandle_calibrate" "', argument " "3"" of type '" "OptimizationMethod &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CalibratedModelHandle_calibrate" "', argument " "3"" of type '" "OptimizationMethod &""'"); 
    }
    arg3 = reinterpret_cast< OptimizationMethod * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_EndCriteria,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "CalibratedModelHandle_calibrate" "', argument " "4"" of type '" "EndCriteria const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CalibratedModelHandle_calibrate" "', argument " "4"" of type '" "EndCriteria const &""'"); 
    }
    arg4 = reinterpret_cast< EndCriteria * >(argp4);
    {
      try {
        (*arg1)->calibrate((std::vector< boost::shared_ptr< CalibrationHelper > > const &)*arg2,*arg3,(EndCriteria const &)*arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CalibratedModelHandle_calibrate) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_CalibratedModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< CalibrationHelper > >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CalibrationHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< CalibrationHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_CalibrationHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_OptimizationMethod, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_EndCriteria, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_CalibratedModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< CalibrationHelper > >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CalibrationHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< CalibrationHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_CalibrationHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_OptimizationMethod, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_EndCriteria, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Constraint, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_CalibratedModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< CalibrationHelper > >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CalibrationHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< CalibrationHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_CalibrationHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_OptimizationMethod, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_EndCriteria, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Constraint, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(5),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(5))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(5));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CalibratedModelHandle_calibrate__SWIG_2); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CalibratedModelHandle_calibrate__SWIG_1); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CalibratedModelHandle_calibrate__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'CalibratedModelHandle_calibrate'");
  XSRETURN(0);
}


XS(_wrap_CalibratedModelHandle_setParams) {
  {
    Handle< CalibratedModel > *arg1 = (Handle< CalibratedModel > *) 0 ;
    Array *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: CalibratedModelHandle_setParams(self,params);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_CalibratedModel_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CalibratedModelHandle_setParams" "', argument " "1"" of type '" "Handle< CalibratedModel > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< CalibratedModel > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CalibratedModelHandle_setParams" "', argument " "2"" of type '" "Array const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CalibratedModelHandle_setParams" "', argument " "2"" of type '" "Array const &""'"); 
    }
    arg2 = reinterpret_cast< Array * >(argp2);
    {
      try {
        (*arg1)->setParams((Array const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CalibratedModelHandle_value) {
  {
    Handle< CalibratedModel > *arg1 = (Handle< CalibratedModel > *) 0 ;
    Array *arg2 = 0 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > *arg3 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > temp3 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > *v3 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: CalibratedModelHandle_value(self,params,std::vector< boost::shared_ptr< CalibrationHelper > > const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_CalibratedModel_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CalibratedModelHandle_value" "', argument " "1"" of type '" "Handle< CalibratedModel > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< CalibratedModel > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CalibratedModelHandle_value" "', argument " "2"" of type '" "Array const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CalibratedModelHandle_value" "', argument " "2"" of type '" "Array const &""'"); 
    }
    arg2 = reinterpret_cast< Array * >(argp2);
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CalibrationHelper_t_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of CalibratedModelHandle_value. "
          "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CalibrationHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CalibrationHelper_t,0) != -1) {
            temp3.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 3 of "
              "CalibratedModelHandle_value. "
              "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of CalibratedModelHandle_value. "
          "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
      }
    }
    {
      try {
        result = (Real)(*arg1)->value((Array const &)*arg2,(std::vector< boost::shared_ptr< CalibrationHelper > > const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_RelinkableCalibratedModelHandle__SWIG_0) {
  {
    boost::shared_ptr< CalibratedModel > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    RelinkableHandle< CalibratedModel > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_RelinkableCalibratedModelHandle(boost::shared_ptr< CalibratedModel > const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_CalibratedModel_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_RelinkableCalibratedModelHandle" "', argument " "1"" of type '" "boost::shared_ptr< CalibratedModel > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_RelinkableCalibratedModelHandle" "', argument " "1"" of type '" "boost::shared_ptr< CalibratedModel > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< CalibratedModel > * >(argp1);
    {
      try {
        result = (RelinkableHandle< CalibratedModel > *)new RelinkableHandle< CalibratedModel >((boost::shared_ptr< CalibratedModel > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_RelinkableHandleT_CalibratedModel_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_RelinkableCalibratedModelHandle__SWIG_1) {
  {
    int argvi = 0;
    RelinkableHandle< CalibratedModel > *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_RelinkableCalibratedModelHandle();");
    }
    {
      try {
        result = (RelinkableHandle< CalibratedModel > *)new RelinkableHandle< CalibratedModel >();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_RelinkableHandleT_CalibratedModel_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_RelinkableCalibratedModelHandle) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_CalibratedModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_RelinkableCalibratedModelHandle__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_RelinkableCalibratedModelHandle__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_RelinkableCalibratedModelHandle'");
  XSRETURN(0);
}


XS(_wrap_RelinkableCalibratedModelHandle_linkTo) {
  {
    RelinkableHandle< CalibratedModel > *arg1 = (RelinkableHandle< CalibratedModel > *) 0 ;
    boost::shared_ptr< CalibratedModel > *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: RelinkableCalibratedModelHandle_linkTo(self,boost::shared_ptr< CalibratedModel > const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_RelinkableHandleT_CalibratedModel_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RelinkableCalibratedModelHandle_linkTo" "', argument " "1"" of type '" "RelinkableHandle< CalibratedModel > *""'"); 
    }
    arg1 = reinterpret_cast< RelinkableHandle< CalibratedModel > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_boost__shared_ptrT_CalibratedModel_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "RelinkableCalibratedModelHandle_linkTo" "', argument " "2"" of type '" "boost::shared_ptr< CalibratedModel > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "RelinkableCalibratedModelHandle_linkTo" "', argument " "2"" of type '" "boost::shared_ptr< CalibratedModel > const &""'"); 
    }
    arg2 = reinterpret_cast< boost::shared_ptr< CalibratedModel > * >(argp2);
    {
      try {
        (arg1)->linkTo((boost::shared_ptr< CalibratedModel > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_RelinkableCalibratedModelHandle) {
  {
    RelinkableHandle< CalibratedModel > *arg1 = (RelinkableHandle< CalibratedModel > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_RelinkableCalibratedModelHandle(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_RelinkableHandleT_CalibratedModel_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_RelinkableCalibratedModelHandle" "', argument " "1"" of type '" "RelinkableHandle< CalibratedModel > *""'"); 
    }
    arg1 = reinterpret_cast< RelinkableHandle< CalibratedModel > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_TimeGrid__SWIG_0) {
  {
    int argvi = 0;
    TimeGrid *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_TimeGrid();");
    }
    {
      try {
        result = (TimeGrid *)new TimeGrid();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TimeGrid, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_TimeGrid__SWIG_1) {
  {
    Time arg1 ;
    Size arg2 ;
    double val1 ;
    int ecode1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    TimeGrid *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_TimeGrid(end,steps);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_TimeGrid" "', argument " "1"" of type '" "Time""'");
    } 
    arg1 = static_cast< Time >(val1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_TimeGrid" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    {
      try {
        result = (TimeGrid *)new TimeGrid(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TimeGrid, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_TimeGrid__SWIG_2) {
  {
    std::vector< Time > *arg1 = 0 ;
    std::vector< double > temp1 ;
    std::vector< double > *v1 ;
    int argvi = 0;
    TimeGrid *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_TimeGrid(times);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_TimeGrid. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp1.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_TimeGrid. "
              "Expected an array of ""double");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_TimeGrid. "
          "Expected an array of ""double");
      }
    }
    {
      try {
        result = (TimeGrid *)new_TimeGrid__SWIG_2((std::vector< double > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TimeGrid, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_TimeGrid__SWIG_3) {
  {
    std::vector< Time > *arg1 = 0 ;
    Size arg2 ;
    std::vector< double > temp1 ;
    std::vector< double > *v1 ;
    size_t val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    TimeGrid *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_TimeGrid(times,steps);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_TimeGrid. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp1.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_TimeGrid. "
              "Expected an array of ""double");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_TimeGrid. "
          "Expected an array of ""double");
      }
    }
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_TimeGrid" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    {
      try {
        result = (TimeGrid *)new_TimeGrid__SWIG_3((std::vector< double > const &)*arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TimeGrid, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_TimeGrid) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_TimeGrid__SWIG_0); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_TimeGrid__SWIG_2); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_TimeGrid__SWIG_1); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_TimeGrid__SWIG_3); return;
    }
  }
  
  croak("No matching function for overloaded 'new_TimeGrid'");
  XSRETURN(0);
}


XS(_wrap_TimeGrid_size) {
  {
    TimeGrid *arg1 = (TimeGrid *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Size result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: TimeGrid_size(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_TimeGrid, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TimeGrid_size" "', argument " "1"" of type '" "TimeGrid const *""'"); 
    }
    arg1 = reinterpret_cast< TimeGrid * >(argp1);
    {
      try {
        result = ((TimeGrid const *)arg1)->size();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_size_t  SWIG_PERL_CALL_ARGS_1(static_cast< size_t >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_TimeGrid) {
  {
    TimeGrid *arg1 = (TimeGrid *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_TimeGrid(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_TimeGrid, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_TimeGrid" "', argument " "1"" of type '" "TimeGrid *""'"); 
    }
    arg1 = reinterpret_cast< TimeGrid * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Parameter) {
  {
    int argvi = 0;
    Parameter *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Parameter();");
    }
    {
      try {
        result = (Parameter *)new Parameter();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Parameter, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_Parameter_params) {
  {
    Parameter *arg1 = (Parameter *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Array *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Parameter_params(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Parameter, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Parameter_params" "', argument " "1"" of type '" "Parameter const *""'"); 
    }
    arg1 = reinterpret_cast< Parameter * >(argp1);
    {
      try {
        result = (Array *) &((Parameter const *)arg1)->params();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Array, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Parameter_setParam) {
  {
    Parameter *arg1 = (Parameter *) 0 ;
    Size arg2 ;
    Real arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: Parameter_setParam(self,i,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Parameter, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Parameter_setParam" "', argument " "1"" of type '" "Parameter *""'"); 
    }
    arg1 = reinterpret_cast< Parameter * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Parameter_setParam" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Parameter_setParam" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    {
      try {
        (arg1)->setParam(arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Parameter_testParams) {
  {
    Parameter *arg1 = (Parameter *) 0 ;
    Array *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Parameter_testParams(self,params);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Parameter, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Parameter_testParams" "', argument " "1"" of type '" "Parameter const *""'"); 
    }
    arg1 = reinterpret_cast< Parameter * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Parameter_testParams" "', argument " "2"" of type '" "Array const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Parameter_testParams" "', argument " "2"" of type '" "Array const &""'"); 
    }
    arg2 = reinterpret_cast< Array * >(argp2);
    {
      try {
        result = (bool)((Parameter const *)arg1)->testParams((Array const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Parameter_size) {
  {
    Parameter *arg1 = (Parameter *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Size result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Parameter_size(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Parameter, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Parameter_size" "', argument " "1"" of type '" "Parameter const *""'"); 
    }
    arg1 = reinterpret_cast< Parameter * >(argp1);
    {
      try {
        result = ((Parameter const *)arg1)->size();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_size_t  SWIG_PERL_CALL_ARGS_1(static_cast< size_t >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Parameter___call__) {
  {
    Parameter *arg1 = (Parameter *) 0 ;
    Time arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Parameter___call__(self,t);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Parameter, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Parameter___call__" "', argument " "1"" of type '" "Parameter const *""'"); 
    }
    arg1 = reinterpret_cast< Parameter * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Parameter___call__" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    {
      try {
        result = (Real)((Parameter const *)arg1)->operator ()(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Parameter_constraint) {
  {
    Parameter *arg1 = (Parameter *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Constraint *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Parameter_constraint(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Parameter, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Parameter_constraint" "', argument " "1"" of type '" "Parameter const *""'"); 
    }
    arg1 = reinterpret_cast< Parameter * >(argp1);
    {
      try {
        result = (Constraint *) &((Parameter const *)arg1)->constraint();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Constraint, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_Parameter) {
  {
    Parameter *arg1 = (Parameter *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Parameter(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Parameter, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Parameter" "', argument " "1"" of type '" "Parameter *""'"); 
    }
    arg1 = reinterpret_cast< Parameter * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ConstantParameter__SWIG_0) {
  {
    Constraint *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    ConstantParameter *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_ConstantParameter(constraint);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Constraint,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ConstantParameter" "', argument " "1"" of type '" "Constraint const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConstantParameter" "', argument " "1"" of type '" "Constraint const &""'"); 
    }
    arg1 = reinterpret_cast< Constraint * >(argp1);
    {
      try {
        result = (ConstantParameter *)new ConstantParameter((Constraint const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ConstantParameter, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ConstantParameter__SWIG_1) {
  {
    Real arg1 ;
    Constraint *arg2 = 0 ;
    double val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    ConstantParameter *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_ConstantParameter(value,constraint);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ConstantParameter" "', argument " "1"" of type '" "Real""'");
    } 
    arg1 = static_cast< Real >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Constraint,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ConstantParameter" "', argument " "2"" of type '" "Constraint const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConstantParameter" "', argument " "2"" of type '" "Constraint const &""'"); 
    }
    arg2 = reinterpret_cast< Constraint * >(argp2);
    {
      try {
        result = (ConstantParameter *)new ConstantParameter(arg1,(Constraint const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ConstantParameter, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ConstantParameter) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Constraint, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Constraint, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ConstantParameter__SWIG_0); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ConstantParameter__SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded 'new_ConstantParameter'");
  XSRETURN(0);
}


XS(_wrap_delete_ConstantParameter) {
  {
    ConstantParameter *arg1 = (ConstantParameter *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_ConstantParameter(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ConstantParameter, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ConstantParameter" "', argument " "1"" of type '" "ConstantParameter *""'"); 
    }
    arg1 = reinterpret_cast< ConstantParameter * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_NullParameter) {
  {
    int argvi = 0;
    NullParameter *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_NullParameter();");
    }
    {
      try {
        result = (NullParameter *)new NullParameter();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_NullParameter, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_NullParameter) {
  {
    NullParameter *arg1 = (NullParameter *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_NullParameter(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_NullParameter, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_NullParameter" "', argument " "1"" of type '" "NullParameter *""'"); 
    }
    arg1 = reinterpret_cast< NullParameter * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PiecewiseConstantParameter__SWIG_0) {
  {
    std::vector< Time > *arg1 = 0 ;
    Constraint *arg2 = 0 ;
    std::vector< double > temp1 ;
    std::vector< double > *v1 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    PiecewiseConstantParameter *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_PiecewiseConstantParameter(times,constraint);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_PiecewiseConstantParameter. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp1.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_PiecewiseConstantParameter. "
              "Expected an array of ""double");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_PiecewiseConstantParameter. "
          "Expected an array of ""double");
      }
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Constraint,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_PiecewiseConstantParameter" "', argument " "2"" of type '" "Constraint const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseConstantParameter" "', argument " "2"" of type '" "Constraint const &""'"); 
    }
    arg2 = reinterpret_cast< Constraint * >(argp2);
    {
      try {
        result = (PiecewiseConstantParameter *)new PiecewiseConstantParameter((std::vector< Time > const &)*arg1,(Constraint const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PiecewiseConstantParameter, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PiecewiseConstantParameter__SWIG_1) {
  {
    std::vector< Time > *arg1 = 0 ;
    std::vector< double > temp1 ;
    std::vector< double > *v1 ;
    int argvi = 0;
    PiecewiseConstantParameter *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_PiecewiseConstantParameter(times);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_PiecewiseConstantParameter. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp1.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_PiecewiseConstantParameter. "
              "Expected an array of ""double");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_PiecewiseConstantParameter. "
          "Expected an array of ""double");
      }
    }
    {
      try {
        result = (PiecewiseConstantParameter *)new PiecewiseConstantParameter((std::vector< Time > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PiecewiseConstantParameter, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PiecewiseConstantParameter) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Constraint, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_PiecewiseConstantParameter__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_PiecewiseConstantParameter__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_PiecewiseConstantParameter'");
  XSRETURN(0);
}


XS(_wrap_delete_PiecewiseConstantParameter) {
  {
    PiecewiseConstantParameter *arg1 = (PiecewiseConstantParameter *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_PiecewiseConstantParameter(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PiecewiseConstantParameter, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_PiecewiseConstantParameter" "', argument " "1"" of type '" "PiecewiseConstantParameter *""'"); 
    }
    arg1 = reinterpret_cast< PiecewiseConstantParameter * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_Option) {
  {
    Option *arg1 = (Option *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Option(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Option, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Option" "', argument " "1"" of type '" "Option *""'"); 
    }
    arg1 = reinterpret_cast< Option * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Barrier) {
  {
    int argvi = 0;
    Barrier *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Barrier();");
    }
    {
      try {
        result = (Barrier *)new Barrier();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Barrier, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_Barrier) {
  {
    Barrier *arg1 = (Barrier *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Barrier(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Barrier, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Barrier" "', argument " "1"" of type '" "Barrier *""'"); 
    }
    arg1 = reinterpret_cast< Barrier * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DoubleBarrier) {
  {
    int argvi = 0;
    DoubleBarrier *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_DoubleBarrier();");
    }
    {
      try {
        result = (DoubleBarrier *)new DoubleBarrier();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DoubleBarrier, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_DoubleBarrier) {
  {
    DoubleBarrier *arg1 = (DoubleBarrier *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_DoubleBarrier(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_DoubleBarrier, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DoubleBarrier" "', argument " "1"" of type '" "DoubleBarrier *""'"); 
    }
    arg1 = reinterpret_cast< DoubleBarrier * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Payoff___deref__) {
  {
    boost::shared_ptr< Payoff > *arg1 = (boost::shared_ptr< Payoff > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Payoff *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Payoff___deref__(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Payoff_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Payoff___deref__" "', argument " "1"" of type '" "boost::shared_ptr< Payoff > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Payoff > * >(argp1);
    {
      try {
        result = (Payoff *)(arg1)->operator ->();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Payoff, 0 | 0); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Payoff_isNull) {
  {
    boost::shared_ptr< Payoff > *arg1 = (boost::shared_ptr< Payoff > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Payoff_isNull(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Payoff_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Payoff_isNull" "', argument " "1"" of type '" "boost::shared_ptr< Payoff > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Payoff > * >(argp1);
    {
      try {
        result = (bool)boost_shared_ptr_Sl_Payoff_Sg__isNull(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Payoff) {
  {
    int argvi = 0;
    boost::shared_ptr< Payoff > *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Payoff();");
    }
    {
      try {
        result = (boost::shared_ptr< Payoff > *)new boost::shared_ptr< Payoff >();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_boost__shared_ptrT_Payoff_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_Payoff) {
  {
    boost::shared_ptr< Payoff > *arg1 = (boost::shared_ptr< Payoff > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Payoff(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Payoff_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Payoff" "', argument " "1"" of type '" "boost::shared_ptr< Payoff > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Payoff > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Payoff_call) {
  {
    boost::shared_ptr< Payoff > *arg1 = (boost::shared_ptr< Payoff > *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Payoff_call(self,price);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Payoff_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Payoff_call" "', argument " "1"" of type '" "boost::shared_ptr< Payoff > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Payoff > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Payoff_call" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (Real)(*arg1)->operator ()(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_VanillaOption) {
  {
    boost::shared_ptr< Payoff > *arg1 = 0 ;
    boost::shared_ptr< Exercise > *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    VanillaOptionPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_VanillaOption(payoff,exercise);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_Payoff_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_VanillaOption" "', argument " "1"" of type '" "boost::shared_ptr< Payoff > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_VanillaOption" "', argument " "1"" of type '" "boost::shared_ptr< Payoff > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Payoff > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_boost__shared_ptrT_Exercise_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_VanillaOption" "', argument " "2"" of type '" "boost::shared_ptr< Exercise > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_VanillaOption" "', argument " "2"" of type '" "boost::shared_ptr< Exercise > const &""'"); 
    }
    arg2 = reinterpret_cast< boost::shared_ptr< Exercise > * >(argp2);
    {
      try {
        result = (VanillaOptionPtr *)new_VanillaOptionPtr((boost::shared_ptr< Payoff > const &)*arg1,(boost::shared_ptr< Exercise > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VanillaOptionPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_VanillaOption_priceCurve) {
  {
    VanillaOptionPtr *arg1 = (VanillaOptionPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    SampledCurve result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: VanillaOption_priceCurve(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_VanillaOptionPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VanillaOption_priceCurve" "', argument " "1"" of type '" "VanillaOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< VanillaOptionPtr * >(argp1);
    {
      try {
        result = VanillaOptionPtr_priceCurve(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new SampledCurve(static_cast< const SampledCurve& >(result))), SWIGTYPE_p_SampledCurve, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_VanillaOption_impliedVolatility__SWIG_0) {
  {
    VanillaOptionPtr *arg1 = (VanillaOptionPtr *) 0 ;
    Real arg2 ;
    GeneralizedBlackScholesProcessPtr *arg3 = 0 ;
    Real arg4 ;
    Size arg5 ;
    Volatility arg6 ;
    Volatility arg7 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    size_t val5 ;
    int ecode5 = 0 ;
    double val6 ;
    int ecode6 = 0 ;
    double val7 ;
    int ecode7 = 0 ;
    int argvi = 0;
    Volatility result;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: VanillaOption_impliedVolatility(self,targetValue,process,accuracy,maxEvaluations,minVol,maxVol);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_VanillaOptionPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VanillaOption_impliedVolatility" "', argument " "1"" of type '" "VanillaOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< VanillaOptionPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VanillaOption_impliedVolatility" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "VanillaOption_impliedVolatility" "', argument " "3"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VanillaOption_impliedVolatility" "', argument " "3"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg3 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VanillaOption_impliedVolatility" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    ecode5 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VanillaOption_impliedVolatility" "', argument " "5"" of type '" "Size""'");
    } 
    arg5 = static_cast< Size >(val5);
    ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VanillaOption_impliedVolatility" "', argument " "6"" of type '" "Volatility""'");
    } 
    arg6 = static_cast< Volatility >(val6);
    ecode7 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "VanillaOption_impliedVolatility" "', argument " "7"" of type '" "Volatility""'");
    } 
    arg7 = static_cast< Volatility >(val7);
    {
      try {
        result = (Volatility)VanillaOptionPtr_impliedVolatility__SWIG_0(arg1,arg2,(GeneralizedBlackScholesProcessPtr const &)*arg3,arg4,arg5,arg6,arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_VanillaOption_impliedVolatility__SWIG_1) {
  {
    VanillaOptionPtr *arg1 = (VanillaOptionPtr *) 0 ;
    Real arg2 ;
    GeneralizedBlackScholesProcessPtr *arg3 = 0 ;
    Real arg4 ;
    Size arg5 ;
    Volatility arg6 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    size_t val5 ;
    int ecode5 = 0 ;
    double val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    Volatility result;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: VanillaOption_impliedVolatility(self,targetValue,process,accuracy,maxEvaluations,minVol);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_VanillaOptionPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VanillaOption_impliedVolatility" "', argument " "1"" of type '" "VanillaOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< VanillaOptionPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VanillaOption_impliedVolatility" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "VanillaOption_impliedVolatility" "', argument " "3"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VanillaOption_impliedVolatility" "', argument " "3"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg3 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VanillaOption_impliedVolatility" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    ecode5 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VanillaOption_impliedVolatility" "', argument " "5"" of type '" "Size""'");
    } 
    arg5 = static_cast< Size >(val5);
    ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "VanillaOption_impliedVolatility" "', argument " "6"" of type '" "Volatility""'");
    } 
    arg6 = static_cast< Volatility >(val6);
    {
      try {
        result = (Volatility)VanillaOptionPtr_impliedVolatility__SWIG_0(arg1,arg2,(GeneralizedBlackScholesProcessPtr const &)*arg3,arg4,arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_VanillaOption_impliedVolatility__SWIG_2) {
  {
    VanillaOptionPtr *arg1 = (VanillaOptionPtr *) 0 ;
    Real arg2 ;
    GeneralizedBlackScholesProcessPtr *arg3 = 0 ;
    Real arg4 ;
    Size arg5 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    size_t val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    Volatility result;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: VanillaOption_impliedVolatility(self,targetValue,process,accuracy,maxEvaluations);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_VanillaOptionPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VanillaOption_impliedVolatility" "', argument " "1"" of type '" "VanillaOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< VanillaOptionPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VanillaOption_impliedVolatility" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "VanillaOption_impliedVolatility" "', argument " "3"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VanillaOption_impliedVolatility" "', argument " "3"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg3 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VanillaOption_impliedVolatility" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    ecode5 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "VanillaOption_impliedVolatility" "', argument " "5"" of type '" "Size""'");
    } 
    arg5 = static_cast< Size >(val5);
    {
      try {
        result = (Volatility)VanillaOptionPtr_impliedVolatility__SWIG_0(arg1,arg2,(GeneralizedBlackScholesProcessPtr const &)*arg3,arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_VanillaOption_impliedVolatility__SWIG_3) {
  {
    VanillaOptionPtr *arg1 = (VanillaOptionPtr *) 0 ;
    Real arg2 ;
    GeneralizedBlackScholesProcessPtr *arg3 = 0 ;
    Real arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Volatility result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: VanillaOption_impliedVolatility(self,targetValue,process,accuracy);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_VanillaOptionPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VanillaOption_impliedVolatility" "', argument " "1"" of type '" "VanillaOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< VanillaOptionPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VanillaOption_impliedVolatility" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "VanillaOption_impliedVolatility" "', argument " "3"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VanillaOption_impliedVolatility" "', argument " "3"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg3 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VanillaOption_impliedVolatility" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    {
      try {
        result = (Volatility)VanillaOptionPtr_impliedVolatility__SWIG_0(arg1,arg2,(GeneralizedBlackScholesProcessPtr const &)*arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_VanillaOption_impliedVolatility__SWIG_4) {
  {
    VanillaOptionPtr *arg1 = (VanillaOptionPtr *) 0 ;
    Real arg2 ;
    GeneralizedBlackScholesProcessPtr *arg3 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    Volatility result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: VanillaOption_impliedVolatility(self,targetValue,process);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_VanillaOptionPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VanillaOption_impliedVolatility" "', argument " "1"" of type '" "VanillaOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< VanillaOptionPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VanillaOption_impliedVolatility" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "VanillaOption_impliedVolatility" "', argument " "3"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VanillaOption_impliedVolatility" "', argument " "3"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg3 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp3);
    {
      try {
        result = (Volatility)VanillaOptionPtr_impliedVolatility__SWIG_0(arg1,arg2,(GeneralizedBlackScholesProcessPtr const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_VanillaOption_impliedVolatility) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_VanillaOptionPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_VanillaOptionPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_VanillaOptionPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_VanillaOptionPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_VanillaOptionPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_VanillaOption_impliedVolatility__SWIG_4); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_VanillaOption_impliedVolatility__SWIG_3); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_VanillaOption_impliedVolatility__SWIG_2); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_VanillaOption_impliedVolatility__SWIG_1); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_VanillaOption_impliedVolatility__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'VanillaOption_impliedVolatility'");
  XSRETURN(0);
}


XS(_wrap_VanillaOption_delta) {
  {
    VanillaOptionPtr *arg1 = (VanillaOptionPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: VanillaOption_delta(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_VanillaOptionPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VanillaOption_delta" "', argument " "1"" of type '" "VanillaOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< VanillaOptionPtr * >(argp1);
    {
      try {
        result = (Real)VanillaOptionPtr_delta(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_VanillaOption_gamma) {
  {
    VanillaOptionPtr *arg1 = (VanillaOptionPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: VanillaOption_gamma(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_VanillaOptionPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VanillaOption_gamma" "', argument " "1"" of type '" "VanillaOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< VanillaOptionPtr * >(argp1);
    {
      try {
        result = (Real)VanillaOptionPtr_gamma(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_VanillaOption_theta) {
  {
    VanillaOptionPtr *arg1 = (VanillaOptionPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: VanillaOption_theta(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_VanillaOptionPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VanillaOption_theta" "', argument " "1"" of type '" "VanillaOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< VanillaOptionPtr * >(argp1);
    {
      try {
        result = (Real)VanillaOptionPtr_theta(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_VanillaOption_thetaPerDay) {
  {
    VanillaOptionPtr *arg1 = (VanillaOptionPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: VanillaOption_thetaPerDay(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_VanillaOptionPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VanillaOption_thetaPerDay" "', argument " "1"" of type '" "VanillaOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< VanillaOptionPtr * >(argp1);
    {
      try {
        result = (Real)VanillaOptionPtr_thetaPerDay(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_VanillaOption_vega) {
  {
    VanillaOptionPtr *arg1 = (VanillaOptionPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: VanillaOption_vega(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_VanillaOptionPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VanillaOption_vega" "', argument " "1"" of type '" "VanillaOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< VanillaOptionPtr * >(argp1);
    {
      try {
        result = (Real)VanillaOptionPtr_vega(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_VanillaOption_rho) {
  {
    VanillaOptionPtr *arg1 = (VanillaOptionPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: VanillaOption_rho(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_VanillaOptionPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VanillaOption_rho" "', argument " "1"" of type '" "VanillaOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< VanillaOptionPtr * >(argp1);
    {
      try {
        result = (Real)VanillaOptionPtr_rho(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_VanillaOption_dividendRho) {
  {
    VanillaOptionPtr *arg1 = (VanillaOptionPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: VanillaOption_dividendRho(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_VanillaOptionPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VanillaOption_dividendRho" "', argument " "1"" of type '" "VanillaOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< VanillaOptionPtr * >(argp1);
    {
      try {
        result = (Real)VanillaOptionPtr_dividendRho(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_VanillaOption_strikeSensitivity) {
  {
    VanillaOptionPtr *arg1 = (VanillaOptionPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: VanillaOption_strikeSensitivity(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_VanillaOptionPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VanillaOption_strikeSensitivity" "', argument " "1"" of type '" "VanillaOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< VanillaOptionPtr * >(argp1);
    {
      try {
        result = (Real)VanillaOptionPtr_strikeSensitivity(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_VanillaOption) {
  {
    VanillaOptionPtr *arg1 = (VanillaOptionPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_VanillaOption(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_VanillaOptionPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_VanillaOption" "', argument " "1"" of type '" "VanillaOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< VanillaOptionPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_EuropeanOption) {
  {
    boost::shared_ptr< Payoff > *arg1 = 0 ;
    boost::shared_ptr< Exercise > *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    EuropeanOptionPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_EuropeanOption(payoff,exercise);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_Payoff_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_EuropeanOption" "', argument " "1"" of type '" "boost::shared_ptr< Payoff > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EuropeanOption" "', argument " "1"" of type '" "boost::shared_ptr< Payoff > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Payoff > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_boost__shared_ptrT_Exercise_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_EuropeanOption" "', argument " "2"" of type '" "boost::shared_ptr< Exercise > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EuropeanOption" "', argument " "2"" of type '" "boost::shared_ptr< Exercise > const &""'"); 
    }
    arg2 = reinterpret_cast< boost::shared_ptr< Exercise > * >(argp2);
    {
      try {
        result = (EuropeanOptionPtr *)new_EuropeanOptionPtr((boost::shared_ptr< Payoff > const &)*arg1,(boost::shared_ptr< Exercise > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EuropeanOptionPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_EuropeanOption) {
  {
    EuropeanOptionPtr *arg1 = (EuropeanOptionPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_EuropeanOption(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_EuropeanOptionPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_EuropeanOption" "', argument " "1"" of type '" "EuropeanOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< EuropeanOptionPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ForwardVanillaOption) {
  {
    Real arg1 ;
    Date arg2 ;
    boost::shared_ptr< Payoff > *arg3 = 0 ;
    boost::shared_ptr< Exercise > *arg4 = 0 ;
    double val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int argvi = 0;
    ForwardVanillaOptionPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_ForwardVanillaOption(moneyness,resetDate,payoff,exercise);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ForwardVanillaOption" "', argument " "1"" of type '" "Real""'");
    } 
    arg1 = static_cast< Real >(val1);
    {
      res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ForwardVanillaOption" "', argument " "2"" of type '" "Date""'"); 
      }  
      if (!argp2) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ForwardVanillaOption" "', argument " "2"" of type '" "Date""'");
      } else {
        arg2 = *(reinterpret_cast< Date * >(argp2));
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_boost__shared_ptrT_Payoff_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_ForwardVanillaOption" "', argument " "3"" of type '" "boost::shared_ptr< Payoff > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ForwardVanillaOption" "', argument " "3"" of type '" "boost::shared_ptr< Payoff > const &""'"); 
    }
    arg3 = reinterpret_cast< boost::shared_ptr< Payoff > * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_boost__shared_ptrT_Exercise_t,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_ForwardVanillaOption" "', argument " "4"" of type '" "boost::shared_ptr< Exercise > const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ForwardVanillaOption" "', argument " "4"" of type '" "boost::shared_ptr< Exercise > const &""'"); 
    }
    arg4 = reinterpret_cast< boost::shared_ptr< Exercise > * >(argp4);
    {
      try {
        result = (ForwardVanillaOptionPtr *)new_ForwardVanillaOptionPtr(arg1,arg2,(boost::shared_ptr< Payoff > const &)*arg3,(boost::shared_ptr< Exercise > const &)*arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ForwardVanillaOptionPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_ForwardVanillaOption) {
  {
    ForwardVanillaOptionPtr *arg1 = (ForwardVanillaOptionPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_ForwardVanillaOption(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ForwardVanillaOptionPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ForwardVanillaOption" "', argument " "1"" of type '" "ForwardVanillaOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< ForwardVanillaOptionPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_QuantoVanillaOption) {
  {
    boost::shared_ptr< Payoff > *arg1 = 0 ;
    boost::shared_ptr< Exercise > *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    QuantoVanillaOptionPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_QuantoVanillaOption(payoff,exercise);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_Payoff_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_QuantoVanillaOption" "', argument " "1"" of type '" "boost::shared_ptr< Payoff > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_QuantoVanillaOption" "', argument " "1"" of type '" "boost::shared_ptr< Payoff > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Payoff > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_boost__shared_ptrT_Exercise_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_QuantoVanillaOption" "', argument " "2"" of type '" "boost::shared_ptr< Exercise > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_QuantoVanillaOption" "', argument " "2"" of type '" "boost::shared_ptr< Exercise > const &""'"); 
    }
    arg2 = reinterpret_cast< boost::shared_ptr< Exercise > * >(argp2);
    {
      try {
        result = (QuantoVanillaOptionPtr *)new_QuantoVanillaOptionPtr((boost::shared_ptr< Payoff > const &)*arg1,(boost::shared_ptr< Exercise > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantoVanillaOptionPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_QuantoVanillaOption_qvega) {
  {
    QuantoVanillaOptionPtr *arg1 = (QuantoVanillaOptionPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: QuantoVanillaOption_qvega(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantoVanillaOptionPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "QuantoVanillaOption_qvega" "', argument " "1"" of type '" "QuantoVanillaOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< QuantoVanillaOptionPtr * >(argp1);
    {
      try {
        result = (Real)QuantoVanillaOptionPtr_qvega(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_QuantoVanillaOption_qrho) {
  {
    QuantoVanillaOptionPtr *arg1 = (QuantoVanillaOptionPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: QuantoVanillaOption_qrho(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantoVanillaOptionPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "QuantoVanillaOption_qrho" "', argument " "1"" of type '" "QuantoVanillaOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< QuantoVanillaOptionPtr * >(argp1);
    {
      try {
        result = (Real)QuantoVanillaOptionPtr_qrho(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_QuantoVanillaOption_qlambda) {
  {
    QuantoVanillaOptionPtr *arg1 = (QuantoVanillaOptionPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: QuantoVanillaOption_qlambda(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantoVanillaOptionPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "QuantoVanillaOption_qlambda" "', argument " "1"" of type '" "QuantoVanillaOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< QuantoVanillaOptionPtr * >(argp1);
    {
      try {
        result = (Real)QuantoVanillaOptionPtr_qlambda(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_QuantoVanillaOption) {
  {
    QuantoVanillaOptionPtr *arg1 = (QuantoVanillaOptionPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_QuantoVanillaOption(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantoVanillaOptionPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_QuantoVanillaOption" "', argument " "1"" of type '" "QuantoVanillaOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< QuantoVanillaOptionPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_QuantoForwardVanillaOption) {
  {
    Real arg1 ;
    Date arg2 ;
    boost::shared_ptr< Payoff > *arg3 = 0 ;
    boost::shared_ptr< Exercise > *arg4 = 0 ;
    double val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int argvi = 0;
    QuantoForwardVanillaOptionPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_QuantoForwardVanillaOption(moneyness,resetDate,payoff,exercise);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_QuantoForwardVanillaOption" "', argument " "1"" of type '" "Real""'");
    } 
    arg1 = static_cast< Real >(val1);
    {
      res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_QuantoForwardVanillaOption" "', argument " "2"" of type '" "Date""'"); 
      }  
      if (!argp2) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_QuantoForwardVanillaOption" "', argument " "2"" of type '" "Date""'");
      } else {
        arg2 = *(reinterpret_cast< Date * >(argp2));
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_boost__shared_ptrT_Payoff_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_QuantoForwardVanillaOption" "', argument " "3"" of type '" "boost::shared_ptr< Payoff > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_QuantoForwardVanillaOption" "', argument " "3"" of type '" "boost::shared_ptr< Payoff > const &""'"); 
    }
    arg3 = reinterpret_cast< boost::shared_ptr< Payoff > * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_boost__shared_ptrT_Exercise_t,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_QuantoForwardVanillaOption" "', argument " "4"" of type '" "boost::shared_ptr< Exercise > const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_QuantoForwardVanillaOption" "', argument " "4"" of type '" "boost::shared_ptr< Exercise > const &""'"); 
    }
    arg4 = reinterpret_cast< boost::shared_ptr< Exercise > * >(argp4);
    {
      try {
        result = (QuantoForwardVanillaOptionPtr *)new_QuantoForwardVanillaOptionPtr(arg1,arg2,(boost::shared_ptr< Payoff > const &)*arg3,(boost::shared_ptr< Exercise > const &)*arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantoForwardVanillaOptionPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_QuantoForwardVanillaOption) {
  {
    QuantoForwardVanillaOptionPtr *arg1 = (QuantoForwardVanillaOptionPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_QuantoForwardVanillaOption(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantoForwardVanillaOptionPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_QuantoForwardVanillaOption" "', argument " "1"" of type '" "QuantoForwardVanillaOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< QuantoForwardVanillaOptionPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MultiAssetOption_delta) {
  {
    MultiAssetOptionPtr *arg1 = (MultiAssetOptionPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MultiAssetOption_delta(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_MultiAssetOptionPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiAssetOption_delta" "', argument " "1"" of type '" "MultiAssetOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< MultiAssetOptionPtr * >(argp1);
    {
      try {
        result = (Real)MultiAssetOptionPtr_delta(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MultiAssetOption_gamma) {
  {
    MultiAssetOptionPtr *arg1 = (MultiAssetOptionPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MultiAssetOption_gamma(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_MultiAssetOptionPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiAssetOption_gamma" "', argument " "1"" of type '" "MultiAssetOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< MultiAssetOptionPtr * >(argp1);
    {
      try {
        result = (Real)MultiAssetOptionPtr_gamma(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MultiAssetOption_theta) {
  {
    MultiAssetOptionPtr *arg1 = (MultiAssetOptionPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MultiAssetOption_theta(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_MultiAssetOptionPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiAssetOption_theta" "', argument " "1"" of type '" "MultiAssetOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< MultiAssetOptionPtr * >(argp1);
    {
      try {
        result = (Real)MultiAssetOptionPtr_theta(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MultiAssetOption_vega) {
  {
    MultiAssetOptionPtr *arg1 = (MultiAssetOptionPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MultiAssetOption_vega(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_MultiAssetOptionPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiAssetOption_vega" "', argument " "1"" of type '" "MultiAssetOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< MultiAssetOptionPtr * >(argp1);
    {
      try {
        result = (Real)MultiAssetOptionPtr_vega(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MultiAssetOption_rho) {
  {
    MultiAssetOptionPtr *arg1 = (MultiAssetOptionPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MultiAssetOption_rho(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_MultiAssetOptionPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiAssetOption_rho" "', argument " "1"" of type '" "MultiAssetOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< MultiAssetOptionPtr * >(argp1);
    {
      try {
        result = (Real)MultiAssetOptionPtr_rho(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MultiAssetOption_dividendRho) {
  {
    MultiAssetOptionPtr *arg1 = (MultiAssetOptionPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MultiAssetOption_dividendRho(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_MultiAssetOptionPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiAssetOption_dividendRho" "', argument " "1"" of type '" "MultiAssetOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< MultiAssetOptionPtr * >(argp1);
    {
      try {
        result = (Real)MultiAssetOptionPtr_dividendRho(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MultiAssetOption) {
  {
    int argvi = 0;
    MultiAssetOptionPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_MultiAssetOption();");
    }
    {
      try {
        result = (MultiAssetOptionPtr *)new MultiAssetOptionPtr();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MultiAssetOptionPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_MultiAssetOption) {
  {
    MultiAssetOptionPtr *arg1 = (MultiAssetOptionPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_MultiAssetOption(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_MultiAssetOptionPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MultiAssetOption" "', argument " "1"" of type '" "MultiAssetOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< MultiAssetOptionPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_AnalyticEuropeanEngine) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    AnalyticEuropeanEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_AnalyticEuropeanEngine(process);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_AnalyticEuropeanEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AnalyticEuropeanEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    {
      try {
        result = (AnalyticEuropeanEnginePtr *)new_AnalyticEuropeanEnginePtr((GeneralizedBlackScholesProcessPtr const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_AnalyticEuropeanEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_AnalyticEuropeanEngine) {
  {
    AnalyticEuropeanEnginePtr *arg1 = (AnalyticEuropeanEnginePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_AnalyticEuropeanEngine(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_AnalyticEuropeanEnginePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_AnalyticEuropeanEngine" "', argument " "1"" of type '" "AnalyticEuropeanEnginePtr *""'"); 
    }
    arg1 = reinterpret_cast< AnalyticEuropeanEnginePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_HestonModel) {
  {
    HestonProcessPtr *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    HestonModelPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_HestonModel(process);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HestonProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_HestonModel" "', argument " "1"" of type '" "HestonProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_HestonModel" "', argument " "1"" of type '" "HestonProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< HestonProcessPtr * >(argp1);
    {
      try {
        result = (HestonModelPtr *)new_HestonModelPtr((HestonProcessPtr const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_HestonModelPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_HestonModel_theta) {
  {
    HestonModelPtr *arg1 = (HestonModelPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: HestonModel_theta(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HestonModelPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HestonModel_theta" "', argument " "1"" of type '" "HestonModelPtr const *""'"); 
    }
    arg1 = reinterpret_cast< HestonModelPtr * >(argp1);
    {
      try {
        result = (Real)HestonModelPtr_theta((HestonModelPtr const *)arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_HestonModel_kappa) {
  {
    HestonModelPtr *arg1 = (HestonModelPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: HestonModel_kappa(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HestonModelPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HestonModel_kappa" "', argument " "1"" of type '" "HestonModelPtr const *""'"); 
    }
    arg1 = reinterpret_cast< HestonModelPtr * >(argp1);
    {
      try {
        result = (Real)HestonModelPtr_kappa((HestonModelPtr const *)arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_HestonModel_sigma) {
  {
    HestonModelPtr *arg1 = (HestonModelPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: HestonModel_sigma(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HestonModelPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HestonModel_sigma" "', argument " "1"" of type '" "HestonModelPtr const *""'"); 
    }
    arg1 = reinterpret_cast< HestonModelPtr * >(argp1);
    {
      try {
        result = (Real)HestonModelPtr_sigma((HestonModelPtr const *)arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_HestonModel_rho) {
  {
    HestonModelPtr *arg1 = (HestonModelPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: HestonModel_rho(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HestonModelPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HestonModel_rho" "', argument " "1"" of type '" "HestonModelPtr const *""'"); 
    }
    arg1 = reinterpret_cast< HestonModelPtr * >(argp1);
    {
      try {
        result = (Real)HestonModelPtr_rho((HestonModelPtr const *)arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_HestonModel_v0) {
  {
    HestonModelPtr *arg1 = (HestonModelPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: HestonModel_v0(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HestonModelPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HestonModel_v0" "', argument " "1"" of type '" "HestonModelPtr const *""'"); 
    }
    arg1 = reinterpret_cast< HestonModelPtr * >(argp1);
    {
      try {
        result = (Real)HestonModelPtr_v0((HestonModelPtr const *)arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_HestonModel) {
  {
    HestonModelPtr *arg1 = (HestonModelPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_HestonModel(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HestonModelPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_HestonModel" "', argument " "1"" of type '" "HestonModelPtr *""'"); 
    }
    arg1 = reinterpret_cast< HestonModelPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PiecewiseTimeDependentHestonModel) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    Handle< YieldTermStructure > *arg2 = 0 ;
    Handle< Quote > *arg3 = 0 ;
    Real arg4 ;
    Parameter *arg5 = 0 ;
    Parameter *arg6 = 0 ;
    Parameter *arg7 = 0 ;
    Parameter *arg8 = 0 ;
    TimeGrid *arg9 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    int argvi = 0;
    PiecewiseTimeDependentHestonModelPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 9) || (items > 9)) {
      SWIG_croak("Usage: new_PiecewiseTimeDependentHestonModel(riskFreeRate,dividendYield,s0,v0,theta,kappa,sigma,rho,timeGrid);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_PiecewiseTimeDependentHestonModel" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseTimeDependentHestonModel" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_PiecewiseTimeDependentHestonModel" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseTimeDependentHestonModel" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< YieldTermStructure > * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_PiecewiseTimeDependentHestonModel" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseTimeDependentHestonModel" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< Quote > * >(argp3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_PiecewiseTimeDependentHestonModel" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Parameter,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_PiecewiseTimeDependentHestonModel" "', argument " "5"" of type '" "Parameter const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseTimeDependentHestonModel" "', argument " "5"" of type '" "Parameter const &""'"); 
    }
    arg5 = reinterpret_cast< Parameter * >(argp5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_Parameter,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_PiecewiseTimeDependentHestonModel" "', argument " "6"" of type '" "Parameter const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseTimeDependentHestonModel" "', argument " "6"" of type '" "Parameter const &""'"); 
    }
    arg6 = reinterpret_cast< Parameter * >(argp6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Parameter,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_PiecewiseTimeDependentHestonModel" "', argument " "7"" of type '" "Parameter const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseTimeDependentHestonModel" "', argument " "7"" of type '" "Parameter const &""'"); 
    }
    arg7 = reinterpret_cast< Parameter * >(argp7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_Parameter,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_PiecewiseTimeDependentHestonModel" "', argument " "8"" of type '" "Parameter const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseTimeDependentHestonModel" "', argument " "8"" of type '" "Parameter const &""'"); 
    }
    arg8 = reinterpret_cast< Parameter * >(argp8);
    res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_TimeGrid,  0 );
    if (!SWIG_IsOK(res9)) {
      SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_PiecewiseTimeDependentHestonModel" "', argument " "9"" of type '" "TimeGrid const &""'"); 
    }
    if (!argp9) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseTimeDependentHestonModel" "', argument " "9"" of type '" "TimeGrid const &""'"); 
    }
    arg9 = reinterpret_cast< TimeGrid * >(argp9);
    {
      try {
        result = (PiecewiseTimeDependentHestonModelPtr *)new_PiecewiseTimeDependentHestonModelPtr((Handle< YieldTermStructure > const &)*arg1,(Handle< YieldTermStructure > const &)*arg2,(Handle< Quote > const &)*arg3,arg4,(Parameter const &)*arg5,(Parameter const &)*arg6,(Parameter const &)*arg7,(Parameter const &)*arg8,(TimeGrid const &)*arg9);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PiecewiseTimeDependentHestonModelPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_PiecewiseTimeDependentHestonModel_theta) {
  {
    PiecewiseTimeDependentHestonModelPtr *arg1 = (PiecewiseTimeDependentHestonModelPtr *) 0 ;
    Time arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: PiecewiseTimeDependentHestonModel_theta(self,t);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PiecewiseTimeDependentHestonModelPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PiecewiseTimeDependentHestonModel_theta" "', argument " "1"" of type '" "PiecewiseTimeDependentHestonModelPtr const *""'"); 
    }
    arg1 = reinterpret_cast< PiecewiseTimeDependentHestonModelPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "PiecewiseTimeDependentHestonModel_theta" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    {
      try {
        result = (Real)PiecewiseTimeDependentHestonModelPtr_theta((PiecewiseTimeDependentHestonModelPtr const *)arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_PiecewiseTimeDependentHestonModel_kappa) {
  {
    PiecewiseTimeDependentHestonModelPtr *arg1 = (PiecewiseTimeDependentHestonModelPtr *) 0 ;
    Time arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: PiecewiseTimeDependentHestonModel_kappa(self,t);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PiecewiseTimeDependentHestonModelPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PiecewiseTimeDependentHestonModel_kappa" "', argument " "1"" of type '" "PiecewiseTimeDependentHestonModelPtr const *""'"); 
    }
    arg1 = reinterpret_cast< PiecewiseTimeDependentHestonModelPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "PiecewiseTimeDependentHestonModel_kappa" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    {
      try {
        result = (Real)PiecewiseTimeDependentHestonModelPtr_kappa((PiecewiseTimeDependentHestonModelPtr const *)arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_PiecewiseTimeDependentHestonModel_sigma) {
  {
    PiecewiseTimeDependentHestonModelPtr *arg1 = (PiecewiseTimeDependentHestonModelPtr *) 0 ;
    Time arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: PiecewiseTimeDependentHestonModel_sigma(self,t);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PiecewiseTimeDependentHestonModelPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PiecewiseTimeDependentHestonModel_sigma" "', argument " "1"" of type '" "PiecewiseTimeDependentHestonModelPtr const *""'"); 
    }
    arg1 = reinterpret_cast< PiecewiseTimeDependentHestonModelPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "PiecewiseTimeDependentHestonModel_sigma" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    {
      try {
        result = (Real)PiecewiseTimeDependentHestonModelPtr_sigma((PiecewiseTimeDependentHestonModelPtr const *)arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_PiecewiseTimeDependentHestonModel_rho) {
  {
    PiecewiseTimeDependentHestonModelPtr *arg1 = (PiecewiseTimeDependentHestonModelPtr *) 0 ;
    Time arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: PiecewiseTimeDependentHestonModel_rho(self,t);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PiecewiseTimeDependentHestonModelPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PiecewiseTimeDependentHestonModel_rho" "', argument " "1"" of type '" "PiecewiseTimeDependentHestonModelPtr const *""'"); 
    }
    arg1 = reinterpret_cast< PiecewiseTimeDependentHestonModelPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "PiecewiseTimeDependentHestonModel_rho" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    {
      try {
        result = (Real)PiecewiseTimeDependentHestonModelPtr_rho((PiecewiseTimeDependentHestonModelPtr const *)arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_PiecewiseTimeDependentHestonModel_v0) {
  {
    PiecewiseTimeDependentHestonModelPtr *arg1 = (PiecewiseTimeDependentHestonModelPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: PiecewiseTimeDependentHestonModel_v0(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PiecewiseTimeDependentHestonModelPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PiecewiseTimeDependentHestonModel_v0" "', argument " "1"" of type '" "PiecewiseTimeDependentHestonModelPtr const *""'"); 
    }
    arg1 = reinterpret_cast< PiecewiseTimeDependentHestonModelPtr * >(argp1);
    {
      try {
        result = (Real)PiecewiseTimeDependentHestonModelPtr_v0((PiecewiseTimeDependentHestonModelPtr const *)arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_PiecewiseTimeDependentHestonModel_s0) {
  {
    PiecewiseTimeDependentHestonModelPtr *arg1 = (PiecewiseTimeDependentHestonModelPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: PiecewiseTimeDependentHestonModel_s0(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PiecewiseTimeDependentHestonModelPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PiecewiseTimeDependentHestonModel_s0" "', argument " "1"" of type '" "PiecewiseTimeDependentHestonModelPtr const *""'"); 
    }
    arg1 = reinterpret_cast< PiecewiseTimeDependentHestonModelPtr * >(argp1);
    {
      try {
        result = (Real)PiecewiseTimeDependentHestonModelPtr_s0((PiecewiseTimeDependentHestonModelPtr const *)arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_PiecewiseTimeDependentHestonModel_timeGrid) {
  {
    PiecewiseTimeDependentHestonModelPtr *arg1 = (PiecewiseTimeDependentHestonModelPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    TimeGrid *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: PiecewiseTimeDependentHestonModel_timeGrid(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PiecewiseTimeDependentHestonModelPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PiecewiseTimeDependentHestonModel_timeGrid" "', argument " "1"" of type '" "PiecewiseTimeDependentHestonModelPtr const *""'"); 
    }
    arg1 = reinterpret_cast< PiecewiseTimeDependentHestonModelPtr * >(argp1);
    {
      try {
        result = (TimeGrid *) &PiecewiseTimeDependentHestonModelPtr_timeGrid((PiecewiseTimeDependentHestonModelPtr const *)arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TimeGrid, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_PiecewiseTimeDependentHestonModel_dividendYield) {
  {
    PiecewiseTimeDependentHestonModelPtr *arg1 = (PiecewiseTimeDependentHestonModelPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Handle< YieldTermStructure > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: PiecewiseTimeDependentHestonModel_dividendYield(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PiecewiseTimeDependentHestonModelPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PiecewiseTimeDependentHestonModel_dividendYield" "', argument " "1"" of type '" "PiecewiseTimeDependentHestonModelPtr const *""'"); 
    }
    arg1 = reinterpret_cast< PiecewiseTimeDependentHestonModelPtr * >(argp1);
    {
      try {
        result = (Handle< YieldTermStructure > *) &PiecewiseTimeDependentHestonModelPtr_dividendYield((PiecewiseTimeDependentHestonModelPtr const *)arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_HandleT_YieldTermStructure_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_PiecewiseTimeDependentHestonModel_riskFreeRate) {
  {
    PiecewiseTimeDependentHestonModelPtr *arg1 = (PiecewiseTimeDependentHestonModelPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Handle< YieldTermStructure > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: PiecewiseTimeDependentHestonModel_riskFreeRate(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PiecewiseTimeDependentHestonModelPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PiecewiseTimeDependentHestonModel_riskFreeRate" "', argument " "1"" of type '" "PiecewiseTimeDependentHestonModelPtr const *""'"); 
    }
    arg1 = reinterpret_cast< PiecewiseTimeDependentHestonModelPtr * >(argp1);
    {
      try {
        result = (Handle< YieldTermStructure > *) &PiecewiseTimeDependentHestonModelPtr_riskFreeRate((PiecewiseTimeDependentHestonModelPtr const *)arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_HandleT_YieldTermStructure_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_PiecewiseTimeDependentHestonModel) {
  {
    PiecewiseTimeDependentHestonModelPtr *arg1 = (PiecewiseTimeDependentHestonModelPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_PiecewiseTimeDependentHestonModel(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PiecewiseTimeDependentHestonModelPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_PiecewiseTimeDependentHestonModel" "', argument " "1"" of type '" "PiecewiseTimeDependentHestonModelPtr *""'"); 
    }
    arg1 = reinterpret_cast< PiecewiseTimeDependentHestonModelPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_AnalyticHestonEngine__SWIG_0) {
  {
    HestonModelPtr *arg1 = 0 ;
    Size arg2 ;
    void *argp1 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    AnalyticHestonEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_AnalyticHestonEngine(model,integrationOrder);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HestonModelPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_AnalyticHestonEngine" "', argument " "1"" of type '" "HestonModelPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AnalyticHestonEngine" "', argument " "1"" of type '" "HestonModelPtr const &""'"); 
    }
    arg1 = reinterpret_cast< HestonModelPtr * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_AnalyticHestonEngine" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    {
      try {
        result = (AnalyticHestonEnginePtr *)new_AnalyticHestonEnginePtr__SWIG_0((HestonModelPtr const &)*arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_AnalyticHestonEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_AnalyticHestonEngine__SWIG_1) {
  {
    HestonModelPtr *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    AnalyticHestonEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_AnalyticHestonEngine(model);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HestonModelPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_AnalyticHestonEngine" "', argument " "1"" of type '" "HestonModelPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AnalyticHestonEngine" "', argument " "1"" of type '" "HestonModelPtr const &""'"); 
    }
    arg1 = reinterpret_cast< HestonModelPtr * >(argp1);
    {
      try {
        result = (AnalyticHestonEnginePtr *)new_AnalyticHestonEnginePtr__SWIG_0((HestonModelPtr const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_AnalyticHestonEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_AnalyticHestonEngine__SWIG_2) {
  {
    HestonModelPtr *arg1 = 0 ;
    Real arg2 ;
    Size arg3 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    size_t val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    AnalyticHestonEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_AnalyticHestonEngine(model,relTolerance,maxEvaluations);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HestonModelPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_AnalyticHestonEngine" "', argument " "1"" of type '" "HestonModelPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AnalyticHestonEngine" "', argument " "1"" of type '" "HestonModelPtr const &""'"); 
    }
    arg1 = reinterpret_cast< HestonModelPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_AnalyticHestonEngine" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_AnalyticHestonEngine" "', argument " "3"" of type '" "Size""'");
    } 
    arg3 = static_cast< Size >(val3);
    {
      try {
        result = (AnalyticHestonEnginePtr *)new_AnalyticHestonEnginePtr__SWIG_2((HestonModelPtr const &)*arg1,arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_AnalyticHestonEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_AnalyticHestonEngine) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HestonModelPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HestonModelPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HestonModelPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_AnalyticHestonEngine__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_AnalyticHestonEngine__SWIG_0); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_AnalyticHestonEngine__SWIG_2); return;
    }
  }
  
  croak("No matching function for overloaded 'new_AnalyticHestonEngine'");
  XSRETURN(0);
}


XS(_wrap_delete_AnalyticHestonEngine) {
  {
    AnalyticHestonEnginePtr *arg1 = (AnalyticHestonEnginePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_AnalyticHestonEngine(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_AnalyticHestonEnginePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_AnalyticHestonEngine" "', argument " "1"" of type '" "AnalyticHestonEnginePtr *""'"); 
    }
    arg1 = reinterpret_cast< AnalyticHestonEnginePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_AnalyticPTDHestonEngine__SWIG_0) {
  {
    PiecewiseTimeDependentHestonModelPtr *arg1 = 0 ;
    Real arg2 ;
    Size arg3 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    size_t val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    AnalyticPTDHestonEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_AnalyticPTDHestonEngine(model,relTolerance,maxEvaluations);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_PiecewiseTimeDependentHestonModelPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_AnalyticPTDHestonEngine" "', argument " "1"" of type '" "PiecewiseTimeDependentHestonModelPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AnalyticPTDHestonEngine" "', argument " "1"" of type '" "PiecewiseTimeDependentHestonModelPtr const &""'"); 
    }
    arg1 = reinterpret_cast< PiecewiseTimeDependentHestonModelPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_AnalyticPTDHestonEngine" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_AnalyticPTDHestonEngine" "', argument " "3"" of type '" "Size""'");
    } 
    arg3 = static_cast< Size >(val3);
    {
      try {
        result = (AnalyticPTDHestonEnginePtr *)new_AnalyticPTDHestonEnginePtr__SWIG_0((PiecewiseTimeDependentHestonModelPtr const &)*arg1,arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_AnalyticPTDHestonEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_AnalyticPTDHestonEngine__SWIG_1) {
  {
    PiecewiseTimeDependentHestonModelPtr *arg1 = 0 ;
    Size arg2 ;
    void *argp1 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    AnalyticPTDHestonEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_AnalyticPTDHestonEngine(model,integrationOrder);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_PiecewiseTimeDependentHestonModelPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_AnalyticPTDHestonEngine" "', argument " "1"" of type '" "PiecewiseTimeDependentHestonModelPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AnalyticPTDHestonEngine" "', argument " "1"" of type '" "PiecewiseTimeDependentHestonModelPtr const &""'"); 
    }
    arg1 = reinterpret_cast< PiecewiseTimeDependentHestonModelPtr * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_AnalyticPTDHestonEngine" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    {
      try {
        result = (AnalyticPTDHestonEnginePtr *)new_AnalyticPTDHestonEnginePtr__SWIG_1((PiecewiseTimeDependentHestonModelPtr const &)*arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_AnalyticPTDHestonEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_AnalyticPTDHestonEngine__SWIG_2) {
  {
    PiecewiseTimeDependentHestonModelPtr *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    AnalyticPTDHestonEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_AnalyticPTDHestonEngine(model);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_PiecewiseTimeDependentHestonModelPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_AnalyticPTDHestonEngine" "', argument " "1"" of type '" "PiecewiseTimeDependentHestonModelPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AnalyticPTDHestonEngine" "', argument " "1"" of type '" "PiecewiseTimeDependentHestonModelPtr const &""'"); 
    }
    arg1 = reinterpret_cast< PiecewiseTimeDependentHestonModelPtr * >(argp1);
    {
      try {
        result = (AnalyticPTDHestonEnginePtr *)new_AnalyticPTDHestonEnginePtr__SWIG_1((PiecewiseTimeDependentHestonModelPtr const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_AnalyticPTDHestonEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_AnalyticPTDHestonEngine) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_PiecewiseTimeDependentHestonModelPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_PiecewiseTimeDependentHestonModelPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_PiecewiseTimeDependentHestonModelPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_AnalyticPTDHestonEngine__SWIG_2); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_AnalyticPTDHestonEngine__SWIG_1); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_AnalyticPTDHestonEngine__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_AnalyticPTDHestonEngine'");
  XSRETURN(0);
}


XS(_wrap_delete_AnalyticPTDHestonEngine) {
  {
    AnalyticPTDHestonEnginePtr *arg1 = (AnalyticPTDHestonEnginePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_AnalyticPTDHestonEngine(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_AnalyticPTDHestonEnginePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_AnalyticPTDHestonEngine" "', argument " "1"" of type '" "AnalyticPTDHestonEnginePtr *""'"); 
    }
    arg1 = reinterpret_cast< AnalyticPTDHestonEnginePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BatesModel) {
  {
    BatesProcessPtr *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    BatesModelPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_BatesModel(process);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_BatesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_BatesModel" "', argument " "1"" of type '" "BatesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BatesModel" "', argument " "1"" of type '" "BatesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< BatesProcessPtr * >(argp1);
    {
      try {
        result = (BatesModelPtr *)new_BatesModelPtr((BatesProcessPtr const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BatesModelPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BatesModel_nu) {
  {
    BatesModelPtr *arg1 = (BatesModelPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BatesModel_nu(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BatesModelPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BatesModel_nu" "', argument " "1"" of type '" "BatesModelPtr const *""'"); 
    }
    arg1 = reinterpret_cast< BatesModelPtr * >(argp1);
    {
      try {
        result = (Real)BatesModelPtr_nu((BatesModelPtr const *)arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BatesModel_delta) {
  {
    BatesModelPtr *arg1 = (BatesModelPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BatesModel_delta(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BatesModelPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BatesModel_delta" "', argument " "1"" of type '" "BatesModelPtr const *""'"); 
    }
    arg1 = reinterpret_cast< BatesModelPtr * >(argp1);
    {
      try {
        result = (Real)BatesModelPtr_delta((BatesModelPtr const *)arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BatesModel_lambda) {
  {
    BatesModelPtr *arg1 = (BatesModelPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BatesModel_lambda(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BatesModelPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BatesModel_lambda" "', argument " "1"" of type '" "BatesModelPtr const *""'"); 
    }
    arg1 = reinterpret_cast< BatesModelPtr * >(argp1);
    {
      try {
        result = (Real)BatesModelPtr_lambda((BatesModelPtr const *)arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_BatesModel) {
  {
    BatesModelPtr *arg1 = (BatesModelPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_BatesModel(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BatesModelPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_BatesModel" "', argument " "1"" of type '" "BatesModelPtr *""'"); 
    }
    arg1 = reinterpret_cast< BatesModelPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BatesEngine__SWIG_0) {
  {
    BatesModelPtr *arg1 = 0 ;
    Size arg2 ;
    void *argp1 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    BatesEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_BatesEngine(model,integrationOrder);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_BatesModelPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_BatesEngine" "', argument " "1"" of type '" "BatesModelPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BatesEngine" "', argument " "1"" of type '" "BatesModelPtr const &""'"); 
    }
    arg1 = reinterpret_cast< BatesModelPtr * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_BatesEngine" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    {
      try {
        result = (BatesEnginePtr *)new_BatesEnginePtr__SWIG_0((BatesModelPtr const &)*arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BatesEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BatesEngine__SWIG_1) {
  {
    BatesModelPtr *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    BatesEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_BatesEngine(model);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_BatesModelPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_BatesEngine" "', argument " "1"" of type '" "BatesModelPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BatesEngine" "', argument " "1"" of type '" "BatesModelPtr const &""'"); 
    }
    arg1 = reinterpret_cast< BatesModelPtr * >(argp1);
    {
      try {
        result = (BatesEnginePtr *)new_BatesEnginePtr__SWIG_0((BatesModelPtr const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BatesEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BatesEngine__SWIG_2) {
  {
    BatesModelPtr *arg1 = 0 ;
    Real arg2 ;
    Size arg3 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    size_t val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    BatesEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_BatesEngine(model,relTolerance,maxEvaluations);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_BatesModelPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_BatesEngine" "', argument " "1"" of type '" "BatesModelPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BatesEngine" "', argument " "1"" of type '" "BatesModelPtr const &""'"); 
    }
    arg1 = reinterpret_cast< BatesModelPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_BatesEngine" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_BatesEngine" "', argument " "3"" of type '" "Size""'");
    } 
    arg3 = static_cast< Size >(val3);
    {
      try {
        result = (BatesEnginePtr *)new_BatesEnginePtr__SWIG_2((BatesModelPtr const &)*arg1,arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BatesEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BatesEngine) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BatesModelPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BatesModelPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BatesModelPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_BatesEngine__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_BatesEngine__SWIG_0); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_BatesEngine__SWIG_2); return;
    }
  }
  
  croak("No matching function for overloaded 'new_BatesEngine'");
  XSRETURN(0);
}


XS(_wrap_delete_BatesEngine) {
  {
    BatesEnginePtr *arg1 = (BatesEnginePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_BatesEngine(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BatesEnginePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_BatesEngine" "', argument " "1"" of type '" "BatesEnginePtr *""'"); 
    }
    arg1 = reinterpret_cast< BatesEnginePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_IntegralEngine) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    IntegralEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_IntegralEngine(process);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_IntegralEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_IntegralEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    {
      try {
        result = (IntegralEnginePtr *)new_IntegralEnginePtr((GeneralizedBlackScholesProcessPtr const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IntegralEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_IntegralEngine) {
  {
    IntegralEnginePtr *arg1 = (IntegralEnginePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_IntegralEngine(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_IntegralEnginePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IntegralEngine" "', argument " "1"" of type '" "IntegralEnginePtr *""'"); 
    }
    arg1 = reinterpret_cast< IntegralEnginePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FDBermudanEngine__SWIG_0) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    Size arg2 ;
    Size arg3 ;
    bool arg4 ;
    void *argp1 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    size_t val3 ;
    int ecode3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    FDBermudanEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_FDBermudanEngine(process,timeSteps,gridPoints,timeDependent);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FDBermudanEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FDBermudanEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FDBermudanEngine" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_FDBermudanEngine" "', argument " "3"" of type '" "Size""'");
    } 
    arg3 = static_cast< Size >(val3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_FDBermudanEngine" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    {
      try {
        result = (FDBermudanEnginePtr *)new_FDBermudanEnginePtr__SWIG_0((GeneralizedBlackScholesProcessPtr const &)*arg1,arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FDBermudanEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FDBermudanEngine__SWIG_1) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    Size arg2 ;
    Size arg3 ;
    void *argp1 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    size_t val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    FDBermudanEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_FDBermudanEngine(process,timeSteps,gridPoints);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FDBermudanEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FDBermudanEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FDBermudanEngine" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_FDBermudanEngine" "', argument " "3"" of type '" "Size""'");
    } 
    arg3 = static_cast< Size >(val3);
    {
      try {
        result = (FDBermudanEnginePtr *)new_FDBermudanEnginePtr__SWIG_0((GeneralizedBlackScholesProcessPtr const &)*arg1,arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FDBermudanEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FDBermudanEngine__SWIG_2) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    Size arg2 ;
    void *argp1 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    FDBermudanEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_FDBermudanEngine(process,timeSteps);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FDBermudanEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FDBermudanEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FDBermudanEngine" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    {
      try {
        result = (FDBermudanEnginePtr *)new_FDBermudanEnginePtr__SWIG_0((GeneralizedBlackScholesProcessPtr const &)*arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FDBermudanEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FDBermudanEngine__SWIG_3) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    FDBermudanEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_FDBermudanEngine(process);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FDBermudanEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FDBermudanEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    {
      try {
        result = (FDBermudanEnginePtr *)new_FDBermudanEnginePtr__SWIG_0((GeneralizedBlackScholesProcessPtr const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FDBermudanEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FDBermudanEngine) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FDBermudanEngine__SWIG_3); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FDBermudanEngine__SWIG_2); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FDBermudanEngine__SWIG_1); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FDBermudanEngine__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_FDBermudanEngine'");
  XSRETURN(0);
}


XS(_wrap_delete_FDBermudanEngine) {
  {
    FDBermudanEnginePtr *arg1 = (FDBermudanEnginePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_FDBermudanEngine(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_FDBermudanEnginePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FDBermudanEngine" "', argument " "1"" of type '" "FDBermudanEnginePtr *""'"); 
    }
    arg1 = reinterpret_cast< FDBermudanEnginePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FDEuropeanEngine__SWIG_0) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    Size arg2 ;
    Size arg3 ;
    bool arg4 ;
    void *argp1 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    size_t val3 ;
    int ecode3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    FDEuropeanEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_FDEuropeanEngine(process,timeSteps,gridPoints,timeDependent);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FDEuropeanEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FDEuropeanEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FDEuropeanEngine" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_FDEuropeanEngine" "', argument " "3"" of type '" "Size""'");
    } 
    arg3 = static_cast< Size >(val3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_FDEuropeanEngine" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    {
      try {
        result = (FDEuropeanEnginePtr *)new_FDEuropeanEnginePtr__SWIG_0((GeneralizedBlackScholesProcessPtr const &)*arg1,arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FDEuropeanEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FDEuropeanEngine__SWIG_1) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    Size arg2 ;
    Size arg3 ;
    void *argp1 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    size_t val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    FDEuropeanEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_FDEuropeanEngine(process,timeSteps,gridPoints);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FDEuropeanEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FDEuropeanEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FDEuropeanEngine" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_FDEuropeanEngine" "', argument " "3"" of type '" "Size""'");
    } 
    arg3 = static_cast< Size >(val3);
    {
      try {
        result = (FDEuropeanEnginePtr *)new_FDEuropeanEnginePtr__SWIG_0((GeneralizedBlackScholesProcessPtr const &)*arg1,arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FDEuropeanEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FDEuropeanEngine__SWIG_2) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    Size arg2 ;
    void *argp1 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    FDEuropeanEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_FDEuropeanEngine(process,timeSteps);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FDEuropeanEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FDEuropeanEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FDEuropeanEngine" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    {
      try {
        result = (FDEuropeanEnginePtr *)new_FDEuropeanEnginePtr__SWIG_0((GeneralizedBlackScholesProcessPtr const &)*arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FDEuropeanEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FDEuropeanEngine__SWIG_3) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    FDEuropeanEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_FDEuropeanEngine(process);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FDEuropeanEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FDEuropeanEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    {
      try {
        result = (FDEuropeanEnginePtr *)new_FDEuropeanEnginePtr__SWIG_0((GeneralizedBlackScholesProcessPtr const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FDEuropeanEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FDEuropeanEngine) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FDEuropeanEngine__SWIG_3); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FDEuropeanEngine__SWIG_2); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FDEuropeanEngine__SWIG_1); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FDEuropeanEngine__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_FDEuropeanEngine'");
  XSRETURN(0);
}


XS(_wrap_delete_FDEuropeanEngine) {
  {
    FDEuropeanEnginePtr *arg1 = (FDEuropeanEnginePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_FDEuropeanEngine(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_FDEuropeanEnginePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FDEuropeanEngine" "', argument " "1"" of type '" "FDEuropeanEnginePtr *""'"); 
    }
    arg1 = reinterpret_cast< FDEuropeanEnginePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BinomialVanillaEngine) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    std::string *arg2 = 0 ;
    Size arg3 ;
    void *argp1 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    size_t val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    BinomialVanillaEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_BinomialVanillaEngine(process,type,steps);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_BinomialVanillaEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BinomialVanillaEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_BinomialVanillaEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BinomialVanillaEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_BinomialVanillaEngine" "', argument " "3"" of type '" "Size""'");
    } 
    arg3 = static_cast< Size >(val3);
    {
      try {
        result = (BinomialVanillaEnginePtr *)new_BinomialVanillaEnginePtr((GeneralizedBlackScholesProcessPtr const &)*arg1,(std::string const &)*arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BinomialVanillaEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_BinomialVanillaEngine) {
  {
    BinomialVanillaEnginePtr *arg1 = (BinomialVanillaEnginePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_BinomialVanillaEngine(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BinomialVanillaEnginePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_BinomialVanillaEngine" "', argument " "1"" of type '" "BinomialVanillaEnginePtr *""'"); 
    }
    arg1 = reinterpret_cast< BinomialVanillaEnginePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MCEuropeanEngine__SWIG_0) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    std::string *arg2 = 0 ;
    intOrNull arg3 ;
    intOrNull arg4 ;
    bool arg5 ;
    bool arg6 ;
    intOrNull arg7 ;
    doubleOrNull arg8 ;
    intOrNull arg9 ;
    BigInteger arg10 ;
    void *argp1 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    bool val5 ;
    int ecode5 = 0 ;
    bool val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    long val10 ;
    int ecode10 = 0 ;
    int argvi = 0;
    MCEuropeanEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 10) || (items > 10)) {
      SWIG_croak("Usage: new_MCEuropeanEngine(process,traits,timeSteps,timeStepsPerYear,brownianBridge,antitheticVariate,requiredSamples,requiredTolerance,maxSamples,seed);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MCEuropeanEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEuropeanEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MCEuropeanEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEuropeanEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_intOrNull,  0 );
      if (!SWIG_IsOK(res3)) {
        SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_MCEuropeanEngine" "', argument " "3"" of type '" "intOrNull""'"); 
      }  
      if (!argp3) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEuropeanEngine" "', argument " "3"" of type '" "intOrNull""'");
      } else {
        arg3 = *(reinterpret_cast< intOrNull * >(argp3));
      }
    }
    {
      res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_intOrNull,  0 );
      if (!SWIG_IsOK(res4)) {
        SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_MCEuropeanEngine" "', argument " "4"" of type '" "intOrNull""'"); 
      }  
      if (!argp4) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEuropeanEngine" "', argument " "4"" of type '" "intOrNull""'");
      } else {
        arg4 = *(reinterpret_cast< intOrNull * >(argp4));
      }
    }
    ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_MCEuropeanEngine" "', argument " "5"" of type '" "bool""'");
    } 
    arg5 = static_cast< bool >(val5);
    ecode6 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_MCEuropeanEngine" "', argument " "6"" of type '" "bool""'");
    } 
    arg6 = static_cast< bool >(val6);
    {
      res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_intOrNull,  0 );
      if (!SWIG_IsOK(res7)) {
        SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_MCEuropeanEngine" "', argument " "7"" of type '" "intOrNull""'"); 
      }  
      if (!argp7) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEuropeanEngine" "', argument " "7"" of type '" "intOrNull""'");
      } else {
        arg7 = *(reinterpret_cast< intOrNull * >(argp7));
      }
    }
    {
      res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_doubleOrNull,  0 );
      if (!SWIG_IsOK(res8)) {
        SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_MCEuropeanEngine" "', argument " "8"" of type '" "doubleOrNull""'"); 
      }  
      if (!argp8) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEuropeanEngine" "', argument " "8"" of type '" "doubleOrNull""'");
      } else {
        arg8 = *(reinterpret_cast< doubleOrNull * >(argp8));
      }
    }
    {
      res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_intOrNull,  0 );
      if (!SWIG_IsOK(res9)) {
        SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_MCEuropeanEngine" "', argument " "9"" of type '" "intOrNull""'"); 
      }  
      if (!argp9) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEuropeanEngine" "', argument " "9"" of type '" "intOrNull""'");
      } else {
        arg9 = *(reinterpret_cast< intOrNull * >(argp9));
      }
    }
    ecode10 = SWIG_AsVal_long SWIG_PERL_CALL_ARGS_2(ST(9), &val10);
    if (!SWIG_IsOK(ecode10)) {
      SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "new_MCEuropeanEngine" "', argument " "10"" of type '" "BigInteger""'");
    } 
    arg10 = static_cast< BigInteger >(val10);
    {
      try {
        result = (MCEuropeanEnginePtr *)new_MCEuropeanEnginePtr__SWIG_0((GeneralizedBlackScholesProcessPtr const &)*arg1,(std::string const &)*arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MCEuropeanEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MCEuropeanEngine__SWIG_1) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    std::string *arg2 = 0 ;
    intOrNull arg3 ;
    intOrNull arg4 ;
    bool arg5 ;
    bool arg6 ;
    intOrNull arg7 ;
    doubleOrNull arg8 ;
    intOrNull arg9 ;
    void *argp1 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    bool val5 ;
    int ecode5 = 0 ;
    bool val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    int argvi = 0;
    MCEuropeanEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 9) || (items > 9)) {
      SWIG_croak("Usage: new_MCEuropeanEngine(process,traits,timeSteps,timeStepsPerYear,brownianBridge,antitheticVariate,requiredSamples,requiredTolerance,maxSamples);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MCEuropeanEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEuropeanEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MCEuropeanEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEuropeanEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_intOrNull,  0 );
      if (!SWIG_IsOK(res3)) {
        SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_MCEuropeanEngine" "', argument " "3"" of type '" "intOrNull""'"); 
      }  
      if (!argp3) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEuropeanEngine" "', argument " "3"" of type '" "intOrNull""'");
      } else {
        arg3 = *(reinterpret_cast< intOrNull * >(argp3));
      }
    }
    {
      res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_intOrNull,  0 );
      if (!SWIG_IsOK(res4)) {
        SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_MCEuropeanEngine" "', argument " "4"" of type '" "intOrNull""'"); 
      }  
      if (!argp4) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEuropeanEngine" "', argument " "4"" of type '" "intOrNull""'");
      } else {
        arg4 = *(reinterpret_cast< intOrNull * >(argp4));
      }
    }
    ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_MCEuropeanEngine" "', argument " "5"" of type '" "bool""'");
    } 
    arg5 = static_cast< bool >(val5);
    ecode6 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_MCEuropeanEngine" "', argument " "6"" of type '" "bool""'");
    } 
    arg6 = static_cast< bool >(val6);
    {
      res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_intOrNull,  0 );
      if (!SWIG_IsOK(res7)) {
        SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_MCEuropeanEngine" "', argument " "7"" of type '" "intOrNull""'"); 
      }  
      if (!argp7) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEuropeanEngine" "', argument " "7"" of type '" "intOrNull""'");
      } else {
        arg7 = *(reinterpret_cast< intOrNull * >(argp7));
      }
    }
    {
      res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_doubleOrNull,  0 );
      if (!SWIG_IsOK(res8)) {
        SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_MCEuropeanEngine" "', argument " "8"" of type '" "doubleOrNull""'"); 
      }  
      if (!argp8) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEuropeanEngine" "', argument " "8"" of type '" "doubleOrNull""'");
      } else {
        arg8 = *(reinterpret_cast< doubleOrNull * >(argp8));
      }
    }
    {
      res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_intOrNull,  0 );
      if (!SWIG_IsOK(res9)) {
        SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_MCEuropeanEngine" "', argument " "9"" of type '" "intOrNull""'"); 
      }  
      if (!argp9) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEuropeanEngine" "', argument " "9"" of type '" "intOrNull""'");
      } else {
        arg9 = *(reinterpret_cast< intOrNull * >(argp9));
      }
    }
    {
      try {
        result = (MCEuropeanEnginePtr *)new_MCEuropeanEnginePtr__SWIG_0((GeneralizedBlackScholesProcessPtr const &)*arg1,(std::string const &)*arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MCEuropeanEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MCEuropeanEngine__SWIG_2) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    std::string *arg2 = 0 ;
    intOrNull arg3 ;
    intOrNull arg4 ;
    bool arg5 ;
    bool arg6 ;
    intOrNull arg7 ;
    doubleOrNull arg8 ;
    void *argp1 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    bool val5 ;
    int ecode5 = 0 ;
    bool val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    int argvi = 0;
    MCEuropeanEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 8) || (items > 8)) {
      SWIG_croak("Usage: new_MCEuropeanEngine(process,traits,timeSteps,timeStepsPerYear,brownianBridge,antitheticVariate,requiredSamples,requiredTolerance);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MCEuropeanEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEuropeanEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MCEuropeanEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEuropeanEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_intOrNull,  0 );
      if (!SWIG_IsOK(res3)) {
        SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_MCEuropeanEngine" "', argument " "3"" of type '" "intOrNull""'"); 
      }  
      if (!argp3) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEuropeanEngine" "', argument " "3"" of type '" "intOrNull""'");
      } else {
        arg3 = *(reinterpret_cast< intOrNull * >(argp3));
      }
    }
    {
      res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_intOrNull,  0 );
      if (!SWIG_IsOK(res4)) {
        SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_MCEuropeanEngine" "', argument " "4"" of type '" "intOrNull""'"); 
      }  
      if (!argp4) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEuropeanEngine" "', argument " "4"" of type '" "intOrNull""'");
      } else {
        arg4 = *(reinterpret_cast< intOrNull * >(argp4));
      }
    }
    ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_MCEuropeanEngine" "', argument " "5"" of type '" "bool""'");
    } 
    arg5 = static_cast< bool >(val5);
    ecode6 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_MCEuropeanEngine" "', argument " "6"" of type '" "bool""'");
    } 
    arg6 = static_cast< bool >(val6);
    {
      res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_intOrNull,  0 );
      if (!SWIG_IsOK(res7)) {
        SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_MCEuropeanEngine" "', argument " "7"" of type '" "intOrNull""'"); 
      }  
      if (!argp7) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEuropeanEngine" "', argument " "7"" of type '" "intOrNull""'");
      } else {
        arg7 = *(reinterpret_cast< intOrNull * >(argp7));
      }
    }
    {
      res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_doubleOrNull,  0 );
      if (!SWIG_IsOK(res8)) {
        SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_MCEuropeanEngine" "', argument " "8"" of type '" "doubleOrNull""'"); 
      }  
      if (!argp8) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEuropeanEngine" "', argument " "8"" of type '" "doubleOrNull""'");
      } else {
        arg8 = *(reinterpret_cast< doubleOrNull * >(argp8));
      }
    }
    {
      try {
        result = (MCEuropeanEnginePtr *)new_MCEuropeanEnginePtr__SWIG_0((GeneralizedBlackScholesProcessPtr const &)*arg1,(std::string const &)*arg2,arg3,arg4,arg5,arg6,arg7,arg8);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MCEuropeanEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MCEuropeanEngine__SWIG_3) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    std::string *arg2 = 0 ;
    intOrNull arg3 ;
    intOrNull arg4 ;
    bool arg5 ;
    bool arg6 ;
    intOrNull arg7 ;
    void *argp1 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    bool val5 ;
    int ecode5 = 0 ;
    bool val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    int argvi = 0;
    MCEuropeanEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: new_MCEuropeanEngine(process,traits,timeSteps,timeStepsPerYear,brownianBridge,antitheticVariate,requiredSamples);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MCEuropeanEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEuropeanEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MCEuropeanEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEuropeanEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_intOrNull,  0 );
      if (!SWIG_IsOK(res3)) {
        SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_MCEuropeanEngine" "', argument " "3"" of type '" "intOrNull""'"); 
      }  
      if (!argp3) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEuropeanEngine" "', argument " "3"" of type '" "intOrNull""'");
      } else {
        arg3 = *(reinterpret_cast< intOrNull * >(argp3));
      }
    }
    {
      res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_intOrNull,  0 );
      if (!SWIG_IsOK(res4)) {
        SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_MCEuropeanEngine" "', argument " "4"" of type '" "intOrNull""'"); 
      }  
      if (!argp4) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEuropeanEngine" "', argument " "4"" of type '" "intOrNull""'");
      } else {
        arg4 = *(reinterpret_cast< intOrNull * >(argp4));
      }
    }
    ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_MCEuropeanEngine" "', argument " "5"" of type '" "bool""'");
    } 
    arg5 = static_cast< bool >(val5);
    ecode6 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_MCEuropeanEngine" "', argument " "6"" of type '" "bool""'");
    } 
    arg6 = static_cast< bool >(val6);
    {
      res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_intOrNull,  0 );
      if (!SWIG_IsOK(res7)) {
        SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_MCEuropeanEngine" "', argument " "7"" of type '" "intOrNull""'"); 
      }  
      if (!argp7) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEuropeanEngine" "', argument " "7"" of type '" "intOrNull""'");
      } else {
        arg7 = *(reinterpret_cast< intOrNull * >(argp7));
      }
    }
    {
      try {
        result = (MCEuropeanEnginePtr *)new_MCEuropeanEnginePtr__SWIG_0((GeneralizedBlackScholesProcessPtr const &)*arg1,(std::string const &)*arg2,arg3,arg4,arg5,arg6,arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MCEuropeanEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MCEuropeanEngine__SWIG_4) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    std::string *arg2 = 0 ;
    intOrNull arg3 ;
    intOrNull arg4 ;
    bool arg5 ;
    bool arg6 ;
    void *argp1 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    bool val5 ;
    int ecode5 = 0 ;
    bool val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    MCEuropeanEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_MCEuropeanEngine(process,traits,timeSteps,timeStepsPerYear,brownianBridge,antitheticVariate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MCEuropeanEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEuropeanEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MCEuropeanEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEuropeanEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_intOrNull,  0 );
      if (!SWIG_IsOK(res3)) {
        SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_MCEuropeanEngine" "', argument " "3"" of type '" "intOrNull""'"); 
      }  
      if (!argp3) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEuropeanEngine" "', argument " "3"" of type '" "intOrNull""'");
      } else {
        arg3 = *(reinterpret_cast< intOrNull * >(argp3));
      }
    }
    {
      res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_intOrNull,  0 );
      if (!SWIG_IsOK(res4)) {
        SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_MCEuropeanEngine" "', argument " "4"" of type '" "intOrNull""'"); 
      }  
      if (!argp4) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEuropeanEngine" "', argument " "4"" of type '" "intOrNull""'");
      } else {
        arg4 = *(reinterpret_cast< intOrNull * >(argp4));
      }
    }
    ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_MCEuropeanEngine" "', argument " "5"" of type '" "bool""'");
    } 
    arg5 = static_cast< bool >(val5);
    ecode6 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_MCEuropeanEngine" "', argument " "6"" of type '" "bool""'");
    } 
    arg6 = static_cast< bool >(val6);
    {
      try {
        result = (MCEuropeanEnginePtr *)new_MCEuropeanEnginePtr__SWIG_0((GeneralizedBlackScholesProcessPtr const &)*arg1,(std::string const &)*arg2,arg3,arg4,arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MCEuropeanEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MCEuropeanEngine__SWIG_5) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    std::string *arg2 = 0 ;
    intOrNull arg3 ;
    intOrNull arg4 ;
    bool arg5 ;
    void *argp1 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    bool val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    MCEuropeanEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_MCEuropeanEngine(process,traits,timeSteps,timeStepsPerYear,brownianBridge);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MCEuropeanEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEuropeanEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MCEuropeanEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEuropeanEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_intOrNull,  0 );
      if (!SWIG_IsOK(res3)) {
        SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_MCEuropeanEngine" "', argument " "3"" of type '" "intOrNull""'"); 
      }  
      if (!argp3) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEuropeanEngine" "', argument " "3"" of type '" "intOrNull""'");
      } else {
        arg3 = *(reinterpret_cast< intOrNull * >(argp3));
      }
    }
    {
      res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_intOrNull,  0 );
      if (!SWIG_IsOK(res4)) {
        SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_MCEuropeanEngine" "', argument " "4"" of type '" "intOrNull""'"); 
      }  
      if (!argp4) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEuropeanEngine" "', argument " "4"" of type '" "intOrNull""'");
      } else {
        arg4 = *(reinterpret_cast< intOrNull * >(argp4));
      }
    }
    ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_MCEuropeanEngine" "', argument " "5"" of type '" "bool""'");
    } 
    arg5 = static_cast< bool >(val5);
    {
      try {
        result = (MCEuropeanEnginePtr *)new_MCEuropeanEnginePtr__SWIG_0((GeneralizedBlackScholesProcessPtr const &)*arg1,(std::string const &)*arg2,arg3,arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MCEuropeanEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MCEuropeanEngine__SWIG_6) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    std::string *arg2 = 0 ;
    intOrNull arg3 ;
    intOrNull arg4 ;
    void *argp1 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int argvi = 0;
    MCEuropeanEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_MCEuropeanEngine(process,traits,timeSteps,timeStepsPerYear);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MCEuropeanEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEuropeanEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MCEuropeanEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEuropeanEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_intOrNull,  0 );
      if (!SWIG_IsOK(res3)) {
        SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_MCEuropeanEngine" "', argument " "3"" of type '" "intOrNull""'"); 
      }  
      if (!argp3) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEuropeanEngine" "', argument " "3"" of type '" "intOrNull""'");
      } else {
        arg3 = *(reinterpret_cast< intOrNull * >(argp3));
      }
    }
    {
      res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_intOrNull,  0 );
      if (!SWIG_IsOK(res4)) {
        SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_MCEuropeanEngine" "', argument " "4"" of type '" "intOrNull""'"); 
      }  
      if (!argp4) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEuropeanEngine" "', argument " "4"" of type '" "intOrNull""'");
      } else {
        arg4 = *(reinterpret_cast< intOrNull * >(argp4));
      }
    }
    {
      try {
        result = (MCEuropeanEnginePtr *)new_MCEuropeanEnginePtr__SWIG_0((GeneralizedBlackScholesProcessPtr const &)*arg1,(std::string const &)*arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MCEuropeanEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_new_MCEuropeanEngine__SWIG_7) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    std::string *arg2 = 0 ;
    intOrNull arg3 ;
    void *argp1 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    MCEuropeanEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_MCEuropeanEngine(process,traits,timeSteps);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MCEuropeanEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEuropeanEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MCEuropeanEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEuropeanEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_intOrNull,  0 );
      if (!SWIG_IsOK(res3)) {
        SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_MCEuropeanEngine" "', argument " "3"" of type '" "intOrNull""'"); 
      }  
      if (!argp3) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEuropeanEngine" "', argument " "3"" of type '" "intOrNull""'");
      } else {
        arg3 = *(reinterpret_cast< intOrNull * >(argp3));
      }
    }
    {
      try {
        result = (MCEuropeanEnginePtr *)new_MCEuropeanEnginePtr__SWIG_0((GeneralizedBlackScholesProcessPtr const &)*arg1,(std::string const &)*arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MCEuropeanEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_new_MCEuropeanEngine__SWIG_8) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    std::string *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    MCEuropeanEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_MCEuropeanEngine(process,traits);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MCEuropeanEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEuropeanEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MCEuropeanEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEuropeanEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      try {
        result = (MCEuropeanEnginePtr *)new_MCEuropeanEnginePtr__SWIG_0((GeneralizedBlackScholesProcessPtr const &)*arg1,(std::string const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MCEuropeanEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_new_MCEuropeanEngine) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_intOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_intOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_intOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_intOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_intOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_intOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_intOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_intOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_intOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_intOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
    if (items == 8) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_intOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_intOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_intOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_doubleOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 7;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_7:
    
    if (items == 9) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_intOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_intOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_intOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_doubleOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_intOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 8;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_8:
    
    if (items == 10) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_intOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_intOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_intOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_doubleOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_intOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_long SWIG_PERL_CALL_ARGS_2(ST(9), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 9;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_9:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MCEuropeanEngine__SWIG_8); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MCEuropeanEngine__SWIG_7); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MCEuropeanEngine__SWIG_6); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MCEuropeanEngine__SWIG_5); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MCEuropeanEngine__SWIG_4); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MCEuropeanEngine__SWIG_3); return;
    case 7:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MCEuropeanEngine__SWIG_2); return;
    case 8:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MCEuropeanEngine__SWIG_1); return;
    case 9:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MCEuropeanEngine__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_MCEuropeanEngine'");
  XSRETURN(0);
}


XS(_wrap_delete_MCEuropeanEngine) {
  {
    MCEuropeanEnginePtr *arg1 = (MCEuropeanEnginePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_MCEuropeanEngine(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_MCEuropeanEnginePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MCEuropeanEngine" "', argument " "1"" of type '" "MCEuropeanEnginePtr *""'"); 
    }
    arg1 = reinterpret_cast< MCEuropeanEnginePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FDAmericanEngine__SWIG_0) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    Size arg2 ;
    Size arg3 ;
    bool arg4 ;
    void *argp1 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    size_t val3 ;
    int ecode3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    FDAmericanEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_FDAmericanEngine(process,timeSteps,gridPoints,timeDependent);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FDAmericanEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FDAmericanEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FDAmericanEngine" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_FDAmericanEngine" "', argument " "3"" of type '" "Size""'");
    } 
    arg3 = static_cast< Size >(val3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_FDAmericanEngine" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    {
      try {
        result = (FDAmericanEnginePtr *)new_FDAmericanEnginePtr__SWIG_0((GeneralizedBlackScholesProcessPtr const &)*arg1,arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FDAmericanEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FDAmericanEngine__SWIG_1) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    Size arg2 ;
    Size arg3 ;
    void *argp1 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    size_t val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    FDAmericanEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_FDAmericanEngine(process,timeSteps,gridPoints);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FDAmericanEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FDAmericanEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FDAmericanEngine" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_FDAmericanEngine" "', argument " "3"" of type '" "Size""'");
    } 
    arg3 = static_cast< Size >(val3);
    {
      try {
        result = (FDAmericanEnginePtr *)new_FDAmericanEnginePtr__SWIG_0((GeneralizedBlackScholesProcessPtr const &)*arg1,arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FDAmericanEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FDAmericanEngine__SWIG_2) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    Size arg2 ;
    void *argp1 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    FDAmericanEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_FDAmericanEngine(process,timeSteps);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FDAmericanEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FDAmericanEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FDAmericanEngine" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    {
      try {
        result = (FDAmericanEnginePtr *)new_FDAmericanEnginePtr__SWIG_0((GeneralizedBlackScholesProcessPtr const &)*arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FDAmericanEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FDAmericanEngine__SWIG_3) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    FDAmericanEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_FDAmericanEngine(process);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FDAmericanEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FDAmericanEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    {
      try {
        result = (FDAmericanEnginePtr *)new_FDAmericanEnginePtr__SWIG_0((GeneralizedBlackScholesProcessPtr const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FDAmericanEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FDAmericanEngine) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FDAmericanEngine__SWIG_3); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FDAmericanEngine__SWIG_2); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FDAmericanEngine__SWIG_1); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FDAmericanEngine__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_FDAmericanEngine'");
  XSRETURN(0);
}


XS(_wrap_delete_FDAmericanEngine) {
  {
    FDAmericanEnginePtr *arg1 = (FDAmericanEnginePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_FDAmericanEngine(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_FDAmericanEnginePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FDAmericanEngine" "', argument " "1"" of type '" "FDAmericanEnginePtr *""'"); 
    }
    arg1 = reinterpret_cast< FDAmericanEnginePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FdBlackScholesVanillaEngine__SWIG_0) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    Size arg2 ;
    Size arg3 ;
    Size arg4 ;
    void *argp1 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    size_t val3 ;
    int ecode3 = 0 ;
    size_t val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    FdBlackScholesVanillaEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_FdBlackScholesVanillaEngine(process,tGrid,xGrid,dampingSteps);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FdBlackScholesVanillaEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FdBlackScholesVanillaEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FdBlackScholesVanillaEngine" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_FdBlackScholesVanillaEngine" "', argument " "3"" of type '" "Size""'");
    } 
    arg3 = static_cast< Size >(val3);
    ecode4 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_FdBlackScholesVanillaEngine" "', argument " "4"" of type '" "Size""'");
    } 
    arg4 = static_cast< Size >(val4);
    {
      try {
        result = (FdBlackScholesVanillaEnginePtr *)new_FdBlackScholesVanillaEnginePtr__SWIG_0((GeneralizedBlackScholesProcessPtr const &)*arg1,arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FdBlackScholesVanillaEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FdBlackScholesVanillaEngine__SWIG_1) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    Size arg2 ;
    Size arg3 ;
    void *argp1 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    size_t val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    FdBlackScholesVanillaEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_FdBlackScholesVanillaEngine(process,tGrid,xGrid);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FdBlackScholesVanillaEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FdBlackScholesVanillaEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FdBlackScholesVanillaEngine" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_FdBlackScholesVanillaEngine" "', argument " "3"" of type '" "Size""'");
    } 
    arg3 = static_cast< Size >(val3);
    {
      try {
        result = (FdBlackScholesVanillaEnginePtr *)new_FdBlackScholesVanillaEnginePtr__SWIG_0((GeneralizedBlackScholesProcessPtr const &)*arg1,arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FdBlackScholesVanillaEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FdBlackScholesVanillaEngine__SWIG_2) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    Size arg2 ;
    void *argp1 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    FdBlackScholesVanillaEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_FdBlackScholesVanillaEngine(process,tGrid);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FdBlackScholesVanillaEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FdBlackScholesVanillaEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FdBlackScholesVanillaEngine" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    {
      try {
        result = (FdBlackScholesVanillaEnginePtr *)new_FdBlackScholesVanillaEnginePtr__SWIG_0((GeneralizedBlackScholesProcessPtr const &)*arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FdBlackScholesVanillaEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FdBlackScholesVanillaEngine__SWIG_3) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    FdBlackScholesVanillaEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_FdBlackScholesVanillaEngine(process);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FdBlackScholesVanillaEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FdBlackScholesVanillaEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    {
      try {
        result = (FdBlackScholesVanillaEnginePtr *)new_FdBlackScholesVanillaEnginePtr__SWIG_0((GeneralizedBlackScholesProcessPtr const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FdBlackScholesVanillaEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FdBlackScholesVanillaEngine) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FdBlackScholesVanillaEngine__SWIG_3); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FdBlackScholesVanillaEngine__SWIG_2); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FdBlackScholesVanillaEngine__SWIG_1); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FdBlackScholesVanillaEngine__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_FdBlackScholesVanillaEngine'");
  XSRETURN(0);
}


XS(_wrap_delete_FdBlackScholesVanillaEngine) {
  {
    FdBlackScholesVanillaEnginePtr *arg1 = (FdBlackScholesVanillaEnginePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_FdBlackScholesVanillaEngine(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_FdBlackScholesVanillaEnginePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FdBlackScholesVanillaEngine" "', argument " "1"" of type '" "FdBlackScholesVanillaEnginePtr *""'"); 
    }
    arg1 = reinterpret_cast< FdBlackScholesVanillaEnginePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FdBatesVanillaEngine__SWIG_0) {
  {
    BatesModelPtr *arg1 = 0 ;
    Size arg2 ;
    Size arg3 ;
    Size arg4 ;
    Size arg5 ;
    void *argp1 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    size_t val3 ;
    int ecode3 = 0 ;
    size_t val4 ;
    int ecode4 = 0 ;
    size_t val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    FdBatesVanillaEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_FdBatesVanillaEngine(model,tGrid,xGrid,vGrid,dampingSteps);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_BatesModelPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FdBatesVanillaEngine" "', argument " "1"" of type '" "BatesModelPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FdBatesVanillaEngine" "', argument " "1"" of type '" "BatesModelPtr const &""'"); 
    }
    arg1 = reinterpret_cast< BatesModelPtr * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FdBatesVanillaEngine" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_FdBatesVanillaEngine" "', argument " "3"" of type '" "Size""'");
    } 
    arg3 = static_cast< Size >(val3);
    ecode4 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_FdBatesVanillaEngine" "', argument " "4"" of type '" "Size""'");
    } 
    arg4 = static_cast< Size >(val4);
    ecode5 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_FdBatesVanillaEngine" "', argument " "5"" of type '" "Size""'");
    } 
    arg5 = static_cast< Size >(val5);
    {
      try {
        result = (FdBatesVanillaEnginePtr *)new_FdBatesVanillaEnginePtr__SWIG_0((BatesModelPtr const &)*arg1,arg2,arg3,arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FdBatesVanillaEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FdBatesVanillaEngine__SWIG_1) {
  {
    BatesModelPtr *arg1 = 0 ;
    Size arg2 ;
    Size arg3 ;
    Size arg4 ;
    void *argp1 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    size_t val3 ;
    int ecode3 = 0 ;
    size_t val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    FdBatesVanillaEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_FdBatesVanillaEngine(model,tGrid,xGrid,vGrid);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_BatesModelPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FdBatesVanillaEngine" "', argument " "1"" of type '" "BatesModelPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FdBatesVanillaEngine" "', argument " "1"" of type '" "BatesModelPtr const &""'"); 
    }
    arg1 = reinterpret_cast< BatesModelPtr * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FdBatesVanillaEngine" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_FdBatesVanillaEngine" "', argument " "3"" of type '" "Size""'");
    } 
    arg3 = static_cast< Size >(val3);
    ecode4 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_FdBatesVanillaEngine" "', argument " "4"" of type '" "Size""'");
    } 
    arg4 = static_cast< Size >(val4);
    {
      try {
        result = (FdBatesVanillaEnginePtr *)new_FdBatesVanillaEnginePtr__SWIG_0((BatesModelPtr const &)*arg1,arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FdBatesVanillaEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FdBatesVanillaEngine__SWIG_2) {
  {
    BatesModelPtr *arg1 = 0 ;
    Size arg2 ;
    Size arg3 ;
    void *argp1 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    size_t val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    FdBatesVanillaEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_FdBatesVanillaEngine(model,tGrid,xGrid);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_BatesModelPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FdBatesVanillaEngine" "', argument " "1"" of type '" "BatesModelPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FdBatesVanillaEngine" "', argument " "1"" of type '" "BatesModelPtr const &""'"); 
    }
    arg1 = reinterpret_cast< BatesModelPtr * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FdBatesVanillaEngine" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_FdBatesVanillaEngine" "', argument " "3"" of type '" "Size""'");
    } 
    arg3 = static_cast< Size >(val3);
    {
      try {
        result = (FdBatesVanillaEnginePtr *)new_FdBatesVanillaEnginePtr__SWIG_0((BatesModelPtr const &)*arg1,arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FdBatesVanillaEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FdBatesVanillaEngine__SWIG_3) {
  {
    BatesModelPtr *arg1 = 0 ;
    Size arg2 ;
    void *argp1 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    FdBatesVanillaEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_FdBatesVanillaEngine(model,tGrid);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_BatesModelPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FdBatesVanillaEngine" "', argument " "1"" of type '" "BatesModelPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FdBatesVanillaEngine" "', argument " "1"" of type '" "BatesModelPtr const &""'"); 
    }
    arg1 = reinterpret_cast< BatesModelPtr * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FdBatesVanillaEngine" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    {
      try {
        result = (FdBatesVanillaEnginePtr *)new_FdBatesVanillaEnginePtr__SWIG_0((BatesModelPtr const &)*arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FdBatesVanillaEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FdBatesVanillaEngine__SWIG_4) {
  {
    BatesModelPtr *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    FdBatesVanillaEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_FdBatesVanillaEngine(model);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_BatesModelPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FdBatesVanillaEngine" "', argument " "1"" of type '" "BatesModelPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FdBatesVanillaEngine" "', argument " "1"" of type '" "BatesModelPtr const &""'"); 
    }
    arg1 = reinterpret_cast< BatesModelPtr * >(argp1);
    {
      try {
        result = (FdBatesVanillaEnginePtr *)new_FdBatesVanillaEnginePtr__SWIG_0((BatesModelPtr const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FdBatesVanillaEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FdBatesVanillaEngine) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BatesModelPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BatesModelPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BatesModelPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BatesModelPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BatesModelPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FdBatesVanillaEngine__SWIG_4); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FdBatesVanillaEngine__SWIG_3); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FdBatesVanillaEngine__SWIG_2); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FdBatesVanillaEngine__SWIG_1); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FdBatesVanillaEngine__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_FdBatesVanillaEngine'");
  XSRETURN(0);
}


XS(_wrap_delete_FdBatesVanillaEngine) {
  {
    FdBatesVanillaEnginePtr *arg1 = (FdBatesVanillaEnginePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_FdBatesVanillaEngine(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_FdBatesVanillaEnginePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FdBatesVanillaEngine" "', argument " "1"" of type '" "FdBatesVanillaEnginePtr *""'"); 
    }
    arg1 = reinterpret_cast< FdBatesVanillaEnginePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ContinuousArithmeticAsianLevyEngine) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    Handle< Quote > *arg2 = 0 ;
    Date *arg3 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    ContinuousArithmeticAsianLevyEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_ContinuousArithmeticAsianLevyEngine(process,runningAverage,startDate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ContinuousArithmeticAsianLevyEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ContinuousArithmeticAsianLevyEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ContinuousArithmeticAsianLevyEngine" "', argument " "2"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ContinuousArithmeticAsianLevyEngine" "', argument " "2"" of type '" "Handle< Quote > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< Quote > * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_ContinuousArithmeticAsianLevyEngine" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ContinuousArithmeticAsianLevyEngine" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    {
      try {
        result = (ContinuousArithmeticAsianLevyEnginePtr *)new_ContinuousArithmeticAsianLevyEnginePtr((GeneralizedBlackScholesProcessPtr const &)*arg1,(Handle< Quote > const &)*arg2,(Date const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ContinuousArithmeticAsianLevyEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_ContinuousArithmeticAsianLevyEngine) {
  {
    ContinuousArithmeticAsianLevyEnginePtr *arg1 = (ContinuousArithmeticAsianLevyEnginePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_ContinuousArithmeticAsianLevyEngine(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ContinuousArithmeticAsianLevyEnginePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ContinuousArithmeticAsianLevyEngine" "', argument " "1"" of type '" "ContinuousArithmeticAsianLevyEnginePtr *""'"); 
    }
    arg1 = reinterpret_cast< ContinuousArithmeticAsianLevyEnginePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FdBlackScholesAsianEngine) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    Size arg2 ;
    Size arg3 ;
    Size arg4 ;
    void *argp1 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    size_t val3 ;
    int ecode3 = 0 ;
    size_t val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    FdBlackScholesAsianEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_FdBlackScholesAsianEngine(process,tGrid,xGrid,aGrid);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FdBlackScholesAsianEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FdBlackScholesAsianEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FdBlackScholesAsianEngine" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_FdBlackScholesAsianEngine" "', argument " "3"" of type '" "Size""'");
    } 
    arg3 = static_cast< Size >(val3);
    ecode4 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_FdBlackScholesAsianEngine" "', argument " "4"" of type '" "Size""'");
    } 
    arg4 = static_cast< Size >(val4);
    {
      try {
        result = (FdBlackScholesAsianEnginePtr *)new_FdBlackScholesAsianEnginePtr((GeneralizedBlackScholesProcessPtr const &)*arg1,arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FdBlackScholesAsianEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_FdBlackScholesAsianEngine) {
  {
    FdBlackScholesAsianEnginePtr *arg1 = (FdBlackScholesAsianEnginePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_FdBlackScholesAsianEngine(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_FdBlackScholesAsianEnginePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FdBlackScholesAsianEngine" "', argument " "1"" of type '" "FdBlackScholesAsianEnginePtr *""'"); 
    }
    arg1 = reinterpret_cast< FdBlackScholesAsianEnginePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FDShoutEngine__SWIG_0) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    Size arg2 ;
    Size arg3 ;
    bool arg4 ;
    void *argp1 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    size_t val3 ;
    int ecode3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    FDShoutEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_FDShoutEngine(process,timeSteps,gridPoints,timeDependent);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FDShoutEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FDShoutEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FDShoutEngine" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_FDShoutEngine" "', argument " "3"" of type '" "Size""'");
    } 
    arg3 = static_cast< Size >(val3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_FDShoutEngine" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    {
      try {
        result = (FDShoutEnginePtr *)new_FDShoutEnginePtr__SWIG_0((GeneralizedBlackScholesProcessPtr const &)*arg1,arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FDShoutEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FDShoutEngine__SWIG_1) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    Size arg2 ;
    Size arg3 ;
    void *argp1 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    size_t val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    FDShoutEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_FDShoutEngine(process,timeSteps,gridPoints);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FDShoutEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FDShoutEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FDShoutEngine" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_FDShoutEngine" "', argument " "3"" of type '" "Size""'");
    } 
    arg3 = static_cast< Size >(val3);
    {
      try {
        result = (FDShoutEnginePtr *)new_FDShoutEnginePtr__SWIG_0((GeneralizedBlackScholesProcessPtr const &)*arg1,arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FDShoutEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FDShoutEngine__SWIG_2) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    Size arg2 ;
    void *argp1 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    FDShoutEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_FDShoutEngine(process,timeSteps);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FDShoutEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FDShoutEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FDShoutEngine" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    {
      try {
        result = (FDShoutEnginePtr *)new_FDShoutEnginePtr__SWIG_0((GeneralizedBlackScholesProcessPtr const &)*arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FDShoutEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FDShoutEngine__SWIG_3) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    FDShoutEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_FDShoutEngine(process);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FDShoutEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FDShoutEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    {
      try {
        result = (FDShoutEnginePtr *)new_FDShoutEnginePtr__SWIG_0((GeneralizedBlackScholesProcessPtr const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FDShoutEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FDShoutEngine) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FDShoutEngine__SWIG_3); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FDShoutEngine__SWIG_2); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FDShoutEngine__SWIG_1); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FDShoutEngine__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_FDShoutEngine'");
  XSRETURN(0);
}


XS(_wrap_delete_FDShoutEngine) {
  {
    FDShoutEnginePtr *arg1 = (FDShoutEnginePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_FDShoutEngine(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_FDShoutEnginePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FDShoutEngine" "', argument " "1"" of type '" "FDShoutEnginePtr *""'"); 
    }
    arg1 = reinterpret_cast< FDShoutEnginePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BaroneAdesiWhaleyEngine) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    BaroneAdesiWhaleyApproximationEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_BaroneAdesiWhaleyEngine(process);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_BaroneAdesiWhaleyEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BaroneAdesiWhaleyEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    {
      try {
        result = (BaroneAdesiWhaleyApproximationEnginePtr *)new_BaroneAdesiWhaleyApproximationEnginePtr((GeneralizedBlackScholesProcessPtr const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BaroneAdesiWhaleyApproximationEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_BaroneAdesiWhaleyEngine) {
  {
    BaroneAdesiWhaleyApproximationEnginePtr *arg1 = (BaroneAdesiWhaleyApproximationEnginePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_BaroneAdesiWhaleyEngine(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BaroneAdesiWhaleyApproximationEnginePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_BaroneAdesiWhaleyEngine" "', argument " "1"" of type '" "BaroneAdesiWhaleyApproximationEnginePtr *""'"); 
    }
    arg1 = reinterpret_cast< BaroneAdesiWhaleyApproximationEnginePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BjerksundStenslandEngine) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    BjerksundStenslandApproximationEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_BjerksundStenslandEngine(process);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_BjerksundStenslandEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BjerksundStenslandEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    {
      try {
        result = (BjerksundStenslandApproximationEnginePtr *)new_BjerksundStenslandApproximationEnginePtr((GeneralizedBlackScholesProcessPtr const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BjerksundStenslandApproximationEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_BjerksundStenslandEngine) {
  {
    BjerksundStenslandApproximationEnginePtr *arg1 = (BjerksundStenslandApproximationEnginePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_BjerksundStenslandEngine(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BjerksundStenslandApproximationEnginePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_BjerksundStenslandEngine" "', argument " "1"" of type '" "BjerksundStenslandApproximationEnginePtr *""'"); 
    }
    arg1 = reinterpret_cast< BjerksundStenslandApproximationEnginePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_AnalyticDigitalAmericanEngine) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    AnalyticDigitalAmericanEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_AnalyticDigitalAmericanEngine(process);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_AnalyticDigitalAmericanEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AnalyticDigitalAmericanEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    {
      try {
        result = (AnalyticDigitalAmericanEnginePtr *)new_AnalyticDigitalAmericanEnginePtr((GeneralizedBlackScholesProcessPtr const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_AnalyticDigitalAmericanEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_AnalyticDigitalAmericanEngine) {
  {
    AnalyticDigitalAmericanEnginePtr *arg1 = (AnalyticDigitalAmericanEnginePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_AnalyticDigitalAmericanEngine(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_AnalyticDigitalAmericanEnginePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_AnalyticDigitalAmericanEngine" "', argument " "1"" of type '" "AnalyticDigitalAmericanEnginePtr *""'"); 
    }
    arg1 = reinterpret_cast< AnalyticDigitalAmericanEnginePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_AnalyticDigitalAmericanKOEngine) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    AnalyticDigitalAmericanKOEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_AnalyticDigitalAmericanKOEngine(process);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_AnalyticDigitalAmericanKOEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AnalyticDigitalAmericanKOEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    {
      try {
        result = (AnalyticDigitalAmericanKOEnginePtr *)new_AnalyticDigitalAmericanKOEnginePtr((GeneralizedBlackScholesProcessPtr const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_AnalyticDigitalAmericanKOEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_AnalyticDigitalAmericanKOEngine) {
  {
    AnalyticDigitalAmericanKOEnginePtr *arg1 = (AnalyticDigitalAmericanKOEnginePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_AnalyticDigitalAmericanKOEngine(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_AnalyticDigitalAmericanKOEnginePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_AnalyticDigitalAmericanKOEngine" "', argument " "1"" of type '" "AnalyticDigitalAmericanKOEnginePtr *""'"); 
    }
    arg1 = reinterpret_cast< AnalyticDigitalAmericanKOEnginePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DividendVanillaOption) {
  {
    boost::shared_ptr< Payoff > *arg1 = 0 ;
    boost::shared_ptr< Exercise > *arg2 = 0 ;
    std::vector< Date > *arg3 = 0 ;
    std::vector< Real > *arg4 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    std::vector< Date > temp3 ;
    std::vector< Date > *v3 ;
    std::vector< double > temp4 ;
    std::vector< double > *v4 ;
    int argvi = 0;
    DividendVanillaOptionPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_DividendVanillaOption(payoff,exercise,dividendDates,dividends);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_Payoff_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DividendVanillaOption" "', argument " "1"" of type '" "boost::shared_ptr< Payoff > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DividendVanillaOption" "', argument " "1"" of type '" "boost::shared_ptr< Payoff > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Payoff > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_boost__shared_ptrT_Exercise_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_DividendVanillaOption" "', argument " "2"" of type '" "boost::shared_ptr< Exercise > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DividendVanillaOption" "', argument " "2"" of type '" "boost::shared_ptr< Exercise > const &""'"); 
    }
    arg2 = reinterpret_cast< boost::shared_ptr< Exercise > * >(argp2);
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_DividendVanillaOption. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp3.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_DividendVanillaOption. "
              "Expected an array of " "Date");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_DividendVanillaOption. "
          "Expected an array of " "Date");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of new_DividendVanillaOption. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp4.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 4 of "
              "new_DividendVanillaOption. "
              "Expected an array of ""double");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of new_DividendVanillaOption. "
          "Expected an array of ""double");
      }
    }
    {
      try {
        result = (DividendVanillaOptionPtr *)new_DividendVanillaOptionPtr((boost::shared_ptr< Payoff > const &)*arg1,(boost::shared_ptr< Exercise > const &)*arg2,(std::vector< Date > const &)*arg3,(std::vector< double > const &)*arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DividendVanillaOptionPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_DividendVanillaOption_priceCurve) {
  {
    DividendVanillaOptionPtr *arg1 = (DividendVanillaOptionPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    SampledCurve result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DividendVanillaOption_priceCurve(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_DividendVanillaOptionPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DividendVanillaOption_priceCurve" "', argument " "1"" of type '" "DividendVanillaOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< DividendVanillaOptionPtr * >(argp1);
    {
      try {
        result = DividendVanillaOptionPtr_priceCurve(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new SampledCurve(static_cast< const SampledCurve& >(result))), SWIGTYPE_p_SampledCurve, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_DividendVanillaOption_impliedVolatility__SWIG_0) {
  {
    DividendVanillaOptionPtr *arg1 = (DividendVanillaOptionPtr *) 0 ;
    Real arg2 ;
    GeneralizedBlackScholesProcessPtr *arg3 = 0 ;
    Real arg4 ;
    Size arg5 ;
    Volatility arg6 ;
    Volatility arg7 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    size_t val5 ;
    int ecode5 = 0 ;
    double val6 ;
    int ecode6 = 0 ;
    double val7 ;
    int ecode7 = 0 ;
    int argvi = 0;
    Volatility result;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: DividendVanillaOption_impliedVolatility(self,targetValue,process,accuracy,maxEvaluations,minVol,maxVol);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_DividendVanillaOptionPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DividendVanillaOption_impliedVolatility" "', argument " "1"" of type '" "DividendVanillaOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< DividendVanillaOptionPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DividendVanillaOption_impliedVolatility" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "DividendVanillaOption_impliedVolatility" "', argument " "3"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DividendVanillaOption_impliedVolatility" "', argument " "3"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg3 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "DividendVanillaOption_impliedVolatility" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    ecode5 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "DividendVanillaOption_impliedVolatility" "', argument " "5"" of type '" "Size""'");
    } 
    arg5 = static_cast< Size >(val5);
    ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "DividendVanillaOption_impliedVolatility" "', argument " "6"" of type '" "Volatility""'");
    } 
    arg6 = static_cast< Volatility >(val6);
    ecode7 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "DividendVanillaOption_impliedVolatility" "', argument " "7"" of type '" "Volatility""'");
    } 
    arg7 = static_cast< Volatility >(val7);
    {
      try {
        result = (Volatility)DividendVanillaOptionPtr_impliedVolatility__SWIG_0(arg1,arg2,(GeneralizedBlackScholesProcessPtr const &)*arg3,arg4,arg5,arg6,arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_DividendVanillaOption_impliedVolatility__SWIG_1) {
  {
    DividendVanillaOptionPtr *arg1 = (DividendVanillaOptionPtr *) 0 ;
    Real arg2 ;
    GeneralizedBlackScholesProcessPtr *arg3 = 0 ;
    Real arg4 ;
    Size arg5 ;
    Volatility arg6 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    size_t val5 ;
    int ecode5 = 0 ;
    double val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    Volatility result;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: DividendVanillaOption_impliedVolatility(self,targetValue,process,accuracy,maxEvaluations,minVol);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_DividendVanillaOptionPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DividendVanillaOption_impliedVolatility" "', argument " "1"" of type '" "DividendVanillaOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< DividendVanillaOptionPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DividendVanillaOption_impliedVolatility" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "DividendVanillaOption_impliedVolatility" "', argument " "3"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DividendVanillaOption_impliedVolatility" "', argument " "3"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg3 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "DividendVanillaOption_impliedVolatility" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    ecode5 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "DividendVanillaOption_impliedVolatility" "', argument " "5"" of type '" "Size""'");
    } 
    arg5 = static_cast< Size >(val5);
    ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "DividendVanillaOption_impliedVolatility" "', argument " "6"" of type '" "Volatility""'");
    } 
    arg6 = static_cast< Volatility >(val6);
    {
      try {
        result = (Volatility)DividendVanillaOptionPtr_impliedVolatility__SWIG_0(arg1,arg2,(GeneralizedBlackScholesProcessPtr const &)*arg3,arg4,arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_DividendVanillaOption_impliedVolatility__SWIG_2) {
  {
    DividendVanillaOptionPtr *arg1 = (DividendVanillaOptionPtr *) 0 ;
    Real arg2 ;
    GeneralizedBlackScholesProcessPtr *arg3 = 0 ;
    Real arg4 ;
    Size arg5 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    size_t val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    Volatility result;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: DividendVanillaOption_impliedVolatility(self,targetValue,process,accuracy,maxEvaluations);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_DividendVanillaOptionPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DividendVanillaOption_impliedVolatility" "', argument " "1"" of type '" "DividendVanillaOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< DividendVanillaOptionPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DividendVanillaOption_impliedVolatility" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "DividendVanillaOption_impliedVolatility" "', argument " "3"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DividendVanillaOption_impliedVolatility" "', argument " "3"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg3 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "DividendVanillaOption_impliedVolatility" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    ecode5 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "DividendVanillaOption_impliedVolatility" "', argument " "5"" of type '" "Size""'");
    } 
    arg5 = static_cast< Size >(val5);
    {
      try {
        result = (Volatility)DividendVanillaOptionPtr_impliedVolatility__SWIG_0(arg1,arg2,(GeneralizedBlackScholesProcessPtr const &)*arg3,arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_DividendVanillaOption_impliedVolatility__SWIG_3) {
  {
    DividendVanillaOptionPtr *arg1 = (DividendVanillaOptionPtr *) 0 ;
    Real arg2 ;
    GeneralizedBlackScholesProcessPtr *arg3 = 0 ;
    Real arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Volatility result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: DividendVanillaOption_impliedVolatility(self,targetValue,process,accuracy);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_DividendVanillaOptionPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DividendVanillaOption_impliedVolatility" "', argument " "1"" of type '" "DividendVanillaOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< DividendVanillaOptionPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DividendVanillaOption_impliedVolatility" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "DividendVanillaOption_impliedVolatility" "', argument " "3"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DividendVanillaOption_impliedVolatility" "', argument " "3"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg3 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "DividendVanillaOption_impliedVolatility" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    {
      try {
        result = (Volatility)DividendVanillaOptionPtr_impliedVolatility__SWIG_0(arg1,arg2,(GeneralizedBlackScholesProcessPtr const &)*arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_DividendVanillaOption_impliedVolatility__SWIG_4) {
  {
    DividendVanillaOptionPtr *arg1 = (DividendVanillaOptionPtr *) 0 ;
    Real arg2 ;
    GeneralizedBlackScholesProcessPtr *arg3 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    Volatility result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: DividendVanillaOption_impliedVolatility(self,targetValue,process);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_DividendVanillaOptionPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DividendVanillaOption_impliedVolatility" "', argument " "1"" of type '" "DividendVanillaOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< DividendVanillaOptionPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DividendVanillaOption_impliedVolatility" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "DividendVanillaOption_impliedVolatility" "', argument " "3"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DividendVanillaOption_impliedVolatility" "', argument " "3"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg3 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp3);
    {
      try {
        result = (Volatility)DividendVanillaOptionPtr_impliedVolatility__SWIG_0(arg1,arg2,(GeneralizedBlackScholesProcessPtr const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_DividendVanillaOption_impliedVolatility) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_DividendVanillaOptionPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_DividendVanillaOptionPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_DividendVanillaOptionPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_DividendVanillaOptionPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_DividendVanillaOptionPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_DividendVanillaOption_impliedVolatility__SWIG_4); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_DividendVanillaOption_impliedVolatility__SWIG_3); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_DividendVanillaOption_impliedVolatility__SWIG_2); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_DividendVanillaOption_impliedVolatility__SWIG_1); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_DividendVanillaOption_impliedVolatility__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'DividendVanillaOption_impliedVolatility'");
  XSRETURN(0);
}


XS(_wrap_DividendVanillaOption_delta) {
  {
    DividendVanillaOptionPtr *arg1 = (DividendVanillaOptionPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DividendVanillaOption_delta(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_DividendVanillaOptionPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DividendVanillaOption_delta" "', argument " "1"" of type '" "DividendVanillaOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< DividendVanillaOptionPtr * >(argp1);
    {
      try {
        result = (Real)DividendVanillaOptionPtr_delta(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_DividendVanillaOption_gamma) {
  {
    DividendVanillaOptionPtr *arg1 = (DividendVanillaOptionPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DividendVanillaOption_gamma(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_DividendVanillaOptionPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DividendVanillaOption_gamma" "', argument " "1"" of type '" "DividendVanillaOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< DividendVanillaOptionPtr * >(argp1);
    {
      try {
        result = (Real)DividendVanillaOptionPtr_gamma(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_DividendVanillaOption_theta) {
  {
    DividendVanillaOptionPtr *arg1 = (DividendVanillaOptionPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DividendVanillaOption_theta(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_DividendVanillaOptionPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DividendVanillaOption_theta" "', argument " "1"" of type '" "DividendVanillaOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< DividendVanillaOptionPtr * >(argp1);
    {
      try {
        result = (Real)DividendVanillaOptionPtr_theta(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_DividendVanillaOption_thetaPerDay) {
  {
    DividendVanillaOptionPtr *arg1 = (DividendVanillaOptionPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DividendVanillaOption_thetaPerDay(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_DividendVanillaOptionPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DividendVanillaOption_thetaPerDay" "', argument " "1"" of type '" "DividendVanillaOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< DividendVanillaOptionPtr * >(argp1);
    {
      try {
        result = (Real)DividendVanillaOptionPtr_thetaPerDay(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_DividendVanillaOption_vega) {
  {
    DividendVanillaOptionPtr *arg1 = (DividendVanillaOptionPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DividendVanillaOption_vega(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_DividendVanillaOptionPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DividendVanillaOption_vega" "', argument " "1"" of type '" "DividendVanillaOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< DividendVanillaOptionPtr * >(argp1);
    {
      try {
        result = (Real)DividendVanillaOptionPtr_vega(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_DividendVanillaOption_rho) {
  {
    DividendVanillaOptionPtr *arg1 = (DividendVanillaOptionPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DividendVanillaOption_rho(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_DividendVanillaOptionPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DividendVanillaOption_rho" "', argument " "1"" of type '" "DividendVanillaOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< DividendVanillaOptionPtr * >(argp1);
    {
      try {
        result = (Real)DividendVanillaOptionPtr_rho(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_DividendVanillaOption_dividendRho) {
  {
    DividendVanillaOptionPtr *arg1 = (DividendVanillaOptionPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DividendVanillaOption_dividendRho(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_DividendVanillaOptionPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DividendVanillaOption_dividendRho" "', argument " "1"" of type '" "DividendVanillaOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< DividendVanillaOptionPtr * >(argp1);
    {
      try {
        result = (Real)DividendVanillaOptionPtr_dividendRho(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_DividendVanillaOption_strikeSensitivity) {
  {
    DividendVanillaOptionPtr *arg1 = (DividendVanillaOptionPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DividendVanillaOption_strikeSensitivity(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_DividendVanillaOptionPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DividendVanillaOption_strikeSensitivity" "', argument " "1"" of type '" "DividendVanillaOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< DividendVanillaOptionPtr * >(argp1);
    {
      try {
        result = (Real)DividendVanillaOptionPtr_strikeSensitivity(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_DividendVanillaOption) {
  {
    DividendVanillaOptionPtr *arg1 = (DividendVanillaOptionPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_DividendVanillaOption(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_DividendVanillaOptionPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DividendVanillaOption" "', argument " "1"" of type '" "DividendVanillaOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< DividendVanillaOptionPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_AnalyticDividendEuropeanEngine) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    AnalyticDividendEuropeanEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_AnalyticDividendEuropeanEngine(process);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_AnalyticDividendEuropeanEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AnalyticDividendEuropeanEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    {
      try {
        result = (AnalyticDividendEuropeanEnginePtr *)new_AnalyticDividendEuropeanEnginePtr((GeneralizedBlackScholesProcessPtr const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_AnalyticDividendEuropeanEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_AnalyticDividendEuropeanEngine) {
  {
    AnalyticDividendEuropeanEnginePtr *arg1 = (AnalyticDividendEuropeanEnginePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_AnalyticDividendEuropeanEngine(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_AnalyticDividendEuropeanEnginePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_AnalyticDividendEuropeanEngine" "', argument " "1"" of type '" "AnalyticDividendEuropeanEnginePtr *""'"); 
    }
    arg1 = reinterpret_cast< AnalyticDividendEuropeanEnginePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FDDividendEuropeanEngine__SWIG_0) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    Size arg2 ;
    Size arg3 ;
    bool arg4 ;
    void *argp1 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    size_t val3 ;
    int ecode3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    FDDividendEuropeanEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_FDDividendEuropeanEngine(process,timeSteps,gridPoints,timeDependent);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FDDividendEuropeanEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FDDividendEuropeanEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FDDividendEuropeanEngine" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_FDDividendEuropeanEngine" "', argument " "3"" of type '" "Size""'");
    } 
    arg3 = static_cast< Size >(val3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_FDDividendEuropeanEngine" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    {
      try {
        result = (FDDividendEuropeanEnginePtr *)new_FDDividendEuropeanEnginePtr__SWIG_0((GeneralizedBlackScholesProcessPtr const &)*arg1,arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FDDividendEuropeanEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FDDividendEuropeanEngine__SWIG_1) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    Size arg2 ;
    Size arg3 ;
    void *argp1 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    size_t val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    FDDividendEuropeanEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_FDDividendEuropeanEngine(process,timeSteps,gridPoints);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FDDividendEuropeanEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FDDividendEuropeanEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FDDividendEuropeanEngine" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_FDDividendEuropeanEngine" "', argument " "3"" of type '" "Size""'");
    } 
    arg3 = static_cast< Size >(val3);
    {
      try {
        result = (FDDividendEuropeanEnginePtr *)new_FDDividendEuropeanEnginePtr__SWIG_0((GeneralizedBlackScholesProcessPtr const &)*arg1,arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FDDividendEuropeanEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FDDividendEuropeanEngine__SWIG_2) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    Size arg2 ;
    void *argp1 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    FDDividendEuropeanEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_FDDividendEuropeanEngine(process,timeSteps);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FDDividendEuropeanEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FDDividendEuropeanEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FDDividendEuropeanEngine" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    {
      try {
        result = (FDDividendEuropeanEnginePtr *)new_FDDividendEuropeanEnginePtr__SWIG_0((GeneralizedBlackScholesProcessPtr const &)*arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FDDividendEuropeanEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FDDividendEuropeanEngine__SWIG_3) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    FDDividendEuropeanEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_FDDividendEuropeanEngine(process);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FDDividendEuropeanEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FDDividendEuropeanEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    {
      try {
        result = (FDDividendEuropeanEnginePtr *)new_FDDividendEuropeanEnginePtr__SWIG_0((GeneralizedBlackScholesProcessPtr const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FDDividendEuropeanEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FDDividendEuropeanEngine) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FDDividendEuropeanEngine__SWIG_3); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FDDividendEuropeanEngine__SWIG_2); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FDDividendEuropeanEngine__SWIG_1); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FDDividendEuropeanEngine__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_FDDividendEuropeanEngine'");
  XSRETURN(0);
}


XS(_wrap_delete_FDDividendEuropeanEngine) {
  {
    FDDividendEuropeanEnginePtr *arg1 = (FDDividendEuropeanEnginePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_FDDividendEuropeanEngine(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_FDDividendEuropeanEnginePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FDDividendEuropeanEngine" "', argument " "1"" of type '" "FDDividendEuropeanEnginePtr *""'"); 
    }
    arg1 = reinterpret_cast< FDDividendEuropeanEnginePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FDDividendAmericanEngine__SWIG_0) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    Size arg2 ;
    Size arg3 ;
    bool arg4 ;
    void *argp1 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    size_t val3 ;
    int ecode3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    FDDividendAmericanEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_FDDividendAmericanEngine(process,timeSteps,gridPoints,timeDependent);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FDDividendAmericanEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FDDividendAmericanEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FDDividendAmericanEngine" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_FDDividendAmericanEngine" "', argument " "3"" of type '" "Size""'");
    } 
    arg3 = static_cast< Size >(val3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_FDDividendAmericanEngine" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    {
      try {
        result = (FDDividendAmericanEnginePtr *)new_FDDividendAmericanEnginePtr__SWIG_0((GeneralizedBlackScholesProcessPtr const &)*arg1,arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FDDividendAmericanEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FDDividendAmericanEngine__SWIG_1) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    Size arg2 ;
    Size arg3 ;
    void *argp1 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    size_t val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    FDDividendAmericanEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_FDDividendAmericanEngine(process,timeSteps,gridPoints);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FDDividendAmericanEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FDDividendAmericanEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FDDividendAmericanEngine" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_FDDividendAmericanEngine" "', argument " "3"" of type '" "Size""'");
    } 
    arg3 = static_cast< Size >(val3);
    {
      try {
        result = (FDDividendAmericanEnginePtr *)new_FDDividendAmericanEnginePtr__SWIG_0((GeneralizedBlackScholesProcessPtr const &)*arg1,arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FDDividendAmericanEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FDDividendAmericanEngine__SWIG_2) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    Size arg2 ;
    void *argp1 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    FDDividendAmericanEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_FDDividendAmericanEngine(process,timeSteps);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FDDividendAmericanEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FDDividendAmericanEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FDDividendAmericanEngine" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    {
      try {
        result = (FDDividendAmericanEnginePtr *)new_FDDividendAmericanEnginePtr__SWIG_0((GeneralizedBlackScholesProcessPtr const &)*arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FDDividendAmericanEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FDDividendAmericanEngine__SWIG_3) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    FDDividendAmericanEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_FDDividendAmericanEngine(process);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FDDividendAmericanEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FDDividendAmericanEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    {
      try {
        result = (FDDividendAmericanEnginePtr *)new_FDDividendAmericanEnginePtr__SWIG_0((GeneralizedBlackScholesProcessPtr const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FDDividendAmericanEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FDDividendAmericanEngine) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FDDividendAmericanEngine__SWIG_3); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FDDividendAmericanEngine__SWIG_2); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FDDividendAmericanEngine__SWIG_1); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FDDividendAmericanEngine__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_FDDividendAmericanEngine'");
  XSRETURN(0);
}


XS(_wrap_delete_FDDividendAmericanEngine) {
  {
    FDDividendAmericanEnginePtr *arg1 = (FDDividendAmericanEnginePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_FDDividendAmericanEngine(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_FDDividendAmericanEnginePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FDDividendAmericanEngine" "', argument " "1"" of type '" "FDDividendAmericanEnginePtr *""'"); 
    }
    arg1 = reinterpret_cast< FDDividendAmericanEnginePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BarrierOption) {
  {
    Barrier::Type arg1 ;
    Real arg2 ;
    Real arg3 ;
    boost::shared_ptr< Payoff > *arg4 = 0 ;
    boost::shared_ptr< Exercise > *arg5 = 0 ;
    int val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int argvi = 0;
    BarrierOptionPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_BarrierOption(barrierType,barrier,rebate,payoff,exercise);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_BarrierOption" "', argument " "1"" of type '" "Barrier::Type""'");
    } 
    arg1 = static_cast< Barrier::Type >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_BarrierOption" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_BarrierOption" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_boost__shared_ptrT_Payoff_t,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_BarrierOption" "', argument " "4"" of type '" "boost::shared_ptr< Payoff > const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BarrierOption" "', argument " "4"" of type '" "boost::shared_ptr< Payoff > const &""'"); 
    }
    arg4 = reinterpret_cast< boost::shared_ptr< Payoff > * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_boost__shared_ptrT_Exercise_t,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_BarrierOption" "', argument " "5"" of type '" "boost::shared_ptr< Exercise > const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BarrierOption" "', argument " "5"" of type '" "boost::shared_ptr< Exercise > const &""'"); 
    }
    arg5 = reinterpret_cast< boost::shared_ptr< Exercise > * >(argp5);
    {
      try {
        result = (BarrierOptionPtr *)new_BarrierOptionPtr(arg1,arg2,arg3,(boost::shared_ptr< Payoff > const &)*arg4,(boost::shared_ptr< Exercise > const &)*arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BarrierOptionPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BarrierOption_priceCurve) {
  {
    BarrierOptionPtr *arg1 = (BarrierOptionPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    SampledCurve result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BarrierOption_priceCurve(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BarrierOptionPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BarrierOption_priceCurve" "', argument " "1"" of type '" "BarrierOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< BarrierOptionPtr * >(argp1);
    {
      try {
        result = BarrierOptionPtr_priceCurve(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new SampledCurve(static_cast< const SampledCurve& >(result))), SWIGTYPE_p_SampledCurve, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BarrierOption_impliedVolatility__SWIG_0) {
  {
    BarrierOptionPtr *arg1 = (BarrierOptionPtr *) 0 ;
    Real arg2 ;
    GeneralizedBlackScholesProcessPtr *arg3 = 0 ;
    Real arg4 ;
    Size arg5 ;
    Volatility arg6 ;
    Volatility arg7 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    size_t val5 ;
    int ecode5 = 0 ;
    double val6 ;
    int ecode6 = 0 ;
    double val7 ;
    int ecode7 = 0 ;
    int argvi = 0;
    Volatility result;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: BarrierOption_impliedVolatility(self,targetValue,process,accuracy,maxEvaluations,minVol,maxVol);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BarrierOptionPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BarrierOption_impliedVolatility" "', argument " "1"" of type '" "BarrierOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< BarrierOptionPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BarrierOption_impliedVolatility" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "BarrierOption_impliedVolatility" "', argument " "3"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BarrierOption_impliedVolatility" "', argument " "3"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg3 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "BarrierOption_impliedVolatility" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    ecode5 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "BarrierOption_impliedVolatility" "', argument " "5"" of type '" "Size""'");
    } 
    arg5 = static_cast< Size >(val5);
    ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "BarrierOption_impliedVolatility" "', argument " "6"" of type '" "Volatility""'");
    } 
    arg6 = static_cast< Volatility >(val6);
    ecode7 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "BarrierOption_impliedVolatility" "', argument " "7"" of type '" "Volatility""'");
    } 
    arg7 = static_cast< Volatility >(val7);
    {
      try {
        result = (Volatility)BarrierOptionPtr_impliedVolatility__SWIG_0(arg1,arg2,(GeneralizedBlackScholesProcessPtr const &)*arg3,arg4,arg5,arg6,arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BarrierOption_impliedVolatility__SWIG_1) {
  {
    BarrierOptionPtr *arg1 = (BarrierOptionPtr *) 0 ;
    Real arg2 ;
    GeneralizedBlackScholesProcessPtr *arg3 = 0 ;
    Real arg4 ;
    Size arg5 ;
    Volatility arg6 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    size_t val5 ;
    int ecode5 = 0 ;
    double val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    Volatility result;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: BarrierOption_impliedVolatility(self,targetValue,process,accuracy,maxEvaluations,minVol);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BarrierOptionPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BarrierOption_impliedVolatility" "', argument " "1"" of type '" "BarrierOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< BarrierOptionPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BarrierOption_impliedVolatility" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "BarrierOption_impliedVolatility" "', argument " "3"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BarrierOption_impliedVolatility" "', argument " "3"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg3 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "BarrierOption_impliedVolatility" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    ecode5 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "BarrierOption_impliedVolatility" "', argument " "5"" of type '" "Size""'");
    } 
    arg5 = static_cast< Size >(val5);
    ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "BarrierOption_impliedVolatility" "', argument " "6"" of type '" "Volatility""'");
    } 
    arg6 = static_cast< Volatility >(val6);
    {
      try {
        result = (Volatility)BarrierOptionPtr_impliedVolatility__SWIG_0(arg1,arg2,(GeneralizedBlackScholesProcessPtr const &)*arg3,arg4,arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BarrierOption_impliedVolatility__SWIG_2) {
  {
    BarrierOptionPtr *arg1 = (BarrierOptionPtr *) 0 ;
    Real arg2 ;
    GeneralizedBlackScholesProcessPtr *arg3 = 0 ;
    Real arg4 ;
    Size arg5 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    size_t val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    Volatility result;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: BarrierOption_impliedVolatility(self,targetValue,process,accuracy,maxEvaluations);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BarrierOptionPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BarrierOption_impliedVolatility" "', argument " "1"" of type '" "BarrierOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< BarrierOptionPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BarrierOption_impliedVolatility" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "BarrierOption_impliedVolatility" "', argument " "3"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BarrierOption_impliedVolatility" "', argument " "3"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg3 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "BarrierOption_impliedVolatility" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    ecode5 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "BarrierOption_impliedVolatility" "', argument " "5"" of type '" "Size""'");
    } 
    arg5 = static_cast< Size >(val5);
    {
      try {
        result = (Volatility)BarrierOptionPtr_impliedVolatility__SWIG_0(arg1,arg2,(GeneralizedBlackScholesProcessPtr const &)*arg3,arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BarrierOption_impliedVolatility__SWIG_3) {
  {
    BarrierOptionPtr *arg1 = (BarrierOptionPtr *) 0 ;
    Real arg2 ;
    GeneralizedBlackScholesProcessPtr *arg3 = 0 ;
    Real arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Volatility result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: BarrierOption_impliedVolatility(self,targetValue,process,accuracy);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BarrierOptionPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BarrierOption_impliedVolatility" "', argument " "1"" of type '" "BarrierOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< BarrierOptionPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BarrierOption_impliedVolatility" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "BarrierOption_impliedVolatility" "', argument " "3"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BarrierOption_impliedVolatility" "', argument " "3"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg3 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "BarrierOption_impliedVolatility" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    {
      try {
        result = (Volatility)BarrierOptionPtr_impliedVolatility__SWIG_0(arg1,arg2,(GeneralizedBlackScholesProcessPtr const &)*arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BarrierOption_impliedVolatility__SWIG_4) {
  {
    BarrierOptionPtr *arg1 = (BarrierOptionPtr *) 0 ;
    Real arg2 ;
    GeneralizedBlackScholesProcessPtr *arg3 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    Volatility result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: BarrierOption_impliedVolatility(self,targetValue,process);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BarrierOptionPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BarrierOption_impliedVolatility" "', argument " "1"" of type '" "BarrierOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< BarrierOptionPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BarrierOption_impliedVolatility" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "BarrierOption_impliedVolatility" "', argument " "3"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BarrierOption_impliedVolatility" "', argument " "3"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg3 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp3);
    {
      try {
        result = (Volatility)BarrierOptionPtr_impliedVolatility__SWIG_0(arg1,arg2,(GeneralizedBlackScholesProcessPtr const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BarrierOption_impliedVolatility) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BarrierOptionPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BarrierOptionPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BarrierOptionPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BarrierOptionPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BarrierOptionPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BarrierOption_impliedVolatility__SWIG_4); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BarrierOption_impliedVolatility__SWIG_3); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BarrierOption_impliedVolatility__SWIG_2); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BarrierOption_impliedVolatility__SWIG_1); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BarrierOption_impliedVolatility__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'BarrierOption_impliedVolatility'");
  XSRETURN(0);
}


XS(_wrap_BarrierOption_delta) {
  {
    BarrierOptionPtr *arg1 = (BarrierOptionPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BarrierOption_delta(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BarrierOptionPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BarrierOption_delta" "', argument " "1"" of type '" "BarrierOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< BarrierOptionPtr * >(argp1);
    {
      try {
        result = (Real)BarrierOptionPtr_delta(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BarrierOption_gamma) {
  {
    BarrierOptionPtr *arg1 = (BarrierOptionPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BarrierOption_gamma(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BarrierOptionPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BarrierOption_gamma" "', argument " "1"" of type '" "BarrierOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< BarrierOptionPtr * >(argp1);
    {
      try {
        result = (Real)BarrierOptionPtr_gamma(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BarrierOption_theta) {
  {
    BarrierOptionPtr *arg1 = (BarrierOptionPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BarrierOption_theta(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BarrierOptionPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BarrierOption_theta" "', argument " "1"" of type '" "BarrierOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< BarrierOptionPtr * >(argp1);
    {
      try {
        result = (Real)BarrierOptionPtr_theta(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BarrierOption_thetaPerDay) {
  {
    BarrierOptionPtr *arg1 = (BarrierOptionPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BarrierOption_thetaPerDay(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BarrierOptionPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BarrierOption_thetaPerDay" "', argument " "1"" of type '" "BarrierOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< BarrierOptionPtr * >(argp1);
    {
      try {
        result = (Real)BarrierOptionPtr_thetaPerDay(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BarrierOption_vega) {
  {
    BarrierOptionPtr *arg1 = (BarrierOptionPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BarrierOption_vega(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BarrierOptionPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BarrierOption_vega" "', argument " "1"" of type '" "BarrierOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< BarrierOptionPtr * >(argp1);
    {
      try {
        result = (Real)BarrierOptionPtr_vega(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BarrierOption_rho) {
  {
    BarrierOptionPtr *arg1 = (BarrierOptionPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BarrierOption_rho(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BarrierOptionPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BarrierOption_rho" "', argument " "1"" of type '" "BarrierOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< BarrierOptionPtr * >(argp1);
    {
      try {
        result = (Real)BarrierOptionPtr_rho(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BarrierOption_dividendRho) {
  {
    BarrierOptionPtr *arg1 = (BarrierOptionPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BarrierOption_dividendRho(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BarrierOptionPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BarrierOption_dividendRho" "', argument " "1"" of type '" "BarrierOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< BarrierOptionPtr * >(argp1);
    {
      try {
        result = (Real)BarrierOptionPtr_dividendRho(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BarrierOption_strikeSensitivity) {
  {
    BarrierOptionPtr *arg1 = (BarrierOptionPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BarrierOption_strikeSensitivity(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BarrierOptionPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BarrierOption_strikeSensitivity" "', argument " "1"" of type '" "BarrierOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< BarrierOptionPtr * >(argp1);
    {
      try {
        result = (Real)BarrierOptionPtr_strikeSensitivity(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_BarrierOption) {
  {
    BarrierOptionPtr *arg1 = (BarrierOptionPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_BarrierOption(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BarrierOptionPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_BarrierOption" "', argument " "1"" of type '" "BarrierOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< BarrierOptionPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_AnalyticBarrierEngine) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    AnalyticBarrierEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_AnalyticBarrierEngine(process);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_AnalyticBarrierEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AnalyticBarrierEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    {
      try {
        result = (AnalyticBarrierEnginePtr *)new_AnalyticBarrierEnginePtr((GeneralizedBlackScholesProcessPtr const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_AnalyticBarrierEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_AnalyticBarrierEngine) {
  {
    AnalyticBarrierEnginePtr *arg1 = (AnalyticBarrierEnginePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_AnalyticBarrierEngine(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_AnalyticBarrierEnginePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_AnalyticBarrierEngine" "', argument " "1"" of type '" "AnalyticBarrierEnginePtr *""'"); 
    }
    arg1 = reinterpret_cast< AnalyticBarrierEnginePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MCBarrierEngine__SWIG_0) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    std::string *arg2 = 0 ;
    Size arg3 ;
    Size arg4 ;
    bool arg5 ;
    bool arg6 ;
    intOrNull arg7 ;
    doubleOrNull arg8 ;
    intOrNull arg9 ;
    bool arg10 ;
    BigInteger arg11 ;
    void *argp1 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    size_t val3 ;
    int ecode3 = 0 ;
    size_t val4 ;
    int ecode4 = 0 ;
    bool val5 ;
    int ecode5 = 0 ;
    bool val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    bool val10 ;
    int ecode10 = 0 ;
    long val11 ;
    int ecode11 = 0 ;
    int argvi = 0;
    MCBarrierEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 11) || (items > 11)) {
      SWIG_croak("Usage: new_MCBarrierEngine(process,traits,timeSteps,timeStepsPerYear,brownianBridge,antitheticVariate,requiredSamples,requiredTolerance,maxSamples,isBiased,seed);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MCBarrierEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCBarrierEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MCBarrierEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCBarrierEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_MCBarrierEngine" "', argument " "3"" of type '" "Size""'");
    } 
    arg3 = static_cast< Size >(val3);
    ecode4 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_MCBarrierEngine" "', argument " "4"" of type '" "Size""'");
    } 
    arg4 = static_cast< Size >(val4);
    ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_MCBarrierEngine" "', argument " "5"" of type '" "bool""'");
    } 
    arg5 = static_cast< bool >(val5);
    ecode6 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_MCBarrierEngine" "', argument " "6"" of type '" "bool""'");
    } 
    arg6 = static_cast< bool >(val6);
    {
      res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_intOrNull,  0 );
      if (!SWIG_IsOK(res7)) {
        SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_MCBarrierEngine" "', argument " "7"" of type '" "intOrNull""'"); 
      }  
      if (!argp7) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCBarrierEngine" "', argument " "7"" of type '" "intOrNull""'");
      } else {
        arg7 = *(reinterpret_cast< intOrNull * >(argp7));
      }
    }
    {
      res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_doubleOrNull,  0 );
      if (!SWIG_IsOK(res8)) {
        SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_MCBarrierEngine" "', argument " "8"" of type '" "doubleOrNull""'"); 
      }  
      if (!argp8) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCBarrierEngine" "', argument " "8"" of type '" "doubleOrNull""'");
      } else {
        arg8 = *(reinterpret_cast< doubleOrNull * >(argp8));
      }
    }
    {
      res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_intOrNull,  0 );
      if (!SWIG_IsOK(res9)) {
        SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_MCBarrierEngine" "', argument " "9"" of type '" "intOrNull""'"); 
      }  
      if (!argp9) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCBarrierEngine" "', argument " "9"" of type '" "intOrNull""'");
      } else {
        arg9 = *(reinterpret_cast< intOrNull * >(argp9));
      }
    }
    ecode10 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(9), &val10);
    if (!SWIG_IsOK(ecode10)) {
      SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "new_MCBarrierEngine" "', argument " "10"" of type '" "bool""'");
    } 
    arg10 = static_cast< bool >(val10);
    ecode11 = SWIG_AsVal_long SWIG_PERL_CALL_ARGS_2(ST(10), &val11);
    if (!SWIG_IsOK(ecode11)) {
      SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "new_MCBarrierEngine" "', argument " "11"" of type '" "BigInteger""'");
    } 
    arg11 = static_cast< BigInteger >(val11);
    {
      try {
        result = (MCBarrierEnginePtr *)new_MCBarrierEnginePtr__SWIG_0((GeneralizedBlackScholesProcessPtr const &)*arg1,(std::string const &)*arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MCBarrierEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MCBarrierEngine__SWIG_1) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    std::string *arg2 = 0 ;
    Size arg3 ;
    Size arg4 ;
    bool arg5 ;
    bool arg6 ;
    intOrNull arg7 ;
    doubleOrNull arg8 ;
    intOrNull arg9 ;
    bool arg10 ;
    void *argp1 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    size_t val3 ;
    int ecode3 = 0 ;
    size_t val4 ;
    int ecode4 = 0 ;
    bool val5 ;
    int ecode5 = 0 ;
    bool val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    bool val10 ;
    int ecode10 = 0 ;
    int argvi = 0;
    MCBarrierEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 10) || (items > 10)) {
      SWIG_croak("Usage: new_MCBarrierEngine(process,traits,timeSteps,timeStepsPerYear,brownianBridge,antitheticVariate,requiredSamples,requiredTolerance,maxSamples,isBiased);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MCBarrierEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCBarrierEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MCBarrierEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCBarrierEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_MCBarrierEngine" "', argument " "3"" of type '" "Size""'");
    } 
    arg3 = static_cast< Size >(val3);
    ecode4 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_MCBarrierEngine" "', argument " "4"" of type '" "Size""'");
    } 
    arg4 = static_cast< Size >(val4);
    ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_MCBarrierEngine" "', argument " "5"" of type '" "bool""'");
    } 
    arg5 = static_cast< bool >(val5);
    ecode6 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_MCBarrierEngine" "', argument " "6"" of type '" "bool""'");
    } 
    arg6 = static_cast< bool >(val6);
    {
      res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_intOrNull,  0 );
      if (!SWIG_IsOK(res7)) {
        SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_MCBarrierEngine" "', argument " "7"" of type '" "intOrNull""'"); 
      }  
      if (!argp7) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCBarrierEngine" "', argument " "7"" of type '" "intOrNull""'");
      } else {
        arg7 = *(reinterpret_cast< intOrNull * >(argp7));
      }
    }
    {
      res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_doubleOrNull,  0 );
      if (!SWIG_IsOK(res8)) {
        SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_MCBarrierEngine" "', argument " "8"" of type '" "doubleOrNull""'"); 
      }  
      if (!argp8) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCBarrierEngine" "', argument " "8"" of type '" "doubleOrNull""'");
      } else {
        arg8 = *(reinterpret_cast< doubleOrNull * >(argp8));
      }
    }
    {
      res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_intOrNull,  0 );
      if (!SWIG_IsOK(res9)) {
        SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_MCBarrierEngine" "', argument " "9"" of type '" "intOrNull""'"); 
      }  
      if (!argp9) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCBarrierEngine" "', argument " "9"" of type '" "intOrNull""'");
      } else {
        arg9 = *(reinterpret_cast< intOrNull * >(argp9));
      }
    }
    ecode10 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(9), &val10);
    if (!SWIG_IsOK(ecode10)) {
      SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "new_MCBarrierEngine" "', argument " "10"" of type '" "bool""'");
    } 
    arg10 = static_cast< bool >(val10);
    {
      try {
        result = (MCBarrierEnginePtr *)new_MCBarrierEnginePtr__SWIG_0((GeneralizedBlackScholesProcessPtr const &)*arg1,(std::string const &)*arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MCBarrierEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MCBarrierEngine__SWIG_2) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    std::string *arg2 = 0 ;
    Size arg3 ;
    Size arg4 ;
    bool arg5 ;
    bool arg6 ;
    intOrNull arg7 ;
    doubleOrNull arg8 ;
    intOrNull arg9 ;
    void *argp1 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    size_t val3 ;
    int ecode3 = 0 ;
    size_t val4 ;
    int ecode4 = 0 ;
    bool val5 ;
    int ecode5 = 0 ;
    bool val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    int argvi = 0;
    MCBarrierEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 9) || (items > 9)) {
      SWIG_croak("Usage: new_MCBarrierEngine(process,traits,timeSteps,timeStepsPerYear,brownianBridge,antitheticVariate,requiredSamples,requiredTolerance,maxSamples);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MCBarrierEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCBarrierEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MCBarrierEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCBarrierEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_MCBarrierEngine" "', argument " "3"" of type '" "Size""'");
    } 
    arg3 = static_cast< Size >(val3);
    ecode4 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_MCBarrierEngine" "', argument " "4"" of type '" "Size""'");
    } 
    arg4 = static_cast< Size >(val4);
    ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_MCBarrierEngine" "', argument " "5"" of type '" "bool""'");
    } 
    arg5 = static_cast< bool >(val5);
    ecode6 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_MCBarrierEngine" "', argument " "6"" of type '" "bool""'");
    } 
    arg6 = static_cast< bool >(val6);
    {
      res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_intOrNull,  0 );
      if (!SWIG_IsOK(res7)) {
        SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_MCBarrierEngine" "', argument " "7"" of type '" "intOrNull""'"); 
      }  
      if (!argp7) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCBarrierEngine" "', argument " "7"" of type '" "intOrNull""'");
      } else {
        arg7 = *(reinterpret_cast< intOrNull * >(argp7));
      }
    }
    {
      res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_doubleOrNull,  0 );
      if (!SWIG_IsOK(res8)) {
        SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_MCBarrierEngine" "', argument " "8"" of type '" "doubleOrNull""'"); 
      }  
      if (!argp8) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCBarrierEngine" "', argument " "8"" of type '" "doubleOrNull""'");
      } else {
        arg8 = *(reinterpret_cast< doubleOrNull * >(argp8));
      }
    }
    {
      res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_intOrNull,  0 );
      if (!SWIG_IsOK(res9)) {
        SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_MCBarrierEngine" "', argument " "9"" of type '" "intOrNull""'"); 
      }  
      if (!argp9) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCBarrierEngine" "', argument " "9"" of type '" "intOrNull""'");
      } else {
        arg9 = *(reinterpret_cast< intOrNull * >(argp9));
      }
    }
    {
      try {
        result = (MCBarrierEnginePtr *)new_MCBarrierEnginePtr__SWIG_0((GeneralizedBlackScholesProcessPtr const &)*arg1,(std::string const &)*arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MCBarrierEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MCBarrierEngine__SWIG_3) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    std::string *arg2 = 0 ;
    Size arg3 ;
    Size arg4 ;
    bool arg5 ;
    bool arg6 ;
    intOrNull arg7 ;
    doubleOrNull arg8 ;
    void *argp1 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    size_t val3 ;
    int ecode3 = 0 ;
    size_t val4 ;
    int ecode4 = 0 ;
    bool val5 ;
    int ecode5 = 0 ;
    bool val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    int argvi = 0;
    MCBarrierEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 8) || (items > 8)) {
      SWIG_croak("Usage: new_MCBarrierEngine(process,traits,timeSteps,timeStepsPerYear,brownianBridge,antitheticVariate,requiredSamples,requiredTolerance);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MCBarrierEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCBarrierEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MCBarrierEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCBarrierEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_MCBarrierEngine" "', argument " "3"" of type '" "Size""'");
    } 
    arg3 = static_cast< Size >(val3);
    ecode4 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_MCBarrierEngine" "', argument " "4"" of type '" "Size""'");
    } 
    arg4 = static_cast< Size >(val4);
    ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_MCBarrierEngine" "', argument " "5"" of type '" "bool""'");
    } 
    arg5 = static_cast< bool >(val5);
    ecode6 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_MCBarrierEngine" "', argument " "6"" of type '" "bool""'");
    } 
    arg6 = static_cast< bool >(val6);
    {
      res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_intOrNull,  0 );
      if (!SWIG_IsOK(res7)) {
        SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_MCBarrierEngine" "', argument " "7"" of type '" "intOrNull""'"); 
      }  
      if (!argp7) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCBarrierEngine" "', argument " "7"" of type '" "intOrNull""'");
      } else {
        arg7 = *(reinterpret_cast< intOrNull * >(argp7));
      }
    }
    {
      res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_doubleOrNull,  0 );
      if (!SWIG_IsOK(res8)) {
        SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_MCBarrierEngine" "', argument " "8"" of type '" "doubleOrNull""'"); 
      }  
      if (!argp8) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCBarrierEngine" "', argument " "8"" of type '" "doubleOrNull""'");
      } else {
        arg8 = *(reinterpret_cast< doubleOrNull * >(argp8));
      }
    }
    {
      try {
        result = (MCBarrierEnginePtr *)new_MCBarrierEnginePtr__SWIG_0((GeneralizedBlackScholesProcessPtr const &)*arg1,(std::string const &)*arg2,arg3,arg4,arg5,arg6,arg7,arg8);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MCBarrierEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MCBarrierEngine__SWIG_4) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    std::string *arg2 = 0 ;
    Size arg3 ;
    Size arg4 ;
    bool arg5 ;
    bool arg6 ;
    intOrNull arg7 ;
    void *argp1 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    size_t val3 ;
    int ecode3 = 0 ;
    size_t val4 ;
    int ecode4 = 0 ;
    bool val5 ;
    int ecode5 = 0 ;
    bool val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    int argvi = 0;
    MCBarrierEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: new_MCBarrierEngine(process,traits,timeSteps,timeStepsPerYear,brownianBridge,antitheticVariate,requiredSamples);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MCBarrierEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCBarrierEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MCBarrierEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCBarrierEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_MCBarrierEngine" "', argument " "3"" of type '" "Size""'");
    } 
    arg3 = static_cast< Size >(val3);
    ecode4 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_MCBarrierEngine" "', argument " "4"" of type '" "Size""'");
    } 
    arg4 = static_cast< Size >(val4);
    ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_MCBarrierEngine" "', argument " "5"" of type '" "bool""'");
    } 
    arg5 = static_cast< bool >(val5);
    ecode6 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_MCBarrierEngine" "', argument " "6"" of type '" "bool""'");
    } 
    arg6 = static_cast< bool >(val6);
    {
      res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_intOrNull,  0 );
      if (!SWIG_IsOK(res7)) {
        SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_MCBarrierEngine" "', argument " "7"" of type '" "intOrNull""'"); 
      }  
      if (!argp7) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCBarrierEngine" "', argument " "7"" of type '" "intOrNull""'");
      } else {
        arg7 = *(reinterpret_cast< intOrNull * >(argp7));
      }
    }
    {
      try {
        result = (MCBarrierEnginePtr *)new_MCBarrierEnginePtr__SWIG_0((GeneralizedBlackScholesProcessPtr const &)*arg1,(std::string const &)*arg2,arg3,arg4,arg5,arg6,arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MCBarrierEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MCBarrierEngine__SWIG_5) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    std::string *arg2 = 0 ;
    Size arg3 ;
    Size arg4 ;
    bool arg5 ;
    bool arg6 ;
    void *argp1 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    size_t val3 ;
    int ecode3 = 0 ;
    size_t val4 ;
    int ecode4 = 0 ;
    bool val5 ;
    int ecode5 = 0 ;
    bool val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    MCBarrierEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_MCBarrierEngine(process,traits,timeSteps,timeStepsPerYear,brownianBridge,antitheticVariate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MCBarrierEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCBarrierEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MCBarrierEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCBarrierEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_MCBarrierEngine" "', argument " "3"" of type '" "Size""'");
    } 
    arg3 = static_cast< Size >(val3);
    ecode4 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_MCBarrierEngine" "', argument " "4"" of type '" "Size""'");
    } 
    arg4 = static_cast< Size >(val4);
    ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_MCBarrierEngine" "', argument " "5"" of type '" "bool""'");
    } 
    arg5 = static_cast< bool >(val5);
    ecode6 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_MCBarrierEngine" "', argument " "6"" of type '" "bool""'");
    } 
    arg6 = static_cast< bool >(val6);
    {
      try {
        result = (MCBarrierEnginePtr *)new_MCBarrierEnginePtr__SWIG_0((GeneralizedBlackScholesProcessPtr const &)*arg1,(std::string const &)*arg2,arg3,arg4,arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MCBarrierEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MCBarrierEngine__SWIG_6) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    std::string *arg2 = 0 ;
    Size arg3 ;
    Size arg4 ;
    bool arg5 ;
    void *argp1 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    size_t val3 ;
    int ecode3 = 0 ;
    size_t val4 ;
    int ecode4 = 0 ;
    bool val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    MCBarrierEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_MCBarrierEngine(process,traits,timeSteps,timeStepsPerYear,brownianBridge);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MCBarrierEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCBarrierEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MCBarrierEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCBarrierEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_MCBarrierEngine" "', argument " "3"" of type '" "Size""'");
    } 
    arg3 = static_cast< Size >(val3);
    ecode4 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_MCBarrierEngine" "', argument " "4"" of type '" "Size""'");
    } 
    arg4 = static_cast< Size >(val4);
    ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_MCBarrierEngine" "', argument " "5"" of type '" "bool""'");
    } 
    arg5 = static_cast< bool >(val5);
    {
      try {
        result = (MCBarrierEnginePtr *)new_MCBarrierEnginePtr__SWIG_0((GeneralizedBlackScholesProcessPtr const &)*arg1,(std::string const &)*arg2,arg3,arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MCBarrierEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MCBarrierEngine__SWIG_7) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    std::string *arg2 = 0 ;
    Size arg3 ;
    Size arg4 ;
    void *argp1 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    size_t val3 ;
    int ecode3 = 0 ;
    size_t val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    MCBarrierEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_MCBarrierEngine(process,traits,timeSteps,timeStepsPerYear);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MCBarrierEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCBarrierEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MCBarrierEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCBarrierEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_MCBarrierEngine" "', argument " "3"" of type '" "Size""'");
    } 
    arg3 = static_cast< Size >(val3);
    ecode4 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_MCBarrierEngine" "', argument " "4"" of type '" "Size""'");
    } 
    arg4 = static_cast< Size >(val4);
    {
      try {
        result = (MCBarrierEnginePtr *)new_MCBarrierEnginePtr__SWIG_0((GeneralizedBlackScholesProcessPtr const &)*arg1,(std::string const &)*arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MCBarrierEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MCBarrierEngine__SWIG_8) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    std::string *arg2 = 0 ;
    Size arg3 ;
    void *argp1 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    size_t val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    MCBarrierEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_MCBarrierEngine(process,traits,timeSteps);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MCBarrierEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCBarrierEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MCBarrierEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCBarrierEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_MCBarrierEngine" "', argument " "3"" of type '" "Size""'");
    } 
    arg3 = static_cast< Size >(val3);
    {
      try {
        result = (MCBarrierEnginePtr *)new_MCBarrierEnginePtr__SWIG_0((GeneralizedBlackScholesProcessPtr const &)*arg1,(std::string const &)*arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MCBarrierEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MCBarrierEngine__SWIG_9) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    std::string *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    MCBarrierEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_MCBarrierEngine(process,traits);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MCBarrierEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCBarrierEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MCBarrierEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCBarrierEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      try {
        result = (MCBarrierEnginePtr *)new_MCBarrierEnginePtr__SWIG_0((GeneralizedBlackScholesProcessPtr const &)*arg1,(std::string const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MCBarrierEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_new_MCBarrierEngine) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_intOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
    if (items == 8) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_intOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_doubleOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 7;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_7:
    
    if (items == 9) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_intOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_doubleOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_intOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 8;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_8:
    
    if (items == 10) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_intOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_doubleOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_intOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(9), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 9;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_9:
    
    if (items == 11) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_intOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_doubleOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_intOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(9), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_long SWIG_PERL_CALL_ARGS_2(ST(10), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 10;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_10:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MCBarrierEngine__SWIG_9); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MCBarrierEngine__SWIG_8); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MCBarrierEngine__SWIG_7); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MCBarrierEngine__SWIG_6); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MCBarrierEngine__SWIG_5); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MCBarrierEngine__SWIG_4); return;
    case 7:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MCBarrierEngine__SWIG_3); return;
    case 8:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MCBarrierEngine__SWIG_2); return;
    case 9:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MCBarrierEngine__SWIG_1); return;
    case 10:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MCBarrierEngine__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_MCBarrierEngine'");
  XSRETURN(0);
}


XS(_wrap_delete_MCBarrierEngine) {
  {
    MCBarrierEnginePtr *arg1 = (MCBarrierEnginePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_MCBarrierEngine(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_MCBarrierEnginePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MCBarrierEngine" "', argument " "1"" of type '" "MCBarrierEnginePtr *""'"); 
    }
    arg1 = reinterpret_cast< MCBarrierEnginePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FdmSchemeDesc) {
  {
    FdmSchemeDesc::FdmSchemeType arg1 ;
    Real arg2 ;
    Real arg3 ;
    int val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    FdmSchemeDesc *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_FdmSchemeDesc(type,theta,mu);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FdmSchemeDesc" "', argument " "1"" of type '" "FdmSchemeDesc::FdmSchemeType""'");
    } 
    arg1 = static_cast< FdmSchemeDesc::FdmSchemeType >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FdmSchemeDesc" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_FdmSchemeDesc" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    {
      try {
        result = (FdmSchemeDesc *)new FdmSchemeDesc(arg1,arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FdmSchemeDesc, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_FdmSchemeDesc_type_get) {
  {
    FdmSchemeDesc *arg1 = (FdmSchemeDesc *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    FdmSchemeDesc::FdmSchemeType result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: FdmSchemeDesc_type_get(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_FdmSchemeDesc, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FdmSchemeDesc_type_get" "', argument " "1"" of type '" "FdmSchemeDesc *""'"); 
    }
    arg1 = reinterpret_cast< FdmSchemeDesc * >(argp1);
    result = (FdmSchemeDesc::FdmSchemeType)(FdmSchemeDesc::FdmSchemeType) ((arg1)->type);
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_FdmSchemeDesc_theta_get) {
  {
    FdmSchemeDesc *arg1 = (FdmSchemeDesc *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: FdmSchemeDesc_theta_get(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_FdmSchemeDesc, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FdmSchemeDesc_theta_get" "', argument " "1"" of type '" "FdmSchemeDesc *""'"); 
    }
    arg1 = reinterpret_cast< FdmSchemeDesc * >(argp1);
    result = (Real)(Real) ((arg1)->theta);
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_FdmSchemeDesc_mu_get) {
  {
    FdmSchemeDesc *arg1 = (FdmSchemeDesc *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: FdmSchemeDesc_mu_get(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_FdmSchemeDesc, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FdmSchemeDesc_mu_get" "', argument " "1"" of type '" "FdmSchemeDesc *""'"); 
    }
    arg1 = reinterpret_cast< FdmSchemeDesc * >(argp1);
    result = (Real)(Real) ((arg1)->mu);
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_FdmSchemeDesc_Douglas) {
  {
    int argvi = 0;
    SwigValueWrapper< FdmSchemeDesc > result;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: FdmSchemeDesc_Douglas();");
    }
    {
      try {
        result = FdmSchemeDesc::Douglas();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new FdmSchemeDesc(static_cast< const FdmSchemeDesc& >(result))), SWIGTYPE_p_FdmSchemeDesc, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_FdmSchemeDesc_ImplicitEuler) {
  {
    int argvi = 0;
    SwigValueWrapper< FdmSchemeDesc > result;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: FdmSchemeDesc_ImplicitEuler();");
    }
    {
      try {
        result = FdmSchemeDesc::ImplicitEuler();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new FdmSchemeDesc(static_cast< const FdmSchemeDesc& >(result))), SWIGTYPE_p_FdmSchemeDesc, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_FdmSchemeDesc_ExplicitEuler) {
  {
    int argvi = 0;
    SwigValueWrapper< FdmSchemeDesc > result;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: FdmSchemeDesc_ExplicitEuler();");
    }
    {
      try {
        result = FdmSchemeDesc::ExplicitEuler();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new FdmSchemeDesc(static_cast< const FdmSchemeDesc& >(result))), SWIGTYPE_p_FdmSchemeDesc, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_FdmSchemeDesc_CraigSneyd) {
  {
    int argvi = 0;
    SwigValueWrapper< FdmSchemeDesc > result;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: FdmSchemeDesc_CraigSneyd();");
    }
    {
      try {
        result = FdmSchemeDesc::CraigSneyd();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new FdmSchemeDesc(static_cast< const FdmSchemeDesc& >(result))), SWIGTYPE_p_FdmSchemeDesc, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_FdmSchemeDesc_ModifiedCraigSneyd) {
  {
    int argvi = 0;
    SwigValueWrapper< FdmSchemeDesc > result;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: FdmSchemeDesc_ModifiedCraigSneyd();");
    }
    {
      try {
        result = FdmSchemeDesc::ModifiedCraigSneyd();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new FdmSchemeDesc(static_cast< const FdmSchemeDesc& >(result))), SWIGTYPE_p_FdmSchemeDesc, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_FdmSchemeDesc_Hundsdorfer) {
  {
    int argvi = 0;
    SwigValueWrapper< FdmSchemeDesc > result;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: FdmSchemeDesc_Hundsdorfer();");
    }
    {
      try {
        result = FdmSchemeDesc::Hundsdorfer();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new FdmSchemeDesc(static_cast< const FdmSchemeDesc& >(result))), SWIGTYPE_p_FdmSchemeDesc, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_FdmSchemeDesc_ModifiedHundsdorfer) {
  {
    int argvi = 0;
    SwigValueWrapper< FdmSchemeDesc > result;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: FdmSchemeDesc_ModifiedHundsdorfer();");
    }
    {
      try {
        result = FdmSchemeDesc::ModifiedHundsdorfer();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new FdmSchemeDesc(static_cast< const FdmSchemeDesc& >(result))), SWIGTYPE_p_FdmSchemeDesc, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_FdmSchemeDesc) {
  {
    FdmSchemeDesc *arg1 = (FdmSchemeDesc *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_FdmSchemeDesc(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_FdmSchemeDesc, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FdmSchemeDesc" "', argument " "1"" of type '" "FdmSchemeDesc *""'"); 
    }
    arg1 = reinterpret_cast< FdmSchemeDesc * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FdBlackScholesBarrierEngine__SWIG_0) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    Size arg2 ;
    Size arg3 ;
    Size arg4 ;
    FdmSchemeDesc *arg5 = 0 ;
    bool arg6 ;
    Real arg7 ;
    void *argp1 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    size_t val3 ;
    int ecode3 = 0 ;
    size_t val4 ;
    int ecode4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    bool val6 ;
    int ecode6 = 0 ;
    double val7 ;
    int ecode7 = 0 ;
    int argvi = 0;
    FdBlackScholesBarrierEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: new_FdBlackScholesBarrierEngine(process,tGrid,xGrid,dampingSteps,schemeDesc,localVol,illegalLocalVolOverwrite);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FdBlackScholesBarrierEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FdBlackScholesBarrierEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FdBlackScholesBarrierEngine" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_FdBlackScholesBarrierEngine" "', argument " "3"" of type '" "Size""'");
    } 
    arg3 = static_cast< Size >(val3);
    ecode4 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_FdBlackScholesBarrierEngine" "', argument " "4"" of type '" "Size""'");
    } 
    arg4 = static_cast< Size >(val4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_FdmSchemeDesc,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_FdBlackScholesBarrierEngine" "', argument " "5"" of type '" "FdmSchemeDesc const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FdBlackScholesBarrierEngine" "', argument " "5"" of type '" "FdmSchemeDesc const &""'"); 
    }
    arg5 = reinterpret_cast< FdmSchemeDesc * >(argp5);
    ecode6 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_FdBlackScholesBarrierEngine" "', argument " "6"" of type '" "bool""'");
    } 
    arg6 = static_cast< bool >(val6);
    ecode7 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_FdBlackScholesBarrierEngine" "', argument " "7"" of type '" "Real""'");
    } 
    arg7 = static_cast< Real >(val7);
    {
      try {
        result = (FdBlackScholesBarrierEnginePtr *)new_FdBlackScholesBarrierEnginePtr__SWIG_0((GeneralizedBlackScholesProcessPtr const &)*arg1,arg2,arg3,arg4,(FdmSchemeDesc const &)*arg5,arg6,arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FdBlackScholesBarrierEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FdBlackScholesBarrierEngine__SWIG_1) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    Size arg2 ;
    Size arg3 ;
    Size arg4 ;
    FdmSchemeDesc *arg5 = 0 ;
    bool arg6 ;
    void *argp1 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    size_t val3 ;
    int ecode3 = 0 ;
    size_t val4 ;
    int ecode4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    bool val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    FdBlackScholesBarrierEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_FdBlackScholesBarrierEngine(process,tGrid,xGrid,dampingSteps,schemeDesc,localVol);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FdBlackScholesBarrierEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FdBlackScholesBarrierEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FdBlackScholesBarrierEngine" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_FdBlackScholesBarrierEngine" "', argument " "3"" of type '" "Size""'");
    } 
    arg3 = static_cast< Size >(val3);
    ecode4 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_FdBlackScholesBarrierEngine" "', argument " "4"" of type '" "Size""'");
    } 
    arg4 = static_cast< Size >(val4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_FdmSchemeDesc,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_FdBlackScholesBarrierEngine" "', argument " "5"" of type '" "FdmSchemeDesc const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FdBlackScholesBarrierEngine" "', argument " "5"" of type '" "FdmSchemeDesc const &""'"); 
    }
    arg5 = reinterpret_cast< FdmSchemeDesc * >(argp5);
    ecode6 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_FdBlackScholesBarrierEngine" "', argument " "6"" of type '" "bool""'");
    } 
    arg6 = static_cast< bool >(val6);
    {
      try {
        result = (FdBlackScholesBarrierEnginePtr *)new_FdBlackScholesBarrierEnginePtr__SWIG_0((GeneralizedBlackScholesProcessPtr const &)*arg1,arg2,arg3,arg4,(FdmSchemeDesc const &)*arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FdBlackScholesBarrierEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FdBlackScholesBarrierEngine__SWIG_2) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    Size arg2 ;
    Size arg3 ;
    Size arg4 ;
    FdmSchemeDesc *arg5 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    size_t val3 ;
    int ecode3 = 0 ;
    size_t val4 ;
    int ecode4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int argvi = 0;
    FdBlackScholesBarrierEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_FdBlackScholesBarrierEngine(process,tGrid,xGrid,dampingSteps,schemeDesc);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FdBlackScholesBarrierEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FdBlackScholesBarrierEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FdBlackScholesBarrierEngine" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_FdBlackScholesBarrierEngine" "', argument " "3"" of type '" "Size""'");
    } 
    arg3 = static_cast< Size >(val3);
    ecode4 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_FdBlackScholesBarrierEngine" "', argument " "4"" of type '" "Size""'");
    } 
    arg4 = static_cast< Size >(val4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_FdmSchemeDesc,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_FdBlackScholesBarrierEngine" "', argument " "5"" of type '" "FdmSchemeDesc const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FdBlackScholesBarrierEngine" "', argument " "5"" of type '" "FdmSchemeDesc const &""'"); 
    }
    arg5 = reinterpret_cast< FdmSchemeDesc * >(argp5);
    {
      try {
        result = (FdBlackScholesBarrierEnginePtr *)new_FdBlackScholesBarrierEnginePtr__SWIG_0((GeneralizedBlackScholesProcessPtr const &)*arg1,arg2,arg3,arg4,(FdmSchemeDesc const &)*arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FdBlackScholesBarrierEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FdBlackScholesBarrierEngine__SWIG_3) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    Size arg2 ;
    Size arg3 ;
    Size arg4 ;
    void *argp1 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    size_t val3 ;
    int ecode3 = 0 ;
    size_t val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    FdBlackScholesBarrierEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_FdBlackScholesBarrierEngine(process,tGrid,xGrid,dampingSteps);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FdBlackScholesBarrierEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FdBlackScholesBarrierEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FdBlackScholesBarrierEngine" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_FdBlackScholesBarrierEngine" "', argument " "3"" of type '" "Size""'");
    } 
    arg3 = static_cast< Size >(val3);
    ecode4 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_FdBlackScholesBarrierEngine" "', argument " "4"" of type '" "Size""'");
    } 
    arg4 = static_cast< Size >(val4);
    {
      try {
        result = (FdBlackScholesBarrierEnginePtr *)new_FdBlackScholesBarrierEnginePtr__SWIG_0((GeneralizedBlackScholesProcessPtr const &)*arg1,arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FdBlackScholesBarrierEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FdBlackScholesBarrierEngine__SWIG_4) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    Size arg2 ;
    Size arg3 ;
    void *argp1 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    size_t val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    FdBlackScholesBarrierEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_FdBlackScholesBarrierEngine(process,tGrid,xGrid);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FdBlackScholesBarrierEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FdBlackScholesBarrierEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FdBlackScholesBarrierEngine" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_FdBlackScholesBarrierEngine" "', argument " "3"" of type '" "Size""'");
    } 
    arg3 = static_cast< Size >(val3);
    {
      try {
        result = (FdBlackScholesBarrierEnginePtr *)new_FdBlackScholesBarrierEnginePtr__SWIG_0((GeneralizedBlackScholesProcessPtr const &)*arg1,arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FdBlackScholesBarrierEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FdBlackScholesBarrierEngine__SWIG_5) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    Size arg2 ;
    void *argp1 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    FdBlackScholesBarrierEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_FdBlackScholesBarrierEngine(process,tGrid);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FdBlackScholesBarrierEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FdBlackScholesBarrierEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FdBlackScholesBarrierEngine" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    {
      try {
        result = (FdBlackScholesBarrierEnginePtr *)new_FdBlackScholesBarrierEnginePtr__SWIG_0((GeneralizedBlackScholesProcessPtr const &)*arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FdBlackScholesBarrierEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FdBlackScholesBarrierEngine__SWIG_6) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    FdBlackScholesBarrierEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_FdBlackScholesBarrierEngine(process);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FdBlackScholesBarrierEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FdBlackScholesBarrierEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    {
      try {
        result = (FdBlackScholesBarrierEnginePtr *)new_FdBlackScholesBarrierEnginePtr__SWIG_0((GeneralizedBlackScholesProcessPtr const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FdBlackScholesBarrierEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FdBlackScholesBarrierEngine) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_FdmSchemeDesc, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_FdmSchemeDesc, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_FdmSchemeDesc, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 7;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_7:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FdBlackScholesBarrierEngine__SWIG_6); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FdBlackScholesBarrierEngine__SWIG_5); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FdBlackScholesBarrierEngine__SWIG_4); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FdBlackScholesBarrierEngine__SWIG_3); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FdBlackScholesBarrierEngine__SWIG_2); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FdBlackScholesBarrierEngine__SWIG_1); return;
    case 7:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FdBlackScholesBarrierEngine__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_FdBlackScholesBarrierEngine'");
  XSRETURN(0);
}


XS(_wrap_delete_FdBlackScholesBarrierEngine) {
  {
    FdBlackScholesBarrierEnginePtr *arg1 = (FdBlackScholesBarrierEnginePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_FdBlackScholesBarrierEngine(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_FdBlackScholesBarrierEnginePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FdBlackScholesBarrierEngine" "', argument " "1"" of type '" "FdBlackScholesBarrierEnginePtr *""'"); 
    }
    arg1 = reinterpret_cast< FdBlackScholesBarrierEnginePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_AnalyticBinaryBarrierEngine) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    AnalyticBinaryBarrierEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_AnalyticBinaryBarrierEngine(process);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_AnalyticBinaryBarrierEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AnalyticBinaryBarrierEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    {
      try {
        result = (AnalyticBinaryBarrierEnginePtr *)new_AnalyticBinaryBarrierEnginePtr((GeneralizedBlackScholesProcessPtr const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_AnalyticBinaryBarrierEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_AnalyticBinaryBarrierEngine) {
  {
    AnalyticBinaryBarrierEnginePtr *arg1 = (AnalyticBinaryBarrierEnginePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_AnalyticBinaryBarrierEngine(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_AnalyticBinaryBarrierEnginePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_AnalyticBinaryBarrierEngine" "', argument " "1"" of type '" "AnalyticBinaryBarrierEnginePtr *""'"); 
    }
    arg1 = reinterpret_cast< AnalyticBinaryBarrierEnginePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BinomialBarrierEngine__SWIG_0) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    std::string *arg2 = 0 ;
    Size arg3 ;
    Size arg4 ;
    void *argp1 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    size_t val3 ;
    int ecode3 = 0 ;
    size_t val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    BinomialBarrierEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_BinomialBarrierEngine(process,type,steps,max_steps);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_BinomialBarrierEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BinomialBarrierEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_BinomialBarrierEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BinomialBarrierEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_BinomialBarrierEngine" "', argument " "3"" of type '" "Size""'");
    } 
    arg3 = static_cast< Size >(val3);
    ecode4 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_BinomialBarrierEngine" "', argument " "4"" of type '" "Size""'");
    } 
    arg4 = static_cast< Size >(val4);
    {
      try {
        result = (BinomialBarrierEnginePtr *)new_BinomialBarrierEnginePtr__SWIG_0((GeneralizedBlackScholesProcessPtr const &)*arg1,(std::string const &)*arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BinomialBarrierEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BinomialBarrierEngine__SWIG_1) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    std::string *arg2 = 0 ;
    Size arg3 ;
    void *argp1 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    size_t val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    BinomialBarrierEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_BinomialBarrierEngine(process,type,steps);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_BinomialBarrierEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BinomialBarrierEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_BinomialBarrierEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BinomialBarrierEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_BinomialBarrierEngine" "', argument " "3"" of type '" "Size""'");
    } 
    arg3 = static_cast< Size >(val3);
    {
      try {
        result = (BinomialBarrierEnginePtr *)new_BinomialBarrierEnginePtr__SWIG_0((GeneralizedBlackScholesProcessPtr const &)*arg1,(std::string const &)*arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BinomialBarrierEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BinomialBarrierEngine) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_BinomialBarrierEngine__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_BinomialBarrierEngine__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_BinomialBarrierEngine'");
  XSRETURN(0);
}


XS(_wrap_delete_BinomialBarrierEngine) {
  {
    BinomialBarrierEnginePtr *arg1 = (BinomialBarrierEnginePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_BinomialBarrierEngine(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BinomialBarrierEnginePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_BinomialBarrierEngine" "', argument " "1"" of type '" "BinomialBarrierEnginePtr *""'"); 
    }
    arg1 = reinterpret_cast< BinomialBarrierEnginePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ForwardEuropeanEngine) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    ForwardEuropeanEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_ForwardEuropeanEngine(process);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ForwardEuropeanEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ForwardEuropeanEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    {
      try {
        result = (ForwardEuropeanEnginePtr *)new_ForwardEuropeanEnginePtr((GeneralizedBlackScholesProcessPtr const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ForwardEuropeanEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_ForwardEuropeanEngine) {
  {
    ForwardEuropeanEnginePtr *arg1 = (ForwardEuropeanEnginePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_ForwardEuropeanEngine(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ForwardEuropeanEnginePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ForwardEuropeanEngine" "', argument " "1"" of type '" "ForwardEuropeanEnginePtr *""'"); 
    }
    arg1 = reinterpret_cast< ForwardEuropeanEnginePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_QuantoEuropeanEngine) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    Handle< YieldTermStructure > *arg2 = 0 ;
    Handle< BlackVolTermStructure > *arg3 = 0 ;
    Handle< Quote > *arg4 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int argvi = 0;
    QuantoEuropeanEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_QuantoEuropeanEngine(process,foreignRiskFreeRate,exchangeRateVolatility,correlation);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_QuantoEuropeanEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_QuantoEuropeanEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_QuantoEuropeanEngine" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_QuantoEuropeanEngine" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< YieldTermStructure > * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_BlackVolTermStructure_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_QuantoEuropeanEngine" "', argument " "3"" of type '" "Handle< BlackVolTermStructure > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_QuantoEuropeanEngine" "', argument " "3"" of type '" "Handle< BlackVolTermStructure > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< BlackVolTermStructure > * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_QuantoEuropeanEngine" "', argument " "4"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_QuantoEuropeanEngine" "', argument " "4"" of type '" "Handle< Quote > const &""'"); 
    }
    arg4 = reinterpret_cast< Handle< Quote > * >(argp4);
    {
      try {
        result = (QuantoEuropeanEnginePtr *)new_QuantoEuropeanEnginePtr((GeneralizedBlackScholesProcessPtr const &)*arg1,(Handle< YieldTermStructure > const &)*arg2,(Handle< BlackVolTermStructure > const &)*arg3,(Handle< Quote > const &)*arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantoEuropeanEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_QuantoEuropeanEngine) {
  {
    QuantoEuropeanEnginePtr *arg1 = (QuantoEuropeanEnginePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_QuantoEuropeanEngine(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantoEuropeanEnginePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_QuantoEuropeanEngine" "', argument " "1"" of type '" "QuantoEuropeanEnginePtr *""'"); 
    }
    arg1 = reinterpret_cast< QuantoEuropeanEnginePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_QuantoForwardEuropeanEngine) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    Handle< YieldTermStructure > *arg2 = 0 ;
    Handle< BlackVolTermStructure > *arg3 = 0 ;
    Handle< Quote > *arg4 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int argvi = 0;
    QuantoForwardEuropeanEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_QuantoForwardEuropeanEngine(process,foreignRiskFreeRate,exchangeRateVolatility,correlation);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_QuantoForwardEuropeanEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_QuantoForwardEuropeanEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_QuantoForwardEuropeanEngine" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_QuantoForwardEuropeanEngine" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< YieldTermStructure > * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_BlackVolTermStructure_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_QuantoForwardEuropeanEngine" "', argument " "3"" of type '" "Handle< BlackVolTermStructure > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_QuantoForwardEuropeanEngine" "', argument " "3"" of type '" "Handle< BlackVolTermStructure > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< BlackVolTermStructure > * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_QuantoForwardEuropeanEngine" "', argument " "4"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_QuantoForwardEuropeanEngine" "', argument " "4"" of type '" "Handle< Quote > const &""'"); 
    }
    arg4 = reinterpret_cast< Handle< Quote > * >(argp4);
    {
      try {
        result = (QuantoForwardEuropeanEnginePtr *)new_QuantoForwardEuropeanEnginePtr((GeneralizedBlackScholesProcessPtr const &)*arg1,(Handle< YieldTermStructure > const &)*arg2,(Handle< BlackVolTermStructure > const &)*arg3,(Handle< Quote > const &)*arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantoForwardEuropeanEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_QuantoForwardEuropeanEngine) {
  {
    QuantoForwardEuropeanEnginePtr *arg1 = (QuantoForwardEuropeanEnginePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_QuantoForwardEuropeanEngine(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantoForwardEuropeanEnginePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_QuantoForwardEuropeanEngine" "', argument " "1"" of type '" "QuantoForwardEuropeanEnginePtr *""'"); 
    }
    arg1 = reinterpret_cast< QuantoForwardEuropeanEnginePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BlackCalculator__SWIG_0) {
  {
    boost::shared_ptr< Payoff > *arg1 = 0 ;
    Real arg2 ;
    Real arg3 ;
    Real arg4 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    BlackCalculator *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_BlackCalculator(payoff,forward,stdDev,discount);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_Payoff_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_BlackCalculator" "', argument " "1"" of type '" "boost::shared_ptr< Payoff > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BlackCalculator" "', argument " "1"" of type '" "boost::shared_ptr< Payoff > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Payoff > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_BlackCalculator" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_BlackCalculator" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_BlackCalculator" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    {
      try {
        result = (BlackCalculator *)new_BlackCalculator__SWIG_0((boost::shared_ptr< Payoff > const &)*arg1,arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BlackCalculator, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BlackCalculator__SWIG_1) {
  {
    boost::shared_ptr< Payoff > *arg1 = 0 ;
    Real arg2 ;
    Real arg3 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    BlackCalculator *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_BlackCalculator(payoff,forward,stdDev);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_Payoff_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_BlackCalculator" "', argument " "1"" of type '" "boost::shared_ptr< Payoff > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BlackCalculator" "', argument " "1"" of type '" "boost::shared_ptr< Payoff > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Payoff > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_BlackCalculator" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_BlackCalculator" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    {
      try {
        result = (BlackCalculator *)new_BlackCalculator__SWIG_0((boost::shared_ptr< Payoff > const &)*arg1,arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BlackCalculator, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BlackCalculator) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_Payoff_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_Payoff_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_BlackCalculator__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_BlackCalculator__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_BlackCalculator'");
  XSRETURN(0);
}


XS(_wrap_BlackCalculator_value) {
  {
    BlackCalculator *arg1 = (BlackCalculator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BlackCalculator_value(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BlackCalculator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BlackCalculator_value" "', argument " "1"" of type '" "BlackCalculator const *""'"); 
    }
    arg1 = reinterpret_cast< BlackCalculator * >(argp1);
    {
      try {
        result = (Real)((BlackCalculator const *)arg1)->value();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BlackCalculator_deltaForward) {
  {
    BlackCalculator *arg1 = (BlackCalculator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BlackCalculator_deltaForward(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BlackCalculator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BlackCalculator_deltaForward" "', argument " "1"" of type '" "BlackCalculator const *""'"); 
    }
    arg1 = reinterpret_cast< BlackCalculator * >(argp1);
    {
      try {
        result = (Real)((BlackCalculator const *)arg1)->deltaForward();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BlackCalculator_delta) {
  {
    BlackCalculator *arg1 = (BlackCalculator *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: BlackCalculator_delta(self,spot);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BlackCalculator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BlackCalculator_delta" "', argument " "1"" of type '" "BlackCalculator const *""'"); 
    }
    arg1 = reinterpret_cast< BlackCalculator * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BlackCalculator_delta" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (Real)((BlackCalculator const *)arg1)->delta(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BlackCalculator_elasticityForward) {
  {
    BlackCalculator *arg1 = (BlackCalculator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BlackCalculator_elasticityForward(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BlackCalculator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BlackCalculator_elasticityForward" "', argument " "1"" of type '" "BlackCalculator const *""'"); 
    }
    arg1 = reinterpret_cast< BlackCalculator * >(argp1);
    {
      try {
        result = (Real)((BlackCalculator const *)arg1)->elasticityForward();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BlackCalculator_elasticity) {
  {
    BlackCalculator *arg1 = (BlackCalculator *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: BlackCalculator_elasticity(self,spot);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BlackCalculator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BlackCalculator_elasticity" "', argument " "1"" of type '" "BlackCalculator const *""'"); 
    }
    arg1 = reinterpret_cast< BlackCalculator * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BlackCalculator_elasticity" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (Real)((BlackCalculator const *)arg1)->elasticity(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BlackCalculator_gammaForward) {
  {
    BlackCalculator *arg1 = (BlackCalculator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BlackCalculator_gammaForward(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BlackCalculator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BlackCalculator_gammaForward" "', argument " "1"" of type '" "BlackCalculator const *""'"); 
    }
    arg1 = reinterpret_cast< BlackCalculator * >(argp1);
    {
      try {
        result = (Real)((BlackCalculator const *)arg1)->gammaForward();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BlackCalculator_gamma) {
  {
    BlackCalculator *arg1 = (BlackCalculator *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: BlackCalculator_gamma(self,spot);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BlackCalculator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BlackCalculator_gamma" "', argument " "1"" of type '" "BlackCalculator const *""'"); 
    }
    arg1 = reinterpret_cast< BlackCalculator * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BlackCalculator_gamma" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (Real)((BlackCalculator const *)arg1)->gamma(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BlackCalculator_theta) {
  {
    BlackCalculator *arg1 = (BlackCalculator *) 0 ;
    Real arg2 ;
    Time arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: BlackCalculator_theta(self,spot,maturity);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BlackCalculator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BlackCalculator_theta" "', argument " "1"" of type '" "BlackCalculator const *""'"); 
    }
    arg1 = reinterpret_cast< BlackCalculator * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BlackCalculator_theta" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "BlackCalculator_theta" "', argument " "3"" of type '" "Time""'");
    } 
    arg3 = static_cast< Time >(val3);
    {
      try {
        result = (Real)((BlackCalculator const *)arg1)->theta(arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BlackCalculator_thetaPerDay) {
  {
    BlackCalculator *arg1 = (BlackCalculator *) 0 ;
    Real arg2 ;
    Time arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: BlackCalculator_thetaPerDay(self,spot,maturity);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BlackCalculator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BlackCalculator_thetaPerDay" "', argument " "1"" of type '" "BlackCalculator const *""'"); 
    }
    arg1 = reinterpret_cast< BlackCalculator * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BlackCalculator_thetaPerDay" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "BlackCalculator_thetaPerDay" "', argument " "3"" of type '" "Time""'");
    } 
    arg3 = static_cast< Time >(val3);
    {
      try {
        result = (Real)((BlackCalculator const *)arg1)->thetaPerDay(arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BlackCalculator_vega) {
  {
    BlackCalculator *arg1 = (BlackCalculator *) 0 ;
    Time arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: BlackCalculator_vega(self,maturity);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BlackCalculator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BlackCalculator_vega" "', argument " "1"" of type '" "BlackCalculator const *""'"); 
    }
    arg1 = reinterpret_cast< BlackCalculator * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BlackCalculator_vega" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    {
      try {
        result = (Real)((BlackCalculator const *)arg1)->vega(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BlackCalculator_rho) {
  {
    BlackCalculator *arg1 = (BlackCalculator *) 0 ;
    Time arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: BlackCalculator_rho(self,maturity);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BlackCalculator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BlackCalculator_rho" "', argument " "1"" of type '" "BlackCalculator const *""'"); 
    }
    arg1 = reinterpret_cast< BlackCalculator * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BlackCalculator_rho" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    {
      try {
        result = (Real)((BlackCalculator const *)arg1)->rho(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BlackCalculator_dividendRho) {
  {
    BlackCalculator *arg1 = (BlackCalculator *) 0 ;
    Time arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: BlackCalculator_dividendRho(self,maturity);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BlackCalculator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BlackCalculator_dividendRho" "', argument " "1"" of type '" "BlackCalculator const *""'"); 
    }
    arg1 = reinterpret_cast< BlackCalculator * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BlackCalculator_dividendRho" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    {
      try {
        result = (Real)((BlackCalculator const *)arg1)->dividendRho(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BlackCalculator_itmCashProbability) {
  {
    BlackCalculator *arg1 = (BlackCalculator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BlackCalculator_itmCashProbability(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BlackCalculator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BlackCalculator_itmCashProbability" "', argument " "1"" of type '" "BlackCalculator const *""'"); 
    }
    arg1 = reinterpret_cast< BlackCalculator * >(argp1);
    {
      try {
        result = (Real)((BlackCalculator const *)arg1)->itmCashProbability();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BlackCalculator_itmAssetProbability) {
  {
    BlackCalculator *arg1 = (BlackCalculator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BlackCalculator_itmAssetProbability(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BlackCalculator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BlackCalculator_itmAssetProbability" "', argument " "1"" of type '" "BlackCalculator const *""'"); 
    }
    arg1 = reinterpret_cast< BlackCalculator * >(argp1);
    {
      try {
        result = (Real)((BlackCalculator const *)arg1)->itmAssetProbability();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BlackCalculator_strikeSensitivity) {
  {
    BlackCalculator *arg1 = (BlackCalculator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BlackCalculator_strikeSensitivity(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BlackCalculator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BlackCalculator_strikeSensitivity" "', argument " "1"" of type '" "BlackCalculator const *""'"); 
    }
    arg1 = reinterpret_cast< BlackCalculator * >(argp1);
    {
      try {
        result = (Real)((BlackCalculator const *)arg1)->strikeSensitivity();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BlackCalculator_alpha) {
  {
    BlackCalculator *arg1 = (BlackCalculator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BlackCalculator_alpha(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BlackCalculator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BlackCalculator_alpha" "', argument " "1"" of type '" "BlackCalculator const *""'"); 
    }
    arg1 = reinterpret_cast< BlackCalculator * >(argp1);
    {
      try {
        result = (Real)((BlackCalculator const *)arg1)->alpha();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BlackCalculator_beta) {
  {
    BlackCalculator *arg1 = (BlackCalculator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BlackCalculator_beta(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BlackCalculator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BlackCalculator_beta" "', argument " "1"" of type '" "BlackCalculator const *""'"); 
    }
    arg1 = reinterpret_cast< BlackCalculator * >(argp1);
    {
      try {
        result = (Real)((BlackCalculator const *)arg1)->beta();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_BlackCalculator) {
  {
    BlackCalculator *arg1 = (BlackCalculator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_BlackCalculator(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BlackCalculator, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_BlackCalculator" "', argument " "1"" of type '" "BlackCalculator *""'"); 
    }
    arg1 = reinterpret_cast< BlackCalculator * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Average) {
  {
    int argvi = 0;
    Average *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Average();");
    }
    {
      try {
        result = (Average *)new Average();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Average, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_Average) {
  {
    Average *arg1 = (Average *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Average(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Average, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Average" "', argument " "1"" of type '" "Average *""'"); 
    }
    arg1 = reinterpret_cast< Average * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ContinuousAveragingAsianOption) {
  {
    Average::Type arg1 ;
    boost::shared_ptr< Payoff > *arg2 = 0 ;
    boost::shared_ptr< Exercise > *arg3 = 0 ;
    int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    ContinuousAveragingAsianOptionPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_ContinuousAveragingAsianOption(averageType,payoff,exercise);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ContinuousAveragingAsianOption" "', argument " "1"" of type '" "Average::Type""'");
    } 
    arg1 = static_cast< Average::Type >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_boost__shared_ptrT_Payoff_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ContinuousAveragingAsianOption" "', argument " "2"" of type '" "boost::shared_ptr< Payoff > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ContinuousAveragingAsianOption" "', argument " "2"" of type '" "boost::shared_ptr< Payoff > const &""'"); 
    }
    arg2 = reinterpret_cast< boost::shared_ptr< Payoff > * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_boost__shared_ptrT_Exercise_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_ContinuousAveragingAsianOption" "', argument " "3"" of type '" "boost::shared_ptr< Exercise > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ContinuousAveragingAsianOption" "', argument " "3"" of type '" "boost::shared_ptr< Exercise > const &""'"); 
    }
    arg3 = reinterpret_cast< boost::shared_ptr< Exercise > * >(argp3);
    {
      try {
        result = (ContinuousAveragingAsianOptionPtr *)new_ContinuousAveragingAsianOptionPtr(arg1,(boost::shared_ptr< Payoff > const &)*arg2,(boost::shared_ptr< Exercise > const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ContinuousAveragingAsianOptionPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_ContinuousAveragingAsianOption_delta) {
  {
    ContinuousAveragingAsianOptionPtr *arg1 = (ContinuousAveragingAsianOptionPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ContinuousAveragingAsianOption_delta(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ContinuousAveragingAsianOptionPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContinuousAveragingAsianOption_delta" "', argument " "1"" of type '" "ContinuousAveragingAsianOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< ContinuousAveragingAsianOptionPtr * >(argp1);
    {
      try {
        result = (Real)ContinuousAveragingAsianOptionPtr_delta(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ContinuousAveragingAsianOption_gamma) {
  {
    ContinuousAveragingAsianOptionPtr *arg1 = (ContinuousAveragingAsianOptionPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ContinuousAveragingAsianOption_gamma(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ContinuousAveragingAsianOptionPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContinuousAveragingAsianOption_gamma" "', argument " "1"" of type '" "ContinuousAveragingAsianOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< ContinuousAveragingAsianOptionPtr * >(argp1);
    {
      try {
        result = (Real)ContinuousAveragingAsianOptionPtr_gamma(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ContinuousAveragingAsianOption_theta) {
  {
    ContinuousAveragingAsianOptionPtr *arg1 = (ContinuousAveragingAsianOptionPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ContinuousAveragingAsianOption_theta(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ContinuousAveragingAsianOptionPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContinuousAveragingAsianOption_theta" "', argument " "1"" of type '" "ContinuousAveragingAsianOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< ContinuousAveragingAsianOptionPtr * >(argp1);
    {
      try {
        result = (Real)ContinuousAveragingAsianOptionPtr_theta(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ContinuousAveragingAsianOption_thetaPerDay) {
  {
    ContinuousAveragingAsianOptionPtr *arg1 = (ContinuousAveragingAsianOptionPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ContinuousAveragingAsianOption_thetaPerDay(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ContinuousAveragingAsianOptionPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContinuousAveragingAsianOption_thetaPerDay" "', argument " "1"" of type '" "ContinuousAveragingAsianOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< ContinuousAveragingAsianOptionPtr * >(argp1);
    {
      try {
        result = (Real)ContinuousAveragingAsianOptionPtr_thetaPerDay(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ContinuousAveragingAsianOption_vega) {
  {
    ContinuousAveragingAsianOptionPtr *arg1 = (ContinuousAveragingAsianOptionPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ContinuousAveragingAsianOption_vega(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ContinuousAveragingAsianOptionPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContinuousAveragingAsianOption_vega" "', argument " "1"" of type '" "ContinuousAveragingAsianOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< ContinuousAveragingAsianOptionPtr * >(argp1);
    {
      try {
        result = (Real)ContinuousAveragingAsianOptionPtr_vega(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ContinuousAveragingAsianOption_rho) {
  {
    ContinuousAveragingAsianOptionPtr *arg1 = (ContinuousAveragingAsianOptionPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ContinuousAveragingAsianOption_rho(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ContinuousAveragingAsianOptionPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContinuousAveragingAsianOption_rho" "', argument " "1"" of type '" "ContinuousAveragingAsianOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< ContinuousAveragingAsianOptionPtr * >(argp1);
    {
      try {
        result = (Real)ContinuousAveragingAsianOptionPtr_rho(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ContinuousAveragingAsianOption_dividendRho) {
  {
    ContinuousAveragingAsianOptionPtr *arg1 = (ContinuousAveragingAsianOptionPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ContinuousAveragingAsianOption_dividendRho(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ContinuousAveragingAsianOptionPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContinuousAveragingAsianOption_dividendRho" "', argument " "1"" of type '" "ContinuousAveragingAsianOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< ContinuousAveragingAsianOptionPtr * >(argp1);
    {
      try {
        result = (Real)ContinuousAveragingAsianOptionPtr_dividendRho(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ContinuousAveragingAsianOption_strikeSensitivity) {
  {
    ContinuousAveragingAsianOptionPtr *arg1 = (ContinuousAveragingAsianOptionPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ContinuousAveragingAsianOption_strikeSensitivity(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ContinuousAveragingAsianOptionPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ContinuousAveragingAsianOption_strikeSensitivity" "', argument " "1"" of type '" "ContinuousAveragingAsianOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< ContinuousAveragingAsianOptionPtr * >(argp1);
    {
      try {
        result = (Real)ContinuousAveragingAsianOptionPtr_strikeSensitivity(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_ContinuousAveragingAsianOption) {
  {
    ContinuousAveragingAsianOptionPtr *arg1 = (ContinuousAveragingAsianOptionPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_ContinuousAveragingAsianOption(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ContinuousAveragingAsianOptionPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ContinuousAveragingAsianOption" "', argument " "1"" of type '" "ContinuousAveragingAsianOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< ContinuousAveragingAsianOptionPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DiscreteAveragingAsianOption) {
  {
    Average::Type arg1 ;
    Real arg2 ;
    Size arg3 ;
    std::vector< Date > *arg4 = 0 ;
    boost::shared_ptr< Payoff > *arg5 = 0 ;
    boost::shared_ptr< Exercise > *arg6 = 0 ;
    int val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    size_t val3 ;
    int ecode3 = 0 ;
    std::vector< Date > temp4 ;
    std::vector< Date > *v4 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    int argvi = 0;
    DiscreteAveragingAsianOptionPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_DiscreteAveragingAsianOption(averageType,runningAccumulator,pastFixings,fixingDates,payoff,exercise);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_DiscreteAveragingAsianOption" "', argument " "1"" of type '" "Average::Type""'");
    } 
    arg1 = static_cast< Average::Type >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_DiscreteAveragingAsianOption" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_DiscreteAveragingAsianOption" "', argument " "3"" of type '" "Size""'");
    } 
    arg3 = static_cast< Size >(val3);
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of new_DiscreteAveragingAsianOption. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp4.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 4 of "
              "new_DiscreteAveragingAsianOption. "
              "Expected an array of " "Date");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of new_DiscreteAveragingAsianOption. "
          "Expected an array of " "Date");
      }
    }
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_boost__shared_ptrT_Payoff_t,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_DiscreteAveragingAsianOption" "', argument " "5"" of type '" "boost::shared_ptr< Payoff > const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DiscreteAveragingAsianOption" "', argument " "5"" of type '" "boost::shared_ptr< Payoff > const &""'"); 
    }
    arg5 = reinterpret_cast< boost::shared_ptr< Payoff > * >(argp5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_boost__shared_ptrT_Exercise_t,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_DiscreteAveragingAsianOption" "', argument " "6"" of type '" "boost::shared_ptr< Exercise > const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DiscreteAveragingAsianOption" "', argument " "6"" of type '" "boost::shared_ptr< Exercise > const &""'"); 
    }
    arg6 = reinterpret_cast< boost::shared_ptr< Exercise > * >(argp6);
    {
      try {
        result = (DiscreteAveragingAsianOptionPtr *)new_DiscreteAveragingAsianOptionPtr(arg1,arg2,arg3,(std::vector< Date > const &)*arg4,(boost::shared_ptr< Payoff > const &)*arg5,(boost::shared_ptr< Exercise > const &)*arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DiscreteAveragingAsianOptionPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_DiscreteAveragingAsianOption_delta) {
  {
    DiscreteAveragingAsianOptionPtr *arg1 = (DiscreteAveragingAsianOptionPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DiscreteAveragingAsianOption_delta(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_DiscreteAveragingAsianOptionPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DiscreteAveragingAsianOption_delta" "', argument " "1"" of type '" "DiscreteAveragingAsianOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< DiscreteAveragingAsianOptionPtr * >(argp1);
    {
      try {
        result = (Real)DiscreteAveragingAsianOptionPtr_delta(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_DiscreteAveragingAsianOption_gamma) {
  {
    DiscreteAveragingAsianOptionPtr *arg1 = (DiscreteAveragingAsianOptionPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DiscreteAveragingAsianOption_gamma(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_DiscreteAveragingAsianOptionPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DiscreteAveragingAsianOption_gamma" "', argument " "1"" of type '" "DiscreteAveragingAsianOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< DiscreteAveragingAsianOptionPtr * >(argp1);
    {
      try {
        result = (Real)DiscreteAveragingAsianOptionPtr_gamma(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_DiscreteAveragingAsianOption_theta) {
  {
    DiscreteAveragingAsianOptionPtr *arg1 = (DiscreteAveragingAsianOptionPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DiscreteAveragingAsianOption_theta(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_DiscreteAveragingAsianOptionPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DiscreteAveragingAsianOption_theta" "', argument " "1"" of type '" "DiscreteAveragingAsianOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< DiscreteAveragingAsianOptionPtr * >(argp1);
    {
      try {
        result = (Real)DiscreteAveragingAsianOptionPtr_theta(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_DiscreteAveragingAsianOption_thetaPerDay) {
  {
    DiscreteAveragingAsianOptionPtr *arg1 = (DiscreteAveragingAsianOptionPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DiscreteAveragingAsianOption_thetaPerDay(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_DiscreteAveragingAsianOptionPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DiscreteAveragingAsianOption_thetaPerDay" "', argument " "1"" of type '" "DiscreteAveragingAsianOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< DiscreteAveragingAsianOptionPtr * >(argp1);
    {
      try {
        result = (Real)DiscreteAveragingAsianOptionPtr_thetaPerDay(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_DiscreteAveragingAsianOption_vega) {
  {
    DiscreteAveragingAsianOptionPtr *arg1 = (DiscreteAveragingAsianOptionPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DiscreteAveragingAsianOption_vega(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_DiscreteAveragingAsianOptionPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DiscreteAveragingAsianOption_vega" "', argument " "1"" of type '" "DiscreteAveragingAsianOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< DiscreteAveragingAsianOptionPtr * >(argp1);
    {
      try {
        result = (Real)DiscreteAveragingAsianOptionPtr_vega(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_DiscreteAveragingAsianOption_rho) {
  {
    DiscreteAveragingAsianOptionPtr *arg1 = (DiscreteAveragingAsianOptionPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DiscreteAveragingAsianOption_rho(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_DiscreteAveragingAsianOptionPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DiscreteAveragingAsianOption_rho" "', argument " "1"" of type '" "DiscreteAveragingAsianOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< DiscreteAveragingAsianOptionPtr * >(argp1);
    {
      try {
        result = (Real)DiscreteAveragingAsianOptionPtr_rho(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_DiscreteAveragingAsianOption_dividendRho) {
  {
    DiscreteAveragingAsianOptionPtr *arg1 = (DiscreteAveragingAsianOptionPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DiscreteAveragingAsianOption_dividendRho(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_DiscreteAveragingAsianOptionPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DiscreteAveragingAsianOption_dividendRho" "', argument " "1"" of type '" "DiscreteAveragingAsianOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< DiscreteAveragingAsianOptionPtr * >(argp1);
    {
      try {
        result = (Real)DiscreteAveragingAsianOptionPtr_dividendRho(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_DiscreteAveragingAsianOption_strikeSensitivity) {
  {
    DiscreteAveragingAsianOptionPtr *arg1 = (DiscreteAveragingAsianOptionPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DiscreteAveragingAsianOption_strikeSensitivity(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_DiscreteAveragingAsianOptionPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DiscreteAveragingAsianOption_strikeSensitivity" "', argument " "1"" of type '" "DiscreteAveragingAsianOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< DiscreteAveragingAsianOptionPtr * >(argp1);
    {
      try {
        result = (Real)DiscreteAveragingAsianOptionPtr_strikeSensitivity(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_DiscreteAveragingAsianOption) {
  {
    DiscreteAveragingAsianOptionPtr *arg1 = (DiscreteAveragingAsianOptionPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_DiscreteAveragingAsianOption(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_DiscreteAveragingAsianOptionPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DiscreteAveragingAsianOption" "', argument " "1"" of type '" "DiscreteAveragingAsianOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< DiscreteAveragingAsianOptionPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_AnalyticContinuousGeometricAveragePriceAsianEngine) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    AnalyticContinuousGeometricAveragePriceAsianEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_AnalyticContinuousGeometricAveragePriceAsianEngine(process);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_AnalyticContinuousGeometricAveragePriceAsianEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AnalyticContinuousGeometricAveragePriceAsianEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    {
      try {
        result = (AnalyticContinuousGeometricAveragePriceAsianEnginePtr *)new_AnalyticContinuousGeometricAveragePriceAsianEnginePtr((GeneralizedBlackScholesProcessPtr const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_AnalyticContinuousGeometricAveragePriceAsianEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_AnalyticContinuousGeometricAveragePriceAsianEngine) {
  {
    AnalyticContinuousGeometricAveragePriceAsianEnginePtr *arg1 = (AnalyticContinuousGeometricAveragePriceAsianEnginePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_AnalyticContinuousGeometricAveragePriceAsianEngine(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_AnalyticContinuousGeometricAveragePriceAsianEnginePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_AnalyticContinuousGeometricAveragePriceAsianEngine" "', argument " "1"" of type '" "AnalyticContinuousGeometricAveragePriceAsianEnginePtr *""'"); 
    }
    arg1 = reinterpret_cast< AnalyticContinuousGeometricAveragePriceAsianEnginePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_AnalyticDiscreteGeometricAveragePriceAsianEngine) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    AnalyticDiscreteGeometricAveragePriceAsianEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_AnalyticDiscreteGeometricAveragePriceAsianEngine(process);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_AnalyticDiscreteGeometricAveragePriceAsianEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AnalyticDiscreteGeometricAveragePriceAsianEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    {
      try {
        result = (AnalyticDiscreteGeometricAveragePriceAsianEnginePtr *)new_AnalyticDiscreteGeometricAveragePriceAsianEnginePtr((GeneralizedBlackScholesProcessPtr const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_AnalyticDiscreteGeometricAveragePriceAsianEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_AnalyticDiscreteGeometricAveragePriceAsianEngine) {
  {
    AnalyticDiscreteGeometricAveragePriceAsianEnginePtr *arg1 = (AnalyticDiscreteGeometricAveragePriceAsianEnginePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_AnalyticDiscreteGeometricAveragePriceAsianEngine(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_AnalyticDiscreteGeometricAveragePriceAsianEnginePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_AnalyticDiscreteGeometricAveragePriceAsianEngine" "', argument " "1"" of type '" "AnalyticDiscreteGeometricAveragePriceAsianEnginePtr *""'"); 
    }
    arg1 = reinterpret_cast< AnalyticDiscreteGeometricAveragePriceAsianEnginePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_AnalyticDiscreteGeometricAverageStrikeAsianEngine) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    AnalyticDiscreteGeometricAverageStrikeAsianEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_AnalyticDiscreteGeometricAverageStrikeAsianEngine(process);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_AnalyticDiscreteGeometricAverageStrikeAsianEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AnalyticDiscreteGeometricAverageStrikeAsianEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    {
      try {
        result = (AnalyticDiscreteGeometricAverageStrikeAsianEnginePtr *)new_AnalyticDiscreteGeometricAverageStrikeAsianEnginePtr((GeneralizedBlackScholesProcessPtr const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_AnalyticDiscreteGeometricAverageStrikeAsianEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_AnalyticDiscreteGeometricAverageStrikeAsianEngine) {
  {
    AnalyticDiscreteGeometricAverageStrikeAsianEnginePtr *arg1 = (AnalyticDiscreteGeometricAverageStrikeAsianEnginePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_AnalyticDiscreteGeometricAverageStrikeAsianEngine(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_AnalyticDiscreteGeometricAverageStrikeAsianEnginePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_AnalyticDiscreteGeometricAverageStrikeAsianEngine" "', argument " "1"" of type '" "AnalyticDiscreteGeometricAverageStrikeAsianEnginePtr *""'"); 
    }
    arg1 = reinterpret_cast< AnalyticDiscreteGeometricAverageStrikeAsianEnginePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MCDiscreteArithmeticAPEngine__SWIG_0) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    std::string *arg2 = 0 ;
    bool arg3 ;
    bool arg4 ;
    bool arg5 ;
    intOrNull arg6 ;
    doubleOrNull arg7 ;
    intOrNull arg8 ;
    BigInteger arg9 ;
    void *argp1 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    bool val3 ;
    int ecode3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    bool val5 ;
    int ecode5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    long val9 ;
    int ecode9 = 0 ;
    int argvi = 0;
    MCDiscreteArithmeticAPEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 9) || (items > 9)) {
      SWIG_croak("Usage: new_MCDiscreteArithmeticAPEngine(process,traits,brownianBridge,antitheticVariate,controlVariate,requiredSamples,requiredTolerance,maxSamples,seed);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MCDiscreteArithmeticAPEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCDiscreteArithmeticAPEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MCDiscreteArithmeticAPEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCDiscreteArithmeticAPEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_MCDiscreteArithmeticAPEngine" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_MCDiscreteArithmeticAPEngine" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_MCDiscreteArithmeticAPEngine" "', argument " "5"" of type '" "bool""'");
    } 
    arg5 = static_cast< bool >(val5);
    {
      res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_intOrNull,  0 );
      if (!SWIG_IsOK(res6)) {
        SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_MCDiscreteArithmeticAPEngine" "', argument " "6"" of type '" "intOrNull""'"); 
      }  
      if (!argp6) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCDiscreteArithmeticAPEngine" "', argument " "6"" of type '" "intOrNull""'");
      } else {
        arg6 = *(reinterpret_cast< intOrNull * >(argp6));
      }
    }
    {
      res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_doubleOrNull,  0 );
      if (!SWIG_IsOK(res7)) {
        SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_MCDiscreteArithmeticAPEngine" "', argument " "7"" of type '" "doubleOrNull""'"); 
      }  
      if (!argp7) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCDiscreteArithmeticAPEngine" "', argument " "7"" of type '" "doubleOrNull""'");
      } else {
        arg7 = *(reinterpret_cast< doubleOrNull * >(argp7));
      }
    }
    {
      res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_intOrNull,  0 );
      if (!SWIG_IsOK(res8)) {
        SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_MCDiscreteArithmeticAPEngine" "', argument " "8"" of type '" "intOrNull""'"); 
      }  
      if (!argp8) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCDiscreteArithmeticAPEngine" "', argument " "8"" of type '" "intOrNull""'");
      } else {
        arg8 = *(reinterpret_cast< intOrNull * >(argp8));
      }
    }
    ecode9 = SWIG_AsVal_long SWIG_PERL_CALL_ARGS_2(ST(8), &val9);
    if (!SWIG_IsOK(ecode9)) {
      SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "new_MCDiscreteArithmeticAPEngine" "', argument " "9"" of type '" "BigInteger""'");
    } 
    arg9 = static_cast< BigInteger >(val9);
    {
      try {
        result = (MCDiscreteArithmeticAPEnginePtr *)new_MCDiscreteArithmeticAPEnginePtr__SWIG_0((GeneralizedBlackScholesProcessPtr const &)*arg1,(std::string const &)*arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MCDiscreteArithmeticAPEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MCDiscreteArithmeticAPEngine__SWIG_1) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    std::string *arg2 = 0 ;
    bool arg3 ;
    bool arg4 ;
    bool arg5 ;
    intOrNull arg6 ;
    doubleOrNull arg7 ;
    intOrNull arg8 ;
    void *argp1 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    bool val3 ;
    int ecode3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    bool val5 ;
    int ecode5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    int argvi = 0;
    MCDiscreteArithmeticAPEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 8) || (items > 8)) {
      SWIG_croak("Usage: new_MCDiscreteArithmeticAPEngine(process,traits,brownianBridge,antitheticVariate,controlVariate,requiredSamples,requiredTolerance,maxSamples);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MCDiscreteArithmeticAPEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCDiscreteArithmeticAPEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MCDiscreteArithmeticAPEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCDiscreteArithmeticAPEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_MCDiscreteArithmeticAPEngine" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_MCDiscreteArithmeticAPEngine" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_MCDiscreteArithmeticAPEngine" "', argument " "5"" of type '" "bool""'");
    } 
    arg5 = static_cast< bool >(val5);
    {
      res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_intOrNull,  0 );
      if (!SWIG_IsOK(res6)) {
        SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_MCDiscreteArithmeticAPEngine" "', argument " "6"" of type '" "intOrNull""'"); 
      }  
      if (!argp6) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCDiscreteArithmeticAPEngine" "', argument " "6"" of type '" "intOrNull""'");
      } else {
        arg6 = *(reinterpret_cast< intOrNull * >(argp6));
      }
    }
    {
      res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_doubleOrNull,  0 );
      if (!SWIG_IsOK(res7)) {
        SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_MCDiscreteArithmeticAPEngine" "', argument " "7"" of type '" "doubleOrNull""'"); 
      }  
      if (!argp7) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCDiscreteArithmeticAPEngine" "', argument " "7"" of type '" "doubleOrNull""'");
      } else {
        arg7 = *(reinterpret_cast< doubleOrNull * >(argp7));
      }
    }
    {
      res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_intOrNull,  0 );
      if (!SWIG_IsOK(res8)) {
        SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_MCDiscreteArithmeticAPEngine" "', argument " "8"" of type '" "intOrNull""'"); 
      }  
      if (!argp8) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCDiscreteArithmeticAPEngine" "', argument " "8"" of type '" "intOrNull""'");
      } else {
        arg8 = *(reinterpret_cast< intOrNull * >(argp8));
      }
    }
    {
      try {
        result = (MCDiscreteArithmeticAPEnginePtr *)new_MCDiscreteArithmeticAPEnginePtr__SWIG_0((GeneralizedBlackScholesProcessPtr const &)*arg1,(std::string const &)*arg2,arg3,arg4,arg5,arg6,arg7,arg8);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MCDiscreteArithmeticAPEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MCDiscreteArithmeticAPEngine__SWIG_2) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    std::string *arg2 = 0 ;
    bool arg3 ;
    bool arg4 ;
    bool arg5 ;
    intOrNull arg6 ;
    doubleOrNull arg7 ;
    void *argp1 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    bool val3 ;
    int ecode3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    bool val5 ;
    int ecode5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    int argvi = 0;
    MCDiscreteArithmeticAPEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: new_MCDiscreteArithmeticAPEngine(process,traits,brownianBridge,antitheticVariate,controlVariate,requiredSamples,requiredTolerance);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MCDiscreteArithmeticAPEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCDiscreteArithmeticAPEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MCDiscreteArithmeticAPEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCDiscreteArithmeticAPEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_MCDiscreteArithmeticAPEngine" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_MCDiscreteArithmeticAPEngine" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_MCDiscreteArithmeticAPEngine" "', argument " "5"" of type '" "bool""'");
    } 
    arg5 = static_cast< bool >(val5);
    {
      res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_intOrNull,  0 );
      if (!SWIG_IsOK(res6)) {
        SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_MCDiscreteArithmeticAPEngine" "', argument " "6"" of type '" "intOrNull""'"); 
      }  
      if (!argp6) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCDiscreteArithmeticAPEngine" "', argument " "6"" of type '" "intOrNull""'");
      } else {
        arg6 = *(reinterpret_cast< intOrNull * >(argp6));
      }
    }
    {
      res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_doubleOrNull,  0 );
      if (!SWIG_IsOK(res7)) {
        SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_MCDiscreteArithmeticAPEngine" "', argument " "7"" of type '" "doubleOrNull""'"); 
      }  
      if (!argp7) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCDiscreteArithmeticAPEngine" "', argument " "7"" of type '" "doubleOrNull""'");
      } else {
        arg7 = *(reinterpret_cast< doubleOrNull * >(argp7));
      }
    }
    {
      try {
        result = (MCDiscreteArithmeticAPEnginePtr *)new_MCDiscreteArithmeticAPEnginePtr__SWIG_0((GeneralizedBlackScholesProcessPtr const &)*arg1,(std::string const &)*arg2,arg3,arg4,arg5,arg6,arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MCDiscreteArithmeticAPEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MCDiscreteArithmeticAPEngine__SWIG_3) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    std::string *arg2 = 0 ;
    bool arg3 ;
    bool arg4 ;
    bool arg5 ;
    intOrNull arg6 ;
    void *argp1 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    bool val3 ;
    int ecode3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    bool val5 ;
    int ecode5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    int argvi = 0;
    MCDiscreteArithmeticAPEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_MCDiscreteArithmeticAPEngine(process,traits,brownianBridge,antitheticVariate,controlVariate,requiredSamples);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MCDiscreteArithmeticAPEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCDiscreteArithmeticAPEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MCDiscreteArithmeticAPEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCDiscreteArithmeticAPEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_MCDiscreteArithmeticAPEngine" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_MCDiscreteArithmeticAPEngine" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_MCDiscreteArithmeticAPEngine" "', argument " "5"" of type '" "bool""'");
    } 
    arg5 = static_cast< bool >(val5);
    {
      res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_intOrNull,  0 );
      if (!SWIG_IsOK(res6)) {
        SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_MCDiscreteArithmeticAPEngine" "', argument " "6"" of type '" "intOrNull""'"); 
      }  
      if (!argp6) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCDiscreteArithmeticAPEngine" "', argument " "6"" of type '" "intOrNull""'");
      } else {
        arg6 = *(reinterpret_cast< intOrNull * >(argp6));
      }
    }
    {
      try {
        result = (MCDiscreteArithmeticAPEnginePtr *)new_MCDiscreteArithmeticAPEnginePtr__SWIG_0((GeneralizedBlackScholesProcessPtr const &)*arg1,(std::string const &)*arg2,arg3,arg4,arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MCDiscreteArithmeticAPEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MCDiscreteArithmeticAPEngine__SWIG_4) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    std::string *arg2 = 0 ;
    bool arg3 ;
    bool arg4 ;
    bool arg5 ;
    void *argp1 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    bool val3 ;
    int ecode3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    bool val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    MCDiscreteArithmeticAPEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_MCDiscreteArithmeticAPEngine(process,traits,brownianBridge,antitheticVariate,controlVariate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MCDiscreteArithmeticAPEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCDiscreteArithmeticAPEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MCDiscreteArithmeticAPEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCDiscreteArithmeticAPEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_MCDiscreteArithmeticAPEngine" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_MCDiscreteArithmeticAPEngine" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_MCDiscreteArithmeticAPEngine" "', argument " "5"" of type '" "bool""'");
    } 
    arg5 = static_cast< bool >(val5);
    {
      try {
        result = (MCDiscreteArithmeticAPEnginePtr *)new_MCDiscreteArithmeticAPEnginePtr__SWIG_0((GeneralizedBlackScholesProcessPtr const &)*arg1,(std::string const &)*arg2,arg3,arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MCDiscreteArithmeticAPEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MCDiscreteArithmeticAPEngine__SWIG_5) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    std::string *arg2 = 0 ;
    bool arg3 ;
    bool arg4 ;
    void *argp1 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    bool val3 ;
    int ecode3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    MCDiscreteArithmeticAPEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_MCDiscreteArithmeticAPEngine(process,traits,brownianBridge,antitheticVariate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MCDiscreteArithmeticAPEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCDiscreteArithmeticAPEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MCDiscreteArithmeticAPEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCDiscreteArithmeticAPEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_MCDiscreteArithmeticAPEngine" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_MCDiscreteArithmeticAPEngine" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    {
      try {
        result = (MCDiscreteArithmeticAPEnginePtr *)new_MCDiscreteArithmeticAPEnginePtr__SWIG_0((GeneralizedBlackScholesProcessPtr const &)*arg1,(std::string const &)*arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MCDiscreteArithmeticAPEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MCDiscreteArithmeticAPEngine__SWIG_6) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    std::string *arg2 = 0 ;
    bool arg3 ;
    void *argp1 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    MCDiscreteArithmeticAPEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_MCDiscreteArithmeticAPEngine(process,traits,brownianBridge);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MCDiscreteArithmeticAPEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCDiscreteArithmeticAPEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MCDiscreteArithmeticAPEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCDiscreteArithmeticAPEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_MCDiscreteArithmeticAPEngine" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (MCDiscreteArithmeticAPEnginePtr *)new_MCDiscreteArithmeticAPEnginePtr__SWIG_0((GeneralizedBlackScholesProcessPtr const &)*arg1,(std::string const &)*arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MCDiscreteArithmeticAPEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MCDiscreteArithmeticAPEngine__SWIG_7) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    std::string *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    MCDiscreteArithmeticAPEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_MCDiscreteArithmeticAPEngine(process,traits);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MCDiscreteArithmeticAPEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCDiscreteArithmeticAPEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MCDiscreteArithmeticAPEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCDiscreteArithmeticAPEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      try {
        result = (MCDiscreteArithmeticAPEnginePtr *)new_MCDiscreteArithmeticAPEnginePtr__SWIG_0((GeneralizedBlackScholesProcessPtr const &)*arg1,(std::string const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MCDiscreteArithmeticAPEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_new_MCDiscreteArithmeticAPEngine) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_intOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_intOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_doubleOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
    if (items == 8) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_intOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_doubleOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_intOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 7;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_7:
    
    if (items == 9) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_intOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_doubleOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_intOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_long SWIG_PERL_CALL_ARGS_2(ST(8), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 8;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_8:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MCDiscreteArithmeticAPEngine__SWIG_7); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MCDiscreteArithmeticAPEngine__SWIG_6); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MCDiscreteArithmeticAPEngine__SWIG_5); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MCDiscreteArithmeticAPEngine__SWIG_4); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MCDiscreteArithmeticAPEngine__SWIG_3); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MCDiscreteArithmeticAPEngine__SWIG_2); return;
    case 7:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MCDiscreteArithmeticAPEngine__SWIG_1); return;
    case 8:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MCDiscreteArithmeticAPEngine__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_MCDiscreteArithmeticAPEngine'");
  XSRETURN(0);
}


XS(_wrap_delete_MCDiscreteArithmeticAPEngine) {
  {
    MCDiscreteArithmeticAPEnginePtr *arg1 = (MCDiscreteArithmeticAPEnginePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_MCDiscreteArithmeticAPEngine(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_MCDiscreteArithmeticAPEnginePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MCDiscreteArithmeticAPEngine" "', argument " "1"" of type '" "MCDiscreteArithmeticAPEnginePtr *""'"); 
    }
    arg1 = reinterpret_cast< MCDiscreteArithmeticAPEnginePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MCDiscreteArithmeticASEngine__SWIG_0) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    std::string *arg2 = 0 ;
    bool arg3 ;
    bool arg4 ;
    intOrNull arg5 ;
    doubleOrNull arg6 ;
    intOrNull arg7 ;
    BigInteger arg8 ;
    void *argp1 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    bool val3 ;
    int ecode3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    long val8 ;
    int ecode8 = 0 ;
    int argvi = 0;
    MCDiscreteArithmeticASEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 8) || (items > 8)) {
      SWIG_croak("Usage: new_MCDiscreteArithmeticASEngine(process,traits,brownianBridge,antitheticVariate,requiredSamples,requiredTolerance,maxSamples,seed);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MCDiscreteArithmeticASEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCDiscreteArithmeticASEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MCDiscreteArithmeticASEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCDiscreteArithmeticASEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_MCDiscreteArithmeticASEngine" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_MCDiscreteArithmeticASEngine" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    {
      res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_intOrNull,  0 );
      if (!SWIG_IsOK(res5)) {
        SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_MCDiscreteArithmeticASEngine" "', argument " "5"" of type '" "intOrNull""'"); 
      }  
      if (!argp5) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCDiscreteArithmeticASEngine" "', argument " "5"" of type '" "intOrNull""'");
      } else {
        arg5 = *(reinterpret_cast< intOrNull * >(argp5));
      }
    }
    {
      res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_doubleOrNull,  0 );
      if (!SWIG_IsOK(res6)) {
        SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_MCDiscreteArithmeticASEngine" "', argument " "6"" of type '" "doubleOrNull""'"); 
      }  
      if (!argp6) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCDiscreteArithmeticASEngine" "', argument " "6"" of type '" "doubleOrNull""'");
      } else {
        arg6 = *(reinterpret_cast< doubleOrNull * >(argp6));
      }
    }
    {
      res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_intOrNull,  0 );
      if (!SWIG_IsOK(res7)) {
        SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_MCDiscreteArithmeticASEngine" "', argument " "7"" of type '" "intOrNull""'"); 
      }  
      if (!argp7) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCDiscreteArithmeticASEngine" "', argument " "7"" of type '" "intOrNull""'");
      } else {
        arg7 = *(reinterpret_cast< intOrNull * >(argp7));
      }
    }
    ecode8 = SWIG_AsVal_long SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_MCDiscreteArithmeticASEngine" "', argument " "8"" of type '" "BigInteger""'");
    } 
    arg8 = static_cast< BigInteger >(val8);
    {
      try {
        result = (MCDiscreteArithmeticASEnginePtr *)new_MCDiscreteArithmeticASEnginePtr__SWIG_0((GeneralizedBlackScholesProcessPtr const &)*arg1,(std::string const &)*arg2,arg3,arg4,arg5,arg6,arg7,arg8);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MCDiscreteArithmeticASEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MCDiscreteArithmeticASEngine__SWIG_1) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    std::string *arg2 = 0 ;
    bool arg3 ;
    bool arg4 ;
    intOrNull arg5 ;
    doubleOrNull arg6 ;
    intOrNull arg7 ;
    void *argp1 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    bool val3 ;
    int ecode3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    int argvi = 0;
    MCDiscreteArithmeticASEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: new_MCDiscreteArithmeticASEngine(process,traits,brownianBridge,antitheticVariate,requiredSamples,requiredTolerance,maxSamples);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MCDiscreteArithmeticASEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCDiscreteArithmeticASEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MCDiscreteArithmeticASEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCDiscreteArithmeticASEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_MCDiscreteArithmeticASEngine" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_MCDiscreteArithmeticASEngine" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    {
      res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_intOrNull,  0 );
      if (!SWIG_IsOK(res5)) {
        SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_MCDiscreteArithmeticASEngine" "', argument " "5"" of type '" "intOrNull""'"); 
      }  
      if (!argp5) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCDiscreteArithmeticASEngine" "', argument " "5"" of type '" "intOrNull""'");
      } else {
        arg5 = *(reinterpret_cast< intOrNull * >(argp5));
      }
    }
    {
      res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_doubleOrNull,  0 );
      if (!SWIG_IsOK(res6)) {
        SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_MCDiscreteArithmeticASEngine" "', argument " "6"" of type '" "doubleOrNull""'"); 
      }  
      if (!argp6) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCDiscreteArithmeticASEngine" "', argument " "6"" of type '" "doubleOrNull""'");
      } else {
        arg6 = *(reinterpret_cast< doubleOrNull * >(argp6));
      }
    }
    {
      res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_intOrNull,  0 );
      if (!SWIG_IsOK(res7)) {
        SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_MCDiscreteArithmeticASEngine" "', argument " "7"" of type '" "intOrNull""'"); 
      }  
      if (!argp7) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCDiscreteArithmeticASEngine" "', argument " "7"" of type '" "intOrNull""'");
      } else {
        arg7 = *(reinterpret_cast< intOrNull * >(argp7));
      }
    }
    {
      try {
        result = (MCDiscreteArithmeticASEnginePtr *)new_MCDiscreteArithmeticASEnginePtr__SWIG_0((GeneralizedBlackScholesProcessPtr const &)*arg1,(std::string const &)*arg2,arg3,arg4,arg5,arg6,arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MCDiscreteArithmeticASEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MCDiscreteArithmeticASEngine__SWIG_2) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    std::string *arg2 = 0 ;
    bool arg3 ;
    bool arg4 ;
    intOrNull arg5 ;
    doubleOrNull arg6 ;
    void *argp1 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    bool val3 ;
    int ecode3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    int argvi = 0;
    MCDiscreteArithmeticASEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_MCDiscreteArithmeticASEngine(process,traits,brownianBridge,antitheticVariate,requiredSamples,requiredTolerance);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MCDiscreteArithmeticASEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCDiscreteArithmeticASEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MCDiscreteArithmeticASEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCDiscreteArithmeticASEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_MCDiscreteArithmeticASEngine" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_MCDiscreteArithmeticASEngine" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    {
      res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_intOrNull,  0 );
      if (!SWIG_IsOK(res5)) {
        SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_MCDiscreteArithmeticASEngine" "', argument " "5"" of type '" "intOrNull""'"); 
      }  
      if (!argp5) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCDiscreteArithmeticASEngine" "', argument " "5"" of type '" "intOrNull""'");
      } else {
        arg5 = *(reinterpret_cast< intOrNull * >(argp5));
      }
    }
    {
      res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_doubleOrNull,  0 );
      if (!SWIG_IsOK(res6)) {
        SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_MCDiscreteArithmeticASEngine" "', argument " "6"" of type '" "doubleOrNull""'"); 
      }  
      if (!argp6) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCDiscreteArithmeticASEngine" "', argument " "6"" of type '" "doubleOrNull""'");
      } else {
        arg6 = *(reinterpret_cast< doubleOrNull * >(argp6));
      }
    }
    {
      try {
        result = (MCDiscreteArithmeticASEnginePtr *)new_MCDiscreteArithmeticASEnginePtr__SWIG_0((GeneralizedBlackScholesProcessPtr const &)*arg1,(std::string const &)*arg2,arg3,arg4,arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MCDiscreteArithmeticASEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MCDiscreteArithmeticASEngine__SWIG_3) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    std::string *arg2 = 0 ;
    bool arg3 ;
    bool arg4 ;
    intOrNull arg5 ;
    void *argp1 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    bool val3 ;
    int ecode3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int argvi = 0;
    MCDiscreteArithmeticASEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_MCDiscreteArithmeticASEngine(process,traits,brownianBridge,antitheticVariate,requiredSamples);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MCDiscreteArithmeticASEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCDiscreteArithmeticASEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MCDiscreteArithmeticASEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCDiscreteArithmeticASEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_MCDiscreteArithmeticASEngine" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_MCDiscreteArithmeticASEngine" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    {
      res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_intOrNull,  0 );
      if (!SWIG_IsOK(res5)) {
        SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_MCDiscreteArithmeticASEngine" "', argument " "5"" of type '" "intOrNull""'"); 
      }  
      if (!argp5) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCDiscreteArithmeticASEngine" "', argument " "5"" of type '" "intOrNull""'");
      } else {
        arg5 = *(reinterpret_cast< intOrNull * >(argp5));
      }
    }
    {
      try {
        result = (MCDiscreteArithmeticASEnginePtr *)new_MCDiscreteArithmeticASEnginePtr__SWIG_0((GeneralizedBlackScholesProcessPtr const &)*arg1,(std::string const &)*arg2,arg3,arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MCDiscreteArithmeticASEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MCDiscreteArithmeticASEngine__SWIG_4) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    std::string *arg2 = 0 ;
    bool arg3 ;
    bool arg4 ;
    void *argp1 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    bool val3 ;
    int ecode3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    MCDiscreteArithmeticASEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_MCDiscreteArithmeticASEngine(process,traits,brownianBridge,antitheticVariate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MCDiscreteArithmeticASEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCDiscreteArithmeticASEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MCDiscreteArithmeticASEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCDiscreteArithmeticASEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_MCDiscreteArithmeticASEngine" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_MCDiscreteArithmeticASEngine" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    {
      try {
        result = (MCDiscreteArithmeticASEnginePtr *)new_MCDiscreteArithmeticASEnginePtr__SWIG_0((GeneralizedBlackScholesProcessPtr const &)*arg1,(std::string const &)*arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MCDiscreteArithmeticASEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MCDiscreteArithmeticASEngine__SWIG_5) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    std::string *arg2 = 0 ;
    bool arg3 ;
    void *argp1 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    MCDiscreteArithmeticASEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_MCDiscreteArithmeticASEngine(process,traits,brownianBridge);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MCDiscreteArithmeticASEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCDiscreteArithmeticASEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MCDiscreteArithmeticASEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCDiscreteArithmeticASEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_MCDiscreteArithmeticASEngine" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (MCDiscreteArithmeticASEnginePtr *)new_MCDiscreteArithmeticASEnginePtr__SWIG_0((GeneralizedBlackScholesProcessPtr const &)*arg1,(std::string const &)*arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MCDiscreteArithmeticASEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MCDiscreteArithmeticASEngine__SWIG_6) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    std::string *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    MCDiscreteArithmeticASEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_MCDiscreteArithmeticASEngine(process,traits);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MCDiscreteArithmeticASEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCDiscreteArithmeticASEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MCDiscreteArithmeticASEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCDiscreteArithmeticASEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      try {
        result = (MCDiscreteArithmeticASEnginePtr *)new_MCDiscreteArithmeticASEnginePtr__SWIG_0((GeneralizedBlackScholesProcessPtr const &)*arg1,(std::string const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MCDiscreteArithmeticASEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_new_MCDiscreteArithmeticASEngine) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_intOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_intOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_doubleOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_intOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_doubleOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_intOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
    if (items == 8) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_intOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_doubleOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_intOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_long SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 7;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_7:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MCDiscreteArithmeticASEngine__SWIG_6); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MCDiscreteArithmeticASEngine__SWIG_5); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MCDiscreteArithmeticASEngine__SWIG_4); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MCDiscreteArithmeticASEngine__SWIG_3); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MCDiscreteArithmeticASEngine__SWIG_2); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MCDiscreteArithmeticASEngine__SWIG_1); return;
    case 7:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MCDiscreteArithmeticASEngine__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_MCDiscreteArithmeticASEngine'");
  XSRETURN(0);
}


XS(_wrap_delete_MCDiscreteArithmeticASEngine) {
  {
    MCDiscreteArithmeticASEnginePtr *arg1 = (MCDiscreteArithmeticASEnginePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_MCDiscreteArithmeticASEngine(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_MCDiscreteArithmeticASEnginePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MCDiscreteArithmeticASEngine" "', argument " "1"" of type '" "MCDiscreteArithmeticASEnginePtr *""'"); 
    }
    arg1 = reinterpret_cast< MCDiscreteArithmeticASEnginePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MCDiscreteGeometricAPEngine__SWIG_0) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    std::string *arg2 = 0 ;
    bool arg3 ;
    bool arg4 ;
    intOrNull arg5 ;
    doubleOrNull arg6 ;
    intOrNull arg7 ;
    BigInteger arg8 ;
    void *argp1 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    bool val3 ;
    int ecode3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    long val8 ;
    int ecode8 = 0 ;
    int argvi = 0;
    MCDiscreteGeometricAPEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 8) || (items > 8)) {
      SWIG_croak("Usage: new_MCDiscreteGeometricAPEngine(process,traits,brownianBridge,antitheticVariate,requiredSamples,requiredTolerance,maxSamples,seed);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MCDiscreteGeometricAPEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCDiscreteGeometricAPEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MCDiscreteGeometricAPEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCDiscreteGeometricAPEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_MCDiscreteGeometricAPEngine" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_MCDiscreteGeometricAPEngine" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    {
      res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_intOrNull,  0 );
      if (!SWIG_IsOK(res5)) {
        SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_MCDiscreteGeometricAPEngine" "', argument " "5"" of type '" "intOrNull""'"); 
      }  
      if (!argp5) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCDiscreteGeometricAPEngine" "', argument " "5"" of type '" "intOrNull""'");
      } else {
        arg5 = *(reinterpret_cast< intOrNull * >(argp5));
      }
    }
    {
      res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_doubleOrNull,  0 );
      if (!SWIG_IsOK(res6)) {
        SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_MCDiscreteGeometricAPEngine" "', argument " "6"" of type '" "doubleOrNull""'"); 
      }  
      if (!argp6) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCDiscreteGeometricAPEngine" "', argument " "6"" of type '" "doubleOrNull""'");
      } else {
        arg6 = *(reinterpret_cast< doubleOrNull * >(argp6));
      }
    }
    {
      res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_intOrNull,  0 );
      if (!SWIG_IsOK(res7)) {
        SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_MCDiscreteGeometricAPEngine" "', argument " "7"" of type '" "intOrNull""'"); 
      }  
      if (!argp7) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCDiscreteGeometricAPEngine" "', argument " "7"" of type '" "intOrNull""'");
      } else {
        arg7 = *(reinterpret_cast< intOrNull * >(argp7));
      }
    }
    ecode8 = SWIG_AsVal_long SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_MCDiscreteGeometricAPEngine" "', argument " "8"" of type '" "BigInteger""'");
    } 
    arg8 = static_cast< BigInteger >(val8);
    {
      try {
        result = (MCDiscreteGeometricAPEnginePtr *)new_MCDiscreteGeometricAPEnginePtr__SWIG_0((GeneralizedBlackScholesProcessPtr const &)*arg1,(std::string const &)*arg2,arg3,arg4,arg5,arg6,arg7,arg8);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MCDiscreteGeometricAPEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MCDiscreteGeometricAPEngine__SWIG_1) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    std::string *arg2 = 0 ;
    bool arg3 ;
    bool arg4 ;
    intOrNull arg5 ;
    doubleOrNull arg6 ;
    intOrNull arg7 ;
    void *argp1 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    bool val3 ;
    int ecode3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    int argvi = 0;
    MCDiscreteGeometricAPEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: new_MCDiscreteGeometricAPEngine(process,traits,brownianBridge,antitheticVariate,requiredSamples,requiredTolerance,maxSamples);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MCDiscreteGeometricAPEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCDiscreteGeometricAPEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MCDiscreteGeometricAPEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCDiscreteGeometricAPEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_MCDiscreteGeometricAPEngine" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_MCDiscreteGeometricAPEngine" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    {
      res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_intOrNull,  0 );
      if (!SWIG_IsOK(res5)) {
        SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_MCDiscreteGeometricAPEngine" "', argument " "5"" of type '" "intOrNull""'"); 
      }  
      if (!argp5) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCDiscreteGeometricAPEngine" "', argument " "5"" of type '" "intOrNull""'");
      } else {
        arg5 = *(reinterpret_cast< intOrNull * >(argp5));
      }
    }
    {
      res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_doubleOrNull,  0 );
      if (!SWIG_IsOK(res6)) {
        SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_MCDiscreteGeometricAPEngine" "', argument " "6"" of type '" "doubleOrNull""'"); 
      }  
      if (!argp6) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCDiscreteGeometricAPEngine" "', argument " "6"" of type '" "doubleOrNull""'");
      } else {
        arg6 = *(reinterpret_cast< doubleOrNull * >(argp6));
      }
    }
    {
      res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_intOrNull,  0 );
      if (!SWIG_IsOK(res7)) {
        SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_MCDiscreteGeometricAPEngine" "', argument " "7"" of type '" "intOrNull""'"); 
      }  
      if (!argp7) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCDiscreteGeometricAPEngine" "', argument " "7"" of type '" "intOrNull""'");
      } else {
        arg7 = *(reinterpret_cast< intOrNull * >(argp7));
      }
    }
    {
      try {
        result = (MCDiscreteGeometricAPEnginePtr *)new_MCDiscreteGeometricAPEnginePtr__SWIG_0((GeneralizedBlackScholesProcessPtr const &)*arg1,(std::string const &)*arg2,arg3,arg4,arg5,arg6,arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MCDiscreteGeometricAPEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MCDiscreteGeometricAPEngine__SWIG_2) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    std::string *arg2 = 0 ;
    bool arg3 ;
    bool arg4 ;
    intOrNull arg5 ;
    doubleOrNull arg6 ;
    void *argp1 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    bool val3 ;
    int ecode3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    int argvi = 0;
    MCDiscreteGeometricAPEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_MCDiscreteGeometricAPEngine(process,traits,brownianBridge,antitheticVariate,requiredSamples,requiredTolerance);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MCDiscreteGeometricAPEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCDiscreteGeometricAPEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MCDiscreteGeometricAPEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCDiscreteGeometricAPEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_MCDiscreteGeometricAPEngine" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_MCDiscreteGeometricAPEngine" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    {
      res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_intOrNull,  0 );
      if (!SWIG_IsOK(res5)) {
        SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_MCDiscreteGeometricAPEngine" "', argument " "5"" of type '" "intOrNull""'"); 
      }  
      if (!argp5) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCDiscreteGeometricAPEngine" "', argument " "5"" of type '" "intOrNull""'");
      } else {
        arg5 = *(reinterpret_cast< intOrNull * >(argp5));
      }
    }
    {
      res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_doubleOrNull,  0 );
      if (!SWIG_IsOK(res6)) {
        SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_MCDiscreteGeometricAPEngine" "', argument " "6"" of type '" "doubleOrNull""'"); 
      }  
      if (!argp6) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCDiscreteGeometricAPEngine" "', argument " "6"" of type '" "doubleOrNull""'");
      } else {
        arg6 = *(reinterpret_cast< doubleOrNull * >(argp6));
      }
    }
    {
      try {
        result = (MCDiscreteGeometricAPEnginePtr *)new_MCDiscreteGeometricAPEnginePtr__SWIG_0((GeneralizedBlackScholesProcessPtr const &)*arg1,(std::string const &)*arg2,arg3,arg4,arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MCDiscreteGeometricAPEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MCDiscreteGeometricAPEngine__SWIG_3) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    std::string *arg2 = 0 ;
    bool arg3 ;
    bool arg4 ;
    intOrNull arg5 ;
    void *argp1 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    bool val3 ;
    int ecode3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int argvi = 0;
    MCDiscreteGeometricAPEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_MCDiscreteGeometricAPEngine(process,traits,brownianBridge,antitheticVariate,requiredSamples);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MCDiscreteGeometricAPEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCDiscreteGeometricAPEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MCDiscreteGeometricAPEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCDiscreteGeometricAPEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_MCDiscreteGeometricAPEngine" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_MCDiscreteGeometricAPEngine" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    {
      res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_intOrNull,  0 );
      if (!SWIG_IsOK(res5)) {
        SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_MCDiscreteGeometricAPEngine" "', argument " "5"" of type '" "intOrNull""'"); 
      }  
      if (!argp5) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCDiscreteGeometricAPEngine" "', argument " "5"" of type '" "intOrNull""'");
      } else {
        arg5 = *(reinterpret_cast< intOrNull * >(argp5));
      }
    }
    {
      try {
        result = (MCDiscreteGeometricAPEnginePtr *)new_MCDiscreteGeometricAPEnginePtr__SWIG_0((GeneralizedBlackScholesProcessPtr const &)*arg1,(std::string const &)*arg2,arg3,arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MCDiscreteGeometricAPEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MCDiscreteGeometricAPEngine__SWIG_4) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    std::string *arg2 = 0 ;
    bool arg3 ;
    bool arg4 ;
    void *argp1 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    bool val3 ;
    int ecode3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    MCDiscreteGeometricAPEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_MCDiscreteGeometricAPEngine(process,traits,brownianBridge,antitheticVariate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MCDiscreteGeometricAPEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCDiscreteGeometricAPEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MCDiscreteGeometricAPEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCDiscreteGeometricAPEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_MCDiscreteGeometricAPEngine" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_MCDiscreteGeometricAPEngine" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    {
      try {
        result = (MCDiscreteGeometricAPEnginePtr *)new_MCDiscreteGeometricAPEnginePtr__SWIG_0((GeneralizedBlackScholesProcessPtr const &)*arg1,(std::string const &)*arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MCDiscreteGeometricAPEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MCDiscreteGeometricAPEngine__SWIG_5) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    std::string *arg2 = 0 ;
    bool arg3 ;
    void *argp1 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    MCDiscreteGeometricAPEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_MCDiscreteGeometricAPEngine(process,traits,brownianBridge);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MCDiscreteGeometricAPEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCDiscreteGeometricAPEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MCDiscreteGeometricAPEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCDiscreteGeometricAPEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_MCDiscreteGeometricAPEngine" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (MCDiscreteGeometricAPEnginePtr *)new_MCDiscreteGeometricAPEnginePtr__SWIG_0((GeneralizedBlackScholesProcessPtr const &)*arg1,(std::string const &)*arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MCDiscreteGeometricAPEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MCDiscreteGeometricAPEngine__SWIG_6) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    std::string *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    MCDiscreteGeometricAPEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_MCDiscreteGeometricAPEngine(process,traits);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MCDiscreteGeometricAPEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCDiscreteGeometricAPEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MCDiscreteGeometricAPEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCDiscreteGeometricAPEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      try {
        result = (MCDiscreteGeometricAPEnginePtr *)new_MCDiscreteGeometricAPEnginePtr__SWIG_0((GeneralizedBlackScholesProcessPtr const &)*arg1,(std::string const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MCDiscreteGeometricAPEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_new_MCDiscreteGeometricAPEngine) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_intOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_intOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_doubleOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_intOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_doubleOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_intOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
    if (items == 8) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_intOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_doubleOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_intOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_long SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 7;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_7:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MCDiscreteGeometricAPEngine__SWIG_6); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MCDiscreteGeometricAPEngine__SWIG_5); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MCDiscreteGeometricAPEngine__SWIG_4); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MCDiscreteGeometricAPEngine__SWIG_3); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MCDiscreteGeometricAPEngine__SWIG_2); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MCDiscreteGeometricAPEngine__SWIG_1); return;
    case 7:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MCDiscreteGeometricAPEngine__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_MCDiscreteGeometricAPEngine'");
  XSRETURN(0);
}


XS(_wrap_delete_MCDiscreteGeometricAPEngine) {
  {
    MCDiscreteGeometricAPEnginePtr *arg1 = (MCDiscreteGeometricAPEnginePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_MCDiscreteGeometricAPEngine(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_MCDiscreteGeometricAPEnginePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MCDiscreteGeometricAPEngine" "', argument " "1"" of type '" "MCDiscreteGeometricAPEnginePtr *""'"); 
    }
    arg1 = reinterpret_cast< MCDiscreteGeometricAPEnginePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_VarianceGammaEngine) {
  {
    VarianceGammaProcessPtr *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    VarianceGammaEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_VarianceGammaEngine(process);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_VarianceGammaProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_VarianceGammaEngine" "', argument " "1"" of type '" "VarianceGammaProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_VarianceGammaEngine" "', argument " "1"" of type '" "VarianceGammaProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< VarianceGammaProcessPtr * >(argp1);
    {
      try {
        result = (VarianceGammaEnginePtr *)new_VarianceGammaEnginePtr((VarianceGammaProcessPtr const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VarianceGammaEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_VarianceGammaEngine) {
  {
    VarianceGammaEnginePtr *arg1 = (VarianceGammaEnginePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_VarianceGammaEngine(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_VarianceGammaEnginePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_VarianceGammaEngine" "', argument " "1"" of type '" "VarianceGammaEnginePtr *""'"); 
    }
    arg1 = reinterpret_cast< VarianceGammaEnginePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FFTVarianceGammaEngine__SWIG_0) {
  {
    VarianceGammaProcessPtr *arg1 = 0 ;
    Real arg2 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    FFTVarianceGammaEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_FFTVarianceGammaEngine(process,logStrikeSpacing);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_VarianceGammaProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FFTVarianceGammaEngine" "', argument " "1"" of type '" "VarianceGammaProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FFTVarianceGammaEngine" "', argument " "1"" of type '" "VarianceGammaProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< VarianceGammaProcessPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FFTVarianceGammaEngine" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (FFTVarianceGammaEnginePtr *)new_FFTVarianceGammaEnginePtr__SWIG_0((VarianceGammaProcessPtr const &)*arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FFTVarianceGammaEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FFTVarianceGammaEngine__SWIG_1) {
  {
    VarianceGammaProcessPtr *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    FFTVarianceGammaEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_FFTVarianceGammaEngine(process);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_VarianceGammaProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FFTVarianceGammaEngine" "', argument " "1"" of type '" "VarianceGammaProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FFTVarianceGammaEngine" "', argument " "1"" of type '" "VarianceGammaProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< VarianceGammaProcessPtr * >(argp1);
    {
      try {
        result = (FFTVarianceGammaEnginePtr *)new_FFTVarianceGammaEnginePtr__SWIG_0((VarianceGammaProcessPtr const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FFTVarianceGammaEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FFTVarianceGammaEngine) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_VarianceGammaProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_VarianceGammaProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FFTVarianceGammaEngine__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FFTVarianceGammaEngine__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_FFTVarianceGammaEngine'");
  XSRETURN(0);
}


XS(_wrap_FFTVarianceGammaEngine_precalculate) {
  {
    FFTVarianceGammaEnginePtr *arg1 = (FFTVarianceGammaEnginePtr *) 0 ;
    std::vector< boost::shared_ptr< Instrument > > *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    std::vector< boost::shared_ptr< Instrument > > temp2 ;
    std::vector< boost::shared_ptr< Instrument > > *v2 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: FFTVarianceGammaEngine_precalculate(self,optionList);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_FFTVarianceGammaEnginePtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FFTVarianceGammaEngine_precalculate" "', argument " "1"" of type '" "FFTVarianceGammaEnginePtr *""'"); 
    }
    arg1 = reinterpret_cast< FFTVarianceGammaEnginePtr * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Instrument_t_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of FFTVarianceGammaEngine_precalculate. "
          "Expected an array of " "boost::shared_ptr< Instrument >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< Instrument >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_Instrument_t,0) != -1) {
            temp2.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 2 of "
              "FFTVarianceGammaEngine_precalculate. "
              "Expected an array of " "boost::shared_ptr< Instrument >");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of FFTVarianceGammaEngine_precalculate. "
          "Expected an array of " "boost::shared_ptr< Instrument >");
      }
    }
    {
      try {
        FFTVarianceGammaEnginePtr_precalculate(arg1,(std::vector< boost::shared_ptr< Instrument > > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_FFTVarianceGammaEngine) {
  {
    FFTVarianceGammaEnginePtr *arg1 = (FFTVarianceGammaEnginePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_FFTVarianceGammaEngine(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_FFTVarianceGammaEnginePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FFTVarianceGammaEngine" "', argument " "1"" of type '" "FFTVarianceGammaEnginePtr *""'"); 
    }
    arg1 = reinterpret_cast< FFTVarianceGammaEnginePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DoubleBarrierOption) {
  {
    DoubleBarrier::Type arg1 ;
    Real arg2 ;
    Real arg3 ;
    Real arg4 ;
    boost::shared_ptr< Payoff > *arg5 = 0 ;
    boost::shared_ptr< Exercise > *arg6 = 0 ;
    int val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    int argvi = 0;
    DoubleBarrierOptionPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_DoubleBarrierOption(barrierType,barrier_lo,barrier_hi,rebate,payoff,exercise);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_DoubleBarrierOption" "', argument " "1"" of type '" "DoubleBarrier::Type""'");
    } 
    arg1 = static_cast< DoubleBarrier::Type >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_DoubleBarrierOption" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_DoubleBarrierOption" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_DoubleBarrierOption" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_boost__shared_ptrT_Payoff_t,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_DoubleBarrierOption" "', argument " "5"" of type '" "boost::shared_ptr< Payoff > const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DoubleBarrierOption" "', argument " "5"" of type '" "boost::shared_ptr< Payoff > const &""'"); 
    }
    arg5 = reinterpret_cast< boost::shared_ptr< Payoff > * >(argp5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_boost__shared_ptrT_Exercise_t,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_DoubleBarrierOption" "', argument " "6"" of type '" "boost::shared_ptr< Exercise > const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DoubleBarrierOption" "', argument " "6"" of type '" "boost::shared_ptr< Exercise > const &""'"); 
    }
    arg6 = reinterpret_cast< boost::shared_ptr< Exercise > * >(argp6);
    {
      try {
        result = (DoubleBarrierOptionPtr *)new_DoubleBarrierOptionPtr(arg1,arg2,arg3,arg4,(boost::shared_ptr< Payoff > const &)*arg5,(boost::shared_ptr< Exercise > const &)*arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DoubleBarrierOptionPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_DoubleBarrierOption_delta) {
  {
    DoubleBarrierOptionPtr *arg1 = (DoubleBarrierOptionPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DoubleBarrierOption_delta(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_DoubleBarrierOptionPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleBarrierOption_delta" "', argument " "1"" of type '" "DoubleBarrierOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< DoubleBarrierOptionPtr * >(argp1);
    {
      try {
        result = (Real)DoubleBarrierOptionPtr_delta(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_DoubleBarrierOption_gamma) {
  {
    DoubleBarrierOptionPtr *arg1 = (DoubleBarrierOptionPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DoubleBarrierOption_gamma(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_DoubleBarrierOptionPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleBarrierOption_gamma" "', argument " "1"" of type '" "DoubleBarrierOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< DoubleBarrierOptionPtr * >(argp1);
    {
      try {
        result = (Real)DoubleBarrierOptionPtr_gamma(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_DoubleBarrierOption_theta) {
  {
    DoubleBarrierOptionPtr *arg1 = (DoubleBarrierOptionPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DoubleBarrierOption_theta(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_DoubleBarrierOptionPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleBarrierOption_theta" "', argument " "1"" of type '" "DoubleBarrierOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< DoubleBarrierOptionPtr * >(argp1);
    {
      try {
        result = (Real)DoubleBarrierOptionPtr_theta(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_DoubleBarrierOption_thetaPerDay) {
  {
    DoubleBarrierOptionPtr *arg1 = (DoubleBarrierOptionPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DoubleBarrierOption_thetaPerDay(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_DoubleBarrierOptionPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleBarrierOption_thetaPerDay" "', argument " "1"" of type '" "DoubleBarrierOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< DoubleBarrierOptionPtr * >(argp1);
    {
      try {
        result = (Real)DoubleBarrierOptionPtr_thetaPerDay(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_DoubleBarrierOption_vega) {
  {
    DoubleBarrierOptionPtr *arg1 = (DoubleBarrierOptionPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DoubleBarrierOption_vega(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_DoubleBarrierOptionPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleBarrierOption_vega" "', argument " "1"" of type '" "DoubleBarrierOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< DoubleBarrierOptionPtr * >(argp1);
    {
      try {
        result = (Real)DoubleBarrierOptionPtr_vega(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_DoubleBarrierOption_rho) {
  {
    DoubleBarrierOptionPtr *arg1 = (DoubleBarrierOptionPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DoubleBarrierOption_rho(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_DoubleBarrierOptionPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleBarrierOption_rho" "', argument " "1"" of type '" "DoubleBarrierOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< DoubleBarrierOptionPtr * >(argp1);
    {
      try {
        result = (Real)DoubleBarrierOptionPtr_rho(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_DoubleBarrierOption_dividendRho) {
  {
    DoubleBarrierOptionPtr *arg1 = (DoubleBarrierOptionPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DoubleBarrierOption_dividendRho(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_DoubleBarrierOptionPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleBarrierOption_dividendRho" "', argument " "1"" of type '" "DoubleBarrierOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< DoubleBarrierOptionPtr * >(argp1);
    {
      try {
        result = (Real)DoubleBarrierOptionPtr_dividendRho(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_DoubleBarrierOption_strikeSensitivity) {
  {
    DoubleBarrierOptionPtr *arg1 = (DoubleBarrierOptionPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DoubleBarrierOption_strikeSensitivity(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_DoubleBarrierOptionPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleBarrierOption_strikeSensitivity" "', argument " "1"" of type '" "DoubleBarrierOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< DoubleBarrierOptionPtr * >(argp1);
    {
      try {
        result = (Real)DoubleBarrierOptionPtr_strikeSensitivity(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_DoubleBarrierOption) {
  {
    DoubleBarrierOptionPtr *arg1 = (DoubleBarrierOptionPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_DoubleBarrierOption(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_DoubleBarrierOptionPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DoubleBarrierOption" "', argument " "1"" of type '" "DoubleBarrierOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< DoubleBarrierOptionPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_QuantoDoubleBarrierOption) {
  {
    DoubleBarrier::Type arg1 ;
    Real arg2 ;
    Real arg3 ;
    Real arg4 ;
    boost::shared_ptr< Payoff > *arg5 = 0 ;
    boost::shared_ptr< Exercise > *arg6 = 0 ;
    int val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    int argvi = 0;
    QuantoDoubleBarrierOptionPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_QuantoDoubleBarrierOption(barrierType,barrier_lo,barrier_hi,rebate,payoff,exercise);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_QuantoDoubleBarrierOption" "', argument " "1"" of type '" "DoubleBarrier::Type""'");
    } 
    arg1 = static_cast< DoubleBarrier::Type >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_QuantoDoubleBarrierOption" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_QuantoDoubleBarrierOption" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_QuantoDoubleBarrierOption" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_boost__shared_ptrT_Payoff_t,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_QuantoDoubleBarrierOption" "', argument " "5"" of type '" "boost::shared_ptr< Payoff > const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_QuantoDoubleBarrierOption" "', argument " "5"" of type '" "boost::shared_ptr< Payoff > const &""'"); 
    }
    arg5 = reinterpret_cast< boost::shared_ptr< Payoff > * >(argp5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_boost__shared_ptrT_Exercise_t,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_QuantoDoubleBarrierOption" "', argument " "6"" of type '" "boost::shared_ptr< Exercise > const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_QuantoDoubleBarrierOption" "', argument " "6"" of type '" "boost::shared_ptr< Exercise > const &""'"); 
    }
    arg6 = reinterpret_cast< boost::shared_ptr< Exercise > * >(argp6);
    {
      try {
        result = (QuantoDoubleBarrierOptionPtr *)new_QuantoDoubleBarrierOptionPtr(arg1,arg2,arg3,arg4,(boost::shared_ptr< Payoff > const &)*arg5,(boost::shared_ptr< Exercise > const &)*arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_QuantoDoubleBarrierOptionPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_QuantoDoubleBarrierOption_qvega) {
  {
    QuantoDoubleBarrierOptionPtr *arg1 = (QuantoDoubleBarrierOptionPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: QuantoDoubleBarrierOption_qvega(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantoDoubleBarrierOptionPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "QuantoDoubleBarrierOption_qvega" "', argument " "1"" of type '" "QuantoDoubleBarrierOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< QuantoDoubleBarrierOptionPtr * >(argp1);
    {
      try {
        result = (Real)QuantoDoubleBarrierOptionPtr_qvega(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_QuantoDoubleBarrierOption_qrho) {
  {
    QuantoDoubleBarrierOptionPtr *arg1 = (QuantoDoubleBarrierOptionPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: QuantoDoubleBarrierOption_qrho(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantoDoubleBarrierOptionPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "QuantoDoubleBarrierOption_qrho" "', argument " "1"" of type '" "QuantoDoubleBarrierOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< QuantoDoubleBarrierOptionPtr * >(argp1);
    {
      try {
        result = (Real)QuantoDoubleBarrierOptionPtr_qrho(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_QuantoDoubleBarrierOption_qlambda) {
  {
    QuantoDoubleBarrierOptionPtr *arg1 = (QuantoDoubleBarrierOptionPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: QuantoDoubleBarrierOption_qlambda(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantoDoubleBarrierOptionPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "QuantoDoubleBarrierOption_qlambda" "', argument " "1"" of type '" "QuantoDoubleBarrierOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< QuantoDoubleBarrierOptionPtr * >(argp1);
    {
      try {
        result = (Real)QuantoDoubleBarrierOptionPtr_qlambda(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_QuantoDoubleBarrierOption) {
  {
    QuantoDoubleBarrierOptionPtr *arg1 = (QuantoDoubleBarrierOptionPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_QuantoDoubleBarrierOption(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_QuantoDoubleBarrierOptionPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_QuantoDoubleBarrierOption" "', argument " "1"" of type '" "QuantoDoubleBarrierOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< QuantoDoubleBarrierOptionPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_AnalyticDoubleBarrierEngine__SWIG_0) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    int arg2 ;
    void *argp1 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    AnalyticDoubleBarrierEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_AnalyticDoubleBarrierEngine(process,series);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_AnalyticDoubleBarrierEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AnalyticDoubleBarrierEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_AnalyticDoubleBarrierEngine" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    {
      try {
        result = (AnalyticDoubleBarrierEnginePtr *)new_AnalyticDoubleBarrierEnginePtr__SWIG_0((GeneralizedBlackScholesProcessPtr const &)*arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_AnalyticDoubleBarrierEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_AnalyticDoubleBarrierEngine__SWIG_1) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    AnalyticDoubleBarrierEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_AnalyticDoubleBarrierEngine(process);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_AnalyticDoubleBarrierEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AnalyticDoubleBarrierEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    {
      try {
        result = (AnalyticDoubleBarrierEnginePtr *)new_AnalyticDoubleBarrierEnginePtr__SWIG_0((GeneralizedBlackScholesProcessPtr const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_AnalyticDoubleBarrierEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_AnalyticDoubleBarrierEngine) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_AnalyticDoubleBarrierEngine__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_AnalyticDoubleBarrierEngine__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_AnalyticDoubleBarrierEngine'");
  XSRETURN(0);
}


XS(_wrap_delete_AnalyticDoubleBarrierEngine) {
  {
    AnalyticDoubleBarrierEnginePtr *arg1 = (AnalyticDoubleBarrierEnginePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_AnalyticDoubleBarrierEngine(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_AnalyticDoubleBarrierEnginePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_AnalyticDoubleBarrierEngine" "', argument " "1"" of type '" "AnalyticDoubleBarrierEnginePtr *""'"); 
    }
    arg1 = reinterpret_cast< AnalyticDoubleBarrierEnginePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_WulinYongDoubleBarrierEngine__SWIG_0) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    int arg2 ;
    void *argp1 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    WulinYongDoubleBarrierEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_WulinYongDoubleBarrierEngine(process,series);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_WulinYongDoubleBarrierEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_WulinYongDoubleBarrierEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_WulinYongDoubleBarrierEngine" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    {
      try {
        result = (WulinYongDoubleBarrierEnginePtr *)new_WulinYongDoubleBarrierEnginePtr__SWIG_0((GeneralizedBlackScholesProcessPtr const &)*arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_WulinYongDoubleBarrierEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_WulinYongDoubleBarrierEngine__SWIG_1) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    WulinYongDoubleBarrierEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_WulinYongDoubleBarrierEngine(process);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_WulinYongDoubleBarrierEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_WulinYongDoubleBarrierEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    {
      try {
        result = (WulinYongDoubleBarrierEnginePtr *)new_WulinYongDoubleBarrierEnginePtr__SWIG_0((GeneralizedBlackScholesProcessPtr const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_WulinYongDoubleBarrierEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_WulinYongDoubleBarrierEngine) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_WulinYongDoubleBarrierEngine__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_WulinYongDoubleBarrierEngine__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_WulinYongDoubleBarrierEngine'");
  XSRETURN(0);
}


XS(_wrap_delete_WulinYongDoubleBarrierEngine) {
  {
    WulinYongDoubleBarrierEnginePtr *arg1 = (WulinYongDoubleBarrierEnginePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_WulinYongDoubleBarrierEngine(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_WulinYongDoubleBarrierEnginePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_WulinYongDoubleBarrierEngine" "', argument " "1"" of type '" "WulinYongDoubleBarrierEnginePtr *""'"); 
    }
    arg1 = reinterpret_cast< WulinYongDoubleBarrierEnginePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_DeltaVolQuote___deref__) {
  {
    boost::shared_ptr< DeltaVolQuote > *arg1 = (boost::shared_ptr< DeltaVolQuote > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    DeltaVolQuote *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DeltaVolQuote___deref__(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_DeltaVolQuote_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DeltaVolQuote___deref__" "', argument " "1"" of type '" "boost::shared_ptr< DeltaVolQuote > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< DeltaVolQuote > * >(argp1);
    {
      try {
        result = (DeltaVolQuote *)(arg1)->operator ->();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DeltaVolQuote, 0 | 0); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_DeltaVolQuote_isNull) {
  {
    boost::shared_ptr< DeltaVolQuote > *arg1 = (boost::shared_ptr< DeltaVolQuote > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DeltaVolQuote_isNull(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_DeltaVolQuote_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DeltaVolQuote_isNull" "', argument " "1"" of type '" "boost::shared_ptr< DeltaVolQuote > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< DeltaVolQuote > * >(argp1);
    {
      try {
        result = (bool)boost_shared_ptr_Sl_DeltaVolQuote_Sg__isNull(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_DeltaVolQuote_asObservable) {
  {
    boost::shared_ptr< DeltaVolQuote > *arg1 = (boost::shared_ptr< DeltaVolQuote > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    boost::shared_ptr< Observable > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DeltaVolQuote_asObservable(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_DeltaVolQuote_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DeltaVolQuote_asObservable" "', argument " "1"" of type '" "boost::shared_ptr< DeltaVolQuote > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< DeltaVolQuote > * >(argp1);
    {
      try {
        result = boost_shared_ptr_Sl_DeltaVolQuote_Sg__asObservable(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new boost::shared_ptr< Observable >(static_cast< const boost::shared_ptr< Observable >& >(result))), SWIGTYPE_p_boost__shared_ptrT_Observable_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DeltaVolQuote__SWIG_0) {
  {
    Real arg1 ;
    Handle< Quote > *arg2 = 0 ;
    Time arg3 ;
    DeltaVolQuote::DeltaType arg4 ;
    double val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    boost::shared_ptr< DeltaVolQuote > *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_DeltaVolQuote(delta,vol,maturity,deltaType);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_DeltaVolQuote" "', argument " "1"" of type '" "Real""'");
    } 
    arg1 = static_cast< Real >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_DeltaVolQuote" "', argument " "2"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DeltaVolQuote" "', argument " "2"" of type '" "Handle< Quote > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< Quote > * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_DeltaVolQuote" "', argument " "3"" of type '" "Time""'");
    } 
    arg3 = static_cast< Time >(val3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_DeltaVolQuote" "', argument " "4"" of type '" "DeltaVolQuote::DeltaType""'");
    } 
    arg4 = static_cast< DeltaVolQuote::DeltaType >(val4);
    {
      try {
        result = (boost::shared_ptr< DeltaVolQuote > *)new_boost_shared_ptr_Sl_DeltaVolQuote_Sg___SWIG_0(arg1,(Handle< Quote > const &)*arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_boost__shared_ptrT_DeltaVolQuote_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DeltaVolQuote__SWIG_1) {
  {
    Handle< Quote > *arg1 = 0 ;
    DeltaVolQuote::DeltaType arg2 ;
    Time arg3 ;
    DeltaVolQuote::AtmType arg4 ;
    void *argp1 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    boost::shared_ptr< DeltaVolQuote > *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_DeltaVolQuote(vol,deltaType,maturity,atmType);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DeltaVolQuote" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DeltaVolQuote" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< Quote > * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_DeltaVolQuote" "', argument " "2"" of type '" "DeltaVolQuote::DeltaType""'");
    } 
    arg2 = static_cast< DeltaVolQuote::DeltaType >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_DeltaVolQuote" "', argument " "3"" of type '" "Time""'");
    } 
    arg3 = static_cast< Time >(val3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_DeltaVolQuote" "', argument " "4"" of type '" "DeltaVolQuote::AtmType""'");
    } 
    arg4 = static_cast< DeltaVolQuote::AtmType >(val4);
    {
      try {
        result = (boost::shared_ptr< DeltaVolQuote > *)new_boost_shared_ptr_Sl_DeltaVolQuote_Sg___SWIG_1((Handle< Quote > const &)*arg1,arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_boost__shared_ptrT_DeltaVolQuote_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DeltaVolQuote) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DeltaVolQuote__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DeltaVolQuote__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_DeltaVolQuote'");
  XSRETURN(0);
}


XS(_wrap_delete_DeltaVolQuote) {
  {
    boost::shared_ptr< DeltaVolQuote > *arg1 = (boost::shared_ptr< DeltaVolQuote > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_DeltaVolQuote(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_DeltaVolQuote_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DeltaVolQuote" "', argument " "1"" of type '" "boost::shared_ptr< DeltaVolQuote > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< DeltaVolQuote > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_DeltaVolQuote_value) {
  {
    boost::shared_ptr< DeltaVolQuote > *arg1 = (boost::shared_ptr< DeltaVolQuote > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DeltaVolQuote_value(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_DeltaVolQuote_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DeltaVolQuote_value" "', argument " "1"" of type '" "boost::shared_ptr< DeltaVolQuote > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< DeltaVolQuote > * >(argp1);
    {
      try {
        result = (Real)(*arg1)->value();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DeltaVolQuoteHandle__SWIG_0) {
  {
    boost::shared_ptr< DeltaVolQuote > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Handle< DeltaVolQuote > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_DeltaVolQuoteHandle(boost::shared_ptr< DeltaVolQuote > const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_DeltaVolQuote_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DeltaVolQuoteHandle" "', argument " "1"" of type '" "boost::shared_ptr< DeltaVolQuote > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DeltaVolQuoteHandle" "', argument " "1"" of type '" "boost::shared_ptr< DeltaVolQuote > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< DeltaVolQuote > * >(argp1);
    {
      try {
        result = (Handle< DeltaVolQuote > *)new Handle< DeltaVolQuote >((boost::shared_ptr< DeltaVolQuote > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_HandleT_DeltaVolQuote_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DeltaVolQuoteHandle__SWIG_1) {
  {
    int argvi = 0;
    Handle< DeltaVolQuote > *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_DeltaVolQuoteHandle();");
    }
    {
      try {
        result = (Handle< DeltaVolQuote > *)new Handle< DeltaVolQuote >();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_HandleT_DeltaVolQuote_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_DeltaVolQuoteHandle) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_DeltaVolQuote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DeltaVolQuoteHandle__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DeltaVolQuoteHandle__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_DeltaVolQuoteHandle'");
  XSRETURN(0);
}


XS(_wrap_DeltaVolQuoteHandle___deref__) {
  {
    Handle< DeltaVolQuote > *arg1 = (Handle< DeltaVolQuote > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    SwigValueWrapper< boost::shared_ptr< DeltaVolQuote > > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DeltaVolQuoteHandle___deref__(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_DeltaVolQuote_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DeltaVolQuoteHandle___deref__" "', argument " "1"" of type '" "Handle< DeltaVolQuote > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< DeltaVolQuote > * >(argp1);
    {
      try {
        result = (arg1)->operator ->();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new boost::shared_ptr< DeltaVolQuote >(static_cast< const boost::shared_ptr< DeltaVolQuote >& >(result))), SWIGTYPE_p_boost__shared_ptrT_DeltaVolQuote_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_DeltaVolQuoteHandle_empty) {
  {
    Handle< DeltaVolQuote > *arg1 = (Handle< DeltaVolQuote > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DeltaVolQuoteHandle_empty(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_DeltaVolQuote_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DeltaVolQuoteHandle_empty" "', argument " "1"" of type '" "Handle< DeltaVolQuote > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< DeltaVolQuote > * >(argp1);
    {
      try {
        result = (bool)(arg1)->empty();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_DeltaVolQuoteHandle_asObservable) {
  {
    Handle< DeltaVolQuote > *arg1 = (Handle< DeltaVolQuote > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    boost::shared_ptr< Observable > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DeltaVolQuoteHandle_asObservable(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_DeltaVolQuote_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DeltaVolQuoteHandle_asObservable" "', argument " "1"" of type '" "Handle< DeltaVolQuote > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< DeltaVolQuote > * >(argp1);
    {
      try {
        result = Handle_Sl_DeltaVolQuote_Sg__asObservable(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new boost::shared_ptr< Observable >(static_cast< const boost::shared_ptr< Observable >& >(result))), SWIGTYPE_p_boost__shared_ptrT_Observable_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_DeltaVolQuoteHandle) {
  {
    Handle< DeltaVolQuote > *arg1 = (Handle< DeltaVolQuote > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_DeltaVolQuoteHandle(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_DeltaVolQuote_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DeltaVolQuoteHandle" "', argument " "1"" of type '" "Handle< DeltaVolQuote > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< DeltaVolQuote > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_DeltaVolQuoteHandle_value) {
  {
    Handle< DeltaVolQuote > *arg1 = (Handle< DeltaVolQuote > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DeltaVolQuoteHandle_value(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_DeltaVolQuote_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DeltaVolQuoteHandle_value" "', argument " "1"" of type '" "Handle< DeltaVolQuote > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< DeltaVolQuote > * >(argp1);
    {
      try {
        result = (Real)(*arg1)->value();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_RelinkableDeltaVolQuoteHandle__SWIG_0) {
  {
    boost::shared_ptr< DeltaVolQuote > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    RelinkableHandle< DeltaVolQuote > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_RelinkableDeltaVolQuoteHandle(boost::shared_ptr< DeltaVolQuote > const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_DeltaVolQuote_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_RelinkableDeltaVolQuoteHandle" "', argument " "1"" of type '" "boost::shared_ptr< DeltaVolQuote > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_RelinkableDeltaVolQuoteHandle" "', argument " "1"" of type '" "boost::shared_ptr< DeltaVolQuote > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< DeltaVolQuote > * >(argp1);
    {
      try {
        result = (RelinkableHandle< DeltaVolQuote > *)new RelinkableHandle< DeltaVolQuote >((boost::shared_ptr< DeltaVolQuote > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_RelinkableHandleT_DeltaVolQuote_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_RelinkableDeltaVolQuoteHandle__SWIG_1) {
  {
    int argvi = 0;
    RelinkableHandle< DeltaVolQuote > *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_RelinkableDeltaVolQuoteHandle();");
    }
    {
      try {
        result = (RelinkableHandle< DeltaVolQuote > *)new RelinkableHandle< DeltaVolQuote >();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_RelinkableHandleT_DeltaVolQuote_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_RelinkableDeltaVolQuoteHandle) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_DeltaVolQuote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_RelinkableDeltaVolQuoteHandle__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_RelinkableDeltaVolQuoteHandle__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_RelinkableDeltaVolQuoteHandle'");
  XSRETURN(0);
}


XS(_wrap_RelinkableDeltaVolQuoteHandle_linkTo) {
  {
    RelinkableHandle< DeltaVolQuote > *arg1 = (RelinkableHandle< DeltaVolQuote > *) 0 ;
    boost::shared_ptr< DeltaVolQuote > *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: RelinkableDeltaVolQuoteHandle_linkTo(self,boost::shared_ptr< DeltaVolQuote > const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_RelinkableHandleT_DeltaVolQuote_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RelinkableDeltaVolQuoteHandle_linkTo" "', argument " "1"" of type '" "RelinkableHandle< DeltaVolQuote > *""'"); 
    }
    arg1 = reinterpret_cast< RelinkableHandle< DeltaVolQuote > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_boost__shared_ptrT_DeltaVolQuote_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "RelinkableDeltaVolQuoteHandle_linkTo" "', argument " "2"" of type '" "boost::shared_ptr< DeltaVolQuote > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "RelinkableDeltaVolQuoteHandle_linkTo" "', argument " "2"" of type '" "boost::shared_ptr< DeltaVolQuote > const &""'"); 
    }
    arg2 = reinterpret_cast< boost::shared_ptr< DeltaVolQuote > * >(argp2);
    {
      try {
        (arg1)->linkTo((boost::shared_ptr< DeltaVolQuote > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_RelinkableDeltaVolQuoteHandle) {
  {
    RelinkableHandle< DeltaVolQuote > *arg1 = (RelinkableHandle< DeltaVolQuote > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_RelinkableDeltaVolQuoteHandle(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_RelinkableHandleT_DeltaVolQuote_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_RelinkableDeltaVolQuoteHandle" "', argument " "1"" of type '" "RelinkableHandle< DeltaVolQuote > *""'"); 
    }
    arg1 = reinterpret_cast< RelinkableHandle< DeltaVolQuote > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_VannaVolgaDoubleBarrierEngine__SWIG_0) {
  {
    Handle< DeltaVolQuote > arg1 ;
    Handle< DeltaVolQuote > arg2 ;
    Handle< DeltaVolQuote > arg3 ;
    Handle< Quote > arg4 ;
    Handle< YieldTermStructure > arg5 ;
    Handle< YieldTermStructure > arg6 ;
    std::string *arg7 = 0 ;
    bool arg8 ;
    Real arg9 ;
    int arg10 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    int res7 = SWIG_OLDOBJ ;
    bool val8 ;
    int ecode8 = 0 ;
    double val9 ;
    int ecode9 = 0 ;
    int val10 ;
    int ecode10 = 0 ;
    int argvi = 0;
    VannaVolgaDoubleBarrierEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 10) || (items > 10)) {
      SWIG_croak("Usage: new_VannaVolgaDoubleBarrierEngine(atmVol,vol25Put,vol25Call,spotFX,domesticTS,foreignTS,type,adaptVanDelta,bsPriceWithSmile,series);");
    }
    {
      res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_DeltaVolQuote_t,  0 );
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_VannaVolgaDoubleBarrierEngine" "', argument " "1"" of type '" "Handle< DeltaVolQuote > const""'"); 
      }  
      if (!argp1) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_VannaVolgaDoubleBarrierEngine" "', argument " "1"" of type '" "Handle< DeltaVolQuote > const""'");
      } else {
        arg1 = *(reinterpret_cast< Handle< DeltaVolQuote > * >(argp1));
      }
    }
    {
      res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_DeltaVolQuote_t,  0 );
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_VannaVolgaDoubleBarrierEngine" "', argument " "2"" of type '" "Handle< DeltaVolQuote > const""'"); 
      }  
      if (!argp2) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_VannaVolgaDoubleBarrierEngine" "', argument " "2"" of type '" "Handle< DeltaVolQuote > const""'");
      } else {
        arg2 = *(reinterpret_cast< Handle< DeltaVolQuote > * >(argp2));
      }
    }
    {
      res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_DeltaVolQuote_t,  0 );
      if (!SWIG_IsOK(res3)) {
        SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_VannaVolgaDoubleBarrierEngine" "', argument " "3"" of type '" "Handle< DeltaVolQuote > const""'"); 
      }  
      if (!argp3) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_VannaVolgaDoubleBarrierEngine" "', argument " "3"" of type '" "Handle< DeltaVolQuote > const""'");
      } else {
        arg3 = *(reinterpret_cast< Handle< DeltaVolQuote > * >(argp3));
      }
    }
    {
      res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_HandleT_Quote_t,  0 );
      if (!SWIG_IsOK(res4)) {
        SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_VannaVolgaDoubleBarrierEngine" "', argument " "4"" of type '" "Handle< Quote > const""'"); 
      }  
      if (!argp4) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_VannaVolgaDoubleBarrierEngine" "', argument " "4"" of type '" "Handle< Quote > const""'");
      } else {
        arg4 = *(reinterpret_cast< Handle< Quote > * >(argp4));
      }
    }
    {
      res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
      if (!SWIG_IsOK(res5)) {
        SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_VannaVolgaDoubleBarrierEngine" "', argument " "5"" of type '" "Handle< YieldTermStructure > const""'"); 
      }  
      if (!argp5) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_VannaVolgaDoubleBarrierEngine" "', argument " "5"" of type '" "Handle< YieldTermStructure > const""'");
      } else {
        arg5 = *(reinterpret_cast< Handle< YieldTermStructure > * >(argp5));
      }
    }
    {
      res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
      if (!SWIG_IsOK(res6)) {
        SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_VannaVolgaDoubleBarrierEngine" "', argument " "6"" of type '" "Handle< YieldTermStructure > const""'"); 
      }  
      if (!argp6) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_VannaVolgaDoubleBarrierEngine" "', argument " "6"" of type '" "Handle< YieldTermStructure > const""'");
      } else {
        arg6 = *(reinterpret_cast< Handle< YieldTermStructure > * >(argp6));
      }
    }
    {
      std::string *ptr = (std::string *)0;
      res7 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(6), &ptr);
      if (!SWIG_IsOK(res7)) {
        SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_VannaVolgaDoubleBarrierEngine" "', argument " "7"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_VannaVolgaDoubleBarrierEngine" "', argument " "7"" of type '" "std::string const &""'"); 
      }
      arg7 = ptr;
    }
    ecode8 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_VannaVolgaDoubleBarrierEngine" "', argument " "8"" of type '" "bool""'");
    } 
    arg8 = static_cast< bool >(val8);
    ecode9 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(8), &val9);
    if (!SWIG_IsOK(ecode9)) {
      SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "new_VannaVolgaDoubleBarrierEngine" "', argument " "9"" of type '" "Real""'");
    } 
    arg9 = static_cast< Real >(val9);
    ecode10 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(9), &val10);
    if (!SWIG_IsOK(ecode10)) {
      SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "new_VannaVolgaDoubleBarrierEngine" "', argument " "10"" of type '" "int""'");
    } 
    arg10 = static_cast< int >(val10);
    {
      try {
        result = (VannaVolgaDoubleBarrierEnginePtr *)new_VannaVolgaDoubleBarrierEnginePtr__SWIG_0(arg1,arg2,arg3,arg4,arg5,arg6,(std::string const &)*arg7,arg8,arg9,arg10);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VannaVolgaDoubleBarrierEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res7)) delete arg7;
    
    
    
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res7)) delete arg7;
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_VannaVolgaDoubleBarrierEngine__SWIG_1) {
  {
    Handle< DeltaVolQuote > arg1 ;
    Handle< DeltaVolQuote > arg2 ;
    Handle< DeltaVolQuote > arg3 ;
    Handle< Quote > arg4 ;
    Handle< YieldTermStructure > arg5 ;
    Handle< YieldTermStructure > arg6 ;
    std::string *arg7 = 0 ;
    bool arg8 ;
    Real arg9 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    int res7 = SWIG_OLDOBJ ;
    bool val8 ;
    int ecode8 = 0 ;
    double val9 ;
    int ecode9 = 0 ;
    int argvi = 0;
    VannaVolgaDoubleBarrierEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 9) || (items > 9)) {
      SWIG_croak("Usage: new_VannaVolgaDoubleBarrierEngine(atmVol,vol25Put,vol25Call,spotFX,domesticTS,foreignTS,type,adaptVanDelta,bsPriceWithSmile);");
    }
    {
      res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_DeltaVolQuote_t,  0 );
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_VannaVolgaDoubleBarrierEngine" "', argument " "1"" of type '" "Handle< DeltaVolQuote > const""'"); 
      }  
      if (!argp1) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_VannaVolgaDoubleBarrierEngine" "', argument " "1"" of type '" "Handle< DeltaVolQuote > const""'");
      } else {
        arg1 = *(reinterpret_cast< Handle< DeltaVolQuote > * >(argp1));
      }
    }
    {
      res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_DeltaVolQuote_t,  0 );
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_VannaVolgaDoubleBarrierEngine" "', argument " "2"" of type '" "Handle< DeltaVolQuote > const""'"); 
      }  
      if (!argp2) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_VannaVolgaDoubleBarrierEngine" "', argument " "2"" of type '" "Handle< DeltaVolQuote > const""'");
      } else {
        arg2 = *(reinterpret_cast< Handle< DeltaVolQuote > * >(argp2));
      }
    }
    {
      res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_DeltaVolQuote_t,  0 );
      if (!SWIG_IsOK(res3)) {
        SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_VannaVolgaDoubleBarrierEngine" "', argument " "3"" of type '" "Handle< DeltaVolQuote > const""'"); 
      }  
      if (!argp3) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_VannaVolgaDoubleBarrierEngine" "', argument " "3"" of type '" "Handle< DeltaVolQuote > const""'");
      } else {
        arg3 = *(reinterpret_cast< Handle< DeltaVolQuote > * >(argp3));
      }
    }
    {
      res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_HandleT_Quote_t,  0 );
      if (!SWIG_IsOK(res4)) {
        SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_VannaVolgaDoubleBarrierEngine" "', argument " "4"" of type '" "Handle< Quote > const""'"); 
      }  
      if (!argp4) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_VannaVolgaDoubleBarrierEngine" "', argument " "4"" of type '" "Handle< Quote > const""'");
      } else {
        arg4 = *(reinterpret_cast< Handle< Quote > * >(argp4));
      }
    }
    {
      res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
      if (!SWIG_IsOK(res5)) {
        SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_VannaVolgaDoubleBarrierEngine" "', argument " "5"" of type '" "Handle< YieldTermStructure > const""'"); 
      }  
      if (!argp5) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_VannaVolgaDoubleBarrierEngine" "', argument " "5"" of type '" "Handle< YieldTermStructure > const""'");
      } else {
        arg5 = *(reinterpret_cast< Handle< YieldTermStructure > * >(argp5));
      }
    }
    {
      res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
      if (!SWIG_IsOK(res6)) {
        SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_VannaVolgaDoubleBarrierEngine" "', argument " "6"" of type '" "Handle< YieldTermStructure > const""'"); 
      }  
      if (!argp6) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_VannaVolgaDoubleBarrierEngine" "', argument " "6"" of type '" "Handle< YieldTermStructure > const""'");
      } else {
        arg6 = *(reinterpret_cast< Handle< YieldTermStructure > * >(argp6));
      }
    }
    {
      std::string *ptr = (std::string *)0;
      res7 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(6), &ptr);
      if (!SWIG_IsOK(res7)) {
        SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_VannaVolgaDoubleBarrierEngine" "', argument " "7"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_VannaVolgaDoubleBarrierEngine" "', argument " "7"" of type '" "std::string const &""'"); 
      }
      arg7 = ptr;
    }
    ecode8 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_VannaVolgaDoubleBarrierEngine" "', argument " "8"" of type '" "bool""'");
    } 
    arg8 = static_cast< bool >(val8);
    ecode9 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(8), &val9);
    if (!SWIG_IsOK(ecode9)) {
      SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "new_VannaVolgaDoubleBarrierEngine" "', argument " "9"" of type '" "Real""'");
    } 
    arg9 = static_cast< Real >(val9);
    {
      try {
        result = (VannaVolgaDoubleBarrierEnginePtr *)new_VannaVolgaDoubleBarrierEnginePtr__SWIG_0(arg1,arg2,arg3,arg4,arg5,arg6,(std::string const &)*arg7,arg8,arg9);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VannaVolgaDoubleBarrierEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res7)) delete arg7;
    
    
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res7)) delete arg7;
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_VannaVolgaDoubleBarrierEngine__SWIG_2) {
  {
    Handle< DeltaVolQuote > arg1 ;
    Handle< DeltaVolQuote > arg2 ;
    Handle< DeltaVolQuote > arg3 ;
    Handle< Quote > arg4 ;
    Handle< YieldTermStructure > arg5 ;
    Handle< YieldTermStructure > arg6 ;
    std::string *arg7 = 0 ;
    bool arg8 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    int res7 = SWIG_OLDOBJ ;
    bool val8 ;
    int ecode8 = 0 ;
    int argvi = 0;
    VannaVolgaDoubleBarrierEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 8) || (items > 8)) {
      SWIG_croak("Usage: new_VannaVolgaDoubleBarrierEngine(atmVol,vol25Put,vol25Call,spotFX,domesticTS,foreignTS,type,adaptVanDelta);");
    }
    {
      res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_DeltaVolQuote_t,  0 );
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_VannaVolgaDoubleBarrierEngine" "', argument " "1"" of type '" "Handle< DeltaVolQuote > const""'"); 
      }  
      if (!argp1) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_VannaVolgaDoubleBarrierEngine" "', argument " "1"" of type '" "Handle< DeltaVolQuote > const""'");
      } else {
        arg1 = *(reinterpret_cast< Handle< DeltaVolQuote > * >(argp1));
      }
    }
    {
      res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_DeltaVolQuote_t,  0 );
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_VannaVolgaDoubleBarrierEngine" "', argument " "2"" of type '" "Handle< DeltaVolQuote > const""'"); 
      }  
      if (!argp2) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_VannaVolgaDoubleBarrierEngine" "', argument " "2"" of type '" "Handle< DeltaVolQuote > const""'");
      } else {
        arg2 = *(reinterpret_cast< Handle< DeltaVolQuote > * >(argp2));
      }
    }
    {
      res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_DeltaVolQuote_t,  0 );
      if (!SWIG_IsOK(res3)) {
        SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_VannaVolgaDoubleBarrierEngine" "', argument " "3"" of type '" "Handle< DeltaVolQuote > const""'"); 
      }  
      if (!argp3) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_VannaVolgaDoubleBarrierEngine" "', argument " "3"" of type '" "Handle< DeltaVolQuote > const""'");
      } else {
        arg3 = *(reinterpret_cast< Handle< DeltaVolQuote > * >(argp3));
      }
    }
    {
      res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_HandleT_Quote_t,  0 );
      if (!SWIG_IsOK(res4)) {
        SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_VannaVolgaDoubleBarrierEngine" "', argument " "4"" of type '" "Handle< Quote > const""'"); 
      }  
      if (!argp4) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_VannaVolgaDoubleBarrierEngine" "', argument " "4"" of type '" "Handle< Quote > const""'");
      } else {
        arg4 = *(reinterpret_cast< Handle< Quote > * >(argp4));
      }
    }
    {
      res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
      if (!SWIG_IsOK(res5)) {
        SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_VannaVolgaDoubleBarrierEngine" "', argument " "5"" of type '" "Handle< YieldTermStructure > const""'"); 
      }  
      if (!argp5) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_VannaVolgaDoubleBarrierEngine" "', argument " "5"" of type '" "Handle< YieldTermStructure > const""'");
      } else {
        arg5 = *(reinterpret_cast< Handle< YieldTermStructure > * >(argp5));
      }
    }
    {
      res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
      if (!SWIG_IsOK(res6)) {
        SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_VannaVolgaDoubleBarrierEngine" "', argument " "6"" of type '" "Handle< YieldTermStructure > const""'"); 
      }  
      if (!argp6) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_VannaVolgaDoubleBarrierEngine" "', argument " "6"" of type '" "Handle< YieldTermStructure > const""'");
      } else {
        arg6 = *(reinterpret_cast< Handle< YieldTermStructure > * >(argp6));
      }
    }
    {
      std::string *ptr = (std::string *)0;
      res7 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(6), &ptr);
      if (!SWIG_IsOK(res7)) {
        SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_VannaVolgaDoubleBarrierEngine" "', argument " "7"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_VannaVolgaDoubleBarrierEngine" "', argument " "7"" of type '" "std::string const &""'"); 
      }
      arg7 = ptr;
    }
    ecode8 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_VannaVolgaDoubleBarrierEngine" "', argument " "8"" of type '" "bool""'");
    } 
    arg8 = static_cast< bool >(val8);
    {
      try {
        result = (VannaVolgaDoubleBarrierEnginePtr *)new_VannaVolgaDoubleBarrierEnginePtr__SWIG_0(arg1,arg2,arg3,arg4,arg5,arg6,(std::string const &)*arg7,arg8);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VannaVolgaDoubleBarrierEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res7)) delete arg7;
    
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res7)) delete arg7;
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_VannaVolgaDoubleBarrierEngine__SWIG_3) {
  {
    Handle< DeltaVolQuote > arg1 ;
    Handle< DeltaVolQuote > arg2 ;
    Handle< DeltaVolQuote > arg3 ;
    Handle< Quote > arg4 ;
    Handle< YieldTermStructure > arg5 ;
    Handle< YieldTermStructure > arg6 ;
    std::string *arg7 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    int res7 = SWIG_OLDOBJ ;
    int argvi = 0;
    VannaVolgaDoubleBarrierEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: new_VannaVolgaDoubleBarrierEngine(atmVol,vol25Put,vol25Call,spotFX,domesticTS,foreignTS,type);");
    }
    {
      res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_DeltaVolQuote_t,  0 );
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_VannaVolgaDoubleBarrierEngine" "', argument " "1"" of type '" "Handle< DeltaVolQuote > const""'"); 
      }  
      if (!argp1) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_VannaVolgaDoubleBarrierEngine" "', argument " "1"" of type '" "Handle< DeltaVolQuote > const""'");
      } else {
        arg1 = *(reinterpret_cast< Handle< DeltaVolQuote > * >(argp1));
      }
    }
    {
      res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_DeltaVolQuote_t,  0 );
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_VannaVolgaDoubleBarrierEngine" "', argument " "2"" of type '" "Handle< DeltaVolQuote > const""'"); 
      }  
      if (!argp2) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_VannaVolgaDoubleBarrierEngine" "', argument " "2"" of type '" "Handle< DeltaVolQuote > const""'");
      } else {
        arg2 = *(reinterpret_cast< Handle< DeltaVolQuote > * >(argp2));
      }
    }
    {
      res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_DeltaVolQuote_t,  0 );
      if (!SWIG_IsOK(res3)) {
        SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_VannaVolgaDoubleBarrierEngine" "', argument " "3"" of type '" "Handle< DeltaVolQuote > const""'"); 
      }  
      if (!argp3) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_VannaVolgaDoubleBarrierEngine" "', argument " "3"" of type '" "Handle< DeltaVolQuote > const""'");
      } else {
        arg3 = *(reinterpret_cast< Handle< DeltaVolQuote > * >(argp3));
      }
    }
    {
      res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_HandleT_Quote_t,  0 );
      if (!SWIG_IsOK(res4)) {
        SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_VannaVolgaDoubleBarrierEngine" "', argument " "4"" of type '" "Handle< Quote > const""'"); 
      }  
      if (!argp4) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_VannaVolgaDoubleBarrierEngine" "', argument " "4"" of type '" "Handle< Quote > const""'");
      } else {
        arg4 = *(reinterpret_cast< Handle< Quote > * >(argp4));
      }
    }
    {
      res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
      if (!SWIG_IsOK(res5)) {
        SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_VannaVolgaDoubleBarrierEngine" "', argument " "5"" of type '" "Handle< YieldTermStructure > const""'"); 
      }  
      if (!argp5) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_VannaVolgaDoubleBarrierEngine" "', argument " "5"" of type '" "Handle< YieldTermStructure > const""'");
      } else {
        arg5 = *(reinterpret_cast< Handle< YieldTermStructure > * >(argp5));
      }
    }
    {
      res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
      if (!SWIG_IsOK(res6)) {
        SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_VannaVolgaDoubleBarrierEngine" "', argument " "6"" of type '" "Handle< YieldTermStructure > const""'"); 
      }  
      if (!argp6) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_VannaVolgaDoubleBarrierEngine" "', argument " "6"" of type '" "Handle< YieldTermStructure > const""'");
      } else {
        arg6 = *(reinterpret_cast< Handle< YieldTermStructure > * >(argp6));
      }
    }
    {
      std::string *ptr = (std::string *)0;
      res7 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(6), &ptr);
      if (!SWIG_IsOK(res7)) {
        SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_VannaVolgaDoubleBarrierEngine" "', argument " "7"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_VannaVolgaDoubleBarrierEngine" "', argument " "7"" of type '" "std::string const &""'"); 
      }
      arg7 = ptr;
    }
    {
      try {
        result = (VannaVolgaDoubleBarrierEnginePtr *)new_VannaVolgaDoubleBarrierEnginePtr__SWIG_0(arg1,arg2,arg3,arg4,arg5,arg6,(std::string const &)*arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VannaVolgaDoubleBarrierEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res7)) delete arg7;
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res7)) delete arg7;
    SWIG_croak_null();
  }
}


XS(_wrap_new_VannaVolgaDoubleBarrierEngine__SWIG_4) {
  {
    Handle< DeltaVolQuote > arg1 ;
    Handle< DeltaVolQuote > arg2 ;
    Handle< DeltaVolQuote > arg3 ;
    Handle< Quote > arg4 ;
    Handle< YieldTermStructure > arg5 ;
    Handle< YieldTermStructure > arg6 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    int argvi = 0;
    VannaVolgaDoubleBarrierEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_VannaVolgaDoubleBarrierEngine(atmVol,vol25Put,vol25Call,spotFX,domesticTS,foreignTS);");
    }
    {
      res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_DeltaVolQuote_t,  0 );
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_VannaVolgaDoubleBarrierEngine" "', argument " "1"" of type '" "Handle< DeltaVolQuote > const""'"); 
      }  
      if (!argp1) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_VannaVolgaDoubleBarrierEngine" "', argument " "1"" of type '" "Handle< DeltaVolQuote > const""'");
      } else {
        arg1 = *(reinterpret_cast< Handle< DeltaVolQuote > * >(argp1));
      }
    }
    {
      res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_DeltaVolQuote_t,  0 );
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_VannaVolgaDoubleBarrierEngine" "', argument " "2"" of type '" "Handle< DeltaVolQuote > const""'"); 
      }  
      if (!argp2) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_VannaVolgaDoubleBarrierEngine" "', argument " "2"" of type '" "Handle< DeltaVolQuote > const""'");
      } else {
        arg2 = *(reinterpret_cast< Handle< DeltaVolQuote > * >(argp2));
      }
    }
    {
      res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_DeltaVolQuote_t,  0 );
      if (!SWIG_IsOK(res3)) {
        SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_VannaVolgaDoubleBarrierEngine" "', argument " "3"" of type '" "Handle< DeltaVolQuote > const""'"); 
      }  
      if (!argp3) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_VannaVolgaDoubleBarrierEngine" "', argument " "3"" of type '" "Handle< DeltaVolQuote > const""'");
      } else {
        arg3 = *(reinterpret_cast< Handle< DeltaVolQuote > * >(argp3));
      }
    }
    {
      res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_HandleT_Quote_t,  0 );
      if (!SWIG_IsOK(res4)) {
        SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_VannaVolgaDoubleBarrierEngine" "', argument " "4"" of type '" "Handle< Quote > const""'"); 
      }  
      if (!argp4) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_VannaVolgaDoubleBarrierEngine" "', argument " "4"" of type '" "Handle< Quote > const""'");
      } else {
        arg4 = *(reinterpret_cast< Handle< Quote > * >(argp4));
      }
    }
    {
      res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
      if (!SWIG_IsOK(res5)) {
        SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_VannaVolgaDoubleBarrierEngine" "', argument " "5"" of type '" "Handle< YieldTermStructure > const""'"); 
      }  
      if (!argp5) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_VannaVolgaDoubleBarrierEngine" "', argument " "5"" of type '" "Handle< YieldTermStructure > const""'");
      } else {
        arg5 = *(reinterpret_cast< Handle< YieldTermStructure > * >(argp5));
      }
    }
    {
      res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
      if (!SWIG_IsOK(res6)) {
        SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_VannaVolgaDoubleBarrierEngine" "', argument " "6"" of type '" "Handle< YieldTermStructure > const""'"); 
      }  
      if (!argp6) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_VannaVolgaDoubleBarrierEngine" "', argument " "6"" of type '" "Handle< YieldTermStructure > const""'");
      } else {
        arg6 = *(reinterpret_cast< Handle< YieldTermStructure > * >(argp6));
      }
    }
    {
      try {
        result = (VannaVolgaDoubleBarrierEnginePtr *)new_VannaVolgaDoubleBarrierEnginePtr__SWIG_0(arg1,arg2,arg3,arg4,arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VannaVolgaDoubleBarrierEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_VannaVolgaDoubleBarrierEngine) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_DeltaVolQuote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_DeltaVolQuote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_DeltaVolQuote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_DeltaVolQuote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_DeltaVolQuote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_DeltaVolQuote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(6), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 8) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_DeltaVolQuote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_DeltaVolQuote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_DeltaVolQuote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(6), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 9) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_DeltaVolQuote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_DeltaVolQuote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_DeltaVolQuote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(6), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(8), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 10) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_DeltaVolQuote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_DeltaVolQuote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_DeltaVolQuote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(6), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(8), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(9), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_VannaVolgaDoubleBarrierEngine__SWIG_4); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_VannaVolgaDoubleBarrierEngine__SWIG_3); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_VannaVolgaDoubleBarrierEngine__SWIG_2); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_VannaVolgaDoubleBarrierEngine__SWIG_1); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_VannaVolgaDoubleBarrierEngine__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_VannaVolgaDoubleBarrierEngine'");
  XSRETURN(0);
}


XS(_wrap_delete_VannaVolgaDoubleBarrierEngine) {
  {
    VannaVolgaDoubleBarrierEnginePtr *arg1 = (VannaVolgaDoubleBarrierEnginePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_VannaVolgaDoubleBarrierEngine(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_VannaVolgaDoubleBarrierEnginePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_VannaVolgaDoubleBarrierEngine" "', argument " "1"" of type '" "VannaVolgaDoubleBarrierEnginePtr *""'"); 
    }
    arg1 = reinterpret_cast< VannaVolgaDoubleBarrierEnginePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_AnalyticDoubleBarrierBinaryEngine) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    AnalyticDoubleBarrierBinaryEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_AnalyticDoubleBarrierBinaryEngine(process);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_AnalyticDoubleBarrierBinaryEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AnalyticDoubleBarrierBinaryEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    {
      try {
        result = (AnalyticDoubleBarrierBinaryEnginePtr *)new_AnalyticDoubleBarrierBinaryEnginePtr((GeneralizedBlackScholesProcessPtr const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_AnalyticDoubleBarrierBinaryEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_AnalyticDoubleBarrierBinaryEngine) {
  {
    AnalyticDoubleBarrierBinaryEnginePtr *arg1 = (AnalyticDoubleBarrierBinaryEnginePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_AnalyticDoubleBarrierBinaryEngine(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_AnalyticDoubleBarrierBinaryEnginePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_AnalyticDoubleBarrierBinaryEngine" "', argument " "1"" of type '" "AnalyticDoubleBarrierBinaryEnginePtr *""'"); 
    }
    arg1 = reinterpret_cast< AnalyticDoubleBarrierBinaryEnginePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BinomialDoubleBarrierEngine) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    std::string *arg2 = 0 ;
    Size arg3 ;
    void *argp1 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    size_t val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    BinomialDoubleBarrierEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_BinomialDoubleBarrierEngine(process,type,steps);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_BinomialDoubleBarrierEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BinomialDoubleBarrierEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_BinomialDoubleBarrierEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BinomialDoubleBarrierEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_BinomialDoubleBarrierEngine" "', argument " "3"" of type '" "Size""'");
    } 
    arg3 = static_cast< Size >(val3);
    {
      try {
        result = (BinomialDoubleBarrierEnginePtr *)new_BinomialDoubleBarrierEnginePtr((GeneralizedBlackScholesProcessPtr const &)*arg1,(std::string const &)*arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BinomialDoubleBarrierEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_BinomialDoubleBarrierEngine) {
  {
    BinomialDoubleBarrierEnginePtr *arg1 = (BinomialDoubleBarrierEnginePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_BinomialDoubleBarrierEngine(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BinomialDoubleBarrierEnginePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_BinomialDoubleBarrierEngine" "', argument " "1"" of type '" "BinomialDoubleBarrierEnginePtr *""'"); 
    }
    arg1 = reinterpret_cast< BinomialDoubleBarrierEnginePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PlainVanillaPayoff) {
  {
    Option::Type arg1 ;
    Real arg2 ;
    int val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    PlainVanillaPayoffPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_PlainVanillaPayoff(type,strike);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_PlainVanillaPayoff" "', argument " "1"" of type '" "Option::Type""'");
    } 
    arg1 = static_cast< Option::Type >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_PlainVanillaPayoff" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (PlainVanillaPayoffPtr *)new_PlainVanillaPayoffPtr(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PlainVanillaPayoffPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_PlainVanillaPayoff_optionType) {
  {
    PlainVanillaPayoffPtr *arg1 = (PlainVanillaPayoffPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Option::Type result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: PlainVanillaPayoff_optionType(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PlainVanillaPayoffPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PlainVanillaPayoff_optionType" "', argument " "1"" of type '" "PlainVanillaPayoffPtr *""'"); 
    }
    arg1 = reinterpret_cast< PlainVanillaPayoffPtr * >(argp1);
    {
      try {
        result = (Option::Type)PlainVanillaPayoffPtr_optionType(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_PlainVanillaPayoff_strike) {
  {
    PlainVanillaPayoffPtr *arg1 = (PlainVanillaPayoffPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: PlainVanillaPayoff_strike(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PlainVanillaPayoffPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PlainVanillaPayoff_strike" "', argument " "1"" of type '" "PlainVanillaPayoffPtr *""'"); 
    }
    arg1 = reinterpret_cast< PlainVanillaPayoffPtr * >(argp1);
    {
      try {
        result = (Real)PlainVanillaPayoffPtr_strike(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_PlainVanillaPayoff) {
  {
    PlainVanillaPayoffPtr *arg1 = (PlainVanillaPayoffPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_PlainVanillaPayoff(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PlainVanillaPayoffPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_PlainVanillaPayoff" "', argument " "1"" of type '" "PlainVanillaPayoffPtr *""'"); 
    }
    arg1 = reinterpret_cast< PlainVanillaPayoffPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PercentageStrikePayoff) {
  {
    Option::Type arg1 ;
    Real arg2 ;
    int val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    PercentageStrikePayoffPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_PercentageStrikePayoff(type,moneyness);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_PercentageStrikePayoff" "', argument " "1"" of type '" "Option::Type""'");
    } 
    arg1 = static_cast< Option::Type >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_PercentageStrikePayoff" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (PercentageStrikePayoffPtr *)new_PercentageStrikePayoffPtr(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PercentageStrikePayoffPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_PercentageStrikePayoff) {
  {
    PercentageStrikePayoffPtr *arg1 = (PercentageStrikePayoffPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_PercentageStrikePayoff(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PercentageStrikePayoffPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_PercentageStrikePayoff" "', argument " "1"" of type '" "PercentageStrikePayoffPtr *""'"); 
    }
    arg1 = reinterpret_cast< PercentageStrikePayoffPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CashOrNothingPayoff) {
  {
    Option::Type arg1 ;
    Real arg2 ;
    Real arg3 ;
    int val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    CashOrNothingPayoffPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_CashOrNothingPayoff(type,strike,payoff);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_CashOrNothingPayoff" "', argument " "1"" of type '" "Option::Type""'");
    } 
    arg1 = static_cast< Option::Type >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_CashOrNothingPayoff" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_CashOrNothingPayoff" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    {
      try {
        result = (CashOrNothingPayoffPtr *)new_CashOrNothingPayoffPtr(arg1,arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CashOrNothingPayoffPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_CashOrNothingPayoff) {
  {
    CashOrNothingPayoffPtr *arg1 = (CashOrNothingPayoffPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_CashOrNothingPayoff(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CashOrNothingPayoffPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CashOrNothingPayoff" "', argument " "1"" of type '" "CashOrNothingPayoffPtr *""'"); 
    }
    arg1 = reinterpret_cast< CashOrNothingPayoffPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_AssetOrNothingPayoff) {
  {
    Option::Type arg1 ;
    Real arg2 ;
    int val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    AssetOrNothingPayoffPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_AssetOrNothingPayoff(type,strike);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_AssetOrNothingPayoff" "', argument " "1"" of type '" "Option::Type""'");
    } 
    arg1 = static_cast< Option::Type >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_AssetOrNothingPayoff" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (AssetOrNothingPayoffPtr *)new_AssetOrNothingPayoffPtr(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_AssetOrNothingPayoffPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_AssetOrNothingPayoff) {
  {
    AssetOrNothingPayoffPtr *arg1 = (AssetOrNothingPayoffPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_AssetOrNothingPayoff(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_AssetOrNothingPayoffPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_AssetOrNothingPayoff" "', argument " "1"" of type '" "AssetOrNothingPayoffPtr *""'"); 
    }
    arg1 = reinterpret_cast< AssetOrNothingPayoffPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SuperSharePayoff) {
  {
    Option::Type arg1 ;
    Real arg2 ;
    Real arg3 ;
    int val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    SuperSharePayoffPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_SuperSharePayoff(type,strike,increment);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_SuperSharePayoff" "', argument " "1"" of type '" "Option::Type""'");
    } 
    arg1 = static_cast< Option::Type >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_SuperSharePayoff" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_SuperSharePayoff" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    {
      try {
        result = (SuperSharePayoffPtr *)new_SuperSharePayoffPtr(arg1,arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SuperSharePayoffPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_SuperSharePayoff) {
  {
    SuperSharePayoffPtr *arg1 = (SuperSharePayoffPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_SuperSharePayoff(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SuperSharePayoffPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SuperSharePayoff" "', argument " "1"" of type '" "SuperSharePayoffPtr *""'"); 
    }
    arg1 = reinterpret_cast< SuperSharePayoffPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_GapPayoff) {
  {
    Option::Type arg1 ;
    Real arg2 ;
    Real arg3 ;
    int val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    GapPayoffPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_GapPayoff(type,strike,strikePayoff);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_GapPayoff" "', argument " "1"" of type '" "Option::Type""'");
    } 
    arg1 = static_cast< Option::Type >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_GapPayoff" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_GapPayoff" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    {
      try {
        result = (GapPayoffPtr *)new_GapPayoffPtr(arg1,arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GapPayoffPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_GapPayoff) {
  {
    GapPayoffPtr *arg1 = (GapPayoffPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_GapPayoff(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GapPayoffPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GapPayoff" "', argument " "1"" of type '" "GapPayoffPtr *""'"); 
    }
    arg1 = reinterpret_cast< GapPayoffPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BasketPayoff) {
  {
    int argvi = 0;
    BasketPayoffPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_BasketPayoff();");
    }
    {
      try {
        result = (BasketPayoffPtr *)new BasketPayoffPtr();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BasketPayoffPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_BasketPayoff) {
  {
    BasketPayoffPtr *arg1 = (BasketPayoffPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_BasketPayoff(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BasketPayoffPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_BasketPayoff" "', argument " "1"" of type '" "BasketPayoffPtr *""'"); 
    }
    arg1 = reinterpret_cast< BasketPayoffPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MinBasketPayoff) {
  {
    boost::shared_ptr< Payoff > arg1 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    MinBasketPayoffPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_MinBasketPayoff(p);");
    }
    {
      res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_Payoff_t,  0 );
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MinBasketPayoff" "', argument " "1"" of type '" "boost::shared_ptr< Payoff > const""'"); 
      }  
      if (!argp1) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MinBasketPayoff" "', argument " "1"" of type '" "boost::shared_ptr< Payoff > const""'");
      } else {
        arg1 = *(reinterpret_cast< boost::shared_ptr< Payoff > * >(argp1));
      }
    }
    {
      try {
        result = (MinBasketPayoffPtr *)new_MinBasketPayoffPtr(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MinBasketPayoffPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_MinBasketPayoff) {
  {
    MinBasketPayoffPtr *arg1 = (MinBasketPayoffPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_MinBasketPayoff(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_MinBasketPayoffPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MinBasketPayoff" "', argument " "1"" of type '" "MinBasketPayoffPtr *""'"); 
    }
    arg1 = reinterpret_cast< MinBasketPayoffPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MaxBasketPayoff) {
  {
    boost::shared_ptr< Payoff > arg1 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    MaxBasketPayoffPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_MaxBasketPayoff(p);");
    }
    {
      res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_Payoff_t,  0 );
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MaxBasketPayoff" "', argument " "1"" of type '" "boost::shared_ptr< Payoff > const""'"); 
      }  
      if (!argp1) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MaxBasketPayoff" "', argument " "1"" of type '" "boost::shared_ptr< Payoff > const""'");
      } else {
        arg1 = *(reinterpret_cast< boost::shared_ptr< Payoff > * >(argp1));
      }
    }
    {
      try {
        result = (MaxBasketPayoffPtr *)new_MaxBasketPayoffPtr(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MaxBasketPayoffPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_MaxBasketPayoff) {
  {
    MaxBasketPayoffPtr *arg1 = (MaxBasketPayoffPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_MaxBasketPayoff(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_MaxBasketPayoffPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MaxBasketPayoff" "', argument " "1"" of type '" "MaxBasketPayoffPtr *""'"); 
    }
    arg1 = reinterpret_cast< MaxBasketPayoffPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_AverageBasketPayoff__SWIG_0) {
  {
    boost::shared_ptr< Payoff > arg1 ;
    Array *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    AverageBasketPayoffPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_AverageBasketPayoff(p,a);");
    }
    {
      res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_Payoff_t,  0 );
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_AverageBasketPayoff" "', argument " "1"" of type '" "boost::shared_ptr< Payoff > const""'"); 
      }  
      if (!argp1) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AverageBasketPayoff" "', argument " "1"" of type '" "boost::shared_ptr< Payoff > const""'");
      } else {
        arg1 = *(reinterpret_cast< boost::shared_ptr< Payoff > * >(argp1));
      }
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_AverageBasketPayoff" "', argument " "2"" of type '" "Array const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AverageBasketPayoff" "', argument " "2"" of type '" "Array const &""'"); 
    }
    arg2 = reinterpret_cast< Array * >(argp2);
    {
      try {
        result = (AverageBasketPayoffPtr *)new_AverageBasketPayoffPtr__SWIG_0(arg1,(Array const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_AverageBasketPayoffPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_AverageBasketPayoff__SWIG_1) {
  {
    boost::shared_ptr< Payoff > arg1 ;
    Size arg2 ;
    void *argp1 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    AverageBasketPayoffPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_AverageBasketPayoff(p,n);");
    }
    {
      res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_Payoff_t,  0 );
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_AverageBasketPayoff" "', argument " "1"" of type '" "boost::shared_ptr< Payoff > const""'"); 
      }  
      if (!argp1) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AverageBasketPayoff" "', argument " "1"" of type '" "boost::shared_ptr< Payoff > const""'");
      } else {
        arg1 = *(reinterpret_cast< boost::shared_ptr< Payoff > * >(argp1));
      }
    }
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_AverageBasketPayoff" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    {
      try {
        result = (AverageBasketPayoffPtr *)new_AverageBasketPayoffPtr__SWIG_1(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_AverageBasketPayoffPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_AverageBasketPayoff) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_Payoff_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Array, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_Payoff_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_AverageBasketPayoff__SWIG_0); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_AverageBasketPayoff__SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded 'new_AverageBasketPayoff'");
  XSRETURN(0);
}


XS(_wrap_delete_AverageBasketPayoff) {
  {
    AverageBasketPayoffPtr *arg1 = (AverageBasketPayoffPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_AverageBasketPayoff(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_AverageBasketPayoffPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_AverageBasketPayoff" "', argument " "1"" of type '" "AverageBasketPayoffPtr *""'"); 
    }
    arg1 = reinterpret_cast< AverageBasketPayoffPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BasketOption) {
  {
    boost::shared_ptr< Payoff > *arg1 = 0 ;
    boost::shared_ptr< Exercise > *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    BasketOptionPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_BasketOption(payoff,exercise);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_Payoff_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_BasketOption" "', argument " "1"" of type '" "boost::shared_ptr< Payoff > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BasketOption" "', argument " "1"" of type '" "boost::shared_ptr< Payoff > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Payoff > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_boost__shared_ptrT_Exercise_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_BasketOption" "', argument " "2"" of type '" "boost::shared_ptr< Exercise > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BasketOption" "', argument " "2"" of type '" "boost::shared_ptr< Exercise > const &""'"); 
    }
    arg2 = reinterpret_cast< boost::shared_ptr< Exercise > * >(argp2);
    {
      try {
        result = (BasketOptionPtr *)new_BasketOptionPtr((boost::shared_ptr< Payoff > const &)*arg1,(boost::shared_ptr< Exercise > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BasketOptionPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_BasketOption) {
  {
    BasketOptionPtr *arg1 = (BasketOptionPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_BasketOption(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BasketOptionPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_BasketOption" "', argument " "1"" of type '" "BasketOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< BasketOptionPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MCEuropeanBasketEngine__SWIG_0) {
  {
    StochasticProcessArrayPtr *arg1 = 0 ;
    std::string *arg2 = 0 ;
    Size arg3 ;
    Size arg4 ;
    bool arg5 ;
    bool arg6 ;
    intOrNull arg7 ;
    doubleOrNull arg8 ;
    intOrNull arg9 ;
    BigInteger arg10 ;
    void *argp1 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    size_t val3 ;
    int ecode3 = 0 ;
    size_t val4 ;
    int ecode4 = 0 ;
    bool val5 ;
    int ecode5 = 0 ;
    bool val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    long val10 ;
    int ecode10 = 0 ;
    int argvi = 0;
    MCEuropeanBasketEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 10) || (items > 10)) {
      SWIG_croak("Usage: new_MCEuropeanBasketEngine(process,traits,timeSteps,timeStepsPerYear,brownianBridge,antitheticVariate,requiredSamples,requiredTolerance,maxSamples,seed);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_StochasticProcessArrayPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MCEuropeanBasketEngine" "', argument " "1"" of type '" "StochasticProcessArrayPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEuropeanBasketEngine" "', argument " "1"" of type '" "StochasticProcessArrayPtr const &""'"); 
    }
    arg1 = reinterpret_cast< StochasticProcessArrayPtr * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MCEuropeanBasketEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEuropeanBasketEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_MCEuropeanBasketEngine" "', argument " "3"" of type '" "Size""'");
    } 
    arg3 = static_cast< Size >(val3);
    ecode4 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_MCEuropeanBasketEngine" "', argument " "4"" of type '" "Size""'");
    } 
    arg4 = static_cast< Size >(val4);
    ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_MCEuropeanBasketEngine" "', argument " "5"" of type '" "bool""'");
    } 
    arg5 = static_cast< bool >(val5);
    ecode6 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_MCEuropeanBasketEngine" "', argument " "6"" of type '" "bool""'");
    } 
    arg6 = static_cast< bool >(val6);
    {
      res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_intOrNull,  0 );
      if (!SWIG_IsOK(res7)) {
        SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_MCEuropeanBasketEngine" "', argument " "7"" of type '" "intOrNull""'"); 
      }  
      if (!argp7) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEuropeanBasketEngine" "', argument " "7"" of type '" "intOrNull""'");
      } else {
        arg7 = *(reinterpret_cast< intOrNull * >(argp7));
      }
    }
    {
      res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_doubleOrNull,  0 );
      if (!SWIG_IsOK(res8)) {
        SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_MCEuropeanBasketEngine" "', argument " "8"" of type '" "doubleOrNull""'"); 
      }  
      if (!argp8) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEuropeanBasketEngine" "', argument " "8"" of type '" "doubleOrNull""'");
      } else {
        arg8 = *(reinterpret_cast< doubleOrNull * >(argp8));
      }
    }
    {
      res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_intOrNull,  0 );
      if (!SWIG_IsOK(res9)) {
        SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_MCEuropeanBasketEngine" "', argument " "9"" of type '" "intOrNull""'"); 
      }  
      if (!argp9) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEuropeanBasketEngine" "', argument " "9"" of type '" "intOrNull""'");
      } else {
        arg9 = *(reinterpret_cast< intOrNull * >(argp9));
      }
    }
    ecode10 = SWIG_AsVal_long SWIG_PERL_CALL_ARGS_2(ST(9), &val10);
    if (!SWIG_IsOK(ecode10)) {
      SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "new_MCEuropeanBasketEngine" "', argument " "10"" of type '" "BigInteger""'");
    } 
    arg10 = static_cast< BigInteger >(val10);
    {
      try {
        result = (MCEuropeanBasketEnginePtr *)new_MCEuropeanBasketEnginePtr__SWIG_0((StochasticProcessArrayPtr const &)*arg1,(std::string const &)*arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MCEuropeanBasketEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MCEuropeanBasketEngine__SWIG_1) {
  {
    StochasticProcessArrayPtr *arg1 = 0 ;
    std::string *arg2 = 0 ;
    Size arg3 ;
    Size arg4 ;
    bool arg5 ;
    bool arg6 ;
    intOrNull arg7 ;
    doubleOrNull arg8 ;
    intOrNull arg9 ;
    void *argp1 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    size_t val3 ;
    int ecode3 = 0 ;
    size_t val4 ;
    int ecode4 = 0 ;
    bool val5 ;
    int ecode5 = 0 ;
    bool val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    int argvi = 0;
    MCEuropeanBasketEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 9) || (items > 9)) {
      SWIG_croak("Usage: new_MCEuropeanBasketEngine(process,traits,timeSteps,timeStepsPerYear,brownianBridge,antitheticVariate,requiredSamples,requiredTolerance,maxSamples);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_StochasticProcessArrayPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MCEuropeanBasketEngine" "', argument " "1"" of type '" "StochasticProcessArrayPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEuropeanBasketEngine" "', argument " "1"" of type '" "StochasticProcessArrayPtr const &""'"); 
    }
    arg1 = reinterpret_cast< StochasticProcessArrayPtr * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MCEuropeanBasketEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEuropeanBasketEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_MCEuropeanBasketEngine" "', argument " "3"" of type '" "Size""'");
    } 
    arg3 = static_cast< Size >(val3);
    ecode4 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_MCEuropeanBasketEngine" "', argument " "4"" of type '" "Size""'");
    } 
    arg4 = static_cast< Size >(val4);
    ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_MCEuropeanBasketEngine" "', argument " "5"" of type '" "bool""'");
    } 
    arg5 = static_cast< bool >(val5);
    ecode6 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_MCEuropeanBasketEngine" "', argument " "6"" of type '" "bool""'");
    } 
    arg6 = static_cast< bool >(val6);
    {
      res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_intOrNull,  0 );
      if (!SWIG_IsOK(res7)) {
        SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_MCEuropeanBasketEngine" "', argument " "7"" of type '" "intOrNull""'"); 
      }  
      if (!argp7) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEuropeanBasketEngine" "', argument " "7"" of type '" "intOrNull""'");
      } else {
        arg7 = *(reinterpret_cast< intOrNull * >(argp7));
      }
    }
    {
      res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_doubleOrNull,  0 );
      if (!SWIG_IsOK(res8)) {
        SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_MCEuropeanBasketEngine" "', argument " "8"" of type '" "doubleOrNull""'"); 
      }  
      if (!argp8) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEuropeanBasketEngine" "', argument " "8"" of type '" "doubleOrNull""'");
      } else {
        arg8 = *(reinterpret_cast< doubleOrNull * >(argp8));
      }
    }
    {
      res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_intOrNull,  0 );
      if (!SWIG_IsOK(res9)) {
        SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_MCEuropeanBasketEngine" "', argument " "9"" of type '" "intOrNull""'"); 
      }  
      if (!argp9) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEuropeanBasketEngine" "', argument " "9"" of type '" "intOrNull""'");
      } else {
        arg9 = *(reinterpret_cast< intOrNull * >(argp9));
      }
    }
    {
      try {
        result = (MCEuropeanBasketEnginePtr *)new_MCEuropeanBasketEnginePtr__SWIG_0((StochasticProcessArrayPtr const &)*arg1,(std::string const &)*arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MCEuropeanBasketEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MCEuropeanBasketEngine__SWIG_2) {
  {
    StochasticProcessArrayPtr *arg1 = 0 ;
    std::string *arg2 = 0 ;
    Size arg3 ;
    Size arg4 ;
    bool arg5 ;
    bool arg6 ;
    intOrNull arg7 ;
    doubleOrNull arg8 ;
    void *argp1 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    size_t val3 ;
    int ecode3 = 0 ;
    size_t val4 ;
    int ecode4 = 0 ;
    bool val5 ;
    int ecode5 = 0 ;
    bool val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    int argvi = 0;
    MCEuropeanBasketEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 8) || (items > 8)) {
      SWIG_croak("Usage: new_MCEuropeanBasketEngine(process,traits,timeSteps,timeStepsPerYear,brownianBridge,antitheticVariate,requiredSamples,requiredTolerance);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_StochasticProcessArrayPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MCEuropeanBasketEngine" "', argument " "1"" of type '" "StochasticProcessArrayPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEuropeanBasketEngine" "', argument " "1"" of type '" "StochasticProcessArrayPtr const &""'"); 
    }
    arg1 = reinterpret_cast< StochasticProcessArrayPtr * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MCEuropeanBasketEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEuropeanBasketEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_MCEuropeanBasketEngine" "', argument " "3"" of type '" "Size""'");
    } 
    arg3 = static_cast< Size >(val3);
    ecode4 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_MCEuropeanBasketEngine" "', argument " "4"" of type '" "Size""'");
    } 
    arg4 = static_cast< Size >(val4);
    ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_MCEuropeanBasketEngine" "', argument " "5"" of type '" "bool""'");
    } 
    arg5 = static_cast< bool >(val5);
    ecode6 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_MCEuropeanBasketEngine" "', argument " "6"" of type '" "bool""'");
    } 
    arg6 = static_cast< bool >(val6);
    {
      res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_intOrNull,  0 );
      if (!SWIG_IsOK(res7)) {
        SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_MCEuropeanBasketEngine" "', argument " "7"" of type '" "intOrNull""'"); 
      }  
      if (!argp7) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEuropeanBasketEngine" "', argument " "7"" of type '" "intOrNull""'");
      } else {
        arg7 = *(reinterpret_cast< intOrNull * >(argp7));
      }
    }
    {
      res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_doubleOrNull,  0 );
      if (!SWIG_IsOK(res8)) {
        SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_MCEuropeanBasketEngine" "', argument " "8"" of type '" "doubleOrNull""'"); 
      }  
      if (!argp8) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEuropeanBasketEngine" "', argument " "8"" of type '" "doubleOrNull""'");
      } else {
        arg8 = *(reinterpret_cast< doubleOrNull * >(argp8));
      }
    }
    {
      try {
        result = (MCEuropeanBasketEnginePtr *)new_MCEuropeanBasketEnginePtr__SWIG_0((StochasticProcessArrayPtr const &)*arg1,(std::string const &)*arg2,arg3,arg4,arg5,arg6,arg7,arg8);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MCEuropeanBasketEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MCEuropeanBasketEngine__SWIG_3) {
  {
    StochasticProcessArrayPtr *arg1 = 0 ;
    std::string *arg2 = 0 ;
    Size arg3 ;
    Size arg4 ;
    bool arg5 ;
    bool arg6 ;
    intOrNull arg7 ;
    void *argp1 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    size_t val3 ;
    int ecode3 = 0 ;
    size_t val4 ;
    int ecode4 = 0 ;
    bool val5 ;
    int ecode5 = 0 ;
    bool val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    int argvi = 0;
    MCEuropeanBasketEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: new_MCEuropeanBasketEngine(process,traits,timeSteps,timeStepsPerYear,brownianBridge,antitheticVariate,requiredSamples);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_StochasticProcessArrayPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MCEuropeanBasketEngine" "', argument " "1"" of type '" "StochasticProcessArrayPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEuropeanBasketEngine" "', argument " "1"" of type '" "StochasticProcessArrayPtr const &""'"); 
    }
    arg1 = reinterpret_cast< StochasticProcessArrayPtr * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MCEuropeanBasketEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEuropeanBasketEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_MCEuropeanBasketEngine" "', argument " "3"" of type '" "Size""'");
    } 
    arg3 = static_cast< Size >(val3);
    ecode4 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_MCEuropeanBasketEngine" "', argument " "4"" of type '" "Size""'");
    } 
    arg4 = static_cast< Size >(val4);
    ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_MCEuropeanBasketEngine" "', argument " "5"" of type '" "bool""'");
    } 
    arg5 = static_cast< bool >(val5);
    ecode6 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_MCEuropeanBasketEngine" "', argument " "6"" of type '" "bool""'");
    } 
    arg6 = static_cast< bool >(val6);
    {
      res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_intOrNull,  0 );
      if (!SWIG_IsOK(res7)) {
        SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_MCEuropeanBasketEngine" "', argument " "7"" of type '" "intOrNull""'"); 
      }  
      if (!argp7) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEuropeanBasketEngine" "', argument " "7"" of type '" "intOrNull""'");
      } else {
        arg7 = *(reinterpret_cast< intOrNull * >(argp7));
      }
    }
    {
      try {
        result = (MCEuropeanBasketEnginePtr *)new_MCEuropeanBasketEnginePtr__SWIG_0((StochasticProcessArrayPtr const &)*arg1,(std::string const &)*arg2,arg3,arg4,arg5,arg6,arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MCEuropeanBasketEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MCEuropeanBasketEngine__SWIG_4) {
  {
    StochasticProcessArrayPtr *arg1 = 0 ;
    std::string *arg2 = 0 ;
    Size arg3 ;
    Size arg4 ;
    bool arg5 ;
    bool arg6 ;
    void *argp1 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    size_t val3 ;
    int ecode3 = 0 ;
    size_t val4 ;
    int ecode4 = 0 ;
    bool val5 ;
    int ecode5 = 0 ;
    bool val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    MCEuropeanBasketEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_MCEuropeanBasketEngine(process,traits,timeSteps,timeStepsPerYear,brownianBridge,antitheticVariate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_StochasticProcessArrayPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MCEuropeanBasketEngine" "', argument " "1"" of type '" "StochasticProcessArrayPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEuropeanBasketEngine" "', argument " "1"" of type '" "StochasticProcessArrayPtr const &""'"); 
    }
    arg1 = reinterpret_cast< StochasticProcessArrayPtr * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MCEuropeanBasketEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEuropeanBasketEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_MCEuropeanBasketEngine" "', argument " "3"" of type '" "Size""'");
    } 
    arg3 = static_cast< Size >(val3);
    ecode4 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_MCEuropeanBasketEngine" "', argument " "4"" of type '" "Size""'");
    } 
    arg4 = static_cast< Size >(val4);
    ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_MCEuropeanBasketEngine" "', argument " "5"" of type '" "bool""'");
    } 
    arg5 = static_cast< bool >(val5);
    ecode6 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_MCEuropeanBasketEngine" "', argument " "6"" of type '" "bool""'");
    } 
    arg6 = static_cast< bool >(val6);
    {
      try {
        result = (MCEuropeanBasketEnginePtr *)new_MCEuropeanBasketEnginePtr__SWIG_0((StochasticProcessArrayPtr const &)*arg1,(std::string const &)*arg2,arg3,arg4,arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MCEuropeanBasketEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MCEuropeanBasketEngine__SWIG_5) {
  {
    StochasticProcessArrayPtr *arg1 = 0 ;
    std::string *arg2 = 0 ;
    Size arg3 ;
    Size arg4 ;
    bool arg5 ;
    void *argp1 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    size_t val3 ;
    int ecode3 = 0 ;
    size_t val4 ;
    int ecode4 = 0 ;
    bool val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    MCEuropeanBasketEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_MCEuropeanBasketEngine(process,traits,timeSteps,timeStepsPerYear,brownianBridge);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_StochasticProcessArrayPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MCEuropeanBasketEngine" "', argument " "1"" of type '" "StochasticProcessArrayPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEuropeanBasketEngine" "', argument " "1"" of type '" "StochasticProcessArrayPtr const &""'"); 
    }
    arg1 = reinterpret_cast< StochasticProcessArrayPtr * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MCEuropeanBasketEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEuropeanBasketEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_MCEuropeanBasketEngine" "', argument " "3"" of type '" "Size""'");
    } 
    arg3 = static_cast< Size >(val3);
    ecode4 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_MCEuropeanBasketEngine" "', argument " "4"" of type '" "Size""'");
    } 
    arg4 = static_cast< Size >(val4);
    ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_MCEuropeanBasketEngine" "', argument " "5"" of type '" "bool""'");
    } 
    arg5 = static_cast< bool >(val5);
    {
      try {
        result = (MCEuropeanBasketEnginePtr *)new_MCEuropeanBasketEnginePtr__SWIG_0((StochasticProcessArrayPtr const &)*arg1,(std::string const &)*arg2,arg3,arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MCEuropeanBasketEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MCEuropeanBasketEngine__SWIG_6) {
  {
    StochasticProcessArrayPtr *arg1 = 0 ;
    std::string *arg2 = 0 ;
    Size arg3 ;
    Size arg4 ;
    void *argp1 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    size_t val3 ;
    int ecode3 = 0 ;
    size_t val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    MCEuropeanBasketEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_MCEuropeanBasketEngine(process,traits,timeSteps,timeStepsPerYear);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_StochasticProcessArrayPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MCEuropeanBasketEngine" "', argument " "1"" of type '" "StochasticProcessArrayPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEuropeanBasketEngine" "', argument " "1"" of type '" "StochasticProcessArrayPtr const &""'"); 
    }
    arg1 = reinterpret_cast< StochasticProcessArrayPtr * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MCEuropeanBasketEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEuropeanBasketEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_MCEuropeanBasketEngine" "', argument " "3"" of type '" "Size""'");
    } 
    arg3 = static_cast< Size >(val3);
    ecode4 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_MCEuropeanBasketEngine" "', argument " "4"" of type '" "Size""'");
    } 
    arg4 = static_cast< Size >(val4);
    {
      try {
        result = (MCEuropeanBasketEnginePtr *)new_MCEuropeanBasketEnginePtr__SWIG_0((StochasticProcessArrayPtr const &)*arg1,(std::string const &)*arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MCEuropeanBasketEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MCEuropeanBasketEngine__SWIG_7) {
  {
    StochasticProcessArrayPtr *arg1 = 0 ;
    std::string *arg2 = 0 ;
    Size arg3 ;
    void *argp1 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    size_t val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    MCEuropeanBasketEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_MCEuropeanBasketEngine(process,traits,timeSteps);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_StochasticProcessArrayPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MCEuropeanBasketEngine" "', argument " "1"" of type '" "StochasticProcessArrayPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEuropeanBasketEngine" "', argument " "1"" of type '" "StochasticProcessArrayPtr const &""'"); 
    }
    arg1 = reinterpret_cast< StochasticProcessArrayPtr * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MCEuropeanBasketEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEuropeanBasketEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_MCEuropeanBasketEngine" "', argument " "3"" of type '" "Size""'");
    } 
    arg3 = static_cast< Size >(val3);
    {
      try {
        result = (MCEuropeanBasketEnginePtr *)new_MCEuropeanBasketEnginePtr__SWIG_0((StochasticProcessArrayPtr const &)*arg1,(std::string const &)*arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MCEuropeanBasketEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MCEuropeanBasketEngine__SWIG_8) {
  {
    StochasticProcessArrayPtr *arg1 = 0 ;
    std::string *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    MCEuropeanBasketEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_MCEuropeanBasketEngine(process,traits);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_StochasticProcessArrayPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MCEuropeanBasketEngine" "', argument " "1"" of type '" "StochasticProcessArrayPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEuropeanBasketEngine" "', argument " "1"" of type '" "StochasticProcessArrayPtr const &""'"); 
    }
    arg1 = reinterpret_cast< StochasticProcessArrayPtr * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MCEuropeanBasketEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEuropeanBasketEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      try {
        result = (MCEuropeanBasketEnginePtr *)new_MCEuropeanBasketEnginePtr__SWIG_0((StochasticProcessArrayPtr const &)*arg1,(std::string const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MCEuropeanBasketEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_new_MCEuropeanBasketEngine) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_StochasticProcessArrayPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_StochasticProcessArrayPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_StochasticProcessArrayPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_StochasticProcessArrayPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_StochasticProcessArrayPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_StochasticProcessArrayPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_intOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
    if (items == 8) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_StochasticProcessArrayPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_intOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_doubleOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 7;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_7:
    
    if (items == 9) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_StochasticProcessArrayPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_intOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_doubleOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_intOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 8;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_8:
    
    if (items == 10) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_StochasticProcessArrayPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_intOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_doubleOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_intOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_long SWIG_PERL_CALL_ARGS_2(ST(9), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 9;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_9:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MCEuropeanBasketEngine__SWIG_8); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MCEuropeanBasketEngine__SWIG_7); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MCEuropeanBasketEngine__SWIG_6); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MCEuropeanBasketEngine__SWIG_5); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MCEuropeanBasketEngine__SWIG_4); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MCEuropeanBasketEngine__SWIG_3); return;
    case 7:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MCEuropeanBasketEngine__SWIG_2); return;
    case 8:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MCEuropeanBasketEngine__SWIG_1); return;
    case 9:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MCEuropeanBasketEngine__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_MCEuropeanBasketEngine'");
  XSRETURN(0);
}


XS(_wrap_delete_MCEuropeanBasketEngine) {
  {
    MCEuropeanBasketEnginePtr *arg1 = (MCEuropeanBasketEnginePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_MCEuropeanBasketEngine(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_MCEuropeanBasketEnginePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MCEuropeanBasketEngine" "', argument " "1"" of type '" "MCEuropeanBasketEnginePtr *""'"); 
    }
    arg1 = reinterpret_cast< MCEuropeanBasketEnginePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MCAmericanBasketEngine__SWIG_0) {
  {
    StochasticProcessArrayPtr *arg1 = 0 ;
    std::string *arg2 = 0 ;
    Size arg3 ;
    Size arg4 ;
    bool arg5 ;
    bool arg6 ;
    intOrNull arg7 ;
    doubleOrNull arg8 ;
    intOrNull arg9 ;
    BigInteger arg10 ;
    void *argp1 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    size_t val3 ;
    int ecode3 = 0 ;
    size_t val4 ;
    int ecode4 = 0 ;
    bool val5 ;
    int ecode5 = 0 ;
    bool val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    long val10 ;
    int ecode10 = 0 ;
    int argvi = 0;
    MCAmericanBasketEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 10) || (items > 10)) {
      SWIG_croak("Usage: new_MCAmericanBasketEngine(process,traits,timeSteps,timeStepsPerYear,brownianBridge,antitheticVariate,requiredSamples,requiredTolerance,maxSamples,seed);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_StochasticProcessArrayPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MCAmericanBasketEngine" "', argument " "1"" of type '" "StochasticProcessArrayPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCAmericanBasketEngine" "', argument " "1"" of type '" "StochasticProcessArrayPtr const &""'"); 
    }
    arg1 = reinterpret_cast< StochasticProcessArrayPtr * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MCAmericanBasketEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCAmericanBasketEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_MCAmericanBasketEngine" "', argument " "3"" of type '" "Size""'");
    } 
    arg3 = static_cast< Size >(val3);
    ecode4 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_MCAmericanBasketEngine" "', argument " "4"" of type '" "Size""'");
    } 
    arg4 = static_cast< Size >(val4);
    ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_MCAmericanBasketEngine" "', argument " "5"" of type '" "bool""'");
    } 
    arg5 = static_cast< bool >(val5);
    ecode6 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_MCAmericanBasketEngine" "', argument " "6"" of type '" "bool""'");
    } 
    arg6 = static_cast< bool >(val6);
    {
      res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_intOrNull,  0 );
      if (!SWIG_IsOK(res7)) {
        SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_MCAmericanBasketEngine" "', argument " "7"" of type '" "intOrNull""'"); 
      }  
      if (!argp7) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCAmericanBasketEngine" "', argument " "7"" of type '" "intOrNull""'");
      } else {
        arg7 = *(reinterpret_cast< intOrNull * >(argp7));
      }
    }
    {
      res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_doubleOrNull,  0 );
      if (!SWIG_IsOK(res8)) {
        SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_MCAmericanBasketEngine" "', argument " "8"" of type '" "doubleOrNull""'"); 
      }  
      if (!argp8) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCAmericanBasketEngine" "', argument " "8"" of type '" "doubleOrNull""'");
      } else {
        arg8 = *(reinterpret_cast< doubleOrNull * >(argp8));
      }
    }
    {
      res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_intOrNull,  0 );
      if (!SWIG_IsOK(res9)) {
        SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_MCAmericanBasketEngine" "', argument " "9"" of type '" "intOrNull""'"); 
      }  
      if (!argp9) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCAmericanBasketEngine" "', argument " "9"" of type '" "intOrNull""'");
      } else {
        arg9 = *(reinterpret_cast< intOrNull * >(argp9));
      }
    }
    ecode10 = SWIG_AsVal_long SWIG_PERL_CALL_ARGS_2(ST(9), &val10);
    if (!SWIG_IsOK(ecode10)) {
      SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "new_MCAmericanBasketEngine" "', argument " "10"" of type '" "BigInteger""'");
    } 
    arg10 = static_cast< BigInteger >(val10);
    {
      try {
        result = (MCAmericanBasketEnginePtr *)new_MCAmericanBasketEnginePtr__SWIG_0((StochasticProcessArrayPtr const &)*arg1,(std::string const &)*arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MCAmericanBasketEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MCAmericanBasketEngine__SWIG_1) {
  {
    StochasticProcessArrayPtr *arg1 = 0 ;
    std::string *arg2 = 0 ;
    Size arg3 ;
    Size arg4 ;
    bool arg5 ;
    bool arg6 ;
    intOrNull arg7 ;
    doubleOrNull arg8 ;
    intOrNull arg9 ;
    void *argp1 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    size_t val3 ;
    int ecode3 = 0 ;
    size_t val4 ;
    int ecode4 = 0 ;
    bool val5 ;
    int ecode5 = 0 ;
    bool val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    int argvi = 0;
    MCAmericanBasketEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 9) || (items > 9)) {
      SWIG_croak("Usage: new_MCAmericanBasketEngine(process,traits,timeSteps,timeStepsPerYear,brownianBridge,antitheticVariate,requiredSamples,requiredTolerance,maxSamples);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_StochasticProcessArrayPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MCAmericanBasketEngine" "', argument " "1"" of type '" "StochasticProcessArrayPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCAmericanBasketEngine" "', argument " "1"" of type '" "StochasticProcessArrayPtr const &""'"); 
    }
    arg1 = reinterpret_cast< StochasticProcessArrayPtr * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MCAmericanBasketEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCAmericanBasketEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_MCAmericanBasketEngine" "', argument " "3"" of type '" "Size""'");
    } 
    arg3 = static_cast< Size >(val3);
    ecode4 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_MCAmericanBasketEngine" "', argument " "4"" of type '" "Size""'");
    } 
    arg4 = static_cast< Size >(val4);
    ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_MCAmericanBasketEngine" "', argument " "5"" of type '" "bool""'");
    } 
    arg5 = static_cast< bool >(val5);
    ecode6 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_MCAmericanBasketEngine" "', argument " "6"" of type '" "bool""'");
    } 
    arg6 = static_cast< bool >(val6);
    {
      res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_intOrNull,  0 );
      if (!SWIG_IsOK(res7)) {
        SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_MCAmericanBasketEngine" "', argument " "7"" of type '" "intOrNull""'"); 
      }  
      if (!argp7) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCAmericanBasketEngine" "', argument " "7"" of type '" "intOrNull""'");
      } else {
        arg7 = *(reinterpret_cast< intOrNull * >(argp7));
      }
    }
    {
      res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_doubleOrNull,  0 );
      if (!SWIG_IsOK(res8)) {
        SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_MCAmericanBasketEngine" "', argument " "8"" of type '" "doubleOrNull""'"); 
      }  
      if (!argp8) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCAmericanBasketEngine" "', argument " "8"" of type '" "doubleOrNull""'");
      } else {
        arg8 = *(reinterpret_cast< doubleOrNull * >(argp8));
      }
    }
    {
      res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_intOrNull,  0 );
      if (!SWIG_IsOK(res9)) {
        SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_MCAmericanBasketEngine" "', argument " "9"" of type '" "intOrNull""'"); 
      }  
      if (!argp9) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCAmericanBasketEngine" "', argument " "9"" of type '" "intOrNull""'");
      } else {
        arg9 = *(reinterpret_cast< intOrNull * >(argp9));
      }
    }
    {
      try {
        result = (MCAmericanBasketEnginePtr *)new_MCAmericanBasketEnginePtr__SWIG_0((StochasticProcessArrayPtr const &)*arg1,(std::string const &)*arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MCAmericanBasketEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MCAmericanBasketEngine__SWIG_2) {
  {
    StochasticProcessArrayPtr *arg1 = 0 ;
    std::string *arg2 = 0 ;
    Size arg3 ;
    Size arg4 ;
    bool arg5 ;
    bool arg6 ;
    intOrNull arg7 ;
    doubleOrNull arg8 ;
    void *argp1 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    size_t val3 ;
    int ecode3 = 0 ;
    size_t val4 ;
    int ecode4 = 0 ;
    bool val5 ;
    int ecode5 = 0 ;
    bool val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    int argvi = 0;
    MCAmericanBasketEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 8) || (items > 8)) {
      SWIG_croak("Usage: new_MCAmericanBasketEngine(process,traits,timeSteps,timeStepsPerYear,brownianBridge,antitheticVariate,requiredSamples,requiredTolerance);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_StochasticProcessArrayPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MCAmericanBasketEngine" "', argument " "1"" of type '" "StochasticProcessArrayPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCAmericanBasketEngine" "', argument " "1"" of type '" "StochasticProcessArrayPtr const &""'"); 
    }
    arg1 = reinterpret_cast< StochasticProcessArrayPtr * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MCAmericanBasketEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCAmericanBasketEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_MCAmericanBasketEngine" "', argument " "3"" of type '" "Size""'");
    } 
    arg3 = static_cast< Size >(val3);
    ecode4 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_MCAmericanBasketEngine" "', argument " "4"" of type '" "Size""'");
    } 
    arg4 = static_cast< Size >(val4);
    ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_MCAmericanBasketEngine" "', argument " "5"" of type '" "bool""'");
    } 
    arg5 = static_cast< bool >(val5);
    ecode6 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_MCAmericanBasketEngine" "', argument " "6"" of type '" "bool""'");
    } 
    arg6 = static_cast< bool >(val6);
    {
      res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_intOrNull,  0 );
      if (!SWIG_IsOK(res7)) {
        SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_MCAmericanBasketEngine" "', argument " "7"" of type '" "intOrNull""'"); 
      }  
      if (!argp7) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCAmericanBasketEngine" "', argument " "7"" of type '" "intOrNull""'");
      } else {
        arg7 = *(reinterpret_cast< intOrNull * >(argp7));
      }
    }
    {
      res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_doubleOrNull,  0 );
      if (!SWIG_IsOK(res8)) {
        SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_MCAmericanBasketEngine" "', argument " "8"" of type '" "doubleOrNull""'"); 
      }  
      if (!argp8) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCAmericanBasketEngine" "', argument " "8"" of type '" "doubleOrNull""'");
      } else {
        arg8 = *(reinterpret_cast< doubleOrNull * >(argp8));
      }
    }
    {
      try {
        result = (MCAmericanBasketEnginePtr *)new_MCAmericanBasketEnginePtr__SWIG_0((StochasticProcessArrayPtr const &)*arg1,(std::string const &)*arg2,arg3,arg4,arg5,arg6,arg7,arg8);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MCAmericanBasketEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MCAmericanBasketEngine__SWIG_3) {
  {
    StochasticProcessArrayPtr *arg1 = 0 ;
    std::string *arg2 = 0 ;
    Size arg3 ;
    Size arg4 ;
    bool arg5 ;
    bool arg6 ;
    intOrNull arg7 ;
    void *argp1 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    size_t val3 ;
    int ecode3 = 0 ;
    size_t val4 ;
    int ecode4 = 0 ;
    bool val5 ;
    int ecode5 = 0 ;
    bool val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    int argvi = 0;
    MCAmericanBasketEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: new_MCAmericanBasketEngine(process,traits,timeSteps,timeStepsPerYear,brownianBridge,antitheticVariate,requiredSamples);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_StochasticProcessArrayPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MCAmericanBasketEngine" "', argument " "1"" of type '" "StochasticProcessArrayPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCAmericanBasketEngine" "', argument " "1"" of type '" "StochasticProcessArrayPtr const &""'"); 
    }
    arg1 = reinterpret_cast< StochasticProcessArrayPtr * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MCAmericanBasketEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCAmericanBasketEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_MCAmericanBasketEngine" "', argument " "3"" of type '" "Size""'");
    } 
    arg3 = static_cast< Size >(val3);
    ecode4 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_MCAmericanBasketEngine" "', argument " "4"" of type '" "Size""'");
    } 
    arg4 = static_cast< Size >(val4);
    ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_MCAmericanBasketEngine" "', argument " "5"" of type '" "bool""'");
    } 
    arg5 = static_cast< bool >(val5);
    ecode6 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_MCAmericanBasketEngine" "', argument " "6"" of type '" "bool""'");
    } 
    arg6 = static_cast< bool >(val6);
    {
      res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_intOrNull,  0 );
      if (!SWIG_IsOK(res7)) {
        SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_MCAmericanBasketEngine" "', argument " "7"" of type '" "intOrNull""'"); 
      }  
      if (!argp7) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCAmericanBasketEngine" "', argument " "7"" of type '" "intOrNull""'");
      } else {
        arg7 = *(reinterpret_cast< intOrNull * >(argp7));
      }
    }
    {
      try {
        result = (MCAmericanBasketEnginePtr *)new_MCAmericanBasketEnginePtr__SWIG_0((StochasticProcessArrayPtr const &)*arg1,(std::string const &)*arg2,arg3,arg4,arg5,arg6,arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MCAmericanBasketEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MCAmericanBasketEngine__SWIG_4) {
  {
    StochasticProcessArrayPtr *arg1 = 0 ;
    std::string *arg2 = 0 ;
    Size arg3 ;
    Size arg4 ;
    bool arg5 ;
    bool arg6 ;
    void *argp1 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    size_t val3 ;
    int ecode3 = 0 ;
    size_t val4 ;
    int ecode4 = 0 ;
    bool val5 ;
    int ecode5 = 0 ;
    bool val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    MCAmericanBasketEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_MCAmericanBasketEngine(process,traits,timeSteps,timeStepsPerYear,brownianBridge,antitheticVariate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_StochasticProcessArrayPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MCAmericanBasketEngine" "', argument " "1"" of type '" "StochasticProcessArrayPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCAmericanBasketEngine" "', argument " "1"" of type '" "StochasticProcessArrayPtr const &""'"); 
    }
    arg1 = reinterpret_cast< StochasticProcessArrayPtr * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MCAmericanBasketEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCAmericanBasketEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_MCAmericanBasketEngine" "', argument " "3"" of type '" "Size""'");
    } 
    arg3 = static_cast< Size >(val3);
    ecode4 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_MCAmericanBasketEngine" "', argument " "4"" of type '" "Size""'");
    } 
    arg4 = static_cast< Size >(val4);
    ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_MCAmericanBasketEngine" "', argument " "5"" of type '" "bool""'");
    } 
    arg5 = static_cast< bool >(val5);
    ecode6 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_MCAmericanBasketEngine" "', argument " "6"" of type '" "bool""'");
    } 
    arg6 = static_cast< bool >(val6);
    {
      try {
        result = (MCAmericanBasketEnginePtr *)new_MCAmericanBasketEnginePtr__SWIG_0((StochasticProcessArrayPtr const &)*arg1,(std::string const &)*arg2,arg3,arg4,arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MCAmericanBasketEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MCAmericanBasketEngine__SWIG_5) {
  {
    StochasticProcessArrayPtr *arg1 = 0 ;
    std::string *arg2 = 0 ;
    Size arg3 ;
    Size arg4 ;
    bool arg5 ;
    void *argp1 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    size_t val3 ;
    int ecode3 = 0 ;
    size_t val4 ;
    int ecode4 = 0 ;
    bool val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    MCAmericanBasketEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_MCAmericanBasketEngine(process,traits,timeSteps,timeStepsPerYear,brownianBridge);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_StochasticProcessArrayPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MCAmericanBasketEngine" "', argument " "1"" of type '" "StochasticProcessArrayPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCAmericanBasketEngine" "', argument " "1"" of type '" "StochasticProcessArrayPtr const &""'"); 
    }
    arg1 = reinterpret_cast< StochasticProcessArrayPtr * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MCAmericanBasketEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCAmericanBasketEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_MCAmericanBasketEngine" "', argument " "3"" of type '" "Size""'");
    } 
    arg3 = static_cast< Size >(val3);
    ecode4 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_MCAmericanBasketEngine" "', argument " "4"" of type '" "Size""'");
    } 
    arg4 = static_cast< Size >(val4);
    ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_MCAmericanBasketEngine" "', argument " "5"" of type '" "bool""'");
    } 
    arg5 = static_cast< bool >(val5);
    {
      try {
        result = (MCAmericanBasketEnginePtr *)new_MCAmericanBasketEnginePtr__SWIG_0((StochasticProcessArrayPtr const &)*arg1,(std::string const &)*arg2,arg3,arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MCAmericanBasketEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MCAmericanBasketEngine__SWIG_6) {
  {
    StochasticProcessArrayPtr *arg1 = 0 ;
    std::string *arg2 = 0 ;
    Size arg3 ;
    Size arg4 ;
    void *argp1 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    size_t val3 ;
    int ecode3 = 0 ;
    size_t val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    MCAmericanBasketEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_MCAmericanBasketEngine(process,traits,timeSteps,timeStepsPerYear);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_StochasticProcessArrayPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MCAmericanBasketEngine" "', argument " "1"" of type '" "StochasticProcessArrayPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCAmericanBasketEngine" "', argument " "1"" of type '" "StochasticProcessArrayPtr const &""'"); 
    }
    arg1 = reinterpret_cast< StochasticProcessArrayPtr * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MCAmericanBasketEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCAmericanBasketEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_MCAmericanBasketEngine" "', argument " "3"" of type '" "Size""'");
    } 
    arg3 = static_cast< Size >(val3);
    ecode4 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_MCAmericanBasketEngine" "', argument " "4"" of type '" "Size""'");
    } 
    arg4 = static_cast< Size >(val4);
    {
      try {
        result = (MCAmericanBasketEnginePtr *)new_MCAmericanBasketEnginePtr__SWIG_0((StochasticProcessArrayPtr const &)*arg1,(std::string const &)*arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MCAmericanBasketEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MCAmericanBasketEngine__SWIG_7) {
  {
    StochasticProcessArrayPtr *arg1 = 0 ;
    std::string *arg2 = 0 ;
    Size arg3 ;
    void *argp1 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    size_t val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    MCAmericanBasketEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_MCAmericanBasketEngine(process,traits,timeSteps);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_StochasticProcessArrayPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MCAmericanBasketEngine" "', argument " "1"" of type '" "StochasticProcessArrayPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCAmericanBasketEngine" "', argument " "1"" of type '" "StochasticProcessArrayPtr const &""'"); 
    }
    arg1 = reinterpret_cast< StochasticProcessArrayPtr * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MCAmericanBasketEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCAmericanBasketEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_MCAmericanBasketEngine" "', argument " "3"" of type '" "Size""'");
    } 
    arg3 = static_cast< Size >(val3);
    {
      try {
        result = (MCAmericanBasketEnginePtr *)new_MCAmericanBasketEnginePtr__SWIG_0((StochasticProcessArrayPtr const &)*arg1,(std::string const &)*arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MCAmericanBasketEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MCAmericanBasketEngine__SWIG_8) {
  {
    StochasticProcessArrayPtr *arg1 = 0 ;
    std::string *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    MCAmericanBasketEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_MCAmericanBasketEngine(process,traits);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_StochasticProcessArrayPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MCAmericanBasketEngine" "', argument " "1"" of type '" "StochasticProcessArrayPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCAmericanBasketEngine" "', argument " "1"" of type '" "StochasticProcessArrayPtr const &""'"); 
    }
    arg1 = reinterpret_cast< StochasticProcessArrayPtr * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MCAmericanBasketEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCAmericanBasketEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      try {
        result = (MCAmericanBasketEnginePtr *)new_MCAmericanBasketEnginePtr__SWIG_0((StochasticProcessArrayPtr const &)*arg1,(std::string const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MCAmericanBasketEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_new_MCAmericanBasketEngine) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_StochasticProcessArrayPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_StochasticProcessArrayPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_StochasticProcessArrayPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_StochasticProcessArrayPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_StochasticProcessArrayPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_StochasticProcessArrayPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_intOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
    if (items == 8) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_StochasticProcessArrayPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_intOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_doubleOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 7;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_7:
    
    if (items == 9) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_StochasticProcessArrayPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_intOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_doubleOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_intOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 8;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_8:
    
    if (items == 10) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_StochasticProcessArrayPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_intOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_doubleOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_intOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_long SWIG_PERL_CALL_ARGS_2(ST(9), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 9;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_9:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MCAmericanBasketEngine__SWIG_8); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MCAmericanBasketEngine__SWIG_7); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MCAmericanBasketEngine__SWIG_6); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MCAmericanBasketEngine__SWIG_5); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MCAmericanBasketEngine__SWIG_4); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MCAmericanBasketEngine__SWIG_3); return;
    case 7:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MCAmericanBasketEngine__SWIG_2); return;
    case 8:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MCAmericanBasketEngine__SWIG_1); return;
    case 9:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MCAmericanBasketEngine__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_MCAmericanBasketEngine'");
  XSRETURN(0);
}


XS(_wrap_delete_MCAmericanBasketEngine) {
  {
    MCAmericanBasketEnginePtr *arg1 = (MCAmericanBasketEnginePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_MCAmericanBasketEngine(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_MCAmericanBasketEnginePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MCAmericanBasketEngine" "', argument " "1"" of type '" "MCAmericanBasketEnginePtr *""'"); 
    }
    arg1 = reinterpret_cast< MCAmericanBasketEnginePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_StulzEngine) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    GeneralizedBlackScholesProcessPtr *arg2 = 0 ;
    Real arg3 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    StulzEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_StulzEngine(process1,process2,correlation);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_StulzEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_StulzEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_StulzEngine" "', argument " "2"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_StulzEngine" "', argument " "2"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg2 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_StulzEngine" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    {
      try {
        result = (StulzEnginePtr *)new_StulzEnginePtr((GeneralizedBlackScholesProcessPtr const &)*arg1,(GeneralizedBlackScholesProcessPtr const &)*arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_StulzEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_StulzEngine) {
  {
    StulzEnginePtr *arg1 = (StulzEnginePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_StulzEngine(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_StulzEnginePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_StulzEngine" "', argument " "1"" of type '" "StulzEnginePtr *""'"); 
    }
    arg1 = reinterpret_cast< StulzEnginePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_EverestOption) {
  {
    Real arg1 ;
    Rate arg2 ;
    boost::shared_ptr< Exercise > *arg3 = 0 ;
    double val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    EverestOptionPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_EverestOption(notional,guarantee,exercise);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_EverestOption" "', argument " "1"" of type '" "Real""'");
    } 
    arg1 = static_cast< Real >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_EverestOption" "', argument " "2"" of type '" "Rate""'");
    } 
    arg2 = static_cast< Rate >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_boost__shared_ptrT_Exercise_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_EverestOption" "', argument " "3"" of type '" "boost::shared_ptr< Exercise > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EverestOption" "', argument " "3"" of type '" "boost::shared_ptr< Exercise > const &""'"); 
    }
    arg3 = reinterpret_cast< boost::shared_ptr< Exercise > * >(argp3);
    {
      try {
        result = (EverestOptionPtr *)new_EverestOptionPtr(arg1,arg2,(boost::shared_ptr< Exercise > const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EverestOptionPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_EverestOption) {
  {
    EverestOptionPtr *arg1 = (EverestOptionPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_EverestOption(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_EverestOptionPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_EverestOption" "', argument " "1"" of type '" "EverestOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< EverestOptionPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MCEverestEngine__SWIG_0) {
  {
    StochasticProcessArrayPtr *arg1 = 0 ;
    std::string *arg2 = 0 ;
    Size arg3 ;
    Size arg4 ;
    bool arg5 ;
    bool arg6 ;
    intOrNull arg7 ;
    doubleOrNull arg8 ;
    intOrNull arg9 ;
    BigInteger arg10 ;
    void *argp1 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    size_t val3 ;
    int ecode3 = 0 ;
    size_t val4 ;
    int ecode4 = 0 ;
    bool val5 ;
    int ecode5 = 0 ;
    bool val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    long val10 ;
    int ecode10 = 0 ;
    int argvi = 0;
    MCEverestEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 10) || (items > 10)) {
      SWIG_croak("Usage: new_MCEverestEngine(process,traits,timeSteps,timeStepsPerYear,brownianBridge,antitheticVariate,requiredSamples,requiredTolerance,maxSamples,seed);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_StochasticProcessArrayPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MCEverestEngine" "', argument " "1"" of type '" "StochasticProcessArrayPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEverestEngine" "', argument " "1"" of type '" "StochasticProcessArrayPtr const &""'"); 
    }
    arg1 = reinterpret_cast< StochasticProcessArrayPtr * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MCEverestEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEverestEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_MCEverestEngine" "', argument " "3"" of type '" "Size""'");
    } 
    arg3 = static_cast< Size >(val3);
    ecode4 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_MCEverestEngine" "', argument " "4"" of type '" "Size""'");
    } 
    arg4 = static_cast< Size >(val4);
    ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_MCEverestEngine" "', argument " "5"" of type '" "bool""'");
    } 
    arg5 = static_cast< bool >(val5);
    ecode6 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_MCEverestEngine" "', argument " "6"" of type '" "bool""'");
    } 
    arg6 = static_cast< bool >(val6);
    {
      res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_intOrNull,  0 );
      if (!SWIG_IsOK(res7)) {
        SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_MCEverestEngine" "', argument " "7"" of type '" "intOrNull""'"); 
      }  
      if (!argp7) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEverestEngine" "', argument " "7"" of type '" "intOrNull""'");
      } else {
        arg7 = *(reinterpret_cast< intOrNull * >(argp7));
      }
    }
    {
      res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_doubleOrNull,  0 );
      if (!SWIG_IsOK(res8)) {
        SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_MCEverestEngine" "', argument " "8"" of type '" "doubleOrNull""'"); 
      }  
      if (!argp8) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEverestEngine" "', argument " "8"" of type '" "doubleOrNull""'");
      } else {
        arg8 = *(reinterpret_cast< doubleOrNull * >(argp8));
      }
    }
    {
      res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_intOrNull,  0 );
      if (!SWIG_IsOK(res9)) {
        SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_MCEverestEngine" "', argument " "9"" of type '" "intOrNull""'"); 
      }  
      if (!argp9) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEverestEngine" "', argument " "9"" of type '" "intOrNull""'");
      } else {
        arg9 = *(reinterpret_cast< intOrNull * >(argp9));
      }
    }
    ecode10 = SWIG_AsVal_long SWIG_PERL_CALL_ARGS_2(ST(9), &val10);
    if (!SWIG_IsOK(ecode10)) {
      SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "new_MCEverestEngine" "', argument " "10"" of type '" "BigInteger""'");
    } 
    arg10 = static_cast< BigInteger >(val10);
    {
      try {
        result = (MCEverestEnginePtr *)new_MCEverestEnginePtr__SWIG_0((StochasticProcessArrayPtr const &)*arg1,(std::string const &)*arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MCEverestEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MCEverestEngine__SWIG_1) {
  {
    StochasticProcessArrayPtr *arg1 = 0 ;
    std::string *arg2 = 0 ;
    Size arg3 ;
    Size arg4 ;
    bool arg5 ;
    bool arg6 ;
    intOrNull arg7 ;
    doubleOrNull arg8 ;
    intOrNull arg9 ;
    void *argp1 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    size_t val3 ;
    int ecode3 = 0 ;
    size_t val4 ;
    int ecode4 = 0 ;
    bool val5 ;
    int ecode5 = 0 ;
    bool val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    int argvi = 0;
    MCEverestEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 9) || (items > 9)) {
      SWIG_croak("Usage: new_MCEverestEngine(process,traits,timeSteps,timeStepsPerYear,brownianBridge,antitheticVariate,requiredSamples,requiredTolerance,maxSamples);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_StochasticProcessArrayPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MCEverestEngine" "', argument " "1"" of type '" "StochasticProcessArrayPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEverestEngine" "', argument " "1"" of type '" "StochasticProcessArrayPtr const &""'"); 
    }
    arg1 = reinterpret_cast< StochasticProcessArrayPtr * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MCEverestEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEverestEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_MCEverestEngine" "', argument " "3"" of type '" "Size""'");
    } 
    arg3 = static_cast< Size >(val3);
    ecode4 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_MCEverestEngine" "', argument " "4"" of type '" "Size""'");
    } 
    arg4 = static_cast< Size >(val4);
    ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_MCEverestEngine" "', argument " "5"" of type '" "bool""'");
    } 
    arg5 = static_cast< bool >(val5);
    ecode6 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_MCEverestEngine" "', argument " "6"" of type '" "bool""'");
    } 
    arg6 = static_cast< bool >(val6);
    {
      res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_intOrNull,  0 );
      if (!SWIG_IsOK(res7)) {
        SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_MCEverestEngine" "', argument " "7"" of type '" "intOrNull""'"); 
      }  
      if (!argp7) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEverestEngine" "', argument " "7"" of type '" "intOrNull""'");
      } else {
        arg7 = *(reinterpret_cast< intOrNull * >(argp7));
      }
    }
    {
      res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_doubleOrNull,  0 );
      if (!SWIG_IsOK(res8)) {
        SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_MCEverestEngine" "', argument " "8"" of type '" "doubleOrNull""'"); 
      }  
      if (!argp8) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEverestEngine" "', argument " "8"" of type '" "doubleOrNull""'");
      } else {
        arg8 = *(reinterpret_cast< doubleOrNull * >(argp8));
      }
    }
    {
      res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_intOrNull,  0 );
      if (!SWIG_IsOK(res9)) {
        SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_MCEverestEngine" "', argument " "9"" of type '" "intOrNull""'"); 
      }  
      if (!argp9) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEverestEngine" "', argument " "9"" of type '" "intOrNull""'");
      } else {
        arg9 = *(reinterpret_cast< intOrNull * >(argp9));
      }
    }
    {
      try {
        result = (MCEverestEnginePtr *)new_MCEverestEnginePtr__SWIG_0((StochasticProcessArrayPtr const &)*arg1,(std::string const &)*arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MCEverestEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MCEverestEngine__SWIG_2) {
  {
    StochasticProcessArrayPtr *arg1 = 0 ;
    std::string *arg2 = 0 ;
    Size arg3 ;
    Size arg4 ;
    bool arg5 ;
    bool arg6 ;
    intOrNull arg7 ;
    doubleOrNull arg8 ;
    void *argp1 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    size_t val3 ;
    int ecode3 = 0 ;
    size_t val4 ;
    int ecode4 = 0 ;
    bool val5 ;
    int ecode5 = 0 ;
    bool val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    int argvi = 0;
    MCEverestEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 8) || (items > 8)) {
      SWIG_croak("Usage: new_MCEverestEngine(process,traits,timeSteps,timeStepsPerYear,brownianBridge,antitheticVariate,requiredSamples,requiredTolerance);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_StochasticProcessArrayPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MCEverestEngine" "', argument " "1"" of type '" "StochasticProcessArrayPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEverestEngine" "', argument " "1"" of type '" "StochasticProcessArrayPtr const &""'"); 
    }
    arg1 = reinterpret_cast< StochasticProcessArrayPtr * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MCEverestEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEverestEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_MCEverestEngine" "', argument " "3"" of type '" "Size""'");
    } 
    arg3 = static_cast< Size >(val3);
    ecode4 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_MCEverestEngine" "', argument " "4"" of type '" "Size""'");
    } 
    arg4 = static_cast< Size >(val4);
    ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_MCEverestEngine" "', argument " "5"" of type '" "bool""'");
    } 
    arg5 = static_cast< bool >(val5);
    ecode6 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_MCEverestEngine" "', argument " "6"" of type '" "bool""'");
    } 
    arg6 = static_cast< bool >(val6);
    {
      res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_intOrNull,  0 );
      if (!SWIG_IsOK(res7)) {
        SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_MCEverestEngine" "', argument " "7"" of type '" "intOrNull""'"); 
      }  
      if (!argp7) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEverestEngine" "', argument " "7"" of type '" "intOrNull""'");
      } else {
        arg7 = *(reinterpret_cast< intOrNull * >(argp7));
      }
    }
    {
      res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_doubleOrNull,  0 );
      if (!SWIG_IsOK(res8)) {
        SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_MCEverestEngine" "', argument " "8"" of type '" "doubleOrNull""'"); 
      }  
      if (!argp8) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEverestEngine" "', argument " "8"" of type '" "doubleOrNull""'");
      } else {
        arg8 = *(reinterpret_cast< doubleOrNull * >(argp8));
      }
    }
    {
      try {
        result = (MCEverestEnginePtr *)new_MCEverestEnginePtr__SWIG_0((StochasticProcessArrayPtr const &)*arg1,(std::string const &)*arg2,arg3,arg4,arg5,arg6,arg7,arg8);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MCEverestEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MCEverestEngine__SWIG_3) {
  {
    StochasticProcessArrayPtr *arg1 = 0 ;
    std::string *arg2 = 0 ;
    Size arg3 ;
    Size arg4 ;
    bool arg5 ;
    bool arg6 ;
    intOrNull arg7 ;
    void *argp1 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    size_t val3 ;
    int ecode3 = 0 ;
    size_t val4 ;
    int ecode4 = 0 ;
    bool val5 ;
    int ecode5 = 0 ;
    bool val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    int argvi = 0;
    MCEverestEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: new_MCEverestEngine(process,traits,timeSteps,timeStepsPerYear,brownianBridge,antitheticVariate,requiredSamples);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_StochasticProcessArrayPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MCEverestEngine" "', argument " "1"" of type '" "StochasticProcessArrayPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEverestEngine" "', argument " "1"" of type '" "StochasticProcessArrayPtr const &""'"); 
    }
    arg1 = reinterpret_cast< StochasticProcessArrayPtr * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MCEverestEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEverestEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_MCEverestEngine" "', argument " "3"" of type '" "Size""'");
    } 
    arg3 = static_cast< Size >(val3);
    ecode4 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_MCEverestEngine" "', argument " "4"" of type '" "Size""'");
    } 
    arg4 = static_cast< Size >(val4);
    ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_MCEverestEngine" "', argument " "5"" of type '" "bool""'");
    } 
    arg5 = static_cast< bool >(val5);
    ecode6 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_MCEverestEngine" "', argument " "6"" of type '" "bool""'");
    } 
    arg6 = static_cast< bool >(val6);
    {
      res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_intOrNull,  0 );
      if (!SWIG_IsOK(res7)) {
        SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_MCEverestEngine" "', argument " "7"" of type '" "intOrNull""'"); 
      }  
      if (!argp7) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEverestEngine" "', argument " "7"" of type '" "intOrNull""'");
      } else {
        arg7 = *(reinterpret_cast< intOrNull * >(argp7));
      }
    }
    {
      try {
        result = (MCEverestEnginePtr *)new_MCEverestEnginePtr__SWIG_0((StochasticProcessArrayPtr const &)*arg1,(std::string const &)*arg2,arg3,arg4,arg5,arg6,arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MCEverestEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MCEverestEngine__SWIG_4) {
  {
    StochasticProcessArrayPtr *arg1 = 0 ;
    std::string *arg2 = 0 ;
    Size arg3 ;
    Size arg4 ;
    bool arg5 ;
    bool arg6 ;
    void *argp1 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    size_t val3 ;
    int ecode3 = 0 ;
    size_t val4 ;
    int ecode4 = 0 ;
    bool val5 ;
    int ecode5 = 0 ;
    bool val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    MCEverestEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_MCEverestEngine(process,traits,timeSteps,timeStepsPerYear,brownianBridge,antitheticVariate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_StochasticProcessArrayPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MCEverestEngine" "', argument " "1"" of type '" "StochasticProcessArrayPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEverestEngine" "', argument " "1"" of type '" "StochasticProcessArrayPtr const &""'"); 
    }
    arg1 = reinterpret_cast< StochasticProcessArrayPtr * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MCEverestEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEverestEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_MCEverestEngine" "', argument " "3"" of type '" "Size""'");
    } 
    arg3 = static_cast< Size >(val3);
    ecode4 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_MCEverestEngine" "', argument " "4"" of type '" "Size""'");
    } 
    arg4 = static_cast< Size >(val4);
    ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_MCEverestEngine" "', argument " "5"" of type '" "bool""'");
    } 
    arg5 = static_cast< bool >(val5);
    ecode6 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_MCEverestEngine" "', argument " "6"" of type '" "bool""'");
    } 
    arg6 = static_cast< bool >(val6);
    {
      try {
        result = (MCEverestEnginePtr *)new_MCEverestEnginePtr__SWIG_0((StochasticProcessArrayPtr const &)*arg1,(std::string const &)*arg2,arg3,arg4,arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MCEverestEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MCEverestEngine__SWIG_5) {
  {
    StochasticProcessArrayPtr *arg1 = 0 ;
    std::string *arg2 = 0 ;
    Size arg3 ;
    Size arg4 ;
    bool arg5 ;
    void *argp1 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    size_t val3 ;
    int ecode3 = 0 ;
    size_t val4 ;
    int ecode4 = 0 ;
    bool val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    MCEverestEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_MCEverestEngine(process,traits,timeSteps,timeStepsPerYear,brownianBridge);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_StochasticProcessArrayPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MCEverestEngine" "', argument " "1"" of type '" "StochasticProcessArrayPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEverestEngine" "', argument " "1"" of type '" "StochasticProcessArrayPtr const &""'"); 
    }
    arg1 = reinterpret_cast< StochasticProcessArrayPtr * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MCEverestEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEverestEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_MCEverestEngine" "', argument " "3"" of type '" "Size""'");
    } 
    arg3 = static_cast< Size >(val3);
    ecode4 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_MCEverestEngine" "', argument " "4"" of type '" "Size""'");
    } 
    arg4 = static_cast< Size >(val4);
    ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_MCEverestEngine" "', argument " "5"" of type '" "bool""'");
    } 
    arg5 = static_cast< bool >(val5);
    {
      try {
        result = (MCEverestEnginePtr *)new_MCEverestEnginePtr__SWIG_0((StochasticProcessArrayPtr const &)*arg1,(std::string const &)*arg2,arg3,arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MCEverestEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MCEverestEngine__SWIG_6) {
  {
    StochasticProcessArrayPtr *arg1 = 0 ;
    std::string *arg2 = 0 ;
    Size arg3 ;
    Size arg4 ;
    void *argp1 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    size_t val3 ;
    int ecode3 = 0 ;
    size_t val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    MCEverestEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_MCEverestEngine(process,traits,timeSteps,timeStepsPerYear);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_StochasticProcessArrayPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MCEverestEngine" "', argument " "1"" of type '" "StochasticProcessArrayPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEverestEngine" "', argument " "1"" of type '" "StochasticProcessArrayPtr const &""'"); 
    }
    arg1 = reinterpret_cast< StochasticProcessArrayPtr * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MCEverestEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEverestEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_MCEverestEngine" "', argument " "3"" of type '" "Size""'");
    } 
    arg3 = static_cast< Size >(val3);
    ecode4 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_MCEverestEngine" "', argument " "4"" of type '" "Size""'");
    } 
    arg4 = static_cast< Size >(val4);
    {
      try {
        result = (MCEverestEnginePtr *)new_MCEverestEnginePtr__SWIG_0((StochasticProcessArrayPtr const &)*arg1,(std::string const &)*arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MCEverestEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MCEverestEngine__SWIG_7) {
  {
    StochasticProcessArrayPtr *arg1 = 0 ;
    std::string *arg2 = 0 ;
    Size arg3 ;
    void *argp1 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    size_t val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    MCEverestEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_MCEverestEngine(process,traits,timeSteps);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_StochasticProcessArrayPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MCEverestEngine" "', argument " "1"" of type '" "StochasticProcessArrayPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEverestEngine" "', argument " "1"" of type '" "StochasticProcessArrayPtr const &""'"); 
    }
    arg1 = reinterpret_cast< StochasticProcessArrayPtr * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MCEverestEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEverestEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_MCEverestEngine" "', argument " "3"" of type '" "Size""'");
    } 
    arg3 = static_cast< Size >(val3);
    {
      try {
        result = (MCEverestEnginePtr *)new_MCEverestEnginePtr__SWIG_0((StochasticProcessArrayPtr const &)*arg1,(std::string const &)*arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MCEverestEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MCEverestEngine__SWIG_8) {
  {
    StochasticProcessArrayPtr *arg1 = 0 ;
    std::string *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    MCEverestEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_MCEverestEngine(process,traits);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_StochasticProcessArrayPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MCEverestEngine" "', argument " "1"" of type '" "StochasticProcessArrayPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEverestEngine" "', argument " "1"" of type '" "StochasticProcessArrayPtr const &""'"); 
    }
    arg1 = reinterpret_cast< StochasticProcessArrayPtr * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MCEverestEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCEverestEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      try {
        result = (MCEverestEnginePtr *)new_MCEverestEnginePtr__SWIG_0((StochasticProcessArrayPtr const &)*arg1,(std::string const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MCEverestEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_new_MCEverestEngine) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_StochasticProcessArrayPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_StochasticProcessArrayPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_StochasticProcessArrayPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_StochasticProcessArrayPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_StochasticProcessArrayPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_StochasticProcessArrayPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_intOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
    if (items == 8) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_StochasticProcessArrayPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_intOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_doubleOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 7;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_7:
    
    if (items == 9) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_StochasticProcessArrayPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_intOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_doubleOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_intOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 8;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_8:
    
    if (items == 10) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_StochasticProcessArrayPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_intOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_doubleOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_intOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_long SWIG_PERL_CALL_ARGS_2(ST(9), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 9;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_9:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MCEverestEngine__SWIG_8); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MCEverestEngine__SWIG_7); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MCEverestEngine__SWIG_6); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MCEverestEngine__SWIG_5); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MCEverestEngine__SWIG_4); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MCEverestEngine__SWIG_3); return;
    case 7:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MCEverestEngine__SWIG_2); return;
    case 8:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MCEverestEngine__SWIG_1); return;
    case 9:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MCEverestEngine__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_MCEverestEngine'");
  XSRETURN(0);
}


XS(_wrap_delete_MCEverestEngine) {
  {
    MCEverestEnginePtr *arg1 = (MCEverestEnginePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_MCEverestEngine(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_MCEverestEnginePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MCEverestEngine" "', argument " "1"" of type '" "MCEverestEnginePtr *""'"); 
    }
    arg1 = reinterpret_cast< MCEverestEnginePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_HimalayaOption) {
  {
    std::vector< Date > *arg1 = 0 ;
    Real arg2 ;
    std::vector< Date > temp1 ;
    std::vector< Date > *v1 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    HimalayaOptionPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_HimalayaOption(fixingDates,strike);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_HimalayaOption. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_HimalayaOption. "
              "Expected an array of " "Date");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_HimalayaOption. "
          "Expected an array of " "Date");
      }
    }
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_HimalayaOption" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (HimalayaOptionPtr *)new_HimalayaOptionPtr((std::vector< Date > const &)*arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_HimalayaOptionPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_HimalayaOption) {
  {
    HimalayaOptionPtr *arg1 = (HimalayaOptionPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_HimalayaOption(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HimalayaOptionPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_HimalayaOption" "', argument " "1"" of type '" "HimalayaOptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< HimalayaOptionPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MCHimalayaEngine__SWIG_0) {
  {
    StochasticProcessArrayPtr *arg1 = 0 ;
    std::string *arg2 = 0 ;
    bool arg3 ;
    bool arg4 ;
    intOrNull arg5 ;
    doubleOrNull arg6 ;
    intOrNull arg7 ;
    BigInteger arg8 ;
    void *argp1 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    bool val3 ;
    int ecode3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    long val8 ;
    int ecode8 = 0 ;
    int argvi = 0;
    MCHimalayaEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 8) || (items > 8)) {
      SWIG_croak("Usage: new_MCHimalayaEngine(process,traits,brownianBridge,antitheticVariate,requiredSamples,requiredTolerance,maxSamples,seed);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_StochasticProcessArrayPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MCHimalayaEngine" "', argument " "1"" of type '" "StochasticProcessArrayPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCHimalayaEngine" "', argument " "1"" of type '" "StochasticProcessArrayPtr const &""'"); 
    }
    arg1 = reinterpret_cast< StochasticProcessArrayPtr * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MCHimalayaEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCHimalayaEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_MCHimalayaEngine" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_MCHimalayaEngine" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    {
      res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_intOrNull,  0 );
      if (!SWIG_IsOK(res5)) {
        SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_MCHimalayaEngine" "', argument " "5"" of type '" "intOrNull""'"); 
      }  
      if (!argp5) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCHimalayaEngine" "', argument " "5"" of type '" "intOrNull""'");
      } else {
        arg5 = *(reinterpret_cast< intOrNull * >(argp5));
      }
    }
    {
      res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_doubleOrNull,  0 );
      if (!SWIG_IsOK(res6)) {
        SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_MCHimalayaEngine" "', argument " "6"" of type '" "doubleOrNull""'"); 
      }  
      if (!argp6) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCHimalayaEngine" "', argument " "6"" of type '" "doubleOrNull""'");
      } else {
        arg6 = *(reinterpret_cast< doubleOrNull * >(argp6));
      }
    }
    {
      res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_intOrNull,  0 );
      if (!SWIG_IsOK(res7)) {
        SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_MCHimalayaEngine" "', argument " "7"" of type '" "intOrNull""'"); 
      }  
      if (!argp7) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCHimalayaEngine" "', argument " "7"" of type '" "intOrNull""'");
      } else {
        arg7 = *(reinterpret_cast< intOrNull * >(argp7));
      }
    }
    ecode8 = SWIG_AsVal_long SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_MCHimalayaEngine" "', argument " "8"" of type '" "BigInteger""'");
    } 
    arg8 = static_cast< BigInteger >(val8);
    {
      try {
        result = (MCHimalayaEnginePtr *)new_MCHimalayaEnginePtr__SWIG_0((StochasticProcessArrayPtr const &)*arg1,(std::string const &)*arg2,arg3,arg4,arg5,arg6,arg7,arg8);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MCHimalayaEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MCHimalayaEngine__SWIG_1) {
  {
    StochasticProcessArrayPtr *arg1 = 0 ;
    std::string *arg2 = 0 ;
    bool arg3 ;
    bool arg4 ;
    intOrNull arg5 ;
    doubleOrNull arg6 ;
    intOrNull arg7 ;
    void *argp1 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    bool val3 ;
    int ecode3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    int argvi = 0;
    MCHimalayaEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: new_MCHimalayaEngine(process,traits,brownianBridge,antitheticVariate,requiredSamples,requiredTolerance,maxSamples);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_StochasticProcessArrayPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MCHimalayaEngine" "', argument " "1"" of type '" "StochasticProcessArrayPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCHimalayaEngine" "', argument " "1"" of type '" "StochasticProcessArrayPtr const &""'"); 
    }
    arg1 = reinterpret_cast< StochasticProcessArrayPtr * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MCHimalayaEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCHimalayaEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_MCHimalayaEngine" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_MCHimalayaEngine" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    {
      res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_intOrNull,  0 );
      if (!SWIG_IsOK(res5)) {
        SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_MCHimalayaEngine" "', argument " "5"" of type '" "intOrNull""'"); 
      }  
      if (!argp5) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCHimalayaEngine" "', argument " "5"" of type '" "intOrNull""'");
      } else {
        arg5 = *(reinterpret_cast< intOrNull * >(argp5));
      }
    }
    {
      res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_doubleOrNull,  0 );
      if (!SWIG_IsOK(res6)) {
        SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_MCHimalayaEngine" "', argument " "6"" of type '" "doubleOrNull""'"); 
      }  
      if (!argp6) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCHimalayaEngine" "', argument " "6"" of type '" "doubleOrNull""'");
      } else {
        arg6 = *(reinterpret_cast< doubleOrNull * >(argp6));
      }
    }
    {
      res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_intOrNull,  0 );
      if (!SWIG_IsOK(res7)) {
        SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_MCHimalayaEngine" "', argument " "7"" of type '" "intOrNull""'"); 
      }  
      if (!argp7) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCHimalayaEngine" "', argument " "7"" of type '" "intOrNull""'");
      } else {
        arg7 = *(reinterpret_cast< intOrNull * >(argp7));
      }
    }
    {
      try {
        result = (MCHimalayaEnginePtr *)new_MCHimalayaEnginePtr__SWIG_0((StochasticProcessArrayPtr const &)*arg1,(std::string const &)*arg2,arg3,arg4,arg5,arg6,arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MCHimalayaEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MCHimalayaEngine__SWIG_2) {
  {
    StochasticProcessArrayPtr *arg1 = 0 ;
    std::string *arg2 = 0 ;
    bool arg3 ;
    bool arg4 ;
    intOrNull arg5 ;
    doubleOrNull arg6 ;
    void *argp1 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    bool val3 ;
    int ecode3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    int argvi = 0;
    MCHimalayaEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_MCHimalayaEngine(process,traits,brownianBridge,antitheticVariate,requiredSamples,requiredTolerance);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_StochasticProcessArrayPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MCHimalayaEngine" "', argument " "1"" of type '" "StochasticProcessArrayPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCHimalayaEngine" "', argument " "1"" of type '" "StochasticProcessArrayPtr const &""'"); 
    }
    arg1 = reinterpret_cast< StochasticProcessArrayPtr * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MCHimalayaEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCHimalayaEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_MCHimalayaEngine" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_MCHimalayaEngine" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    {
      res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_intOrNull,  0 );
      if (!SWIG_IsOK(res5)) {
        SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_MCHimalayaEngine" "', argument " "5"" of type '" "intOrNull""'"); 
      }  
      if (!argp5) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCHimalayaEngine" "', argument " "5"" of type '" "intOrNull""'");
      } else {
        arg5 = *(reinterpret_cast< intOrNull * >(argp5));
      }
    }
    {
      res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_doubleOrNull,  0 );
      if (!SWIG_IsOK(res6)) {
        SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_MCHimalayaEngine" "', argument " "6"" of type '" "doubleOrNull""'"); 
      }  
      if (!argp6) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCHimalayaEngine" "', argument " "6"" of type '" "doubleOrNull""'");
      } else {
        arg6 = *(reinterpret_cast< doubleOrNull * >(argp6));
      }
    }
    {
      try {
        result = (MCHimalayaEnginePtr *)new_MCHimalayaEnginePtr__SWIG_0((StochasticProcessArrayPtr const &)*arg1,(std::string const &)*arg2,arg3,arg4,arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MCHimalayaEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MCHimalayaEngine__SWIG_3) {
  {
    StochasticProcessArrayPtr *arg1 = 0 ;
    std::string *arg2 = 0 ;
    bool arg3 ;
    bool arg4 ;
    intOrNull arg5 ;
    void *argp1 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    bool val3 ;
    int ecode3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int argvi = 0;
    MCHimalayaEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_MCHimalayaEngine(process,traits,brownianBridge,antitheticVariate,requiredSamples);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_StochasticProcessArrayPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MCHimalayaEngine" "', argument " "1"" of type '" "StochasticProcessArrayPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCHimalayaEngine" "', argument " "1"" of type '" "StochasticProcessArrayPtr const &""'"); 
    }
    arg1 = reinterpret_cast< StochasticProcessArrayPtr * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MCHimalayaEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCHimalayaEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_MCHimalayaEngine" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_MCHimalayaEngine" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    {
      res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_intOrNull,  0 );
      if (!SWIG_IsOK(res5)) {
        SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_MCHimalayaEngine" "', argument " "5"" of type '" "intOrNull""'"); 
      }  
      if (!argp5) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCHimalayaEngine" "', argument " "5"" of type '" "intOrNull""'");
      } else {
        arg5 = *(reinterpret_cast< intOrNull * >(argp5));
      }
    }
    {
      try {
        result = (MCHimalayaEnginePtr *)new_MCHimalayaEnginePtr__SWIG_0((StochasticProcessArrayPtr const &)*arg1,(std::string const &)*arg2,arg3,arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MCHimalayaEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MCHimalayaEngine__SWIG_4) {
  {
    StochasticProcessArrayPtr *arg1 = 0 ;
    std::string *arg2 = 0 ;
    bool arg3 ;
    bool arg4 ;
    void *argp1 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    bool val3 ;
    int ecode3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    MCHimalayaEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_MCHimalayaEngine(process,traits,brownianBridge,antitheticVariate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_StochasticProcessArrayPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MCHimalayaEngine" "', argument " "1"" of type '" "StochasticProcessArrayPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCHimalayaEngine" "', argument " "1"" of type '" "StochasticProcessArrayPtr const &""'"); 
    }
    arg1 = reinterpret_cast< StochasticProcessArrayPtr * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MCHimalayaEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCHimalayaEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_MCHimalayaEngine" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_MCHimalayaEngine" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    {
      try {
        result = (MCHimalayaEnginePtr *)new_MCHimalayaEnginePtr__SWIG_0((StochasticProcessArrayPtr const &)*arg1,(std::string const &)*arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MCHimalayaEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MCHimalayaEngine__SWIG_5) {
  {
    StochasticProcessArrayPtr *arg1 = 0 ;
    std::string *arg2 = 0 ;
    bool arg3 ;
    void *argp1 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    MCHimalayaEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_MCHimalayaEngine(process,traits,brownianBridge);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_StochasticProcessArrayPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MCHimalayaEngine" "', argument " "1"" of type '" "StochasticProcessArrayPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCHimalayaEngine" "', argument " "1"" of type '" "StochasticProcessArrayPtr const &""'"); 
    }
    arg1 = reinterpret_cast< StochasticProcessArrayPtr * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MCHimalayaEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCHimalayaEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_MCHimalayaEngine" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (MCHimalayaEnginePtr *)new_MCHimalayaEnginePtr__SWIG_0((StochasticProcessArrayPtr const &)*arg1,(std::string const &)*arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MCHimalayaEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MCHimalayaEngine__SWIG_6) {
  {
    StochasticProcessArrayPtr *arg1 = 0 ;
    std::string *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    MCHimalayaEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_MCHimalayaEngine(process,traits);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_StochasticProcessArrayPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MCHimalayaEngine" "', argument " "1"" of type '" "StochasticProcessArrayPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCHimalayaEngine" "', argument " "1"" of type '" "StochasticProcessArrayPtr const &""'"); 
    }
    arg1 = reinterpret_cast< StochasticProcessArrayPtr * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MCHimalayaEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MCHimalayaEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      try {
        result = (MCHimalayaEnginePtr *)new_MCHimalayaEnginePtr__SWIG_0((StochasticProcessArrayPtr const &)*arg1,(std::string const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MCHimalayaEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_new_MCHimalayaEngine) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_StochasticProcessArrayPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_StochasticProcessArrayPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_StochasticProcessArrayPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_StochasticProcessArrayPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_intOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_StochasticProcessArrayPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_intOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_doubleOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_StochasticProcessArrayPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_intOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_doubleOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_intOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
    if (items == 8) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_StochasticProcessArrayPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_intOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_doubleOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_intOrNull, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_long SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 7;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_7:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MCHimalayaEngine__SWIG_6); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MCHimalayaEngine__SWIG_5); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MCHimalayaEngine__SWIG_4); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MCHimalayaEngine__SWIG_3); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MCHimalayaEngine__SWIG_2); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MCHimalayaEngine__SWIG_1); return;
    case 7:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MCHimalayaEngine__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_MCHimalayaEngine'");
  XSRETURN(0);
}


XS(_wrap_delete_MCHimalayaEngine) {
  {
    MCHimalayaEnginePtr *arg1 = (MCHimalayaEnginePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_MCHimalayaEngine(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_MCHimalayaEnginePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MCHimalayaEngine" "', argument " "1"" of type '" "MCHimalayaEnginePtr *""'"); 
    }
    arg1 = reinterpret_cast< MCHimalayaEnginePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_blackFormula__SWIG_0) {
  {
    Option::Type arg1 ;
    Real arg2 ;
    Real arg3 ;
    Real arg4 ;
    Real arg5 ;
    Real arg6 ;
    int val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    double val5 ;
    int ecode5 = 0 ;
    double val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: blackFormula(optionType,strike,forward,stdDev,discount,displacement);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "blackFormula" "', argument " "1"" of type '" "Option::Type""'");
    } 
    arg1 = static_cast< Option::Type >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "blackFormula" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "blackFormula" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "blackFormula" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "blackFormula" "', argument " "5"" of type '" "Real""'");
    } 
    arg5 = static_cast< Real >(val5);
    ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "blackFormula" "', argument " "6"" of type '" "Real""'");
    } 
    arg6 = static_cast< Real >(val6);
    {
      try {
        result = (Real)blackFormula(arg1,arg2,arg3,arg4,arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_blackFormula__SWIG_1) {
  {
    Option::Type arg1 ;
    Real arg2 ;
    Real arg3 ;
    Real arg4 ;
    Real arg5 ;
    int val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    double val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: blackFormula(optionType,strike,forward,stdDev,discount);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "blackFormula" "', argument " "1"" of type '" "Option::Type""'");
    } 
    arg1 = static_cast< Option::Type >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "blackFormula" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "blackFormula" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "blackFormula" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "blackFormula" "', argument " "5"" of type '" "Real""'");
    } 
    arg5 = static_cast< Real >(val5);
    {
      try {
        result = (Real)blackFormula(arg1,arg2,arg3,arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_blackFormula__SWIG_2) {
  {
    Option::Type arg1 ;
    Real arg2 ;
    Real arg3 ;
    Real arg4 ;
    int val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: blackFormula(optionType,strike,forward,stdDev);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "blackFormula" "', argument " "1"" of type '" "Option::Type""'");
    } 
    arg1 = static_cast< Option::Type >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "blackFormula" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "blackFormula" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "blackFormula" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    {
      try {
        result = (Real)blackFormula(arg1,arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_blackFormula) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_blackFormula__SWIG_2); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_blackFormula__SWIG_1); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_blackFormula__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'blackFormula'");
  XSRETURN(0);
}


XS(_wrap_blackFormulaImpliedStdDev__SWIG_0) {
  {
    Option::Type arg1 ;
    Real arg2 ;
    Real arg3 ;
    Real arg4 ;
    Real arg5 ;
    Real arg6 ;
    Real arg7 ;
    Real arg8 ;
    Natural arg9 ;
    int val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    double val5 ;
    int ecode5 = 0 ;
    double val6 ;
    int ecode6 = 0 ;
    double val7 ;
    int ecode7 = 0 ;
    double val8 ;
    int ecode8 = 0 ;
    unsigned int val9 ;
    int ecode9 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 9) || (items > 9)) {
      SWIG_croak("Usage: blackFormulaImpliedStdDev(optionType,strike,forward,blackPrice,discount,displacement,guess,accuracy,maxIterations);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "blackFormulaImpliedStdDev" "', argument " "1"" of type '" "Option::Type""'");
    } 
    arg1 = static_cast< Option::Type >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "blackFormulaImpliedStdDev" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "blackFormulaImpliedStdDev" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "blackFormulaImpliedStdDev" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "blackFormulaImpliedStdDev" "', argument " "5"" of type '" "Real""'");
    } 
    arg5 = static_cast< Real >(val5);
    ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "blackFormulaImpliedStdDev" "', argument " "6"" of type '" "Real""'");
    } 
    arg6 = static_cast< Real >(val6);
    ecode7 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "blackFormulaImpliedStdDev" "', argument " "7"" of type '" "Real""'");
    } 
    arg7 = static_cast< Real >(val7);
    ecode8 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "blackFormulaImpliedStdDev" "', argument " "8"" of type '" "Real""'");
    } 
    arg8 = static_cast< Real >(val8);
    ecode9 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(8), &val9);
    if (!SWIG_IsOK(ecode9)) {
      SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "blackFormulaImpliedStdDev" "', argument " "9"" of type '" "Natural""'");
    } 
    arg9 = static_cast< Natural >(val9);
    {
      try {
        result = (Real)blackFormulaImpliedStdDev(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_blackFormulaImpliedStdDev__SWIG_1) {
  {
    Option::Type arg1 ;
    Real arg2 ;
    Real arg3 ;
    Real arg4 ;
    Real arg5 ;
    Real arg6 ;
    Real arg7 ;
    Real arg8 ;
    int val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    double val5 ;
    int ecode5 = 0 ;
    double val6 ;
    int ecode6 = 0 ;
    double val7 ;
    int ecode7 = 0 ;
    double val8 ;
    int ecode8 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 8) || (items > 8)) {
      SWIG_croak("Usage: blackFormulaImpliedStdDev(optionType,strike,forward,blackPrice,discount,displacement,guess,accuracy);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "blackFormulaImpliedStdDev" "', argument " "1"" of type '" "Option::Type""'");
    } 
    arg1 = static_cast< Option::Type >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "blackFormulaImpliedStdDev" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "blackFormulaImpliedStdDev" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "blackFormulaImpliedStdDev" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "blackFormulaImpliedStdDev" "', argument " "5"" of type '" "Real""'");
    } 
    arg5 = static_cast< Real >(val5);
    ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "blackFormulaImpliedStdDev" "', argument " "6"" of type '" "Real""'");
    } 
    arg6 = static_cast< Real >(val6);
    ecode7 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "blackFormulaImpliedStdDev" "', argument " "7"" of type '" "Real""'");
    } 
    arg7 = static_cast< Real >(val7);
    ecode8 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "blackFormulaImpliedStdDev" "', argument " "8"" of type '" "Real""'");
    } 
    arg8 = static_cast< Real >(val8);
    {
      try {
        result = (Real)blackFormulaImpliedStdDev(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_blackFormulaImpliedStdDev__SWIG_2) {
  {
    Option::Type arg1 ;
    Real arg2 ;
    Real arg3 ;
    Real arg4 ;
    Real arg5 ;
    Real arg6 ;
    Real arg7 ;
    int val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    double val5 ;
    int ecode5 = 0 ;
    double val6 ;
    int ecode6 = 0 ;
    double val7 ;
    int ecode7 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: blackFormulaImpliedStdDev(optionType,strike,forward,blackPrice,discount,displacement,guess);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "blackFormulaImpliedStdDev" "', argument " "1"" of type '" "Option::Type""'");
    } 
    arg1 = static_cast< Option::Type >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "blackFormulaImpliedStdDev" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "blackFormulaImpliedStdDev" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "blackFormulaImpliedStdDev" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "blackFormulaImpliedStdDev" "', argument " "5"" of type '" "Real""'");
    } 
    arg5 = static_cast< Real >(val5);
    ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "blackFormulaImpliedStdDev" "', argument " "6"" of type '" "Real""'");
    } 
    arg6 = static_cast< Real >(val6);
    ecode7 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "blackFormulaImpliedStdDev" "', argument " "7"" of type '" "Real""'");
    } 
    arg7 = static_cast< Real >(val7);
    {
      try {
        result = (Real)blackFormulaImpliedStdDev(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_blackFormulaImpliedStdDev__SWIG_3) {
  {
    Option::Type arg1 ;
    Real arg2 ;
    Real arg3 ;
    Real arg4 ;
    Real arg5 ;
    Real arg6 ;
    int val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    double val5 ;
    int ecode5 = 0 ;
    double val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: blackFormulaImpliedStdDev(optionType,strike,forward,blackPrice,discount,displacement);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "blackFormulaImpliedStdDev" "', argument " "1"" of type '" "Option::Type""'");
    } 
    arg1 = static_cast< Option::Type >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "blackFormulaImpliedStdDev" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "blackFormulaImpliedStdDev" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "blackFormulaImpliedStdDev" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "blackFormulaImpliedStdDev" "', argument " "5"" of type '" "Real""'");
    } 
    arg5 = static_cast< Real >(val5);
    ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "blackFormulaImpliedStdDev" "', argument " "6"" of type '" "Real""'");
    } 
    arg6 = static_cast< Real >(val6);
    {
      try {
        result = (Real)blackFormulaImpliedStdDev(arg1,arg2,arg3,arg4,arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_blackFormulaImpliedStdDev__SWIG_4) {
  {
    Option::Type arg1 ;
    Real arg2 ;
    Real arg3 ;
    Real arg4 ;
    Real arg5 ;
    int val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    double val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: blackFormulaImpliedStdDev(optionType,strike,forward,blackPrice,discount);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "blackFormulaImpliedStdDev" "', argument " "1"" of type '" "Option::Type""'");
    } 
    arg1 = static_cast< Option::Type >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "blackFormulaImpliedStdDev" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "blackFormulaImpliedStdDev" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "blackFormulaImpliedStdDev" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "blackFormulaImpliedStdDev" "', argument " "5"" of type '" "Real""'");
    } 
    arg5 = static_cast< Real >(val5);
    {
      try {
        result = (Real)blackFormulaImpliedStdDev(arg1,arg2,arg3,arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_blackFormulaImpliedStdDev__SWIG_5) {
  {
    Option::Type arg1 ;
    Real arg2 ;
    Real arg3 ;
    Real arg4 ;
    int val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: blackFormulaImpliedStdDev(optionType,strike,forward,blackPrice);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "blackFormulaImpliedStdDev" "', argument " "1"" of type '" "Option::Type""'");
    } 
    arg1 = static_cast< Option::Type >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "blackFormulaImpliedStdDev" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "blackFormulaImpliedStdDev" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "blackFormulaImpliedStdDev" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    {
      try {
        result = (Real)blackFormulaImpliedStdDev(arg1,arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_blackFormulaImpliedStdDev) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 8) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 9) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(8), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_blackFormulaImpliedStdDev__SWIG_5); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_blackFormulaImpliedStdDev__SWIG_4); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_blackFormulaImpliedStdDev__SWIG_3); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_blackFormulaImpliedStdDev__SWIG_2); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_blackFormulaImpliedStdDev__SWIG_1); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_blackFormulaImpliedStdDev__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'blackFormulaImpliedStdDev'");
  XSRETURN(0);
}


XS(_wrap_blackFormulaCashItmProbability__SWIG_0) {
  {
    Option::Type arg1 ;
    Real arg2 ;
    Real arg3 ;
    Real arg4 ;
    Real arg5 ;
    int val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    double val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: blackFormulaCashItmProbability(optionType,strike,forward,stdDev,displacement);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "blackFormulaCashItmProbability" "', argument " "1"" of type '" "Option::Type""'");
    } 
    arg1 = static_cast< Option::Type >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "blackFormulaCashItmProbability" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "blackFormulaCashItmProbability" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "blackFormulaCashItmProbability" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "blackFormulaCashItmProbability" "', argument " "5"" of type '" "Real""'");
    } 
    arg5 = static_cast< Real >(val5);
    {
      try {
        result = (Real)blackFormulaCashItmProbability(arg1,arg2,arg3,arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_blackFormulaCashItmProbability__SWIG_1) {
  {
    Option::Type arg1 ;
    Real arg2 ;
    Real arg3 ;
    Real arg4 ;
    int val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: blackFormulaCashItmProbability(optionType,strike,forward,stdDev);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "blackFormulaCashItmProbability" "', argument " "1"" of type '" "Option::Type""'");
    } 
    arg1 = static_cast< Option::Type >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "blackFormulaCashItmProbability" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "blackFormulaCashItmProbability" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "blackFormulaCashItmProbability" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    {
      try {
        result = (Real)blackFormulaCashItmProbability(arg1,arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_blackFormulaCashItmProbability) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_blackFormulaCashItmProbability__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_blackFormulaCashItmProbability__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'blackFormulaCashItmProbability'");
  XSRETURN(0);
}


XS(_wrap_bachelierBlackFormula__SWIG_0) {
  {
    Option::Type arg1 ;
    Real arg2 ;
    Real arg3 ;
    Real arg4 ;
    Real arg5 ;
    int val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    double val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: bachelierBlackFormula(optionType,strike,forward,stdDev,discount);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "bachelierBlackFormula" "', argument " "1"" of type '" "Option::Type""'");
    } 
    arg1 = static_cast< Option::Type >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "bachelierBlackFormula" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "bachelierBlackFormula" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "bachelierBlackFormula" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "bachelierBlackFormula" "', argument " "5"" of type '" "Real""'");
    } 
    arg5 = static_cast< Real >(val5);
    {
      try {
        result = (Real)bachelierBlackFormula(arg1,arg2,arg3,arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_bachelierBlackFormula__SWIG_1) {
  {
    Option::Type arg1 ;
    Real arg2 ;
    Real arg3 ;
    Real arg4 ;
    int val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: bachelierBlackFormula(optionType,strike,forward,stdDev);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "bachelierBlackFormula" "', argument " "1"" of type '" "Option::Type""'");
    } 
    arg1 = static_cast< Option::Type >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "bachelierBlackFormula" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "bachelierBlackFormula" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "bachelierBlackFormula" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    {
      try {
        result = (Real)bachelierBlackFormula(arg1,arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_bachelierBlackFormula) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_bachelierBlackFormula__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_bachelierBlackFormula__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'bachelierBlackFormula'");
  XSRETURN(0);
}


XS(_wrap_bachelierBlackFormulaImpliedVol__SWIG_0) {
  {
    Option::Type arg1 ;
    Real arg2 ;
    Real arg3 ;
    Real arg4 ;
    Real arg5 ;
    Real arg6 ;
    int val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    double val5 ;
    int ecode5 = 0 ;
    double val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: bachelierBlackFormulaImpliedVol(optionType,strike,forward,tte,bachelierPrice,discount);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "bachelierBlackFormulaImpliedVol" "', argument " "1"" of type '" "Option::Type""'");
    } 
    arg1 = static_cast< Option::Type >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "bachelierBlackFormulaImpliedVol" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "bachelierBlackFormulaImpliedVol" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "bachelierBlackFormulaImpliedVol" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "bachelierBlackFormulaImpliedVol" "', argument " "5"" of type '" "Real""'");
    } 
    arg5 = static_cast< Real >(val5);
    ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "bachelierBlackFormulaImpliedVol" "', argument " "6"" of type '" "Real""'");
    } 
    arg6 = static_cast< Real >(val6);
    {
      try {
        result = (Real)bachelierBlackFormulaImpliedVol(arg1,arg2,arg3,arg4,arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_bachelierBlackFormulaImpliedVol__SWIG_1) {
  {
    Option::Type arg1 ;
    Real arg2 ;
    Real arg3 ;
    Real arg4 ;
    Real arg5 ;
    int val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    double val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: bachelierBlackFormulaImpliedVol(optionType,strike,forward,tte,bachelierPrice);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "bachelierBlackFormulaImpliedVol" "', argument " "1"" of type '" "Option::Type""'");
    } 
    arg1 = static_cast< Option::Type >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "bachelierBlackFormulaImpliedVol" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "bachelierBlackFormulaImpliedVol" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "bachelierBlackFormulaImpliedVol" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "bachelierBlackFormulaImpliedVol" "', argument " "5"" of type '" "Real""'");
    } 
    arg5 = static_cast< Real >(val5);
    {
      try {
        result = (Real)bachelierBlackFormulaImpliedVol(arg1,arg2,arg3,arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_bachelierBlackFormulaImpliedVol) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_bachelierBlackFormulaImpliedVol__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_bachelierBlackFormulaImpliedVol__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'bachelierBlackFormulaImpliedVol'");
  XSRETURN(0);
}


XS(_wrap_new_BlackDeltaCalculator) {
  {
    Option::Type arg1 ;
    DeltaVolQuote::DeltaType arg2 ;
    Real arg3 ;
    DiscountFactor arg4 ;
    DiscountFactor arg5 ;
    Real arg6 ;
    int val1 ;
    int ecode1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    double val5 ;
    int ecode5 = 0 ;
    double val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    BlackDeltaCalculator *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_BlackDeltaCalculator(ot,dt,spot,dDiscount,fDiscount,stDev);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_BlackDeltaCalculator" "', argument " "1"" of type '" "Option::Type""'");
    } 
    arg1 = static_cast< Option::Type >(val1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_BlackDeltaCalculator" "', argument " "2"" of type '" "DeltaVolQuote::DeltaType""'");
    } 
    arg2 = static_cast< DeltaVolQuote::DeltaType >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_BlackDeltaCalculator" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_BlackDeltaCalculator" "', argument " "4"" of type '" "DiscountFactor""'");
    } 
    arg4 = static_cast< DiscountFactor >(val4);
    ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_BlackDeltaCalculator" "', argument " "5"" of type '" "DiscountFactor""'");
    } 
    arg5 = static_cast< DiscountFactor >(val5);
    ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_BlackDeltaCalculator" "', argument " "6"" of type '" "Real""'");
    } 
    arg6 = static_cast< Real >(val6);
    {
      try {
        result = (BlackDeltaCalculator *)new BlackDeltaCalculator(arg1,arg2,arg3,arg4,arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BlackDeltaCalculator, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BlackDeltaCalculator_deltaFromStrike) {
  {
    BlackDeltaCalculator *arg1 = (BlackDeltaCalculator *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: BlackDeltaCalculator_deltaFromStrike(self,strike);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BlackDeltaCalculator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BlackDeltaCalculator_deltaFromStrike" "', argument " "1"" of type '" "BlackDeltaCalculator const *""'"); 
    }
    arg1 = reinterpret_cast< BlackDeltaCalculator * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BlackDeltaCalculator_deltaFromStrike" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (Real)((BlackDeltaCalculator const *)arg1)->deltaFromStrike(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BlackDeltaCalculator_strikeFromDelta) {
  {
    BlackDeltaCalculator *arg1 = (BlackDeltaCalculator *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: BlackDeltaCalculator_strikeFromDelta(self,delta);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BlackDeltaCalculator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BlackDeltaCalculator_strikeFromDelta" "', argument " "1"" of type '" "BlackDeltaCalculator const *""'"); 
    }
    arg1 = reinterpret_cast< BlackDeltaCalculator * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BlackDeltaCalculator_strikeFromDelta" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (Real)((BlackDeltaCalculator const *)arg1)->strikeFromDelta(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BlackDeltaCalculator_atmStrike) {
  {
    BlackDeltaCalculator *arg1 = (BlackDeltaCalculator *) 0 ;
    DeltaVolQuote::AtmType arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: BlackDeltaCalculator_atmStrike(self,atmT);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BlackDeltaCalculator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BlackDeltaCalculator_atmStrike" "', argument " "1"" of type '" "BlackDeltaCalculator const *""'"); 
    }
    arg1 = reinterpret_cast< BlackDeltaCalculator * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BlackDeltaCalculator_atmStrike" "', argument " "2"" of type '" "DeltaVolQuote::AtmType""'");
    } 
    arg2 = static_cast< DeltaVolQuote::AtmType >(val2);
    {
      try {
        result = (Real)((BlackDeltaCalculator const *)arg1)->atmStrike(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_BlackDeltaCalculator) {
  {
    BlackDeltaCalculator *arg1 = (BlackDeltaCalculator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_BlackDeltaCalculator(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BlackDeltaCalculator, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_BlackDeltaCalculator" "', argument " "1"" of type '" "BlackDeltaCalculator *""'"); 
    }
    arg1 = reinterpret_cast< BlackDeltaCalculator * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CallabilityPrice) {
  {
    Real arg1 ;
    CallabilityPrice::Type arg2 ;
    double val1 ;
    int ecode1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    CallabilityPrice *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_CallabilityPrice(amount,type);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_CallabilityPrice" "', argument " "1"" of type '" "Real""'");
    } 
    arg1 = static_cast< Real >(val1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_CallabilityPrice" "', argument " "2"" of type '" "CallabilityPrice::Type""'");
    } 
    arg2 = static_cast< CallabilityPrice::Type >(val2);
    {
      try {
        result = (CallabilityPrice *)new CallabilityPrice(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CallabilityPrice, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CallabilityPrice_amount) {
  {
    CallabilityPrice *arg1 = (CallabilityPrice *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CallabilityPrice_amount(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CallabilityPrice, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CallabilityPrice_amount" "', argument " "1"" of type '" "CallabilityPrice const *""'"); 
    }
    arg1 = reinterpret_cast< CallabilityPrice * >(argp1);
    {
      try {
        result = (Real)((CallabilityPrice const *)arg1)->amount();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CallabilityPrice_type) {
  {
    CallabilityPrice *arg1 = (CallabilityPrice *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    CallabilityPrice::Type result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CallabilityPrice_type(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CallabilityPrice, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CallabilityPrice_type" "', argument " "1"" of type '" "CallabilityPrice const *""'"); 
    }
    arg1 = reinterpret_cast< CallabilityPrice * >(argp1);
    {
      try {
        result = (CallabilityPrice::Type)((CallabilityPrice const *)arg1)->type();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_CallabilityPrice) {
  {
    CallabilityPrice *arg1 = (CallabilityPrice *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_CallabilityPrice(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CallabilityPrice, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CallabilityPrice" "', argument " "1"" of type '" "CallabilityPrice *""'"); 
    }
    arg1 = reinterpret_cast< CallabilityPrice * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Callability___deref__) {
  {
    boost::shared_ptr< Callability > *arg1 = (boost::shared_ptr< Callability > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Callability *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Callability___deref__(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Callability_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Callability___deref__" "', argument " "1"" of type '" "boost::shared_ptr< Callability > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Callability > * >(argp1);
    {
      try {
        result = (Callability *)(arg1)->operator ->();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Callability, 0 | 0); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Callability_isNull) {
  {
    boost::shared_ptr< Callability > *arg1 = (boost::shared_ptr< Callability > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Callability_isNull(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Callability_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Callability_isNull" "', argument " "1"" of type '" "boost::shared_ptr< Callability > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Callability > * >(argp1);
    {
      try {
        result = (bool)boost_shared_ptr_Sl_Callability_Sg__isNull(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Callability) {
  {
    CallabilityPrice *arg1 = 0 ;
    Callability::Type arg2 ;
    Date *arg3 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    boost::shared_ptr< Callability > *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_Callability(price,type,date);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_CallabilityPrice,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Callability" "', argument " "1"" of type '" "CallabilityPrice const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Callability" "', argument " "1"" of type '" "CallabilityPrice const &""'"); 
    }
    arg1 = reinterpret_cast< CallabilityPrice * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Callability" "', argument " "2"" of type '" "Callability::Type""'");
    } 
    arg2 = static_cast< Callability::Type >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_Callability" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Callability" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    {
      try {
        result = (boost::shared_ptr< Callability > *)new_boost_shared_ptr_Sl_Callability_Sg_((CallabilityPrice const &)*arg1,arg2,(Date const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_boost__shared_ptrT_Callability_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_Callability) {
  {
    boost::shared_ptr< Callability > *arg1 = (boost::shared_ptr< Callability > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Callability(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Callability_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Callability" "', argument " "1"" of type '" "boost::shared_ptr< Callability > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Callability > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Callability_price) {
  {
    boost::shared_ptr< Callability > *arg1 = (boost::shared_ptr< Callability > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    CallabilityPrice *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Callability_price(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Callability_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Callability_price" "', argument " "1"" of type '" "boost::shared_ptr< Callability > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Callability > * >(argp1);
    {
      try {
        result = (CallabilityPrice *) &(*arg1)->price();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CallabilityPrice, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Callability_type) {
  {
    boost::shared_ptr< Callability > *arg1 = (boost::shared_ptr< Callability > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Callability::Type result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Callability_type(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Callability_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Callability_type" "', argument " "1"" of type '" "boost::shared_ptr< Callability > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Callability > * >(argp1);
    {
      try {
        result = (Callability::Type)(*arg1)->type();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Callability_date) {
  {
    boost::shared_ptr< Callability > *arg1 = (boost::shared_ptr< Callability > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Callability_date(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Callability_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Callability_date" "', argument " "1"" of type '" "boost::shared_ptr< Callability > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Callability > * >(argp1);
    {
      try {
        result = (*arg1)->date();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SoftCallability) {
  {
    CallabilityPrice *arg1 = 0 ;
    Date *arg2 = 0 ;
    Real arg3 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    SoftCallabilityPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_SoftCallability(price,date,trigger);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_CallabilityPrice,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SoftCallability" "', argument " "1"" of type '" "CallabilityPrice const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SoftCallability" "', argument " "1"" of type '" "CallabilityPrice const &""'"); 
    }
    arg1 = reinterpret_cast< CallabilityPrice * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SoftCallability" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SoftCallability" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_SoftCallability" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    {
      try {
        result = (SoftCallabilityPtr *)new_SoftCallabilityPtr((CallabilityPrice const &)*arg1,(Date const &)*arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SoftCallabilityPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_SoftCallability) {
  {
    SoftCallabilityPtr *arg1 = (SoftCallabilityPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_SoftCallability(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SoftCallabilityPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SoftCallability" "', argument " "1"" of type '" "SoftCallabilityPtr *""'"); 
    }
    arg1 = reinterpret_cast< SoftCallabilityPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CallabilitySchedule__SWIG_0) {
  {
    unsigned int arg1 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    std::vector< boost::shared_ptr< Callability > > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_CallabilitySchedule(size);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_CallabilitySchedule" "', argument " "1"" of type '" "unsigned int""'");
    } 
    arg1 = static_cast< unsigned int >(val1);
    {
      try {
        result = (std::vector< boost::shared_ptr< Callability > > *)new std::vector< boost::shared_ptr< Callability > >(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Callability_t_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CallabilitySchedule__SWIG_1) {
  {
    int argvi = 0;
    std::vector< boost::shared_ptr< Callability > > *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_CallabilitySchedule();");
    }
    {
      try {
        result = (std::vector< boost::shared_ptr< Callability > > *)new std::vector< boost::shared_ptr< Callability > >();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Callability_t_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_CallabilitySchedule__SWIG_2) {
  {
    unsigned int arg1 ;
    boost::shared_ptr< Callability > *arg2 = 0 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    std::vector< boost::shared_ptr< Callability > > *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_CallabilitySchedule(size,value);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_CallabilitySchedule" "', argument " "1"" of type '" "unsigned int""'");
    } 
    arg1 = static_cast< unsigned int >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_boost__shared_ptrT_Callability_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CallabilitySchedule" "', argument " "2"" of type '" "boost::shared_ptr< Callability > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CallabilitySchedule" "', argument " "2"" of type '" "boost::shared_ptr< Callability > const &""'"); 
    }
    arg2 = reinterpret_cast< boost::shared_ptr< Callability > * >(argp2);
    {
      try {
        result = (std::vector< boost::shared_ptr< Callability > > *)new std::vector< boost::shared_ptr< Callability > >(arg1,(boost::shared_ptr< Callability > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Callability_t_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CallabilitySchedule__SWIG_3) {
  {
    std::vector< boost::shared_ptr< Callability > > *arg1 = 0 ;
    std::vector< boost::shared_ptr< Callability > > temp1 ;
    std::vector< boost::shared_ptr< Callability > > *v1 ;
    int argvi = 0;
    std::vector< boost::shared_ptr< Callability > > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_CallabilitySchedule(std::vector< boost::shared_ptr< Callability > > const &);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Callability_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_CallabilitySchedule. "
          "Expected an array of " "boost::shared_ptr< Callability >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< Callability >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_Callability_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_CallabilitySchedule. "
              "Expected an array of " "boost::shared_ptr< Callability >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_CallabilitySchedule. "
          "Expected an array of " "boost::shared_ptr< Callability >");
      }
    }
    {
      try {
        result = (std::vector< boost::shared_ptr< Callability > > *)new std::vector< boost::shared_ptr< Callability > >((std::vector< boost::shared_ptr< Callability > > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Callability_t_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CallabilitySchedule) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< Callability > >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Callability_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< Callability >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_Callability_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_boost__shared_ptrT_Callability_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_CallabilitySchedule__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_CallabilitySchedule__SWIG_0); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_CallabilitySchedule__SWIG_3); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_CallabilitySchedule__SWIG_2); return;
    }
  }
  
  croak("No matching function for overloaded 'new_CallabilitySchedule'");
  XSRETURN(0);
}


XS(_wrap_CallabilitySchedule_size) {
  {
    std::vector< boost::shared_ptr< Callability > > *arg1 = (std::vector< boost::shared_ptr< Callability > > *) 0 ;
    std::vector< boost::shared_ptr< Callability > > temp1 ;
    std::vector< boost::shared_ptr< Callability > > *v1 ;
    int argvi = 0;
    unsigned int result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CallabilitySchedule_size(self);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Callability_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of CallabilitySchedule_size. "
          "Expected an array of " "boost::shared_ptr< Callability >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< Callability >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_Callability_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "CallabilitySchedule_size. "
              "Expected an array of " "boost::shared_ptr< Callability >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of CallabilitySchedule_size. "
          "Expected an array of " "boost::shared_ptr< Callability >");
      }
    }
    {
      try {
        result = (unsigned int)((std::vector< boost::shared_ptr< Callability > > const *)arg1)->size();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CallabilitySchedule_empty) {
  {
    std::vector< boost::shared_ptr< Callability > > *arg1 = (std::vector< boost::shared_ptr< Callability > > *) 0 ;
    std::vector< boost::shared_ptr< Callability > > temp1 ;
    std::vector< boost::shared_ptr< Callability > > *v1 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CallabilitySchedule_empty(self);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Callability_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of CallabilitySchedule_empty. "
          "Expected an array of " "boost::shared_ptr< Callability >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< Callability >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_Callability_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "CallabilitySchedule_empty. "
              "Expected an array of " "boost::shared_ptr< Callability >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of CallabilitySchedule_empty. "
          "Expected an array of " "boost::shared_ptr< Callability >");
      }
    }
    {
      try {
        result = (bool)((std::vector< boost::shared_ptr< Callability > > const *)arg1)->empty();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CallabilitySchedule_clear) {
  {
    std::vector< boost::shared_ptr< Callability > > *arg1 = (std::vector< boost::shared_ptr< Callability > > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CallabilitySchedule_clear(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Callability_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CallabilitySchedule_clear" "', argument " "1"" of type '" "std::vector< boost::shared_ptr< Callability > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< boost::shared_ptr< Callability > > * >(argp1);
    {
      try {
        (arg1)->clear();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CallabilitySchedule_push) {
  {
    std::vector< boost::shared_ptr< Callability > > *arg1 = (std::vector< boost::shared_ptr< Callability > > *) 0 ;
    boost::shared_ptr< Callability > *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: CallabilitySchedule_push(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Callability_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CallabilitySchedule_push" "', argument " "1"" of type '" "std::vector< boost::shared_ptr< Callability > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< boost::shared_ptr< Callability > > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_boost__shared_ptrT_Callability_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CallabilitySchedule_push" "', argument " "2"" of type '" "boost::shared_ptr< Callability > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CallabilitySchedule_push" "', argument " "2"" of type '" "boost::shared_ptr< Callability > const &""'"); 
    }
    arg2 = reinterpret_cast< boost::shared_ptr< Callability > * >(argp2);
    {
      try {
        (arg1)->push_back((boost::shared_ptr< Callability > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CallabilitySchedule_pop) {
  {
    std::vector< boost::shared_ptr< Callability > > *arg1 = (std::vector< boost::shared_ptr< Callability > > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    SwigValueWrapper< boost::shared_ptr< Callability > > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CallabilitySchedule_pop(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Callability_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CallabilitySchedule_pop" "', argument " "1"" of type '" "std::vector< boost::shared_ptr< Callability > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< boost::shared_ptr< Callability > > * >(argp1);
    {
      try {
        try {
          result = std_vector_Sl_boost_shared_ptr_Sl_Callability_Sg__Sg__pop(arg1);
        }
        catch(std::out_of_range &_e) {
          sv_setsv(get_sv("@", GV_ADD), SWIG_NewPointerObj((new std::out_of_range(static_cast< const std::out_of_range& >(_e))),SWIGTYPE_p_std__out_of_range,SWIG_POINTER_OWN)); SWIG_fail ;
        }
        
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new boost::shared_ptr< Callability >(static_cast< const boost::shared_ptr< Callability >& >(result))), SWIGTYPE_p_boost__shared_ptrT_Callability_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CallabilitySchedule_get) {
  {
    std::vector< boost::shared_ptr< Callability > > *arg1 = (std::vector< boost::shared_ptr< Callability > > *) 0 ;
    int arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    boost::shared_ptr< Callability > *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: CallabilitySchedule_get(self,i);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Callability_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CallabilitySchedule_get" "', argument " "1"" of type '" "std::vector< boost::shared_ptr< Callability > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< boost::shared_ptr< Callability > > * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CallabilitySchedule_get" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    {
      try {
        try {
          result = (boost::shared_ptr< Callability > *) &std_vector_Sl_boost_shared_ptr_Sl_Callability_Sg__Sg__get(arg1,arg2);
        }
        catch(std::out_of_range &_e) {
          sv_setsv(get_sv("@", GV_ADD), SWIG_NewPointerObj((new std::out_of_range(static_cast< const std::out_of_range& >(_e))),SWIGTYPE_p_std__out_of_range,SWIG_POINTER_OWN)); SWIG_fail ;
        }
        
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_boost__shared_ptrT_Callability_t, 0 | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CallabilitySchedule_set) {
  {
    std::vector< boost::shared_ptr< Callability > > *arg1 = (std::vector< boost::shared_ptr< Callability > > *) 0 ;
    int arg2 ;
    boost::shared_ptr< Callability > *arg3 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: CallabilitySchedule_set(self,i,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Callability_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CallabilitySchedule_set" "', argument " "1"" of type '" "std::vector< boost::shared_ptr< Callability > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< boost::shared_ptr< Callability > > * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CallabilitySchedule_set" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_boost__shared_ptrT_Callability_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CallabilitySchedule_set" "', argument " "3"" of type '" "boost::shared_ptr< Callability > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CallabilitySchedule_set" "', argument " "3"" of type '" "boost::shared_ptr< Callability > const &""'"); 
    }
    arg3 = reinterpret_cast< boost::shared_ptr< Callability > * >(argp3);
    {
      try {
        try {
          std_vector_Sl_boost_shared_ptr_Sl_Callability_Sg__Sg__set(arg1,arg2,(boost::shared_ptr< Callability > const &)*arg3);
        }
        catch(std::out_of_range &_e) {
          sv_setsv(get_sv("@", GV_ADD), SWIG_NewPointerObj((new std::out_of_range(static_cast< const std::out_of_range& >(_e))),SWIGTYPE_p_std__out_of_range,SWIG_POINTER_OWN)); SWIG_fail ;
        }
        
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_CallabilitySchedule) {
  {
    std::vector< boost::shared_ptr< Callability > > *arg1 = (std::vector< boost::shared_ptr< Callability > > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_CallabilitySchedule(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Callability_t_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CallabilitySchedule" "', argument " "1"" of type '" "std::vector< boost::shared_ptr< Callability > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< boost::shared_ptr< Callability > > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Seasonality___deref__) {
  {
    boost::shared_ptr< Seasonality > *arg1 = (boost::shared_ptr< Seasonality > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Seasonality *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Seasonality___deref__(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Seasonality_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Seasonality___deref__" "', argument " "1"" of type '" "boost::shared_ptr< Seasonality > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Seasonality > * >(argp1);
    {
      try {
        result = (Seasonality *)(arg1)->operator ->();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Seasonality, 0 | 0); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Seasonality_isNull) {
  {
    boost::shared_ptr< Seasonality > *arg1 = (boost::shared_ptr< Seasonality > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Seasonality_isNull(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Seasonality_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Seasonality_isNull" "', argument " "1"" of type '" "boost::shared_ptr< Seasonality > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Seasonality > * >(argp1);
    {
      try {
        result = (bool)boost_shared_ptr_Sl_Seasonality_Sg__isNull(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Seasonality) {
  {
    int argvi = 0;
    boost::shared_ptr< Seasonality > *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Seasonality();");
    }
    {
      try {
        result = (boost::shared_ptr< Seasonality > *)new boost::shared_ptr< Seasonality >();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_boost__shared_ptrT_Seasonality_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_Seasonality) {
  {
    boost::shared_ptr< Seasonality > *arg1 = (boost::shared_ptr< Seasonality > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Seasonality(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Seasonality_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Seasonality" "', argument " "1"" of type '" "boost::shared_ptr< Seasonality > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Seasonality > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Seasonality_correctZeroRate) {
  {
    boost::shared_ptr< Seasonality > *arg1 = (boost::shared_ptr< Seasonality > *) 0 ;
    Date *arg2 = 0 ;
    Rate arg3 ;
    InflationTermStructure *arg4 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: Seasonality_correctZeroRate(self,d,r,iTS);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Seasonality_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Seasonality_correctZeroRate" "', argument " "1"" of type '" "boost::shared_ptr< Seasonality > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Seasonality > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Seasonality_correctZeroRate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Seasonality_correctZeroRate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Seasonality_correctZeroRate" "', argument " "3"" of type '" "Rate""'");
    } 
    arg3 = static_cast< Rate >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_InflationTermStructure,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Seasonality_correctZeroRate" "', argument " "4"" of type '" "InflationTermStructure const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Seasonality_correctZeroRate" "', argument " "4"" of type '" "InflationTermStructure const &""'"); 
    }
    arg4 = reinterpret_cast< InflationTermStructure * >(argp4);
    {
      try {
        result = (Rate)(*arg1)->correctZeroRate((Date const &)*arg2,arg3,(InflationTermStructure const &)*arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Seasonality_correctYoYRate) {
  {
    boost::shared_ptr< Seasonality > *arg1 = (boost::shared_ptr< Seasonality > *) 0 ;
    Date *arg2 = 0 ;
    Rate arg3 ;
    InflationTermStructure *arg4 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: Seasonality_correctYoYRate(self,d,r,iTS);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Seasonality_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Seasonality_correctYoYRate" "', argument " "1"" of type '" "boost::shared_ptr< Seasonality > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Seasonality > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Seasonality_correctYoYRate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Seasonality_correctYoYRate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Seasonality_correctYoYRate" "', argument " "3"" of type '" "Rate""'");
    } 
    arg3 = static_cast< Rate >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_InflationTermStructure,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Seasonality_correctYoYRate" "', argument " "4"" of type '" "InflationTermStructure const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Seasonality_correctYoYRate" "', argument " "4"" of type '" "InflationTermStructure const &""'"); 
    }
    arg4 = reinterpret_cast< InflationTermStructure * >(argp4);
    {
      try {
        result = (Rate)(*arg1)->correctYoYRate((Date const &)*arg2,arg3,(InflationTermStructure const &)*arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Seasonality_isConsistent) {
  {
    boost::shared_ptr< Seasonality > *arg1 = (boost::shared_ptr< Seasonality > *) 0 ;
    InflationTermStructure *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Seasonality_isConsistent(self,iTS);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Seasonality_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Seasonality_isConsistent" "', argument " "1"" of type '" "boost::shared_ptr< Seasonality > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Seasonality > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_InflationTermStructure,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Seasonality_isConsistent" "', argument " "2"" of type '" "InflationTermStructure const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Seasonality_isConsistent" "', argument " "2"" of type '" "InflationTermStructure const &""'"); 
    }
    arg2 = reinterpret_cast< InflationTermStructure * >(argp2);
    {
      try {
        result = (bool)(*arg1)->isConsistent((InflationTermStructure const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MultiplicativePriceSeasonalityPtr) {
  {
    Date *arg1 = 0 ;
    Frequency arg2 ;
    std::vector< Rate > *arg3 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    std::vector< double > temp3 ;
    std::vector< double > *v3 ;
    int argvi = 0;
    MultiplicativePriceSeasonalityPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_MultiplicativePriceSeasonalityPtr(seasonalityBaseDate,frequency,seasonalityFactors);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MultiplicativePriceSeasonalityPtr" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MultiplicativePriceSeasonalityPtr" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_MultiplicativePriceSeasonalityPtr" "', argument " "2"" of type '" "Frequency""'");
    } 
    arg2 = static_cast< Frequency >(val2);
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_MultiplicativePriceSeasonalityPtr. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp3.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_MultiplicativePriceSeasonalityPtr. "
              "Expected an array of ""double");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_MultiplicativePriceSeasonalityPtr. "
          "Expected an array of ""double");
      }
    }
    {
      try {
        result = (MultiplicativePriceSeasonalityPtr *)new_MultiplicativePriceSeasonalityPtr((Date const &)*arg1,arg2,(std::vector< double > const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MultiplicativePriceSeasonalityPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_MultiplicativePriceSeasonalityPtr) {
  {
    MultiplicativePriceSeasonalityPtr *arg1 = (MultiplicativePriceSeasonalityPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_MultiplicativePriceSeasonalityPtr(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_MultiplicativePriceSeasonalityPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MultiplicativePriceSeasonalityPtr" "', argument " "1"" of type '" "MultiplicativePriceSeasonalityPtr *""'"); 
    }
    arg1 = reinterpret_cast< MultiplicativePriceSeasonalityPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_YoYInflationTermStructure___deref__) {
  {
    boost::shared_ptr< YoYInflationTermStructure > *arg1 = (boost::shared_ptr< YoYInflationTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    YoYInflationTermStructure *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: YoYInflationTermStructure___deref__(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_YoYInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YoYInflationTermStructure___deref__" "', argument " "1"" of type '" "boost::shared_ptr< YoYInflationTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< YoYInflationTermStructure > * >(argp1);
    {
      try {
        result = (YoYInflationTermStructure *)(arg1)->operator ->();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_YoYInflationTermStructure, 0 | 0); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_YoYInflationTermStructure_isNull) {
  {
    boost::shared_ptr< YoYInflationTermStructure > *arg1 = (boost::shared_ptr< YoYInflationTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: YoYInflationTermStructure_isNull(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_YoYInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YoYInflationTermStructure_isNull" "', argument " "1"" of type '" "boost::shared_ptr< YoYInflationTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< YoYInflationTermStructure > * >(argp1);
    {
      try {
        result = (bool)boost_shared_ptr_Sl_YoYInflationTermStructure_Sg__isNull(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_YoYInflationTermStructure_asObservable) {
  {
    boost::shared_ptr< YoYInflationTermStructure > *arg1 = (boost::shared_ptr< YoYInflationTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    boost::shared_ptr< Observable > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: YoYInflationTermStructure_asObservable(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_YoYInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YoYInflationTermStructure_asObservable" "', argument " "1"" of type '" "boost::shared_ptr< YoYInflationTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< YoYInflationTermStructure > * >(argp1);
    {
      try {
        result = boost_shared_ptr_Sl_YoYInflationTermStructure_Sg__asObservable(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new boost::shared_ptr< Observable >(static_cast< const boost::shared_ptr< Observable >& >(result))), SWIGTYPE_p_boost__shared_ptrT_Observable_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_YoYInflationTermStructure) {
  {
    int argvi = 0;
    boost::shared_ptr< YoYInflationTermStructure > *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_YoYInflationTermStructure();");
    }
    {
      try {
        result = (boost::shared_ptr< YoYInflationTermStructure > *)new boost::shared_ptr< YoYInflationTermStructure >();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_boost__shared_ptrT_YoYInflationTermStructure_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_YoYInflationTermStructure) {
  {
    boost::shared_ptr< YoYInflationTermStructure > *arg1 = (boost::shared_ptr< YoYInflationTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_YoYInflationTermStructure(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_YoYInflationTermStructure_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_YoYInflationTermStructure" "', argument " "1"" of type '" "boost::shared_ptr< YoYInflationTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< YoYInflationTermStructure > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_YoYInflationTermStructure_yoyRate__SWIG_0) {
  {
    boost::shared_ptr< YoYInflationTermStructure > *arg1 = (boost::shared_ptr< YoYInflationTermStructure > *) 0 ;
    Date *arg2 = 0 ;
    Period *arg3 = 0 ;
    bool arg4 ;
    bool arg5 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    bool val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: YoYInflationTermStructure_yoyRate(self,d,instObsLag,forceLinearInterpolation,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_YoYInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YoYInflationTermStructure_yoyRate" "', argument " "1"" of type '" "boost::shared_ptr< YoYInflationTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< YoYInflationTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "YoYInflationTermStructure_yoyRate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "YoYInflationTermStructure_yoyRate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "YoYInflationTermStructure_yoyRate" "', argument " "3"" of type '" "Period const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "YoYInflationTermStructure_yoyRate" "', argument " "3"" of type '" "Period const &""'"); 
    }
    arg3 = reinterpret_cast< Period * >(argp3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "YoYInflationTermStructure_yoyRate" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "YoYInflationTermStructure_yoyRate" "', argument " "5"" of type '" "bool""'");
    } 
    arg5 = static_cast< bool >(val5);
    {
      try {
        result = (Rate)(*arg1)->yoyRate((Date const &)*arg2,(Period const &)*arg3,arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_YoYInflationTermStructure_yoyRate__SWIG_1) {
  {
    boost::shared_ptr< YoYInflationTermStructure > *arg1 = (boost::shared_ptr< YoYInflationTermStructure > *) 0 ;
    Date *arg2 = 0 ;
    Period *arg3 = 0 ;
    bool arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: YoYInflationTermStructure_yoyRate(self,d,instObsLag,forceLinearInterpolation);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_YoYInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YoYInflationTermStructure_yoyRate" "', argument " "1"" of type '" "boost::shared_ptr< YoYInflationTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< YoYInflationTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "YoYInflationTermStructure_yoyRate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "YoYInflationTermStructure_yoyRate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "YoYInflationTermStructure_yoyRate" "', argument " "3"" of type '" "Period const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "YoYInflationTermStructure_yoyRate" "', argument " "3"" of type '" "Period const &""'"); 
    }
    arg3 = reinterpret_cast< Period * >(argp3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "YoYInflationTermStructure_yoyRate" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    {
      try {
        result = (Rate)(*arg1)->yoyRate((Date const &)*arg2,(Period const &)*arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_YoYInflationTermStructure_yoyRate__SWIG_2) {
  {
    boost::shared_ptr< YoYInflationTermStructure > *arg1 = (boost::shared_ptr< YoYInflationTermStructure > *) 0 ;
    Date *arg2 = 0 ;
    Period *arg3 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: YoYInflationTermStructure_yoyRate(self,d,instObsLag);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_YoYInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YoYInflationTermStructure_yoyRate" "', argument " "1"" of type '" "boost::shared_ptr< YoYInflationTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< YoYInflationTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "YoYInflationTermStructure_yoyRate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "YoYInflationTermStructure_yoyRate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "YoYInflationTermStructure_yoyRate" "', argument " "3"" of type '" "Period const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "YoYInflationTermStructure_yoyRate" "', argument " "3"" of type '" "Period const &""'"); 
    }
    arg3 = reinterpret_cast< Period * >(argp3);
    {
      try {
        result = (Rate)(*arg1)->yoyRate((Date const &)*arg2,(Period const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_YoYInflationTermStructure_yoyRate__SWIG_3) {
  {
    boost::shared_ptr< YoYInflationTermStructure > *arg1 = (boost::shared_ptr< YoYInflationTermStructure > *) 0 ;
    Date *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: YoYInflationTermStructure_yoyRate(self,d);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_YoYInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YoYInflationTermStructure_yoyRate" "', argument " "1"" of type '" "boost::shared_ptr< YoYInflationTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< YoYInflationTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "YoYInflationTermStructure_yoyRate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "YoYInflationTermStructure_yoyRate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    {
      try {
        result = (Rate)(*arg1)->yoyRate((Date const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_YoYInflationTermStructure_yoyRate) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_YoYInflationTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_YoYInflationTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_YoYInflationTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_YoYInflationTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_YoYInflationTermStructure_yoyRate__SWIG_3); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_YoYInflationTermStructure_yoyRate__SWIG_2); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_YoYInflationTermStructure_yoyRate__SWIG_1); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_YoYInflationTermStructure_yoyRate__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'YoYInflationTermStructure_yoyRate'");
  XSRETURN(0);
}


XS(_wrap_YoYInflationTermStructure_dayCounter) {
  {
    boost::shared_ptr< YoYInflationTermStructure > *arg1 = (boost::shared_ptr< YoYInflationTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    SwigValueWrapper< DayCounter > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: YoYInflationTermStructure_dayCounter(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_YoYInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YoYInflationTermStructure_dayCounter" "', argument " "1"" of type '" "boost::shared_ptr< YoYInflationTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< YoYInflationTermStructure > * >(argp1);
    {
      try {
        result = (*arg1)->dayCounter();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new DayCounter(static_cast< const DayCounter& >(result))), SWIGTYPE_p_DayCounter, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_YoYInflationTermStructure_calendar) {
  {
    boost::shared_ptr< YoYInflationTermStructure > *arg1 = (boost::shared_ptr< YoYInflationTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    SwigValueWrapper< Calendar > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: YoYInflationTermStructure_calendar(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_YoYInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YoYInflationTermStructure_calendar" "', argument " "1"" of type '" "boost::shared_ptr< YoYInflationTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< YoYInflationTermStructure > * >(argp1);
    {
      try {
        result = (*arg1)->calendar();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Calendar(static_cast< const Calendar& >(result))), SWIGTYPE_p_Calendar, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_YoYInflationTermStructure_referenceDate) {
  {
    boost::shared_ptr< YoYInflationTermStructure > *arg1 = (boost::shared_ptr< YoYInflationTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: YoYInflationTermStructure_referenceDate(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_YoYInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YoYInflationTermStructure_referenceDate" "', argument " "1"" of type '" "boost::shared_ptr< YoYInflationTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< YoYInflationTermStructure > * >(argp1);
    {
      try {
        result = (*arg1)->referenceDate();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_YoYInflationTermStructure_maxDate) {
  {
    boost::shared_ptr< YoYInflationTermStructure > *arg1 = (boost::shared_ptr< YoYInflationTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: YoYInflationTermStructure_maxDate(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_YoYInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YoYInflationTermStructure_maxDate" "', argument " "1"" of type '" "boost::shared_ptr< YoYInflationTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< YoYInflationTermStructure > * >(argp1);
    {
      try {
        result = (*arg1)->maxDate();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_YoYInflationTermStructure_maxTime) {
  {
    boost::shared_ptr< YoYInflationTermStructure > *arg1 = (boost::shared_ptr< YoYInflationTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Time result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: YoYInflationTermStructure_maxTime(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_YoYInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YoYInflationTermStructure_maxTime" "', argument " "1"" of type '" "boost::shared_ptr< YoYInflationTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< YoYInflationTermStructure > * >(argp1);
    {
      try {
        result = (Time)(*arg1)->maxTime();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_YoYInflationTermStructure_observationLag) {
  {
    boost::shared_ptr< YoYInflationTermStructure > *arg1 = (boost::shared_ptr< YoYInflationTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Period result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: YoYInflationTermStructure_observationLag(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_YoYInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YoYInflationTermStructure_observationLag" "', argument " "1"" of type '" "boost::shared_ptr< YoYInflationTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< YoYInflationTermStructure > * >(argp1);
    {
      try {
        result = (*arg1)->observationLag();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Period(static_cast< const Period& >(result))), SWIGTYPE_p_Period, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_YoYInflationTermStructure_frequency) {
  {
    boost::shared_ptr< YoYInflationTermStructure > *arg1 = (boost::shared_ptr< YoYInflationTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Frequency result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: YoYInflationTermStructure_frequency(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_YoYInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YoYInflationTermStructure_frequency" "', argument " "1"" of type '" "boost::shared_ptr< YoYInflationTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< YoYInflationTermStructure > * >(argp1);
    {
      try {
        result = (Frequency)(*arg1)->frequency();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_YoYInflationTermStructure_indexIsInterpolated) {
  {
    boost::shared_ptr< YoYInflationTermStructure > *arg1 = (boost::shared_ptr< YoYInflationTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: YoYInflationTermStructure_indexIsInterpolated(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_YoYInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YoYInflationTermStructure_indexIsInterpolated" "', argument " "1"" of type '" "boost::shared_ptr< YoYInflationTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< YoYInflationTermStructure > * >(argp1);
    {
      try {
        result = (bool)(*arg1)->indexIsInterpolated();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_YoYInflationTermStructure_baseRate) {
  {
    boost::shared_ptr< YoYInflationTermStructure > *arg1 = (boost::shared_ptr< YoYInflationTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: YoYInflationTermStructure_baseRate(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_YoYInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YoYInflationTermStructure_baseRate" "', argument " "1"" of type '" "boost::shared_ptr< YoYInflationTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< YoYInflationTermStructure > * >(argp1);
    {
      try {
        result = (Rate)(*arg1)->baseRate();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_YoYInflationTermStructure_nominalTermStructure) {
  {
    boost::shared_ptr< YoYInflationTermStructure > *arg1 = (boost::shared_ptr< YoYInflationTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Handle< YieldTermStructure > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: YoYInflationTermStructure_nominalTermStructure(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_YoYInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YoYInflationTermStructure_nominalTermStructure" "', argument " "1"" of type '" "boost::shared_ptr< YoYInflationTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< YoYInflationTermStructure > * >(argp1);
    {
      try {
        result = (*arg1)->nominalTermStructure();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Handle< YieldTermStructure >(static_cast< const Handle< YieldTermStructure >& >(result))), SWIGTYPE_p_HandleT_YieldTermStructure_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_YoYInflationTermStructure_baseDate) {
  {
    boost::shared_ptr< YoYInflationTermStructure > *arg1 = (boost::shared_ptr< YoYInflationTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: YoYInflationTermStructure_baseDate(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_YoYInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YoYInflationTermStructure_baseDate" "', argument " "1"" of type '" "boost::shared_ptr< YoYInflationTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< YoYInflationTermStructure > * >(argp1);
    {
      try {
        result = (*arg1)->baseDate();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_YoYInflationTermStructure_setSeasonality__SWIG_0) {
  {
    boost::shared_ptr< YoYInflationTermStructure > *arg1 = (boost::shared_ptr< YoYInflationTermStructure > *) 0 ;
    boost::shared_ptr< Seasonality > *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: YoYInflationTermStructure_setSeasonality(self,seasonality);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_YoYInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YoYInflationTermStructure_setSeasonality" "', argument " "1"" of type '" "boost::shared_ptr< YoYInflationTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< YoYInflationTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_boost__shared_ptrT_Seasonality_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "YoYInflationTermStructure_setSeasonality" "', argument " "2"" of type '" "boost::shared_ptr< Seasonality > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "YoYInflationTermStructure_setSeasonality" "', argument " "2"" of type '" "boost::shared_ptr< Seasonality > const &""'"); 
    }
    arg2 = reinterpret_cast< boost::shared_ptr< Seasonality > * >(argp2);
    {
      try {
        (*arg1)->setSeasonality((boost::shared_ptr< Seasonality > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_YoYInflationTermStructure_setSeasonality__SWIG_1) {
  {
    boost::shared_ptr< YoYInflationTermStructure > *arg1 = (boost::shared_ptr< YoYInflationTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: YoYInflationTermStructure_setSeasonality(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_YoYInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YoYInflationTermStructure_setSeasonality" "', argument " "1"" of type '" "boost::shared_ptr< YoYInflationTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< YoYInflationTermStructure > * >(argp1);
    {
      try {
        (*arg1)->setSeasonality();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_YoYInflationTermStructure_setSeasonality) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_YoYInflationTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_YoYInflationTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_boost__shared_ptrT_Seasonality_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_YoYInflationTermStructure_setSeasonality__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_YoYInflationTermStructure_setSeasonality__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'YoYInflationTermStructure_setSeasonality'");
  XSRETURN(0);
}


XS(_wrap_YoYInflationTermStructure_seasonality) {
  {
    boost::shared_ptr< YoYInflationTermStructure > *arg1 = (boost::shared_ptr< YoYInflationTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    boost::shared_ptr< Seasonality > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: YoYInflationTermStructure_seasonality(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_YoYInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YoYInflationTermStructure_seasonality" "', argument " "1"" of type '" "boost::shared_ptr< YoYInflationTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< YoYInflationTermStructure > * >(argp1);
    {
      try {
        result = (*arg1)->seasonality();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new boost::shared_ptr< Seasonality >(static_cast< const boost::shared_ptr< Seasonality >& >(result))), SWIGTYPE_p_boost__shared_ptrT_Seasonality_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_YoYInflationTermStructure_hasSeasonality) {
  {
    boost::shared_ptr< YoYInflationTermStructure > *arg1 = (boost::shared_ptr< YoYInflationTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: YoYInflationTermStructure_hasSeasonality(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_YoYInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YoYInflationTermStructure_hasSeasonality" "', argument " "1"" of type '" "boost::shared_ptr< YoYInflationTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< YoYInflationTermStructure > * >(argp1);
    {
      try {
        result = (bool)(*arg1)->hasSeasonality();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_YoYInflationTermStructure_enableExtrapolation) {
  {
    boost::shared_ptr< YoYInflationTermStructure > *arg1 = (boost::shared_ptr< YoYInflationTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: YoYInflationTermStructure_enableExtrapolation(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_YoYInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YoYInflationTermStructure_enableExtrapolation" "', argument " "1"" of type '" "boost::shared_ptr< YoYInflationTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< YoYInflationTermStructure > * >(argp1);
    {
      try {
        (*arg1)->enableExtrapolation();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_YoYInflationTermStructure_disableExtrapolation) {
  {
    boost::shared_ptr< YoYInflationTermStructure > *arg1 = (boost::shared_ptr< YoYInflationTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: YoYInflationTermStructure_disableExtrapolation(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_YoYInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YoYInflationTermStructure_disableExtrapolation" "', argument " "1"" of type '" "boost::shared_ptr< YoYInflationTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< YoYInflationTermStructure > * >(argp1);
    {
      try {
        (*arg1)->disableExtrapolation();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_YoYInflationTermStructure_allowsExtrapolation) {
  {
    boost::shared_ptr< YoYInflationTermStructure > *arg1 = (boost::shared_ptr< YoYInflationTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: YoYInflationTermStructure_allowsExtrapolation(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_YoYInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YoYInflationTermStructure_allowsExtrapolation" "', argument " "1"" of type '" "boost::shared_ptr< YoYInflationTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< YoYInflationTermStructure > * >(argp1);
    {
      try {
        result = (bool)(*arg1)->allowsExtrapolation();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_YoYInflationTermStructureHandle__SWIG_0) {
  {
    boost::shared_ptr< YoYInflationTermStructure > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Handle< YoYInflationTermStructure > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_YoYInflationTermStructureHandle(boost::shared_ptr< YoYInflationTermStructure > const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_YoYInflationTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_YoYInflationTermStructureHandle" "', argument " "1"" of type '" "boost::shared_ptr< YoYInflationTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_YoYInflationTermStructureHandle" "', argument " "1"" of type '" "boost::shared_ptr< YoYInflationTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< YoYInflationTermStructure > * >(argp1);
    {
      try {
        result = (Handle< YoYInflationTermStructure > *)new Handle< YoYInflationTermStructure >((boost::shared_ptr< YoYInflationTermStructure > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_HandleT_YoYInflationTermStructure_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_YoYInflationTermStructureHandle__SWIG_1) {
  {
    int argvi = 0;
    Handle< YoYInflationTermStructure > *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_YoYInflationTermStructureHandle();");
    }
    {
      try {
        result = (Handle< YoYInflationTermStructure > *)new Handle< YoYInflationTermStructure >();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_HandleT_YoYInflationTermStructure_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_YoYInflationTermStructureHandle) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_YoYInflationTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_YoYInflationTermStructureHandle__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_YoYInflationTermStructureHandle__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_YoYInflationTermStructureHandle'");
  XSRETURN(0);
}


XS(_wrap_YoYInflationTermStructureHandle___deref__) {
  {
    Handle< YoYInflationTermStructure > *arg1 = (Handle< YoYInflationTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    boost::shared_ptr< YoYInflationTermStructure > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: YoYInflationTermStructureHandle___deref__(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_YoYInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YoYInflationTermStructureHandle___deref__" "', argument " "1"" of type '" "Handle< YoYInflationTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< YoYInflationTermStructure > * >(argp1);
    {
      try {
        result = (arg1)->operator ->();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new boost::shared_ptr< YoYInflationTermStructure >(static_cast< const boost::shared_ptr< YoYInflationTermStructure >& >(result))), SWIGTYPE_p_boost__shared_ptrT_YoYInflationTermStructure_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_YoYInflationTermStructureHandle_empty) {
  {
    Handle< YoYInflationTermStructure > *arg1 = (Handle< YoYInflationTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: YoYInflationTermStructureHandle_empty(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_YoYInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YoYInflationTermStructureHandle_empty" "', argument " "1"" of type '" "Handle< YoYInflationTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< YoYInflationTermStructure > * >(argp1);
    {
      try {
        result = (bool)(arg1)->empty();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_YoYInflationTermStructureHandle_asObservable) {
  {
    Handle< YoYInflationTermStructure > *arg1 = (Handle< YoYInflationTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    boost::shared_ptr< Observable > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: YoYInflationTermStructureHandle_asObservable(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_YoYInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YoYInflationTermStructureHandle_asObservable" "', argument " "1"" of type '" "Handle< YoYInflationTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< YoYInflationTermStructure > * >(argp1);
    {
      try {
        result = Handle_Sl_YoYInflationTermStructure_Sg__asObservable(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new boost::shared_ptr< Observable >(static_cast< const boost::shared_ptr< Observable >& >(result))), SWIGTYPE_p_boost__shared_ptrT_Observable_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_YoYInflationTermStructureHandle) {
  {
    Handle< YoYInflationTermStructure > *arg1 = (Handle< YoYInflationTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_YoYInflationTermStructureHandle(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_YoYInflationTermStructure_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_YoYInflationTermStructureHandle" "', argument " "1"" of type '" "Handle< YoYInflationTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< YoYInflationTermStructure > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_YoYInflationTermStructureHandle_yoyRate__SWIG_0) {
  {
    Handle< YoYInflationTermStructure > *arg1 = (Handle< YoYInflationTermStructure > *) 0 ;
    Date *arg2 = 0 ;
    Period *arg3 = 0 ;
    bool arg4 ;
    bool arg5 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    bool val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: YoYInflationTermStructureHandle_yoyRate(self,d,instObsLag,forceLinearInterpolation,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_YoYInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YoYInflationTermStructureHandle_yoyRate" "', argument " "1"" of type '" "Handle< YoYInflationTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< YoYInflationTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "YoYInflationTermStructureHandle_yoyRate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "YoYInflationTermStructureHandle_yoyRate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "YoYInflationTermStructureHandle_yoyRate" "', argument " "3"" of type '" "Period const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "YoYInflationTermStructureHandle_yoyRate" "', argument " "3"" of type '" "Period const &""'"); 
    }
    arg3 = reinterpret_cast< Period * >(argp3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "YoYInflationTermStructureHandle_yoyRate" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "YoYInflationTermStructureHandle_yoyRate" "', argument " "5"" of type '" "bool""'");
    } 
    arg5 = static_cast< bool >(val5);
    {
      try {
        result = (Rate)(*arg1)->yoyRate((Date const &)*arg2,(Period const &)*arg3,arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_YoYInflationTermStructureHandle_yoyRate__SWIG_1) {
  {
    Handle< YoYInflationTermStructure > *arg1 = (Handle< YoYInflationTermStructure > *) 0 ;
    Date *arg2 = 0 ;
    Period *arg3 = 0 ;
    bool arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: YoYInflationTermStructureHandle_yoyRate(self,d,instObsLag,forceLinearInterpolation);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_YoYInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YoYInflationTermStructureHandle_yoyRate" "', argument " "1"" of type '" "Handle< YoYInflationTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< YoYInflationTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "YoYInflationTermStructureHandle_yoyRate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "YoYInflationTermStructureHandle_yoyRate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "YoYInflationTermStructureHandle_yoyRate" "', argument " "3"" of type '" "Period const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "YoYInflationTermStructureHandle_yoyRate" "', argument " "3"" of type '" "Period const &""'"); 
    }
    arg3 = reinterpret_cast< Period * >(argp3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "YoYInflationTermStructureHandle_yoyRate" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    {
      try {
        result = (Rate)(*arg1)->yoyRate((Date const &)*arg2,(Period const &)*arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_YoYInflationTermStructureHandle_yoyRate__SWIG_2) {
  {
    Handle< YoYInflationTermStructure > *arg1 = (Handle< YoYInflationTermStructure > *) 0 ;
    Date *arg2 = 0 ;
    Period *arg3 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: YoYInflationTermStructureHandle_yoyRate(self,d,instObsLag);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_YoYInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YoYInflationTermStructureHandle_yoyRate" "', argument " "1"" of type '" "Handle< YoYInflationTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< YoYInflationTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "YoYInflationTermStructureHandle_yoyRate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "YoYInflationTermStructureHandle_yoyRate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "YoYInflationTermStructureHandle_yoyRate" "', argument " "3"" of type '" "Period const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "YoYInflationTermStructureHandle_yoyRate" "', argument " "3"" of type '" "Period const &""'"); 
    }
    arg3 = reinterpret_cast< Period * >(argp3);
    {
      try {
        result = (Rate)(*arg1)->yoyRate((Date const &)*arg2,(Period const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_YoYInflationTermStructureHandle_yoyRate__SWIG_3) {
  {
    Handle< YoYInflationTermStructure > *arg1 = (Handle< YoYInflationTermStructure > *) 0 ;
    Date *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: YoYInflationTermStructureHandle_yoyRate(self,d);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_YoYInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YoYInflationTermStructureHandle_yoyRate" "', argument " "1"" of type '" "Handle< YoYInflationTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< YoYInflationTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "YoYInflationTermStructureHandle_yoyRate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "YoYInflationTermStructureHandle_yoyRate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    {
      try {
        result = (Rate)(*arg1)->yoyRate((Date const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_YoYInflationTermStructureHandle_yoyRate) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YoYInflationTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YoYInflationTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YoYInflationTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YoYInflationTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_YoYInflationTermStructureHandle_yoyRate__SWIG_3); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_YoYInflationTermStructureHandle_yoyRate__SWIG_2); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_YoYInflationTermStructureHandle_yoyRate__SWIG_1); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_YoYInflationTermStructureHandle_yoyRate__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'YoYInflationTermStructureHandle_yoyRate'");
  XSRETURN(0);
}


XS(_wrap_YoYInflationTermStructureHandle_dayCounter) {
  {
    Handle< YoYInflationTermStructure > *arg1 = (Handle< YoYInflationTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    SwigValueWrapper< DayCounter > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: YoYInflationTermStructureHandle_dayCounter(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_YoYInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YoYInflationTermStructureHandle_dayCounter" "', argument " "1"" of type '" "Handle< YoYInflationTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< YoYInflationTermStructure > * >(argp1);
    {
      try {
        result = (*arg1)->dayCounter();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new DayCounter(static_cast< const DayCounter& >(result))), SWIGTYPE_p_DayCounter, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_YoYInflationTermStructureHandle_calendar) {
  {
    Handle< YoYInflationTermStructure > *arg1 = (Handle< YoYInflationTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    SwigValueWrapper< Calendar > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: YoYInflationTermStructureHandle_calendar(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_YoYInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YoYInflationTermStructureHandle_calendar" "', argument " "1"" of type '" "Handle< YoYInflationTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< YoYInflationTermStructure > * >(argp1);
    {
      try {
        result = (*arg1)->calendar();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Calendar(static_cast< const Calendar& >(result))), SWIGTYPE_p_Calendar, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_YoYInflationTermStructureHandle_referenceDate) {
  {
    Handle< YoYInflationTermStructure > *arg1 = (Handle< YoYInflationTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: YoYInflationTermStructureHandle_referenceDate(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_YoYInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YoYInflationTermStructureHandle_referenceDate" "', argument " "1"" of type '" "Handle< YoYInflationTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< YoYInflationTermStructure > * >(argp1);
    {
      try {
        result = (*arg1)->referenceDate();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_YoYInflationTermStructureHandle_maxDate) {
  {
    Handle< YoYInflationTermStructure > *arg1 = (Handle< YoYInflationTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: YoYInflationTermStructureHandle_maxDate(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_YoYInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YoYInflationTermStructureHandle_maxDate" "', argument " "1"" of type '" "Handle< YoYInflationTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< YoYInflationTermStructure > * >(argp1);
    {
      try {
        result = (*arg1)->maxDate();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_YoYInflationTermStructureHandle_maxTime) {
  {
    Handle< YoYInflationTermStructure > *arg1 = (Handle< YoYInflationTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Time result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: YoYInflationTermStructureHandle_maxTime(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_YoYInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YoYInflationTermStructureHandle_maxTime" "', argument " "1"" of type '" "Handle< YoYInflationTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< YoYInflationTermStructure > * >(argp1);
    {
      try {
        result = (Time)(*arg1)->maxTime();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_YoYInflationTermStructureHandle_observationLag) {
  {
    Handle< YoYInflationTermStructure > *arg1 = (Handle< YoYInflationTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Period result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: YoYInflationTermStructureHandle_observationLag(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_YoYInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YoYInflationTermStructureHandle_observationLag" "', argument " "1"" of type '" "Handle< YoYInflationTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< YoYInflationTermStructure > * >(argp1);
    {
      try {
        result = (*arg1)->observationLag();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Period(static_cast< const Period& >(result))), SWIGTYPE_p_Period, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_YoYInflationTermStructureHandle_frequency) {
  {
    Handle< YoYInflationTermStructure > *arg1 = (Handle< YoYInflationTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Frequency result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: YoYInflationTermStructureHandle_frequency(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_YoYInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YoYInflationTermStructureHandle_frequency" "', argument " "1"" of type '" "Handle< YoYInflationTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< YoYInflationTermStructure > * >(argp1);
    {
      try {
        result = (Frequency)(*arg1)->frequency();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_YoYInflationTermStructureHandle_indexIsInterpolated) {
  {
    Handle< YoYInflationTermStructure > *arg1 = (Handle< YoYInflationTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: YoYInflationTermStructureHandle_indexIsInterpolated(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_YoYInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YoYInflationTermStructureHandle_indexIsInterpolated" "', argument " "1"" of type '" "Handle< YoYInflationTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< YoYInflationTermStructure > * >(argp1);
    {
      try {
        result = (bool)(*arg1)->indexIsInterpolated();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_YoYInflationTermStructureHandle_baseRate) {
  {
    Handle< YoYInflationTermStructure > *arg1 = (Handle< YoYInflationTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: YoYInflationTermStructureHandle_baseRate(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_YoYInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YoYInflationTermStructureHandle_baseRate" "', argument " "1"" of type '" "Handle< YoYInflationTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< YoYInflationTermStructure > * >(argp1);
    {
      try {
        result = (Rate)(*arg1)->baseRate();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_YoYInflationTermStructureHandle_nominalTermStructure) {
  {
    Handle< YoYInflationTermStructure > *arg1 = (Handle< YoYInflationTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Handle< YieldTermStructure > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: YoYInflationTermStructureHandle_nominalTermStructure(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_YoYInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YoYInflationTermStructureHandle_nominalTermStructure" "', argument " "1"" of type '" "Handle< YoYInflationTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< YoYInflationTermStructure > * >(argp1);
    {
      try {
        result = (*arg1)->nominalTermStructure();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Handle< YieldTermStructure >(static_cast< const Handle< YieldTermStructure >& >(result))), SWIGTYPE_p_HandleT_YieldTermStructure_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_YoYInflationTermStructureHandle_baseDate) {
  {
    Handle< YoYInflationTermStructure > *arg1 = (Handle< YoYInflationTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: YoYInflationTermStructureHandle_baseDate(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_YoYInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YoYInflationTermStructureHandle_baseDate" "', argument " "1"" of type '" "Handle< YoYInflationTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< YoYInflationTermStructure > * >(argp1);
    {
      try {
        result = (*arg1)->baseDate();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_YoYInflationTermStructureHandle_setSeasonality__SWIG_0) {
  {
    Handle< YoYInflationTermStructure > *arg1 = (Handle< YoYInflationTermStructure > *) 0 ;
    boost::shared_ptr< Seasonality > *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: YoYInflationTermStructureHandle_setSeasonality(self,seasonality);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_YoYInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YoYInflationTermStructureHandle_setSeasonality" "', argument " "1"" of type '" "Handle< YoYInflationTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< YoYInflationTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_boost__shared_ptrT_Seasonality_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "YoYInflationTermStructureHandle_setSeasonality" "', argument " "2"" of type '" "boost::shared_ptr< Seasonality > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "YoYInflationTermStructureHandle_setSeasonality" "', argument " "2"" of type '" "boost::shared_ptr< Seasonality > const &""'"); 
    }
    arg2 = reinterpret_cast< boost::shared_ptr< Seasonality > * >(argp2);
    {
      try {
        (*arg1)->setSeasonality((boost::shared_ptr< Seasonality > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_YoYInflationTermStructureHandle_setSeasonality__SWIG_1) {
  {
    Handle< YoYInflationTermStructure > *arg1 = (Handle< YoYInflationTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: YoYInflationTermStructureHandle_setSeasonality(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_YoYInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YoYInflationTermStructureHandle_setSeasonality" "', argument " "1"" of type '" "Handle< YoYInflationTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< YoYInflationTermStructure > * >(argp1);
    {
      try {
        (*arg1)->setSeasonality();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_YoYInflationTermStructureHandle_setSeasonality) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YoYInflationTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YoYInflationTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_boost__shared_ptrT_Seasonality_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_YoYInflationTermStructureHandle_setSeasonality__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_YoYInflationTermStructureHandle_setSeasonality__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'YoYInflationTermStructureHandle_setSeasonality'");
  XSRETURN(0);
}


XS(_wrap_YoYInflationTermStructureHandle_seasonality) {
  {
    Handle< YoYInflationTermStructure > *arg1 = (Handle< YoYInflationTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    boost::shared_ptr< Seasonality > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: YoYInflationTermStructureHandle_seasonality(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_YoYInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YoYInflationTermStructureHandle_seasonality" "', argument " "1"" of type '" "Handle< YoYInflationTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< YoYInflationTermStructure > * >(argp1);
    {
      try {
        result = (*arg1)->seasonality();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new boost::shared_ptr< Seasonality >(static_cast< const boost::shared_ptr< Seasonality >& >(result))), SWIGTYPE_p_boost__shared_ptrT_Seasonality_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_YoYInflationTermStructureHandle_hasSeasonality) {
  {
    Handle< YoYInflationTermStructure > *arg1 = (Handle< YoYInflationTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: YoYInflationTermStructureHandle_hasSeasonality(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_YoYInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YoYInflationTermStructureHandle_hasSeasonality" "', argument " "1"" of type '" "Handle< YoYInflationTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< YoYInflationTermStructure > * >(argp1);
    {
      try {
        result = (bool)(*arg1)->hasSeasonality();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_YoYInflationTermStructureHandle_enableExtrapolation) {
  {
    Handle< YoYInflationTermStructure > *arg1 = (Handle< YoYInflationTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: YoYInflationTermStructureHandle_enableExtrapolation(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_YoYInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YoYInflationTermStructureHandle_enableExtrapolation" "', argument " "1"" of type '" "Handle< YoYInflationTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< YoYInflationTermStructure > * >(argp1);
    {
      try {
        (*arg1)->enableExtrapolation();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_YoYInflationTermStructureHandle_disableExtrapolation) {
  {
    Handle< YoYInflationTermStructure > *arg1 = (Handle< YoYInflationTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: YoYInflationTermStructureHandle_disableExtrapolation(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_YoYInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YoYInflationTermStructureHandle_disableExtrapolation" "', argument " "1"" of type '" "Handle< YoYInflationTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< YoYInflationTermStructure > * >(argp1);
    {
      try {
        (*arg1)->disableExtrapolation();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_YoYInflationTermStructureHandle_allowsExtrapolation) {
  {
    Handle< YoYInflationTermStructure > *arg1 = (Handle< YoYInflationTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: YoYInflationTermStructureHandle_allowsExtrapolation(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_YoYInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YoYInflationTermStructureHandle_allowsExtrapolation" "', argument " "1"" of type '" "Handle< YoYInflationTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< YoYInflationTermStructure > * >(argp1);
    {
      try {
        result = (bool)(*arg1)->allowsExtrapolation();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_RelinkableYoYInflationTermStructureHandle__SWIG_0) {
  {
    boost::shared_ptr< YoYInflationTermStructure > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    RelinkableHandle< YoYInflationTermStructure > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_RelinkableYoYInflationTermStructureHandle(boost::shared_ptr< YoYInflationTermStructure > const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_YoYInflationTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_RelinkableYoYInflationTermStructureHandle" "', argument " "1"" of type '" "boost::shared_ptr< YoYInflationTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_RelinkableYoYInflationTermStructureHandle" "', argument " "1"" of type '" "boost::shared_ptr< YoYInflationTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< YoYInflationTermStructure > * >(argp1);
    {
      try {
        result = (RelinkableHandle< YoYInflationTermStructure > *)new RelinkableHandle< YoYInflationTermStructure >((boost::shared_ptr< YoYInflationTermStructure > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_RelinkableHandleT_YoYInflationTermStructure_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_RelinkableYoYInflationTermStructureHandle__SWIG_1) {
  {
    int argvi = 0;
    RelinkableHandle< YoYInflationTermStructure > *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_RelinkableYoYInflationTermStructureHandle();");
    }
    {
      try {
        result = (RelinkableHandle< YoYInflationTermStructure > *)new RelinkableHandle< YoYInflationTermStructure >();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_RelinkableHandleT_YoYInflationTermStructure_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_RelinkableYoYInflationTermStructureHandle) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_YoYInflationTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_RelinkableYoYInflationTermStructureHandle__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_RelinkableYoYInflationTermStructureHandle__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_RelinkableYoYInflationTermStructureHandle'");
  XSRETURN(0);
}


XS(_wrap_RelinkableYoYInflationTermStructureHandle_linkTo) {
  {
    RelinkableHandle< YoYInflationTermStructure > *arg1 = (RelinkableHandle< YoYInflationTermStructure > *) 0 ;
    boost::shared_ptr< YoYInflationTermStructure > *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: RelinkableYoYInflationTermStructureHandle_linkTo(self,boost::shared_ptr< YoYInflationTermStructure > const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_RelinkableHandleT_YoYInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RelinkableYoYInflationTermStructureHandle_linkTo" "', argument " "1"" of type '" "RelinkableHandle< YoYInflationTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< RelinkableHandle< YoYInflationTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_boost__shared_ptrT_YoYInflationTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "RelinkableYoYInflationTermStructureHandle_linkTo" "', argument " "2"" of type '" "boost::shared_ptr< YoYInflationTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "RelinkableYoYInflationTermStructureHandle_linkTo" "', argument " "2"" of type '" "boost::shared_ptr< YoYInflationTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< boost::shared_ptr< YoYInflationTermStructure > * >(argp2);
    {
      try {
        (arg1)->linkTo((boost::shared_ptr< YoYInflationTermStructure > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_RelinkableYoYInflationTermStructureHandle) {
  {
    RelinkableHandle< YoYInflationTermStructure > *arg1 = (RelinkableHandle< YoYInflationTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_RelinkableYoYInflationTermStructureHandle(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_RelinkableHandleT_YoYInflationTermStructure_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_RelinkableYoYInflationTermStructureHandle" "', argument " "1"" of type '" "RelinkableHandle< YoYInflationTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< RelinkableHandle< YoYInflationTermStructure > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ZeroInflationTermStructure___deref__) {
  {
    boost::shared_ptr< ZeroInflationTermStructure > *arg1 = (boost::shared_ptr< ZeroInflationTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    ZeroInflationTermStructure *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ZeroInflationTermStructure___deref__(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_ZeroInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZeroInflationTermStructure___deref__" "', argument " "1"" of type '" "boost::shared_ptr< ZeroInflationTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< ZeroInflationTermStructure > * >(argp1);
    {
      try {
        result = (ZeroInflationTermStructure *)(arg1)->operator ->();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ZeroInflationTermStructure, 0 | 0); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ZeroInflationTermStructure_isNull) {
  {
    boost::shared_ptr< ZeroInflationTermStructure > *arg1 = (boost::shared_ptr< ZeroInflationTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ZeroInflationTermStructure_isNull(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_ZeroInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZeroInflationTermStructure_isNull" "', argument " "1"" of type '" "boost::shared_ptr< ZeroInflationTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< ZeroInflationTermStructure > * >(argp1);
    {
      try {
        result = (bool)boost_shared_ptr_Sl_ZeroInflationTermStructure_Sg__isNull(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ZeroInflationTermStructure_asObservable) {
  {
    boost::shared_ptr< ZeroInflationTermStructure > *arg1 = (boost::shared_ptr< ZeroInflationTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    boost::shared_ptr< Observable > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ZeroInflationTermStructure_asObservable(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_ZeroInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZeroInflationTermStructure_asObservable" "', argument " "1"" of type '" "boost::shared_ptr< ZeroInflationTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< ZeroInflationTermStructure > * >(argp1);
    {
      try {
        result = boost_shared_ptr_Sl_ZeroInflationTermStructure_Sg__asObservable(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new boost::shared_ptr< Observable >(static_cast< const boost::shared_ptr< Observable >& >(result))), SWIGTYPE_p_boost__shared_ptrT_Observable_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ZeroInflationTermStructure) {
  {
    int argvi = 0;
    boost::shared_ptr< ZeroInflationTermStructure > *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_ZeroInflationTermStructure();");
    }
    {
      try {
        result = (boost::shared_ptr< ZeroInflationTermStructure > *)new boost::shared_ptr< ZeroInflationTermStructure >();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_boost__shared_ptrT_ZeroInflationTermStructure_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_ZeroInflationTermStructure) {
  {
    boost::shared_ptr< ZeroInflationTermStructure > *arg1 = (boost::shared_ptr< ZeroInflationTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_ZeroInflationTermStructure(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_ZeroInflationTermStructure_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ZeroInflationTermStructure" "', argument " "1"" of type '" "boost::shared_ptr< ZeroInflationTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< ZeroInflationTermStructure > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ZeroInflationTermStructure_zeroRate__SWIG_0) {
  {
    boost::shared_ptr< ZeroInflationTermStructure > *arg1 = (boost::shared_ptr< ZeroInflationTermStructure > *) 0 ;
    Date *arg2 = 0 ;
    Period *arg3 = 0 ;
    bool arg4 ;
    bool arg5 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    bool val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: ZeroInflationTermStructure_zeroRate(self,d,instObsLag,forceLinearInterpolation,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_ZeroInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZeroInflationTermStructure_zeroRate" "', argument " "1"" of type '" "boost::shared_ptr< ZeroInflationTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< ZeroInflationTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ZeroInflationTermStructure_zeroRate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ZeroInflationTermStructure_zeroRate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ZeroInflationTermStructure_zeroRate" "', argument " "3"" of type '" "Period const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ZeroInflationTermStructure_zeroRate" "', argument " "3"" of type '" "Period const &""'"); 
    }
    arg3 = reinterpret_cast< Period * >(argp3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "ZeroInflationTermStructure_zeroRate" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "ZeroInflationTermStructure_zeroRate" "', argument " "5"" of type '" "bool""'");
    } 
    arg5 = static_cast< bool >(val5);
    {
      try {
        result = (Rate)(*arg1)->zeroRate((Date const &)*arg2,(Period const &)*arg3,arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_ZeroInflationTermStructure_zeroRate__SWIG_1) {
  {
    boost::shared_ptr< ZeroInflationTermStructure > *arg1 = (boost::shared_ptr< ZeroInflationTermStructure > *) 0 ;
    Date *arg2 = 0 ;
    Period *arg3 = 0 ;
    bool arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: ZeroInflationTermStructure_zeroRate(self,d,instObsLag,forceLinearInterpolation);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_ZeroInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZeroInflationTermStructure_zeroRate" "', argument " "1"" of type '" "boost::shared_ptr< ZeroInflationTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< ZeroInflationTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ZeroInflationTermStructure_zeroRate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ZeroInflationTermStructure_zeroRate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ZeroInflationTermStructure_zeroRate" "', argument " "3"" of type '" "Period const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ZeroInflationTermStructure_zeroRate" "', argument " "3"" of type '" "Period const &""'"); 
    }
    arg3 = reinterpret_cast< Period * >(argp3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "ZeroInflationTermStructure_zeroRate" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    {
      try {
        result = (Rate)(*arg1)->zeroRate((Date const &)*arg2,(Period const &)*arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_ZeroInflationTermStructure_zeroRate__SWIG_2) {
  {
    boost::shared_ptr< ZeroInflationTermStructure > *arg1 = (boost::shared_ptr< ZeroInflationTermStructure > *) 0 ;
    Date *arg2 = 0 ;
    Period *arg3 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: ZeroInflationTermStructure_zeroRate(self,d,instObsLag);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_ZeroInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZeroInflationTermStructure_zeroRate" "', argument " "1"" of type '" "boost::shared_ptr< ZeroInflationTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< ZeroInflationTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ZeroInflationTermStructure_zeroRate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ZeroInflationTermStructure_zeroRate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ZeroInflationTermStructure_zeroRate" "', argument " "3"" of type '" "Period const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ZeroInflationTermStructure_zeroRate" "', argument " "3"" of type '" "Period const &""'"); 
    }
    arg3 = reinterpret_cast< Period * >(argp3);
    {
      try {
        result = (Rate)(*arg1)->zeroRate((Date const &)*arg2,(Period const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_ZeroInflationTermStructure_zeroRate__SWIG_3) {
  {
    boost::shared_ptr< ZeroInflationTermStructure > *arg1 = (boost::shared_ptr< ZeroInflationTermStructure > *) 0 ;
    Date *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: ZeroInflationTermStructure_zeroRate(self,d);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_ZeroInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZeroInflationTermStructure_zeroRate" "', argument " "1"" of type '" "boost::shared_ptr< ZeroInflationTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< ZeroInflationTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ZeroInflationTermStructure_zeroRate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ZeroInflationTermStructure_zeroRate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    {
      try {
        result = (Rate)(*arg1)->zeroRate((Date const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_ZeroInflationTermStructure_zeroRate) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_ZeroInflationTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_ZeroInflationTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_ZeroInflationTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_ZeroInflationTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_ZeroInflationTermStructure_zeroRate__SWIG_3); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_ZeroInflationTermStructure_zeroRate__SWIG_2); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_ZeroInflationTermStructure_zeroRate__SWIG_1); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_ZeroInflationTermStructure_zeroRate__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'ZeroInflationTermStructure_zeroRate'");
  XSRETURN(0);
}


XS(_wrap_ZeroInflationTermStructure_dayCounter) {
  {
    boost::shared_ptr< ZeroInflationTermStructure > *arg1 = (boost::shared_ptr< ZeroInflationTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    SwigValueWrapper< DayCounter > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ZeroInflationTermStructure_dayCounter(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_ZeroInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZeroInflationTermStructure_dayCounter" "', argument " "1"" of type '" "boost::shared_ptr< ZeroInflationTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< ZeroInflationTermStructure > * >(argp1);
    {
      try {
        result = (*arg1)->dayCounter();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new DayCounter(static_cast< const DayCounter& >(result))), SWIGTYPE_p_DayCounter, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ZeroInflationTermStructure_calendar) {
  {
    boost::shared_ptr< ZeroInflationTermStructure > *arg1 = (boost::shared_ptr< ZeroInflationTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    SwigValueWrapper< Calendar > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ZeroInflationTermStructure_calendar(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_ZeroInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZeroInflationTermStructure_calendar" "', argument " "1"" of type '" "boost::shared_ptr< ZeroInflationTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< ZeroInflationTermStructure > * >(argp1);
    {
      try {
        result = (*arg1)->calendar();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Calendar(static_cast< const Calendar& >(result))), SWIGTYPE_p_Calendar, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ZeroInflationTermStructure_referenceDate) {
  {
    boost::shared_ptr< ZeroInflationTermStructure > *arg1 = (boost::shared_ptr< ZeroInflationTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ZeroInflationTermStructure_referenceDate(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_ZeroInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZeroInflationTermStructure_referenceDate" "', argument " "1"" of type '" "boost::shared_ptr< ZeroInflationTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< ZeroInflationTermStructure > * >(argp1);
    {
      try {
        result = (*arg1)->referenceDate();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ZeroInflationTermStructure_maxDate) {
  {
    boost::shared_ptr< ZeroInflationTermStructure > *arg1 = (boost::shared_ptr< ZeroInflationTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ZeroInflationTermStructure_maxDate(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_ZeroInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZeroInflationTermStructure_maxDate" "', argument " "1"" of type '" "boost::shared_ptr< ZeroInflationTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< ZeroInflationTermStructure > * >(argp1);
    {
      try {
        result = (*arg1)->maxDate();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ZeroInflationTermStructure_maxTime) {
  {
    boost::shared_ptr< ZeroInflationTermStructure > *arg1 = (boost::shared_ptr< ZeroInflationTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Time result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ZeroInflationTermStructure_maxTime(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_ZeroInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZeroInflationTermStructure_maxTime" "', argument " "1"" of type '" "boost::shared_ptr< ZeroInflationTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< ZeroInflationTermStructure > * >(argp1);
    {
      try {
        result = (Time)(*arg1)->maxTime();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ZeroInflationTermStructure_observationLag) {
  {
    boost::shared_ptr< ZeroInflationTermStructure > *arg1 = (boost::shared_ptr< ZeroInflationTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Period result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ZeroInflationTermStructure_observationLag(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_ZeroInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZeroInflationTermStructure_observationLag" "', argument " "1"" of type '" "boost::shared_ptr< ZeroInflationTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< ZeroInflationTermStructure > * >(argp1);
    {
      try {
        result = (*arg1)->observationLag();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Period(static_cast< const Period& >(result))), SWIGTYPE_p_Period, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ZeroInflationTermStructure_frequency) {
  {
    boost::shared_ptr< ZeroInflationTermStructure > *arg1 = (boost::shared_ptr< ZeroInflationTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Frequency result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ZeroInflationTermStructure_frequency(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_ZeroInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZeroInflationTermStructure_frequency" "', argument " "1"" of type '" "boost::shared_ptr< ZeroInflationTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< ZeroInflationTermStructure > * >(argp1);
    {
      try {
        result = (Frequency)(*arg1)->frequency();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ZeroInflationTermStructure_indexIsInterpolated) {
  {
    boost::shared_ptr< ZeroInflationTermStructure > *arg1 = (boost::shared_ptr< ZeroInflationTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ZeroInflationTermStructure_indexIsInterpolated(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_ZeroInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZeroInflationTermStructure_indexIsInterpolated" "', argument " "1"" of type '" "boost::shared_ptr< ZeroInflationTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< ZeroInflationTermStructure > * >(argp1);
    {
      try {
        result = (bool)(*arg1)->indexIsInterpolated();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ZeroInflationTermStructure_baseRate) {
  {
    boost::shared_ptr< ZeroInflationTermStructure > *arg1 = (boost::shared_ptr< ZeroInflationTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ZeroInflationTermStructure_baseRate(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_ZeroInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZeroInflationTermStructure_baseRate" "', argument " "1"" of type '" "boost::shared_ptr< ZeroInflationTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< ZeroInflationTermStructure > * >(argp1);
    {
      try {
        result = (Rate)(*arg1)->baseRate();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ZeroInflationTermStructure_nominalTermStructure) {
  {
    boost::shared_ptr< ZeroInflationTermStructure > *arg1 = (boost::shared_ptr< ZeroInflationTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Handle< YieldTermStructure > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ZeroInflationTermStructure_nominalTermStructure(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_ZeroInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZeroInflationTermStructure_nominalTermStructure" "', argument " "1"" of type '" "boost::shared_ptr< ZeroInflationTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< ZeroInflationTermStructure > * >(argp1);
    {
      try {
        result = (*arg1)->nominalTermStructure();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Handle< YieldTermStructure >(static_cast< const Handle< YieldTermStructure >& >(result))), SWIGTYPE_p_HandleT_YieldTermStructure_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ZeroInflationTermStructure_baseDate) {
  {
    boost::shared_ptr< ZeroInflationTermStructure > *arg1 = (boost::shared_ptr< ZeroInflationTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ZeroInflationTermStructure_baseDate(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_ZeroInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZeroInflationTermStructure_baseDate" "', argument " "1"" of type '" "boost::shared_ptr< ZeroInflationTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< ZeroInflationTermStructure > * >(argp1);
    {
      try {
        result = (*arg1)->baseDate();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ZeroInflationTermStructure_setSeasonality__SWIG_0) {
  {
    boost::shared_ptr< ZeroInflationTermStructure > *arg1 = (boost::shared_ptr< ZeroInflationTermStructure > *) 0 ;
    boost::shared_ptr< Seasonality > *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: ZeroInflationTermStructure_setSeasonality(self,seasonality);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_ZeroInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZeroInflationTermStructure_setSeasonality" "', argument " "1"" of type '" "boost::shared_ptr< ZeroInflationTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< ZeroInflationTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_boost__shared_ptrT_Seasonality_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ZeroInflationTermStructure_setSeasonality" "', argument " "2"" of type '" "boost::shared_ptr< Seasonality > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ZeroInflationTermStructure_setSeasonality" "', argument " "2"" of type '" "boost::shared_ptr< Seasonality > const &""'"); 
    }
    arg2 = reinterpret_cast< boost::shared_ptr< Seasonality > * >(argp2);
    {
      try {
        (*arg1)->setSeasonality((boost::shared_ptr< Seasonality > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_ZeroInflationTermStructure_setSeasonality__SWIG_1) {
  {
    boost::shared_ptr< ZeroInflationTermStructure > *arg1 = (boost::shared_ptr< ZeroInflationTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ZeroInflationTermStructure_setSeasonality(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_ZeroInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZeroInflationTermStructure_setSeasonality" "', argument " "1"" of type '" "boost::shared_ptr< ZeroInflationTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< ZeroInflationTermStructure > * >(argp1);
    {
      try {
        (*arg1)->setSeasonality();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ZeroInflationTermStructure_setSeasonality) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_ZeroInflationTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_ZeroInflationTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_boost__shared_ptrT_Seasonality_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_ZeroInflationTermStructure_setSeasonality__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_ZeroInflationTermStructure_setSeasonality__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'ZeroInflationTermStructure_setSeasonality'");
  XSRETURN(0);
}


XS(_wrap_ZeroInflationTermStructure_seasonality) {
  {
    boost::shared_ptr< ZeroInflationTermStructure > *arg1 = (boost::shared_ptr< ZeroInflationTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    boost::shared_ptr< Seasonality > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ZeroInflationTermStructure_seasonality(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_ZeroInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZeroInflationTermStructure_seasonality" "', argument " "1"" of type '" "boost::shared_ptr< ZeroInflationTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< ZeroInflationTermStructure > * >(argp1);
    {
      try {
        result = (*arg1)->seasonality();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new boost::shared_ptr< Seasonality >(static_cast< const boost::shared_ptr< Seasonality >& >(result))), SWIGTYPE_p_boost__shared_ptrT_Seasonality_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ZeroInflationTermStructure_hasSeasonality) {
  {
    boost::shared_ptr< ZeroInflationTermStructure > *arg1 = (boost::shared_ptr< ZeroInflationTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ZeroInflationTermStructure_hasSeasonality(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_ZeroInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZeroInflationTermStructure_hasSeasonality" "', argument " "1"" of type '" "boost::shared_ptr< ZeroInflationTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< ZeroInflationTermStructure > * >(argp1);
    {
      try {
        result = (bool)(*arg1)->hasSeasonality();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ZeroInflationTermStructure_enableExtrapolation) {
  {
    boost::shared_ptr< ZeroInflationTermStructure > *arg1 = (boost::shared_ptr< ZeroInflationTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ZeroInflationTermStructure_enableExtrapolation(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_ZeroInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZeroInflationTermStructure_enableExtrapolation" "', argument " "1"" of type '" "boost::shared_ptr< ZeroInflationTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< ZeroInflationTermStructure > * >(argp1);
    {
      try {
        (*arg1)->enableExtrapolation();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ZeroInflationTermStructure_disableExtrapolation) {
  {
    boost::shared_ptr< ZeroInflationTermStructure > *arg1 = (boost::shared_ptr< ZeroInflationTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ZeroInflationTermStructure_disableExtrapolation(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_ZeroInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZeroInflationTermStructure_disableExtrapolation" "', argument " "1"" of type '" "boost::shared_ptr< ZeroInflationTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< ZeroInflationTermStructure > * >(argp1);
    {
      try {
        (*arg1)->disableExtrapolation();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ZeroInflationTermStructure_allowsExtrapolation) {
  {
    boost::shared_ptr< ZeroInflationTermStructure > *arg1 = (boost::shared_ptr< ZeroInflationTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ZeroInflationTermStructure_allowsExtrapolation(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_ZeroInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZeroInflationTermStructure_allowsExtrapolation" "', argument " "1"" of type '" "boost::shared_ptr< ZeroInflationTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< ZeroInflationTermStructure > * >(argp1);
    {
      try {
        result = (bool)(*arg1)->allowsExtrapolation();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ZeroInflationTermStructureHandle__SWIG_0) {
  {
    boost::shared_ptr< ZeroInflationTermStructure > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Handle< ZeroInflationTermStructure > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_ZeroInflationTermStructureHandle(boost::shared_ptr< ZeroInflationTermStructure > const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_ZeroInflationTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ZeroInflationTermStructureHandle" "', argument " "1"" of type '" "boost::shared_ptr< ZeroInflationTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ZeroInflationTermStructureHandle" "', argument " "1"" of type '" "boost::shared_ptr< ZeroInflationTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< ZeroInflationTermStructure > * >(argp1);
    {
      try {
        result = (Handle< ZeroInflationTermStructure > *)new Handle< ZeroInflationTermStructure >((boost::shared_ptr< ZeroInflationTermStructure > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_HandleT_ZeroInflationTermStructure_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ZeroInflationTermStructureHandle__SWIG_1) {
  {
    int argvi = 0;
    Handle< ZeroInflationTermStructure > *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_ZeroInflationTermStructureHandle();");
    }
    {
      try {
        result = (Handle< ZeroInflationTermStructure > *)new Handle< ZeroInflationTermStructure >();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_HandleT_ZeroInflationTermStructure_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_ZeroInflationTermStructureHandle) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_ZeroInflationTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ZeroInflationTermStructureHandle__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ZeroInflationTermStructureHandle__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_ZeroInflationTermStructureHandle'");
  XSRETURN(0);
}


XS(_wrap_ZeroInflationTermStructureHandle___deref__) {
  {
    Handle< ZeroInflationTermStructure > *arg1 = (Handle< ZeroInflationTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    boost::shared_ptr< ZeroInflationTermStructure > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ZeroInflationTermStructureHandle___deref__(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_ZeroInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZeroInflationTermStructureHandle___deref__" "', argument " "1"" of type '" "Handle< ZeroInflationTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< ZeroInflationTermStructure > * >(argp1);
    {
      try {
        result = (arg1)->operator ->();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new boost::shared_ptr< ZeroInflationTermStructure >(static_cast< const boost::shared_ptr< ZeroInflationTermStructure >& >(result))), SWIGTYPE_p_boost__shared_ptrT_ZeroInflationTermStructure_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ZeroInflationTermStructureHandle_empty) {
  {
    Handle< ZeroInflationTermStructure > *arg1 = (Handle< ZeroInflationTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ZeroInflationTermStructureHandle_empty(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_ZeroInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZeroInflationTermStructureHandle_empty" "', argument " "1"" of type '" "Handle< ZeroInflationTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< ZeroInflationTermStructure > * >(argp1);
    {
      try {
        result = (bool)(arg1)->empty();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ZeroInflationTermStructureHandle_asObservable) {
  {
    Handle< ZeroInflationTermStructure > *arg1 = (Handle< ZeroInflationTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    boost::shared_ptr< Observable > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ZeroInflationTermStructureHandle_asObservable(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_ZeroInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZeroInflationTermStructureHandle_asObservable" "', argument " "1"" of type '" "Handle< ZeroInflationTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< ZeroInflationTermStructure > * >(argp1);
    {
      try {
        result = Handle_Sl_ZeroInflationTermStructure_Sg__asObservable(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new boost::shared_ptr< Observable >(static_cast< const boost::shared_ptr< Observable >& >(result))), SWIGTYPE_p_boost__shared_ptrT_Observable_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_ZeroInflationTermStructureHandle) {
  {
    Handle< ZeroInflationTermStructure > *arg1 = (Handle< ZeroInflationTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_ZeroInflationTermStructureHandle(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_ZeroInflationTermStructure_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ZeroInflationTermStructureHandle" "', argument " "1"" of type '" "Handle< ZeroInflationTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< ZeroInflationTermStructure > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ZeroInflationTermStructureHandle_zeroRate__SWIG_0) {
  {
    Handle< ZeroInflationTermStructure > *arg1 = (Handle< ZeroInflationTermStructure > *) 0 ;
    Date *arg2 = 0 ;
    Period *arg3 = 0 ;
    bool arg4 ;
    bool arg5 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    bool val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: ZeroInflationTermStructureHandle_zeroRate(self,d,instObsLag,forceLinearInterpolation,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_ZeroInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZeroInflationTermStructureHandle_zeroRate" "', argument " "1"" of type '" "Handle< ZeroInflationTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< ZeroInflationTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ZeroInflationTermStructureHandle_zeroRate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ZeroInflationTermStructureHandle_zeroRate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ZeroInflationTermStructureHandle_zeroRate" "', argument " "3"" of type '" "Period const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ZeroInflationTermStructureHandle_zeroRate" "', argument " "3"" of type '" "Period const &""'"); 
    }
    arg3 = reinterpret_cast< Period * >(argp3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "ZeroInflationTermStructureHandle_zeroRate" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "ZeroInflationTermStructureHandle_zeroRate" "', argument " "5"" of type '" "bool""'");
    } 
    arg5 = static_cast< bool >(val5);
    {
      try {
        result = (Rate)(*arg1)->zeroRate((Date const &)*arg2,(Period const &)*arg3,arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_ZeroInflationTermStructureHandle_zeroRate__SWIG_1) {
  {
    Handle< ZeroInflationTermStructure > *arg1 = (Handle< ZeroInflationTermStructure > *) 0 ;
    Date *arg2 = 0 ;
    Period *arg3 = 0 ;
    bool arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: ZeroInflationTermStructureHandle_zeroRate(self,d,instObsLag,forceLinearInterpolation);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_ZeroInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZeroInflationTermStructureHandle_zeroRate" "', argument " "1"" of type '" "Handle< ZeroInflationTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< ZeroInflationTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ZeroInflationTermStructureHandle_zeroRate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ZeroInflationTermStructureHandle_zeroRate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ZeroInflationTermStructureHandle_zeroRate" "', argument " "3"" of type '" "Period const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ZeroInflationTermStructureHandle_zeroRate" "', argument " "3"" of type '" "Period const &""'"); 
    }
    arg3 = reinterpret_cast< Period * >(argp3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "ZeroInflationTermStructureHandle_zeroRate" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    {
      try {
        result = (Rate)(*arg1)->zeroRate((Date const &)*arg2,(Period const &)*arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_ZeroInflationTermStructureHandle_zeroRate__SWIG_2) {
  {
    Handle< ZeroInflationTermStructure > *arg1 = (Handle< ZeroInflationTermStructure > *) 0 ;
    Date *arg2 = 0 ;
    Period *arg3 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: ZeroInflationTermStructureHandle_zeroRate(self,d,instObsLag);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_ZeroInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZeroInflationTermStructureHandle_zeroRate" "', argument " "1"" of type '" "Handle< ZeroInflationTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< ZeroInflationTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ZeroInflationTermStructureHandle_zeroRate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ZeroInflationTermStructureHandle_zeroRate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ZeroInflationTermStructureHandle_zeroRate" "', argument " "3"" of type '" "Period const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ZeroInflationTermStructureHandle_zeroRate" "', argument " "3"" of type '" "Period const &""'"); 
    }
    arg3 = reinterpret_cast< Period * >(argp3);
    {
      try {
        result = (Rate)(*arg1)->zeroRate((Date const &)*arg2,(Period const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_ZeroInflationTermStructureHandle_zeroRate__SWIG_3) {
  {
    Handle< ZeroInflationTermStructure > *arg1 = (Handle< ZeroInflationTermStructure > *) 0 ;
    Date *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: ZeroInflationTermStructureHandle_zeroRate(self,d);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_ZeroInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZeroInflationTermStructureHandle_zeroRate" "', argument " "1"" of type '" "Handle< ZeroInflationTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< ZeroInflationTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ZeroInflationTermStructureHandle_zeroRate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ZeroInflationTermStructureHandle_zeroRate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    {
      try {
        result = (Rate)(*arg1)->zeroRate((Date const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_ZeroInflationTermStructureHandle_zeroRate) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_ZeroInflationTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_ZeroInflationTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_ZeroInflationTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_ZeroInflationTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_ZeroInflationTermStructureHandle_zeroRate__SWIG_3); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_ZeroInflationTermStructureHandle_zeroRate__SWIG_2); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_ZeroInflationTermStructureHandle_zeroRate__SWIG_1); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_ZeroInflationTermStructureHandle_zeroRate__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'ZeroInflationTermStructureHandle_zeroRate'");
  XSRETURN(0);
}


XS(_wrap_ZeroInflationTermStructureHandle_dayCounter) {
  {
    Handle< ZeroInflationTermStructure > *arg1 = (Handle< ZeroInflationTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    SwigValueWrapper< DayCounter > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ZeroInflationTermStructureHandle_dayCounter(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_ZeroInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZeroInflationTermStructureHandle_dayCounter" "', argument " "1"" of type '" "Handle< ZeroInflationTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< ZeroInflationTermStructure > * >(argp1);
    {
      try {
        result = (*arg1)->dayCounter();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new DayCounter(static_cast< const DayCounter& >(result))), SWIGTYPE_p_DayCounter, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ZeroInflationTermStructureHandle_calendar) {
  {
    Handle< ZeroInflationTermStructure > *arg1 = (Handle< ZeroInflationTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    SwigValueWrapper< Calendar > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ZeroInflationTermStructureHandle_calendar(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_ZeroInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZeroInflationTermStructureHandle_calendar" "', argument " "1"" of type '" "Handle< ZeroInflationTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< ZeroInflationTermStructure > * >(argp1);
    {
      try {
        result = (*arg1)->calendar();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Calendar(static_cast< const Calendar& >(result))), SWIGTYPE_p_Calendar, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ZeroInflationTermStructureHandle_referenceDate) {
  {
    Handle< ZeroInflationTermStructure > *arg1 = (Handle< ZeroInflationTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ZeroInflationTermStructureHandle_referenceDate(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_ZeroInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZeroInflationTermStructureHandle_referenceDate" "', argument " "1"" of type '" "Handle< ZeroInflationTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< ZeroInflationTermStructure > * >(argp1);
    {
      try {
        result = (*arg1)->referenceDate();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ZeroInflationTermStructureHandle_maxDate) {
  {
    Handle< ZeroInflationTermStructure > *arg1 = (Handle< ZeroInflationTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ZeroInflationTermStructureHandle_maxDate(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_ZeroInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZeroInflationTermStructureHandle_maxDate" "', argument " "1"" of type '" "Handle< ZeroInflationTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< ZeroInflationTermStructure > * >(argp1);
    {
      try {
        result = (*arg1)->maxDate();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ZeroInflationTermStructureHandle_maxTime) {
  {
    Handle< ZeroInflationTermStructure > *arg1 = (Handle< ZeroInflationTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Time result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ZeroInflationTermStructureHandle_maxTime(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_ZeroInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZeroInflationTermStructureHandle_maxTime" "', argument " "1"" of type '" "Handle< ZeroInflationTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< ZeroInflationTermStructure > * >(argp1);
    {
      try {
        result = (Time)(*arg1)->maxTime();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ZeroInflationTermStructureHandle_observationLag) {
  {
    Handle< ZeroInflationTermStructure > *arg1 = (Handle< ZeroInflationTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Period result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ZeroInflationTermStructureHandle_observationLag(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_ZeroInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZeroInflationTermStructureHandle_observationLag" "', argument " "1"" of type '" "Handle< ZeroInflationTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< ZeroInflationTermStructure > * >(argp1);
    {
      try {
        result = (*arg1)->observationLag();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Period(static_cast< const Period& >(result))), SWIGTYPE_p_Period, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ZeroInflationTermStructureHandle_frequency) {
  {
    Handle< ZeroInflationTermStructure > *arg1 = (Handle< ZeroInflationTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Frequency result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ZeroInflationTermStructureHandle_frequency(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_ZeroInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZeroInflationTermStructureHandle_frequency" "', argument " "1"" of type '" "Handle< ZeroInflationTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< ZeroInflationTermStructure > * >(argp1);
    {
      try {
        result = (Frequency)(*arg1)->frequency();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ZeroInflationTermStructureHandle_indexIsInterpolated) {
  {
    Handle< ZeroInflationTermStructure > *arg1 = (Handle< ZeroInflationTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ZeroInflationTermStructureHandle_indexIsInterpolated(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_ZeroInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZeroInflationTermStructureHandle_indexIsInterpolated" "', argument " "1"" of type '" "Handle< ZeroInflationTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< ZeroInflationTermStructure > * >(argp1);
    {
      try {
        result = (bool)(*arg1)->indexIsInterpolated();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ZeroInflationTermStructureHandle_baseRate) {
  {
    Handle< ZeroInflationTermStructure > *arg1 = (Handle< ZeroInflationTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ZeroInflationTermStructureHandle_baseRate(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_ZeroInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZeroInflationTermStructureHandle_baseRate" "', argument " "1"" of type '" "Handle< ZeroInflationTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< ZeroInflationTermStructure > * >(argp1);
    {
      try {
        result = (Rate)(*arg1)->baseRate();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ZeroInflationTermStructureHandle_nominalTermStructure) {
  {
    Handle< ZeroInflationTermStructure > *arg1 = (Handle< ZeroInflationTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Handle< YieldTermStructure > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ZeroInflationTermStructureHandle_nominalTermStructure(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_ZeroInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZeroInflationTermStructureHandle_nominalTermStructure" "', argument " "1"" of type '" "Handle< ZeroInflationTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< ZeroInflationTermStructure > * >(argp1);
    {
      try {
        result = (*arg1)->nominalTermStructure();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Handle< YieldTermStructure >(static_cast< const Handle< YieldTermStructure >& >(result))), SWIGTYPE_p_HandleT_YieldTermStructure_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ZeroInflationTermStructureHandle_baseDate) {
  {
    Handle< ZeroInflationTermStructure > *arg1 = (Handle< ZeroInflationTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ZeroInflationTermStructureHandle_baseDate(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_ZeroInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZeroInflationTermStructureHandle_baseDate" "', argument " "1"" of type '" "Handle< ZeroInflationTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< ZeroInflationTermStructure > * >(argp1);
    {
      try {
        result = (*arg1)->baseDate();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ZeroInflationTermStructureHandle_setSeasonality__SWIG_0) {
  {
    Handle< ZeroInflationTermStructure > *arg1 = (Handle< ZeroInflationTermStructure > *) 0 ;
    boost::shared_ptr< Seasonality > *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: ZeroInflationTermStructureHandle_setSeasonality(self,seasonality);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_ZeroInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZeroInflationTermStructureHandle_setSeasonality" "', argument " "1"" of type '" "Handle< ZeroInflationTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< ZeroInflationTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_boost__shared_ptrT_Seasonality_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ZeroInflationTermStructureHandle_setSeasonality" "', argument " "2"" of type '" "boost::shared_ptr< Seasonality > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ZeroInflationTermStructureHandle_setSeasonality" "', argument " "2"" of type '" "boost::shared_ptr< Seasonality > const &""'"); 
    }
    arg2 = reinterpret_cast< boost::shared_ptr< Seasonality > * >(argp2);
    {
      try {
        (*arg1)->setSeasonality((boost::shared_ptr< Seasonality > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_ZeroInflationTermStructureHandle_setSeasonality__SWIG_1) {
  {
    Handle< ZeroInflationTermStructure > *arg1 = (Handle< ZeroInflationTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ZeroInflationTermStructureHandle_setSeasonality(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_ZeroInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZeroInflationTermStructureHandle_setSeasonality" "', argument " "1"" of type '" "Handle< ZeroInflationTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< ZeroInflationTermStructure > * >(argp1);
    {
      try {
        (*arg1)->setSeasonality();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ZeroInflationTermStructureHandle_setSeasonality) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_ZeroInflationTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_ZeroInflationTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_boost__shared_ptrT_Seasonality_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_ZeroInflationTermStructureHandle_setSeasonality__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_ZeroInflationTermStructureHandle_setSeasonality__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'ZeroInflationTermStructureHandle_setSeasonality'");
  XSRETURN(0);
}


XS(_wrap_ZeroInflationTermStructureHandle_seasonality) {
  {
    Handle< ZeroInflationTermStructure > *arg1 = (Handle< ZeroInflationTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    boost::shared_ptr< Seasonality > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ZeroInflationTermStructureHandle_seasonality(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_ZeroInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZeroInflationTermStructureHandle_seasonality" "', argument " "1"" of type '" "Handle< ZeroInflationTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< ZeroInflationTermStructure > * >(argp1);
    {
      try {
        result = (*arg1)->seasonality();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new boost::shared_ptr< Seasonality >(static_cast< const boost::shared_ptr< Seasonality >& >(result))), SWIGTYPE_p_boost__shared_ptrT_Seasonality_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ZeroInflationTermStructureHandle_hasSeasonality) {
  {
    Handle< ZeroInflationTermStructure > *arg1 = (Handle< ZeroInflationTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ZeroInflationTermStructureHandle_hasSeasonality(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_ZeroInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZeroInflationTermStructureHandle_hasSeasonality" "', argument " "1"" of type '" "Handle< ZeroInflationTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< ZeroInflationTermStructure > * >(argp1);
    {
      try {
        result = (bool)(*arg1)->hasSeasonality();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ZeroInflationTermStructureHandle_enableExtrapolation) {
  {
    Handle< ZeroInflationTermStructure > *arg1 = (Handle< ZeroInflationTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ZeroInflationTermStructureHandle_enableExtrapolation(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_ZeroInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZeroInflationTermStructureHandle_enableExtrapolation" "', argument " "1"" of type '" "Handle< ZeroInflationTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< ZeroInflationTermStructure > * >(argp1);
    {
      try {
        (*arg1)->enableExtrapolation();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ZeroInflationTermStructureHandle_disableExtrapolation) {
  {
    Handle< ZeroInflationTermStructure > *arg1 = (Handle< ZeroInflationTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ZeroInflationTermStructureHandle_disableExtrapolation(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_ZeroInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZeroInflationTermStructureHandle_disableExtrapolation" "', argument " "1"" of type '" "Handle< ZeroInflationTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< ZeroInflationTermStructure > * >(argp1);
    {
      try {
        (*arg1)->disableExtrapolation();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ZeroInflationTermStructureHandle_allowsExtrapolation) {
  {
    Handle< ZeroInflationTermStructure > *arg1 = (Handle< ZeroInflationTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ZeroInflationTermStructureHandle_allowsExtrapolation(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_ZeroInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZeroInflationTermStructureHandle_allowsExtrapolation" "', argument " "1"" of type '" "Handle< ZeroInflationTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< ZeroInflationTermStructure > * >(argp1);
    {
      try {
        result = (bool)(*arg1)->allowsExtrapolation();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_RelinkableZeroInflationTermStructureHandle__SWIG_0) {
  {
    boost::shared_ptr< ZeroInflationTermStructure > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    RelinkableHandle< ZeroInflationTermStructure > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_RelinkableZeroInflationTermStructureHandle(boost::shared_ptr< ZeroInflationTermStructure > const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_ZeroInflationTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_RelinkableZeroInflationTermStructureHandle" "', argument " "1"" of type '" "boost::shared_ptr< ZeroInflationTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_RelinkableZeroInflationTermStructureHandle" "', argument " "1"" of type '" "boost::shared_ptr< ZeroInflationTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< ZeroInflationTermStructure > * >(argp1);
    {
      try {
        result = (RelinkableHandle< ZeroInflationTermStructure > *)new RelinkableHandle< ZeroInflationTermStructure >((boost::shared_ptr< ZeroInflationTermStructure > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_RelinkableHandleT_ZeroInflationTermStructure_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_RelinkableZeroInflationTermStructureHandle__SWIG_1) {
  {
    int argvi = 0;
    RelinkableHandle< ZeroInflationTermStructure > *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_RelinkableZeroInflationTermStructureHandle();");
    }
    {
      try {
        result = (RelinkableHandle< ZeroInflationTermStructure > *)new RelinkableHandle< ZeroInflationTermStructure >();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_RelinkableHandleT_ZeroInflationTermStructure_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_RelinkableZeroInflationTermStructureHandle) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_ZeroInflationTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_RelinkableZeroInflationTermStructureHandle__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_RelinkableZeroInflationTermStructureHandle__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_RelinkableZeroInflationTermStructureHandle'");
  XSRETURN(0);
}


XS(_wrap_RelinkableZeroInflationTermStructureHandle_linkTo) {
  {
    RelinkableHandle< ZeroInflationTermStructure > *arg1 = (RelinkableHandle< ZeroInflationTermStructure > *) 0 ;
    boost::shared_ptr< ZeroInflationTermStructure > *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: RelinkableZeroInflationTermStructureHandle_linkTo(self,boost::shared_ptr< ZeroInflationTermStructure > const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_RelinkableHandleT_ZeroInflationTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RelinkableZeroInflationTermStructureHandle_linkTo" "', argument " "1"" of type '" "RelinkableHandle< ZeroInflationTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< RelinkableHandle< ZeroInflationTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_boost__shared_ptrT_ZeroInflationTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "RelinkableZeroInflationTermStructureHandle_linkTo" "', argument " "2"" of type '" "boost::shared_ptr< ZeroInflationTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "RelinkableZeroInflationTermStructureHandle_linkTo" "', argument " "2"" of type '" "boost::shared_ptr< ZeroInflationTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< boost::shared_ptr< ZeroInflationTermStructure > * >(argp2);
    {
      try {
        (arg1)->linkTo((boost::shared_ptr< ZeroInflationTermStructure > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_RelinkableZeroInflationTermStructureHandle) {
  {
    RelinkableHandle< ZeroInflationTermStructure > *arg1 = (RelinkableHandle< ZeroInflationTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_RelinkableZeroInflationTermStructureHandle(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_RelinkableHandleT_ZeroInflationTermStructure_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_RelinkableZeroInflationTermStructureHandle" "', argument " "1"" of type '" "RelinkableHandle< ZeroInflationTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< RelinkableHandle< ZeroInflationTermStructure > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Region_name) {
  {
    Region *arg1 = (Region *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Region_name(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Region, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Region_name" "', argument " "1"" of type '" "Region const *""'"); 
    }
    arg1 = reinterpret_cast< Region * >(argp1);
    {
      try {
        result = ((Region const *)arg1)->name();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Region_code) {
  {
    Region *arg1 = (Region *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Region_code(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Region, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Region_code" "', argument " "1"" of type '" "Region const *""'"); 
    }
    arg1 = reinterpret_cast< Region * >(argp1);
    {
      try {
        result = ((Region const *)arg1)->code();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_Region) {
  {
    Region *arg1 = (Region *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Region(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Region, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Region" "', argument " "1"" of type '" "Region *""'"); 
    }
    arg1 = reinterpret_cast< Region * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CustomRegion) {
  {
    std::string *arg1 = 0 ;
    std::string *arg2 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    CustomRegion *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_CustomRegion(name,code);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CustomRegion" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CustomRegion" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CustomRegion" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CustomRegion" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      try {
        result = (CustomRegion *)new CustomRegion((std::string const &)*arg1,(std::string const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CustomRegion, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_delete_CustomRegion) {
  {
    CustomRegion *arg1 = (CustomRegion *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_CustomRegion(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CustomRegion, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CustomRegion" "', argument " "1"" of type '" "CustomRegion *""'"); 
    }
    arg1 = reinterpret_cast< CustomRegion * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_InflationIndex_interpolated) {
  {
    InflationIndexPtr *arg1 = (InflationIndexPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: InflationIndex_interpolated(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_InflationIndexPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InflationIndex_interpolated" "', argument " "1"" of type '" "InflationIndexPtr const *""'"); 
    }
    arg1 = reinterpret_cast< InflationIndexPtr * >(argp1);
    {
      try {
        result = (bool)InflationIndexPtr_interpolated((InflationIndexPtr const *)arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_InflationIndex_frequency) {
  {
    InflationIndexPtr *arg1 = (InflationIndexPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Frequency result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: InflationIndex_frequency(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_InflationIndexPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InflationIndex_frequency" "', argument " "1"" of type '" "InflationIndexPtr const *""'"); 
    }
    arg1 = reinterpret_cast< InflationIndexPtr * >(argp1);
    {
      try {
        result = (Frequency)InflationIndexPtr_frequency((InflationIndexPtr const *)arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_InflationIndex_availabilityLag) {
  {
    InflationIndexPtr *arg1 = (InflationIndexPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Period result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: InflationIndex_availabilityLag(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_InflationIndexPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InflationIndex_availabilityLag" "', argument " "1"" of type '" "InflationIndexPtr const *""'"); 
    }
    arg1 = reinterpret_cast< InflationIndexPtr * >(argp1);
    {
      try {
        result = InflationIndexPtr_availabilityLag((InflationIndexPtr const *)arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Period(static_cast< const Period& >(result))), SWIGTYPE_p_Period, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_InflationIndex_currency) {
  {
    InflationIndexPtr *arg1 = (InflationIndexPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Currency result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: InflationIndex_currency(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_InflationIndexPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InflationIndex_currency" "', argument " "1"" of type '" "InflationIndexPtr const *""'"); 
    }
    arg1 = reinterpret_cast< InflationIndexPtr * >(argp1);
    {
      try {
        result = InflationIndexPtr_currency((InflationIndexPtr const *)arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Currency(static_cast< const Currency& >(result))), SWIGTYPE_p_Currency, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_InflationIndex) {
  {
    InflationIndexPtr *arg1 = (InflationIndexPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_InflationIndex(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_InflationIndexPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_InflationIndex" "', argument " "1"" of type '" "InflationIndexPtr *""'"); 
    }
    arg1 = reinterpret_cast< InflationIndexPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ZeroInflationIndex__SWIG_0) {
  {
    std::string *arg1 = 0 ;
    Region *arg2 = 0 ;
    bool arg3 ;
    bool arg4 ;
    Frequency arg5 ;
    Period *arg6 = 0 ;
    Currency *arg7 = 0 ;
    Handle< ZeroInflationTermStructure > *arg8 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    void *argp2 ;
    int res2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    int argvi = 0;
    ZeroInflationIndexPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 8) || (items > 8)) {
      SWIG_croak("Usage: new_ZeroInflationIndex(familyName,region,revised,interpolated,frequency,availabilityLag,currency,h);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ZeroInflationIndex" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ZeroInflationIndex" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Region,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ZeroInflationIndex" "', argument " "2"" of type '" "Region const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ZeroInflationIndex" "', argument " "2"" of type '" "Region const &""'"); 
    }
    arg2 = reinterpret_cast< Region * >(argp2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_ZeroInflationIndex" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_ZeroInflationIndex" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_ZeroInflationIndex" "', argument " "5"" of type '" "Frequency""'");
    } 
    arg5 = static_cast< Frequency >(val5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_ZeroInflationIndex" "', argument " "6"" of type '" "Period const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ZeroInflationIndex" "', argument " "6"" of type '" "Period const &""'"); 
    }
    arg6 = reinterpret_cast< Period * >(argp6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Currency,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_ZeroInflationIndex" "', argument " "7"" of type '" "Currency const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ZeroInflationIndex" "', argument " "7"" of type '" "Currency const &""'"); 
    }
    arg7 = reinterpret_cast< Currency * >(argp7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_HandleT_ZeroInflationTermStructure_t,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_ZeroInflationIndex" "', argument " "8"" of type '" "Handle< ZeroInflationTermStructure > const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ZeroInflationIndex" "', argument " "8"" of type '" "Handle< ZeroInflationTermStructure > const &""'"); 
    }
    arg8 = reinterpret_cast< Handle< ZeroInflationTermStructure > * >(argp8);
    {
      try {
        result = (ZeroInflationIndexPtr *)new_ZeroInflationIndexPtr__SWIG_0((std::string const &)*arg1,(Region const &)*arg2,arg3,arg4,arg5,(Period const &)*arg6,(Currency const &)*arg7,(Handle< ZeroInflationTermStructure > const &)*arg8);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ZeroInflationIndexPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ZeroInflationIndex__SWIG_1) {
  {
    std::string *arg1 = 0 ;
    Region *arg2 = 0 ;
    bool arg3 ;
    bool arg4 ;
    Frequency arg5 ;
    Period *arg6 = 0 ;
    Currency *arg7 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    void *argp2 ;
    int res2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    int argvi = 0;
    ZeroInflationIndexPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: new_ZeroInflationIndex(familyName,region,revised,interpolated,frequency,availabilityLag,currency);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ZeroInflationIndex" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ZeroInflationIndex" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Region,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ZeroInflationIndex" "', argument " "2"" of type '" "Region const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ZeroInflationIndex" "', argument " "2"" of type '" "Region const &""'"); 
    }
    arg2 = reinterpret_cast< Region * >(argp2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_ZeroInflationIndex" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_ZeroInflationIndex" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_ZeroInflationIndex" "', argument " "5"" of type '" "Frequency""'");
    } 
    arg5 = static_cast< Frequency >(val5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_ZeroInflationIndex" "', argument " "6"" of type '" "Period const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ZeroInflationIndex" "', argument " "6"" of type '" "Period const &""'"); 
    }
    arg6 = reinterpret_cast< Period * >(argp6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Currency,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_ZeroInflationIndex" "', argument " "7"" of type '" "Currency const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ZeroInflationIndex" "', argument " "7"" of type '" "Currency const &""'"); 
    }
    arg7 = reinterpret_cast< Currency * >(argp7);
    {
      try {
        result = (ZeroInflationIndexPtr *)new_ZeroInflationIndexPtr__SWIG_0((std::string const &)*arg1,(Region const &)*arg2,arg3,arg4,arg5,(Period const &)*arg6,(Currency const &)*arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ZeroInflationIndexPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ZeroInflationIndex) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Region, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Currency, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 8) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Region, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Currency, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_HandleT_ZeroInflationTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ZeroInflationIndex__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ZeroInflationIndex__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_ZeroInflationIndex'");
  XSRETURN(0);
}


XS(_wrap_delete_ZeroInflationIndex) {
  {
    ZeroInflationIndexPtr *arg1 = (ZeroInflationIndexPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_ZeroInflationIndex(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ZeroInflationIndexPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ZeroInflationIndex" "', argument " "1"" of type '" "ZeroInflationIndexPtr *""'"); 
    }
    arg1 = reinterpret_cast< ZeroInflationIndexPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_YoYInflationIndex) {
  {
    YoYInflationIndexPtr *arg1 = (YoYInflationIndexPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_YoYInflationIndex(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_YoYInflationIndexPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_YoYInflationIndex" "', argument " "1"" of type '" "YoYInflationIndexPtr *""'"); 
    }
    arg1 = reinterpret_cast< YoYInflationIndexPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_EUHICP__SWIG_0) {
  {
    bool arg1 ;
    Handle< ZeroInflationTermStructure > *arg2 = 0 ;
    bool val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    EUHICPPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_EUHICP(interpolated,h);");
    }
    ecode1 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_EUHICP" "', argument " "1"" of type '" "bool""'");
    } 
    arg1 = static_cast< bool >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_ZeroInflationTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_EUHICP" "', argument " "2"" of type '" "Handle< ZeroInflationTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EUHICP" "', argument " "2"" of type '" "Handle< ZeroInflationTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< ZeroInflationTermStructure > * >(argp2);
    {
      try {
        result = (EUHICPPtr *)new_EUHICPPtr__SWIG_0(arg1,(Handle< ZeroInflationTermStructure > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EUHICPPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_EUHICP__SWIG_1) {
  {
    bool arg1 ;
    bool val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    EUHICPPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_EUHICP(interpolated);");
    }
    ecode1 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_EUHICP" "', argument " "1"" of type '" "bool""'");
    } 
    arg1 = static_cast< bool >(val1);
    {
      try {
        result = (EUHICPPtr *)new_EUHICPPtr__SWIG_0(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EUHICPPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_EUHICP) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_ZeroInflationTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_EUHICP__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_EUHICP__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_EUHICP'");
  XSRETURN(0);
}


XS(_wrap_delete_EUHICP) {
  {
    EUHICPPtr *arg1 = (EUHICPPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_EUHICP(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_EUHICPPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_EUHICP" "', argument " "1"" of type '" "EUHICPPtr *""'"); 
    }
    arg1 = reinterpret_cast< EUHICPPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_EUHICPXT__SWIG_0) {
  {
    bool arg1 ;
    Handle< ZeroInflationTermStructure > *arg2 = 0 ;
    bool val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    EUHICPXTPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_EUHICPXT(interpolated,h);");
    }
    ecode1 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_EUHICPXT" "', argument " "1"" of type '" "bool""'");
    } 
    arg1 = static_cast< bool >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_ZeroInflationTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_EUHICPXT" "', argument " "2"" of type '" "Handle< ZeroInflationTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_EUHICPXT" "', argument " "2"" of type '" "Handle< ZeroInflationTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< ZeroInflationTermStructure > * >(argp2);
    {
      try {
        result = (EUHICPXTPtr *)new_EUHICPXTPtr__SWIG_0(arg1,(Handle< ZeroInflationTermStructure > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EUHICPXTPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_EUHICPXT__SWIG_1) {
  {
    bool arg1 ;
    bool val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    EUHICPXTPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_EUHICPXT(interpolated);");
    }
    ecode1 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_EUHICPXT" "', argument " "1"" of type '" "bool""'");
    } 
    arg1 = static_cast< bool >(val1);
    {
      try {
        result = (EUHICPXTPtr *)new_EUHICPXTPtr__SWIG_0(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_EUHICPXTPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_EUHICPXT) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_ZeroInflationTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_EUHICPXT__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_EUHICPXT__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_EUHICPXT'");
  XSRETURN(0);
}


XS(_wrap_delete_EUHICPXT) {
  {
    EUHICPXTPtr *arg1 = (EUHICPXTPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_EUHICPXT(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_EUHICPXTPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_EUHICPXT" "', argument " "1"" of type '" "EUHICPXTPtr *""'"); 
    }
    arg1 = reinterpret_cast< EUHICPXTPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FRHICP__SWIG_0) {
  {
    bool arg1 ;
    Handle< ZeroInflationTermStructure > *arg2 = 0 ;
    bool val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    FRHICPPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_FRHICP(interpolated,h);");
    }
    ecode1 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FRHICP" "', argument " "1"" of type '" "bool""'");
    } 
    arg1 = static_cast< bool >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_ZeroInflationTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FRHICP" "', argument " "2"" of type '" "Handle< ZeroInflationTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FRHICP" "', argument " "2"" of type '" "Handle< ZeroInflationTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< ZeroInflationTermStructure > * >(argp2);
    {
      try {
        result = (FRHICPPtr *)new_FRHICPPtr__SWIG_0(arg1,(Handle< ZeroInflationTermStructure > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FRHICPPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FRHICP__SWIG_1) {
  {
    bool arg1 ;
    bool val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    FRHICPPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_FRHICP(interpolated);");
    }
    ecode1 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FRHICP" "', argument " "1"" of type '" "bool""'");
    } 
    arg1 = static_cast< bool >(val1);
    {
      try {
        result = (FRHICPPtr *)new_FRHICPPtr__SWIG_0(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FRHICPPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FRHICP) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_ZeroInflationTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FRHICP__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FRHICP__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_FRHICP'");
  XSRETURN(0);
}


XS(_wrap_delete_FRHICP) {
  {
    FRHICPPtr *arg1 = (FRHICPPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_FRHICP(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_FRHICPPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FRHICP" "', argument " "1"" of type '" "FRHICPPtr *""'"); 
    }
    arg1 = reinterpret_cast< FRHICPPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_UKRPI__SWIG_0) {
  {
    bool arg1 ;
    Handle< ZeroInflationTermStructure > *arg2 = 0 ;
    bool val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    UKRPIPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_UKRPI(interpolated,h);");
    }
    ecode1 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_UKRPI" "', argument " "1"" of type '" "bool""'");
    } 
    arg1 = static_cast< bool >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_ZeroInflationTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_UKRPI" "', argument " "2"" of type '" "Handle< ZeroInflationTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_UKRPI" "', argument " "2"" of type '" "Handle< ZeroInflationTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< ZeroInflationTermStructure > * >(argp2);
    {
      try {
        result = (UKRPIPtr *)new_UKRPIPtr__SWIG_0(arg1,(Handle< ZeroInflationTermStructure > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UKRPIPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_UKRPI__SWIG_1) {
  {
    bool arg1 ;
    bool val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    UKRPIPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_UKRPI(interpolated);");
    }
    ecode1 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_UKRPI" "', argument " "1"" of type '" "bool""'");
    } 
    arg1 = static_cast< bool >(val1);
    {
      try {
        result = (UKRPIPtr *)new_UKRPIPtr__SWIG_0(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UKRPIPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_UKRPI) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_ZeroInflationTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_UKRPI__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_UKRPI__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_UKRPI'");
  XSRETURN(0);
}


XS(_wrap_delete_UKRPI) {
  {
    UKRPIPtr *arg1 = (UKRPIPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_UKRPI(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_UKRPIPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UKRPI" "', argument " "1"" of type '" "UKRPIPtr *""'"); 
    }
    arg1 = reinterpret_cast< UKRPIPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_USCPI__SWIG_0) {
  {
    bool arg1 ;
    Handle< ZeroInflationTermStructure > *arg2 = 0 ;
    bool val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    USCPIPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_USCPI(interpolated,h);");
    }
    ecode1 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_USCPI" "', argument " "1"" of type '" "bool""'");
    } 
    arg1 = static_cast< bool >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_ZeroInflationTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_USCPI" "', argument " "2"" of type '" "Handle< ZeroInflationTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_USCPI" "', argument " "2"" of type '" "Handle< ZeroInflationTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< ZeroInflationTermStructure > * >(argp2);
    {
      try {
        result = (USCPIPtr *)new_USCPIPtr__SWIG_0(arg1,(Handle< ZeroInflationTermStructure > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_USCPIPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_USCPI__SWIG_1) {
  {
    bool arg1 ;
    bool val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    USCPIPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_USCPI(interpolated);");
    }
    ecode1 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_USCPI" "', argument " "1"" of type '" "bool""'");
    } 
    arg1 = static_cast< bool >(val1);
    {
      try {
        result = (USCPIPtr *)new_USCPIPtr__SWIG_0(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_USCPIPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_USCPI) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_ZeroInflationTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_USCPI__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_USCPI__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_USCPI'");
  XSRETURN(0);
}


XS(_wrap_delete_USCPI) {
  {
    USCPIPtr *arg1 = (USCPIPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_USCPI(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_USCPIPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_USCPI" "', argument " "1"" of type '" "USCPIPtr *""'"); 
    }
    arg1 = reinterpret_cast< USCPIPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ZACPI__SWIG_0) {
  {
    bool arg1 ;
    Handle< ZeroInflationTermStructure > *arg2 = 0 ;
    bool val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    ZACPIPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_ZACPI(interpolated,h);");
    }
    ecode1 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ZACPI" "', argument " "1"" of type '" "bool""'");
    } 
    arg1 = static_cast< bool >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_ZeroInflationTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ZACPI" "', argument " "2"" of type '" "Handle< ZeroInflationTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ZACPI" "', argument " "2"" of type '" "Handle< ZeroInflationTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< ZeroInflationTermStructure > * >(argp2);
    {
      try {
        result = (ZACPIPtr *)new_ZACPIPtr__SWIG_0(arg1,(Handle< ZeroInflationTermStructure > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ZACPIPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ZACPI__SWIG_1) {
  {
    bool arg1 ;
    bool val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    ZACPIPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_ZACPI(interpolated);");
    }
    ecode1 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ZACPI" "', argument " "1"" of type '" "bool""'");
    } 
    arg1 = static_cast< bool >(val1);
    {
      try {
        result = (ZACPIPtr *)new_ZACPIPtr__SWIG_0(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ZACPIPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ZACPI) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_ZeroInflationTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ZACPI__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ZACPI__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_ZACPI'");
  XSRETURN(0);
}


XS(_wrap_delete_ZACPI) {
  {
    ZACPIPtr *arg1 = (ZACPIPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_ZACPI(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ZACPIPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ZACPI" "', argument " "1"" of type '" "ZACPIPtr *""'"); 
    }
    arg1 = reinterpret_cast< ZACPIPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_YYEUHICP__SWIG_0) {
  {
    bool arg1 ;
    Handle< YoYInflationTermStructure > *arg2 = 0 ;
    bool val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    YYEUHICPPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_YYEUHICP(interpolated,h);");
    }
    ecode1 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_YYEUHICP" "', argument " "1"" of type '" "bool""'");
    } 
    arg1 = static_cast< bool >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_YoYInflationTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_YYEUHICP" "', argument " "2"" of type '" "Handle< YoYInflationTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_YYEUHICP" "', argument " "2"" of type '" "Handle< YoYInflationTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< YoYInflationTermStructure > * >(argp2);
    {
      try {
        result = (YYEUHICPPtr *)new_YYEUHICPPtr__SWIG_0(arg1,(Handle< YoYInflationTermStructure > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_YYEUHICPPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_YYEUHICP__SWIG_1) {
  {
    bool arg1 ;
    bool val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    YYEUHICPPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_YYEUHICP(interpolated);");
    }
    ecode1 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_YYEUHICP" "', argument " "1"" of type '" "bool""'");
    } 
    arg1 = static_cast< bool >(val1);
    {
      try {
        result = (YYEUHICPPtr *)new_YYEUHICPPtr__SWIG_0(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_YYEUHICPPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_YYEUHICP) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_YoYInflationTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_YYEUHICP__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_YYEUHICP__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_YYEUHICP'");
  XSRETURN(0);
}


XS(_wrap_delete_YYEUHICP) {
  {
    YYEUHICPPtr *arg1 = (YYEUHICPPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_YYEUHICP(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_YYEUHICPPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_YYEUHICP" "', argument " "1"" of type '" "YYEUHICPPtr *""'"); 
    }
    arg1 = reinterpret_cast< YYEUHICPPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_YYEUHICPXT__SWIG_0) {
  {
    bool arg1 ;
    Handle< YoYInflationTermStructure > *arg2 = 0 ;
    bool val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    YYEUHICPXTPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_YYEUHICPXT(interpolated,h);");
    }
    ecode1 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_YYEUHICPXT" "', argument " "1"" of type '" "bool""'");
    } 
    arg1 = static_cast< bool >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_YoYInflationTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_YYEUHICPXT" "', argument " "2"" of type '" "Handle< YoYInflationTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_YYEUHICPXT" "', argument " "2"" of type '" "Handle< YoYInflationTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< YoYInflationTermStructure > * >(argp2);
    {
      try {
        result = (YYEUHICPXTPtr *)new_YYEUHICPXTPtr__SWIG_0(arg1,(Handle< YoYInflationTermStructure > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_YYEUHICPXTPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_YYEUHICPXT__SWIG_1) {
  {
    bool arg1 ;
    bool val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    YYEUHICPXTPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_YYEUHICPXT(interpolated);");
    }
    ecode1 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_YYEUHICPXT" "', argument " "1"" of type '" "bool""'");
    } 
    arg1 = static_cast< bool >(val1);
    {
      try {
        result = (YYEUHICPXTPtr *)new_YYEUHICPXTPtr__SWIG_0(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_YYEUHICPXTPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_YYEUHICPXT) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_YoYInflationTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_YYEUHICPXT__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_YYEUHICPXT__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_YYEUHICPXT'");
  XSRETURN(0);
}


XS(_wrap_delete_YYEUHICPXT) {
  {
    YYEUHICPXTPtr *arg1 = (YYEUHICPXTPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_YYEUHICPXT(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_YYEUHICPXTPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_YYEUHICPXT" "', argument " "1"" of type '" "YYEUHICPXTPtr *""'"); 
    }
    arg1 = reinterpret_cast< YYEUHICPXTPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_YYFRHICP__SWIG_0) {
  {
    bool arg1 ;
    Handle< YoYInflationTermStructure > *arg2 = 0 ;
    bool val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    YYFRHICPPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_YYFRHICP(interpolated,h);");
    }
    ecode1 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_YYFRHICP" "', argument " "1"" of type '" "bool""'");
    } 
    arg1 = static_cast< bool >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_YoYInflationTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_YYFRHICP" "', argument " "2"" of type '" "Handle< YoYInflationTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_YYFRHICP" "', argument " "2"" of type '" "Handle< YoYInflationTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< YoYInflationTermStructure > * >(argp2);
    {
      try {
        result = (YYFRHICPPtr *)new_YYFRHICPPtr__SWIG_0(arg1,(Handle< YoYInflationTermStructure > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_YYFRHICPPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_YYFRHICP__SWIG_1) {
  {
    bool arg1 ;
    bool val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    YYFRHICPPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_YYFRHICP(interpolated);");
    }
    ecode1 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_YYFRHICP" "', argument " "1"" of type '" "bool""'");
    } 
    arg1 = static_cast< bool >(val1);
    {
      try {
        result = (YYFRHICPPtr *)new_YYFRHICPPtr__SWIG_0(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_YYFRHICPPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_YYFRHICP) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_YoYInflationTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_YYFRHICP__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_YYFRHICP__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_YYFRHICP'");
  XSRETURN(0);
}


XS(_wrap_delete_YYFRHICP) {
  {
    YYFRHICPPtr *arg1 = (YYFRHICPPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_YYFRHICP(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_YYFRHICPPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_YYFRHICP" "', argument " "1"" of type '" "YYFRHICPPtr *""'"); 
    }
    arg1 = reinterpret_cast< YYFRHICPPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_YYUKRPI__SWIG_0) {
  {
    bool arg1 ;
    Handle< YoYInflationTermStructure > *arg2 = 0 ;
    bool val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    YYUKRPIPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_YYUKRPI(interpolated,h);");
    }
    ecode1 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_YYUKRPI" "', argument " "1"" of type '" "bool""'");
    } 
    arg1 = static_cast< bool >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_YoYInflationTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_YYUKRPI" "', argument " "2"" of type '" "Handle< YoYInflationTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_YYUKRPI" "', argument " "2"" of type '" "Handle< YoYInflationTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< YoYInflationTermStructure > * >(argp2);
    {
      try {
        result = (YYUKRPIPtr *)new_YYUKRPIPtr__SWIG_0(arg1,(Handle< YoYInflationTermStructure > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_YYUKRPIPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_YYUKRPI__SWIG_1) {
  {
    bool arg1 ;
    bool val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    YYUKRPIPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_YYUKRPI(interpolated);");
    }
    ecode1 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_YYUKRPI" "', argument " "1"" of type '" "bool""'");
    } 
    arg1 = static_cast< bool >(val1);
    {
      try {
        result = (YYUKRPIPtr *)new_YYUKRPIPtr__SWIG_0(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_YYUKRPIPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_YYUKRPI) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_YoYInflationTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_YYUKRPI__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_YYUKRPI__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_YYUKRPI'");
  XSRETURN(0);
}


XS(_wrap_delete_YYUKRPI) {
  {
    YYUKRPIPtr *arg1 = (YYUKRPIPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_YYUKRPI(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_YYUKRPIPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_YYUKRPI" "', argument " "1"" of type '" "YYUKRPIPtr *""'"); 
    }
    arg1 = reinterpret_cast< YYUKRPIPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_YYUSCPI__SWIG_0) {
  {
    bool arg1 ;
    Handle< YoYInflationTermStructure > *arg2 = 0 ;
    bool val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    YYUSCPIPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_YYUSCPI(interpolated,h);");
    }
    ecode1 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_YYUSCPI" "', argument " "1"" of type '" "bool""'");
    } 
    arg1 = static_cast< bool >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_YoYInflationTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_YYUSCPI" "', argument " "2"" of type '" "Handle< YoYInflationTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_YYUSCPI" "', argument " "2"" of type '" "Handle< YoYInflationTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< YoYInflationTermStructure > * >(argp2);
    {
      try {
        result = (YYUSCPIPtr *)new_YYUSCPIPtr__SWIG_0(arg1,(Handle< YoYInflationTermStructure > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_YYUSCPIPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_YYUSCPI__SWIG_1) {
  {
    bool arg1 ;
    bool val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    YYUSCPIPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_YYUSCPI(interpolated);");
    }
    ecode1 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_YYUSCPI" "', argument " "1"" of type '" "bool""'");
    } 
    arg1 = static_cast< bool >(val1);
    {
      try {
        result = (YYUSCPIPtr *)new_YYUSCPIPtr__SWIG_0(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_YYUSCPIPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_YYUSCPI) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_YoYInflationTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_YYUSCPI__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_YYUSCPI__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_YYUSCPI'");
  XSRETURN(0);
}


XS(_wrap_delete_YYUSCPI) {
  {
    YYUSCPIPtr *arg1 = (YYUSCPIPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_YYUSCPI(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_YYUSCPIPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_YYUSCPI" "', argument " "1"" of type '" "YYUSCPIPtr *""'"); 
    }
    arg1 = reinterpret_cast< YYUSCPIPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_YYZACPI__SWIG_0) {
  {
    bool arg1 ;
    Handle< YoYInflationTermStructure > *arg2 = 0 ;
    bool val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    YYZACPIPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_YYZACPI(interpolated,h);");
    }
    ecode1 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_YYZACPI" "', argument " "1"" of type '" "bool""'");
    } 
    arg1 = static_cast< bool >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_YoYInflationTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_YYZACPI" "', argument " "2"" of type '" "Handle< YoYInflationTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_YYZACPI" "', argument " "2"" of type '" "Handle< YoYInflationTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< YoYInflationTermStructure > * >(argp2);
    {
      try {
        result = (YYZACPIPtr *)new_YYZACPIPtr__SWIG_0(arg1,(Handle< YoYInflationTermStructure > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_YYZACPIPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_YYZACPI__SWIG_1) {
  {
    bool arg1 ;
    bool val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    YYZACPIPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_YYZACPI(interpolated);");
    }
    ecode1 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_YYZACPI" "', argument " "1"" of type '" "bool""'");
    } 
    arg1 = static_cast< bool >(val1);
    {
      try {
        result = (YYZACPIPtr *)new_YYZACPIPtr__SWIG_0(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_YYZACPIPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_YYZACPI) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_YoYInflationTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_YYZACPI__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_YYZACPI__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_YYZACPI'");
  XSRETURN(0);
}


XS(_wrap_delete_YYZACPI) {
  {
    YYZACPIPtr *arg1 = (YYZACPIPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_YYZACPI(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_YYZACPIPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_YYZACPI" "', argument " "1"" of type '" "YYZACPIPtr *""'"); 
    }
    arg1 = reinterpret_cast< YYZACPIPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CPI) {
  {
    int argvi = 0;
    CPI *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_CPI();");
    }
    {
      try {
        result = (CPI *)new CPI();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CPI, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_CPI) {
  {
    CPI *arg1 = (CPI *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_CPI(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CPI, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CPI" "', argument " "1"" of type '" "CPI *""'"); 
    }
    arg1 = reinterpret_cast< CPI * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ZeroHelper___deref__) {
  {
    boost::shared_ptr< ZeroHelper > *arg1 = (boost::shared_ptr< ZeroHelper > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    ZeroHelper *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ZeroHelper___deref__(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_ZeroHelper_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZeroHelper___deref__" "', argument " "1"" of type '" "boost::shared_ptr< ZeroHelper > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< ZeroHelper > * >(argp1);
    {
      try {
        result = (ZeroHelper *)(arg1)->operator ->();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ZeroHelper, 0 | 0); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ZeroHelper_isNull) {
  {
    boost::shared_ptr< ZeroHelper > *arg1 = (boost::shared_ptr< ZeroHelper > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ZeroHelper_isNull(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_ZeroHelper_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZeroHelper_isNull" "', argument " "1"" of type '" "boost::shared_ptr< ZeroHelper > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< ZeroHelper > * >(argp1);
    {
      try {
        result = (bool)boost_shared_ptr_Sl_ZeroHelper_Sg__isNull(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ZeroHelper) {
  {
    int argvi = 0;
    boost::shared_ptr< ZeroHelper > *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_ZeroHelper();");
    }
    {
      try {
        result = (boost::shared_ptr< ZeroHelper > *)new boost::shared_ptr< ZeroHelper >();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_boost__shared_ptrT_ZeroHelper_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_ZeroHelper) {
  {
    boost::shared_ptr< ZeroHelper > *arg1 = (boost::shared_ptr< ZeroHelper > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_ZeroHelper(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_ZeroHelper_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ZeroHelper" "', argument " "1"" of type '" "boost::shared_ptr< ZeroHelper > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< ZeroHelper > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_YoYHelper___deref__) {
  {
    boost::shared_ptr< YoYHelper > *arg1 = (boost::shared_ptr< YoYHelper > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    YoYHelper *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: YoYHelper___deref__(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_YoYHelper_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YoYHelper___deref__" "', argument " "1"" of type '" "boost::shared_ptr< YoYHelper > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< YoYHelper > * >(argp1);
    {
      try {
        result = (YoYHelper *)(arg1)->operator ->();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_YoYHelper, 0 | 0); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_YoYHelper_isNull) {
  {
    boost::shared_ptr< YoYHelper > *arg1 = (boost::shared_ptr< YoYHelper > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: YoYHelper_isNull(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_YoYHelper_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YoYHelper_isNull" "', argument " "1"" of type '" "boost::shared_ptr< YoYHelper > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< YoYHelper > * >(argp1);
    {
      try {
        result = (bool)boost_shared_ptr_Sl_YoYHelper_Sg__isNull(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_YoYHelper) {
  {
    int argvi = 0;
    boost::shared_ptr< YoYHelper > *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_YoYHelper();");
    }
    {
      try {
        result = (boost::shared_ptr< YoYHelper > *)new boost::shared_ptr< YoYHelper >();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_boost__shared_ptrT_YoYHelper_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_YoYHelper) {
  {
    boost::shared_ptr< YoYHelper > *arg1 = (boost::shared_ptr< YoYHelper > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_YoYHelper(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_YoYHelper_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_YoYHelper" "', argument " "1"" of type '" "boost::shared_ptr< YoYHelper > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< YoYHelper > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ZeroHelperVector__SWIG_0) {
  {
    unsigned int arg1 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    std::vector< boost::shared_ptr< ZeroHelper > > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_ZeroHelperVector(size);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ZeroHelperVector" "', argument " "1"" of type '" "unsigned int""'");
    } 
    arg1 = static_cast< unsigned int >(val1);
    {
      try {
        result = (std::vector< boost::shared_ptr< ZeroHelper > > *)new std::vector< boost::shared_ptr< ZeroHelper > >(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_boost__shared_ptrT_ZeroHelper_t_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ZeroHelperVector__SWIG_1) {
  {
    int argvi = 0;
    std::vector< boost::shared_ptr< ZeroHelper > > *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_ZeroHelperVector();");
    }
    {
      try {
        result = (std::vector< boost::shared_ptr< ZeroHelper > > *)new std::vector< boost::shared_ptr< ZeroHelper > >();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_boost__shared_ptrT_ZeroHelper_t_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_ZeroHelperVector__SWIG_2) {
  {
    unsigned int arg1 ;
    boost::shared_ptr< ZeroHelper > *arg2 = 0 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    std::vector< boost::shared_ptr< ZeroHelper > > *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_ZeroHelperVector(size,value);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ZeroHelperVector" "', argument " "1"" of type '" "unsigned int""'");
    } 
    arg1 = static_cast< unsigned int >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_boost__shared_ptrT_ZeroHelper_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ZeroHelperVector" "', argument " "2"" of type '" "boost::shared_ptr< ZeroHelper > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ZeroHelperVector" "', argument " "2"" of type '" "boost::shared_ptr< ZeroHelper > const &""'"); 
    }
    arg2 = reinterpret_cast< boost::shared_ptr< ZeroHelper > * >(argp2);
    {
      try {
        result = (std::vector< boost::shared_ptr< ZeroHelper > > *)new std::vector< boost::shared_ptr< ZeroHelper > >(arg1,(boost::shared_ptr< ZeroHelper > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_boost__shared_ptrT_ZeroHelper_t_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ZeroHelperVector__SWIG_3) {
  {
    std::vector< boost::shared_ptr< ZeroHelper > > *arg1 = 0 ;
    std::vector< boost::shared_ptr< ZeroHelper > > temp1 ;
    std::vector< boost::shared_ptr< ZeroHelper > > *v1 ;
    int argvi = 0;
    std::vector< boost::shared_ptr< ZeroHelper > > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_ZeroHelperVector(std::vector< boost::shared_ptr< ZeroHelper > > const &);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_ZeroHelper_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_ZeroHelperVector. "
          "Expected an array of " "boost::shared_ptr< ZeroHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< ZeroHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_ZeroHelper_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_ZeroHelperVector. "
              "Expected an array of " "boost::shared_ptr< ZeroHelper >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_ZeroHelperVector. "
          "Expected an array of " "boost::shared_ptr< ZeroHelper >");
      }
    }
    {
      try {
        result = (std::vector< boost::shared_ptr< ZeroHelper > > *)new std::vector< boost::shared_ptr< ZeroHelper > >((std::vector< boost::shared_ptr< ZeroHelper > > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_boost__shared_ptrT_ZeroHelper_t_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ZeroHelperVector) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< ZeroHelper > >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_ZeroHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< ZeroHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_ZeroHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_boost__shared_ptrT_ZeroHelper_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ZeroHelperVector__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ZeroHelperVector__SWIG_0); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ZeroHelperVector__SWIG_3); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ZeroHelperVector__SWIG_2); return;
    }
  }
  
  croak("No matching function for overloaded 'new_ZeroHelperVector'");
  XSRETURN(0);
}


XS(_wrap_ZeroHelperVector_size) {
  {
    std::vector< boost::shared_ptr< ZeroHelper > > *arg1 = (std::vector< boost::shared_ptr< ZeroHelper > > *) 0 ;
    std::vector< boost::shared_ptr< ZeroHelper > > temp1 ;
    std::vector< boost::shared_ptr< ZeroHelper > > *v1 ;
    int argvi = 0;
    unsigned int result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ZeroHelperVector_size(self);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_ZeroHelper_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of ZeroHelperVector_size. "
          "Expected an array of " "boost::shared_ptr< ZeroHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< ZeroHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_ZeroHelper_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "ZeroHelperVector_size. "
              "Expected an array of " "boost::shared_ptr< ZeroHelper >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of ZeroHelperVector_size. "
          "Expected an array of " "boost::shared_ptr< ZeroHelper >");
      }
    }
    {
      try {
        result = (unsigned int)((std::vector< boost::shared_ptr< ZeroHelper > > const *)arg1)->size();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ZeroHelperVector_empty) {
  {
    std::vector< boost::shared_ptr< ZeroHelper > > *arg1 = (std::vector< boost::shared_ptr< ZeroHelper > > *) 0 ;
    std::vector< boost::shared_ptr< ZeroHelper > > temp1 ;
    std::vector< boost::shared_ptr< ZeroHelper > > *v1 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ZeroHelperVector_empty(self);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_ZeroHelper_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of ZeroHelperVector_empty. "
          "Expected an array of " "boost::shared_ptr< ZeroHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< ZeroHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_ZeroHelper_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "ZeroHelperVector_empty. "
              "Expected an array of " "boost::shared_ptr< ZeroHelper >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of ZeroHelperVector_empty. "
          "Expected an array of " "boost::shared_ptr< ZeroHelper >");
      }
    }
    {
      try {
        result = (bool)((std::vector< boost::shared_ptr< ZeroHelper > > const *)arg1)->empty();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ZeroHelperVector_clear) {
  {
    std::vector< boost::shared_ptr< ZeroHelper > > *arg1 = (std::vector< boost::shared_ptr< ZeroHelper > > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ZeroHelperVector_clear(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_boost__shared_ptrT_ZeroHelper_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZeroHelperVector_clear" "', argument " "1"" of type '" "std::vector< boost::shared_ptr< ZeroHelper > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< boost::shared_ptr< ZeroHelper > > * >(argp1);
    {
      try {
        (arg1)->clear();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ZeroHelperVector_push) {
  {
    std::vector< boost::shared_ptr< ZeroHelper > > *arg1 = (std::vector< boost::shared_ptr< ZeroHelper > > *) 0 ;
    boost::shared_ptr< ZeroHelper > *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: ZeroHelperVector_push(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_boost__shared_ptrT_ZeroHelper_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZeroHelperVector_push" "', argument " "1"" of type '" "std::vector< boost::shared_ptr< ZeroHelper > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< boost::shared_ptr< ZeroHelper > > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_boost__shared_ptrT_ZeroHelper_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ZeroHelperVector_push" "', argument " "2"" of type '" "boost::shared_ptr< ZeroHelper > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ZeroHelperVector_push" "', argument " "2"" of type '" "boost::shared_ptr< ZeroHelper > const &""'"); 
    }
    arg2 = reinterpret_cast< boost::shared_ptr< ZeroHelper > * >(argp2);
    {
      try {
        (arg1)->push_back((boost::shared_ptr< ZeroHelper > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_ZeroHelperVector_pop) {
  {
    std::vector< boost::shared_ptr< ZeroHelper > > *arg1 = (std::vector< boost::shared_ptr< ZeroHelper > > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    boost::shared_ptr< ZeroHelper > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ZeroHelperVector_pop(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_boost__shared_ptrT_ZeroHelper_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZeroHelperVector_pop" "', argument " "1"" of type '" "std::vector< boost::shared_ptr< ZeroHelper > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< boost::shared_ptr< ZeroHelper > > * >(argp1);
    {
      try {
        try {
          result = std_vector_Sl_boost_shared_ptr_Sl_ZeroHelper_Sg__Sg__pop(arg1);
        }
        catch(std::out_of_range &_e) {
          sv_setsv(get_sv("@", GV_ADD), SWIG_NewPointerObj((new std::out_of_range(static_cast< const std::out_of_range& >(_e))),SWIGTYPE_p_std__out_of_range,SWIG_POINTER_OWN)); SWIG_fail ;
        }
        
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new boost::shared_ptr< ZeroHelper >(static_cast< const boost::shared_ptr< ZeroHelper >& >(result))), SWIGTYPE_p_boost__shared_ptrT_ZeroHelper_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ZeroHelperVector_get) {
  {
    std::vector< boost::shared_ptr< ZeroHelper > > *arg1 = (std::vector< boost::shared_ptr< ZeroHelper > > *) 0 ;
    int arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    boost::shared_ptr< ZeroHelper > *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: ZeroHelperVector_get(self,i);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_boost__shared_ptrT_ZeroHelper_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZeroHelperVector_get" "', argument " "1"" of type '" "std::vector< boost::shared_ptr< ZeroHelper > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< boost::shared_ptr< ZeroHelper > > * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ZeroHelperVector_get" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    {
      try {
        try {
          result = (boost::shared_ptr< ZeroHelper > *) &std_vector_Sl_boost_shared_ptr_Sl_ZeroHelper_Sg__Sg__get(arg1,arg2);
        }
        catch(std::out_of_range &_e) {
          sv_setsv(get_sv("@", GV_ADD), SWIG_NewPointerObj((new std::out_of_range(static_cast< const std::out_of_range& >(_e))),SWIGTYPE_p_std__out_of_range,SWIG_POINTER_OWN)); SWIG_fail ;
        }
        
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_boost__shared_ptrT_ZeroHelper_t, 0 | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_ZeroHelperVector_set) {
  {
    std::vector< boost::shared_ptr< ZeroHelper > > *arg1 = (std::vector< boost::shared_ptr< ZeroHelper > > *) 0 ;
    int arg2 ;
    boost::shared_ptr< ZeroHelper > *arg3 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: ZeroHelperVector_set(self,i,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_boost__shared_ptrT_ZeroHelper_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZeroHelperVector_set" "', argument " "1"" of type '" "std::vector< boost::shared_ptr< ZeroHelper > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< boost::shared_ptr< ZeroHelper > > * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ZeroHelperVector_set" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_boost__shared_ptrT_ZeroHelper_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ZeroHelperVector_set" "', argument " "3"" of type '" "boost::shared_ptr< ZeroHelper > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ZeroHelperVector_set" "', argument " "3"" of type '" "boost::shared_ptr< ZeroHelper > const &""'"); 
    }
    arg3 = reinterpret_cast< boost::shared_ptr< ZeroHelper > * >(argp3);
    {
      try {
        try {
          std_vector_Sl_boost_shared_ptr_Sl_ZeroHelper_Sg__Sg__set(arg1,arg2,(boost::shared_ptr< ZeroHelper > const &)*arg3);
        }
        catch(std::out_of_range &_e) {
          sv_setsv(get_sv("@", GV_ADD), SWIG_NewPointerObj((new std::out_of_range(static_cast< const std::out_of_range& >(_e))),SWIGTYPE_p_std__out_of_range,SWIG_POINTER_OWN)); SWIG_fail ;
        }
        
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_ZeroHelperVector) {
  {
    std::vector< boost::shared_ptr< ZeroHelper > > *arg1 = (std::vector< boost::shared_ptr< ZeroHelper > > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_ZeroHelperVector(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_boost__shared_ptrT_ZeroHelper_t_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ZeroHelperVector" "', argument " "1"" of type '" "std::vector< boost::shared_ptr< ZeroHelper > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< boost::shared_ptr< ZeroHelper > > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_YoYHelperVector__SWIG_0) {
  {
    unsigned int arg1 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    std::vector< boost::shared_ptr< YoYHelper > > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_YoYHelperVector(size);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_YoYHelperVector" "', argument " "1"" of type '" "unsigned int""'");
    } 
    arg1 = static_cast< unsigned int >(val1);
    {
      try {
        result = (std::vector< boost::shared_ptr< YoYHelper > > *)new std::vector< boost::shared_ptr< YoYHelper > >(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_boost__shared_ptrT_YoYHelper_t_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_YoYHelperVector__SWIG_1) {
  {
    int argvi = 0;
    std::vector< boost::shared_ptr< YoYHelper > > *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_YoYHelperVector();");
    }
    {
      try {
        result = (std::vector< boost::shared_ptr< YoYHelper > > *)new std::vector< boost::shared_ptr< YoYHelper > >();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_boost__shared_ptrT_YoYHelper_t_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_YoYHelperVector__SWIG_2) {
  {
    unsigned int arg1 ;
    boost::shared_ptr< YoYHelper > *arg2 = 0 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    std::vector< boost::shared_ptr< YoYHelper > > *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_YoYHelperVector(size,value);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_YoYHelperVector" "', argument " "1"" of type '" "unsigned int""'");
    } 
    arg1 = static_cast< unsigned int >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_boost__shared_ptrT_YoYHelper_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_YoYHelperVector" "', argument " "2"" of type '" "boost::shared_ptr< YoYHelper > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_YoYHelperVector" "', argument " "2"" of type '" "boost::shared_ptr< YoYHelper > const &""'"); 
    }
    arg2 = reinterpret_cast< boost::shared_ptr< YoYHelper > * >(argp2);
    {
      try {
        result = (std::vector< boost::shared_ptr< YoYHelper > > *)new std::vector< boost::shared_ptr< YoYHelper > >(arg1,(boost::shared_ptr< YoYHelper > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_boost__shared_ptrT_YoYHelper_t_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_YoYHelperVector__SWIG_3) {
  {
    std::vector< boost::shared_ptr< YoYHelper > > *arg1 = 0 ;
    std::vector< boost::shared_ptr< YoYHelper > > temp1 ;
    std::vector< boost::shared_ptr< YoYHelper > > *v1 ;
    int argvi = 0;
    std::vector< boost::shared_ptr< YoYHelper > > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_YoYHelperVector(std::vector< boost::shared_ptr< YoYHelper > > const &);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_YoYHelper_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_YoYHelperVector. "
          "Expected an array of " "boost::shared_ptr< YoYHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< YoYHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_YoYHelper_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_YoYHelperVector. "
              "Expected an array of " "boost::shared_ptr< YoYHelper >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_YoYHelperVector. "
          "Expected an array of " "boost::shared_ptr< YoYHelper >");
      }
    }
    {
      try {
        result = (std::vector< boost::shared_ptr< YoYHelper > > *)new std::vector< boost::shared_ptr< YoYHelper > >((std::vector< boost::shared_ptr< YoYHelper > > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_boost__shared_ptrT_YoYHelper_t_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_YoYHelperVector) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< YoYHelper > >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_YoYHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< YoYHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_YoYHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_boost__shared_ptrT_YoYHelper_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_YoYHelperVector__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_YoYHelperVector__SWIG_0); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_YoYHelperVector__SWIG_3); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_YoYHelperVector__SWIG_2); return;
    }
  }
  
  croak("No matching function for overloaded 'new_YoYHelperVector'");
  XSRETURN(0);
}


XS(_wrap_YoYHelperVector_size) {
  {
    std::vector< boost::shared_ptr< YoYHelper > > *arg1 = (std::vector< boost::shared_ptr< YoYHelper > > *) 0 ;
    std::vector< boost::shared_ptr< YoYHelper > > temp1 ;
    std::vector< boost::shared_ptr< YoYHelper > > *v1 ;
    int argvi = 0;
    unsigned int result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: YoYHelperVector_size(self);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_YoYHelper_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of YoYHelperVector_size. "
          "Expected an array of " "boost::shared_ptr< YoYHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< YoYHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_YoYHelper_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "YoYHelperVector_size. "
              "Expected an array of " "boost::shared_ptr< YoYHelper >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of YoYHelperVector_size. "
          "Expected an array of " "boost::shared_ptr< YoYHelper >");
      }
    }
    {
      try {
        result = (unsigned int)((std::vector< boost::shared_ptr< YoYHelper > > const *)arg1)->size();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_YoYHelperVector_empty) {
  {
    std::vector< boost::shared_ptr< YoYHelper > > *arg1 = (std::vector< boost::shared_ptr< YoYHelper > > *) 0 ;
    std::vector< boost::shared_ptr< YoYHelper > > temp1 ;
    std::vector< boost::shared_ptr< YoYHelper > > *v1 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: YoYHelperVector_empty(self);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_YoYHelper_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of YoYHelperVector_empty. "
          "Expected an array of " "boost::shared_ptr< YoYHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< YoYHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_YoYHelper_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "YoYHelperVector_empty. "
              "Expected an array of " "boost::shared_ptr< YoYHelper >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of YoYHelperVector_empty. "
          "Expected an array of " "boost::shared_ptr< YoYHelper >");
      }
    }
    {
      try {
        result = (bool)((std::vector< boost::shared_ptr< YoYHelper > > const *)arg1)->empty();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_YoYHelperVector_clear) {
  {
    std::vector< boost::shared_ptr< YoYHelper > > *arg1 = (std::vector< boost::shared_ptr< YoYHelper > > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: YoYHelperVector_clear(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_boost__shared_ptrT_YoYHelper_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YoYHelperVector_clear" "', argument " "1"" of type '" "std::vector< boost::shared_ptr< YoYHelper > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< boost::shared_ptr< YoYHelper > > * >(argp1);
    {
      try {
        (arg1)->clear();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_YoYHelperVector_push) {
  {
    std::vector< boost::shared_ptr< YoYHelper > > *arg1 = (std::vector< boost::shared_ptr< YoYHelper > > *) 0 ;
    boost::shared_ptr< YoYHelper > *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: YoYHelperVector_push(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_boost__shared_ptrT_YoYHelper_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YoYHelperVector_push" "', argument " "1"" of type '" "std::vector< boost::shared_ptr< YoYHelper > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< boost::shared_ptr< YoYHelper > > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_boost__shared_ptrT_YoYHelper_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "YoYHelperVector_push" "', argument " "2"" of type '" "boost::shared_ptr< YoYHelper > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "YoYHelperVector_push" "', argument " "2"" of type '" "boost::shared_ptr< YoYHelper > const &""'"); 
    }
    arg2 = reinterpret_cast< boost::shared_ptr< YoYHelper > * >(argp2);
    {
      try {
        (arg1)->push_back((boost::shared_ptr< YoYHelper > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_YoYHelperVector_pop) {
  {
    std::vector< boost::shared_ptr< YoYHelper > > *arg1 = (std::vector< boost::shared_ptr< YoYHelper > > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    boost::shared_ptr< YoYHelper > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: YoYHelperVector_pop(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_boost__shared_ptrT_YoYHelper_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YoYHelperVector_pop" "', argument " "1"" of type '" "std::vector< boost::shared_ptr< YoYHelper > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< boost::shared_ptr< YoYHelper > > * >(argp1);
    {
      try {
        try {
          result = std_vector_Sl_boost_shared_ptr_Sl_YoYHelper_Sg__Sg__pop(arg1);
        }
        catch(std::out_of_range &_e) {
          sv_setsv(get_sv("@", GV_ADD), SWIG_NewPointerObj((new std::out_of_range(static_cast< const std::out_of_range& >(_e))),SWIGTYPE_p_std__out_of_range,SWIG_POINTER_OWN)); SWIG_fail ;
        }
        
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new boost::shared_ptr< YoYHelper >(static_cast< const boost::shared_ptr< YoYHelper >& >(result))), SWIGTYPE_p_boost__shared_ptrT_YoYHelper_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_YoYHelperVector_get) {
  {
    std::vector< boost::shared_ptr< YoYHelper > > *arg1 = (std::vector< boost::shared_ptr< YoYHelper > > *) 0 ;
    int arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    boost::shared_ptr< YoYHelper > *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: YoYHelperVector_get(self,i);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_boost__shared_ptrT_YoYHelper_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YoYHelperVector_get" "', argument " "1"" of type '" "std::vector< boost::shared_ptr< YoYHelper > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< boost::shared_ptr< YoYHelper > > * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "YoYHelperVector_get" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    {
      try {
        try {
          result = (boost::shared_ptr< YoYHelper > *) &std_vector_Sl_boost_shared_ptr_Sl_YoYHelper_Sg__Sg__get(arg1,arg2);
        }
        catch(std::out_of_range &_e) {
          sv_setsv(get_sv("@", GV_ADD), SWIG_NewPointerObj((new std::out_of_range(static_cast< const std::out_of_range& >(_e))),SWIGTYPE_p_std__out_of_range,SWIG_POINTER_OWN)); SWIG_fail ;
        }
        
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_boost__shared_ptrT_YoYHelper_t, 0 | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_YoYHelperVector_set) {
  {
    std::vector< boost::shared_ptr< YoYHelper > > *arg1 = (std::vector< boost::shared_ptr< YoYHelper > > *) 0 ;
    int arg2 ;
    boost::shared_ptr< YoYHelper > *arg3 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: YoYHelperVector_set(self,i,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_boost__shared_ptrT_YoYHelper_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YoYHelperVector_set" "', argument " "1"" of type '" "std::vector< boost::shared_ptr< YoYHelper > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< boost::shared_ptr< YoYHelper > > * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "YoYHelperVector_set" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_boost__shared_ptrT_YoYHelper_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "YoYHelperVector_set" "', argument " "3"" of type '" "boost::shared_ptr< YoYHelper > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "YoYHelperVector_set" "', argument " "3"" of type '" "boost::shared_ptr< YoYHelper > const &""'"); 
    }
    arg3 = reinterpret_cast< boost::shared_ptr< YoYHelper > * >(argp3);
    {
      try {
        try {
          std_vector_Sl_boost_shared_ptr_Sl_YoYHelper_Sg__Sg__set(arg1,arg2,(boost::shared_ptr< YoYHelper > const &)*arg3);
        }
        catch(std::out_of_range &_e) {
          sv_setsv(get_sv("@", GV_ADD), SWIG_NewPointerObj((new std::out_of_range(static_cast< const std::out_of_range& >(_e))),SWIGTYPE_p_std__out_of_range,SWIG_POINTER_OWN)); SWIG_fail ;
        }
        
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_YoYHelperVector) {
  {
    std::vector< boost::shared_ptr< YoYHelper > > *arg1 = (std::vector< boost::shared_ptr< YoYHelper > > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_YoYHelperVector(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_boost__shared_ptrT_YoYHelper_t_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_YoYHelperVector" "', argument " "1"" of type '" "std::vector< boost::shared_ptr< YoYHelper > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< boost::shared_ptr< YoYHelper > > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ZeroCouponInflationSwapHelper) {
  {
    Rate arg1 ;
    Period *arg2 = 0 ;
    Date *arg3 = 0 ;
    Calendar *arg4 = 0 ;
    BusinessDayConvention arg5 ;
    DayCounter *arg6 = 0 ;
    ZeroInflationIndexPtr *arg7 = 0 ;
    double val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    int argvi = 0;
    ZeroCouponInflationSwapHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: new_ZeroCouponInflationSwapHelper(rate,lag,maturity,calendar,bdc,dayCounter,index);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ZeroCouponInflationSwapHelper" "', argument " "1"" of type '" "Rate""'");
    } 
    arg1 = static_cast< Rate >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ZeroCouponInflationSwapHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ZeroCouponInflationSwapHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    arg2 = reinterpret_cast< Period * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_ZeroCouponInflationSwapHelper" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ZeroCouponInflationSwapHelper" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_ZeroCouponInflationSwapHelper" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ZeroCouponInflationSwapHelper" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    arg4 = reinterpret_cast< Calendar * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_ZeroCouponInflationSwapHelper" "', argument " "5"" of type '" "BusinessDayConvention""'");
    } 
    arg5 = static_cast< BusinessDayConvention >(val5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_ZeroCouponInflationSwapHelper" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ZeroCouponInflationSwapHelper" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    arg6 = reinterpret_cast< DayCounter * >(argp6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_ZeroInflationIndexPtr,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_ZeroCouponInflationSwapHelper" "', argument " "7"" of type '" "ZeroInflationIndexPtr const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ZeroCouponInflationSwapHelper" "', argument " "7"" of type '" "ZeroInflationIndexPtr const &""'"); 
    }
    arg7 = reinterpret_cast< ZeroInflationIndexPtr * >(argp7);
    {
      try {
        result = (ZeroCouponInflationSwapHelperPtr *)new_ZeroCouponInflationSwapHelperPtr(arg1,(Period const &)*arg2,(Date const &)*arg3,(Calendar const &)*arg4,arg5,(DayCounter const &)*arg6,(ZeroInflationIndexPtr const &)*arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ZeroCouponInflationSwapHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_ZeroCouponInflationSwapHelper) {
  {
    ZeroCouponInflationSwapHelperPtr *arg1 = (ZeroCouponInflationSwapHelperPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_ZeroCouponInflationSwapHelper(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ZeroCouponInflationSwapHelperPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ZeroCouponInflationSwapHelper" "', argument " "1"" of type '" "ZeroCouponInflationSwapHelperPtr *""'"); 
    }
    arg1 = reinterpret_cast< ZeroCouponInflationSwapHelperPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_YearOnYearInflationSwapHelper) {
  {
    Rate arg1 ;
    Period *arg2 = 0 ;
    Date *arg3 = 0 ;
    Calendar *arg4 = 0 ;
    BusinessDayConvention arg5 ;
    DayCounter *arg6 = 0 ;
    YoYInflationIndexPtr *arg7 = 0 ;
    double val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    int argvi = 0;
    YearOnYearInflationSwapHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: new_YearOnYearInflationSwapHelper(rate,lag,maturity,calendar,bdc,dayCounter,index);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_YearOnYearInflationSwapHelper" "', argument " "1"" of type '" "Rate""'");
    } 
    arg1 = static_cast< Rate >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_YearOnYearInflationSwapHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_YearOnYearInflationSwapHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    arg2 = reinterpret_cast< Period * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_YearOnYearInflationSwapHelper" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_YearOnYearInflationSwapHelper" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_YearOnYearInflationSwapHelper" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_YearOnYearInflationSwapHelper" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    arg4 = reinterpret_cast< Calendar * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_YearOnYearInflationSwapHelper" "', argument " "5"" of type '" "BusinessDayConvention""'");
    } 
    arg5 = static_cast< BusinessDayConvention >(val5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_YearOnYearInflationSwapHelper" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_YearOnYearInflationSwapHelper" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    arg6 = reinterpret_cast< DayCounter * >(argp6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_YoYInflationIndexPtr,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_YearOnYearInflationSwapHelper" "', argument " "7"" of type '" "YoYInflationIndexPtr const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_YearOnYearInflationSwapHelper" "', argument " "7"" of type '" "YoYInflationIndexPtr const &""'"); 
    }
    arg7 = reinterpret_cast< YoYInflationIndexPtr * >(argp7);
    {
      try {
        result = (YearOnYearInflationSwapHelperPtr *)new_YearOnYearInflationSwapHelperPtr(arg1,(Period const &)*arg2,(Date const &)*arg3,(Calendar const &)*arg4,arg5,(DayCounter const &)*arg6,(YoYInflationIndexPtr const &)*arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_YearOnYearInflationSwapHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_YearOnYearInflationSwapHelper) {
  {
    YearOnYearInflationSwapHelperPtr *arg1 = (YearOnYearInflationSwapHelperPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_YearOnYearInflationSwapHelper(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_YearOnYearInflationSwapHelperPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_YearOnYearInflationSwapHelper" "', argument " "1"" of type '" "YearOnYearInflationSwapHelperPtr *""'"); 
    }
    arg1 = reinterpret_cast< YearOnYearInflationSwapHelperPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PiecewiseZeroInflation__SWIG_0) {
  {
    Date *arg1 = 0 ;
    Calendar *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    Period *arg4 = 0 ;
    Frequency arg5 ;
    bool arg6 ;
    Rate arg7 ;
    Handle< YieldTermStructure > *arg8 = 0 ;
    std::vector< boost::shared_ptr< ZeroHelper > > *arg9 = 0 ;
    Real arg10 ;
    Linear *arg11 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    bool val6 ;
    int ecode6 = 0 ;
    double val7 ;
    int ecode7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    std::vector< boost::shared_ptr< ZeroHelper > > temp9 ;
    std::vector< boost::shared_ptr< ZeroHelper > > *v9 ;
    double val10 ;
    int ecode10 = 0 ;
    void *argp11 ;
    int res11 = 0 ;
    int argvi = 0;
    PiecewiseZeroInflationPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 11) || (items > 11)) {
      SWIG_croak("Usage: new_PiecewiseZeroInflation(referenceDate,calendar,dayCounter,lag,frequency,indexIsInterpolated,baseRate,nominalTS,instruments,accuracy,i);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_PiecewiseZeroInflation" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseZeroInflation" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_PiecewiseZeroInflation" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseZeroInflation" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_PiecewiseZeroInflation" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseZeroInflation" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_PiecewiseZeroInflation" "', argument " "4"" of type '" "Period const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseZeroInflation" "', argument " "4"" of type '" "Period const &""'"); 
    }
    arg4 = reinterpret_cast< Period * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_PiecewiseZeroInflation" "', argument " "5"" of type '" "Frequency""'");
    } 
    arg5 = static_cast< Frequency >(val5);
    ecode6 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_PiecewiseZeroInflation" "', argument " "6"" of type '" "bool""'");
    } 
    arg6 = static_cast< bool >(val6);
    ecode7 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_PiecewiseZeroInflation" "', argument " "7"" of type '" "Rate""'");
    } 
    arg7 = static_cast< Rate >(val7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_PiecewiseZeroInflation" "', argument " "8"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseZeroInflation" "', argument " "8"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg8 = reinterpret_cast< Handle< YieldTermStructure > * >(argp8);
    {
      if (SWIG_ConvertPtr(ST(8),(void **) &v9, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_ZeroHelper_t_t,1) != -1) {
        arg9 = v9;
      } else if (SvROK(ST(8))) {
        AV *av = (AV *)SvRV(ST(8));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 9 of new_PiecewiseZeroInflation. "
          "Expected an array of " "boost::shared_ptr< ZeroHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< ZeroHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_ZeroHelper_t,0) != -1) {
            temp9.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 9 of "
              "new_PiecewiseZeroInflation. "
              "Expected an array of " "boost::shared_ptr< ZeroHelper >");
          }
        }
        arg9 = &temp9;
      } else {
        SWIG_croak("Type error in argument 9 of new_PiecewiseZeroInflation. "
          "Expected an array of " "boost::shared_ptr< ZeroHelper >");
      }
    }
    ecode10 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), &val10);
    if (!SWIG_IsOK(ecode10)) {
      SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "new_PiecewiseZeroInflation" "', argument " "10"" of type '" "Real""'");
    } 
    arg10 = static_cast< Real >(val10);
    res11 = SWIG_ConvertPtr(ST(10), &argp11, SWIGTYPE_p_Linear,  0 );
    if (!SWIG_IsOK(res11)) {
      SWIG_exception_fail(SWIG_ArgError(res11), "in method '" "new_PiecewiseZeroInflation" "', argument " "11"" of type '" "Linear const &""'"); 
    }
    if (!argp11) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseZeroInflation" "', argument " "11"" of type '" "Linear const &""'"); 
    }
    arg11 = reinterpret_cast< Linear * >(argp11);
    {
      try {
        result = (PiecewiseZeroInflationPtr *)new_PiecewiseZeroInflationPtr__SWIG_0((Date const &)*arg1,(Calendar const &)*arg2,(DayCounter const &)*arg3,(Period const &)*arg4,arg5,arg6,arg7,(Handle< YieldTermStructure > const &)*arg8,(std::vector< boost::shared_ptr< ZeroHelper > > const &)*arg9,arg10,(Linear const &)*arg11);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PiecewiseZeroInflationPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PiecewiseZeroInflation__SWIG_1) {
  {
    Date *arg1 = 0 ;
    Calendar *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    Period *arg4 = 0 ;
    Frequency arg5 ;
    bool arg6 ;
    Rate arg7 ;
    Handle< YieldTermStructure > *arg8 = 0 ;
    std::vector< boost::shared_ptr< ZeroHelper > > *arg9 = 0 ;
    Real arg10 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    bool val6 ;
    int ecode6 = 0 ;
    double val7 ;
    int ecode7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    std::vector< boost::shared_ptr< ZeroHelper > > temp9 ;
    std::vector< boost::shared_ptr< ZeroHelper > > *v9 ;
    double val10 ;
    int ecode10 = 0 ;
    int argvi = 0;
    PiecewiseZeroInflationPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 10) || (items > 10)) {
      SWIG_croak("Usage: new_PiecewiseZeroInflation(referenceDate,calendar,dayCounter,lag,frequency,indexIsInterpolated,baseRate,nominalTS,instruments,accuracy);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_PiecewiseZeroInflation" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseZeroInflation" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_PiecewiseZeroInflation" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseZeroInflation" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_PiecewiseZeroInflation" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseZeroInflation" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_PiecewiseZeroInflation" "', argument " "4"" of type '" "Period const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseZeroInflation" "', argument " "4"" of type '" "Period const &""'"); 
    }
    arg4 = reinterpret_cast< Period * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_PiecewiseZeroInflation" "', argument " "5"" of type '" "Frequency""'");
    } 
    arg5 = static_cast< Frequency >(val5);
    ecode6 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_PiecewiseZeroInflation" "', argument " "6"" of type '" "bool""'");
    } 
    arg6 = static_cast< bool >(val6);
    ecode7 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_PiecewiseZeroInflation" "', argument " "7"" of type '" "Rate""'");
    } 
    arg7 = static_cast< Rate >(val7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_PiecewiseZeroInflation" "', argument " "8"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseZeroInflation" "', argument " "8"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg8 = reinterpret_cast< Handle< YieldTermStructure > * >(argp8);
    {
      if (SWIG_ConvertPtr(ST(8),(void **) &v9, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_ZeroHelper_t_t,1) != -1) {
        arg9 = v9;
      } else if (SvROK(ST(8))) {
        AV *av = (AV *)SvRV(ST(8));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 9 of new_PiecewiseZeroInflation. "
          "Expected an array of " "boost::shared_ptr< ZeroHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< ZeroHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_ZeroHelper_t,0) != -1) {
            temp9.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 9 of "
              "new_PiecewiseZeroInflation. "
              "Expected an array of " "boost::shared_ptr< ZeroHelper >");
          }
        }
        arg9 = &temp9;
      } else {
        SWIG_croak("Type error in argument 9 of new_PiecewiseZeroInflation. "
          "Expected an array of " "boost::shared_ptr< ZeroHelper >");
      }
    }
    ecode10 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), &val10);
    if (!SWIG_IsOK(ecode10)) {
      SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "new_PiecewiseZeroInflation" "', argument " "10"" of type '" "Real""'");
    } 
    arg10 = static_cast< Real >(val10);
    {
      try {
        result = (PiecewiseZeroInflationPtr *)new_PiecewiseZeroInflationPtr__SWIG_0((Date const &)*arg1,(Calendar const &)*arg2,(DayCounter const &)*arg3,(Period const &)*arg4,arg5,arg6,arg7,(Handle< YieldTermStructure > const &)*arg8,(std::vector< boost::shared_ptr< ZeroHelper > > const &)*arg9,arg10);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PiecewiseZeroInflationPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PiecewiseZeroInflation__SWIG_2) {
  {
    Date *arg1 = 0 ;
    Calendar *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    Period *arg4 = 0 ;
    Frequency arg5 ;
    bool arg6 ;
    Rate arg7 ;
    Handle< YieldTermStructure > *arg8 = 0 ;
    std::vector< boost::shared_ptr< ZeroHelper > > *arg9 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    bool val6 ;
    int ecode6 = 0 ;
    double val7 ;
    int ecode7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    std::vector< boost::shared_ptr< ZeroHelper > > temp9 ;
    std::vector< boost::shared_ptr< ZeroHelper > > *v9 ;
    int argvi = 0;
    PiecewiseZeroInflationPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 9) || (items > 9)) {
      SWIG_croak("Usage: new_PiecewiseZeroInflation(referenceDate,calendar,dayCounter,lag,frequency,indexIsInterpolated,baseRate,nominalTS,instruments);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_PiecewiseZeroInflation" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseZeroInflation" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_PiecewiseZeroInflation" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseZeroInflation" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_PiecewiseZeroInflation" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseZeroInflation" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_PiecewiseZeroInflation" "', argument " "4"" of type '" "Period const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseZeroInflation" "', argument " "4"" of type '" "Period const &""'"); 
    }
    arg4 = reinterpret_cast< Period * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_PiecewiseZeroInflation" "', argument " "5"" of type '" "Frequency""'");
    } 
    arg5 = static_cast< Frequency >(val5);
    ecode6 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_PiecewiseZeroInflation" "', argument " "6"" of type '" "bool""'");
    } 
    arg6 = static_cast< bool >(val6);
    ecode7 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_PiecewiseZeroInflation" "', argument " "7"" of type '" "Rate""'");
    } 
    arg7 = static_cast< Rate >(val7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_PiecewiseZeroInflation" "', argument " "8"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseZeroInflation" "', argument " "8"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg8 = reinterpret_cast< Handle< YieldTermStructure > * >(argp8);
    {
      if (SWIG_ConvertPtr(ST(8),(void **) &v9, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_ZeroHelper_t_t,1) != -1) {
        arg9 = v9;
      } else if (SvROK(ST(8))) {
        AV *av = (AV *)SvRV(ST(8));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 9 of new_PiecewiseZeroInflation. "
          "Expected an array of " "boost::shared_ptr< ZeroHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< ZeroHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_ZeroHelper_t,0) != -1) {
            temp9.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 9 of "
              "new_PiecewiseZeroInflation. "
              "Expected an array of " "boost::shared_ptr< ZeroHelper >");
          }
        }
        arg9 = &temp9;
      } else {
        SWIG_croak("Type error in argument 9 of new_PiecewiseZeroInflation. "
          "Expected an array of " "boost::shared_ptr< ZeroHelper >");
      }
    }
    {
      try {
        result = (PiecewiseZeroInflationPtr *)new_PiecewiseZeroInflationPtr__SWIG_0((Date const &)*arg1,(Calendar const &)*arg2,(DayCounter const &)*arg3,(Period const &)*arg4,arg5,arg6,arg7,(Handle< YieldTermStructure > const &)*arg8,(std::vector< boost::shared_ptr< ZeroHelper > > const &)*arg9);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PiecewiseZeroInflationPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PiecewiseZeroInflation) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 9) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< ZeroHelper > >* v;
            if (SWIG_ConvertPtr(ST(8),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_ZeroHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(8))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(8));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< ZeroHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_ZeroHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 10) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< ZeroHelper > >* v;
            if (SWIG_ConvertPtr(ST(8),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_ZeroHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(8))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(8));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< ZeroHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_ZeroHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 11) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< ZeroHelper > >* v;
            if (SWIG_ConvertPtr(ST(8),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_ZeroHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(8))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(8));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< ZeroHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_ZeroHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(10), &vptr, SWIGTYPE_p_Linear, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_PiecewiseZeroInflation__SWIG_2); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_PiecewiseZeroInflation__SWIG_1); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_PiecewiseZeroInflation__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_PiecewiseZeroInflation'");
  XSRETURN(0);
}


XS(_wrap_PiecewiseZeroInflation_dates) {
  {
    PiecewiseZeroInflationPtr *arg1 = (PiecewiseZeroInflationPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Date > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: PiecewiseZeroInflation_dates(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PiecewiseZeroInflationPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PiecewiseZeroInflation_dates" "', argument " "1"" of type '" "PiecewiseZeroInflationPtr *""'"); 
    }
    arg1 = reinterpret_cast< PiecewiseZeroInflationPtr * >(argp1);
    {
      try {
        result = (std::vector< Date > *) &PiecewiseZeroInflationPtr_dates(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_Date_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_PiecewiseZeroInflation_times) {
  {
    PiecewiseZeroInflationPtr *arg1 = (PiecewiseZeroInflationPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Time > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: PiecewiseZeroInflation_times(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PiecewiseZeroInflationPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PiecewiseZeroInflation_times" "', argument " "1"" of type '" "PiecewiseZeroInflationPtr *""'"); 
    }
    arg1 = reinterpret_cast< PiecewiseZeroInflationPtr * >(argp1);
    {
      try {
        result = (std::vector< Time > *) &PiecewiseZeroInflationPtr_times(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_PiecewiseZeroInflation_nodes) {
  {
    PiecewiseZeroInflationPtr *arg1 = (PiecewiseZeroInflationPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< std::pair< Date,Real > > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: PiecewiseZeroInflation_nodes(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PiecewiseZeroInflationPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PiecewiseZeroInflation_nodes" "', argument " "1"" of type '" "PiecewiseZeroInflationPtr *""'"); 
    }
    arg1 = reinterpret_cast< PiecewiseZeroInflationPtr * >(argp1);
    {
      try {
        result = PiecewiseZeroInflationPtr_nodes(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        std::pair< Date,double >* ptr = new std::pair< Date,double >(result[i]);
        svs[i] = sv_newmortal();
        SWIG_MakePtr(svs[i], (void*) ptr, 
          SWIGTYPE_p_std__pairT_Date_double_t, SWIG_SHADOW|0);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_PiecewiseZeroInflation) {
  {
    PiecewiseZeroInflationPtr *arg1 = (PiecewiseZeroInflationPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_PiecewiseZeroInflation(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PiecewiseZeroInflationPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_PiecewiseZeroInflation" "', argument " "1"" of type '" "PiecewiseZeroInflationPtr *""'"); 
    }
    arg1 = reinterpret_cast< PiecewiseZeroInflationPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PiecewiseYoYInflation__SWIG_0) {
  {
    Date *arg1 = 0 ;
    Calendar *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    Period *arg4 = 0 ;
    Frequency arg5 ;
    bool arg6 ;
    Rate arg7 ;
    Handle< YieldTermStructure > *arg8 = 0 ;
    std::vector< boost::shared_ptr< YoYHelper > > *arg9 = 0 ;
    Real arg10 ;
    Linear *arg11 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    bool val6 ;
    int ecode6 = 0 ;
    double val7 ;
    int ecode7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    std::vector< boost::shared_ptr< YoYHelper > > temp9 ;
    std::vector< boost::shared_ptr< YoYHelper > > *v9 ;
    double val10 ;
    int ecode10 = 0 ;
    void *argp11 ;
    int res11 = 0 ;
    int argvi = 0;
    PiecewiseYoYInflationPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 11) || (items > 11)) {
      SWIG_croak("Usage: new_PiecewiseYoYInflation(referenceDate,calendar,dayCounter,lag,frequency,indexIsInterpolated,baseRate,nominalTS,instruments,accuracy,i);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_PiecewiseYoYInflation" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseYoYInflation" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_PiecewiseYoYInflation" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseYoYInflation" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_PiecewiseYoYInflation" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseYoYInflation" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_PiecewiseYoYInflation" "', argument " "4"" of type '" "Period const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseYoYInflation" "', argument " "4"" of type '" "Period const &""'"); 
    }
    arg4 = reinterpret_cast< Period * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_PiecewiseYoYInflation" "', argument " "5"" of type '" "Frequency""'");
    } 
    arg5 = static_cast< Frequency >(val5);
    ecode6 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_PiecewiseYoYInflation" "', argument " "6"" of type '" "bool""'");
    } 
    arg6 = static_cast< bool >(val6);
    ecode7 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_PiecewiseYoYInflation" "', argument " "7"" of type '" "Rate""'");
    } 
    arg7 = static_cast< Rate >(val7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_PiecewiseYoYInflation" "', argument " "8"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseYoYInflation" "', argument " "8"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg8 = reinterpret_cast< Handle< YieldTermStructure > * >(argp8);
    {
      if (SWIG_ConvertPtr(ST(8),(void **) &v9, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_YoYHelper_t_t,1) != -1) {
        arg9 = v9;
      } else if (SvROK(ST(8))) {
        AV *av = (AV *)SvRV(ST(8));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 9 of new_PiecewiseYoYInflation. "
          "Expected an array of " "boost::shared_ptr< YoYHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< YoYHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_YoYHelper_t,0) != -1) {
            temp9.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 9 of "
              "new_PiecewiseYoYInflation. "
              "Expected an array of " "boost::shared_ptr< YoYHelper >");
          }
        }
        arg9 = &temp9;
      } else {
        SWIG_croak("Type error in argument 9 of new_PiecewiseYoYInflation. "
          "Expected an array of " "boost::shared_ptr< YoYHelper >");
      }
    }
    ecode10 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), &val10);
    if (!SWIG_IsOK(ecode10)) {
      SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "new_PiecewiseYoYInflation" "', argument " "10"" of type '" "Real""'");
    } 
    arg10 = static_cast< Real >(val10);
    res11 = SWIG_ConvertPtr(ST(10), &argp11, SWIGTYPE_p_Linear,  0 );
    if (!SWIG_IsOK(res11)) {
      SWIG_exception_fail(SWIG_ArgError(res11), "in method '" "new_PiecewiseYoYInflation" "', argument " "11"" of type '" "Linear const &""'"); 
    }
    if (!argp11) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseYoYInflation" "', argument " "11"" of type '" "Linear const &""'"); 
    }
    arg11 = reinterpret_cast< Linear * >(argp11);
    {
      try {
        result = (PiecewiseYoYInflationPtr *)new_PiecewiseYoYInflationPtr__SWIG_0((Date const &)*arg1,(Calendar const &)*arg2,(DayCounter const &)*arg3,(Period const &)*arg4,arg5,arg6,arg7,(Handle< YieldTermStructure > const &)*arg8,(std::vector< boost::shared_ptr< YoYHelper > > const &)*arg9,arg10,(Linear const &)*arg11);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PiecewiseYoYInflationPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PiecewiseYoYInflation__SWIG_1) {
  {
    Date *arg1 = 0 ;
    Calendar *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    Period *arg4 = 0 ;
    Frequency arg5 ;
    bool arg6 ;
    Rate arg7 ;
    Handle< YieldTermStructure > *arg8 = 0 ;
    std::vector< boost::shared_ptr< YoYHelper > > *arg9 = 0 ;
    Real arg10 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    bool val6 ;
    int ecode6 = 0 ;
    double val7 ;
    int ecode7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    std::vector< boost::shared_ptr< YoYHelper > > temp9 ;
    std::vector< boost::shared_ptr< YoYHelper > > *v9 ;
    double val10 ;
    int ecode10 = 0 ;
    int argvi = 0;
    PiecewiseYoYInflationPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 10) || (items > 10)) {
      SWIG_croak("Usage: new_PiecewiseYoYInflation(referenceDate,calendar,dayCounter,lag,frequency,indexIsInterpolated,baseRate,nominalTS,instruments,accuracy);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_PiecewiseYoYInflation" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseYoYInflation" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_PiecewiseYoYInflation" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseYoYInflation" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_PiecewiseYoYInflation" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseYoYInflation" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_PiecewiseYoYInflation" "', argument " "4"" of type '" "Period const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseYoYInflation" "', argument " "4"" of type '" "Period const &""'"); 
    }
    arg4 = reinterpret_cast< Period * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_PiecewiseYoYInflation" "', argument " "5"" of type '" "Frequency""'");
    } 
    arg5 = static_cast< Frequency >(val5);
    ecode6 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_PiecewiseYoYInflation" "', argument " "6"" of type '" "bool""'");
    } 
    arg6 = static_cast< bool >(val6);
    ecode7 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_PiecewiseYoYInflation" "', argument " "7"" of type '" "Rate""'");
    } 
    arg7 = static_cast< Rate >(val7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_PiecewiseYoYInflation" "', argument " "8"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseYoYInflation" "', argument " "8"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg8 = reinterpret_cast< Handle< YieldTermStructure > * >(argp8);
    {
      if (SWIG_ConvertPtr(ST(8),(void **) &v9, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_YoYHelper_t_t,1) != -1) {
        arg9 = v9;
      } else if (SvROK(ST(8))) {
        AV *av = (AV *)SvRV(ST(8));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 9 of new_PiecewiseYoYInflation. "
          "Expected an array of " "boost::shared_ptr< YoYHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< YoYHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_YoYHelper_t,0) != -1) {
            temp9.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 9 of "
              "new_PiecewiseYoYInflation. "
              "Expected an array of " "boost::shared_ptr< YoYHelper >");
          }
        }
        arg9 = &temp9;
      } else {
        SWIG_croak("Type error in argument 9 of new_PiecewiseYoYInflation. "
          "Expected an array of " "boost::shared_ptr< YoYHelper >");
      }
    }
    ecode10 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), &val10);
    if (!SWIG_IsOK(ecode10)) {
      SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "new_PiecewiseYoYInflation" "', argument " "10"" of type '" "Real""'");
    } 
    arg10 = static_cast< Real >(val10);
    {
      try {
        result = (PiecewiseYoYInflationPtr *)new_PiecewiseYoYInflationPtr__SWIG_0((Date const &)*arg1,(Calendar const &)*arg2,(DayCounter const &)*arg3,(Period const &)*arg4,arg5,arg6,arg7,(Handle< YieldTermStructure > const &)*arg8,(std::vector< boost::shared_ptr< YoYHelper > > const &)*arg9,arg10);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PiecewiseYoYInflationPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PiecewiseYoYInflation__SWIG_2) {
  {
    Date *arg1 = 0 ;
    Calendar *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    Period *arg4 = 0 ;
    Frequency arg5 ;
    bool arg6 ;
    Rate arg7 ;
    Handle< YieldTermStructure > *arg8 = 0 ;
    std::vector< boost::shared_ptr< YoYHelper > > *arg9 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    bool val6 ;
    int ecode6 = 0 ;
    double val7 ;
    int ecode7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    std::vector< boost::shared_ptr< YoYHelper > > temp9 ;
    std::vector< boost::shared_ptr< YoYHelper > > *v9 ;
    int argvi = 0;
    PiecewiseYoYInflationPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 9) || (items > 9)) {
      SWIG_croak("Usage: new_PiecewiseYoYInflation(referenceDate,calendar,dayCounter,lag,frequency,indexIsInterpolated,baseRate,nominalTS,instruments);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_PiecewiseYoYInflation" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseYoYInflation" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_PiecewiseYoYInflation" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseYoYInflation" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_PiecewiseYoYInflation" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseYoYInflation" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_PiecewiseYoYInflation" "', argument " "4"" of type '" "Period const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseYoYInflation" "', argument " "4"" of type '" "Period const &""'"); 
    }
    arg4 = reinterpret_cast< Period * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_PiecewiseYoYInflation" "', argument " "5"" of type '" "Frequency""'");
    } 
    arg5 = static_cast< Frequency >(val5);
    ecode6 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_PiecewiseYoYInflation" "', argument " "6"" of type '" "bool""'");
    } 
    arg6 = static_cast< bool >(val6);
    ecode7 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_PiecewiseYoYInflation" "', argument " "7"" of type '" "Rate""'");
    } 
    arg7 = static_cast< Rate >(val7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_PiecewiseYoYInflation" "', argument " "8"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseYoYInflation" "', argument " "8"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg8 = reinterpret_cast< Handle< YieldTermStructure > * >(argp8);
    {
      if (SWIG_ConvertPtr(ST(8),(void **) &v9, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_YoYHelper_t_t,1) != -1) {
        arg9 = v9;
      } else if (SvROK(ST(8))) {
        AV *av = (AV *)SvRV(ST(8));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 9 of new_PiecewiseYoYInflation. "
          "Expected an array of " "boost::shared_ptr< YoYHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< YoYHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_YoYHelper_t,0) != -1) {
            temp9.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 9 of "
              "new_PiecewiseYoYInflation. "
              "Expected an array of " "boost::shared_ptr< YoYHelper >");
          }
        }
        arg9 = &temp9;
      } else {
        SWIG_croak("Type error in argument 9 of new_PiecewiseYoYInflation. "
          "Expected an array of " "boost::shared_ptr< YoYHelper >");
      }
    }
    {
      try {
        result = (PiecewiseYoYInflationPtr *)new_PiecewiseYoYInflationPtr__SWIG_0((Date const &)*arg1,(Calendar const &)*arg2,(DayCounter const &)*arg3,(Period const &)*arg4,arg5,arg6,arg7,(Handle< YieldTermStructure > const &)*arg8,(std::vector< boost::shared_ptr< YoYHelper > > const &)*arg9);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PiecewiseYoYInflationPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PiecewiseYoYInflation) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 9) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< YoYHelper > >* v;
            if (SWIG_ConvertPtr(ST(8),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_YoYHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(8))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(8));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< YoYHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_YoYHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 10) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< YoYHelper > >* v;
            if (SWIG_ConvertPtr(ST(8),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_YoYHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(8))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(8));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< YoYHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_YoYHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 11) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< YoYHelper > >* v;
            if (SWIG_ConvertPtr(ST(8),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_YoYHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(8))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(8));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< YoYHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_YoYHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(10), &vptr, SWIGTYPE_p_Linear, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_PiecewiseYoYInflation__SWIG_2); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_PiecewiseYoYInflation__SWIG_1); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_PiecewiseYoYInflation__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_PiecewiseYoYInflation'");
  XSRETURN(0);
}


XS(_wrap_PiecewiseYoYInflation_dates) {
  {
    PiecewiseYoYInflationPtr *arg1 = (PiecewiseYoYInflationPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Date > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: PiecewiseYoYInflation_dates(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PiecewiseYoYInflationPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PiecewiseYoYInflation_dates" "', argument " "1"" of type '" "PiecewiseYoYInflationPtr *""'"); 
    }
    arg1 = reinterpret_cast< PiecewiseYoYInflationPtr * >(argp1);
    {
      try {
        result = (std::vector< Date > *) &PiecewiseYoYInflationPtr_dates(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_Date_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_PiecewiseYoYInflation_times) {
  {
    PiecewiseYoYInflationPtr *arg1 = (PiecewiseYoYInflationPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Time > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: PiecewiseYoYInflation_times(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PiecewiseYoYInflationPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PiecewiseYoYInflation_times" "', argument " "1"" of type '" "PiecewiseYoYInflationPtr *""'"); 
    }
    arg1 = reinterpret_cast< PiecewiseYoYInflationPtr * >(argp1);
    {
      try {
        result = (std::vector< Time > *) &PiecewiseYoYInflationPtr_times(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_PiecewiseYoYInflation_nodes) {
  {
    PiecewiseYoYInflationPtr *arg1 = (PiecewiseYoYInflationPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< std::pair< Date,Real > > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: PiecewiseYoYInflation_nodes(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PiecewiseYoYInflationPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PiecewiseYoYInflation_nodes" "', argument " "1"" of type '" "PiecewiseYoYInflationPtr *""'"); 
    }
    arg1 = reinterpret_cast< PiecewiseYoYInflationPtr * >(argp1);
    {
      try {
        result = PiecewiseYoYInflationPtr_nodes(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        std::pair< Date,double >* ptr = new std::pair< Date,double >(result[i]);
        svs[i] = sv_newmortal();
        SWIG_MakePtr(svs[i], (void*) ptr, 
          SWIGTYPE_p_std__pairT_Date_double_t, SWIG_SHADOW|0);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_PiecewiseYoYInflation) {
  {
    PiecewiseYoYInflationPtr *arg1 = (PiecewiseYoYInflationPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_PiecewiseYoYInflation(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PiecewiseYoYInflationPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_PiecewiseYoYInflation" "', argument " "1"" of type '" "PiecewiseYoYInflationPtr *""'"); 
    }
    arg1 = reinterpret_cast< PiecewiseYoYInflationPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_inflationBaseDate) {
  {
    Date *arg1 = 0 ;
    Period *arg2 = 0 ;
    Frequency arg3 ;
    bool arg4 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: inflationBaseDate(referenceDate,observationLag,frequency,indexIsInterpolated);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "inflationBaseDate" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "inflationBaseDate" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "inflationBaseDate" "', argument " "2"" of type '" "Period const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "inflationBaseDate" "', argument " "2"" of type '" "Period const &""'"); 
    }
    arg2 = reinterpret_cast< Period * >(argp2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "inflationBaseDate" "', argument " "3"" of type '" "Frequency""'");
    } 
    arg3 = static_cast< Frequency >(val3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "inflationBaseDate" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    {
      try {
        result = inflationBaseDate((Date const &)*arg1,(Period const &)*arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ZeroCouponInflationSwap__SWIG_0) {
  {
    ZeroCouponInflationSwap::Type arg1 ;
    Real arg2 ;
    Date *arg3 = 0 ;
    Date *arg4 = 0 ;
    Calendar *arg5 = 0 ;
    BusinessDayConvention arg6 ;
    DayCounter *arg7 = 0 ;
    Rate arg8 ;
    ZeroInflationIndexPtr *arg9 = 0 ;
    Period *arg10 = 0 ;
    bool arg11 ;
    SwigValueWrapper< Calendar > arg12 ;
    BusinessDayConvention arg13 ;
    int val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    double val8 ;
    int ecode8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    void *argp10 ;
    int res10 = 0 ;
    bool val11 ;
    int ecode11 = 0 ;
    void *argp12 ;
    int res12 = 0 ;
    int val13 ;
    int ecode13 = 0 ;
    int argvi = 0;
    ZeroCouponInflationSwapPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 13) || (items > 13)) {
      SWIG_croak("Usage: new_ZeroCouponInflationSwap(type,nominal,start,maturity,calendar,convention,dayCounter,fixedRate,index,lag,adjustInfObsDates,infCalendar,infConvention);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ZeroCouponInflationSwap" "', argument " "1"" of type '" "ZeroCouponInflationSwap::Type""'");
    } 
    arg1 = static_cast< ZeroCouponInflationSwap::Type >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_ZeroCouponInflationSwap" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_ZeroCouponInflationSwap" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ZeroCouponInflationSwap" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_ZeroCouponInflationSwap" "', argument " "4"" of type '" "Date const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ZeroCouponInflationSwap" "', argument " "4"" of type '" "Date const &""'"); 
    }
    arg4 = reinterpret_cast< Date * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_ZeroCouponInflationSwap" "', argument " "5"" of type '" "Calendar const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ZeroCouponInflationSwap" "', argument " "5"" of type '" "Calendar const &""'"); 
    }
    arg5 = reinterpret_cast< Calendar * >(argp5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_ZeroCouponInflationSwap" "', argument " "6"" of type '" "BusinessDayConvention""'");
    } 
    arg6 = static_cast< BusinessDayConvention >(val6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_ZeroCouponInflationSwap" "', argument " "7"" of type '" "DayCounter const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ZeroCouponInflationSwap" "', argument " "7"" of type '" "DayCounter const &""'"); 
    }
    arg7 = reinterpret_cast< DayCounter * >(argp7);
    ecode8 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_ZeroCouponInflationSwap" "', argument " "8"" of type '" "Rate""'");
    } 
    arg8 = static_cast< Rate >(val8);
    res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_ZeroInflationIndexPtr,  0 );
    if (!SWIG_IsOK(res9)) {
      SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_ZeroCouponInflationSwap" "', argument " "9"" of type '" "ZeroInflationIndexPtr const &""'"); 
    }
    if (!argp9) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ZeroCouponInflationSwap" "', argument " "9"" of type '" "ZeroInflationIndexPtr const &""'"); 
    }
    arg9 = reinterpret_cast< ZeroInflationIndexPtr * >(argp9);
    res10 = SWIG_ConvertPtr(ST(9), &argp10, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res10)) {
      SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "new_ZeroCouponInflationSwap" "', argument " "10"" of type '" "Period const &""'"); 
    }
    if (!argp10) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ZeroCouponInflationSwap" "', argument " "10"" of type '" "Period const &""'"); 
    }
    arg10 = reinterpret_cast< Period * >(argp10);
    ecode11 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(10), &val11);
    if (!SWIG_IsOK(ecode11)) {
      SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "new_ZeroCouponInflationSwap" "', argument " "11"" of type '" "bool""'");
    } 
    arg11 = static_cast< bool >(val11);
    {
      res12 = SWIG_ConvertPtr(ST(11), &argp12, SWIGTYPE_p_Calendar,  0 );
      if (!SWIG_IsOK(res12)) {
        SWIG_exception_fail(SWIG_ArgError(res12), "in method '" "new_ZeroCouponInflationSwap" "', argument " "12"" of type '" "Calendar""'"); 
      }  
      if (!argp12) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ZeroCouponInflationSwap" "', argument " "12"" of type '" "Calendar""'");
      } else {
        arg12 = *(reinterpret_cast< Calendar * >(argp12));
      }
    }
    ecode13 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(12), &val13);
    if (!SWIG_IsOK(ecode13)) {
      SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "new_ZeroCouponInflationSwap" "', argument " "13"" of type '" "BusinessDayConvention""'");
    } 
    arg13 = static_cast< BusinessDayConvention >(val13);
    {
      try {
        result = (ZeroCouponInflationSwapPtr *)new_ZeroCouponInflationSwapPtr__SWIG_0(arg1,arg2,(Date const &)*arg3,(Date const &)*arg4,(Calendar const &)*arg5,arg6,(DayCounter const &)*arg7,arg8,(ZeroInflationIndexPtr const &)*arg9,(Period const &)*arg10,arg11,arg12,arg13);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ZeroCouponInflationSwapPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ZeroCouponInflationSwap__SWIG_1) {
  {
    ZeroCouponInflationSwap::Type arg1 ;
    Real arg2 ;
    Date *arg3 = 0 ;
    Date *arg4 = 0 ;
    Calendar *arg5 = 0 ;
    BusinessDayConvention arg6 ;
    DayCounter *arg7 = 0 ;
    Rate arg8 ;
    ZeroInflationIndexPtr *arg9 = 0 ;
    Period *arg10 = 0 ;
    bool arg11 ;
    SwigValueWrapper< Calendar > arg12 ;
    int val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    double val8 ;
    int ecode8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    void *argp10 ;
    int res10 = 0 ;
    bool val11 ;
    int ecode11 = 0 ;
    void *argp12 ;
    int res12 = 0 ;
    int argvi = 0;
    ZeroCouponInflationSwapPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 12) || (items > 12)) {
      SWIG_croak("Usage: new_ZeroCouponInflationSwap(type,nominal,start,maturity,calendar,convention,dayCounter,fixedRate,index,lag,adjustInfObsDates,infCalendar);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ZeroCouponInflationSwap" "', argument " "1"" of type '" "ZeroCouponInflationSwap::Type""'");
    } 
    arg1 = static_cast< ZeroCouponInflationSwap::Type >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_ZeroCouponInflationSwap" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_ZeroCouponInflationSwap" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ZeroCouponInflationSwap" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_ZeroCouponInflationSwap" "', argument " "4"" of type '" "Date const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ZeroCouponInflationSwap" "', argument " "4"" of type '" "Date const &""'"); 
    }
    arg4 = reinterpret_cast< Date * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_ZeroCouponInflationSwap" "', argument " "5"" of type '" "Calendar const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ZeroCouponInflationSwap" "', argument " "5"" of type '" "Calendar const &""'"); 
    }
    arg5 = reinterpret_cast< Calendar * >(argp5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_ZeroCouponInflationSwap" "', argument " "6"" of type '" "BusinessDayConvention""'");
    } 
    arg6 = static_cast< BusinessDayConvention >(val6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_ZeroCouponInflationSwap" "', argument " "7"" of type '" "DayCounter const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ZeroCouponInflationSwap" "', argument " "7"" of type '" "DayCounter const &""'"); 
    }
    arg7 = reinterpret_cast< DayCounter * >(argp7);
    ecode8 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_ZeroCouponInflationSwap" "', argument " "8"" of type '" "Rate""'");
    } 
    arg8 = static_cast< Rate >(val8);
    res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_ZeroInflationIndexPtr,  0 );
    if (!SWIG_IsOK(res9)) {
      SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_ZeroCouponInflationSwap" "', argument " "9"" of type '" "ZeroInflationIndexPtr const &""'"); 
    }
    if (!argp9) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ZeroCouponInflationSwap" "', argument " "9"" of type '" "ZeroInflationIndexPtr const &""'"); 
    }
    arg9 = reinterpret_cast< ZeroInflationIndexPtr * >(argp9);
    res10 = SWIG_ConvertPtr(ST(9), &argp10, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res10)) {
      SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "new_ZeroCouponInflationSwap" "', argument " "10"" of type '" "Period const &""'"); 
    }
    if (!argp10) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ZeroCouponInflationSwap" "', argument " "10"" of type '" "Period const &""'"); 
    }
    arg10 = reinterpret_cast< Period * >(argp10);
    ecode11 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(10), &val11);
    if (!SWIG_IsOK(ecode11)) {
      SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "new_ZeroCouponInflationSwap" "', argument " "11"" of type '" "bool""'");
    } 
    arg11 = static_cast< bool >(val11);
    {
      res12 = SWIG_ConvertPtr(ST(11), &argp12, SWIGTYPE_p_Calendar,  0 );
      if (!SWIG_IsOK(res12)) {
        SWIG_exception_fail(SWIG_ArgError(res12), "in method '" "new_ZeroCouponInflationSwap" "', argument " "12"" of type '" "Calendar""'"); 
      }  
      if (!argp12) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ZeroCouponInflationSwap" "', argument " "12"" of type '" "Calendar""'");
      } else {
        arg12 = *(reinterpret_cast< Calendar * >(argp12));
      }
    }
    {
      try {
        result = (ZeroCouponInflationSwapPtr *)new_ZeroCouponInflationSwapPtr__SWIG_0(arg1,arg2,(Date const &)*arg3,(Date const &)*arg4,(Calendar const &)*arg5,arg6,(DayCounter const &)*arg7,arg8,(ZeroInflationIndexPtr const &)*arg9,(Period const &)*arg10,arg11,arg12);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ZeroCouponInflationSwapPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ZeroCouponInflationSwap__SWIG_2) {
  {
    ZeroCouponInflationSwap::Type arg1 ;
    Real arg2 ;
    Date *arg3 = 0 ;
    Date *arg4 = 0 ;
    Calendar *arg5 = 0 ;
    BusinessDayConvention arg6 ;
    DayCounter *arg7 = 0 ;
    Rate arg8 ;
    ZeroInflationIndexPtr *arg9 = 0 ;
    Period *arg10 = 0 ;
    bool arg11 ;
    int val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    double val8 ;
    int ecode8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    void *argp10 ;
    int res10 = 0 ;
    bool val11 ;
    int ecode11 = 0 ;
    int argvi = 0;
    ZeroCouponInflationSwapPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 11) || (items > 11)) {
      SWIG_croak("Usage: new_ZeroCouponInflationSwap(type,nominal,start,maturity,calendar,convention,dayCounter,fixedRate,index,lag,adjustInfObsDates);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ZeroCouponInflationSwap" "', argument " "1"" of type '" "ZeroCouponInflationSwap::Type""'");
    } 
    arg1 = static_cast< ZeroCouponInflationSwap::Type >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_ZeroCouponInflationSwap" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_ZeroCouponInflationSwap" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ZeroCouponInflationSwap" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_ZeroCouponInflationSwap" "', argument " "4"" of type '" "Date const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ZeroCouponInflationSwap" "', argument " "4"" of type '" "Date const &""'"); 
    }
    arg4 = reinterpret_cast< Date * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_ZeroCouponInflationSwap" "', argument " "5"" of type '" "Calendar const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ZeroCouponInflationSwap" "', argument " "5"" of type '" "Calendar const &""'"); 
    }
    arg5 = reinterpret_cast< Calendar * >(argp5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_ZeroCouponInflationSwap" "', argument " "6"" of type '" "BusinessDayConvention""'");
    } 
    arg6 = static_cast< BusinessDayConvention >(val6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_ZeroCouponInflationSwap" "', argument " "7"" of type '" "DayCounter const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ZeroCouponInflationSwap" "', argument " "7"" of type '" "DayCounter const &""'"); 
    }
    arg7 = reinterpret_cast< DayCounter * >(argp7);
    ecode8 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_ZeroCouponInflationSwap" "', argument " "8"" of type '" "Rate""'");
    } 
    arg8 = static_cast< Rate >(val8);
    res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_ZeroInflationIndexPtr,  0 );
    if (!SWIG_IsOK(res9)) {
      SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_ZeroCouponInflationSwap" "', argument " "9"" of type '" "ZeroInflationIndexPtr const &""'"); 
    }
    if (!argp9) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ZeroCouponInflationSwap" "', argument " "9"" of type '" "ZeroInflationIndexPtr const &""'"); 
    }
    arg9 = reinterpret_cast< ZeroInflationIndexPtr * >(argp9);
    res10 = SWIG_ConvertPtr(ST(9), &argp10, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res10)) {
      SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "new_ZeroCouponInflationSwap" "', argument " "10"" of type '" "Period const &""'"); 
    }
    if (!argp10) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ZeroCouponInflationSwap" "', argument " "10"" of type '" "Period const &""'"); 
    }
    arg10 = reinterpret_cast< Period * >(argp10);
    ecode11 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(10), &val11);
    if (!SWIG_IsOK(ecode11)) {
      SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "new_ZeroCouponInflationSwap" "', argument " "11"" of type '" "bool""'");
    } 
    arg11 = static_cast< bool >(val11);
    {
      try {
        result = (ZeroCouponInflationSwapPtr *)new_ZeroCouponInflationSwapPtr__SWIG_0(arg1,arg2,(Date const &)*arg3,(Date const &)*arg4,(Calendar const &)*arg5,arg6,(DayCounter const &)*arg7,arg8,(ZeroInflationIndexPtr const &)*arg9,(Period const &)*arg10,arg11);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ZeroCouponInflationSwapPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ZeroCouponInflationSwap__SWIG_3) {
  {
    ZeroCouponInflationSwap::Type arg1 ;
    Real arg2 ;
    Date *arg3 = 0 ;
    Date *arg4 = 0 ;
    Calendar *arg5 = 0 ;
    BusinessDayConvention arg6 ;
    DayCounter *arg7 = 0 ;
    Rate arg8 ;
    ZeroInflationIndexPtr *arg9 = 0 ;
    Period *arg10 = 0 ;
    int val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    double val8 ;
    int ecode8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    void *argp10 ;
    int res10 = 0 ;
    int argvi = 0;
    ZeroCouponInflationSwapPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 10) || (items > 10)) {
      SWIG_croak("Usage: new_ZeroCouponInflationSwap(type,nominal,start,maturity,calendar,convention,dayCounter,fixedRate,index,lag);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ZeroCouponInflationSwap" "', argument " "1"" of type '" "ZeroCouponInflationSwap::Type""'");
    } 
    arg1 = static_cast< ZeroCouponInflationSwap::Type >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_ZeroCouponInflationSwap" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_ZeroCouponInflationSwap" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ZeroCouponInflationSwap" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_ZeroCouponInflationSwap" "', argument " "4"" of type '" "Date const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ZeroCouponInflationSwap" "', argument " "4"" of type '" "Date const &""'"); 
    }
    arg4 = reinterpret_cast< Date * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_ZeroCouponInflationSwap" "', argument " "5"" of type '" "Calendar const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ZeroCouponInflationSwap" "', argument " "5"" of type '" "Calendar const &""'"); 
    }
    arg5 = reinterpret_cast< Calendar * >(argp5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_ZeroCouponInflationSwap" "', argument " "6"" of type '" "BusinessDayConvention""'");
    } 
    arg6 = static_cast< BusinessDayConvention >(val6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_ZeroCouponInflationSwap" "', argument " "7"" of type '" "DayCounter const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ZeroCouponInflationSwap" "', argument " "7"" of type '" "DayCounter const &""'"); 
    }
    arg7 = reinterpret_cast< DayCounter * >(argp7);
    ecode8 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_ZeroCouponInflationSwap" "', argument " "8"" of type '" "Rate""'");
    } 
    arg8 = static_cast< Rate >(val8);
    res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_ZeroInflationIndexPtr,  0 );
    if (!SWIG_IsOK(res9)) {
      SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_ZeroCouponInflationSwap" "', argument " "9"" of type '" "ZeroInflationIndexPtr const &""'"); 
    }
    if (!argp9) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ZeroCouponInflationSwap" "', argument " "9"" of type '" "ZeroInflationIndexPtr const &""'"); 
    }
    arg9 = reinterpret_cast< ZeroInflationIndexPtr * >(argp9);
    res10 = SWIG_ConvertPtr(ST(9), &argp10, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res10)) {
      SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "new_ZeroCouponInflationSwap" "', argument " "10"" of type '" "Period const &""'"); 
    }
    if (!argp10) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ZeroCouponInflationSwap" "', argument " "10"" of type '" "Period const &""'"); 
    }
    arg10 = reinterpret_cast< Period * >(argp10);
    {
      try {
        result = (ZeroCouponInflationSwapPtr *)new_ZeroCouponInflationSwapPtr__SWIG_0(arg1,arg2,(Date const &)*arg3,(Date const &)*arg4,(Calendar const &)*arg5,arg6,(DayCounter const &)*arg7,arg8,(ZeroInflationIndexPtr const &)*arg9,(Period const &)*arg10);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ZeroCouponInflationSwapPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ZeroCouponInflationSwap) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 10) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_ZeroInflationIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(9), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 11) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_ZeroInflationIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(9), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(10), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 12) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_ZeroInflationIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(9), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(10), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(11), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 13) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_ZeroInflationIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(9), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(10), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(11), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(12), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ZeroCouponInflationSwap__SWIG_3); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ZeroCouponInflationSwap__SWIG_2); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ZeroCouponInflationSwap__SWIG_1); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ZeroCouponInflationSwap__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_ZeroCouponInflationSwap'");
  XSRETURN(0);
}


XS(_wrap_ZeroCouponInflationSwap_fairRate) {
  {
    ZeroCouponInflationSwapPtr *arg1 = (ZeroCouponInflationSwapPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ZeroCouponInflationSwap_fairRate(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ZeroCouponInflationSwapPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZeroCouponInflationSwap_fairRate" "', argument " "1"" of type '" "ZeroCouponInflationSwapPtr *""'"); 
    }
    arg1 = reinterpret_cast< ZeroCouponInflationSwapPtr * >(argp1);
    {
      try {
        result = (Rate)ZeroCouponInflationSwapPtr_fairRate(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ZeroCouponInflationSwap_fixedLeg) {
  {
    ZeroCouponInflationSwapPtr *arg1 = (ZeroCouponInflationSwapPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< boost::shared_ptr< CashFlow > > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ZeroCouponInflationSwap_fixedLeg(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ZeroCouponInflationSwapPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZeroCouponInflationSwap_fixedLeg" "', argument " "1"" of type '" "ZeroCouponInflationSwapPtr *""'"); 
    }
    arg1 = reinterpret_cast< ZeroCouponInflationSwapPtr * >(argp1);
    {
      try {
        result = ZeroCouponInflationSwapPtr_fixedLeg(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        boost::shared_ptr< CashFlow >* ptr = new boost::shared_ptr< CashFlow >(result[i]);
        svs[i] = sv_newmortal();
        SWIG_MakePtr(svs[i], (void*) ptr, 
          SWIGTYPE_p_boost__shared_ptrT_CashFlow_t, SWIG_SHADOW|0);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ZeroCouponInflationSwap_inflationLeg) {
  {
    ZeroCouponInflationSwapPtr *arg1 = (ZeroCouponInflationSwapPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< boost::shared_ptr< CashFlow > > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ZeroCouponInflationSwap_inflationLeg(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ZeroCouponInflationSwapPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZeroCouponInflationSwap_inflationLeg" "', argument " "1"" of type '" "ZeroCouponInflationSwapPtr *""'"); 
    }
    arg1 = reinterpret_cast< ZeroCouponInflationSwapPtr * >(argp1);
    {
      try {
        result = ZeroCouponInflationSwapPtr_inflationLeg(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        boost::shared_ptr< CashFlow >* ptr = new boost::shared_ptr< CashFlow >(result[i]);
        svs[i] = sv_newmortal();
        SWIG_MakePtr(svs[i], (void*) ptr, 
          SWIGTYPE_p_boost__shared_ptrT_CashFlow_t, SWIG_SHADOW|0);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ZeroCouponInflationSwap_type) {
  {
    ZeroCouponInflationSwapPtr *arg1 = (ZeroCouponInflationSwapPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    ZeroCouponInflationSwap::Type result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ZeroCouponInflationSwap_type(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ZeroCouponInflationSwapPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZeroCouponInflationSwap_type" "', argument " "1"" of type '" "ZeroCouponInflationSwapPtr *""'"); 
    }
    arg1 = reinterpret_cast< ZeroCouponInflationSwapPtr * >(argp1);
    {
      try {
        result = (ZeroCouponInflationSwap::Type)ZeroCouponInflationSwapPtr_type(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_ZeroCouponInflationSwap) {
  {
    ZeroCouponInflationSwapPtr *arg1 = (ZeroCouponInflationSwapPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_ZeroCouponInflationSwap(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ZeroCouponInflationSwapPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ZeroCouponInflationSwap" "', argument " "1"" of type '" "ZeroCouponInflationSwapPtr *""'"); 
    }
    arg1 = reinterpret_cast< ZeroCouponInflationSwapPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_YearOnYearInflationSwap__SWIG_0) {
  {
    YearOnYearInflationSwap::Type arg1 ;
    Real arg2 ;
    Schedule *arg3 = 0 ;
    Rate arg4 ;
    DayCounter *arg5 = 0 ;
    Schedule *arg6 = 0 ;
    YoYInflationIndexPtr *arg7 = 0 ;
    Period *arg8 = 0 ;
    Spread arg9 ;
    DayCounter *arg10 = 0 ;
    Calendar *arg11 = 0 ;
    BusinessDayConvention arg12 ;
    int val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    double val9 ;
    int ecode9 = 0 ;
    void *argp10 ;
    int res10 = 0 ;
    void *argp11 ;
    int res11 = 0 ;
    int val12 ;
    int ecode12 = 0 ;
    int argvi = 0;
    YearOnYearInflationSwapPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 12) || (items > 12)) {
      SWIG_croak("Usage: new_YearOnYearInflationSwap(type,nominal,fixedSchedule,fixedRate,fixedDayCounter,yoySchedule,index,lag,spread,yoyDayCounter,paymentCalendar,paymentConvention);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_YearOnYearInflationSwap" "', argument " "1"" of type '" "YearOnYearInflationSwap::Type""'");
    } 
    arg1 = static_cast< YearOnYearInflationSwap::Type >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_YearOnYearInflationSwap" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_YearOnYearInflationSwap" "', argument " "3"" of type '" "Schedule const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_YearOnYearInflationSwap" "', argument " "3"" of type '" "Schedule const &""'"); 
    }
    arg3 = reinterpret_cast< Schedule * >(argp3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_YearOnYearInflationSwap" "', argument " "4"" of type '" "Rate""'");
    } 
    arg4 = static_cast< Rate >(val4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_YearOnYearInflationSwap" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_YearOnYearInflationSwap" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    arg5 = reinterpret_cast< DayCounter * >(argp5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_YearOnYearInflationSwap" "', argument " "6"" of type '" "Schedule const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_YearOnYearInflationSwap" "', argument " "6"" of type '" "Schedule const &""'"); 
    }
    arg6 = reinterpret_cast< Schedule * >(argp6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_YoYInflationIndexPtr,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_YearOnYearInflationSwap" "', argument " "7"" of type '" "YoYInflationIndexPtr const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_YearOnYearInflationSwap" "', argument " "7"" of type '" "YoYInflationIndexPtr const &""'"); 
    }
    arg7 = reinterpret_cast< YoYInflationIndexPtr * >(argp7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_YearOnYearInflationSwap" "', argument " "8"" of type '" "Period const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_YearOnYearInflationSwap" "', argument " "8"" of type '" "Period const &""'"); 
    }
    arg8 = reinterpret_cast< Period * >(argp8);
    ecode9 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(8), &val9);
    if (!SWIG_IsOK(ecode9)) {
      SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "new_YearOnYearInflationSwap" "', argument " "9"" of type '" "Spread""'");
    } 
    arg9 = static_cast< Spread >(val9);
    res10 = SWIG_ConvertPtr(ST(9), &argp10, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res10)) {
      SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "new_YearOnYearInflationSwap" "', argument " "10"" of type '" "DayCounter const &""'"); 
    }
    if (!argp10) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_YearOnYearInflationSwap" "', argument " "10"" of type '" "DayCounter const &""'"); 
    }
    arg10 = reinterpret_cast< DayCounter * >(argp10);
    res11 = SWIG_ConvertPtr(ST(10), &argp11, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res11)) {
      SWIG_exception_fail(SWIG_ArgError(res11), "in method '" "new_YearOnYearInflationSwap" "', argument " "11"" of type '" "Calendar const &""'"); 
    }
    if (!argp11) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_YearOnYearInflationSwap" "', argument " "11"" of type '" "Calendar const &""'"); 
    }
    arg11 = reinterpret_cast< Calendar * >(argp11);
    ecode12 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(11), &val12);
    if (!SWIG_IsOK(ecode12)) {
      SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "new_YearOnYearInflationSwap" "', argument " "12"" of type '" "BusinessDayConvention""'");
    } 
    arg12 = static_cast< BusinessDayConvention >(val12);
    {
      try {
        result = (YearOnYearInflationSwapPtr *)new_YearOnYearInflationSwapPtr__SWIG_0(arg1,arg2,(Schedule const &)*arg3,arg4,(DayCounter const &)*arg5,(Schedule const &)*arg6,(YoYInflationIndexPtr const &)*arg7,(Period const &)*arg8,arg9,(DayCounter const &)*arg10,(Calendar const &)*arg11,arg12);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_YearOnYearInflationSwapPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_YearOnYearInflationSwap__SWIG_1) {
  {
    YearOnYearInflationSwap::Type arg1 ;
    Real arg2 ;
    Schedule *arg3 = 0 ;
    Rate arg4 ;
    DayCounter *arg5 = 0 ;
    Schedule *arg6 = 0 ;
    YoYInflationIndexPtr *arg7 = 0 ;
    Period *arg8 = 0 ;
    Spread arg9 ;
    DayCounter *arg10 = 0 ;
    Calendar *arg11 = 0 ;
    int val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    double val9 ;
    int ecode9 = 0 ;
    void *argp10 ;
    int res10 = 0 ;
    void *argp11 ;
    int res11 = 0 ;
    int argvi = 0;
    YearOnYearInflationSwapPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 11) || (items > 11)) {
      SWIG_croak("Usage: new_YearOnYearInflationSwap(type,nominal,fixedSchedule,fixedRate,fixedDayCounter,yoySchedule,index,lag,spread,yoyDayCounter,paymentCalendar);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_YearOnYearInflationSwap" "', argument " "1"" of type '" "YearOnYearInflationSwap::Type""'");
    } 
    arg1 = static_cast< YearOnYearInflationSwap::Type >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_YearOnYearInflationSwap" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_YearOnYearInflationSwap" "', argument " "3"" of type '" "Schedule const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_YearOnYearInflationSwap" "', argument " "3"" of type '" "Schedule const &""'"); 
    }
    arg3 = reinterpret_cast< Schedule * >(argp3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_YearOnYearInflationSwap" "', argument " "4"" of type '" "Rate""'");
    } 
    arg4 = static_cast< Rate >(val4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_YearOnYearInflationSwap" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_YearOnYearInflationSwap" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    arg5 = reinterpret_cast< DayCounter * >(argp5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_YearOnYearInflationSwap" "', argument " "6"" of type '" "Schedule const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_YearOnYearInflationSwap" "', argument " "6"" of type '" "Schedule const &""'"); 
    }
    arg6 = reinterpret_cast< Schedule * >(argp6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_YoYInflationIndexPtr,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_YearOnYearInflationSwap" "', argument " "7"" of type '" "YoYInflationIndexPtr const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_YearOnYearInflationSwap" "', argument " "7"" of type '" "YoYInflationIndexPtr const &""'"); 
    }
    arg7 = reinterpret_cast< YoYInflationIndexPtr * >(argp7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_YearOnYearInflationSwap" "', argument " "8"" of type '" "Period const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_YearOnYearInflationSwap" "', argument " "8"" of type '" "Period const &""'"); 
    }
    arg8 = reinterpret_cast< Period * >(argp8);
    ecode9 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(8), &val9);
    if (!SWIG_IsOK(ecode9)) {
      SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "new_YearOnYearInflationSwap" "', argument " "9"" of type '" "Spread""'");
    } 
    arg9 = static_cast< Spread >(val9);
    res10 = SWIG_ConvertPtr(ST(9), &argp10, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res10)) {
      SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "new_YearOnYearInflationSwap" "', argument " "10"" of type '" "DayCounter const &""'"); 
    }
    if (!argp10) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_YearOnYearInflationSwap" "', argument " "10"" of type '" "DayCounter const &""'"); 
    }
    arg10 = reinterpret_cast< DayCounter * >(argp10);
    res11 = SWIG_ConvertPtr(ST(10), &argp11, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res11)) {
      SWIG_exception_fail(SWIG_ArgError(res11), "in method '" "new_YearOnYearInflationSwap" "', argument " "11"" of type '" "Calendar const &""'"); 
    }
    if (!argp11) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_YearOnYearInflationSwap" "', argument " "11"" of type '" "Calendar const &""'"); 
    }
    arg11 = reinterpret_cast< Calendar * >(argp11);
    {
      try {
        result = (YearOnYearInflationSwapPtr *)new_YearOnYearInflationSwapPtr__SWIG_0(arg1,arg2,(Schedule const &)*arg3,arg4,(DayCounter const &)*arg5,(Schedule const &)*arg6,(YoYInflationIndexPtr const &)*arg7,(Period const &)*arg8,arg9,(DayCounter const &)*arg10,(Calendar const &)*arg11);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_YearOnYearInflationSwapPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_YearOnYearInflationSwap) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 11) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_YoYInflationIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(8), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(9), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(10), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 12) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_YoYInflationIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(8), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(9), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(10), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(11), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_YearOnYearInflationSwap__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_YearOnYearInflationSwap__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_YearOnYearInflationSwap'");
  XSRETURN(0);
}


XS(_wrap_YearOnYearInflationSwap_fairRate) {
  {
    YearOnYearInflationSwapPtr *arg1 = (YearOnYearInflationSwapPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: YearOnYearInflationSwap_fairRate(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_YearOnYearInflationSwapPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YearOnYearInflationSwap_fairRate" "', argument " "1"" of type '" "YearOnYearInflationSwapPtr *""'"); 
    }
    arg1 = reinterpret_cast< YearOnYearInflationSwapPtr * >(argp1);
    {
      try {
        result = (Rate)YearOnYearInflationSwapPtr_fairRate(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_YearOnYearInflationSwap) {
  {
    YearOnYearInflationSwapPtr *arg1 = (YearOnYearInflationSwapPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_YearOnYearInflationSwap(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_YearOnYearInflationSwapPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_YearOnYearInflationSwap" "', argument " "1"" of type '" "YearOnYearInflationSwapPtr *""'"); 
    }
    arg1 = reinterpret_cast< YearOnYearInflationSwapPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_YoYInflationCapFloor_impliedVolatility__SWIG_0) {
  {
    YoYInflationCapFloorPtr *arg1 = (YoYInflationCapFloorPtr *) 0 ;
    Real arg2 ;
    Handle< YoYInflationTermStructure > *arg3 = 0 ;
    Volatility arg4 ;
    Real arg5 ;
    Size arg6 ;
    Volatility arg7 ;
    Volatility arg8 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    double val5 ;
    int ecode5 = 0 ;
    size_t val6 ;
    int ecode6 = 0 ;
    double val7 ;
    int ecode7 = 0 ;
    double val8 ;
    int ecode8 = 0 ;
    int argvi = 0;
    Volatility result;
    dXSARGS;
    
    if ((items < 8) || (items > 8)) {
      SWIG_croak("Usage: YoYInflationCapFloor_impliedVolatility(self,price,curve,guess,accuracy,maxEvaluations,minVol,maxVol);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_YoYInflationCapFloorPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YoYInflationCapFloor_impliedVolatility" "', argument " "1"" of type '" "YoYInflationCapFloorPtr const *""'"); 
    }
    arg1 = reinterpret_cast< YoYInflationCapFloorPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "YoYInflationCapFloor_impliedVolatility" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_YoYInflationTermStructure_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "YoYInflationCapFloor_impliedVolatility" "', argument " "3"" of type '" "Handle< YoYInflationTermStructure > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "YoYInflationCapFloor_impliedVolatility" "', argument " "3"" of type '" "Handle< YoYInflationTermStructure > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< YoYInflationTermStructure > * >(argp3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "YoYInflationCapFloor_impliedVolatility" "', argument " "4"" of type '" "Volatility""'");
    } 
    arg4 = static_cast< Volatility >(val4);
    ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "YoYInflationCapFloor_impliedVolatility" "', argument " "5"" of type '" "Real""'");
    } 
    arg5 = static_cast< Real >(val5);
    ecode6 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "YoYInflationCapFloor_impliedVolatility" "', argument " "6"" of type '" "Size""'");
    } 
    arg6 = static_cast< Size >(val6);
    ecode7 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "YoYInflationCapFloor_impliedVolatility" "', argument " "7"" of type '" "Volatility""'");
    } 
    arg7 = static_cast< Volatility >(val7);
    ecode8 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "YoYInflationCapFloor_impliedVolatility" "', argument " "8"" of type '" "Volatility""'");
    } 
    arg8 = static_cast< Volatility >(val8);
    {
      try {
        result = (Volatility)YoYInflationCapFloorPtr_impliedVolatility__SWIG_0((YoYInflationCapFloorPtr const *)arg1,arg2,(Handle< YoYInflationTermStructure > const &)*arg3,arg4,arg5,arg6,arg7,arg8);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_YoYInflationCapFloor_impliedVolatility__SWIG_1) {
  {
    YoYInflationCapFloorPtr *arg1 = (YoYInflationCapFloorPtr *) 0 ;
    Real arg2 ;
    Handle< YoYInflationTermStructure > *arg3 = 0 ;
    Volatility arg4 ;
    Real arg5 ;
    Size arg6 ;
    Volatility arg7 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    double val5 ;
    int ecode5 = 0 ;
    size_t val6 ;
    int ecode6 = 0 ;
    double val7 ;
    int ecode7 = 0 ;
    int argvi = 0;
    Volatility result;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: YoYInflationCapFloor_impliedVolatility(self,price,curve,guess,accuracy,maxEvaluations,minVol);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_YoYInflationCapFloorPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YoYInflationCapFloor_impliedVolatility" "', argument " "1"" of type '" "YoYInflationCapFloorPtr const *""'"); 
    }
    arg1 = reinterpret_cast< YoYInflationCapFloorPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "YoYInflationCapFloor_impliedVolatility" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_YoYInflationTermStructure_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "YoYInflationCapFloor_impliedVolatility" "', argument " "3"" of type '" "Handle< YoYInflationTermStructure > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "YoYInflationCapFloor_impliedVolatility" "', argument " "3"" of type '" "Handle< YoYInflationTermStructure > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< YoYInflationTermStructure > * >(argp3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "YoYInflationCapFloor_impliedVolatility" "', argument " "4"" of type '" "Volatility""'");
    } 
    arg4 = static_cast< Volatility >(val4);
    ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "YoYInflationCapFloor_impliedVolatility" "', argument " "5"" of type '" "Real""'");
    } 
    arg5 = static_cast< Real >(val5);
    ecode6 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "YoYInflationCapFloor_impliedVolatility" "', argument " "6"" of type '" "Size""'");
    } 
    arg6 = static_cast< Size >(val6);
    ecode7 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "YoYInflationCapFloor_impliedVolatility" "', argument " "7"" of type '" "Volatility""'");
    } 
    arg7 = static_cast< Volatility >(val7);
    {
      try {
        result = (Volatility)YoYInflationCapFloorPtr_impliedVolatility__SWIG_0((YoYInflationCapFloorPtr const *)arg1,arg2,(Handle< YoYInflationTermStructure > const &)*arg3,arg4,arg5,arg6,arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_YoYInflationCapFloor_impliedVolatility__SWIG_2) {
  {
    YoYInflationCapFloorPtr *arg1 = (YoYInflationCapFloorPtr *) 0 ;
    Real arg2 ;
    Handle< YoYInflationTermStructure > *arg3 = 0 ;
    Volatility arg4 ;
    Real arg5 ;
    Size arg6 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    double val5 ;
    int ecode5 = 0 ;
    size_t val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    Volatility result;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: YoYInflationCapFloor_impliedVolatility(self,price,curve,guess,accuracy,maxEvaluations);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_YoYInflationCapFloorPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YoYInflationCapFloor_impliedVolatility" "', argument " "1"" of type '" "YoYInflationCapFloorPtr const *""'"); 
    }
    arg1 = reinterpret_cast< YoYInflationCapFloorPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "YoYInflationCapFloor_impliedVolatility" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_YoYInflationTermStructure_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "YoYInflationCapFloor_impliedVolatility" "', argument " "3"" of type '" "Handle< YoYInflationTermStructure > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "YoYInflationCapFloor_impliedVolatility" "', argument " "3"" of type '" "Handle< YoYInflationTermStructure > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< YoYInflationTermStructure > * >(argp3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "YoYInflationCapFloor_impliedVolatility" "', argument " "4"" of type '" "Volatility""'");
    } 
    arg4 = static_cast< Volatility >(val4);
    ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "YoYInflationCapFloor_impliedVolatility" "', argument " "5"" of type '" "Real""'");
    } 
    arg5 = static_cast< Real >(val5);
    ecode6 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "YoYInflationCapFloor_impliedVolatility" "', argument " "6"" of type '" "Size""'");
    } 
    arg6 = static_cast< Size >(val6);
    {
      try {
        result = (Volatility)YoYInflationCapFloorPtr_impliedVolatility__SWIG_0((YoYInflationCapFloorPtr const *)arg1,arg2,(Handle< YoYInflationTermStructure > const &)*arg3,arg4,arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_YoYInflationCapFloor_impliedVolatility__SWIG_3) {
  {
    YoYInflationCapFloorPtr *arg1 = (YoYInflationCapFloorPtr *) 0 ;
    Real arg2 ;
    Handle< YoYInflationTermStructure > *arg3 = 0 ;
    Volatility arg4 ;
    Real arg5 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    double val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    Volatility result;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: YoYInflationCapFloor_impliedVolatility(self,price,curve,guess,accuracy);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_YoYInflationCapFloorPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YoYInflationCapFloor_impliedVolatility" "', argument " "1"" of type '" "YoYInflationCapFloorPtr const *""'"); 
    }
    arg1 = reinterpret_cast< YoYInflationCapFloorPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "YoYInflationCapFloor_impliedVolatility" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_YoYInflationTermStructure_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "YoYInflationCapFloor_impliedVolatility" "', argument " "3"" of type '" "Handle< YoYInflationTermStructure > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "YoYInflationCapFloor_impliedVolatility" "', argument " "3"" of type '" "Handle< YoYInflationTermStructure > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< YoYInflationTermStructure > * >(argp3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "YoYInflationCapFloor_impliedVolatility" "', argument " "4"" of type '" "Volatility""'");
    } 
    arg4 = static_cast< Volatility >(val4);
    ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "YoYInflationCapFloor_impliedVolatility" "', argument " "5"" of type '" "Real""'");
    } 
    arg5 = static_cast< Real >(val5);
    {
      try {
        result = (Volatility)YoYInflationCapFloorPtr_impliedVolatility__SWIG_0((YoYInflationCapFloorPtr const *)arg1,arg2,(Handle< YoYInflationTermStructure > const &)*arg3,arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_YoYInflationCapFloor_impliedVolatility__SWIG_4) {
  {
    YoYInflationCapFloorPtr *arg1 = (YoYInflationCapFloorPtr *) 0 ;
    Real arg2 ;
    Handle< YoYInflationTermStructure > *arg3 = 0 ;
    Volatility arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Volatility result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: YoYInflationCapFloor_impliedVolatility(self,price,curve,guess);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_YoYInflationCapFloorPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "YoYInflationCapFloor_impliedVolatility" "', argument " "1"" of type '" "YoYInflationCapFloorPtr const *""'"); 
    }
    arg1 = reinterpret_cast< YoYInflationCapFloorPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "YoYInflationCapFloor_impliedVolatility" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_YoYInflationTermStructure_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "YoYInflationCapFloor_impliedVolatility" "', argument " "3"" of type '" "Handle< YoYInflationTermStructure > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "YoYInflationCapFloor_impliedVolatility" "', argument " "3"" of type '" "Handle< YoYInflationTermStructure > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< YoYInflationTermStructure > * >(argp3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "YoYInflationCapFloor_impliedVolatility" "', argument " "4"" of type '" "Volatility""'");
    } 
    arg4 = static_cast< Volatility >(val4);
    {
      try {
        result = (Volatility)YoYInflationCapFloorPtr_impliedVolatility__SWIG_0((YoYInflationCapFloorPtr const *)arg1,arg2,(Handle< YoYInflationTermStructure > const &)*arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_YoYInflationCapFloor_impliedVolatility) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_YoYInflationCapFloorPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_YoYInflationTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_YoYInflationCapFloorPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_YoYInflationTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_YoYInflationCapFloorPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_YoYInflationTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_YoYInflationCapFloorPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_YoYInflationTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 8) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_YoYInflationCapFloorPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_YoYInflationTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_YoYInflationCapFloor_impliedVolatility__SWIG_4); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_YoYInflationCapFloor_impliedVolatility__SWIG_3); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_YoYInflationCapFloor_impliedVolatility__SWIG_2); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_YoYInflationCapFloor_impliedVolatility__SWIG_1); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_YoYInflationCapFloor_impliedVolatility__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'YoYInflationCapFloor_impliedVolatility'");
  XSRETURN(0);
}


XS(_wrap_new_YoYInflationCapFloor) {
  {
    int argvi = 0;
    YoYInflationCapFloorPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_YoYInflationCapFloor();");
    }
    {
      try {
        result = (YoYInflationCapFloorPtr *)new YoYInflationCapFloorPtr();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_YoYInflationCapFloorPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_YoYInflationCapFloor) {
  {
    YoYInflationCapFloorPtr *arg1 = (YoYInflationCapFloorPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_YoYInflationCapFloor(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_YoYInflationCapFloorPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_YoYInflationCapFloor" "', argument " "1"" of type '" "YoYInflationCapFloorPtr *""'"); 
    }
    arg1 = reinterpret_cast< YoYInflationCapFloorPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_YoYInflationCap) {
  {
    std::vector< boost::shared_ptr< CashFlow > > *arg1 = 0 ;
    std::vector< Rate > *arg2 = 0 ;
    std::vector< boost::shared_ptr< CashFlow > > temp1 ;
    std::vector< boost::shared_ptr< CashFlow > > *v1 ;
    std::vector< double > temp2 ;
    std::vector< double > *v2 ;
    int argvi = 0;
    YoYInflationCapPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_YoYInflationCap(leg,capRates);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_YoYInflationCap. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CashFlow >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_YoYInflationCap. "
              "Expected an array of " "boost::shared_ptr< CashFlow >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_YoYInflationCap. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_YoYInflationCap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp2.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_YoYInflationCap. "
              "Expected an array of ""double");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_YoYInflationCap. "
          "Expected an array of ""double");
      }
    }
    {
      try {
        result = (YoYInflationCapPtr *)new_YoYInflationCapPtr((std::vector< boost::shared_ptr< CashFlow > > const &)*arg1,(std::vector< double > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_YoYInflationCapPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_YoYInflationCap) {
  {
    YoYInflationCapPtr *arg1 = (YoYInflationCapPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_YoYInflationCap(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_YoYInflationCapPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_YoYInflationCap" "', argument " "1"" of type '" "YoYInflationCapPtr *""'"); 
    }
    arg1 = reinterpret_cast< YoYInflationCapPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_YoYInflationFloor) {
  {
    std::vector< boost::shared_ptr< CashFlow > > *arg1 = 0 ;
    std::vector< Rate > *arg2 = 0 ;
    std::vector< boost::shared_ptr< CashFlow > > temp1 ;
    std::vector< boost::shared_ptr< CashFlow > > *v1 ;
    std::vector< double > temp2 ;
    std::vector< double > *v2 ;
    int argvi = 0;
    YoYInflationFloorPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_YoYInflationFloor(leg,floorRates);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_YoYInflationFloor. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CashFlow >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_YoYInflationFloor. "
              "Expected an array of " "boost::shared_ptr< CashFlow >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_YoYInflationFloor. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_YoYInflationFloor. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp2.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_YoYInflationFloor. "
              "Expected an array of ""double");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_YoYInflationFloor. "
          "Expected an array of ""double");
      }
    }
    {
      try {
        result = (YoYInflationFloorPtr *)new_YoYInflationFloorPtr((std::vector< boost::shared_ptr< CashFlow > > const &)*arg1,(std::vector< double > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_YoYInflationFloorPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_YoYInflationFloor) {
  {
    YoYInflationFloorPtr *arg1 = (YoYInflationFloorPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_YoYInflationFloor(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_YoYInflationFloorPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_YoYInflationFloor" "', argument " "1"" of type '" "YoYInflationFloorPtr *""'"); 
    }
    arg1 = reinterpret_cast< YoYInflationFloorPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_YoYInflationCollar) {
  {
    std::vector< boost::shared_ptr< CashFlow > > *arg1 = 0 ;
    std::vector< Rate > *arg2 = 0 ;
    std::vector< Rate > *arg3 = 0 ;
    std::vector< boost::shared_ptr< CashFlow > > temp1 ;
    std::vector< boost::shared_ptr< CashFlow > > *v1 ;
    std::vector< double > temp2 ;
    std::vector< double > *v2 ;
    std::vector< double > temp3 ;
    std::vector< double > *v3 ;
    int argvi = 0;
    YoYInflationCollarPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_YoYInflationCollar(leg,capRates,floorRates);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_YoYInflationCollar. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CashFlow >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_YoYInflationCollar. "
              "Expected an array of " "boost::shared_ptr< CashFlow >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_YoYInflationCollar. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_YoYInflationCollar. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp2.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_YoYInflationCollar. "
              "Expected an array of ""double");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_YoYInflationCollar. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_YoYInflationCollar. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp3.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_YoYInflationCollar. "
              "Expected an array of ""double");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_YoYInflationCollar. "
          "Expected an array of ""double");
      }
    }
    {
      try {
        result = (YoYInflationCollarPtr *)new_YoYInflationCollarPtr((std::vector< boost::shared_ptr< CashFlow > > const &)*arg1,(std::vector< double > const &)*arg2,(std::vector< double > const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_YoYInflationCollarPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_YoYInflationCollar) {
  {
    YoYInflationCollarPtr *arg1 = (YoYInflationCollarPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_YoYInflationCollar(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_YoYInflationCollarPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_YoYInflationCollar" "', argument " "1"" of type '" "YoYInflationCollarPtr *""'"); 
    }
    arg1 = reinterpret_cast< YoYInflationCollarPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ShortRateModel___deref__) {
  {
    boost::shared_ptr< ShortRateModel > *arg1 = (boost::shared_ptr< ShortRateModel > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    ShortRateModel *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ShortRateModel___deref__(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_ShortRateModel_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShortRateModel___deref__" "', argument " "1"" of type '" "boost::shared_ptr< ShortRateModel > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< ShortRateModel > * >(argp1);
    {
      try {
        result = (ShortRateModel *)(arg1)->operator ->();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ShortRateModel, 0 | 0); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ShortRateModel_isNull) {
  {
    boost::shared_ptr< ShortRateModel > *arg1 = (boost::shared_ptr< ShortRateModel > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ShortRateModel_isNull(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_ShortRateModel_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShortRateModel_isNull" "', argument " "1"" of type '" "boost::shared_ptr< ShortRateModel > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< ShortRateModel > * >(argp1);
    {
      try {
        result = (bool)boost_shared_ptr_Sl_ShortRateModel_Sg__isNull(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ShortRateModel_asObservable) {
  {
    boost::shared_ptr< ShortRateModel > *arg1 = (boost::shared_ptr< ShortRateModel > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    boost::shared_ptr< Observable > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ShortRateModel_asObservable(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_ShortRateModel_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShortRateModel_asObservable" "', argument " "1"" of type '" "boost::shared_ptr< ShortRateModel > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< ShortRateModel > * >(argp1);
    {
      try {
        result = boost_shared_ptr_Sl_ShortRateModel_Sg__asObservable(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new boost::shared_ptr< Observable >(static_cast< const boost::shared_ptr< Observable >& >(result))), SWIGTYPE_p_boost__shared_ptrT_Observable_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ShortRateModel) {
  {
    int argvi = 0;
    boost::shared_ptr< ShortRateModel > *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_ShortRateModel();");
    }
    {
      try {
        result = (boost::shared_ptr< ShortRateModel > *)new boost::shared_ptr< ShortRateModel >();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_boost__shared_ptrT_ShortRateModel_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_ShortRateModel) {
  {
    boost::shared_ptr< ShortRateModel > *arg1 = (boost::shared_ptr< ShortRateModel > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_ShortRateModel(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_ShortRateModel_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ShortRateModel" "', argument " "1"" of type '" "boost::shared_ptr< ShortRateModel > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< ShortRateModel > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ShortRateModel_params) {
  {
    boost::shared_ptr< ShortRateModel > *arg1 = (boost::shared_ptr< ShortRateModel > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Array result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ShortRateModel_params(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_ShortRateModel_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShortRateModel_params" "', argument " "1"" of type '" "boost::shared_ptr< ShortRateModel > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< ShortRateModel > * >(argp1);
    {
      try {
        result = (*arg1)->params();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Array(static_cast< const Array& >(result))), SWIGTYPE_p_Array, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ShortRateModel_calibrate__SWIG_0) {
  {
    boost::shared_ptr< ShortRateModel > *arg1 = (boost::shared_ptr< ShortRateModel > *) 0 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > *arg2 = 0 ;
    OptimizationMethod *arg3 = 0 ;
    EndCriteria *arg4 = 0 ;
    Constraint *arg5 = 0 ;
    std::vector< Real > *arg6 = 0 ;
    std::vector< bool > *arg7 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > temp2 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > *v2 ;
    void *argp3 = 0 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    std::vector< double > temp6 ;
    std::vector< double > *v6 ;
    std::vector< bool > temp7 ;
    std::vector< bool > *v7 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: ShortRateModel_calibrate(self,std::vector< boost::shared_ptr< CalibrationHelper > > const &,OptimizationMethod &,EndCriteria const &,constraint,weights,fixParameters);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_ShortRateModel_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShortRateModel_calibrate" "', argument " "1"" of type '" "boost::shared_ptr< ShortRateModel > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< ShortRateModel > * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CalibrationHelper_t_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of ShortRateModel_calibrate. "
          "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CalibrationHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CalibrationHelper_t,0) != -1) {
            temp2.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 2 of "
              "ShortRateModel_calibrate. "
              "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of ShortRateModel_calibrate. "
          "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_OptimizationMethod,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ShortRateModel_calibrate" "', argument " "3"" of type '" "OptimizationMethod &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ShortRateModel_calibrate" "', argument " "3"" of type '" "OptimizationMethod &""'"); 
    }
    arg3 = reinterpret_cast< OptimizationMethod * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_EndCriteria,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ShortRateModel_calibrate" "', argument " "4"" of type '" "EndCriteria const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ShortRateModel_calibrate" "', argument " "4"" of type '" "EndCriteria const &""'"); 
    }
    arg4 = reinterpret_cast< EndCriteria * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Constraint,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "ShortRateModel_calibrate" "', argument " "5"" of type '" "Constraint const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ShortRateModel_calibrate" "', argument " "5"" of type '" "Constraint const &""'"); 
    }
    arg5 = reinterpret_cast< Constraint * >(argp5);
    {
      if (SWIG_ConvertPtr(ST(5),(void **) &v6, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg6 = v6;
      } else if (SvROK(ST(5))) {
        AV *av = (AV *)SvRV(ST(5));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 6 of ShortRateModel_calibrate. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp6.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 6 of "
              "ShortRateModel_calibrate. "
              "Expected an array of ""double");
          }
        }
        arg6 = &temp6;
      } else {
        SWIG_croak("Type error in argument 6 of ShortRateModel_calibrate. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(6),(void **) &v7, 
          SWIGTYPE_p_std__vectorT_bool_t,1) != -1) {
        arg7 = v7;
      } else if (SvROK(ST(6))) {
        AV *av = (AV *)SvRV(ST(6));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 7 of ShortRateModel_calibrate. "
          "Expected an array of ""bool");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvIOK(*tv)) {
            temp7.push_back((bool)SvIVX(*tv));
          } else {
            SWIG_croak("Type error in argument 7 of "
              "ShortRateModel_calibrate. "
              "Expected an array of ""bool");
          }
        }
        arg7 = &temp7;
      } else {
        SWIG_croak("Type error in argument 7 of ShortRateModel_calibrate. "
          "Expected an array of ""bool");
      }
    }
    {
      try {
        (*arg1)->calibrate((std::vector< boost::shared_ptr< CalibrationHelper > > const &)*arg2,*arg3,(EndCriteria const &)*arg4,(Constraint const &)*arg5,(std::vector< Real > const &)*arg6,(std::vector< bool > const &)*arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_ShortRateModel_calibrate__SWIG_1) {
  {
    boost::shared_ptr< ShortRateModel > *arg1 = (boost::shared_ptr< ShortRateModel > *) 0 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > *arg2 = 0 ;
    OptimizationMethod *arg3 = 0 ;
    EndCriteria *arg4 = 0 ;
    Constraint *arg5 = 0 ;
    std::vector< Real > *arg6 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > temp2 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > *v2 ;
    void *argp3 = 0 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    std::vector< double > temp6 ;
    std::vector< double > *v6 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: ShortRateModel_calibrate(self,std::vector< boost::shared_ptr< CalibrationHelper > > const &,OptimizationMethod &,EndCriteria const &,constraint,weights);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_ShortRateModel_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShortRateModel_calibrate" "', argument " "1"" of type '" "boost::shared_ptr< ShortRateModel > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< ShortRateModel > * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CalibrationHelper_t_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of ShortRateModel_calibrate. "
          "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CalibrationHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CalibrationHelper_t,0) != -1) {
            temp2.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 2 of "
              "ShortRateModel_calibrate. "
              "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of ShortRateModel_calibrate. "
          "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_OptimizationMethod,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ShortRateModel_calibrate" "', argument " "3"" of type '" "OptimizationMethod &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ShortRateModel_calibrate" "', argument " "3"" of type '" "OptimizationMethod &""'"); 
    }
    arg3 = reinterpret_cast< OptimizationMethod * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_EndCriteria,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ShortRateModel_calibrate" "', argument " "4"" of type '" "EndCriteria const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ShortRateModel_calibrate" "', argument " "4"" of type '" "EndCriteria const &""'"); 
    }
    arg4 = reinterpret_cast< EndCriteria * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Constraint,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "ShortRateModel_calibrate" "', argument " "5"" of type '" "Constraint const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ShortRateModel_calibrate" "', argument " "5"" of type '" "Constraint const &""'"); 
    }
    arg5 = reinterpret_cast< Constraint * >(argp5);
    {
      if (SWIG_ConvertPtr(ST(5),(void **) &v6, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg6 = v6;
      } else if (SvROK(ST(5))) {
        AV *av = (AV *)SvRV(ST(5));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 6 of ShortRateModel_calibrate. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp6.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 6 of "
              "ShortRateModel_calibrate. "
              "Expected an array of ""double");
          }
        }
        arg6 = &temp6;
      } else {
        SWIG_croak("Type error in argument 6 of ShortRateModel_calibrate. "
          "Expected an array of ""double");
      }
    }
    {
      try {
        (*arg1)->calibrate((std::vector< boost::shared_ptr< CalibrationHelper > > const &)*arg2,*arg3,(EndCriteria const &)*arg4,(Constraint const &)*arg5,(std::vector< Real > const &)*arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_ShortRateModel_calibrate__SWIG_2) {
  {
    boost::shared_ptr< ShortRateModel > *arg1 = (boost::shared_ptr< ShortRateModel > *) 0 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > *arg2 = 0 ;
    OptimizationMethod *arg3 = 0 ;
    EndCriteria *arg4 = 0 ;
    Constraint *arg5 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > temp2 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > *v2 ;
    void *argp3 = 0 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: ShortRateModel_calibrate(self,std::vector< boost::shared_ptr< CalibrationHelper > > const &,OptimizationMethod &,EndCriteria const &,constraint);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_ShortRateModel_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShortRateModel_calibrate" "', argument " "1"" of type '" "boost::shared_ptr< ShortRateModel > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< ShortRateModel > * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CalibrationHelper_t_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of ShortRateModel_calibrate. "
          "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CalibrationHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CalibrationHelper_t,0) != -1) {
            temp2.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 2 of "
              "ShortRateModel_calibrate. "
              "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of ShortRateModel_calibrate. "
          "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_OptimizationMethod,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ShortRateModel_calibrate" "', argument " "3"" of type '" "OptimizationMethod &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ShortRateModel_calibrate" "', argument " "3"" of type '" "OptimizationMethod &""'"); 
    }
    arg3 = reinterpret_cast< OptimizationMethod * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_EndCriteria,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ShortRateModel_calibrate" "', argument " "4"" of type '" "EndCriteria const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ShortRateModel_calibrate" "', argument " "4"" of type '" "EndCriteria const &""'"); 
    }
    arg4 = reinterpret_cast< EndCriteria * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Constraint,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "ShortRateModel_calibrate" "', argument " "5"" of type '" "Constraint const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ShortRateModel_calibrate" "', argument " "5"" of type '" "Constraint const &""'"); 
    }
    arg5 = reinterpret_cast< Constraint * >(argp5);
    {
      try {
        (*arg1)->calibrate((std::vector< boost::shared_ptr< CalibrationHelper > > const &)*arg2,*arg3,(EndCriteria const &)*arg4,(Constraint const &)*arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_ShortRateModel_calibrate__SWIG_3) {
  {
    boost::shared_ptr< ShortRateModel > *arg1 = (boost::shared_ptr< ShortRateModel > *) 0 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > *arg2 = 0 ;
    OptimizationMethod *arg3 = 0 ;
    EndCriteria *arg4 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > temp2 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > *v2 ;
    void *argp3 = 0 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: ShortRateModel_calibrate(self,std::vector< boost::shared_ptr< CalibrationHelper > > const &,OptimizationMethod &,EndCriteria const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_ShortRateModel_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShortRateModel_calibrate" "', argument " "1"" of type '" "boost::shared_ptr< ShortRateModel > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< ShortRateModel > * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CalibrationHelper_t_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of ShortRateModel_calibrate. "
          "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CalibrationHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CalibrationHelper_t,0) != -1) {
            temp2.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 2 of "
              "ShortRateModel_calibrate. "
              "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of ShortRateModel_calibrate. "
          "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_OptimizationMethod,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ShortRateModel_calibrate" "', argument " "3"" of type '" "OptimizationMethod &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ShortRateModel_calibrate" "', argument " "3"" of type '" "OptimizationMethod &""'"); 
    }
    arg3 = reinterpret_cast< OptimizationMethod * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_EndCriteria,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ShortRateModel_calibrate" "', argument " "4"" of type '" "EndCriteria const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ShortRateModel_calibrate" "', argument " "4"" of type '" "EndCriteria const &""'"); 
    }
    arg4 = reinterpret_cast< EndCriteria * >(argp4);
    {
      try {
        (*arg1)->calibrate((std::vector< boost::shared_ptr< CalibrationHelper > > const &)*arg2,*arg3,(EndCriteria const &)*arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_ShortRateModel_calibrate) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_ShortRateModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< CalibrationHelper > >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CalibrationHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< CalibrationHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_CalibrationHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_OptimizationMethod, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_EndCriteria, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_ShortRateModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< CalibrationHelper > >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CalibrationHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< CalibrationHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_CalibrationHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_OptimizationMethod, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_EndCriteria, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Constraint, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_ShortRateModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< CalibrationHelper > >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CalibrationHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< CalibrationHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_CalibrationHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_OptimizationMethod, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_EndCriteria, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Constraint, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(5),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(5))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(5));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_ShortRateModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< CalibrationHelper > >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CalibrationHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< CalibrationHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_CalibrationHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_OptimizationMethod, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_EndCriteria, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Constraint, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(5),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(5))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(5));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< bool >* v;
            if (SWIG_ConvertPtr(ST(6),(void **) &v, 
                SWIGTYPE_p_std__vectorT_bool_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(6))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(6));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_ShortRateModel_calibrate__SWIG_3); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_ShortRateModel_calibrate__SWIG_2); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_ShortRateModel_calibrate__SWIG_1); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_ShortRateModel_calibrate__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'ShortRateModel_calibrate'");
  XSRETURN(0);
}


XS(_wrap_ShortRateModel_value) {
  {
    boost::shared_ptr< ShortRateModel > *arg1 = (boost::shared_ptr< ShortRateModel > *) 0 ;
    Array *arg2 = 0 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > *arg3 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > temp3 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > *v3 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: ShortRateModel_value(self,params,std::vector< boost::shared_ptr< CalibrationHelper > > const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_ShortRateModel_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShortRateModel_value" "', argument " "1"" of type '" "boost::shared_ptr< ShortRateModel > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< ShortRateModel > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ShortRateModel_value" "', argument " "2"" of type '" "Array const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ShortRateModel_value" "', argument " "2"" of type '" "Array const &""'"); 
    }
    arg2 = reinterpret_cast< Array * >(argp2);
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CalibrationHelper_t_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of ShortRateModel_value. "
          "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CalibrationHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CalibrationHelper_t,0) != -1) {
            temp3.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 3 of "
              "ShortRateModel_value. "
              "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of ShortRateModel_value. "
          "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
      }
    }
    {
      try {
        result = (Real)(*arg1)->value((Array const &)*arg2,(std::vector< boost::shared_ptr< CalibrationHelper > > const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_ShortRateModel_endCriteria) {
  {
    boost::shared_ptr< ShortRateModel > *arg1 = (boost::shared_ptr< ShortRateModel > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    EndCriteria::Type result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ShortRateModel_endCriteria(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_ShortRateModel_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShortRateModel_endCriteria" "', argument " "1"" of type '" "boost::shared_ptr< ShortRateModel > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< ShortRateModel > * >(argp1);
    {
      try {
        result = (EndCriteria::Type)(*arg1)->endCriteria();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ShortRateModel_setParams) {
  {
    boost::shared_ptr< ShortRateModel > *arg1 = (boost::shared_ptr< ShortRateModel > *) 0 ;
    Array *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: ShortRateModel_setParams(self,params);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_ShortRateModel_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShortRateModel_setParams" "', argument " "1"" of type '" "boost::shared_ptr< ShortRateModel > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< ShortRateModel > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ShortRateModel_setParams" "', argument " "2"" of type '" "Array const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ShortRateModel_setParams" "', argument " "2"" of type '" "Array const &""'"); 
    }
    arg2 = reinterpret_cast< Array * >(argp2);
    {
      try {
        (*arg1)->setParams((Array const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ShortRateModelHandle__SWIG_0) {
  {
    boost::shared_ptr< ShortRateModel > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Handle< ShortRateModel > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_ShortRateModelHandle(boost::shared_ptr< ShortRateModel > const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_ShortRateModel_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ShortRateModelHandle" "', argument " "1"" of type '" "boost::shared_ptr< ShortRateModel > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ShortRateModelHandle" "', argument " "1"" of type '" "boost::shared_ptr< ShortRateModel > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< ShortRateModel > * >(argp1);
    {
      try {
        result = (Handle< ShortRateModel > *)new Handle< ShortRateModel >((boost::shared_ptr< ShortRateModel > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_HandleT_ShortRateModel_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ShortRateModelHandle__SWIG_1) {
  {
    int argvi = 0;
    Handle< ShortRateModel > *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_ShortRateModelHandle();");
    }
    {
      try {
        result = (Handle< ShortRateModel > *)new Handle< ShortRateModel >();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_HandleT_ShortRateModel_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_ShortRateModelHandle) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_ShortRateModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ShortRateModelHandle__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ShortRateModelHandle__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_ShortRateModelHandle'");
  XSRETURN(0);
}


XS(_wrap_ShortRateModelHandle___deref__) {
  {
    Handle< ShortRateModel > *arg1 = (Handle< ShortRateModel > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    boost::shared_ptr< ShortRateModel > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ShortRateModelHandle___deref__(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_ShortRateModel_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShortRateModelHandle___deref__" "', argument " "1"" of type '" "Handle< ShortRateModel > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< ShortRateModel > * >(argp1);
    {
      try {
        result = (arg1)->operator ->();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new boost::shared_ptr< ShortRateModel >(static_cast< const boost::shared_ptr< ShortRateModel >& >(result))), SWIGTYPE_p_boost__shared_ptrT_ShortRateModel_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ShortRateModelHandle_empty) {
  {
    Handle< ShortRateModel > *arg1 = (Handle< ShortRateModel > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ShortRateModelHandle_empty(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_ShortRateModel_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShortRateModelHandle_empty" "', argument " "1"" of type '" "Handle< ShortRateModel > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< ShortRateModel > * >(argp1);
    {
      try {
        result = (bool)(arg1)->empty();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ShortRateModelHandle_asObservable) {
  {
    Handle< ShortRateModel > *arg1 = (Handle< ShortRateModel > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    boost::shared_ptr< Observable > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ShortRateModelHandle_asObservable(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_ShortRateModel_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShortRateModelHandle_asObservable" "', argument " "1"" of type '" "Handle< ShortRateModel > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< ShortRateModel > * >(argp1);
    {
      try {
        result = Handle_Sl_ShortRateModel_Sg__asObservable(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new boost::shared_ptr< Observable >(static_cast< const boost::shared_ptr< Observable >& >(result))), SWIGTYPE_p_boost__shared_ptrT_Observable_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_ShortRateModelHandle) {
  {
    Handle< ShortRateModel > *arg1 = (Handle< ShortRateModel > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_ShortRateModelHandle(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_ShortRateModel_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ShortRateModelHandle" "', argument " "1"" of type '" "Handle< ShortRateModel > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< ShortRateModel > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ShortRateModelHandle_params) {
  {
    Handle< ShortRateModel > *arg1 = (Handle< ShortRateModel > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Array result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ShortRateModelHandle_params(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_ShortRateModel_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShortRateModelHandle_params" "', argument " "1"" of type '" "Handle< ShortRateModel > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< ShortRateModel > * >(argp1);
    {
      try {
        result = (*arg1)->params();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Array(static_cast< const Array& >(result))), SWIGTYPE_p_Array, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ShortRateModelHandle_calibrate__SWIG_0) {
  {
    Handle< ShortRateModel > *arg1 = (Handle< ShortRateModel > *) 0 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > *arg2 = 0 ;
    OptimizationMethod *arg3 = 0 ;
    EndCriteria *arg4 = 0 ;
    Constraint *arg5 = 0 ;
    std::vector< Real > *arg6 = 0 ;
    std::vector< bool > *arg7 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > temp2 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > *v2 ;
    void *argp3 = 0 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    std::vector< double > temp6 ;
    std::vector< double > *v6 ;
    std::vector< bool > temp7 ;
    std::vector< bool > *v7 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: ShortRateModelHandle_calibrate(self,std::vector< boost::shared_ptr< CalibrationHelper > > const &,OptimizationMethod &,EndCriteria const &,constraint,weights,fixParameters);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_ShortRateModel_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShortRateModelHandle_calibrate" "', argument " "1"" of type '" "Handle< ShortRateModel > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< ShortRateModel > * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CalibrationHelper_t_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of ShortRateModelHandle_calibrate. "
          "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CalibrationHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CalibrationHelper_t,0) != -1) {
            temp2.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 2 of "
              "ShortRateModelHandle_calibrate. "
              "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of ShortRateModelHandle_calibrate. "
          "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_OptimizationMethod,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ShortRateModelHandle_calibrate" "', argument " "3"" of type '" "OptimizationMethod &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ShortRateModelHandle_calibrate" "', argument " "3"" of type '" "OptimizationMethod &""'"); 
    }
    arg3 = reinterpret_cast< OptimizationMethod * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_EndCriteria,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ShortRateModelHandle_calibrate" "', argument " "4"" of type '" "EndCriteria const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ShortRateModelHandle_calibrate" "', argument " "4"" of type '" "EndCriteria const &""'"); 
    }
    arg4 = reinterpret_cast< EndCriteria * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Constraint,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "ShortRateModelHandle_calibrate" "', argument " "5"" of type '" "Constraint const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ShortRateModelHandle_calibrate" "', argument " "5"" of type '" "Constraint const &""'"); 
    }
    arg5 = reinterpret_cast< Constraint * >(argp5);
    {
      if (SWIG_ConvertPtr(ST(5),(void **) &v6, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg6 = v6;
      } else if (SvROK(ST(5))) {
        AV *av = (AV *)SvRV(ST(5));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 6 of ShortRateModelHandle_calibrate. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp6.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 6 of "
              "ShortRateModelHandle_calibrate. "
              "Expected an array of ""double");
          }
        }
        arg6 = &temp6;
      } else {
        SWIG_croak("Type error in argument 6 of ShortRateModelHandle_calibrate. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(6),(void **) &v7, 
          SWIGTYPE_p_std__vectorT_bool_t,1) != -1) {
        arg7 = v7;
      } else if (SvROK(ST(6))) {
        AV *av = (AV *)SvRV(ST(6));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 7 of ShortRateModelHandle_calibrate. "
          "Expected an array of ""bool");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvIOK(*tv)) {
            temp7.push_back((bool)SvIVX(*tv));
          } else {
            SWIG_croak("Type error in argument 7 of "
              "ShortRateModelHandle_calibrate. "
              "Expected an array of ""bool");
          }
        }
        arg7 = &temp7;
      } else {
        SWIG_croak("Type error in argument 7 of ShortRateModelHandle_calibrate. "
          "Expected an array of ""bool");
      }
    }
    {
      try {
        (*arg1)->calibrate((std::vector< boost::shared_ptr< CalibrationHelper > > const &)*arg2,*arg3,(EndCriteria const &)*arg4,(Constraint const &)*arg5,(std::vector< Real > const &)*arg6,(std::vector< bool > const &)*arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_ShortRateModelHandle_calibrate__SWIG_1) {
  {
    Handle< ShortRateModel > *arg1 = (Handle< ShortRateModel > *) 0 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > *arg2 = 0 ;
    OptimizationMethod *arg3 = 0 ;
    EndCriteria *arg4 = 0 ;
    Constraint *arg5 = 0 ;
    std::vector< Real > *arg6 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > temp2 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > *v2 ;
    void *argp3 = 0 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    std::vector< double > temp6 ;
    std::vector< double > *v6 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: ShortRateModelHandle_calibrate(self,std::vector< boost::shared_ptr< CalibrationHelper > > const &,OptimizationMethod &,EndCriteria const &,constraint,weights);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_ShortRateModel_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShortRateModelHandle_calibrate" "', argument " "1"" of type '" "Handle< ShortRateModel > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< ShortRateModel > * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CalibrationHelper_t_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of ShortRateModelHandle_calibrate. "
          "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CalibrationHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CalibrationHelper_t,0) != -1) {
            temp2.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 2 of "
              "ShortRateModelHandle_calibrate. "
              "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of ShortRateModelHandle_calibrate. "
          "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_OptimizationMethod,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ShortRateModelHandle_calibrate" "', argument " "3"" of type '" "OptimizationMethod &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ShortRateModelHandle_calibrate" "', argument " "3"" of type '" "OptimizationMethod &""'"); 
    }
    arg3 = reinterpret_cast< OptimizationMethod * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_EndCriteria,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ShortRateModelHandle_calibrate" "', argument " "4"" of type '" "EndCriteria const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ShortRateModelHandle_calibrate" "', argument " "4"" of type '" "EndCriteria const &""'"); 
    }
    arg4 = reinterpret_cast< EndCriteria * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Constraint,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "ShortRateModelHandle_calibrate" "', argument " "5"" of type '" "Constraint const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ShortRateModelHandle_calibrate" "', argument " "5"" of type '" "Constraint const &""'"); 
    }
    arg5 = reinterpret_cast< Constraint * >(argp5);
    {
      if (SWIG_ConvertPtr(ST(5),(void **) &v6, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg6 = v6;
      } else if (SvROK(ST(5))) {
        AV *av = (AV *)SvRV(ST(5));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 6 of ShortRateModelHandle_calibrate. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp6.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 6 of "
              "ShortRateModelHandle_calibrate. "
              "Expected an array of ""double");
          }
        }
        arg6 = &temp6;
      } else {
        SWIG_croak("Type error in argument 6 of ShortRateModelHandle_calibrate. "
          "Expected an array of ""double");
      }
    }
    {
      try {
        (*arg1)->calibrate((std::vector< boost::shared_ptr< CalibrationHelper > > const &)*arg2,*arg3,(EndCriteria const &)*arg4,(Constraint const &)*arg5,(std::vector< Real > const &)*arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_ShortRateModelHandle_calibrate__SWIG_2) {
  {
    Handle< ShortRateModel > *arg1 = (Handle< ShortRateModel > *) 0 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > *arg2 = 0 ;
    OptimizationMethod *arg3 = 0 ;
    EndCriteria *arg4 = 0 ;
    Constraint *arg5 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > temp2 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > *v2 ;
    void *argp3 = 0 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: ShortRateModelHandle_calibrate(self,std::vector< boost::shared_ptr< CalibrationHelper > > const &,OptimizationMethod &,EndCriteria const &,constraint);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_ShortRateModel_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShortRateModelHandle_calibrate" "', argument " "1"" of type '" "Handle< ShortRateModel > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< ShortRateModel > * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CalibrationHelper_t_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of ShortRateModelHandle_calibrate. "
          "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CalibrationHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CalibrationHelper_t,0) != -1) {
            temp2.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 2 of "
              "ShortRateModelHandle_calibrate. "
              "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of ShortRateModelHandle_calibrate. "
          "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_OptimizationMethod,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ShortRateModelHandle_calibrate" "', argument " "3"" of type '" "OptimizationMethod &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ShortRateModelHandle_calibrate" "', argument " "3"" of type '" "OptimizationMethod &""'"); 
    }
    arg3 = reinterpret_cast< OptimizationMethod * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_EndCriteria,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ShortRateModelHandle_calibrate" "', argument " "4"" of type '" "EndCriteria const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ShortRateModelHandle_calibrate" "', argument " "4"" of type '" "EndCriteria const &""'"); 
    }
    arg4 = reinterpret_cast< EndCriteria * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Constraint,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "ShortRateModelHandle_calibrate" "', argument " "5"" of type '" "Constraint const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ShortRateModelHandle_calibrate" "', argument " "5"" of type '" "Constraint const &""'"); 
    }
    arg5 = reinterpret_cast< Constraint * >(argp5);
    {
      try {
        (*arg1)->calibrate((std::vector< boost::shared_ptr< CalibrationHelper > > const &)*arg2,*arg3,(EndCriteria const &)*arg4,(Constraint const &)*arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_ShortRateModelHandle_calibrate__SWIG_3) {
  {
    Handle< ShortRateModel > *arg1 = (Handle< ShortRateModel > *) 0 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > *arg2 = 0 ;
    OptimizationMethod *arg3 = 0 ;
    EndCriteria *arg4 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > temp2 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > *v2 ;
    void *argp3 = 0 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: ShortRateModelHandle_calibrate(self,std::vector< boost::shared_ptr< CalibrationHelper > > const &,OptimizationMethod &,EndCriteria const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_ShortRateModel_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShortRateModelHandle_calibrate" "', argument " "1"" of type '" "Handle< ShortRateModel > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< ShortRateModel > * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CalibrationHelper_t_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of ShortRateModelHandle_calibrate. "
          "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CalibrationHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CalibrationHelper_t,0) != -1) {
            temp2.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 2 of "
              "ShortRateModelHandle_calibrate. "
              "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of ShortRateModelHandle_calibrate. "
          "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_OptimizationMethod,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ShortRateModelHandle_calibrate" "', argument " "3"" of type '" "OptimizationMethod &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ShortRateModelHandle_calibrate" "', argument " "3"" of type '" "OptimizationMethod &""'"); 
    }
    arg3 = reinterpret_cast< OptimizationMethod * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_EndCriteria,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ShortRateModelHandle_calibrate" "', argument " "4"" of type '" "EndCriteria const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ShortRateModelHandle_calibrate" "', argument " "4"" of type '" "EndCriteria const &""'"); 
    }
    arg4 = reinterpret_cast< EndCriteria * >(argp4);
    {
      try {
        (*arg1)->calibrate((std::vector< boost::shared_ptr< CalibrationHelper > > const &)*arg2,*arg3,(EndCriteria const &)*arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_ShortRateModelHandle_calibrate) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_ShortRateModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< CalibrationHelper > >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CalibrationHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< CalibrationHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_CalibrationHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_OptimizationMethod, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_EndCriteria, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_ShortRateModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< CalibrationHelper > >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CalibrationHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< CalibrationHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_CalibrationHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_OptimizationMethod, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_EndCriteria, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Constraint, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_ShortRateModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< CalibrationHelper > >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CalibrationHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< CalibrationHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_CalibrationHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_OptimizationMethod, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_EndCriteria, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Constraint, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(5),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(5))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(5));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_ShortRateModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< CalibrationHelper > >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CalibrationHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< CalibrationHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_CalibrationHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_OptimizationMethod, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_EndCriteria, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Constraint, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(5),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(5))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(5));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< bool >* v;
            if (SWIG_ConvertPtr(ST(6),(void **) &v, 
                SWIGTYPE_p_std__vectorT_bool_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(6))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(6));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_ShortRateModelHandle_calibrate__SWIG_3); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_ShortRateModelHandle_calibrate__SWIG_2); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_ShortRateModelHandle_calibrate__SWIG_1); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_ShortRateModelHandle_calibrate__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'ShortRateModelHandle_calibrate'");
  XSRETURN(0);
}


XS(_wrap_ShortRateModelHandle_value) {
  {
    Handle< ShortRateModel > *arg1 = (Handle< ShortRateModel > *) 0 ;
    Array *arg2 = 0 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > *arg3 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > temp3 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > *v3 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: ShortRateModelHandle_value(self,params,std::vector< boost::shared_ptr< CalibrationHelper > > const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_ShortRateModel_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShortRateModelHandle_value" "', argument " "1"" of type '" "Handle< ShortRateModel > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< ShortRateModel > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ShortRateModelHandle_value" "', argument " "2"" of type '" "Array const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ShortRateModelHandle_value" "', argument " "2"" of type '" "Array const &""'"); 
    }
    arg2 = reinterpret_cast< Array * >(argp2);
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CalibrationHelper_t_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of ShortRateModelHandle_value. "
          "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CalibrationHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CalibrationHelper_t,0) != -1) {
            temp3.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 3 of "
              "ShortRateModelHandle_value. "
              "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of ShortRateModelHandle_value. "
          "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
      }
    }
    {
      try {
        result = (Real)(*arg1)->value((Array const &)*arg2,(std::vector< boost::shared_ptr< CalibrationHelper > > const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_ShortRateModelHandle_endCriteria) {
  {
    Handle< ShortRateModel > *arg1 = (Handle< ShortRateModel > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    EndCriteria::Type result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ShortRateModelHandle_endCriteria(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_ShortRateModel_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShortRateModelHandle_endCriteria" "', argument " "1"" of type '" "Handle< ShortRateModel > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< ShortRateModel > * >(argp1);
    {
      try {
        result = (EndCriteria::Type)(*arg1)->endCriteria();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ShortRateModelHandle_setParams) {
  {
    Handle< ShortRateModel > *arg1 = (Handle< ShortRateModel > *) 0 ;
    Array *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: ShortRateModelHandle_setParams(self,params);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_ShortRateModel_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ShortRateModelHandle_setParams" "', argument " "1"" of type '" "Handle< ShortRateModel > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< ShortRateModel > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ShortRateModelHandle_setParams" "', argument " "2"" of type '" "Array const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ShortRateModelHandle_setParams" "', argument " "2"" of type '" "Array const &""'"); 
    }
    arg2 = reinterpret_cast< Array * >(argp2);
    {
      try {
        (*arg1)->setParams((Array const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_RelinkableShortRateModelHandle__SWIG_0) {
  {
    boost::shared_ptr< ShortRateModel > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    RelinkableHandle< ShortRateModel > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_RelinkableShortRateModelHandle(boost::shared_ptr< ShortRateModel > const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_ShortRateModel_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_RelinkableShortRateModelHandle" "', argument " "1"" of type '" "boost::shared_ptr< ShortRateModel > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_RelinkableShortRateModelHandle" "', argument " "1"" of type '" "boost::shared_ptr< ShortRateModel > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< ShortRateModel > * >(argp1);
    {
      try {
        result = (RelinkableHandle< ShortRateModel > *)new RelinkableHandle< ShortRateModel >((boost::shared_ptr< ShortRateModel > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_RelinkableHandleT_ShortRateModel_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_RelinkableShortRateModelHandle__SWIG_1) {
  {
    int argvi = 0;
    RelinkableHandle< ShortRateModel > *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_RelinkableShortRateModelHandle();");
    }
    {
      try {
        result = (RelinkableHandle< ShortRateModel > *)new RelinkableHandle< ShortRateModel >();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_RelinkableHandleT_ShortRateModel_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_RelinkableShortRateModelHandle) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_ShortRateModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_RelinkableShortRateModelHandle__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_RelinkableShortRateModelHandle__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_RelinkableShortRateModelHandle'");
  XSRETURN(0);
}


XS(_wrap_RelinkableShortRateModelHandle_linkTo) {
  {
    RelinkableHandle< ShortRateModel > *arg1 = (RelinkableHandle< ShortRateModel > *) 0 ;
    boost::shared_ptr< ShortRateModel > *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: RelinkableShortRateModelHandle_linkTo(self,boost::shared_ptr< ShortRateModel > const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_RelinkableHandleT_ShortRateModel_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RelinkableShortRateModelHandle_linkTo" "', argument " "1"" of type '" "RelinkableHandle< ShortRateModel > *""'"); 
    }
    arg1 = reinterpret_cast< RelinkableHandle< ShortRateModel > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_boost__shared_ptrT_ShortRateModel_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "RelinkableShortRateModelHandle_linkTo" "', argument " "2"" of type '" "boost::shared_ptr< ShortRateModel > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "RelinkableShortRateModelHandle_linkTo" "', argument " "2"" of type '" "boost::shared_ptr< ShortRateModel > const &""'"); 
    }
    arg2 = reinterpret_cast< boost::shared_ptr< ShortRateModel > * >(argp2);
    {
      try {
        (arg1)->linkTo((boost::shared_ptr< ShortRateModel > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_RelinkableShortRateModelHandle) {
  {
    RelinkableHandle< ShortRateModel > *arg1 = (RelinkableHandle< ShortRateModel > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_RelinkableShortRateModelHandle(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_RelinkableHandleT_ShortRateModel_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_RelinkableShortRateModelHandle" "', argument " "1"" of type '" "RelinkableHandle< ShortRateModel > *""'"); 
    }
    arg1 = reinterpret_cast< RelinkableHandle< ShortRateModel > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Vasicek__SWIG_0) {
  {
    Rate arg1 ;
    Real arg2 ;
    Real arg3 ;
    Real arg4 ;
    Real arg5 ;
    double val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    double val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    VasicekPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_Vasicek(r0,a,b,sigma,lambda);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vasicek" "', argument " "1"" of type '" "Rate""'");
    } 
    arg1 = static_cast< Rate >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vasicek" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Vasicek" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_Vasicek" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_Vasicek" "', argument " "5"" of type '" "Real""'");
    } 
    arg5 = static_cast< Real >(val5);
    {
      try {
        result = (VasicekPtr *)new_VasicekPtr__SWIG_0(arg1,arg2,arg3,arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VasicekPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Vasicek__SWIG_1) {
  {
    Rate arg1 ;
    Real arg2 ;
    Real arg3 ;
    Real arg4 ;
    double val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    VasicekPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_Vasicek(r0,a,b,sigma);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vasicek" "', argument " "1"" of type '" "Rate""'");
    } 
    arg1 = static_cast< Rate >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vasicek" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Vasicek" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_Vasicek" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    {
      try {
        result = (VasicekPtr *)new_VasicekPtr__SWIG_0(arg1,arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VasicekPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Vasicek__SWIG_2) {
  {
    Rate arg1 ;
    Real arg2 ;
    Real arg3 ;
    double val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    VasicekPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_Vasicek(r0,a,b);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vasicek" "', argument " "1"" of type '" "Rate""'");
    } 
    arg1 = static_cast< Rate >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vasicek" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Vasicek" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    {
      try {
        result = (VasicekPtr *)new_VasicekPtr__SWIG_0(arg1,arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VasicekPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Vasicek__SWIG_3) {
  {
    Rate arg1 ;
    Real arg2 ;
    double val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    VasicekPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_Vasicek(r0,a);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vasicek" "', argument " "1"" of type '" "Rate""'");
    } 
    arg1 = static_cast< Rate >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Vasicek" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (VasicekPtr *)new_VasicekPtr__SWIG_0(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VasicekPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Vasicek__SWIG_4) {
  {
    Rate arg1 ;
    double val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    VasicekPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Vasicek(r0);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Vasicek" "', argument " "1"" of type '" "Rate""'");
    } 
    arg1 = static_cast< Rate >(val1);
    {
      try {
        result = (VasicekPtr *)new_VasicekPtr__SWIG_0(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VasicekPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Vasicek__SWIG_5) {
  {
    int argvi = 0;
    VasicekPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Vasicek();");
    }
    {
      try {
        result = (VasicekPtr *)new_VasicekPtr__SWIG_0();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VasicekPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_Vasicek) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Vasicek__SWIG_5); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Vasicek__SWIG_4); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Vasicek__SWIG_3); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Vasicek__SWIG_2); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Vasicek__SWIG_1); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Vasicek__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Vasicek'");
  XSRETURN(0);
}


XS(_wrap_Vasicek_discount) {
  {
    VasicekPtr *arg1 = (VasicekPtr *) 0 ;
    Time arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    DiscountFactor result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Vasicek_discount(self,t);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_VasicekPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vasicek_discount" "', argument " "1"" of type '" "VasicekPtr const *""'"); 
    }
    arg1 = reinterpret_cast< VasicekPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vasicek_discount" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    {
      try {
        result = (DiscountFactor)VasicekPtr_discount((VasicekPtr const *)arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Vasicek_discountBond) {
  {
    VasicekPtr *arg1 = (VasicekPtr *) 0 ;
    Time arg2 ;
    Time arg3 ;
    Rate arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: Vasicek_discountBond(self,now,maturity,rate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_VasicekPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Vasicek_discountBond" "', argument " "1"" of type '" "VasicekPtr const *""'"); 
    }
    arg1 = reinterpret_cast< VasicekPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Vasicek_discountBond" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Vasicek_discountBond" "', argument " "3"" of type '" "Time""'");
    } 
    arg3 = static_cast< Time >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Vasicek_discountBond" "', argument " "4"" of type '" "Rate""'");
    } 
    arg4 = static_cast< Rate >(val4);
    {
      try {
        result = (Real)VasicekPtr_discountBond((VasicekPtr const *)arg1,arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_Vasicek) {
  {
    VasicekPtr *arg1 = (VasicekPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Vasicek(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_VasicekPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Vasicek" "', argument " "1"" of type '" "VasicekPtr *""'"); 
    }
    arg1 = reinterpret_cast< VasicekPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_HullWhite__SWIG_0) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    Real arg2 ;
    Real arg3 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    HullWhitePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_HullWhite(termStructure,a,sigma);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_HullWhite" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_HullWhite" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_HullWhite" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_HullWhite" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    {
      try {
        result = (HullWhitePtr *)new_HullWhitePtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1,arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_HullWhitePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_HullWhite__SWIG_1) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    Real arg2 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    HullWhitePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_HullWhite(termStructure,a);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_HullWhite" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_HullWhite" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_HullWhite" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (HullWhitePtr *)new_HullWhitePtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_HullWhitePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_HullWhite__SWIG_2) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    HullWhitePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_HullWhite(termStructure);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_HullWhite" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_HullWhite" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    {
      try {
        result = (HullWhitePtr *)new_HullWhitePtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_HullWhitePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_HullWhite) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_HullWhite__SWIG_2); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_HullWhite__SWIG_1); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_HullWhite__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_HullWhite'");
  XSRETURN(0);
}


XS(_wrap_HullWhite_discount) {
  {
    HullWhitePtr *arg1 = (HullWhitePtr *) 0 ;
    Time arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    DiscountFactor result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: HullWhite_discount(self,t);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HullWhitePtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HullWhite_discount" "', argument " "1"" of type '" "HullWhitePtr const *""'"); 
    }
    arg1 = reinterpret_cast< HullWhitePtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HullWhite_discount" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    {
      try {
        result = (DiscountFactor)HullWhitePtr_discount((HullWhitePtr const *)arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_HullWhite_discountBond) {
  {
    HullWhitePtr *arg1 = (HullWhitePtr *) 0 ;
    Time arg2 ;
    Time arg3 ;
    Rate arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: HullWhite_discountBond(self,now,maturity,rate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HullWhitePtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HullWhite_discountBond" "', argument " "1"" of type '" "HullWhitePtr const *""'"); 
    }
    arg1 = reinterpret_cast< HullWhitePtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HullWhite_discountBond" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HullWhite_discountBond" "', argument " "3"" of type '" "Time""'");
    } 
    arg3 = static_cast< Time >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "HullWhite_discountBond" "', argument " "4"" of type '" "Rate""'");
    } 
    arg4 = static_cast< Rate >(val4);
    {
      try {
        result = (Real)HullWhitePtr_discountBond((HullWhitePtr const *)arg1,arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_HullWhite_convexityBias) {
  {
    Real arg1 ;
    Time arg2 ;
    Time arg3 ;
    Real arg4 ;
    Real arg5 ;
    double val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    double val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: HullWhite_convexityBias(futurePrice,t,T,sigma,a);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "HullWhite_convexityBias" "', argument " "1"" of type '" "Real""'");
    } 
    arg1 = static_cast< Real >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HullWhite_convexityBias" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HullWhite_convexityBias" "', argument " "3"" of type '" "Time""'");
    } 
    arg3 = static_cast< Time >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "HullWhite_convexityBias" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "HullWhite_convexityBias" "', argument " "5"" of type '" "Real""'");
    } 
    arg5 = static_cast< Real >(val5);
    {
      try {
        result = (Rate)HullWhitePtr_convexityBias(arg1,arg2,arg3,arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_HullWhite) {
  {
    HullWhitePtr *arg1 = (HullWhitePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_HullWhite(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HullWhitePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_HullWhite" "', argument " "1"" of type '" "HullWhitePtr *""'"); 
    }
    arg1 = reinterpret_cast< HullWhitePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BlackKarasinski__SWIG_0) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    Real arg2 ;
    Real arg3 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    BlackKarasinskiPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_BlackKarasinski(termStructure,a,sigma);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_BlackKarasinski" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BlackKarasinski" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_BlackKarasinski" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_BlackKarasinski" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    {
      try {
        result = (BlackKarasinskiPtr *)new_BlackKarasinskiPtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1,arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BlackKarasinskiPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BlackKarasinski__SWIG_1) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    Real arg2 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    BlackKarasinskiPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_BlackKarasinski(termStructure,a);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_BlackKarasinski" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BlackKarasinski" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_BlackKarasinski" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (BlackKarasinskiPtr *)new_BlackKarasinskiPtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BlackKarasinskiPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BlackKarasinski__SWIG_2) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    BlackKarasinskiPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_BlackKarasinski(termStructure);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_BlackKarasinski" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BlackKarasinski" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    {
      try {
        result = (BlackKarasinskiPtr *)new_BlackKarasinskiPtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BlackKarasinskiPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BlackKarasinski) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_BlackKarasinski__SWIG_2); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_BlackKarasinski__SWIG_1); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_BlackKarasinski__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_BlackKarasinski'");
  XSRETURN(0);
}


XS(_wrap_delete_BlackKarasinski) {
  {
    BlackKarasinskiPtr *arg1 = (BlackKarasinskiPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_BlackKarasinski(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BlackKarasinskiPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_BlackKarasinski" "', argument " "1"" of type '" "BlackKarasinskiPtr *""'"); 
    }
    arg1 = reinterpret_cast< BlackKarasinskiPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_G2__SWIG_0) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    Real arg2 ;
    Real arg3 ;
    Real arg4 ;
    Real arg5 ;
    Real arg6 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    double val5 ;
    int ecode5 = 0 ;
    double val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    G2Ptr *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_G2(termStructure,a,sigma,b,eta,rho);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_G2" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_G2" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_G2" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_G2" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_G2" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_G2" "', argument " "5"" of type '" "Real""'");
    } 
    arg5 = static_cast< Real >(val5);
    ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_G2" "', argument " "6"" of type '" "Real""'");
    } 
    arg6 = static_cast< Real >(val6);
    {
      try {
        result = (G2Ptr *)new_G2Ptr__SWIG_0((Handle< YieldTermStructure > const &)*arg1,arg2,arg3,arg4,arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_G2Ptr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_G2__SWIG_1) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    Real arg2 ;
    Real arg3 ;
    Real arg4 ;
    Real arg5 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    double val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    G2Ptr *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_G2(termStructure,a,sigma,b,eta);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_G2" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_G2" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_G2" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_G2" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_G2" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_G2" "', argument " "5"" of type '" "Real""'");
    } 
    arg5 = static_cast< Real >(val5);
    {
      try {
        result = (G2Ptr *)new_G2Ptr__SWIG_0((Handle< YieldTermStructure > const &)*arg1,arg2,arg3,arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_G2Ptr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_G2__SWIG_2) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    Real arg2 ;
    Real arg3 ;
    Real arg4 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    G2Ptr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_G2(termStructure,a,sigma,b);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_G2" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_G2" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_G2" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_G2" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_G2" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    {
      try {
        result = (G2Ptr *)new_G2Ptr__SWIG_0((Handle< YieldTermStructure > const &)*arg1,arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_G2Ptr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_G2__SWIG_3) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    Real arg2 ;
    Real arg3 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    G2Ptr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_G2(termStructure,a,sigma);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_G2" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_G2" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_G2" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_G2" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    {
      try {
        result = (G2Ptr *)new_G2Ptr__SWIG_0((Handle< YieldTermStructure > const &)*arg1,arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_G2Ptr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_G2__SWIG_4) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    Real arg2 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    G2Ptr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_G2(termStructure,a);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_G2" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_G2" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_G2" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (G2Ptr *)new_G2Ptr__SWIG_0((Handle< YieldTermStructure > const &)*arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_G2Ptr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_G2__SWIG_5) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    G2Ptr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_G2(termStructure);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_G2" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_G2" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    {
      try {
        result = (G2Ptr *)new_G2Ptr__SWIG_0((Handle< YieldTermStructure > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_G2Ptr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_G2) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_G2__SWIG_5); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_G2__SWIG_4); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_G2__SWIG_3); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_G2__SWIG_2); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_G2__SWIG_1); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_G2__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_G2'");
  XSRETURN(0);
}


XS(_wrap_G2_discount) {
  {
    G2Ptr *arg1 = (G2Ptr *) 0 ;
    Time arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    DiscountFactor result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: G2_discount(self,t);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_G2Ptr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "G2_discount" "', argument " "1"" of type '" "G2Ptr const *""'"); 
    }
    arg1 = reinterpret_cast< G2Ptr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "G2_discount" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    {
      try {
        result = (DiscountFactor)G2Ptr_discount((G2Ptr const *)arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_G2_discountBond) {
  {
    G2Ptr *arg1 = (G2Ptr *) 0 ;
    Time arg2 ;
    Time arg3 ;
    Rate arg4 ;
    Rate arg5 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    double val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: G2_discountBond(self,t,T,x,y);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_G2Ptr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "G2_discountBond" "', argument " "1"" of type '" "G2Ptr const *""'"); 
    }
    arg1 = reinterpret_cast< G2Ptr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "G2_discountBond" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "G2_discountBond" "', argument " "3"" of type '" "Time""'");
    } 
    arg3 = static_cast< Time >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "G2_discountBond" "', argument " "4"" of type '" "Rate""'");
    } 
    arg4 = static_cast< Rate >(val4);
    ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "G2_discountBond" "', argument " "5"" of type '" "Rate""'");
    } 
    arg5 = static_cast< Rate >(val5);
    {
      try {
        result = (Real)G2Ptr_discountBond((G2Ptr const *)arg1,arg2,arg3,arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_G2) {
  {
    G2Ptr *arg1 = (G2Ptr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_G2(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_G2Ptr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_G2" "', argument " "1"" of type '" "G2Ptr *""'"); 
    }
    arg1 = reinterpret_cast< G2Ptr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_JamshidianSwaptionEngine__SWIG_0) {
  {
    boost::shared_ptr< ShortRateModel > *arg1 = 0 ;
    Handle< YieldTermStructure > *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    JamshidianSwaptionEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_JamshidianSwaptionEngine(model,termStructure);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_ShortRateModel_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_JamshidianSwaptionEngine" "', argument " "1"" of type '" "boost::shared_ptr< ShortRateModel > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_JamshidianSwaptionEngine" "', argument " "1"" of type '" "boost::shared_ptr< ShortRateModel > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< ShortRateModel > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_JamshidianSwaptionEngine" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_JamshidianSwaptionEngine" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< YieldTermStructure > * >(argp2);
    {
      try {
        result = (JamshidianSwaptionEnginePtr *)new_JamshidianSwaptionEnginePtr__SWIG_0((boost::shared_ptr< ShortRateModel > const &)*arg1,(Handle< YieldTermStructure > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_JamshidianSwaptionEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_JamshidianSwaptionEngine__SWIG_1) {
  {
    boost::shared_ptr< ShortRateModel > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    JamshidianSwaptionEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_JamshidianSwaptionEngine(model);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_ShortRateModel_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_JamshidianSwaptionEngine" "', argument " "1"" of type '" "boost::shared_ptr< ShortRateModel > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_JamshidianSwaptionEngine" "', argument " "1"" of type '" "boost::shared_ptr< ShortRateModel > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< ShortRateModel > * >(argp1);
    {
      try {
        result = (JamshidianSwaptionEnginePtr *)new_JamshidianSwaptionEnginePtr__SWIG_0((boost::shared_ptr< ShortRateModel > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_JamshidianSwaptionEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_JamshidianSwaptionEngine) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_ShortRateModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_ShortRateModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_JamshidianSwaptionEngine__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_JamshidianSwaptionEngine__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_JamshidianSwaptionEngine'");
  XSRETURN(0);
}


XS(_wrap_delete_JamshidianSwaptionEngine) {
  {
    JamshidianSwaptionEnginePtr *arg1 = (JamshidianSwaptionEnginePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_JamshidianSwaptionEngine(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_JamshidianSwaptionEnginePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_JamshidianSwaptionEngine" "', argument " "1"" of type '" "JamshidianSwaptionEnginePtr *""'"); 
    }
    arg1 = reinterpret_cast< JamshidianSwaptionEnginePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_TreeSwaptionEngine__SWIG_0) {
  {
    boost::shared_ptr< ShortRateModel > *arg1 = 0 ;
    Size arg2 ;
    Handle< YieldTermStructure > *arg3 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    TreeSwaptionEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_TreeSwaptionEngine(model,timeSteps,termStructure);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_ShortRateModel_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_TreeSwaptionEngine" "', argument " "1"" of type '" "boost::shared_ptr< ShortRateModel > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_TreeSwaptionEngine" "', argument " "1"" of type '" "boost::shared_ptr< ShortRateModel > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< ShortRateModel > * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_TreeSwaptionEngine" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_TreeSwaptionEngine" "', argument " "3"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_TreeSwaptionEngine" "', argument " "3"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< YieldTermStructure > * >(argp3);
    {
      try {
        result = (TreeSwaptionEnginePtr *)new_TreeSwaptionEnginePtr__SWIG_0((boost::shared_ptr< ShortRateModel > const &)*arg1,arg2,(Handle< YieldTermStructure > const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TreeSwaptionEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_TreeSwaptionEngine__SWIG_1) {
  {
    boost::shared_ptr< ShortRateModel > *arg1 = 0 ;
    Size arg2 ;
    void *argp1 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    TreeSwaptionEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_TreeSwaptionEngine(model,timeSteps);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_ShortRateModel_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_TreeSwaptionEngine" "', argument " "1"" of type '" "boost::shared_ptr< ShortRateModel > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_TreeSwaptionEngine" "', argument " "1"" of type '" "boost::shared_ptr< ShortRateModel > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< ShortRateModel > * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_TreeSwaptionEngine" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    {
      try {
        result = (TreeSwaptionEnginePtr *)new_TreeSwaptionEnginePtr__SWIG_0((boost::shared_ptr< ShortRateModel > const &)*arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TreeSwaptionEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_TreeSwaptionEngine__SWIG_2) {
  {
    boost::shared_ptr< ShortRateModel > *arg1 = 0 ;
    TimeGrid *arg2 = 0 ;
    Handle< YieldTermStructure > *arg3 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    TreeSwaptionEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_TreeSwaptionEngine(model,grid,termStructure);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_ShortRateModel_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_TreeSwaptionEngine" "', argument " "1"" of type '" "boost::shared_ptr< ShortRateModel > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_TreeSwaptionEngine" "', argument " "1"" of type '" "boost::shared_ptr< ShortRateModel > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< ShortRateModel > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_TimeGrid,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_TreeSwaptionEngine" "', argument " "2"" of type '" "TimeGrid const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_TreeSwaptionEngine" "', argument " "2"" of type '" "TimeGrid const &""'"); 
    }
    arg2 = reinterpret_cast< TimeGrid * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_TreeSwaptionEngine" "', argument " "3"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_TreeSwaptionEngine" "', argument " "3"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< YieldTermStructure > * >(argp3);
    {
      try {
        result = (TreeSwaptionEnginePtr *)new_TreeSwaptionEnginePtr__SWIG_2((boost::shared_ptr< ShortRateModel > const &)*arg1,(TimeGrid const &)*arg2,(Handle< YieldTermStructure > const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TreeSwaptionEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_TreeSwaptionEngine__SWIG_3) {
  {
    boost::shared_ptr< ShortRateModel > *arg1 = 0 ;
    TimeGrid *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    TreeSwaptionEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_TreeSwaptionEngine(model,grid);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_ShortRateModel_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_TreeSwaptionEngine" "', argument " "1"" of type '" "boost::shared_ptr< ShortRateModel > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_TreeSwaptionEngine" "', argument " "1"" of type '" "boost::shared_ptr< ShortRateModel > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< ShortRateModel > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_TimeGrid,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_TreeSwaptionEngine" "', argument " "2"" of type '" "TimeGrid const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_TreeSwaptionEngine" "', argument " "2"" of type '" "TimeGrid const &""'"); 
    }
    arg2 = reinterpret_cast< TimeGrid * >(argp2);
    {
      try {
        result = (TreeSwaptionEnginePtr *)new_TreeSwaptionEnginePtr__SWIG_2((boost::shared_ptr< ShortRateModel > const &)*arg1,(TimeGrid const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TreeSwaptionEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_TreeSwaptionEngine__SWIG_4) {
  {
    Handle< ShortRateModel > *arg1 = 0 ;
    Size arg2 ;
    Handle< YieldTermStructure > *arg3 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    TreeSwaptionEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_TreeSwaptionEngine(model,timeSteps,termStructure);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_ShortRateModel_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_TreeSwaptionEngine" "', argument " "1"" of type '" "Handle< ShortRateModel > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_TreeSwaptionEngine" "', argument " "1"" of type '" "Handle< ShortRateModel > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< ShortRateModel > * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_TreeSwaptionEngine" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_TreeSwaptionEngine" "', argument " "3"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_TreeSwaptionEngine" "', argument " "3"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< YieldTermStructure > * >(argp3);
    {
      try {
        result = (TreeSwaptionEnginePtr *)new_TreeSwaptionEnginePtr__SWIG_4((Handle< ShortRateModel > const &)*arg1,arg2,(Handle< YieldTermStructure > const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TreeSwaptionEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_TreeSwaptionEngine__SWIG_5) {
  {
    Handle< ShortRateModel > *arg1 = 0 ;
    Size arg2 ;
    void *argp1 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    TreeSwaptionEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_TreeSwaptionEngine(model,timeSteps);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_ShortRateModel_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_TreeSwaptionEngine" "', argument " "1"" of type '" "Handle< ShortRateModel > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_TreeSwaptionEngine" "', argument " "1"" of type '" "Handle< ShortRateModel > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< ShortRateModel > * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_TreeSwaptionEngine" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    {
      try {
        result = (TreeSwaptionEnginePtr *)new_TreeSwaptionEnginePtr__SWIG_4((Handle< ShortRateModel > const &)*arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TreeSwaptionEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_TreeSwaptionEngine) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_ShortRateModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_TimeGrid, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_ShortRateModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_ShortRateModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_ShortRateModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_TimeGrid, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_ShortRateModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_ShortRateModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_TreeSwaptionEngine__SWIG_3); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_TreeSwaptionEngine__SWIG_1); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_TreeSwaptionEngine__SWIG_5); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_TreeSwaptionEngine__SWIG_2); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_TreeSwaptionEngine__SWIG_4); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_TreeSwaptionEngine__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_TreeSwaptionEngine'");
  XSRETURN(0);
}


XS(_wrap_delete_TreeSwaptionEngine) {
  {
    TreeSwaptionEnginePtr *arg1 = (TreeSwaptionEnginePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_TreeSwaptionEngine(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_TreeSwaptionEnginePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_TreeSwaptionEngine" "', argument " "1"" of type '" "TreeSwaptionEnginePtr *""'"); 
    }
    arg1 = reinterpret_cast< TreeSwaptionEnginePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_AnalyticCapFloorEngine__SWIG_0) {
  {
    boost::shared_ptr< ShortRateModel > *arg1 = 0 ;
    Handle< YieldTermStructure > *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    AnalyticCapFloorEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_AnalyticCapFloorEngine(model,termStructure);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_ShortRateModel_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_AnalyticCapFloorEngine" "', argument " "1"" of type '" "boost::shared_ptr< ShortRateModel > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AnalyticCapFloorEngine" "', argument " "1"" of type '" "boost::shared_ptr< ShortRateModel > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< ShortRateModel > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_AnalyticCapFloorEngine" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AnalyticCapFloorEngine" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< YieldTermStructure > * >(argp2);
    {
      try {
        result = (AnalyticCapFloorEnginePtr *)new_AnalyticCapFloorEnginePtr__SWIG_0((boost::shared_ptr< ShortRateModel > const &)*arg1,(Handle< YieldTermStructure > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_AnalyticCapFloorEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_AnalyticCapFloorEngine__SWIG_1) {
  {
    boost::shared_ptr< ShortRateModel > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    AnalyticCapFloorEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_AnalyticCapFloorEngine(model);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_ShortRateModel_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_AnalyticCapFloorEngine" "', argument " "1"" of type '" "boost::shared_ptr< ShortRateModel > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AnalyticCapFloorEngine" "', argument " "1"" of type '" "boost::shared_ptr< ShortRateModel > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< ShortRateModel > * >(argp1);
    {
      try {
        result = (AnalyticCapFloorEnginePtr *)new_AnalyticCapFloorEnginePtr__SWIG_0((boost::shared_ptr< ShortRateModel > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_AnalyticCapFloorEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_AnalyticCapFloorEngine) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_ShortRateModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_ShortRateModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_AnalyticCapFloorEngine__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_AnalyticCapFloorEngine__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_AnalyticCapFloorEngine'");
  XSRETURN(0);
}


XS(_wrap_delete_AnalyticCapFloorEngine) {
  {
    AnalyticCapFloorEnginePtr *arg1 = (AnalyticCapFloorEnginePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_AnalyticCapFloorEngine(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_AnalyticCapFloorEnginePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_AnalyticCapFloorEngine" "', argument " "1"" of type '" "AnalyticCapFloorEnginePtr *""'"); 
    }
    arg1 = reinterpret_cast< AnalyticCapFloorEnginePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_TreeCapFloorEngine__SWIG_0) {
  {
    boost::shared_ptr< ShortRateModel > *arg1 = 0 ;
    Size arg2 ;
    Handle< YieldTermStructure > *arg3 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    TreeCapFloorEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_TreeCapFloorEngine(model,timeSteps,termStructure);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_ShortRateModel_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_TreeCapFloorEngine" "', argument " "1"" of type '" "boost::shared_ptr< ShortRateModel > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_TreeCapFloorEngine" "', argument " "1"" of type '" "boost::shared_ptr< ShortRateModel > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< ShortRateModel > * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_TreeCapFloorEngine" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_TreeCapFloorEngine" "', argument " "3"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_TreeCapFloorEngine" "', argument " "3"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< YieldTermStructure > * >(argp3);
    {
      try {
        result = (TreeCapFloorEnginePtr *)new_TreeCapFloorEnginePtr__SWIG_0((boost::shared_ptr< ShortRateModel > const &)*arg1,arg2,(Handle< YieldTermStructure > const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TreeCapFloorEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_TreeCapFloorEngine__SWIG_1) {
  {
    boost::shared_ptr< ShortRateModel > *arg1 = 0 ;
    Size arg2 ;
    void *argp1 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    TreeCapFloorEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_TreeCapFloorEngine(model,timeSteps);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_ShortRateModel_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_TreeCapFloorEngine" "', argument " "1"" of type '" "boost::shared_ptr< ShortRateModel > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_TreeCapFloorEngine" "', argument " "1"" of type '" "boost::shared_ptr< ShortRateModel > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< ShortRateModel > * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_TreeCapFloorEngine" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    {
      try {
        result = (TreeCapFloorEnginePtr *)new_TreeCapFloorEnginePtr__SWIG_0((boost::shared_ptr< ShortRateModel > const &)*arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TreeCapFloorEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_TreeCapFloorEngine__SWIG_2) {
  {
    boost::shared_ptr< ShortRateModel > *arg1 = 0 ;
    TimeGrid *arg2 = 0 ;
    Handle< YieldTermStructure > *arg3 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    TreeCapFloorEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_TreeCapFloorEngine(model,grid,termStructure);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_ShortRateModel_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_TreeCapFloorEngine" "', argument " "1"" of type '" "boost::shared_ptr< ShortRateModel > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_TreeCapFloorEngine" "', argument " "1"" of type '" "boost::shared_ptr< ShortRateModel > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< ShortRateModel > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_TimeGrid,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_TreeCapFloorEngine" "', argument " "2"" of type '" "TimeGrid const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_TreeCapFloorEngine" "', argument " "2"" of type '" "TimeGrid const &""'"); 
    }
    arg2 = reinterpret_cast< TimeGrid * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_TreeCapFloorEngine" "', argument " "3"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_TreeCapFloorEngine" "', argument " "3"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< YieldTermStructure > * >(argp3);
    {
      try {
        result = (TreeCapFloorEnginePtr *)new_TreeCapFloorEnginePtr__SWIG_2((boost::shared_ptr< ShortRateModel > const &)*arg1,(TimeGrid const &)*arg2,(Handle< YieldTermStructure > const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TreeCapFloorEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_TreeCapFloorEngine__SWIG_3) {
  {
    boost::shared_ptr< ShortRateModel > *arg1 = 0 ;
    TimeGrid *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    TreeCapFloorEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_TreeCapFloorEngine(model,grid);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_ShortRateModel_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_TreeCapFloorEngine" "', argument " "1"" of type '" "boost::shared_ptr< ShortRateModel > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_TreeCapFloorEngine" "', argument " "1"" of type '" "boost::shared_ptr< ShortRateModel > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< ShortRateModel > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_TimeGrid,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_TreeCapFloorEngine" "', argument " "2"" of type '" "TimeGrid const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_TreeCapFloorEngine" "', argument " "2"" of type '" "TimeGrid const &""'"); 
    }
    arg2 = reinterpret_cast< TimeGrid * >(argp2);
    {
      try {
        result = (TreeCapFloorEnginePtr *)new_TreeCapFloorEnginePtr__SWIG_2((boost::shared_ptr< ShortRateModel > const &)*arg1,(TimeGrid const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TreeCapFloorEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_TreeCapFloorEngine) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_ShortRateModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_TimeGrid, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_ShortRateModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_ShortRateModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_TimeGrid, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_ShortRateModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_TreeCapFloorEngine__SWIG_3); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_TreeCapFloorEngine__SWIG_1); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_TreeCapFloorEngine__SWIG_2); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_TreeCapFloorEngine__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_TreeCapFloorEngine'");
  XSRETURN(0);
}


XS(_wrap_delete_TreeCapFloorEngine) {
  {
    TreeCapFloorEnginePtr *arg1 = (TreeCapFloorEnginePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_TreeCapFloorEngine(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_TreeCapFloorEnginePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_TreeCapFloorEngine" "', argument " "1"" of type '" "TreeCapFloorEnginePtr *""'"); 
    }
    arg1 = reinterpret_cast< TreeCapFloorEnginePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_G2SwaptionEngine) {
  {
    boost::shared_ptr< ShortRateModel > *arg1 = 0 ;
    Real arg2 ;
    Size arg3 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    size_t val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    G2SwaptionEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_G2SwaptionEngine(model,range,intervals);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_ShortRateModel_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_G2SwaptionEngine" "', argument " "1"" of type '" "boost::shared_ptr< ShortRateModel > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_G2SwaptionEngine" "', argument " "1"" of type '" "boost::shared_ptr< ShortRateModel > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< ShortRateModel > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_G2SwaptionEngine" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_G2SwaptionEngine" "', argument " "3"" of type '" "Size""'");
    } 
    arg3 = static_cast< Size >(val3);
    {
      try {
        result = (G2SwaptionEnginePtr *)new_G2SwaptionEnginePtr((boost::shared_ptr< ShortRateModel > const &)*arg1,arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_G2SwaptionEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_G2SwaptionEngine) {
  {
    G2SwaptionEnginePtr *arg1 = (G2SwaptionEnginePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_G2SwaptionEngine(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_G2SwaptionEnginePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_G2SwaptionEngine" "', argument " "1"" of type '" "G2SwaptionEnginePtr *""'"); 
    }
    arg1 = reinterpret_cast< G2SwaptionEnginePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FdG2SwaptionEngine__SWIG_0) {
  {
    boost::shared_ptr< ShortRateModel > *arg1 = 0 ;
    Size arg2 ;
    Size arg3 ;
    Size arg4 ;
    Size arg5 ;
    Real arg6 ;
    FdmSchemeDesc *arg7 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    size_t val3 ;
    int ecode3 = 0 ;
    size_t val4 ;
    int ecode4 = 0 ;
    size_t val5 ;
    int ecode5 = 0 ;
    double val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    int argvi = 0;
    FdG2SwaptionEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: new_FdG2SwaptionEngine(model,tGrid,xGrid,yGrid,dampingSteps,invEps,schemeDesc);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_ShortRateModel_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FdG2SwaptionEngine" "', argument " "1"" of type '" "boost::shared_ptr< ShortRateModel > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FdG2SwaptionEngine" "', argument " "1"" of type '" "boost::shared_ptr< ShortRateModel > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< ShortRateModel > * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FdG2SwaptionEngine" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_FdG2SwaptionEngine" "', argument " "3"" of type '" "Size""'");
    } 
    arg3 = static_cast< Size >(val3);
    ecode4 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_FdG2SwaptionEngine" "', argument " "4"" of type '" "Size""'");
    } 
    arg4 = static_cast< Size >(val4);
    ecode5 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_FdG2SwaptionEngine" "', argument " "5"" of type '" "Size""'");
    } 
    arg5 = static_cast< Size >(val5);
    ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_FdG2SwaptionEngine" "', argument " "6"" of type '" "Real""'");
    } 
    arg6 = static_cast< Real >(val6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_FdmSchemeDesc,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_FdG2SwaptionEngine" "', argument " "7"" of type '" "FdmSchemeDesc const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FdG2SwaptionEngine" "', argument " "7"" of type '" "FdmSchemeDesc const &""'"); 
    }
    arg7 = reinterpret_cast< FdmSchemeDesc * >(argp7);
    {
      try {
        result = (FdG2SwaptionEnginePtr *)new_FdG2SwaptionEnginePtr__SWIG_0((boost::shared_ptr< ShortRateModel > const &)*arg1,arg2,arg3,arg4,arg5,arg6,(FdmSchemeDesc const &)*arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FdG2SwaptionEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FdG2SwaptionEngine__SWIG_1) {
  {
    boost::shared_ptr< ShortRateModel > *arg1 = 0 ;
    Size arg2 ;
    Size arg3 ;
    Size arg4 ;
    Size arg5 ;
    Real arg6 ;
    void *argp1 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    size_t val3 ;
    int ecode3 = 0 ;
    size_t val4 ;
    int ecode4 = 0 ;
    size_t val5 ;
    int ecode5 = 0 ;
    double val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    FdG2SwaptionEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_FdG2SwaptionEngine(model,tGrid,xGrid,yGrid,dampingSteps,invEps);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_ShortRateModel_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FdG2SwaptionEngine" "', argument " "1"" of type '" "boost::shared_ptr< ShortRateModel > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FdG2SwaptionEngine" "', argument " "1"" of type '" "boost::shared_ptr< ShortRateModel > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< ShortRateModel > * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FdG2SwaptionEngine" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_FdG2SwaptionEngine" "', argument " "3"" of type '" "Size""'");
    } 
    arg3 = static_cast< Size >(val3);
    ecode4 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_FdG2SwaptionEngine" "', argument " "4"" of type '" "Size""'");
    } 
    arg4 = static_cast< Size >(val4);
    ecode5 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_FdG2SwaptionEngine" "', argument " "5"" of type '" "Size""'");
    } 
    arg5 = static_cast< Size >(val5);
    ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_FdG2SwaptionEngine" "', argument " "6"" of type '" "Real""'");
    } 
    arg6 = static_cast< Real >(val6);
    {
      try {
        result = (FdG2SwaptionEnginePtr *)new_FdG2SwaptionEnginePtr__SWIG_0((boost::shared_ptr< ShortRateModel > const &)*arg1,arg2,arg3,arg4,arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FdG2SwaptionEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FdG2SwaptionEngine__SWIG_2) {
  {
    boost::shared_ptr< ShortRateModel > *arg1 = 0 ;
    Size arg2 ;
    Size arg3 ;
    Size arg4 ;
    Size arg5 ;
    void *argp1 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    size_t val3 ;
    int ecode3 = 0 ;
    size_t val4 ;
    int ecode4 = 0 ;
    size_t val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    FdG2SwaptionEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_FdG2SwaptionEngine(model,tGrid,xGrid,yGrid,dampingSteps);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_ShortRateModel_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FdG2SwaptionEngine" "', argument " "1"" of type '" "boost::shared_ptr< ShortRateModel > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FdG2SwaptionEngine" "', argument " "1"" of type '" "boost::shared_ptr< ShortRateModel > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< ShortRateModel > * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FdG2SwaptionEngine" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_FdG2SwaptionEngine" "', argument " "3"" of type '" "Size""'");
    } 
    arg3 = static_cast< Size >(val3);
    ecode4 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_FdG2SwaptionEngine" "', argument " "4"" of type '" "Size""'");
    } 
    arg4 = static_cast< Size >(val4);
    ecode5 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_FdG2SwaptionEngine" "', argument " "5"" of type '" "Size""'");
    } 
    arg5 = static_cast< Size >(val5);
    {
      try {
        result = (FdG2SwaptionEnginePtr *)new_FdG2SwaptionEnginePtr__SWIG_0((boost::shared_ptr< ShortRateModel > const &)*arg1,arg2,arg3,arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FdG2SwaptionEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FdG2SwaptionEngine__SWIG_3) {
  {
    boost::shared_ptr< ShortRateModel > *arg1 = 0 ;
    Size arg2 ;
    Size arg3 ;
    Size arg4 ;
    void *argp1 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    size_t val3 ;
    int ecode3 = 0 ;
    size_t val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    FdG2SwaptionEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_FdG2SwaptionEngine(model,tGrid,xGrid,yGrid);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_ShortRateModel_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FdG2SwaptionEngine" "', argument " "1"" of type '" "boost::shared_ptr< ShortRateModel > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FdG2SwaptionEngine" "', argument " "1"" of type '" "boost::shared_ptr< ShortRateModel > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< ShortRateModel > * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FdG2SwaptionEngine" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_FdG2SwaptionEngine" "', argument " "3"" of type '" "Size""'");
    } 
    arg3 = static_cast< Size >(val3);
    ecode4 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_FdG2SwaptionEngine" "', argument " "4"" of type '" "Size""'");
    } 
    arg4 = static_cast< Size >(val4);
    {
      try {
        result = (FdG2SwaptionEnginePtr *)new_FdG2SwaptionEnginePtr__SWIG_0((boost::shared_ptr< ShortRateModel > const &)*arg1,arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FdG2SwaptionEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FdG2SwaptionEngine__SWIG_4) {
  {
    boost::shared_ptr< ShortRateModel > *arg1 = 0 ;
    Size arg2 ;
    Size arg3 ;
    void *argp1 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    size_t val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    FdG2SwaptionEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_FdG2SwaptionEngine(model,tGrid,xGrid);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_ShortRateModel_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FdG2SwaptionEngine" "', argument " "1"" of type '" "boost::shared_ptr< ShortRateModel > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FdG2SwaptionEngine" "', argument " "1"" of type '" "boost::shared_ptr< ShortRateModel > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< ShortRateModel > * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FdG2SwaptionEngine" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_FdG2SwaptionEngine" "', argument " "3"" of type '" "Size""'");
    } 
    arg3 = static_cast< Size >(val3);
    {
      try {
        result = (FdG2SwaptionEnginePtr *)new_FdG2SwaptionEnginePtr__SWIG_0((boost::shared_ptr< ShortRateModel > const &)*arg1,arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FdG2SwaptionEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FdG2SwaptionEngine__SWIG_5) {
  {
    boost::shared_ptr< ShortRateModel > *arg1 = 0 ;
    Size arg2 ;
    void *argp1 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    FdG2SwaptionEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_FdG2SwaptionEngine(model,tGrid);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_ShortRateModel_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FdG2SwaptionEngine" "', argument " "1"" of type '" "boost::shared_ptr< ShortRateModel > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FdG2SwaptionEngine" "', argument " "1"" of type '" "boost::shared_ptr< ShortRateModel > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< ShortRateModel > * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FdG2SwaptionEngine" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    {
      try {
        result = (FdG2SwaptionEnginePtr *)new_FdG2SwaptionEnginePtr__SWIG_0((boost::shared_ptr< ShortRateModel > const &)*arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FdG2SwaptionEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FdG2SwaptionEngine__SWIG_6) {
  {
    boost::shared_ptr< ShortRateModel > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    FdG2SwaptionEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_FdG2SwaptionEngine(model);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_ShortRateModel_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FdG2SwaptionEngine" "', argument " "1"" of type '" "boost::shared_ptr< ShortRateModel > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FdG2SwaptionEngine" "', argument " "1"" of type '" "boost::shared_ptr< ShortRateModel > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< ShortRateModel > * >(argp1);
    {
      try {
        result = (FdG2SwaptionEnginePtr *)new_FdG2SwaptionEnginePtr__SWIG_0((boost::shared_ptr< ShortRateModel > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FdG2SwaptionEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FdG2SwaptionEngine) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_ShortRateModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_ShortRateModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_ShortRateModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_ShortRateModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_ShortRateModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_ShortRateModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_ShortRateModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_FdmSchemeDesc, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 7;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_7:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FdG2SwaptionEngine__SWIG_6); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FdG2SwaptionEngine__SWIG_5); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FdG2SwaptionEngine__SWIG_4); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FdG2SwaptionEngine__SWIG_3); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FdG2SwaptionEngine__SWIG_2); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FdG2SwaptionEngine__SWIG_1); return;
    case 7:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FdG2SwaptionEngine__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_FdG2SwaptionEngine'");
  XSRETURN(0);
}


XS(_wrap_delete_FdG2SwaptionEngine) {
  {
    FdG2SwaptionEnginePtr *arg1 = (FdG2SwaptionEnginePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_FdG2SwaptionEngine(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_FdG2SwaptionEnginePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FdG2SwaptionEngine" "', argument " "1"" of type '" "FdG2SwaptionEnginePtr *""'"); 
    }
    arg1 = reinterpret_cast< FdG2SwaptionEnginePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FdHullWhiteSwaptionEngine__SWIG_0) {
  {
    boost::shared_ptr< ShortRateModel > *arg1 = 0 ;
    Size arg2 ;
    Size arg3 ;
    Size arg4 ;
    Real arg5 ;
    FdmSchemeDesc *arg6 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    size_t val3 ;
    int ecode3 = 0 ;
    size_t val4 ;
    int ecode4 = 0 ;
    double val5 ;
    int ecode5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    int argvi = 0;
    FdHullWhiteSwaptionEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_FdHullWhiteSwaptionEngine(model,tGrid,xGrid,dampingSteps,invEps,schemeDesc);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_ShortRateModel_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FdHullWhiteSwaptionEngine" "', argument " "1"" of type '" "boost::shared_ptr< ShortRateModel > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FdHullWhiteSwaptionEngine" "', argument " "1"" of type '" "boost::shared_ptr< ShortRateModel > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< ShortRateModel > * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FdHullWhiteSwaptionEngine" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_FdHullWhiteSwaptionEngine" "', argument " "3"" of type '" "Size""'");
    } 
    arg3 = static_cast< Size >(val3);
    ecode4 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_FdHullWhiteSwaptionEngine" "', argument " "4"" of type '" "Size""'");
    } 
    arg4 = static_cast< Size >(val4);
    ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_FdHullWhiteSwaptionEngine" "', argument " "5"" of type '" "Real""'");
    } 
    arg5 = static_cast< Real >(val5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_FdmSchemeDesc,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_FdHullWhiteSwaptionEngine" "', argument " "6"" of type '" "FdmSchemeDesc const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FdHullWhiteSwaptionEngine" "', argument " "6"" of type '" "FdmSchemeDesc const &""'"); 
    }
    arg6 = reinterpret_cast< FdmSchemeDesc * >(argp6);
    {
      try {
        result = (FdHullWhiteSwaptionEnginePtr *)new_FdHullWhiteSwaptionEnginePtr__SWIG_0((boost::shared_ptr< ShortRateModel > const &)*arg1,arg2,arg3,arg4,arg5,(FdmSchemeDesc const &)*arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FdHullWhiteSwaptionEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FdHullWhiteSwaptionEngine__SWIG_1) {
  {
    boost::shared_ptr< ShortRateModel > *arg1 = 0 ;
    Size arg2 ;
    Size arg3 ;
    Size arg4 ;
    Real arg5 ;
    void *argp1 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    size_t val3 ;
    int ecode3 = 0 ;
    size_t val4 ;
    int ecode4 = 0 ;
    double val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    FdHullWhiteSwaptionEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_FdHullWhiteSwaptionEngine(model,tGrid,xGrid,dampingSteps,invEps);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_ShortRateModel_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FdHullWhiteSwaptionEngine" "', argument " "1"" of type '" "boost::shared_ptr< ShortRateModel > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FdHullWhiteSwaptionEngine" "', argument " "1"" of type '" "boost::shared_ptr< ShortRateModel > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< ShortRateModel > * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FdHullWhiteSwaptionEngine" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_FdHullWhiteSwaptionEngine" "', argument " "3"" of type '" "Size""'");
    } 
    arg3 = static_cast< Size >(val3);
    ecode4 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_FdHullWhiteSwaptionEngine" "', argument " "4"" of type '" "Size""'");
    } 
    arg4 = static_cast< Size >(val4);
    ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_FdHullWhiteSwaptionEngine" "', argument " "5"" of type '" "Real""'");
    } 
    arg5 = static_cast< Real >(val5);
    {
      try {
        result = (FdHullWhiteSwaptionEnginePtr *)new_FdHullWhiteSwaptionEnginePtr__SWIG_0((boost::shared_ptr< ShortRateModel > const &)*arg1,arg2,arg3,arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FdHullWhiteSwaptionEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FdHullWhiteSwaptionEngine__SWIG_2) {
  {
    boost::shared_ptr< ShortRateModel > *arg1 = 0 ;
    Size arg2 ;
    Size arg3 ;
    Size arg4 ;
    void *argp1 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    size_t val3 ;
    int ecode3 = 0 ;
    size_t val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    FdHullWhiteSwaptionEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_FdHullWhiteSwaptionEngine(model,tGrid,xGrid,dampingSteps);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_ShortRateModel_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FdHullWhiteSwaptionEngine" "', argument " "1"" of type '" "boost::shared_ptr< ShortRateModel > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FdHullWhiteSwaptionEngine" "', argument " "1"" of type '" "boost::shared_ptr< ShortRateModel > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< ShortRateModel > * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FdHullWhiteSwaptionEngine" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_FdHullWhiteSwaptionEngine" "', argument " "3"" of type '" "Size""'");
    } 
    arg3 = static_cast< Size >(val3);
    ecode4 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_FdHullWhiteSwaptionEngine" "', argument " "4"" of type '" "Size""'");
    } 
    arg4 = static_cast< Size >(val4);
    {
      try {
        result = (FdHullWhiteSwaptionEnginePtr *)new_FdHullWhiteSwaptionEnginePtr__SWIG_0((boost::shared_ptr< ShortRateModel > const &)*arg1,arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FdHullWhiteSwaptionEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FdHullWhiteSwaptionEngine__SWIG_3) {
  {
    boost::shared_ptr< ShortRateModel > *arg1 = 0 ;
    Size arg2 ;
    Size arg3 ;
    void *argp1 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    size_t val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    FdHullWhiteSwaptionEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_FdHullWhiteSwaptionEngine(model,tGrid,xGrid);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_ShortRateModel_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FdHullWhiteSwaptionEngine" "', argument " "1"" of type '" "boost::shared_ptr< ShortRateModel > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FdHullWhiteSwaptionEngine" "', argument " "1"" of type '" "boost::shared_ptr< ShortRateModel > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< ShortRateModel > * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FdHullWhiteSwaptionEngine" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_FdHullWhiteSwaptionEngine" "', argument " "3"" of type '" "Size""'");
    } 
    arg3 = static_cast< Size >(val3);
    {
      try {
        result = (FdHullWhiteSwaptionEnginePtr *)new_FdHullWhiteSwaptionEnginePtr__SWIG_0((boost::shared_ptr< ShortRateModel > const &)*arg1,arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FdHullWhiteSwaptionEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FdHullWhiteSwaptionEngine__SWIG_4) {
  {
    boost::shared_ptr< ShortRateModel > *arg1 = 0 ;
    Size arg2 ;
    void *argp1 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    FdHullWhiteSwaptionEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_FdHullWhiteSwaptionEngine(model,tGrid);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_ShortRateModel_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FdHullWhiteSwaptionEngine" "', argument " "1"" of type '" "boost::shared_ptr< ShortRateModel > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FdHullWhiteSwaptionEngine" "', argument " "1"" of type '" "boost::shared_ptr< ShortRateModel > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< ShortRateModel > * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FdHullWhiteSwaptionEngine" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    {
      try {
        result = (FdHullWhiteSwaptionEnginePtr *)new_FdHullWhiteSwaptionEnginePtr__SWIG_0((boost::shared_ptr< ShortRateModel > const &)*arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FdHullWhiteSwaptionEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FdHullWhiteSwaptionEngine__SWIG_5) {
  {
    boost::shared_ptr< ShortRateModel > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    FdHullWhiteSwaptionEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_FdHullWhiteSwaptionEngine(model);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_ShortRateModel_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FdHullWhiteSwaptionEngine" "', argument " "1"" of type '" "boost::shared_ptr< ShortRateModel > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FdHullWhiteSwaptionEngine" "', argument " "1"" of type '" "boost::shared_ptr< ShortRateModel > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< ShortRateModel > * >(argp1);
    {
      try {
        result = (FdHullWhiteSwaptionEnginePtr *)new_FdHullWhiteSwaptionEnginePtr__SWIG_0((boost::shared_ptr< ShortRateModel > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FdHullWhiteSwaptionEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FdHullWhiteSwaptionEngine) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_ShortRateModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_ShortRateModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_ShortRateModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_ShortRateModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_ShortRateModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_ShortRateModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_FdmSchemeDesc, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FdHullWhiteSwaptionEngine__SWIG_5); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FdHullWhiteSwaptionEngine__SWIG_4); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FdHullWhiteSwaptionEngine__SWIG_3); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FdHullWhiteSwaptionEngine__SWIG_2); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FdHullWhiteSwaptionEngine__SWIG_1); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FdHullWhiteSwaptionEngine__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_FdHullWhiteSwaptionEngine'");
  XSRETURN(0);
}


XS(_wrap_delete_FdHullWhiteSwaptionEngine) {
  {
    FdHullWhiteSwaptionEnginePtr *arg1 = (FdHullWhiteSwaptionEnginePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_FdHullWhiteSwaptionEngine(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_FdHullWhiteSwaptionEnginePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FdHullWhiteSwaptionEngine" "', argument " "1"" of type '" "FdHullWhiteSwaptionEnginePtr *""'"); 
    }
    arg1 = reinterpret_cast< FdHullWhiteSwaptionEnginePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Bond__SWIG_0) {
  {
    Natural arg1 ;
    Calendar *arg2 = 0 ;
    Real arg3 ;
    Date *arg4 = 0 ;
    Date *arg5 = 0 ;
    Leg *arg6 = 0 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    std::vector< boost::shared_ptr< CashFlow > > temp6 ;
    std::vector< boost::shared_ptr< CashFlow > > *v6 ;
    int argvi = 0;
    BondPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_Bond(settlementDays,calendar,faceAmount,maturityDate,issueDate,cashflows);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Bond" "', argument " "1"" of type '" "Natural""'");
    } 
    arg1 = static_cast< Natural >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Bond" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Bond" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Bond" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_Bond" "', argument " "4"" of type '" "Date const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Bond" "', argument " "4"" of type '" "Date const &""'"); 
    }
    arg4 = reinterpret_cast< Date * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_Bond" "', argument " "5"" of type '" "Date const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Bond" "', argument " "5"" of type '" "Date const &""'"); 
    }
    arg5 = reinterpret_cast< Date * >(argp5);
    {
      if (SWIG_ConvertPtr(ST(5),(void **) &v6, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,1) != -1) {
        arg6 = v6;
      } else if (SvROK(ST(5))) {
        AV *av = (AV *)SvRV(ST(5));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 6 of new_Bond. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CashFlow >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1) {
            temp6.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 6 of "
              "new_Bond. "
              "Expected an array of " "boost::shared_ptr< CashFlow >");
          }
        }
        arg6 = &temp6;
      } else {
        SWIG_croak("Type error in argument 6 of new_Bond. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
      }
    }
    {
      try {
        result = (BondPtr *)new_BondPtr__SWIG_0(arg1,(Calendar const &)*arg2,arg3,(Date const &)*arg4,(Date const &)*arg5,(std::vector< boost::shared_ptr< CashFlow > > const &)*arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BondPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Bond__SWIG_1) {
  {
    Natural arg1 ;
    Calendar *arg2 = 0 ;
    Real arg3 ;
    Date *arg4 = 0 ;
    Date *arg5 = 0 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int argvi = 0;
    BondPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_Bond(settlementDays,calendar,faceAmount,maturityDate,issueDate);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Bond" "', argument " "1"" of type '" "Natural""'");
    } 
    arg1 = static_cast< Natural >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Bond" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Bond" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Bond" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_Bond" "', argument " "4"" of type '" "Date const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Bond" "', argument " "4"" of type '" "Date const &""'"); 
    }
    arg4 = reinterpret_cast< Date * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_Bond" "', argument " "5"" of type '" "Date const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Bond" "', argument " "5"" of type '" "Date const &""'"); 
    }
    arg5 = reinterpret_cast< Date * >(argp5);
    {
      try {
        result = (BondPtr *)new_BondPtr__SWIG_0(arg1,(Calendar const &)*arg2,arg3,(Date const &)*arg4,(Date const &)*arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BondPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Bond__SWIG_2) {
  {
    Natural arg1 ;
    Calendar *arg2 = 0 ;
    Real arg3 ;
    Date *arg4 = 0 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int argvi = 0;
    BondPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_Bond(settlementDays,calendar,faceAmount,maturityDate);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Bond" "', argument " "1"" of type '" "Natural""'");
    } 
    arg1 = static_cast< Natural >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Bond" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Bond" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Bond" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_Bond" "', argument " "4"" of type '" "Date const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Bond" "', argument " "4"" of type '" "Date const &""'"); 
    }
    arg4 = reinterpret_cast< Date * >(argp4);
    {
      try {
        result = (BondPtr *)new_BondPtr__SWIG_0(arg1,(Calendar const &)*arg2,arg3,(Date const &)*arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BondPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Bond) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< CashFlow > >* v;
            if (SWIG_ConvertPtr(ST(5),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(5))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(5));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< CashFlow >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Bond__SWIG_2); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Bond__SWIG_1); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Bond__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Bond'");
  XSRETURN(0);
}


XS(_wrap_Bond_nextCouponRate__SWIG_0) {
  {
    BondPtr *arg1 = (BondPtr *) 0 ;
    Date *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Bond_nextCouponRate(self,d);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BondPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Bond_nextCouponRate" "', argument " "1"" of type '" "BondPtr *""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Bond_nextCouponRate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Bond_nextCouponRate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    {
      try {
        result = (Rate)BondPtr_nextCouponRate__SWIG_0(arg1,(Date const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Bond_nextCouponRate__SWIG_1) {
  {
    BondPtr *arg1 = (BondPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Bond_nextCouponRate(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BondPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Bond_nextCouponRate" "', argument " "1"" of type '" "BondPtr *""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    {
      try {
        result = (Rate)BondPtr_nextCouponRate__SWIG_0(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Bond_nextCouponRate) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Bond_nextCouponRate__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Bond_nextCouponRate__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'Bond_nextCouponRate'");
  XSRETURN(0);
}


XS(_wrap_Bond_previousCouponRate__SWIG_0) {
  {
    BondPtr *arg1 = (BondPtr *) 0 ;
    Date *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Bond_previousCouponRate(self,d);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BondPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Bond_previousCouponRate" "', argument " "1"" of type '" "BondPtr *""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Bond_previousCouponRate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Bond_previousCouponRate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    {
      try {
        result = (Rate)BondPtr_previousCouponRate__SWIG_0(arg1,(Date const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Bond_previousCouponRate__SWIG_1) {
  {
    BondPtr *arg1 = (BondPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Bond_previousCouponRate(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BondPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Bond_previousCouponRate" "', argument " "1"" of type '" "BondPtr *""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    {
      try {
        result = (Rate)BondPtr_previousCouponRate__SWIG_0(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Bond_previousCouponRate) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Bond_previousCouponRate__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Bond_previousCouponRate__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'Bond_previousCouponRate'");
  XSRETURN(0);
}


XS(_wrap_Bond_settlementDays) {
  {
    BondPtr *arg1 = (BondPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Natural result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Bond_settlementDays(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BondPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Bond_settlementDays" "', argument " "1"" of type '" "BondPtr const *""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    {
      try {
        result = (Natural)BondPtr_settlementDays((BondPtr const *)arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Bond_settlementDate__SWIG_0) {
  {
    BondPtr *arg1 = (BondPtr *) 0 ;
    Date arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Bond_settlementDate(self,d);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BondPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Bond_settlementDate" "', argument " "1"" of type '" "BondPtr *""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    {
      res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Bond_settlementDate" "', argument " "2"" of type '" "Date""'"); 
      }  
      if (!argp2) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Bond_settlementDate" "', argument " "2"" of type '" "Date""'");
      } else {
        arg2 = *(reinterpret_cast< Date * >(argp2));
      }
    }
    {
      try {
        result = BondPtr_settlementDate__SWIG_0(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Bond_settlementDate__SWIG_1) {
  {
    BondPtr *arg1 = (BondPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Bond_settlementDate(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BondPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Bond_settlementDate" "', argument " "1"" of type '" "BondPtr *""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    {
      try {
        result = BondPtr_settlementDate__SWIG_0(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Bond_settlementDate) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Bond_settlementDate__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Bond_settlementDate__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'Bond_settlementDate'");
  XSRETURN(0);
}


XS(_wrap_Bond_startDate) {
  {
    BondPtr *arg1 = (BondPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Bond_startDate(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BondPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Bond_startDate" "', argument " "1"" of type '" "BondPtr const *""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    {
      try {
        result = BondPtr_startDate((BondPtr const *)arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Bond_maturityDate) {
  {
    BondPtr *arg1 = (BondPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Bond_maturityDate(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BondPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Bond_maturityDate" "', argument " "1"" of type '" "BondPtr const *""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    {
      try {
        result = BondPtr_maturityDate((BondPtr const *)arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Bond_issueDate) {
  {
    BondPtr *arg1 = (BondPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Bond_issueDate(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BondPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Bond_issueDate" "', argument " "1"" of type '" "BondPtr const *""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    {
      try {
        result = BondPtr_issueDate((BondPtr const *)arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Bond_cashflows) {
  {
    BondPtr *arg1 = (BondPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< boost::shared_ptr< CashFlow > > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Bond_cashflows(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BondPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Bond_cashflows" "', argument " "1"" of type '" "BondPtr const *""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    {
      try {
        result = BondPtr_cashflows((BondPtr const *)arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        boost::shared_ptr< CashFlow >* ptr = new boost::shared_ptr< CashFlow >(result[i]);
        svs[i] = sv_newmortal();
        SWIG_MakePtr(svs[i], (void*) ptr, 
          SWIGTYPE_p_boost__shared_ptrT_CashFlow_t, SWIG_SHADOW|0);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Bond_redemptions) {
  {
    BondPtr *arg1 = (BondPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< boost::shared_ptr< CashFlow > > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Bond_redemptions(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BondPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Bond_redemptions" "', argument " "1"" of type '" "BondPtr const *""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    {
      try {
        result = BondPtr_redemptions((BondPtr const *)arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        boost::shared_ptr< CashFlow >* ptr = new boost::shared_ptr< CashFlow >(result[i]);
        svs[i] = sv_newmortal();
        SWIG_MakePtr(svs[i], (void*) ptr, 
          SWIGTYPE_p_boost__shared_ptrT_CashFlow_t, SWIG_SHADOW|0);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Bond_redemption) {
  {
    BondPtr *arg1 = (BondPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    boost::shared_ptr< CashFlow > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Bond_redemption(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BondPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Bond_redemption" "', argument " "1"" of type '" "BondPtr const *""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    {
      try {
        result = BondPtr_redemption((BondPtr const *)arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new boost::shared_ptr< CashFlow >(static_cast< const boost::shared_ptr< CashFlow >& >(result))), SWIGTYPE_p_boost__shared_ptrT_CashFlow_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Bond_calendar) {
  {
    BondPtr *arg1 = (BondPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    SwigValueWrapper< Calendar > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Bond_calendar(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BondPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Bond_calendar" "', argument " "1"" of type '" "BondPtr const *""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    {
      try {
        result = BondPtr_calendar((BondPtr const *)arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Calendar(static_cast< const Calendar& >(result))), SWIGTYPE_p_Calendar, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Bond_notionals) {
  {
    BondPtr *arg1 = (BondPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Real > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Bond_notionals(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BondPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Bond_notionals" "', argument " "1"" of type '" "BondPtr const *""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    {
      try {
        result = BondPtr_notionals((BondPtr const *)arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        svs[i] = sv_newmortal();
        sv_setnv(svs[i], result[i]);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Bond_notional__SWIG_0) {
  {
    BondPtr *arg1 = (BondPtr *) 0 ;
    Date arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Bond_notional(self,d);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BondPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Bond_notional" "', argument " "1"" of type '" "BondPtr const *""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    {
      res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Bond_notional" "', argument " "2"" of type '" "Date""'"); 
      }  
      if (!argp2) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Bond_notional" "', argument " "2"" of type '" "Date""'");
      } else {
        arg2 = *(reinterpret_cast< Date * >(argp2));
      }
    }
    {
      try {
        result = (Real)BondPtr_notional__SWIG_0((BondPtr const *)arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Bond_notional__SWIG_1) {
  {
    BondPtr *arg1 = (BondPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Bond_notional(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BondPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Bond_notional" "', argument " "1"" of type '" "BondPtr const *""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    {
      try {
        result = (Real)BondPtr_notional__SWIG_0((BondPtr const *)arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Bond_notional) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Bond_notional__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Bond_notional__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'Bond_notional'");
  XSRETURN(0);
}


XS(_wrap_Bond_cleanPrice__SWIG_0) {
  {
    BondPtr *arg1 = (BondPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Bond_cleanPrice(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BondPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Bond_cleanPrice" "', argument " "1"" of type '" "BondPtr *""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    {
      try {
        result = (Real)BondPtr_cleanPrice__SWIG_0(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Bond_cleanPrice__SWIG_1) {
  {
    BondPtr *arg1 = (BondPtr *) 0 ;
    Rate arg2 ;
    DayCounter *arg3 = 0 ;
    Compounding arg4 ;
    Frequency arg5 ;
    Date *arg6 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: Bond_cleanPrice(self,yield,dc,compounding,frequency,settlement);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BondPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Bond_cleanPrice" "', argument " "1"" of type '" "BondPtr *""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Bond_cleanPrice" "', argument " "2"" of type '" "Rate""'");
    } 
    arg2 = static_cast< Rate >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Bond_cleanPrice" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Bond_cleanPrice" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Bond_cleanPrice" "', argument " "4"" of type '" "Compounding""'");
    } 
    arg4 = static_cast< Compounding >(val4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Bond_cleanPrice" "', argument " "5"" of type '" "Frequency""'");
    } 
    arg5 = static_cast< Frequency >(val5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "Bond_cleanPrice" "', argument " "6"" of type '" "Date const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Bond_cleanPrice" "', argument " "6"" of type '" "Date const &""'"); 
    }
    arg6 = reinterpret_cast< Date * >(argp6);
    {
      try {
        result = (Real)BondPtr_cleanPrice__SWIG_1(arg1,arg2,(DayCounter const &)*arg3,arg4,arg5,(Date const &)*arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Bond_cleanPrice__SWIG_2) {
  {
    BondPtr *arg1 = (BondPtr *) 0 ;
    Rate arg2 ;
    DayCounter *arg3 = 0 ;
    Compounding arg4 ;
    Frequency arg5 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: Bond_cleanPrice(self,yield,dc,compounding,frequency);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BondPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Bond_cleanPrice" "', argument " "1"" of type '" "BondPtr *""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Bond_cleanPrice" "', argument " "2"" of type '" "Rate""'");
    } 
    arg2 = static_cast< Rate >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Bond_cleanPrice" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Bond_cleanPrice" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Bond_cleanPrice" "', argument " "4"" of type '" "Compounding""'");
    } 
    arg4 = static_cast< Compounding >(val4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Bond_cleanPrice" "', argument " "5"" of type '" "Frequency""'");
    } 
    arg5 = static_cast< Frequency >(val5);
    {
      try {
        result = (Real)BondPtr_cleanPrice__SWIG_1(arg1,arg2,(DayCounter const &)*arg3,arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Bond_cleanPrice) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Bond_cleanPrice__SWIG_0); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Bond_cleanPrice__SWIG_2); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Bond_cleanPrice__SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded 'Bond_cleanPrice'");
  XSRETURN(0);
}


XS(_wrap_Bond_dirtyPrice__SWIG_0) {
  {
    BondPtr *arg1 = (BondPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Bond_dirtyPrice(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BondPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Bond_dirtyPrice" "', argument " "1"" of type '" "BondPtr *""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    {
      try {
        result = (Real)BondPtr_dirtyPrice__SWIG_0(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Bond_dirtyPrice__SWIG_1) {
  {
    BondPtr *arg1 = (BondPtr *) 0 ;
    Rate arg2 ;
    DayCounter *arg3 = 0 ;
    Compounding arg4 ;
    Frequency arg5 ;
    Date *arg6 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: Bond_dirtyPrice(self,yield,dc,compounding,frequency,settlement);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BondPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Bond_dirtyPrice" "', argument " "1"" of type '" "BondPtr *""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Bond_dirtyPrice" "', argument " "2"" of type '" "Rate""'");
    } 
    arg2 = static_cast< Rate >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Bond_dirtyPrice" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Bond_dirtyPrice" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Bond_dirtyPrice" "', argument " "4"" of type '" "Compounding""'");
    } 
    arg4 = static_cast< Compounding >(val4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Bond_dirtyPrice" "', argument " "5"" of type '" "Frequency""'");
    } 
    arg5 = static_cast< Frequency >(val5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "Bond_dirtyPrice" "', argument " "6"" of type '" "Date const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Bond_dirtyPrice" "', argument " "6"" of type '" "Date const &""'"); 
    }
    arg6 = reinterpret_cast< Date * >(argp6);
    {
      try {
        result = (Real)BondPtr_dirtyPrice__SWIG_1(arg1,arg2,(DayCounter const &)*arg3,arg4,arg5,(Date const &)*arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Bond_dirtyPrice__SWIG_2) {
  {
    BondPtr *arg1 = (BondPtr *) 0 ;
    Rate arg2 ;
    DayCounter *arg3 = 0 ;
    Compounding arg4 ;
    Frequency arg5 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: Bond_dirtyPrice(self,yield,dc,compounding,frequency);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BondPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Bond_dirtyPrice" "', argument " "1"" of type '" "BondPtr *""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Bond_dirtyPrice" "', argument " "2"" of type '" "Rate""'");
    } 
    arg2 = static_cast< Rate >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Bond_dirtyPrice" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Bond_dirtyPrice" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Bond_dirtyPrice" "', argument " "4"" of type '" "Compounding""'");
    } 
    arg4 = static_cast< Compounding >(val4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Bond_dirtyPrice" "', argument " "5"" of type '" "Frequency""'");
    } 
    arg5 = static_cast< Frequency >(val5);
    {
      try {
        result = (Real)BondPtr_dirtyPrice__SWIG_1(arg1,arg2,(DayCounter const &)*arg3,arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Bond_dirtyPrice) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Bond_dirtyPrice__SWIG_0); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Bond_dirtyPrice__SWIG_2); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Bond_dirtyPrice__SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded 'Bond_dirtyPrice'");
  XSRETURN(0);
}


XS(_wrap_Bond_yield__SWIG_0) {
  {
    BondPtr *arg1 = (BondPtr *) 0 ;
    DayCounter *arg2 = 0 ;
    Compounding arg3 ;
    Frequency arg4 ;
    Real arg5 ;
    Size arg6 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    double val5 ;
    int ecode5 = 0 ;
    size_t val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: Bond_yield(self,dc,compounding,freq,accuracy,maxEvaluations);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BondPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Bond_yield" "', argument " "1"" of type '" "BondPtr *""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Bond_yield" "', argument " "2"" of type '" "DayCounter const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Bond_yield" "', argument " "2"" of type '" "DayCounter const &""'"); 
    }
    arg2 = reinterpret_cast< DayCounter * >(argp2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Bond_yield" "', argument " "3"" of type '" "Compounding""'");
    } 
    arg3 = static_cast< Compounding >(val3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Bond_yield" "', argument " "4"" of type '" "Frequency""'");
    } 
    arg4 = static_cast< Frequency >(val4);
    ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Bond_yield" "', argument " "5"" of type '" "Real""'");
    } 
    arg5 = static_cast< Real >(val5);
    ecode6 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Bond_yield" "', argument " "6"" of type '" "Size""'");
    } 
    arg6 = static_cast< Size >(val6);
    {
      try {
        result = (Real)BondPtr_yield__SWIG_0(arg1,(DayCounter const &)*arg2,arg3,arg4,arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Bond_yield__SWIG_1) {
  {
    BondPtr *arg1 = (BondPtr *) 0 ;
    DayCounter *arg2 = 0 ;
    Compounding arg3 ;
    Frequency arg4 ;
    Real arg5 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    double val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: Bond_yield(self,dc,compounding,freq,accuracy);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BondPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Bond_yield" "', argument " "1"" of type '" "BondPtr *""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Bond_yield" "', argument " "2"" of type '" "DayCounter const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Bond_yield" "', argument " "2"" of type '" "DayCounter const &""'"); 
    }
    arg2 = reinterpret_cast< DayCounter * >(argp2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Bond_yield" "', argument " "3"" of type '" "Compounding""'");
    } 
    arg3 = static_cast< Compounding >(val3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Bond_yield" "', argument " "4"" of type '" "Frequency""'");
    } 
    arg4 = static_cast< Frequency >(val4);
    ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Bond_yield" "', argument " "5"" of type '" "Real""'");
    } 
    arg5 = static_cast< Real >(val5);
    {
      try {
        result = (Real)BondPtr_yield__SWIG_0(arg1,(DayCounter const &)*arg2,arg3,arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Bond_yield__SWIG_2) {
  {
    BondPtr *arg1 = (BondPtr *) 0 ;
    DayCounter *arg2 = 0 ;
    Compounding arg3 ;
    Frequency arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: Bond_yield(self,dc,compounding,freq);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BondPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Bond_yield" "', argument " "1"" of type '" "BondPtr *""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Bond_yield" "', argument " "2"" of type '" "DayCounter const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Bond_yield" "', argument " "2"" of type '" "DayCounter const &""'"); 
    }
    arg2 = reinterpret_cast< DayCounter * >(argp2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Bond_yield" "', argument " "3"" of type '" "Compounding""'");
    } 
    arg3 = static_cast< Compounding >(val3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Bond_yield" "', argument " "4"" of type '" "Frequency""'");
    } 
    arg4 = static_cast< Frequency >(val4);
    {
      try {
        result = (Real)BondPtr_yield__SWIG_0(arg1,(DayCounter const &)*arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Bond_yield__SWIG_3) {
  {
    BondPtr *arg1 = (BondPtr *) 0 ;
    Real arg2 ;
    DayCounter *arg3 = 0 ;
    Compounding arg4 ;
    Frequency arg5 ;
    Date *arg6 = 0 ;
    Real arg7 ;
    Size arg8 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    double val7 ;
    int ecode7 = 0 ;
    size_t val8 ;
    int ecode8 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 8) || (items > 8)) {
      SWIG_croak("Usage: Bond_yield(self,cleanPrice,dc,compounding,freq,settlement,accuracy,maxEvaluations);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BondPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Bond_yield" "', argument " "1"" of type '" "BondPtr *""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Bond_yield" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Bond_yield" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Bond_yield" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Bond_yield" "', argument " "4"" of type '" "Compounding""'");
    } 
    arg4 = static_cast< Compounding >(val4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Bond_yield" "', argument " "5"" of type '" "Frequency""'");
    } 
    arg5 = static_cast< Frequency >(val5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "Bond_yield" "', argument " "6"" of type '" "Date const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Bond_yield" "', argument " "6"" of type '" "Date const &""'"); 
    }
    arg6 = reinterpret_cast< Date * >(argp6);
    ecode7 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "Bond_yield" "', argument " "7"" of type '" "Real""'");
    } 
    arg7 = static_cast< Real >(val7);
    ecode8 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "Bond_yield" "', argument " "8"" of type '" "Size""'");
    } 
    arg8 = static_cast< Size >(val8);
    {
      try {
        result = (Real)BondPtr_yield__SWIG_3(arg1,arg2,(DayCounter const &)*arg3,arg4,arg5,(Date const &)*arg6,arg7,arg8);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Bond_yield__SWIG_4) {
  {
    BondPtr *arg1 = (BondPtr *) 0 ;
    Real arg2 ;
    DayCounter *arg3 = 0 ;
    Compounding arg4 ;
    Frequency arg5 ;
    Date *arg6 = 0 ;
    Real arg7 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    double val7 ;
    int ecode7 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: Bond_yield(self,cleanPrice,dc,compounding,freq,settlement,accuracy);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BondPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Bond_yield" "', argument " "1"" of type '" "BondPtr *""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Bond_yield" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Bond_yield" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Bond_yield" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Bond_yield" "', argument " "4"" of type '" "Compounding""'");
    } 
    arg4 = static_cast< Compounding >(val4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Bond_yield" "', argument " "5"" of type '" "Frequency""'");
    } 
    arg5 = static_cast< Frequency >(val5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "Bond_yield" "', argument " "6"" of type '" "Date const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Bond_yield" "', argument " "6"" of type '" "Date const &""'"); 
    }
    arg6 = reinterpret_cast< Date * >(argp6);
    ecode7 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "Bond_yield" "', argument " "7"" of type '" "Real""'");
    } 
    arg7 = static_cast< Real >(val7);
    {
      try {
        result = (Real)BondPtr_yield__SWIG_3(arg1,arg2,(DayCounter const &)*arg3,arg4,arg5,(Date const &)*arg6,arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Bond_yield__SWIG_5) {
  {
    BondPtr *arg1 = (BondPtr *) 0 ;
    Real arg2 ;
    DayCounter *arg3 = 0 ;
    Compounding arg4 ;
    Frequency arg5 ;
    Date *arg6 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: Bond_yield(self,cleanPrice,dc,compounding,freq,settlement);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BondPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Bond_yield" "', argument " "1"" of type '" "BondPtr *""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Bond_yield" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Bond_yield" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Bond_yield" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Bond_yield" "', argument " "4"" of type '" "Compounding""'");
    } 
    arg4 = static_cast< Compounding >(val4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Bond_yield" "', argument " "5"" of type '" "Frequency""'");
    } 
    arg5 = static_cast< Frequency >(val5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "Bond_yield" "', argument " "6"" of type '" "Date const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Bond_yield" "', argument " "6"" of type '" "Date const &""'"); 
    }
    arg6 = reinterpret_cast< Date * >(argp6);
    {
      try {
        result = (Real)BondPtr_yield__SWIG_3(arg1,arg2,(DayCounter const &)*arg3,arg4,arg5,(Date const &)*arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Bond_yield__SWIG_6) {
  {
    BondPtr *arg1 = (BondPtr *) 0 ;
    Real arg2 ;
    DayCounter *arg3 = 0 ;
    Compounding arg4 ;
    Frequency arg5 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: Bond_yield(self,cleanPrice,dc,compounding,freq);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BondPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Bond_yield" "', argument " "1"" of type '" "BondPtr *""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Bond_yield" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Bond_yield" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Bond_yield" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Bond_yield" "', argument " "4"" of type '" "Compounding""'");
    } 
    arg4 = static_cast< Compounding >(val4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Bond_yield" "', argument " "5"" of type '" "Frequency""'");
    } 
    arg5 = static_cast< Frequency >(val5);
    {
      try {
        result = (Real)BondPtr_yield__SWIG_3(arg1,arg2,(DayCounter const &)*arg3,arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Bond_yield) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
    if (items == 8) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 7;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_7:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Bond_yield__SWIG_2); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Bond_yield__SWIG_1); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Bond_yield__SWIG_6); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Bond_yield__SWIG_0); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Bond_yield__SWIG_5); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Bond_yield__SWIG_4); return;
    case 7:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Bond_yield__SWIG_3); return;
    }
  }
  
  croak("No matching function for overloaded 'Bond_yield'");
  XSRETURN(0);
}


XS(_wrap_Bond_accruedAmount__SWIG_0) {
  {
    BondPtr *arg1 = (BondPtr *) 0 ;
    Date *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Bond_accruedAmount(self,settlement);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BondPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Bond_accruedAmount" "', argument " "1"" of type '" "BondPtr *""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Bond_accruedAmount" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Bond_accruedAmount" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    {
      try {
        result = (Real)BondPtr_accruedAmount__SWIG_0(arg1,(Date const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Bond_accruedAmount__SWIG_1) {
  {
    BondPtr *arg1 = (BondPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Bond_accruedAmount(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BondPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Bond_accruedAmount" "', argument " "1"" of type '" "BondPtr *""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    {
      try {
        result = (Real)BondPtr_accruedAmount__SWIG_0(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Bond_accruedAmount) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Bond_accruedAmount__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Bond_accruedAmount__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'Bond_accruedAmount'");
  XSRETURN(0);
}


XS(_wrap_Bond_settlementValue__SWIG_0) {
  {
    BondPtr *arg1 = (BondPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Bond_settlementValue(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BondPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Bond_settlementValue" "', argument " "1"" of type '" "BondPtr const *""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    {
      try {
        result = (Real)BondPtr_settlementValue__SWIG_0((BondPtr const *)arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Bond_settlementValue__SWIG_1) {
  {
    BondPtr *arg1 = (BondPtr *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Bond_settlementValue(self,cleanPrice);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BondPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Bond_settlementValue" "', argument " "1"" of type '" "BondPtr const *""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Bond_settlementValue" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (Real)BondPtr_settlementValue__SWIG_1((BondPtr const *)arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Bond_settlementValue) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Bond_settlementValue__SWIG_0); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Bond_settlementValue__SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded 'Bond_settlementValue'");
  XSRETURN(0);
}


XS(_wrap_delete_Bond) {
  {
    BondPtr *arg1 = (BondPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Bond(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BondPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Bond" "', argument " "1"" of type '" "BondPtr *""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_cleanPriceFromZSpread__SWIG_0) {
  {
    BondPtr *arg1 = 0 ;
    boost::shared_ptr< YieldTermStructure > *arg2 = 0 ;
    Spread arg3 ;
    DayCounter *arg4 = 0 ;
    Compounding arg5 ;
    Frequency arg6 ;
    Date *arg7 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: cleanPriceFromZSpread(bond,discountCurve,zSpread,dc,compounding,freq,settlementDate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cleanPriceFromZSpread" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "cleanPriceFromZSpread" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cleanPriceFromZSpread" "', argument " "2"" of type '" "boost::shared_ptr< YieldTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "cleanPriceFromZSpread" "', argument " "2"" of type '" "boost::shared_ptr< YieldTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< boost::shared_ptr< YieldTermStructure > * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cleanPriceFromZSpread" "', argument " "3"" of type '" "Spread""'");
    } 
    arg3 = static_cast< Spread >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "cleanPriceFromZSpread" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "cleanPriceFromZSpread" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "cleanPriceFromZSpread" "', argument " "5"" of type '" "Compounding""'");
    } 
    arg5 = static_cast< Compounding >(val5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cleanPriceFromZSpread" "', argument " "6"" of type '" "Frequency""'");
    } 
    arg6 = static_cast< Frequency >(val6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "cleanPriceFromZSpread" "', argument " "7"" of type '" "Date const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "cleanPriceFromZSpread" "', argument " "7"" of type '" "Date const &""'"); 
    }
    arg7 = reinterpret_cast< Date * >(argp7);
    {
      try {
        result = (Real)cleanPriceFromZSpread((BondPtr const &)*arg1,(boost::shared_ptr< YieldTermStructure > const &)*arg2,arg3,(DayCounter const &)*arg4,arg5,arg6,(Date const &)*arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_cleanPriceFromZSpread__SWIG_1) {
  {
    BondPtr *arg1 = 0 ;
    boost::shared_ptr< YieldTermStructure > *arg2 = 0 ;
    Spread arg3 ;
    DayCounter *arg4 = 0 ;
    Compounding arg5 ;
    Frequency arg6 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: cleanPriceFromZSpread(bond,discountCurve,zSpread,dc,compounding,freq);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cleanPriceFromZSpread" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "cleanPriceFromZSpread" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cleanPriceFromZSpread" "', argument " "2"" of type '" "boost::shared_ptr< YieldTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "cleanPriceFromZSpread" "', argument " "2"" of type '" "boost::shared_ptr< YieldTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< boost::shared_ptr< YieldTermStructure > * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cleanPriceFromZSpread" "', argument " "3"" of type '" "Spread""'");
    } 
    arg3 = static_cast< Spread >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "cleanPriceFromZSpread" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "cleanPriceFromZSpread" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "cleanPriceFromZSpread" "', argument " "5"" of type '" "Compounding""'");
    } 
    arg5 = static_cast< Compounding >(val5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "cleanPriceFromZSpread" "', argument " "6"" of type '" "Frequency""'");
    } 
    arg6 = static_cast< Frequency >(val6);
    {
      try {
        result = (Real)cleanPriceFromZSpread((BondPtr const &)*arg1,(boost::shared_ptr< YieldTermStructure > const &)*arg2,arg3,(DayCounter const &)*arg4,arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_cleanPriceFromZSpread) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_cleanPriceFromZSpread__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_cleanPriceFromZSpread__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'cleanPriceFromZSpread'");
  XSRETURN(0);
}


XS(_wrap_new_ZeroCouponBond__SWIG_0) {
  {
    Natural arg1 ;
    Calendar *arg2 = 0 ;
    Real arg3 ;
    Date *arg4 = 0 ;
    BusinessDayConvention arg5 ;
    Real arg6 ;
    Date *arg7 = 0 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    double val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    int argvi = 0;
    ZeroCouponBondPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: new_ZeroCouponBond(settlementDays,calendar,faceAmount,maturityDate,paymentConvention,redemption,issueDate);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ZeroCouponBond" "', argument " "1"" of type '" "Natural""'");
    } 
    arg1 = static_cast< Natural >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ZeroCouponBond" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ZeroCouponBond" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_ZeroCouponBond" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_ZeroCouponBond" "', argument " "4"" of type '" "Date const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ZeroCouponBond" "', argument " "4"" of type '" "Date const &""'"); 
    }
    arg4 = reinterpret_cast< Date * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_ZeroCouponBond" "', argument " "5"" of type '" "BusinessDayConvention""'");
    } 
    arg5 = static_cast< BusinessDayConvention >(val5);
    ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_ZeroCouponBond" "', argument " "6"" of type '" "Real""'");
    } 
    arg6 = static_cast< Real >(val6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_ZeroCouponBond" "', argument " "7"" of type '" "Date const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ZeroCouponBond" "', argument " "7"" of type '" "Date const &""'"); 
    }
    arg7 = reinterpret_cast< Date * >(argp7);
    {
      try {
        result = (ZeroCouponBondPtr *)new_ZeroCouponBondPtr__SWIG_0(arg1,(Calendar const &)*arg2,arg3,(Date const &)*arg4,arg5,arg6,(Date const &)*arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ZeroCouponBondPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ZeroCouponBond__SWIG_1) {
  {
    Natural arg1 ;
    Calendar *arg2 = 0 ;
    Real arg3 ;
    Date *arg4 = 0 ;
    BusinessDayConvention arg5 ;
    Real arg6 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    double val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    ZeroCouponBondPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_ZeroCouponBond(settlementDays,calendar,faceAmount,maturityDate,paymentConvention,redemption);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ZeroCouponBond" "', argument " "1"" of type '" "Natural""'");
    } 
    arg1 = static_cast< Natural >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ZeroCouponBond" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ZeroCouponBond" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_ZeroCouponBond" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_ZeroCouponBond" "', argument " "4"" of type '" "Date const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ZeroCouponBond" "', argument " "4"" of type '" "Date const &""'"); 
    }
    arg4 = reinterpret_cast< Date * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_ZeroCouponBond" "', argument " "5"" of type '" "BusinessDayConvention""'");
    } 
    arg5 = static_cast< BusinessDayConvention >(val5);
    ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_ZeroCouponBond" "', argument " "6"" of type '" "Real""'");
    } 
    arg6 = static_cast< Real >(val6);
    {
      try {
        result = (ZeroCouponBondPtr *)new_ZeroCouponBondPtr__SWIG_0(arg1,(Calendar const &)*arg2,arg3,(Date const &)*arg4,arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ZeroCouponBondPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ZeroCouponBond__SWIG_2) {
  {
    Natural arg1 ;
    Calendar *arg2 = 0 ;
    Real arg3 ;
    Date *arg4 = 0 ;
    BusinessDayConvention arg5 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    ZeroCouponBondPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_ZeroCouponBond(settlementDays,calendar,faceAmount,maturityDate,paymentConvention);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ZeroCouponBond" "', argument " "1"" of type '" "Natural""'");
    } 
    arg1 = static_cast< Natural >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ZeroCouponBond" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ZeroCouponBond" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_ZeroCouponBond" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_ZeroCouponBond" "', argument " "4"" of type '" "Date const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ZeroCouponBond" "', argument " "4"" of type '" "Date const &""'"); 
    }
    arg4 = reinterpret_cast< Date * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_ZeroCouponBond" "', argument " "5"" of type '" "BusinessDayConvention""'");
    } 
    arg5 = static_cast< BusinessDayConvention >(val5);
    {
      try {
        result = (ZeroCouponBondPtr *)new_ZeroCouponBondPtr__SWIG_0(arg1,(Calendar const &)*arg2,arg3,(Date const &)*arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ZeroCouponBondPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ZeroCouponBond__SWIG_3) {
  {
    Natural arg1 ;
    Calendar *arg2 = 0 ;
    Real arg3 ;
    Date *arg4 = 0 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int argvi = 0;
    ZeroCouponBondPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_ZeroCouponBond(settlementDays,calendar,faceAmount,maturityDate);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ZeroCouponBond" "', argument " "1"" of type '" "Natural""'");
    } 
    arg1 = static_cast< Natural >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ZeroCouponBond" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ZeroCouponBond" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_ZeroCouponBond" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_ZeroCouponBond" "', argument " "4"" of type '" "Date const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ZeroCouponBond" "', argument " "4"" of type '" "Date const &""'"); 
    }
    arg4 = reinterpret_cast< Date * >(argp4);
    {
      try {
        result = (ZeroCouponBondPtr *)new_ZeroCouponBondPtr__SWIG_0(arg1,(Calendar const &)*arg2,arg3,(Date const &)*arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ZeroCouponBondPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ZeroCouponBond) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ZeroCouponBond__SWIG_3); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ZeroCouponBond__SWIG_2); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ZeroCouponBond__SWIG_1); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ZeroCouponBond__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_ZeroCouponBond'");
  XSRETURN(0);
}


XS(_wrap_delete_ZeroCouponBond) {
  {
    ZeroCouponBondPtr *arg1 = (ZeroCouponBondPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_ZeroCouponBond(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ZeroCouponBondPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ZeroCouponBond" "', argument " "1"" of type '" "ZeroCouponBondPtr *""'"); 
    }
    arg1 = reinterpret_cast< ZeroCouponBondPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FixedRateBond__SWIG_0) {
  {
    Integer arg1 ;
    Real arg2 ;
    Schedule *arg3 = 0 ;
    std::vector< Rate > *arg4 = 0 ;
    DayCounter *arg5 = 0 ;
    BusinessDayConvention arg6 ;
    Real arg7 ;
    Date arg8 ;
    Calendar *arg9 = 0 ;
    Period *arg10 = 0 ;
    Calendar *arg11 = 0 ;
    BusinessDayConvention arg12 ;
    bool arg13 ;
    int val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    std::vector< double > temp4 ;
    std::vector< double > *v4 ;
    void *argp5 ;
    int res5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    double val7 ;
    int ecode7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    void *argp10 ;
    int res10 = 0 ;
    void *argp11 ;
    int res11 = 0 ;
    int val12 ;
    int ecode12 = 0 ;
    bool val13 ;
    int ecode13 = 0 ;
    int argvi = 0;
    FixedRateBondPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 13) || (items > 13)) {
      SWIG_croak("Usage: new_FixedRateBond(settlementDays,faceAmount,schedule,coupons,paymentDayCounter,paymentConvention,redemption,issueDate,paymentCalendar,exCouponPeriod,exCouponCalendar,exCouponConvention,exCouponEndOfMonth);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FixedRateBond" "', argument " "1"" of type '" "Integer""'");
    } 
    arg1 = static_cast< Integer >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FixedRateBond" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FixedRateBond" "', argument " "3"" of type '" "Schedule const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBond" "', argument " "3"" of type '" "Schedule const &""'"); 
    }
    arg3 = reinterpret_cast< Schedule * >(argp3);
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of new_FixedRateBond. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp4.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 4 of "
              "new_FixedRateBond. "
              "Expected an array of ""double");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of new_FixedRateBond. "
          "Expected an array of ""double");
      }
    }
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_FixedRateBond" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBond" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    arg5 = reinterpret_cast< DayCounter * >(argp5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_FixedRateBond" "', argument " "6"" of type '" "BusinessDayConvention""'");
    } 
    arg6 = static_cast< BusinessDayConvention >(val6);
    ecode7 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_FixedRateBond" "', argument " "7"" of type '" "Real""'");
    } 
    arg7 = static_cast< Real >(val7);
    {
      res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res8)) {
        SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_FixedRateBond" "', argument " "8"" of type '" "Date""'"); 
      }  
      if (!argp8) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBond" "', argument " "8"" of type '" "Date""'");
      } else {
        arg8 = *(reinterpret_cast< Date * >(argp8));
      }
    }
    res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res9)) {
      SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_FixedRateBond" "', argument " "9"" of type '" "Calendar const &""'"); 
    }
    if (!argp9) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBond" "', argument " "9"" of type '" "Calendar const &""'"); 
    }
    arg9 = reinterpret_cast< Calendar * >(argp9);
    res10 = SWIG_ConvertPtr(ST(9), &argp10, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res10)) {
      SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "new_FixedRateBond" "', argument " "10"" of type '" "Period const &""'"); 
    }
    if (!argp10) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBond" "', argument " "10"" of type '" "Period const &""'"); 
    }
    arg10 = reinterpret_cast< Period * >(argp10);
    res11 = SWIG_ConvertPtr(ST(10), &argp11, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res11)) {
      SWIG_exception_fail(SWIG_ArgError(res11), "in method '" "new_FixedRateBond" "', argument " "11"" of type '" "Calendar const &""'"); 
    }
    if (!argp11) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBond" "', argument " "11"" of type '" "Calendar const &""'"); 
    }
    arg11 = reinterpret_cast< Calendar * >(argp11);
    ecode12 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(11), &val12);
    if (!SWIG_IsOK(ecode12)) {
      SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "new_FixedRateBond" "', argument " "12"" of type '" "BusinessDayConvention""'");
    } 
    arg12 = static_cast< BusinessDayConvention >(val12);
    ecode13 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(12), &val13);
    if (!SWIG_IsOK(ecode13)) {
      SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "new_FixedRateBond" "', argument " "13"" of type '" "bool""'");
    } 
    arg13 = static_cast< bool >(val13);
    {
      try {
        result = (FixedRateBondPtr *)new_FixedRateBondPtr__SWIG_0(arg1,arg2,(Schedule const &)*arg3,(std::vector< double > const &)*arg4,(DayCounter const &)*arg5,arg6,arg7,arg8,(Calendar const &)*arg9,(Period const &)*arg10,(Calendar const &)*arg11,arg12,arg13);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FixedRateBondPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FixedRateBond__SWIG_1) {
  {
    Integer arg1 ;
    Real arg2 ;
    Schedule *arg3 = 0 ;
    std::vector< Rate > *arg4 = 0 ;
    DayCounter *arg5 = 0 ;
    BusinessDayConvention arg6 ;
    Real arg7 ;
    Date arg8 ;
    Calendar *arg9 = 0 ;
    Period *arg10 = 0 ;
    Calendar *arg11 = 0 ;
    BusinessDayConvention arg12 ;
    int val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    std::vector< double > temp4 ;
    std::vector< double > *v4 ;
    void *argp5 ;
    int res5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    double val7 ;
    int ecode7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    void *argp10 ;
    int res10 = 0 ;
    void *argp11 ;
    int res11 = 0 ;
    int val12 ;
    int ecode12 = 0 ;
    int argvi = 0;
    FixedRateBondPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 12) || (items > 12)) {
      SWIG_croak("Usage: new_FixedRateBond(settlementDays,faceAmount,schedule,coupons,paymentDayCounter,paymentConvention,redemption,issueDate,paymentCalendar,exCouponPeriod,exCouponCalendar,exCouponConvention);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FixedRateBond" "', argument " "1"" of type '" "Integer""'");
    } 
    arg1 = static_cast< Integer >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FixedRateBond" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FixedRateBond" "', argument " "3"" of type '" "Schedule const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBond" "', argument " "3"" of type '" "Schedule const &""'"); 
    }
    arg3 = reinterpret_cast< Schedule * >(argp3);
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of new_FixedRateBond. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp4.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 4 of "
              "new_FixedRateBond. "
              "Expected an array of ""double");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of new_FixedRateBond. "
          "Expected an array of ""double");
      }
    }
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_FixedRateBond" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBond" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    arg5 = reinterpret_cast< DayCounter * >(argp5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_FixedRateBond" "', argument " "6"" of type '" "BusinessDayConvention""'");
    } 
    arg6 = static_cast< BusinessDayConvention >(val6);
    ecode7 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_FixedRateBond" "', argument " "7"" of type '" "Real""'");
    } 
    arg7 = static_cast< Real >(val7);
    {
      res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res8)) {
        SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_FixedRateBond" "', argument " "8"" of type '" "Date""'"); 
      }  
      if (!argp8) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBond" "', argument " "8"" of type '" "Date""'");
      } else {
        arg8 = *(reinterpret_cast< Date * >(argp8));
      }
    }
    res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res9)) {
      SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_FixedRateBond" "', argument " "9"" of type '" "Calendar const &""'"); 
    }
    if (!argp9) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBond" "', argument " "9"" of type '" "Calendar const &""'"); 
    }
    arg9 = reinterpret_cast< Calendar * >(argp9);
    res10 = SWIG_ConvertPtr(ST(9), &argp10, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res10)) {
      SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "new_FixedRateBond" "', argument " "10"" of type '" "Period const &""'"); 
    }
    if (!argp10) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBond" "', argument " "10"" of type '" "Period const &""'"); 
    }
    arg10 = reinterpret_cast< Period * >(argp10);
    res11 = SWIG_ConvertPtr(ST(10), &argp11, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res11)) {
      SWIG_exception_fail(SWIG_ArgError(res11), "in method '" "new_FixedRateBond" "', argument " "11"" of type '" "Calendar const &""'"); 
    }
    if (!argp11) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBond" "', argument " "11"" of type '" "Calendar const &""'"); 
    }
    arg11 = reinterpret_cast< Calendar * >(argp11);
    ecode12 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(11), &val12);
    if (!SWIG_IsOK(ecode12)) {
      SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "new_FixedRateBond" "', argument " "12"" of type '" "BusinessDayConvention""'");
    } 
    arg12 = static_cast< BusinessDayConvention >(val12);
    {
      try {
        result = (FixedRateBondPtr *)new_FixedRateBondPtr__SWIG_0(arg1,arg2,(Schedule const &)*arg3,(std::vector< double > const &)*arg4,(DayCounter const &)*arg5,arg6,arg7,arg8,(Calendar const &)*arg9,(Period const &)*arg10,(Calendar const &)*arg11,arg12);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FixedRateBondPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FixedRateBond__SWIG_2) {
  {
    Integer arg1 ;
    Real arg2 ;
    Schedule *arg3 = 0 ;
    std::vector< Rate > *arg4 = 0 ;
    DayCounter *arg5 = 0 ;
    BusinessDayConvention arg6 ;
    Real arg7 ;
    Date arg8 ;
    Calendar *arg9 = 0 ;
    Period *arg10 = 0 ;
    Calendar *arg11 = 0 ;
    int val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    std::vector< double > temp4 ;
    std::vector< double > *v4 ;
    void *argp5 ;
    int res5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    double val7 ;
    int ecode7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    void *argp10 ;
    int res10 = 0 ;
    void *argp11 ;
    int res11 = 0 ;
    int argvi = 0;
    FixedRateBondPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 11) || (items > 11)) {
      SWIG_croak("Usage: new_FixedRateBond(settlementDays,faceAmount,schedule,coupons,paymentDayCounter,paymentConvention,redemption,issueDate,paymentCalendar,exCouponPeriod,exCouponCalendar);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FixedRateBond" "', argument " "1"" of type '" "Integer""'");
    } 
    arg1 = static_cast< Integer >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FixedRateBond" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FixedRateBond" "', argument " "3"" of type '" "Schedule const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBond" "', argument " "3"" of type '" "Schedule const &""'"); 
    }
    arg3 = reinterpret_cast< Schedule * >(argp3);
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of new_FixedRateBond. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp4.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 4 of "
              "new_FixedRateBond. "
              "Expected an array of ""double");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of new_FixedRateBond. "
          "Expected an array of ""double");
      }
    }
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_FixedRateBond" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBond" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    arg5 = reinterpret_cast< DayCounter * >(argp5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_FixedRateBond" "', argument " "6"" of type '" "BusinessDayConvention""'");
    } 
    arg6 = static_cast< BusinessDayConvention >(val6);
    ecode7 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_FixedRateBond" "', argument " "7"" of type '" "Real""'");
    } 
    arg7 = static_cast< Real >(val7);
    {
      res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res8)) {
        SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_FixedRateBond" "', argument " "8"" of type '" "Date""'"); 
      }  
      if (!argp8) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBond" "', argument " "8"" of type '" "Date""'");
      } else {
        arg8 = *(reinterpret_cast< Date * >(argp8));
      }
    }
    res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res9)) {
      SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_FixedRateBond" "', argument " "9"" of type '" "Calendar const &""'"); 
    }
    if (!argp9) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBond" "', argument " "9"" of type '" "Calendar const &""'"); 
    }
    arg9 = reinterpret_cast< Calendar * >(argp9);
    res10 = SWIG_ConvertPtr(ST(9), &argp10, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res10)) {
      SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "new_FixedRateBond" "', argument " "10"" of type '" "Period const &""'"); 
    }
    if (!argp10) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBond" "', argument " "10"" of type '" "Period const &""'"); 
    }
    arg10 = reinterpret_cast< Period * >(argp10);
    res11 = SWIG_ConvertPtr(ST(10), &argp11, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res11)) {
      SWIG_exception_fail(SWIG_ArgError(res11), "in method '" "new_FixedRateBond" "', argument " "11"" of type '" "Calendar const &""'"); 
    }
    if (!argp11) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBond" "', argument " "11"" of type '" "Calendar const &""'"); 
    }
    arg11 = reinterpret_cast< Calendar * >(argp11);
    {
      try {
        result = (FixedRateBondPtr *)new_FixedRateBondPtr__SWIG_0(arg1,arg2,(Schedule const &)*arg3,(std::vector< double > const &)*arg4,(DayCounter const &)*arg5,arg6,arg7,arg8,(Calendar const &)*arg9,(Period const &)*arg10,(Calendar const &)*arg11);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FixedRateBondPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FixedRateBond__SWIG_3) {
  {
    Integer arg1 ;
    Real arg2 ;
    Schedule *arg3 = 0 ;
    std::vector< Rate > *arg4 = 0 ;
    DayCounter *arg5 = 0 ;
    BusinessDayConvention arg6 ;
    Real arg7 ;
    Date arg8 ;
    Calendar *arg9 = 0 ;
    Period *arg10 = 0 ;
    int val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    std::vector< double > temp4 ;
    std::vector< double > *v4 ;
    void *argp5 ;
    int res5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    double val7 ;
    int ecode7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    void *argp10 ;
    int res10 = 0 ;
    int argvi = 0;
    FixedRateBondPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 10) || (items > 10)) {
      SWIG_croak("Usage: new_FixedRateBond(settlementDays,faceAmount,schedule,coupons,paymentDayCounter,paymentConvention,redemption,issueDate,paymentCalendar,exCouponPeriod);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FixedRateBond" "', argument " "1"" of type '" "Integer""'");
    } 
    arg1 = static_cast< Integer >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FixedRateBond" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FixedRateBond" "', argument " "3"" of type '" "Schedule const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBond" "', argument " "3"" of type '" "Schedule const &""'"); 
    }
    arg3 = reinterpret_cast< Schedule * >(argp3);
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of new_FixedRateBond. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp4.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 4 of "
              "new_FixedRateBond. "
              "Expected an array of ""double");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of new_FixedRateBond. "
          "Expected an array of ""double");
      }
    }
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_FixedRateBond" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBond" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    arg5 = reinterpret_cast< DayCounter * >(argp5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_FixedRateBond" "', argument " "6"" of type '" "BusinessDayConvention""'");
    } 
    arg6 = static_cast< BusinessDayConvention >(val6);
    ecode7 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_FixedRateBond" "', argument " "7"" of type '" "Real""'");
    } 
    arg7 = static_cast< Real >(val7);
    {
      res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res8)) {
        SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_FixedRateBond" "', argument " "8"" of type '" "Date""'"); 
      }  
      if (!argp8) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBond" "', argument " "8"" of type '" "Date""'");
      } else {
        arg8 = *(reinterpret_cast< Date * >(argp8));
      }
    }
    res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res9)) {
      SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_FixedRateBond" "', argument " "9"" of type '" "Calendar const &""'"); 
    }
    if (!argp9) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBond" "', argument " "9"" of type '" "Calendar const &""'"); 
    }
    arg9 = reinterpret_cast< Calendar * >(argp9);
    res10 = SWIG_ConvertPtr(ST(9), &argp10, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res10)) {
      SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "new_FixedRateBond" "', argument " "10"" of type '" "Period const &""'"); 
    }
    if (!argp10) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBond" "', argument " "10"" of type '" "Period const &""'"); 
    }
    arg10 = reinterpret_cast< Period * >(argp10);
    {
      try {
        result = (FixedRateBondPtr *)new_FixedRateBondPtr__SWIG_0(arg1,arg2,(Schedule const &)*arg3,(std::vector< double > const &)*arg4,(DayCounter const &)*arg5,arg6,arg7,arg8,(Calendar const &)*arg9,(Period const &)*arg10);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FixedRateBondPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FixedRateBond__SWIG_4) {
  {
    Integer arg1 ;
    Real arg2 ;
    Schedule *arg3 = 0 ;
    std::vector< Rate > *arg4 = 0 ;
    DayCounter *arg5 = 0 ;
    BusinessDayConvention arg6 ;
    Real arg7 ;
    Date arg8 ;
    Calendar *arg9 = 0 ;
    int val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    std::vector< double > temp4 ;
    std::vector< double > *v4 ;
    void *argp5 ;
    int res5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    double val7 ;
    int ecode7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    int argvi = 0;
    FixedRateBondPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 9) || (items > 9)) {
      SWIG_croak("Usage: new_FixedRateBond(settlementDays,faceAmount,schedule,coupons,paymentDayCounter,paymentConvention,redemption,issueDate,paymentCalendar);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FixedRateBond" "', argument " "1"" of type '" "Integer""'");
    } 
    arg1 = static_cast< Integer >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FixedRateBond" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FixedRateBond" "', argument " "3"" of type '" "Schedule const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBond" "', argument " "3"" of type '" "Schedule const &""'"); 
    }
    arg3 = reinterpret_cast< Schedule * >(argp3);
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of new_FixedRateBond. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp4.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 4 of "
              "new_FixedRateBond. "
              "Expected an array of ""double");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of new_FixedRateBond. "
          "Expected an array of ""double");
      }
    }
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_FixedRateBond" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBond" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    arg5 = reinterpret_cast< DayCounter * >(argp5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_FixedRateBond" "', argument " "6"" of type '" "BusinessDayConvention""'");
    } 
    arg6 = static_cast< BusinessDayConvention >(val6);
    ecode7 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_FixedRateBond" "', argument " "7"" of type '" "Real""'");
    } 
    arg7 = static_cast< Real >(val7);
    {
      res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res8)) {
        SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_FixedRateBond" "', argument " "8"" of type '" "Date""'"); 
      }  
      if (!argp8) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBond" "', argument " "8"" of type '" "Date""'");
      } else {
        arg8 = *(reinterpret_cast< Date * >(argp8));
      }
    }
    res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res9)) {
      SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_FixedRateBond" "', argument " "9"" of type '" "Calendar const &""'"); 
    }
    if (!argp9) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBond" "', argument " "9"" of type '" "Calendar const &""'"); 
    }
    arg9 = reinterpret_cast< Calendar * >(argp9);
    {
      try {
        result = (FixedRateBondPtr *)new_FixedRateBondPtr__SWIG_0(arg1,arg2,(Schedule const &)*arg3,(std::vector< double > const &)*arg4,(DayCounter const &)*arg5,arg6,arg7,arg8,(Calendar const &)*arg9);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FixedRateBondPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FixedRateBond__SWIG_5) {
  {
    Integer arg1 ;
    Real arg2 ;
    Schedule *arg3 = 0 ;
    std::vector< Rate > *arg4 = 0 ;
    DayCounter *arg5 = 0 ;
    BusinessDayConvention arg6 ;
    Real arg7 ;
    Date arg8 ;
    int val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    std::vector< double > temp4 ;
    std::vector< double > *v4 ;
    void *argp5 ;
    int res5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    double val7 ;
    int ecode7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    int argvi = 0;
    FixedRateBondPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 8) || (items > 8)) {
      SWIG_croak("Usage: new_FixedRateBond(settlementDays,faceAmount,schedule,coupons,paymentDayCounter,paymentConvention,redemption,issueDate);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FixedRateBond" "', argument " "1"" of type '" "Integer""'");
    } 
    arg1 = static_cast< Integer >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FixedRateBond" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FixedRateBond" "', argument " "3"" of type '" "Schedule const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBond" "', argument " "3"" of type '" "Schedule const &""'"); 
    }
    arg3 = reinterpret_cast< Schedule * >(argp3);
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of new_FixedRateBond. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp4.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 4 of "
              "new_FixedRateBond. "
              "Expected an array of ""double");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of new_FixedRateBond. "
          "Expected an array of ""double");
      }
    }
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_FixedRateBond" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBond" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    arg5 = reinterpret_cast< DayCounter * >(argp5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_FixedRateBond" "', argument " "6"" of type '" "BusinessDayConvention""'");
    } 
    arg6 = static_cast< BusinessDayConvention >(val6);
    ecode7 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_FixedRateBond" "', argument " "7"" of type '" "Real""'");
    } 
    arg7 = static_cast< Real >(val7);
    {
      res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res8)) {
        SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_FixedRateBond" "', argument " "8"" of type '" "Date""'"); 
      }  
      if (!argp8) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBond" "', argument " "8"" of type '" "Date""'");
      } else {
        arg8 = *(reinterpret_cast< Date * >(argp8));
      }
    }
    {
      try {
        result = (FixedRateBondPtr *)new_FixedRateBondPtr__SWIG_0(arg1,arg2,(Schedule const &)*arg3,(std::vector< double > const &)*arg4,(DayCounter const &)*arg5,arg6,arg7,arg8);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FixedRateBondPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FixedRateBond__SWIG_6) {
  {
    Integer arg1 ;
    Real arg2 ;
    Schedule *arg3 = 0 ;
    std::vector< Rate > *arg4 = 0 ;
    DayCounter *arg5 = 0 ;
    BusinessDayConvention arg6 ;
    Real arg7 ;
    int val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    std::vector< double > temp4 ;
    std::vector< double > *v4 ;
    void *argp5 ;
    int res5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    double val7 ;
    int ecode7 = 0 ;
    int argvi = 0;
    FixedRateBondPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: new_FixedRateBond(settlementDays,faceAmount,schedule,coupons,paymentDayCounter,paymentConvention,redemption);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FixedRateBond" "', argument " "1"" of type '" "Integer""'");
    } 
    arg1 = static_cast< Integer >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FixedRateBond" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FixedRateBond" "', argument " "3"" of type '" "Schedule const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBond" "', argument " "3"" of type '" "Schedule const &""'"); 
    }
    arg3 = reinterpret_cast< Schedule * >(argp3);
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of new_FixedRateBond. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp4.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 4 of "
              "new_FixedRateBond. "
              "Expected an array of ""double");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of new_FixedRateBond. "
          "Expected an array of ""double");
      }
    }
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_FixedRateBond" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBond" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    arg5 = reinterpret_cast< DayCounter * >(argp5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_FixedRateBond" "', argument " "6"" of type '" "BusinessDayConvention""'");
    } 
    arg6 = static_cast< BusinessDayConvention >(val6);
    ecode7 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_FixedRateBond" "', argument " "7"" of type '" "Real""'");
    } 
    arg7 = static_cast< Real >(val7);
    {
      try {
        result = (FixedRateBondPtr *)new_FixedRateBondPtr__SWIG_0(arg1,arg2,(Schedule const &)*arg3,(std::vector< double > const &)*arg4,(DayCounter const &)*arg5,arg6,arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FixedRateBondPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FixedRateBond__SWIG_7) {
  {
    Integer arg1 ;
    Real arg2 ;
    Schedule *arg3 = 0 ;
    std::vector< Rate > *arg4 = 0 ;
    DayCounter *arg5 = 0 ;
    BusinessDayConvention arg6 ;
    int val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    std::vector< double > temp4 ;
    std::vector< double > *v4 ;
    void *argp5 ;
    int res5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    FixedRateBondPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_FixedRateBond(settlementDays,faceAmount,schedule,coupons,paymentDayCounter,paymentConvention);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FixedRateBond" "', argument " "1"" of type '" "Integer""'");
    } 
    arg1 = static_cast< Integer >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FixedRateBond" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FixedRateBond" "', argument " "3"" of type '" "Schedule const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBond" "', argument " "3"" of type '" "Schedule const &""'"); 
    }
    arg3 = reinterpret_cast< Schedule * >(argp3);
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of new_FixedRateBond. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp4.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 4 of "
              "new_FixedRateBond. "
              "Expected an array of ""double");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of new_FixedRateBond. "
          "Expected an array of ""double");
      }
    }
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_FixedRateBond" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBond" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    arg5 = reinterpret_cast< DayCounter * >(argp5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_FixedRateBond" "', argument " "6"" of type '" "BusinessDayConvention""'");
    } 
    arg6 = static_cast< BusinessDayConvention >(val6);
    {
      try {
        result = (FixedRateBondPtr *)new_FixedRateBondPtr__SWIG_0(arg1,arg2,(Schedule const &)*arg3,(std::vector< double > const &)*arg4,(DayCounter const &)*arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FixedRateBondPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FixedRateBond__SWIG_8) {
  {
    Integer arg1 ;
    Real arg2 ;
    Schedule *arg3 = 0 ;
    std::vector< Rate > *arg4 = 0 ;
    DayCounter *arg5 = 0 ;
    int val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    std::vector< double > temp4 ;
    std::vector< double > *v4 ;
    void *argp5 ;
    int res5 = 0 ;
    int argvi = 0;
    FixedRateBondPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_FixedRateBond(settlementDays,faceAmount,schedule,coupons,paymentDayCounter);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FixedRateBond" "', argument " "1"" of type '" "Integer""'");
    } 
    arg1 = static_cast< Integer >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FixedRateBond" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FixedRateBond" "', argument " "3"" of type '" "Schedule const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBond" "', argument " "3"" of type '" "Schedule const &""'"); 
    }
    arg3 = reinterpret_cast< Schedule * >(argp3);
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of new_FixedRateBond. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp4.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 4 of "
              "new_FixedRateBond. "
              "Expected an array of ""double");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of new_FixedRateBond. "
          "Expected an array of ""double");
      }
    }
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_FixedRateBond" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBond" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    arg5 = reinterpret_cast< DayCounter * >(argp5);
    {
      try {
        result = (FixedRateBondPtr *)new_FixedRateBondPtr__SWIG_0(arg1,arg2,(Schedule const &)*arg3,(std::vector< double > const &)*arg4,(DayCounter const &)*arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FixedRateBondPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FixedRateBond__SWIG_9) {
  {
    Integer arg1 ;
    Real arg2 ;
    Schedule *arg3 = 0 ;
    std::vector< InterestRate > *arg4 = 0 ;
    BusinessDayConvention arg5 ;
    Real arg6 ;
    Date *arg7 = 0 ;
    Calendar *arg8 = 0 ;
    Period *arg9 = 0 ;
    Calendar *arg10 = 0 ;
    BusinessDayConvention arg11 ;
    bool arg12 ;
    int val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    std::vector< InterestRate > temp4 ;
    std::vector< InterestRate > *v4 ;
    int val5 ;
    int ecode5 = 0 ;
    double val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    void *argp10 ;
    int res10 = 0 ;
    int val11 ;
    int ecode11 = 0 ;
    bool val12 ;
    int ecode12 = 0 ;
    int argvi = 0;
    FixedRateBondPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 12) || (items > 12)) {
      SWIG_croak("Usage: new_FixedRateBond(settlementDays,faceAmount,schedule,coupons,paymentConvention,redemption,issueDate,paymentCalendar,exCouponPeriod,exCouponCalendar,exCouponConvention,exCouponEndOfMonth);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FixedRateBond" "', argument " "1"" of type '" "Integer""'");
    } 
    arg1 = static_cast< Integer >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FixedRateBond" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FixedRateBond" "', argument " "3"" of type '" "Schedule const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBond" "', argument " "3"" of type '" "Schedule const &""'"); 
    }
    arg3 = reinterpret_cast< Schedule * >(argp3);
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_InterestRate_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of new_FixedRateBond. "
          "Expected an array of " "InterestRate");
        SV **tv;
        I32 len = av_len(av) + 1;
        InterestRate* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_InterestRate,0) != -1) {
            temp4.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 4 of "
              "new_FixedRateBond. "
              "Expected an array of " "InterestRate");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of new_FixedRateBond. "
          "Expected an array of " "InterestRate");
      }
    }
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_FixedRateBond" "', argument " "5"" of type '" "BusinessDayConvention""'");
    } 
    arg5 = static_cast< BusinessDayConvention >(val5);
    ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_FixedRateBond" "', argument " "6"" of type '" "Real""'");
    } 
    arg6 = static_cast< Real >(val6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_FixedRateBond" "', argument " "7"" of type '" "Date const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBond" "', argument " "7"" of type '" "Date const &""'"); 
    }
    arg7 = reinterpret_cast< Date * >(argp7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_FixedRateBond" "', argument " "8"" of type '" "Calendar const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBond" "', argument " "8"" of type '" "Calendar const &""'"); 
    }
    arg8 = reinterpret_cast< Calendar * >(argp8);
    res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res9)) {
      SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_FixedRateBond" "', argument " "9"" of type '" "Period const &""'"); 
    }
    if (!argp9) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBond" "', argument " "9"" of type '" "Period const &""'"); 
    }
    arg9 = reinterpret_cast< Period * >(argp9);
    res10 = SWIG_ConvertPtr(ST(9), &argp10, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res10)) {
      SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "new_FixedRateBond" "', argument " "10"" of type '" "Calendar const &""'"); 
    }
    if (!argp10) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBond" "', argument " "10"" of type '" "Calendar const &""'"); 
    }
    arg10 = reinterpret_cast< Calendar * >(argp10);
    ecode11 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(10), &val11);
    if (!SWIG_IsOK(ecode11)) {
      SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "new_FixedRateBond" "', argument " "11"" of type '" "BusinessDayConvention""'");
    } 
    arg11 = static_cast< BusinessDayConvention >(val11);
    ecode12 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(11), &val12);
    if (!SWIG_IsOK(ecode12)) {
      SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "new_FixedRateBond" "', argument " "12"" of type '" "bool""'");
    } 
    arg12 = static_cast< bool >(val12);
    {
      try {
        result = (FixedRateBondPtr *)new_FixedRateBondPtr__SWIG_9(arg1,arg2,(Schedule const &)*arg3,(std::vector< InterestRate > const &)*arg4,arg5,arg6,(Date const &)*arg7,(Calendar const &)*arg8,(Period const &)*arg9,(Calendar const &)*arg10,arg11,arg12);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FixedRateBondPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FixedRateBond__SWIG_10) {
  {
    Integer arg1 ;
    Real arg2 ;
    Schedule *arg3 = 0 ;
    std::vector< InterestRate > *arg4 = 0 ;
    BusinessDayConvention arg5 ;
    Real arg6 ;
    Date *arg7 = 0 ;
    Calendar *arg8 = 0 ;
    Period *arg9 = 0 ;
    Calendar *arg10 = 0 ;
    BusinessDayConvention arg11 ;
    int val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    std::vector< InterestRate > temp4 ;
    std::vector< InterestRate > *v4 ;
    int val5 ;
    int ecode5 = 0 ;
    double val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    void *argp10 ;
    int res10 = 0 ;
    int val11 ;
    int ecode11 = 0 ;
    int argvi = 0;
    FixedRateBondPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 11) || (items > 11)) {
      SWIG_croak("Usage: new_FixedRateBond(settlementDays,faceAmount,schedule,coupons,paymentConvention,redemption,issueDate,paymentCalendar,exCouponPeriod,exCouponCalendar,exCouponConvention);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FixedRateBond" "', argument " "1"" of type '" "Integer""'");
    } 
    arg1 = static_cast< Integer >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FixedRateBond" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FixedRateBond" "', argument " "3"" of type '" "Schedule const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBond" "', argument " "3"" of type '" "Schedule const &""'"); 
    }
    arg3 = reinterpret_cast< Schedule * >(argp3);
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_InterestRate_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of new_FixedRateBond. "
          "Expected an array of " "InterestRate");
        SV **tv;
        I32 len = av_len(av) + 1;
        InterestRate* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_InterestRate,0) != -1) {
            temp4.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 4 of "
              "new_FixedRateBond. "
              "Expected an array of " "InterestRate");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of new_FixedRateBond. "
          "Expected an array of " "InterestRate");
      }
    }
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_FixedRateBond" "', argument " "5"" of type '" "BusinessDayConvention""'");
    } 
    arg5 = static_cast< BusinessDayConvention >(val5);
    ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_FixedRateBond" "', argument " "6"" of type '" "Real""'");
    } 
    arg6 = static_cast< Real >(val6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_FixedRateBond" "', argument " "7"" of type '" "Date const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBond" "', argument " "7"" of type '" "Date const &""'"); 
    }
    arg7 = reinterpret_cast< Date * >(argp7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_FixedRateBond" "', argument " "8"" of type '" "Calendar const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBond" "', argument " "8"" of type '" "Calendar const &""'"); 
    }
    arg8 = reinterpret_cast< Calendar * >(argp8);
    res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res9)) {
      SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_FixedRateBond" "', argument " "9"" of type '" "Period const &""'"); 
    }
    if (!argp9) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBond" "', argument " "9"" of type '" "Period const &""'"); 
    }
    arg9 = reinterpret_cast< Period * >(argp9);
    res10 = SWIG_ConvertPtr(ST(9), &argp10, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res10)) {
      SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "new_FixedRateBond" "', argument " "10"" of type '" "Calendar const &""'"); 
    }
    if (!argp10) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBond" "', argument " "10"" of type '" "Calendar const &""'"); 
    }
    arg10 = reinterpret_cast< Calendar * >(argp10);
    ecode11 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(10), &val11);
    if (!SWIG_IsOK(ecode11)) {
      SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "new_FixedRateBond" "', argument " "11"" of type '" "BusinessDayConvention""'");
    } 
    arg11 = static_cast< BusinessDayConvention >(val11);
    {
      try {
        result = (FixedRateBondPtr *)new_FixedRateBondPtr__SWIG_9(arg1,arg2,(Schedule const &)*arg3,(std::vector< InterestRate > const &)*arg4,arg5,arg6,(Date const &)*arg7,(Calendar const &)*arg8,(Period const &)*arg9,(Calendar const &)*arg10,arg11);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FixedRateBondPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FixedRateBond__SWIG_11) {
  {
    Integer arg1 ;
    Real arg2 ;
    Schedule *arg3 = 0 ;
    std::vector< InterestRate > *arg4 = 0 ;
    BusinessDayConvention arg5 ;
    Real arg6 ;
    Date *arg7 = 0 ;
    Calendar *arg8 = 0 ;
    Period *arg9 = 0 ;
    Calendar *arg10 = 0 ;
    int val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    std::vector< InterestRate > temp4 ;
    std::vector< InterestRate > *v4 ;
    int val5 ;
    int ecode5 = 0 ;
    double val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    void *argp10 ;
    int res10 = 0 ;
    int argvi = 0;
    FixedRateBondPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 10) || (items > 10)) {
      SWIG_croak("Usage: new_FixedRateBond(settlementDays,faceAmount,schedule,coupons,paymentConvention,redemption,issueDate,paymentCalendar,exCouponPeriod,exCouponCalendar);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FixedRateBond" "', argument " "1"" of type '" "Integer""'");
    } 
    arg1 = static_cast< Integer >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FixedRateBond" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FixedRateBond" "', argument " "3"" of type '" "Schedule const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBond" "', argument " "3"" of type '" "Schedule const &""'"); 
    }
    arg3 = reinterpret_cast< Schedule * >(argp3);
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_InterestRate_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of new_FixedRateBond. "
          "Expected an array of " "InterestRate");
        SV **tv;
        I32 len = av_len(av) + 1;
        InterestRate* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_InterestRate,0) != -1) {
            temp4.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 4 of "
              "new_FixedRateBond. "
              "Expected an array of " "InterestRate");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of new_FixedRateBond. "
          "Expected an array of " "InterestRate");
      }
    }
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_FixedRateBond" "', argument " "5"" of type '" "BusinessDayConvention""'");
    } 
    arg5 = static_cast< BusinessDayConvention >(val5);
    ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_FixedRateBond" "', argument " "6"" of type '" "Real""'");
    } 
    arg6 = static_cast< Real >(val6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_FixedRateBond" "', argument " "7"" of type '" "Date const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBond" "', argument " "7"" of type '" "Date const &""'"); 
    }
    arg7 = reinterpret_cast< Date * >(argp7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_FixedRateBond" "', argument " "8"" of type '" "Calendar const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBond" "', argument " "8"" of type '" "Calendar const &""'"); 
    }
    arg8 = reinterpret_cast< Calendar * >(argp8);
    res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res9)) {
      SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_FixedRateBond" "', argument " "9"" of type '" "Period const &""'"); 
    }
    if (!argp9) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBond" "', argument " "9"" of type '" "Period const &""'"); 
    }
    arg9 = reinterpret_cast< Period * >(argp9);
    res10 = SWIG_ConvertPtr(ST(9), &argp10, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res10)) {
      SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "new_FixedRateBond" "', argument " "10"" of type '" "Calendar const &""'"); 
    }
    if (!argp10) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBond" "', argument " "10"" of type '" "Calendar const &""'"); 
    }
    arg10 = reinterpret_cast< Calendar * >(argp10);
    {
      try {
        result = (FixedRateBondPtr *)new_FixedRateBondPtr__SWIG_9(arg1,arg2,(Schedule const &)*arg3,(std::vector< InterestRate > const &)*arg4,arg5,arg6,(Date const &)*arg7,(Calendar const &)*arg8,(Period const &)*arg9,(Calendar const &)*arg10);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FixedRateBondPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FixedRateBond__SWIG_12) {
  {
    Integer arg1 ;
    Real arg2 ;
    Schedule *arg3 = 0 ;
    std::vector< InterestRate > *arg4 = 0 ;
    BusinessDayConvention arg5 ;
    Real arg6 ;
    Date *arg7 = 0 ;
    Calendar *arg8 = 0 ;
    Period *arg9 = 0 ;
    int val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    std::vector< InterestRate > temp4 ;
    std::vector< InterestRate > *v4 ;
    int val5 ;
    int ecode5 = 0 ;
    double val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    int argvi = 0;
    FixedRateBondPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 9) || (items > 9)) {
      SWIG_croak("Usage: new_FixedRateBond(settlementDays,faceAmount,schedule,coupons,paymentConvention,redemption,issueDate,paymentCalendar,exCouponPeriod);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FixedRateBond" "', argument " "1"" of type '" "Integer""'");
    } 
    arg1 = static_cast< Integer >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FixedRateBond" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FixedRateBond" "', argument " "3"" of type '" "Schedule const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBond" "', argument " "3"" of type '" "Schedule const &""'"); 
    }
    arg3 = reinterpret_cast< Schedule * >(argp3);
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_InterestRate_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of new_FixedRateBond. "
          "Expected an array of " "InterestRate");
        SV **tv;
        I32 len = av_len(av) + 1;
        InterestRate* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_InterestRate,0) != -1) {
            temp4.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 4 of "
              "new_FixedRateBond. "
              "Expected an array of " "InterestRate");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of new_FixedRateBond. "
          "Expected an array of " "InterestRate");
      }
    }
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_FixedRateBond" "', argument " "5"" of type '" "BusinessDayConvention""'");
    } 
    arg5 = static_cast< BusinessDayConvention >(val5);
    ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_FixedRateBond" "', argument " "6"" of type '" "Real""'");
    } 
    arg6 = static_cast< Real >(val6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_FixedRateBond" "', argument " "7"" of type '" "Date const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBond" "', argument " "7"" of type '" "Date const &""'"); 
    }
    arg7 = reinterpret_cast< Date * >(argp7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_FixedRateBond" "', argument " "8"" of type '" "Calendar const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBond" "', argument " "8"" of type '" "Calendar const &""'"); 
    }
    arg8 = reinterpret_cast< Calendar * >(argp8);
    res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res9)) {
      SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_FixedRateBond" "', argument " "9"" of type '" "Period const &""'"); 
    }
    if (!argp9) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBond" "', argument " "9"" of type '" "Period const &""'"); 
    }
    arg9 = reinterpret_cast< Period * >(argp9);
    {
      try {
        result = (FixedRateBondPtr *)new_FixedRateBondPtr__SWIG_9(arg1,arg2,(Schedule const &)*arg3,(std::vector< InterestRate > const &)*arg4,arg5,arg6,(Date const &)*arg7,(Calendar const &)*arg8,(Period const &)*arg9);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FixedRateBondPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FixedRateBond__SWIG_13) {
  {
    Integer arg1 ;
    Real arg2 ;
    Schedule *arg3 = 0 ;
    std::vector< InterestRate > *arg4 = 0 ;
    BusinessDayConvention arg5 ;
    Real arg6 ;
    Date *arg7 = 0 ;
    Calendar *arg8 = 0 ;
    int val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    std::vector< InterestRate > temp4 ;
    std::vector< InterestRate > *v4 ;
    int val5 ;
    int ecode5 = 0 ;
    double val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    int argvi = 0;
    FixedRateBondPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 8) || (items > 8)) {
      SWIG_croak("Usage: new_FixedRateBond(settlementDays,faceAmount,schedule,coupons,paymentConvention,redemption,issueDate,paymentCalendar);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FixedRateBond" "', argument " "1"" of type '" "Integer""'");
    } 
    arg1 = static_cast< Integer >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FixedRateBond" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FixedRateBond" "', argument " "3"" of type '" "Schedule const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBond" "', argument " "3"" of type '" "Schedule const &""'"); 
    }
    arg3 = reinterpret_cast< Schedule * >(argp3);
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_InterestRate_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of new_FixedRateBond. "
          "Expected an array of " "InterestRate");
        SV **tv;
        I32 len = av_len(av) + 1;
        InterestRate* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_InterestRate,0) != -1) {
            temp4.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 4 of "
              "new_FixedRateBond. "
              "Expected an array of " "InterestRate");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of new_FixedRateBond. "
          "Expected an array of " "InterestRate");
      }
    }
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_FixedRateBond" "', argument " "5"" of type '" "BusinessDayConvention""'");
    } 
    arg5 = static_cast< BusinessDayConvention >(val5);
    ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_FixedRateBond" "', argument " "6"" of type '" "Real""'");
    } 
    arg6 = static_cast< Real >(val6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_FixedRateBond" "', argument " "7"" of type '" "Date const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBond" "', argument " "7"" of type '" "Date const &""'"); 
    }
    arg7 = reinterpret_cast< Date * >(argp7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_FixedRateBond" "', argument " "8"" of type '" "Calendar const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBond" "', argument " "8"" of type '" "Calendar const &""'"); 
    }
    arg8 = reinterpret_cast< Calendar * >(argp8);
    {
      try {
        result = (FixedRateBondPtr *)new_FixedRateBondPtr__SWIG_9(arg1,arg2,(Schedule const &)*arg3,(std::vector< InterestRate > const &)*arg4,arg5,arg6,(Date const &)*arg7,(Calendar const &)*arg8);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FixedRateBondPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FixedRateBond__SWIG_14) {
  {
    Integer arg1 ;
    Real arg2 ;
    Schedule *arg3 = 0 ;
    std::vector< InterestRate > *arg4 = 0 ;
    BusinessDayConvention arg5 ;
    Real arg6 ;
    Date *arg7 = 0 ;
    int val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    std::vector< InterestRate > temp4 ;
    std::vector< InterestRate > *v4 ;
    int val5 ;
    int ecode5 = 0 ;
    double val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    int argvi = 0;
    FixedRateBondPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: new_FixedRateBond(settlementDays,faceAmount,schedule,coupons,paymentConvention,redemption,issueDate);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FixedRateBond" "', argument " "1"" of type '" "Integer""'");
    } 
    arg1 = static_cast< Integer >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FixedRateBond" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FixedRateBond" "', argument " "3"" of type '" "Schedule const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBond" "', argument " "3"" of type '" "Schedule const &""'"); 
    }
    arg3 = reinterpret_cast< Schedule * >(argp3);
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_InterestRate_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of new_FixedRateBond. "
          "Expected an array of " "InterestRate");
        SV **tv;
        I32 len = av_len(av) + 1;
        InterestRate* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_InterestRate,0) != -1) {
            temp4.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 4 of "
              "new_FixedRateBond. "
              "Expected an array of " "InterestRate");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of new_FixedRateBond. "
          "Expected an array of " "InterestRate");
      }
    }
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_FixedRateBond" "', argument " "5"" of type '" "BusinessDayConvention""'");
    } 
    arg5 = static_cast< BusinessDayConvention >(val5);
    ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_FixedRateBond" "', argument " "6"" of type '" "Real""'");
    } 
    arg6 = static_cast< Real >(val6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_FixedRateBond" "', argument " "7"" of type '" "Date const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBond" "', argument " "7"" of type '" "Date const &""'"); 
    }
    arg7 = reinterpret_cast< Date * >(argp7);
    {
      try {
        result = (FixedRateBondPtr *)new_FixedRateBondPtr__SWIG_9(arg1,arg2,(Schedule const &)*arg3,(std::vector< InterestRate > const &)*arg4,arg5,arg6,(Date const &)*arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FixedRateBondPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FixedRateBond__SWIG_15) {
  {
    Integer arg1 ;
    Real arg2 ;
    Schedule *arg3 = 0 ;
    std::vector< InterestRate > *arg4 = 0 ;
    BusinessDayConvention arg5 ;
    Real arg6 ;
    int val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    std::vector< InterestRate > temp4 ;
    std::vector< InterestRate > *v4 ;
    int val5 ;
    int ecode5 = 0 ;
    double val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    FixedRateBondPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_FixedRateBond(settlementDays,faceAmount,schedule,coupons,paymentConvention,redemption);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FixedRateBond" "', argument " "1"" of type '" "Integer""'");
    } 
    arg1 = static_cast< Integer >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FixedRateBond" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FixedRateBond" "', argument " "3"" of type '" "Schedule const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBond" "', argument " "3"" of type '" "Schedule const &""'"); 
    }
    arg3 = reinterpret_cast< Schedule * >(argp3);
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_InterestRate_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of new_FixedRateBond. "
          "Expected an array of " "InterestRate");
        SV **tv;
        I32 len = av_len(av) + 1;
        InterestRate* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_InterestRate,0) != -1) {
            temp4.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 4 of "
              "new_FixedRateBond. "
              "Expected an array of " "InterestRate");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of new_FixedRateBond. "
          "Expected an array of " "InterestRate");
      }
    }
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_FixedRateBond" "', argument " "5"" of type '" "BusinessDayConvention""'");
    } 
    arg5 = static_cast< BusinessDayConvention >(val5);
    ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_FixedRateBond" "', argument " "6"" of type '" "Real""'");
    } 
    arg6 = static_cast< Real >(val6);
    {
      try {
        result = (FixedRateBondPtr *)new_FixedRateBondPtr__SWIG_9(arg1,arg2,(Schedule const &)*arg3,(std::vector< InterestRate > const &)*arg4,arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FixedRateBondPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FixedRateBond__SWIG_16) {
  {
    Integer arg1 ;
    Real arg2 ;
    Schedule *arg3 = 0 ;
    std::vector< InterestRate > *arg4 = 0 ;
    BusinessDayConvention arg5 ;
    int val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    std::vector< InterestRate > temp4 ;
    std::vector< InterestRate > *v4 ;
    int val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    FixedRateBondPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_FixedRateBond(settlementDays,faceAmount,schedule,coupons,paymentConvention);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FixedRateBond" "', argument " "1"" of type '" "Integer""'");
    } 
    arg1 = static_cast< Integer >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FixedRateBond" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FixedRateBond" "', argument " "3"" of type '" "Schedule const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBond" "', argument " "3"" of type '" "Schedule const &""'"); 
    }
    arg3 = reinterpret_cast< Schedule * >(argp3);
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_InterestRate_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of new_FixedRateBond. "
          "Expected an array of " "InterestRate");
        SV **tv;
        I32 len = av_len(av) + 1;
        InterestRate* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_InterestRate,0) != -1) {
            temp4.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 4 of "
              "new_FixedRateBond. "
              "Expected an array of " "InterestRate");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of new_FixedRateBond. "
          "Expected an array of " "InterestRate");
      }
    }
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_FixedRateBond" "', argument " "5"" of type '" "BusinessDayConvention""'");
    } 
    arg5 = static_cast< BusinessDayConvention >(val5);
    {
      try {
        result = (FixedRateBondPtr *)new_FixedRateBondPtr__SWIG_9(arg1,arg2,(Schedule const &)*arg3,(std::vector< InterestRate > const &)*arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FixedRateBondPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FixedRateBond__SWIG_17) {
  {
    Integer arg1 ;
    Real arg2 ;
    Schedule *arg3 = 0 ;
    std::vector< InterestRate > *arg4 = 0 ;
    int val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    std::vector< InterestRate > temp4 ;
    std::vector< InterestRate > *v4 ;
    int argvi = 0;
    FixedRateBondPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_FixedRateBond(settlementDays,faceAmount,schedule,coupons);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FixedRateBond" "', argument " "1"" of type '" "Integer""'");
    } 
    arg1 = static_cast< Integer >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FixedRateBond" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FixedRateBond" "', argument " "3"" of type '" "Schedule const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBond" "', argument " "3"" of type '" "Schedule const &""'"); 
    }
    arg3 = reinterpret_cast< Schedule * >(argp3);
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_InterestRate_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of new_FixedRateBond. "
          "Expected an array of " "InterestRate");
        SV **tv;
        I32 len = av_len(av) + 1;
        InterestRate* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_InterestRate,0) != -1) {
            temp4.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 4 of "
              "new_FixedRateBond. "
              "Expected an array of " "InterestRate");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of new_FixedRateBond. "
          "Expected an array of " "InterestRate");
      }
    }
    {
      try {
        result = (FixedRateBondPtr *)new_FixedRateBondPtr__SWIG_9(arg1,arg2,(Schedule const &)*arg3,(std::vector< InterestRate > const &)*arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FixedRateBondPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FixedRateBond) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< InterestRate >* v;
            if (SWIG_ConvertPtr(ST(3),(void **) &v, 
                SWIGTYPE_p_std__vectorT_InterestRate_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(3))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(3));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  InterestRate* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_InterestRate,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(3),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(3))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(3));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< InterestRate >* v;
            if (SWIG_ConvertPtr(ST(3),(void **) &v, 
                SWIGTYPE_p_std__vectorT_InterestRate_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(3))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(3));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  InterestRate* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_InterestRate,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(3),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(3))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(3));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< InterestRate >* v;
            if (SWIG_ConvertPtr(ST(3),(void **) &v, 
                SWIGTYPE_p_std__vectorT_InterestRate_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(3))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(3));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  InterestRate* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_InterestRate,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(3),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(3))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(3));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< InterestRate >* v;
            if (SWIG_ConvertPtr(ST(3),(void **) &v, 
                SWIGTYPE_p_std__vectorT_InterestRate_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(3))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(3));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  InterestRate* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_InterestRate,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 7;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_7:
    
    if (items == 8) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(3),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(3))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(3));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 8;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_8:
    
    if (items == 8) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< InterestRate >* v;
            if (SWIG_ConvertPtr(ST(3),(void **) &v, 
                SWIGTYPE_p_std__vectorT_InterestRate_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(3))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(3));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  InterestRate* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_InterestRate,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 9;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_9:
    
    if (items == 9) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(3),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(3))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(3));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 10;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_10:
    
    if (items == 9) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< InterestRate >* v;
            if (SWIG_ConvertPtr(ST(3),(void **) &v, 
                SWIGTYPE_p_std__vectorT_InterestRate_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(3))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(3));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  InterestRate* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_InterestRate,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 11;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_11:
    
    if (items == 10) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(3),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(3))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(3));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(9), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 12;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_12:
    
    if (items == 10) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_13;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_13;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_13;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< InterestRate >* v;
            if (SWIG_ConvertPtr(ST(3),(void **) &v, 
                SWIGTYPE_p_std__vectorT_InterestRate_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(3))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(3));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  InterestRate* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_InterestRate,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_13;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_13;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_13;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_13;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_13;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_13;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(9), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_13;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 13;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_13:
    
    if (items == 11) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_14;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_14;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_14;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(3),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(3))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(3));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_14;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_14;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_14;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_14;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_14;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_14;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(9), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_14;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(10), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_14;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 14;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_14:
    
    if (items == 11) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_15;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_15;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_15;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< InterestRate >* v;
            if (SWIG_ConvertPtr(ST(3),(void **) &v, 
                SWIGTYPE_p_std__vectorT_InterestRate_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(3))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(3));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  InterestRate* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_InterestRate,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_15;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_15;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_15;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_15;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_15;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_15;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(9), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_15;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(10), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_15;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 15;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_15:
    
    if (items == 12) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_16;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_16;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_16;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(3),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(3))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(3));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_16;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_16;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_16;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_16;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_16;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_16;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(9), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_16;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(10), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_16;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(11), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_16;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 16;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_16:
    
    if (items == 12) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_17;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_17;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_17;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< InterestRate >* v;
            if (SWIG_ConvertPtr(ST(3),(void **) &v, 
                SWIGTYPE_p_std__vectorT_InterestRate_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(3))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(3));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  InterestRate* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_InterestRate,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_17;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_17;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_17;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_17;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_17;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_17;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(9), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_17;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(10), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_17;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(11), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_17;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 17;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_17:
    
    if (items == 13) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_18;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_18;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_18;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(3),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(3))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(3));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_18;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_18;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_18;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_18;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_18;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_18;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(9), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_18;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(10), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_18;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(11), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_18;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(12), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_18;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 18;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_18:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FixedRateBond__SWIG_17); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FixedRateBond__SWIG_8); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FixedRateBond__SWIG_16); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FixedRateBond__SWIG_7); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FixedRateBond__SWIG_15); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FixedRateBond__SWIG_6); return;
    case 7:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FixedRateBond__SWIG_14); return;
    case 8:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FixedRateBond__SWIG_5); return;
    case 9:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FixedRateBond__SWIG_13); return;
    case 10:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FixedRateBond__SWIG_4); return;
    case 11:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FixedRateBond__SWIG_12); return;
    case 12:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FixedRateBond__SWIG_3); return;
    case 13:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FixedRateBond__SWIG_11); return;
    case 14:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FixedRateBond__SWIG_2); return;
    case 15:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FixedRateBond__SWIG_10); return;
    case 16:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FixedRateBond__SWIG_1); return;
    case 17:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FixedRateBond__SWIG_9); return;
    case 18:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FixedRateBond__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_FixedRateBond'");
  XSRETURN(0);
}


XS(_wrap_FixedRateBond_frequency) {
  {
    FixedRateBondPtr *arg1 = (FixedRateBondPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Frequency result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: FixedRateBond_frequency(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_FixedRateBondPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FixedRateBond_frequency" "', argument " "1"" of type '" "FixedRateBondPtr const *""'"); 
    }
    arg1 = reinterpret_cast< FixedRateBondPtr * >(argp1);
    {
      try {
        result = (Frequency)FixedRateBondPtr_frequency((FixedRateBondPtr const *)arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_FixedRateBond_dayCounter) {
  {
    FixedRateBondPtr *arg1 = (FixedRateBondPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    SwigValueWrapper< DayCounter > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: FixedRateBond_dayCounter(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_FixedRateBondPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FixedRateBond_dayCounter" "', argument " "1"" of type '" "FixedRateBondPtr const *""'"); 
    }
    arg1 = reinterpret_cast< FixedRateBondPtr * >(argp1);
    {
      try {
        result = FixedRateBondPtr_dayCounter((FixedRateBondPtr const *)arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new DayCounter(static_cast< const DayCounter& >(result))), SWIGTYPE_p_DayCounter, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_FixedRateBond) {
  {
    FixedRateBondPtr *arg1 = (FixedRateBondPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_FixedRateBond(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_FixedRateBondPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FixedRateBond" "', argument " "1"" of type '" "FixedRateBondPtr *""'"); 
    }
    arg1 = reinterpret_cast< FixedRateBondPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FloatingRateBond__SWIG_0) {
  {
    Size arg1 ;
    Real arg2 ;
    Schedule *arg3 = 0 ;
    IborIndexPtr *arg4 = 0 ;
    DayCounter *arg5 = 0 ;
    BusinessDayConvention arg6 ;
    Size arg7 ;
    std::vector< Real > *arg8 = 0 ;
    std::vector< Spread > *arg9 = 0 ;
    std::vector< Rate > *arg10 = 0 ;
    std::vector< Rate > *arg11 = 0 ;
    bool arg12 ;
    Real arg13 ;
    Date *arg14 = 0 ;
    size_t val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    size_t val7 ;
    int ecode7 = 0 ;
    std::vector< double > temp8 ;
    std::vector< double > *v8 ;
    std::vector< double > temp9 ;
    std::vector< double > *v9 ;
    std::vector< double > temp10 ;
    std::vector< double > *v10 ;
    std::vector< double > temp11 ;
    std::vector< double > *v11 ;
    bool val12 ;
    int ecode12 = 0 ;
    double val13 ;
    int ecode13 = 0 ;
    void *argp14 ;
    int res14 = 0 ;
    int argvi = 0;
    FloatingRateBondPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 14) || (items > 14)) {
      SWIG_croak("Usage: new_FloatingRateBond(settlementDays,faceAmount,schedule,index,paymentDayCounter,paymentConvention,fixingDays,gearings,spreads,caps,floors,inArrears,redemption,issueDate);");
    }
    ecode1 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FloatingRateBond" "', argument " "1"" of type '" "Size""'");
    } 
    arg1 = static_cast< Size >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FloatingRateBond" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FloatingRateBond" "', argument " "3"" of type '" "Schedule const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatingRateBond" "', argument " "3"" of type '" "Schedule const &""'"); 
    }
    arg3 = reinterpret_cast< Schedule * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_IborIndexPtr,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FloatingRateBond" "', argument " "4"" of type '" "IborIndexPtr const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatingRateBond" "', argument " "4"" of type '" "IborIndexPtr const &""'"); 
    }
    arg4 = reinterpret_cast< IborIndexPtr * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_FloatingRateBond" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatingRateBond" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    arg5 = reinterpret_cast< DayCounter * >(argp5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_FloatingRateBond" "', argument " "6"" of type '" "BusinessDayConvention""'");
    } 
    arg6 = static_cast< BusinessDayConvention >(val6);
    ecode7 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_FloatingRateBond" "', argument " "7"" of type '" "Size""'");
    } 
    arg7 = static_cast< Size >(val7);
    {
      if (SWIG_ConvertPtr(ST(7),(void **) &v8, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg8 = v8;
      } else if (SvROK(ST(7))) {
        AV *av = (AV *)SvRV(ST(7));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 8 of new_FloatingRateBond. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp8.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 8 of "
              "new_FloatingRateBond. "
              "Expected an array of ""double");
          }
        }
        arg8 = &temp8;
      } else {
        SWIG_croak("Type error in argument 8 of new_FloatingRateBond. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(8),(void **) &v9, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg9 = v9;
      } else if (SvROK(ST(8))) {
        AV *av = (AV *)SvRV(ST(8));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 9 of new_FloatingRateBond. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp9.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 9 of "
              "new_FloatingRateBond. "
              "Expected an array of ""double");
          }
        }
        arg9 = &temp9;
      } else {
        SWIG_croak("Type error in argument 9 of new_FloatingRateBond. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(9),(void **) &v10, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg10 = v10;
      } else if (SvROK(ST(9))) {
        AV *av = (AV *)SvRV(ST(9));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 10 of new_FloatingRateBond. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp10.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 10 of "
              "new_FloatingRateBond. "
              "Expected an array of ""double");
          }
        }
        arg10 = &temp10;
      } else {
        SWIG_croak("Type error in argument 10 of new_FloatingRateBond. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(10),(void **) &v11, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg11 = v11;
      } else if (SvROK(ST(10))) {
        AV *av = (AV *)SvRV(ST(10));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 11 of new_FloatingRateBond. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp11.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 11 of "
              "new_FloatingRateBond. "
              "Expected an array of ""double");
          }
        }
        arg11 = &temp11;
      } else {
        SWIG_croak("Type error in argument 11 of new_FloatingRateBond. "
          "Expected an array of ""double");
      }
    }
    ecode12 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(11), &val12);
    if (!SWIG_IsOK(ecode12)) {
      SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "new_FloatingRateBond" "', argument " "12"" of type '" "bool""'");
    } 
    arg12 = static_cast< bool >(val12);
    ecode13 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(12), &val13);
    if (!SWIG_IsOK(ecode13)) {
      SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "new_FloatingRateBond" "', argument " "13"" of type '" "Real""'");
    } 
    arg13 = static_cast< Real >(val13);
    res14 = SWIG_ConvertPtr(ST(13), &argp14, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res14)) {
      SWIG_exception_fail(SWIG_ArgError(res14), "in method '" "new_FloatingRateBond" "', argument " "14"" of type '" "Date const &""'"); 
    }
    if (!argp14) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatingRateBond" "', argument " "14"" of type '" "Date const &""'"); 
    }
    arg14 = reinterpret_cast< Date * >(argp14);
    {
      try {
        result = (FloatingRateBondPtr *)new_FloatingRateBondPtr__SWIG_0(arg1,arg2,(Schedule const &)*arg3,(IborIndexPtr const &)*arg4,(DayCounter const &)*arg5,arg6,arg7,(std::vector< double > const &)*arg8,(std::vector< double > const &)*arg9,(std::vector< double > const &)*arg10,(std::vector< double > const &)*arg11,arg12,arg13,(Date const &)*arg14);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FloatingRateBondPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FloatingRateBond__SWIG_1) {
  {
    Size arg1 ;
    Real arg2 ;
    Schedule *arg3 = 0 ;
    IborIndexPtr *arg4 = 0 ;
    DayCounter *arg5 = 0 ;
    BusinessDayConvention arg6 ;
    Size arg7 ;
    std::vector< Real > *arg8 = 0 ;
    std::vector< Spread > *arg9 = 0 ;
    std::vector< Rate > *arg10 = 0 ;
    std::vector< Rate > *arg11 = 0 ;
    bool arg12 ;
    Real arg13 ;
    size_t val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    size_t val7 ;
    int ecode7 = 0 ;
    std::vector< double > temp8 ;
    std::vector< double > *v8 ;
    std::vector< double > temp9 ;
    std::vector< double > *v9 ;
    std::vector< double > temp10 ;
    std::vector< double > *v10 ;
    std::vector< double > temp11 ;
    std::vector< double > *v11 ;
    bool val12 ;
    int ecode12 = 0 ;
    double val13 ;
    int ecode13 = 0 ;
    int argvi = 0;
    FloatingRateBondPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 13) || (items > 13)) {
      SWIG_croak("Usage: new_FloatingRateBond(settlementDays,faceAmount,schedule,index,paymentDayCounter,paymentConvention,fixingDays,gearings,spreads,caps,floors,inArrears,redemption);");
    }
    ecode1 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FloatingRateBond" "', argument " "1"" of type '" "Size""'");
    } 
    arg1 = static_cast< Size >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FloatingRateBond" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FloatingRateBond" "', argument " "3"" of type '" "Schedule const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatingRateBond" "', argument " "3"" of type '" "Schedule const &""'"); 
    }
    arg3 = reinterpret_cast< Schedule * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_IborIndexPtr,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FloatingRateBond" "', argument " "4"" of type '" "IborIndexPtr const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatingRateBond" "', argument " "4"" of type '" "IborIndexPtr const &""'"); 
    }
    arg4 = reinterpret_cast< IborIndexPtr * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_FloatingRateBond" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatingRateBond" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    arg5 = reinterpret_cast< DayCounter * >(argp5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_FloatingRateBond" "', argument " "6"" of type '" "BusinessDayConvention""'");
    } 
    arg6 = static_cast< BusinessDayConvention >(val6);
    ecode7 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_FloatingRateBond" "', argument " "7"" of type '" "Size""'");
    } 
    arg7 = static_cast< Size >(val7);
    {
      if (SWIG_ConvertPtr(ST(7),(void **) &v8, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg8 = v8;
      } else if (SvROK(ST(7))) {
        AV *av = (AV *)SvRV(ST(7));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 8 of new_FloatingRateBond. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp8.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 8 of "
              "new_FloatingRateBond. "
              "Expected an array of ""double");
          }
        }
        arg8 = &temp8;
      } else {
        SWIG_croak("Type error in argument 8 of new_FloatingRateBond. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(8),(void **) &v9, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg9 = v9;
      } else if (SvROK(ST(8))) {
        AV *av = (AV *)SvRV(ST(8));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 9 of new_FloatingRateBond. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp9.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 9 of "
              "new_FloatingRateBond. "
              "Expected an array of ""double");
          }
        }
        arg9 = &temp9;
      } else {
        SWIG_croak("Type error in argument 9 of new_FloatingRateBond. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(9),(void **) &v10, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg10 = v10;
      } else if (SvROK(ST(9))) {
        AV *av = (AV *)SvRV(ST(9));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 10 of new_FloatingRateBond. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp10.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 10 of "
              "new_FloatingRateBond. "
              "Expected an array of ""double");
          }
        }
        arg10 = &temp10;
      } else {
        SWIG_croak("Type error in argument 10 of new_FloatingRateBond. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(10),(void **) &v11, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg11 = v11;
      } else if (SvROK(ST(10))) {
        AV *av = (AV *)SvRV(ST(10));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 11 of new_FloatingRateBond. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp11.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 11 of "
              "new_FloatingRateBond. "
              "Expected an array of ""double");
          }
        }
        arg11 = &temp11;
      } else {
        SWIG_croak("Type error in argument 11 of new_FloatingRateBond. "
          "Expected an array of ""double");
      }
    }
    ecode12 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(11), &val12);
    if (!SWIG_IsOK(ecode12)) {
      SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "new_FloatingRateBond" "', argument " "12"" of type '" "bool""'");
    } 
    arg12 = static_cast< bool >(val12);
    ecode13 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(12), &val13);
    if (!SWIG_IsOK(ecode13)) {
      SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "new_FloatingRateBond" "', argument " "13"" of type '" "Real""'");
    } 
    arg13 = static_cast< Real >(val13);
    {
      try {
        result = (FloatingRateBondPtr *)new_FloatingRateBondPtr__SWIG_0(arg1,arg2,(Schedule const &)*arg3,(IborIndexPtr const &)*arg4,(DayCounter const &)*arg5,arg6,arg7,(std::vector< double > const &)*arg8,(std::vector< double > const &)*arg9,(std::vector< double > const &)*arg10,(std::vector< double > const &)*arg11,arg12,arg13);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FloatingRateBondPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FloatingRateBond__SWIG_2) {
  {
    Size arg1 ;
    Real arg2 ;
    Schedule *arg3 = 0 ;
    IborIndexPtr *arg4 = 0 ;
    DayCounter *arg5 = 0 ;
    BusinessDayConvention arg6 ;
    Size arg7 ;
    std::vector< Real > *arg8 = 0 ;
    std::vector< Spread > *arg9 = 0 ;
    std::vector< Rate > *arg10 = 0 ;
    std::vector< Rate > *arg11 = 0 ;
    bool arg12 ;
    size_t val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    size_t val7 ;
    int ecode7 = 0 ;
    std::vector< double > temp8 ;
    std::vector< double > *v8 ;
    std::vector< double > temp9 ;
    std::vector< double > *v9 ;
    std::vector< double > temp10 ;
    std::vector< double > *v10 ;
    std::vector< double > temp11 ;
    std::vector< double > *v11 ;
    bool val12 ;
    int ecode12 = 0 ;
    int argvi = 0;
    FloatingRateBondPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 12) || (items > 12)) {
      SWIG_croak("Usage: new_FloatingRateBond(settlementDays,faceAmount,schedule,index,paymentDayCounter,paymentConvention,fixingDays,gearings,spreads,caps,floors,inArrears);");
    }
    ecode1 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FloatingRateBond" "', argument " "1"" of type '" "Size""'");
    } 
    arg1 = static_cast< Size >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FloatingRateBond" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FloatingRateBond" "', argument " "3"" of type '" "Schedule const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatingRateBond" "', argument " "3"" of type '" "Schedule const &""'"); 
    }
    arg3 = reinterpret_cast< Schedule * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_IborIndexPtr,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FloatingRateBond" "', argument " "4"" of type '" "IborIndexPtr const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatingRateBond" "', argument " "4"" of type '" "IborIndexPtr const &""'"); 
    }
    arg4 = reinterpret_cast< IborIndexPtr * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_FloatingRateBond" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatingRateBond" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    arg5 = reinterpret_cast< DayCounter * >(argp5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_FloatingRateBond" "', argument " "6"" of type '" "BusinessDayConvention""'");
    } 
    arg6 = static_cast< BusinessDayConvention >(val6);
    ecode7 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_FloatingRateBond" "', argument " "7"" of type '" "Size""'");
    } 
    arg7 = static_cast< Size >(val7);
    {
      if (SWIG_ConvertPtr(ST(7),(void **) &v8, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg8 = v8;
      } else if (SvROK(ST(7))) {
        AV *av = (AV *)SvRV(ST(7));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 8 of new_FloatingRateBond. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp8.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 8 of "
              "new_FloatingRateBond. "
              "Expected an array of ""double");
          }
        }
        arg8 = &temp8;
      } else {
        SWIG_croak("Type error in argument 8 of new_FloatingRateBond. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(8),(void **) &v9, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg9 = v9;
      } else if (SvROK(ST(8))) {
        AV *av = (AV *)SvRV(ST(8));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 9 of new_FloatingRateBond. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp9.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 9 of "
              "new_FloatingRateBond. "
              "Expected an array of ""double");
          }
        }
        arg9 = &temp9;
      } else {
        SWIG_croak("Type error in argument 9 of new_FloatingRateBond. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(9),(void **) &v10, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg10 = v10;
      } else if (SvROK(ST(9))) {
        AV *av = (AV *)SvRV(ST(9));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 10 of new_FloatingRateBond. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp10.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 10 of "
              "new_FloatingRateBond. "
              "Expected an array of ""double");
          }
        }
        arg10 = &temp10;
      } else {
        SWIG_croak("Type error in argument 10 of new_FloatingRateBond. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(10),(void **) &v11, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg11 = v11;
      } else if (SvROK(ST(10))) {
        AV *av = (AV *)SvRV(ST(10));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 11 of new_FloatingRateBond. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp11.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 11 of "
              "new_FloatingRateBond. "
              "Expected an array of ""double");
          }
        }
        arg11 = &temp11;
      } else {
        SWIG_croak("Type error in argument 11 of new_FloatingRateBond. "
          "Expected an array of ""double");
      }
    }
    ecode12 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(11), &val12);
    if (!SWIG_IsOK(ecode12)) {
      SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "new_FloatingRateBond" "', argument " "12"" of type '" "bool""'");
    } 
    arg12 = static_cast< bool >(val12);
    {
      try {
        result = (FloatingRateBondPtr *)new_FloatingRateBondPtr__SWIG_0(arg1,arg2,(Schedule const &)*arg3,(IborIndexPtr const &)*arg4,(DayCounter const &)*arg5,arg6,arg7,(std::vector< double > const &)*arg8,(std::vector< double > const &)*arg9,(std::vector< double > const &)*arg10,(std::vector< double > const &)*arg11,arg12);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FloatingRateBondPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FloatingRateBond__SWIG_3) {
  {
    Size arg1 ;
    Real arg2 ;
    Schedule *arg3 = 0 ;
    IborIndexPtr *arg4 = 0 ;
    DayCounter *arg5 = 0 ;
    BusinessDayConvention arg6 ;
    Size arg7 ;
    std::vector< Real > *arg8 = 0 ;
    std::vector< Spread > *arg9 = 0 ;
    std::vector< Rate > *arg10 = 0 ;
    std::vector< Rate > *arg11 = 0 ;
    size_t val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    size_t val7 ;
    int ecode7 = 0 ;
    std::vector< double > temp8 ;
    std::vector< double > *v8 ;
    std::vector< double > temp9 ;
    std::vector< double > *v9 ;
    std::vector< double > temp10 ;
    std::vector< double > *v10 ;
    std::vector< double > temp11 ;
    std::vector< double > *v11 ;
    int argvi = 0;
    FloatingRateBondPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 11) || (items > 11)) {
      SWIG_croak("Usage: new_FloatingRateBond(settlementDays,faceAmount,schedule,index,paymentDayCounter,paymentConvention,fixingDays,gearings,spreads,caps,floors);");
    }
    ecode1 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FloatingRateBond" "', argument " "1"" of type '" "Size""'");
    } 
    arg1 = static_cast< Size >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FloatingRateBond" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FloatingRateBond" "', argument " "3"" of type '" "Schedule const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatingRateBond" "', argument " "3"" of type '" "Schedule const &""'"); 
    }
    arg3 = reinterpret_cast< Schedule * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_IborIndexPtr,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FloatingRateBond" "', argument " "4"" of type '" "IborIndexPtr const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatingRateBond" "', argument " "4"" of type '" "IborIndexPtr const &""'"); 
    }
    arg4 = reinterpret_cast< IborIndexPtr * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_FloatingRateBond" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatingRateBond" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    arg5 = reinterpret_cast< DayCounter * >(argp5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_FloatingRateBond" "', argument " "6"" of type '" "BusinessDayConvention""'");
    } 
    arg6 = static_cast< BusinessDayConvention >(val6);
    ecode7 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_FloatingRateBond" "', argument " "7"" of type '" "Size""'");
    } 
    arg7 = static_cast< Size >(val7);
    {
      if (SWIG_ConvertPtr(ST(7),(void **) &v8, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg8 = v8;
      } else if (SvROK(ST(7))) {
        AV *av = (AV *)SvRV(ST(7));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 8 of new_FloatingRateBond. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp8.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 8 of "
              "new_FloatingRateBond. "
              "Expected an array of ""double");
          }
        }
        arg8 = &temp8;
      } else {
        SWIG_croak("Type error in argument 8 of new_FloatingRateBond. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(8),(void **) &v9, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg9 = v9;
      } else if (SvROK(ST(8))) {
        AV *av = (AV *)SvRV(ST(8));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 9 of new_FloatingRateBond. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp9.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 9 of "
              "new_FloatingRateBond. "
              "Expected an array of ""double");
          }
        }
        arg9 = &temp9;
      } else {
        SWIG_croak("Type error in argument 9 of new_FloatingRateBond. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(9),(void **) &v10, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg10 = v10;
      } else if (SvROK(ST(9))) {
        AV *av = (AV *)SvRV(ST(9));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 10 of new_FloatingRateBond. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp10.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 10 of "
              "new_FloatingRateBond. "
              "Expected an array of ""double");
          }
        }
        arg10 = &temp10;
      } else {
        SWIG_croak("Type error in argument 10 of new_FloatingRateBond. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(10),(void **) &v11, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg11 = v11;
      } else if (SvROK(ST(10))) {
        AV *av = (AV *)SvRV(ST(10));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 11 of new_FloatingRateBond. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp11.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 11 of "
              "new_FloatingRateBond. "
              "Expected an array of ""double");
          }
        }
        arg11 = &temp11;
      } else {
        SWIG_croak("Type error in argument 11 of new_FloatingRateBond. "
          "Expected an array of ""double");
      }
    }
    {
      try {
        result = (FloatingRateBondPtr *)new_FloatingRateBondPtr__SWIG_0(arg1,arg2,(Schedule const &)*arg3,(IborIndexPtr const &)*arg4,(DayCounter const &)*arg5,arg6,arg7,(std::vector< double > const &)*arg8,(std::vector< double > const &)*arg9,(std::vector< double > const &)*arg10,(std::vector< double > const &)*arg11);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FloatingRateBondPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FloatingRateBond__SWIG_4) {
  {
    Size arg1 ;
    Real arg2 ;
    Schedule *arg3 = 0 ;
    IborIndexPtr *arg4 = 0 ;
    DayCounter *arg5 = 0 ;
    BusinessDayConvention arg6 ;
    Size arg7 ;
    std::vector< Real > *arg8 = 0 ;
    std::vector< Spread > *arg9 = 0 ;
    std::vector< Rate > *arg10 = 0 ;
    size_t val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    size_t val7 ;
    int ecode7 = 0 ;
    std::vector< double > temp8 ;
    std::vector< double > *v8 ;
    std::vector< double > temp9 ;
    std::vector< double > *v9 ;
    std::vector< double > temp10 ;
    std::vector< double > *v10 ;
    int argvi = 0;
    FloatingRateBondPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 10) || (items > 10)) {
      SWIG_croak("Usage: new_FloatingRateBond(settlementDays,faceAmount,schedule,index,paymentDayCounter,paymentConvention,fixingDays,gearings,spreads,caps);");
    }
    ecode1 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FloatingRateBond" "', argument " "1"" of type '" "Size""'");
    } 
    arg1 = static_cast< Size >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FloatingRateBond" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FloatingRateBond" "', argument " "3"" of type '" "Schedule const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatingRateBond" "', argument " "3"" of type '" "Schedule const &""'"); 
    }
    arg3 = reinterpret_cast< Schedule * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_IborIndexPtr,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FloatingRateBond" "', argument " "4"" of type '" "IborIndexPtr const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatingRateBond" "', argument " "4"" of type '" "IborIndexPtr const &""'"); 
    }
    arg4 = reinterpret_cast< IborIndexPtr * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_FloatingRateBond" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatingRateBond" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    arg5 = reinterpret_cast< DayCounter * >(argp5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_FloatingRateBond" "', argument " "6"" of type '" "BusinessDayConvention""'");
    } 
    arg6 = static_cast< BusinessDayConvention >(val6);
    ecode7 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_FloatingRateBond" "', argument " "7"" of type '" "Size""'");
    } 
    arg7 = static_cast< Size >(val7);
    {
      if (SWIG_ConvertPtr(ST(7),(void **) &v8, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg8 = v8;
      } else if (SvROK(ST(7))) {
        AV *av = (AV *)SvRV(ST(7));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 8 of new_FloatingRateBond. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp8.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 8 of "
              "new_FloatingRateBond. "
              "Expected an array of ""double");
          }
        }
        arg8 = &temp8;
      } else {
        SWIG_croak("Type error in argument 8 of new_FloatingRateBond. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(8),(void **) &v9, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg9 = v9;
      } else if (SvROK(ST(8))) {
        AV *av = (AV *)SvRV(ST(8));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 9 of new_FloatingRateBond. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp9.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 9 of "
              "new_FloatingRateBond. "
              "Expected an array of ""double");
          }
        }
        arg9 = &temp9;
      } else {
        SWIG_croak("Type error in argument 9 of new_FloatingRateBond. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(9),(void **) &v10, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg10 = v10;
      } else if (SvROK(ST(9))) {
        AV *av = (AV *)SvRV(ST(9));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 10 of new_FloatingRateBond. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp10.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 10 of "
              "new_FloatingRateBond. "
              "Expected an array of ""double");
          }
        }
        arg10 = &temp10;
      } else {
        SWIG_croak("Type error in argument 10 of new_FloatingRateBond. "
          "Expected an array of ""double");
      }
    }
    {
      try {
        result = (FloatingRateBondPtr *)new_FloatingRateBondPtr__SWIG_0(arg1,arg2,(Schedule const &)*arg3,(IborIndexPtr const &)*arg4,(DayCounter const &)*arg5,arg6,arg7,(std::vector< double > const &)*arg8,(std::vector< double > const &)*arg9,(std::vector< double > const &)*arg10);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FloatingRateBondPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FloatingRateBond__SWIG_5) {
  {
    Size arg1 ;
    Real arg2 ;
    Schedule *arg3 = 0 ;
    IborIndexPtr *arg4 = 0 ;
    DayCounter *arg5 = 0 ;
    BusinessDayConvention arg6 ;
    Size arg7 ;
    std::vector< Real > *arg8 = 0 ;
    std::vector< Spread > *arg9 = 0 ;
    size_t val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    size_t val7 ;
    int ecode7 = 0 ;
    std::vector< double > temp8 ;
    std::vector< double > *v8 ;
    std::vector< double > temp9 ;
    std::vector< double > *v9 ;
    int argvi = 0;
    FloatingRateBondPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 9) || (items > 9)) {
      SWIG_croak("Usage: new_FloatingRateBond(settlementDays,faceAmount,schedule,index,paymentDayCounter,paymentConvention,fixingDays,gearings,spreads);");
    }
    ecode1 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FloatingRateBond" "', argument " "1"" of type '" "Size""'");
    } 
    arg1 = static_cast< Size >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FloatingRateBond" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FloatingRateBond" "', argument " "3"" of type '" "Schedule const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatingRateBond" "', argument " "3"" of type '" "Schedule const &""'"); 
    }
    arg3 = reinterpret_cast< Schedule * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_IborIndexPtr,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FloatingRateBond" "', argument " "4"" of type '" "IborIndexPtr const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatingRateBond" "', argument " "4"" of type '" "IborIndexPtr const &""'"); 
    }
    arg4 = reinterpret_cast< IborIndexPtr * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_FloatingRateBond" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatingRateBond" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    arg5 = reinterpret_cast< DayCounter * >(argp5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_FloatingRateBond" "', argument " "6"" of type '" "BusinessDayConvention""'");
    } 
    arg6 = static_cast< BusinessDayConvention >(val6);
    ecode7 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_FloatingRateBond" "', argument " "7"" of type '" "Size""'");
    } 
    arg7 = static_cast< Size >(val7);
    {
      if (SWIG_ConvertPtr(ST(7),(void **) &v8, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg8 = v8;
      } else if (SvROK(ST(7))) {
        AV *av = (AV *)SvRV(ST(7));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 8 of new_FloatingRateBond. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp8.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 8 of "
              "new_FloatingRateBond. "
              "Expected an array of ""double");
          }
        }
        arg8 = &temp8;
      } else {
        SWIG_croak("Type error in argument 8 of new_FloatingRateBond. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(8),(void **) &v9, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg9 = v9;
      } else if (SvROK(ST(8))) {
        AV *av = (AV *)SvRV(ST(8));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 9 of new_FloatingRateBond. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp9.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 9 of "
              "new_FloatingRateBond. "
              "Expected an array of ""double");
          }
        }
        arg9 = &temp9;
      } else {
        SWIG_croak("Type error in argument 9 of new_FloatingRateBond. "
          "Expected an array of ""double");
      }
    }
    {
      try {
        result = (FloatingRateBondPtr *)new_FloatingRateBondPtr__SWIG_0(arg1,arg2,(Schedule const &)*arg3,(IborIndexPtr const &)*arg4,(DayCounter const &)*arg5,arg6,arg7,(std::vector< double > const &)*arg8,(std::vector< double > const &)*arg9);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FloatingRateBondPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FloatingRateBond__SWIG_6) {
  {
    Size arg1 ;
    Real arg2 ;
    Schedule *arg3 = 0 ;
    IborIndexPtr *arg4 = 0 ;
    DayCounter *arg5 = 0 ;
    BusinessDayConvention arg6 ;
    Size arg7 ;
    std::vector< Real > *arg8 = 0 ;
    size_t val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    size_t val7 ;
    int ecode7 = 0 ;
    std::vector< double > temp8 ;
    std::vector< double > *v8 ;
    int argvi = 0;
    FloatingRateBondPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 8) || (items > 8)) {
      SWIG_croak("Usage: new_FloatingRateBond(settlementDays,faceAmount,schedule,index,paymentDayCounter,paymentConvention,fixingDays,gearings);");
    }
    ecode1 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FloatingRateBond" "', argument " "1"" of type '" "Size""'");
    } 
    arg1 = static_cast< Size >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FloatingRateBond" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FloatingRateBond" "', argument " "3"" of type '" "Schedule const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatingRateBond" "', argument " "3"" of type '" "Schedule const &""'"); 
    }
    arg3 = reinterpret_cast< Schedule * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_IborIndexPtr,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FloatingRateBond" "', argument " "4"" of type '" "IborIndexPtr const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatingRateBond" "', argument " "4"" of type '" "IborIndexPtr const &""'"); 
    }
    arg4 = reinterpret_cast< IborIndexPtr * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_FloatingRateBond" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatingRateBond" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    arg5 = reinterpret_cast< DayCounter * >(argp5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_FloatingRateBond" "', argument " "6"" of type '" "BusinessDayConvention""'");
    } 
    arg6 = static_cast< BusinessDayConvention >(val6);
    ecode7 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_FloatingRateBond" "', argument " "7"" of type '" "Size""'");
    } 
    arg7 = static_cast< Size >(val7);
    {
      if (SWIG_ConvertPtr(ST(7),(void **) &v8, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg8 = v8;
      } else if (SvROK(ST(7))) {
        AV *av = (AV *)SvRV(ST(7));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 8 of new_FloatingRateBond. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp8.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 8 of "
              "new_FloatingRateBond. "
              "Expected an array of ""double");
          }
        }
        arg8 = &temp8;
      } else {
        SWIG_croak("Type error in argument 8 of new_FloatingRateBond. "
          "Expected an array of ""double");
      }
    }
    {
      try {
        result = (FloatingRateBondPtr *)new_FloatingRateBondPtr__SWIG_0(arg1,arg2,(Schedule const &)*arg3,(IborIndexPtr const &)*arg4,(DayCounter const &)*arg5,arg6,arg7,(std::vector< double > const &)*arg8);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FloatingRateBondPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FloatingRateBond__SWIG_7) {
  {
    Size arg1 ;
    Real arg2 ;
    Schedule *arg3 = 0 ;
    IborIndexPtr *arg4 = 0 ;
    DayCounter *arg5 = 0 ;
    BusinessDayConvention arg6 ;
    Size arg7 ;
    size_t val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    size_t val7 ;
    int ecode7 = 0 ;
    int argvi = 0;
    FloatingRateBondPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: new_FloatingRateBond(settlementDays,faceAmount,schedule,index,paymentDayCounter,paymentConvention,fixingDays);");
    }
    ecode1 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FloatingRateBond" "', argument " "1"" of type '" "Size""'");
    } 
    arg1 = static_cast< Size >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FloatingRateBond" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FloatingRateBond" "', argument " "3"" of type '" "Schedule const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatingRateBond" "', argument " "3"" of type '" "Schedule const &""'"); 
    }
    arg3 = reinterpret_cast< Schedule * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_IborIndexPtr,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FloatingRateBond" "', argument " "4"" of type '" "IborIndexPtr const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatingRateBond" "', argument " "4"" of type '" "IborIndexPtr const &""'"); 
    }
    arg4 = reinterpret_cast< IborIndexPtr * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_FloatingRateBond" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatingRateBond" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    arg5 = reinterpret_cast< DayCounter * >(argp5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_FloatingRateBond" "', argument " "6"" of type '" "BusinessDayConvention""'");
    } 
    arg6 = static_cast< BusinessDayConvention >(val6);
    ecode7 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_FloatingRateBond" "', argument " "7"" of type '" "Size""'");
    } 
    arg7 = static_cast< Size >(val7);
    {
      try {
        result = (FloatingRateBondPtr *)new_FloatingRateBondPtr__SWIG_0(arg1,arg2,(Schedule const &)*arg3,(IborIndexPtr const &)*arg4,(DayCounter const &)*arg5,arg6,arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FloatingRateBondPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FloatingRateBond__SWIG_8) {
  {
    Size arg1 ;
    Real arg2 ;
    Schedule *arg3 = 0 ;
    IborIndexPtr *arg4 = 0 ;
    DayCounter *arg5 = 0 ;
    BusinessDayConvention arg6 ;
    size_t val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    FloatingRateBondPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_FloatingRateBond(settlementDays,faceAmount,schedule,index,paymentDayCounter,paymentConvention);");
    }
    ecode1 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FloatingRateBond" "', argument " "1"" of type '" "Size""'");
    } 
    arg1 = static_cast< Size >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FloatingRateBond" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FloatingRateBond" "', argument " "3"" of type '" "Schedule const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatingRateBond" "', argument " "3"" of type '" "Schedule const &""'"); 
    }
    arg3 = reinterpret_cast< Schedule * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_IborIndexPtr,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FloatingRateBond" "', argument " "4"" of type '" "IborIndexPtr const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatingRateBond" "', argument " "4"" of type '" "IborIndexPtr const &""'"); 
    }
    arg4 = reinterpret_cast< IborIndexPtr * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_FloatingRateBond" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatingRateBond" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    arg5 = reinterpret_cast< DayCounter * >(argp5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_FloatingRateBond" "', argument " "6"" of type '" "BusinessDayConvention""'");
    } 
    arg6 = static_cast< BusinessDayConvention >(val6);
    {
      try {
        result = (FloatingRateBondPtr *)new_FloatingRateBondPtr__SWIG_0(arg1,arg2,(Schedule const &)*arg3,(IborIndexPtr const &)*arg4,(DayCounter const &)*arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FloatingRateBondPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FloatingRateBond__SWIG_9) {
  {
    Size arg1 ;
    Real arg2 ;
    Schedule *arg3 = 0 ;
    IborIndexPtr *arg4 = 0 ;
    DayCounter *arg5 = 0 ;
    size_t val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int argvi = 0;
    FloatingRateBondPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_FloatingRateBond(settlementDays,faceAmount,schedule,index,paymentDayCounter);");
    }
    ecode1 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FloatingRateBond" "', argument " "1"" of type '" "Size""'");
    } 
    arg1 = static_cast< Size >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FloatingRateBond" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FloatingRateBond" "', argument " "3"" of type '" "Schedule const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatingRateBond" "', argument " "3"" of type '" "Schedule const &""'"); 
    }
    arg3 = reinterpret_cast< Schedule * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_IborIndexPtr,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FloatingRateBond" "', argument " "4"" of type '" "IborIndexPtr const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatingRateBond" "', argument " "4"" of type '" "IborIndexPtr const &""'"); 
    }
    arg4 = reinterpret_cast< IborIndexPtr * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_FloatingRateBond" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatingRateBond" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    arg5 = reinterpret_cast< DayCounter * >(argp5);
    {
      try {
        result = (FloatingRateBondPtr *)new_FloatingRateBondPtr__SWIG_0(arg1,arg2,(Schedule const &)*arg3,(IborIndexPtr const &)*arg4,(DayCounter const &)*arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FloatingRateBondPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FloatingRateBond) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_IborIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_IborIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_IborIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 8) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_IborIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(7),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(7))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(7));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 9) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_IborIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(7),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(7))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(7));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(8),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(8))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(8));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 10) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_IborIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(7),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(7))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(7));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(8),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(8))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(8));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(9),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(9))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(9));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
    if (items == 11) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_IborIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(7),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(7))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(7));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(8),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(8))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(8));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(9),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(9))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(9));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(10),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(10))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(10));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 7;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_7:
    
    if (items == 12) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_IborIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(7),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(7))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(7));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(8),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(8))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(8));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(9),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(9))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(9));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(10),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(10))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(10));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(11), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 8;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_8:
    
    if (items == 13) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_IborIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(7),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(7))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(7));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(8),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(8))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(8));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(9),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(9))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(9));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(10),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(10))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(10));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(11), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(12), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 9;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_9:
    
    if (items == 14) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_IborIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(7),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(7))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(7));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(8),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(8))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(8));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(9),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(9))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(9));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(10),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(10))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(10));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(11), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(12), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(13), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 10;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_10:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FloatingRateBond__SWIG_9); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FloatingRateBond__SWIG_8); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FloatingRateBond__SWIG_7); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FloatingRateBond__SWIG_6); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FloatingRateBond__SWIG_5); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FloatingRateBond__SWIG_4); return;
    case 7:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FloatingRateBond__SWIG_3); return;
    case 8:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FloatingRateBond__SWIG_2); return;
    case 9:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FloatingRateBond__SWIG_1); return;
    case 10:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FloatingRateBond__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_FloatingRateBond'");
  XSRETURN(0);
}


XS(_wrap_delete_FloatingRateBond) {
  {
    FloatingRateBondPtr *arg1 = (FloatingRateBondPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_FloatingRateBond(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_FloatingRateBondPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FloatingRateBond" "', argument " "1"" of type '" "FloatingRateBondPtr *""'"); 
    }
    arg1 = reinterpret_cast< FloatingRateBondPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CmsRateBond__SWIG_0) {
  {
    Size arg1 ;
    Real arg2 ;
    Schedule *arg3 = 0 ;
    SwapIndexPtr *arg4 = 0 ;
    DayCounter *arg5 = 0 ;
    BusinessDayConvention arg6 ;
    Natural arg7 ;
    std::vector< Real > *arg8 = 0 ;
    std::vector< Spread > *arg9 = 0 ;
    std::vector< Rate > *arg10 = 0 ;
    std::vector< Rate > *arg11 = 0 ;
    bool arg12 ;
    Real arg13 ;
    Date *arg14 = 0 ;
    size_t val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    unsigned int val7 ;
    int ecode7 = 0 ;
    std::vector< double > temp8 ;
    std::vector< double > *v8 ;
    std::vector< double > temp9 ;
    std::vector< double > *v9 ;
    std::vector< double > temp10 ;
    std::vector< double > *v10 ;
    std::vector< double > temp11 ;
    std::vector< double > *v11 ;
    bool val12 ;
    int ecode12 = 0 ;
    double val13 ;
    int ecode13 = 0 ;
    void *argp14 ;
    int res14 = 0 ;
    int argvi = 0;
    CmsRateBondPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 14) || (items > 14)) {
      SWIG_croak("Usage: new_CmsRateBond(settlementDays,faceAmount,schedule,index,paymentDayCounter,paymentConvention,fixingDays,gearings,spreads,caps,floors,inArrears,redemption,issueDate);");
    }
    ecode1 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_CmsRateBond" "', argument " "1"" of type '" "Size""'");
    } 
    arg1 = static_cast< Size >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_CmsRateBond" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CmsRateBond" "', argument " "3"" of type '" "Schedule const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CmsRateBond" "', argument " "3"" of type '" "Schedule const &""'"); 
    }
    arg3 = reinterpret_cast< Schedule * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_SwapIndexPtr,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_CmsRateBond" "', argument " "4"" of type '" "SwapIndexPtr const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CmsRateBond" "', argument " "4"" of type '" "SwapIndexPtr const &""'"); 
    }
    arg4 = reinterpret_cast< SwapIndexPtr * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_CmsRateBond" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CmsRateBond" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    arg5 = reinterpret_cast< DayCounter * >(argp5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_CmsRateBond" "', argument " "6"" of type '" "BusinessDayConvention""'");
    } 
    arg6 = static_cast< BusinessDayConvention >(val6);
    ecode7 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_CmsRateBond" "', argument " "7"" of type '" "Natural""'");
    } 
    arg7 = static_cast< Natural >(val7);
    {
      if (SWIG_ConvertPtr(ST(7),(void **) &v8, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg8 = v8;
      } else if (SvROK(ST(7))) {
        AV *av = (AV *)SvRV(ST(7));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 8 of new_CmsRateBond. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp8.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 8 of "
              "new_CmsRateBond. "
              "Expected an array of ""double");
          }
        }
        arg8 = &temp8;
      } else {
        SWIG_croak("Type error in argument 8 of new_CmsRateBond. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(8),(void **) &v9, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg9 = v9;
      } else if (SvROK(ST(8))) {
        AV *av = (AV *)SvRV(ST(8));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 9 of new_CmsRateBond. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp9.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 9 of "
              "new_CmsRateBond. "
              "Expected an array of ""double");
          }
        }
        arg9 = &temp9;
      } else {
        SWIG_croak("Type error in argument 9 of new_CmsRateBond. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(9),(void **) &v10, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg10 = v10;
      } else if (SvROK(ST(9))) {
        AV *av = (AV *)SvRV(ST(9));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 10 of new_CmsRateBond. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp10.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 10 of "
              "new_CmsRateBond. "
              "Expected an array of ""double");
          }
        }
        arg10 = &temp10;
      } else {
        SWIG_croak("Type error in argument 10 of new_CmsRateBond. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(10),(void **) &v11, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg11 = v11;
      } else if (SvROK(ST(10))) {
        AV *av = (AV *)SvRV(ST(10));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 11 of new_CmsRateBond. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp11.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 11 of "
              "new_CmsRateBond. "
              "Expected an array of ""double");
          }
        }
        arg11 = &temp11;
      } else {
        SWIG_croak("Type error in argument 11 of new_CmsRateBond. "
          "Expected an array of ""double");
      }
    }
    ecode12 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(11), &val12);
    if (!SWIG_IsOK(ecode12)) {
      SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "new_CmsRateBond" "', argument " "12"" of type '" "bool""'");
    } 
    arg12 = static_cast< bool >(val12);
    ecode13 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(12), &val13);
    if (!SWIG_IsOK(ecode13)) {
      SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "new_CmsRateBond" "', argument " "13"" of type '" "Real""'");
    } 
    arg13 = static_cast< Real >(val13);
    res14 = SWIG_ConvertPtr(ST(13), &argp14, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res14)) {
      SWIG_exception_fail(SWIG_ArgError(res14), "in method '" "new_CmsRateBond" "', argument " "14"" of type '" "Date const &""'"); 
    }
    if (!argp14) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CmsRateBond" "', argument " "14"" of type '" "Date const &""'"); 
    }
    arg14 = reinterpret_cast< Date * >(argp14);
    {
      try {
        result = (CmsRateBondPtr *)new_CmsRateBondPtr__SWIG_0(arg1,arg2,(Schedule const &)*arg3,(SwapIndexPtr const &)*arg4,(DayCounter const &)*arg5,arg6,arg7,(std::vector< double > const &)*arg8,(std::vector< double > const &)*arg9,(std::vector< double > const &)*arg10,(std::vector< double > const &)*arg11,arg12,arg13,(Date const &)*arg14);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CmsRateBondPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CmsRateBond__SWIG_1) {
  {
    Size arg1 ;
    Real arg2 ;
    Schedule *arg3 = 0 ;
    SwapIndexPtr *arg4 = 0 ;
    DayCounter *arg5 = 0 ;
    BusinessDayConvention arg6 ;
    Natural arg7 ;
    std::vector< Real > *arg8 = 0 ;
    std::vector< Spread > *arg9 = 0 ;
    std::vector< Rate > *arg10 = 0 ;
    std::vector< Rate > *arg11 = 0 ;
    bool arg12 ;
    Real arg13 ;
    size_t val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    unsigned int val7 ;
    int ecode7 = 0 ;
    std::vector< double > temp8 ;
    std::vector< double > *v8 ;
    std::vector< double > temp9 ;
    std::vector< double > *v9 ;
    std::vector< double > temp10 ;
    std::vector< double > *v10 ;
    std::vector< double > temp11 ;
    std::vector< double > *v11 ;
    bool val12 ;
    int ecode12 = 0 ;
    double val13 ;
    int ecode13 = 0 ;
    int argvi = 0;
    CmsRateBondPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 13) || (items > 13)) {
      SWIG_croak("Usage: new_CmsRateBond(settlementDays,faceAmount,schedule,index,paymentDayCounter,paymentConvention,fixingDays,gearings,spreads,caps,floors,inArrears,redemption);");
    }
    ecode1 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_CmsRateBond" "', argument " "1"" of type '" "Size""'");
    } 
    arg1 = static_cast< Size >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_CmsRateBond" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CmsRateBond" "', argument " "3"" of type '" "Schedule const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CmsRateBond" "', argument " "3"" of type '" "Schedule const &""'"); 
    }
    arg3 = reinterpret_cast< Schedule * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_SwapIndexPtr,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_CmsRateBond" "', argument " "4"" of type '" "SwapIndexPtr const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CmsRateBond" "', argument " "4"" of type '" "SwapIndexPtr const &""'"); 
    }
    arg4 = reinterpret_cast< SwapIndexPtr * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_CmsRateBond" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CmsRateBond" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    arg5 = reinterpret_cast< DayCounter * >(argp5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_CmsRateBond" "', argument " "6"" of type '" "BusinessDayConvention""'");
    } 
    arg6 = static_cast< BusinessDayConvention >(val6);
    ecode7 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_CmsRateBond" "', argument " "7"" of type '" "Natural""'");
    } 
    arg7 = static_cast< Natural >(val7);
    {
      if (SWIG_ConvertPtr(ST(7),(void **) &v8, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg8 = v8;
      } else if (SvROK(ST(7))) {
        AV *av = (AV *)SvRV(ST(7));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 8 of new_CmsRateBond. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp8.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 8 of "
              "new_CmsRateBond. "
              "Expected an array of ""double");
          }
        }
        arg8 = &temp8;
      } else {
        SWIG_croak("Type error in argument 8 of new_CmsRateBond. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(8),(void **) &v9, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg9 = v9;
      } else if (SvROK(ST(8))) {
        AV *av = (AV *)SvRV(ST(8));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 9 of new_CmsRateBond. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp9.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 9 of "
              "new_CmsRateBond. "
              "Expected an array of ""double");
          }
        }
        arg9 = &temp9;
      } else {
        SWIG_croak("Type error in argument 9 of new_CmsRateBond. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(9),(void **) &v10, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg10 = v10;
      } else if (SvROK(ST(9))) {
        AV *av = (AV *)SvRV(ST(9));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 10 of new_CmsRateBond. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp10.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 10 of "
              "new_CmsRateBond. "
              "Expected an array of ""double");
          }
        }
        arg10 = &temp10;
      } else {
        SWIG_croak("Type error in argument 10 of new_CmsRateBond. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(10),(void **) &v11, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg11 = v11;
      } else if (SvROK(ST(10))) {
        AV *av = (AV *)SvRV(ST(10));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 11 of new_CmsRateBond. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp11.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 11 of "
              "new_CmsRateBond. "
              "Expected an array of ""double");
          }
        }
        arg11 = &temp11;
      } else {
        SWIG_croak("Type error in argument 11 of new_CmsRateBond. "
          "Expected an array of ""double");
      }
    }
    ecode12 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(11), &val12);
    if (!SWIG_IsOK(ecode12)) {
      SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "new_CmsRateBond" "', argument " "12"" of type '" "bool""'");
    } 
    arg12 = static_cast< bool >(val12);
    ecode13 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(12), &val13);
    if (!SWIG_IsOK(ecode13)) {
      SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "new_CmsRateBond" "', argument " "13"" of type '" "Real""'");
    } 
    arg13 = static_cast< Real >(val13);
    {
      try {
        result = (CmsRateBondPtr *)new_CmsRateBondPtr__SWIG_0(arg1,arg2,(Schedule const &)*arg3,(SwapIndexPtr const &)*arg4,(DayCounter const &)*arg5,arg6,arg7,(std::vector< double > const &)*arg8,(std::vector< double > const &)*arg9,(std::vector< double > const &)*arg10,(std::vector< double > const &)*arg11,arg12,arg13);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CmsRateBondPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CmsRateBond__SWIG_2) {
  {
    Size arg1 ;
    Real arg2 ;
    Schedule *arg3 = 0 ;
    SwapIndexPtr *arg4 = 0 ;
    DayCounter *arg5 = 0 ;
    BusinessDayConvention arg6 ;
    Natural arg7 ;
    std::vector< Real > *arg8 = 0 ;
    std::vector< Spread > *arg9 = 0 ;
    std::vector< Rate > *arg10 = 0 ;
    std::vector< Rate > *arg11 = 0 ;
    bool arg12 ;
    size_t val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    unsigned int val7 ;
    int ecode7 = 0 ;
    std::vector< double > temp8 ;
    std::vector< double > *v8 ;
    std::vector< double > temp9 ;
    std::vector< double > *v9 ;
    std::vector< double > temp10 ;
    std::vector< double > *v10 ;
    std::vector< double > temp11 ;
    std::vector< double > *v11 ;
    bool val12 ;
    int ecode12 = 0 ;
    int argvi = 0;
    CmsRateBondPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 12) || (items > 12)) {
      SWIG_croak("Usage: new_CmsRateBond(settlementDays,faceAmount,schedule,index,paymentDayCounter,paymentConvention,fixingDays,gearings,spreads,caps,floors,inArrears);");
    }
    ecode1 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_CmsRateBond" "', argument " "1"" of type '" "Size""'");
    } 
    arg1 = static_cast< Size >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_CmsRateBond" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CmsRateBond" "', argument " "3"" of type '" "Schedule const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CmsRateBond" "', argument " "3"" of type '" "Schedule const &""'"); 
    }
    arg3 = reinterpret_cast< Schedule * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_SwapIndexPtr,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_CmsRateBond" "', argument " "4"" of type '" "SwapIndexPtr const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CmsRateBond" "', argument " "4"" of type '" "SwapIndexPtr const &""'"); 
    }
    arg4 = reinterpret_cast< SwapIndexPtr * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_CmsRateBond" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CmsRateBond" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    arg5 = reinterpret_cast< DayCounter * >(argp5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_CmsRateBond" "', argument " "6"" of type '" "BusinessDayConvention""'");
    } 
    arg6 = static_cast< BusinessDayConvention >(val6);
    ecode7 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_CmsRateBond" "', argument " "7"" of type '" "Natural""'");
    } 
    arg7 = static_cast< Natural >(val7);
    {
      if (SWIG_ConvertPtr(ST(7),(void **) &v8, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg8 = v8;
      } else if (SvROK(ST(7))) {
        AV *av = (AV *)SvRV(ST(7));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 8 of new_CmsRateBond. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp8.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 8 of "
              "new_CmsRateBond. "
              "Expected an array of ""double");
          }
        }
        arg8 = &temp8;
      } else {
        SWIG_croak("Type error in argument 8 of new_CmsRateBond. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(8),(void **) &v9, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg9 = v9;
      } else if (SvROK(ST(8))) {
        AV *av = (AV *)SvRV(ST(8));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 9 of new_CmsRateBond. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp9.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 9 of "
              "new_CmsRateBond. "
              "Expected an array of ""double");
          }
        }
        arg9 = &temp9;
      } else {
        SWIG_croak("Type error in argument 9 of new_CmsRateBond. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(9),(void **) &v10, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg10 = v10;
      } else if (SvROK(ST(9))) {
        AV *av = (AV *)SvRV(ST(9));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 10 of new_CmsRateBond. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp10.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 10 of "
              "new_CmsRateBond. "
              "Expected an array of ""double");
          }
        }
        arg10 = &temp10;
      } else {
        SWIG_croak("Type error in argument 10 of new_CmsRateBond. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(10),(void **) &v11, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg11 = v11;
      } else if (SvROK(ST(10))) {
        AV *av = (AV *)SvRV(ST(10));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 11 of new_CmsRateBond. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp11.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 11 of "
              "new_CmsRateBond. "
              "Expected an array of ""double");
          }
        }
        arg11 = &temp11;
      } else {
        SWIG_croak("Type error in argument 11 of new_CmsRateBond. "
          "Expected an array of ""double");
      }
    }
    ecode12 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(11), &val12);
    if (!SWIG_IsOK(ecode12)) {
      SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "new_CmsRateBond" "', argument " "12"" of type '" "bool""'");
    } 
    arg12 = static_cast< bool >(val12);
    {
      try {
        result = (CmsRateBondPtr *)new_CmsRateBondPtr__SWIG_0(arg1,arg2,(Schedule const &)*arg3,(SwapIndexPtr const &)*arg4,(DayCounter const &)*arg5,arg6,arg7,(std::vector< double > const &)*arg8,(std::vector< double > const &)*arg9,(std::vector< double > const &)*arg10,(std::vector< double > const &)*arg11,arg12);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CmsRateBondPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CmsRateBond__SWIG_3) {
  {
    Size arg1 ;
    Real arg2 ;
    Schedule *arg3 = 0 ;
    SwapIndexPtr *arg4 = 0 ;
    DayCounter *arg5 = 0 ;
    BusinessDayConvention arg6 ;
    Natural arg7 ;
    std::vector< Real > *arg8 = 0 ;
    std::vector< Spread > *arg9 = 0 ;
    std::vector< Rate > *arg10 = 0 ;
    std::vector< Rate > *arg11 = 0 ;
    size_t val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    unsigned int val7 ;
    int ecode7 = 0 ;
    std::vector< double > temp8 ;
    std::vector< double > *v8 ;
    std::vector< double > temp9 ;
    std::vector< double > *v9 ;
    std::vector< double > temp10 ;
    std::vector< double > *v10 ;
    std::vector< double > temp11 ;
    std::vector< double > *v11 ;
    int argvi = 0;
    CmsRateBondPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 11) || (items > 11)) {
      SWIG_croak("Usage: new_CmsRateBond(settlementDays,faceAmount,schedule,index,paymentDayCounter,paymentConvention,fixingDays,gearings,spreads,caps,floors);");
    }
    ecode1 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_CmsRateBond" "', argument " "1"" of type '" "Size""'");
    } 
    arg1 = static_cast< Size >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_CmsRateBond" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CmsRateBond" "', argument " "3"" of type '" "Schedule const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CmsRateBond" "', argument " "3"" of type '" "Schedule const &""'"); 
    }
    arg3 = reinterpret_cast< Schedule * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_SwapIndexPtr,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_CmsRateBond" "', argument " "4"" of type '" "SwapIndexPtr const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CmsRateBond" "', argument " "4"" of type '" "SwapIndexPtr const &""'"); 
    }
    arg4 = reinterpret_cast< SwapIndexPtr * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_CmsRateBond" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CmsRateBond" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    arg5 = reinterpret_cast< DayCounter * >(argp5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_CmsRateBond" "', argument " "6"" of type '" "BusinessDayConvention""'");
    } 
    arg6 = static_cast< BusinessDayConvention >(val6);
    ecode7 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_CmsRateBond" "', argument " "7"" of type '" "Natural""'");
    } 
    arg7 = static_cast< Natural >(val7);
    {
      if (SWIG_ConvertPtr(ST(7),(void **) &v8, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg8 = v8;
      } else if (SvROK(ST(7))) {
        AV *av = (AV *)SvRV(ST(7));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 8 of new_CmsRateBond. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp8.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 8 of "
              "new_CmsRateBond. "
              "Expected an array of ""double");
          }
        }
        arg8 = &temp8;
      } else {
        SWIG_croak("Type error in argument 8 of new_CmsRateBond. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(8),(void **) &v9, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg9 = v9;
      } else if (SvROK(ST(8))) {
        AV *av = (AV *)SvRV(ST(8));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 9 of new_CmsRateBond. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp9.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 9 of "
              "new_CmsRateBond. "
              "Expected an array of ""double");
          }
        }
        arg9 = &temp9;
      } else {
        SWIG_croak("Type error in argument 9 of new_CmsRateBond. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(9),(void **) &v10, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg10 = v10;
      } else if (SvROK(ST(9))) {
        AV *av = (AV *)SvRV(ST(9));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 10 of new_CmsRateBond. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp10.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 10 of "
              "new_CmsRateBond. "
              "Expected an array of ""double");
          }
        }
        arg10 = &temp10;
      } else {
        SWIG_croak("Type error in argument 10 of new_CmsRateBond. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(10),(void **) &v11, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg11 = v11;
      } else if (SvROK(ST(10))) {
        AV *av = (AV *)SvRV(ST(10));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 11 of new_CmsRateBond. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp11.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 11 of "
              "new_CmsRateBond. "
              "Expected an array of ""double");
          }
        }
        arg11 = &temp11;
      } else {
        SWIG_croak("Type error in argument 11 of new_CmsRateBond. "
          "Expected an array of ""double");
      }
    }
    {
      try {
        result = (CmsRateBondPtr *)new_CmsRateBondPtr__SWIG_0(arg1,arg2,(Schedule const &)*arg3,(SwapIndexPtr const &)*arg4,(DayCounter const &)*arg5,arg6,arg7,(std::vector< double > const &)*arg8,(std::vector< double > const &)*arg9,(std::vector< double > const &)*arg10,(std::vector< double > const &)*arg11);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CmsRateBondPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CmsRateBond) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 11) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_SwapIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(7),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(7))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(7));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(8),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(8))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(8));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(9),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(9))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(9));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(10),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(10))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(10));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 12) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_SwapIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(7),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(7))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(7));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(8),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(8))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(8));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(9),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(9))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(9));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(10),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(10))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(10));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(11), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 13) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_SwapIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(7),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(7))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(7));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(8),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(8))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(8));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(9),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(9))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(9));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(10),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(10))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(10));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(11), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(12), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 14) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_SwapIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(7),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(7))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(7));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(8),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(8))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(8));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(9),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(9))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(9));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(10),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(10))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(10));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(11), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(12), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(13), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_CmsRateBond__SWIG_3); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_CmsRateBond__SWIG_2); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_CmsRateBond__SWIG_1); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_CmsRateBond__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_CmsRateBond'");
  XSRETURN(0);
}


XS(_wrap_delete_CmsRateBond) {
  {
    CmsRateBondPtr *arg1 = (CmsRateBondPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_CmsRateBond(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CmsRateBondPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CmsRateBond" "', argument " "1"" of type '" "CmsRateBondPtr *""'"); 
    }
    arg1 = reinterpret_cast< CmsRateBondPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DiscountingBondEngine) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    DiscountingBondEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_DiscountingBondEngine(discountCurve);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DiscountingBondEngine" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DiscountingBondEngine" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    {
      try {
        result = (DiscountingBondEnginePtr *)new_DiscountingBondEnginePtr((Handle< YieldTermStructure > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DiscountingBondEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_DiscountingBondEngine) {
  {
    DiscountingBondEnginePtr *arg1 = (DiscountingBondEnginePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_DiscountingBondEngine(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_DiscountingBondEnginePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DiscountingBondEngine" "', argument " "1"" of type '" "DiscountingBondEnginePtr *""'"); 
    }
    arg1 = reinterpret_cast< DiscountingBondEnginePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CallableFixedRateBond) {
  {
    Integer arg1 ;
    Real arg2 ;
    Schedule *arg3 = 0 ;
    std::vector< Rate > *arg4 = 0 ;
    DayCounter *arg5 = 0 ;
    BusinessDayConvention arg6 ;
    Real arg7 ;
    Date arg8 ;
    std::vector< boost::shared_ptr< Callability > > *arg9 = 0 ;
    int val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    std::vector< double > temp4 ;
    std::vector< double > *v4 ;
    void *argp5 ;
    int res5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    double val7 ;
    int ecode7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    std::vector< boost::shared_ptr< Callability > > temp9 ;
    std::vector< boost::shared_ptr< Callability > > *v9 ;
    int argvi = 0;
    CallableFixedRateBondPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 9) || (items > 9)) {
      SWIG_croak("Usage: new_CallableFixedRateBond(settlementDays,faceAmount,schedule,coupons,accrualDayCounter,paymentConvention,redemption,issueDate,putCallSchedule);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_CallableFixedRateBond" "', argument " "1"" of type '" "Integer""'");
    } 
    arg1 = static_cast< Integer >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_CallableFixedRateBond" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CallableFixedRateBond" "', argument " "3"" of type '" "Schedule const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CallableFixedRateBond" "', argument " "3"" of type '" "Schedule const &""'"); 
    }
    arg3 = reinterpret_cast< Schedule * >(argp3);
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of new_CallableFixedRateBond. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp4.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 4 of "
              "new_CallableFixedRateBond. "
              "Expected an array of ""double");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of new_CallableFixedRateBond. "
          "Expected an array of ""double");
      }
    }
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_CallableFixedRateBond" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CallableFixedRateBond" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    arg5 = reinterpret_cast< DayCounter * >(argp5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_CallableFixedRateBond" "', argument " "6"" of type '" "BusinessDayConvention""'");
    } 
    arg6 = static_cast< BusinessDayConvention >(val6);
    ecode7 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_CallableFixedRateBond" "', argument " "7"" of type '" "Real""'");
    } 
    arg7 = static_cast< Real >(val7);
    {
      res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res8)) {
        SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_CallableFixedRateBond" "', argument " "8"" of type '" "Date""'"); 
      }  
      if (!argp8) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CallableFixedRateBond" "', argument " "8"" of type '" "Date""'");
      } else {
        arg8 = *(reinterpret_cast< Date * >(argp8));
      }
    }
    {
      if (SWIG_ConvertPtr(ST(8),(void **) &v9, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Callability_t_t,1) != -1) {
        arg9 = v9;
      } else if (SvROK(ST(8))) {
        AV *av = (AV *)SvRV(ST(8));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 9 of new_CallableFixedRateBond. "
          "Expected an array of " "boost::shared_ptr< Callability >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< Callability >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_Callability_t,0) != -1) {
            temp9.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 9 of "
              "new_CallableFixedRateBond. "
              "Expected an array of " "boost::shared_ptr< Callability >");
          }
        }
        arg9 = &temp9;
      } else {
        SWIG_croak("Type error in argument 9 of new_CallableFixedRateBond. "
          "Expected an array of " "boost::shared_ptr< Callability >");
      }
    }
    {
      try {
        result = (CallableFixedRateBondPtr *)new_CallableFixedRateBondPtr(arg1,arg2,(Schedule const &)*arg3,(std::vector< double > const &)*arg4,(DayCounter const &)*arg5,arg6,arg7,arg8,(std::vector< boost::shared_ptr< Callability > > const &)*arg9);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CallableFixedRateBondPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CallableFixedRateBond_OAS__SWIG_0) {
  {
    CallableFixedRateBondPtr *arg1 = (CallableFixedRateBondPtr *) 0 ;
    Real arg2 ;
    Handle< YieldTermStructure > *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    Compounding arg5 ;
    Frequency arg6 ;
    Date *arg7 = 0 ;
    Real arg8 ;
    Size arg9 ;
    Spread arg10 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    double val8 ;
    int ecode8 = 0 ;
    size_t val9 ;
    int ecode9 = 0 ;
    double val10 ;
    int ecode10 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 10) || (items > 10)) {
      SWIG_croak("Usage: CallableFixedRateBond_OAS(self,cleanPrice,engineTS,dc,compounding,freq,settlementDate,accuracy,maxIterations,guess);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CallableFixedRateBondPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CallableFixedRateBond_OAS" "', argument " "1"" of type '" "CallableFixedRateBondPtr *""'"); 
    }
    arg1 = reinterpret_cast< CallableFixedRateBondPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CallableFixedRateBond_OAS" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CallableFixedRateBond_OAS" "', argument " "3"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CallableFixedRateBond_OAS" "', argument " "3"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< YieldTermStructure > * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "CallableFixedRateBond_OAS" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CallableFixedRateBond_OAS" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CallableFixedRateBond_OAS" "', argument " "5"" of type '" "Compounding""'");
    } 
    arg5 = static_cast< Compounding >(val5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "CallableFixedRateBond_OAS" "', argument " "6"" of type '" "Frequency""'");
    } 
    arg6 = static_cast< Frequency >(val6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "CallableFixedRateBond_OAS" "', argument " "7"" of type '" "Date const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CallableFixedRateBond_OAS" "', argument " "7"" of type '" "Date const &""'"); 
    }
    arg7 = reinterpret_cast< Date * >(argp7);
    ecode8 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "CallableFixedRateBond_OAS" "', argument " "8"" of type '" "Real""'");
    } 
    arg8 = static_cast< Real >(val8);
    ecode9 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(8), &val9);
    if (!SWIG_IsOK(ecode9)) {
      SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "CallableFixedRateBond_OAS" "', argument " "9"" of type '" "Size""'");
    } 
    arg9 = static_cast< Size >(val9);
    ecode10 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), &val10);
    if (!SWIG_IsOK(ecode10)) {
      SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "CallableFixedRateBond_OAS" "', argument " "10"" of type '" "Spread""'");
    } 
    arg10 = static_cast< Spread >(val10);
    {
      try {
        result = (Real)CallableFixedRateBondPtr_OAS__SWIG_0(arg1,arg2,(Handle< YieldTermStructure > const &)*arg3,(DayCounter const &)*arg4,arg5,arg6,(Date const &)*arg7,arg8,arg9,arg10);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CallableFixedRateBond_OAS__SWIG_1) {
  {
    CallableFixedRateBondPtr *arg1 = (CallableFixedRateBondPtr *) 0 ;
    Real arg2 ;
    Handle< YieldTermStructure > *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    Compounding arg5 ;
    Frequency arg6 ;
    Date *arg7 = 0 ;
    Real arg8 ;
    Size arg9 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    double val8 ;
    int ecode8 = 0 ;
    size_t val9 ;
    int ecode9 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 9) || (items > 9)) {
      SWIG_croak("Usage: CallableFixedRateBond_OAS(self,cleanPrice,engineTS,dc,compounding,freq,settlementDate,accuracy,maxIterations);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CallableFixedRateBondPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CallableFixedRateBond_OAS" "', argument " "1"" of type '" "CallableFixedRateBondPtr *""'"); 
    }
    arg1 = reinterpret_cast< CallableFixedRateBondPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CallableFixedRateBond_OAS" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CallableFixedRateBond_OAS" "', argument " "3"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CallableFixedRateBond_OAS" "', argument " "3"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< YieldTermStructure > * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "CallableFixedRateBond_OAS" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CallableFixedRateBond_OAS" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CallableFixedRateBond_OAS" "', argument " "5"" of type '" "Compounding""'");
    } 
    arg5 = static_cast< Compounding >(val5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "CallableFixedRateBond_OAS" "', argument " "6"" of type '" "Frequency""'");
    } 
    arg6 = static_cast< Frequency >(val6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "CallableFixedRateBond_OAS" "', argument " "7"" of type '" "Date const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CallableFixedRateBond_OAS" "', argument " "7"" of type '" "Date const &""'"); 
    }
    arg7 = reinterpret_cast< Date * >(argp7);
    ecode8 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "CallableFixedRateBond_OAS" "', argument " "8"" of type '" "Real""'");
    } 
    arg8 = static_cast< Real >(val8);
    ecode9 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(8), &val9);
    if (!SWIG_IsOK(ecode9)) {
      SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "CallableFixedRateBond_OAS" "', argument " "9"" of type '" "Size""'");
    } 
    arg9 = static_cast< Size >(val9);
    {
      try {
        result = (Real)CallableFixedRateBondPtr_OAS__SWIG_0(arg1,arg2,(Handle< YieldTermStructure > const &)*arg3,(DayCounter const &)*arg4,arg5,arg6,(Date const &)*arg7,arg8,arg9);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CallableFixedRateBond_OAS__SWIG_2) {
  {
    CallableFixedRateBondPtr *arg1 = (CallableFixedRateBondPtr *) 0 ;
    Real arg2 ;
    Handle< YieldTermStructure > *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    Compounding arg5 ;
    Frequency arg6 ;
    Date *arg7 = 0 ;
    Real arg8 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    double val8 ;
    int ecode8 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 8) || (items > 8)) {
      SWIG_croak("Usage: CallableFixedRateBond_OAS(self,cleanPrice,engineTS,dc,compounding,freq,settlementDate,accuracy);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CallableFixedRateBondPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CallableFixedRateBond_OAS" "', argument " "1"" of type '" "CallableFixedRateBondPtr *""'"); 
    }
    arg1 = reinterpret_cast< CallableFixedRateBondPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CallableFixedRateBond_OAS" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CallableFixedRateBond_OAS" "', argument " "3"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CallableFixedRateBond_OAS" "', argument " "3"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< YieldTermStructure > * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "CallableFixedRateBond_OAS" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CallableFixedRateBond_OAS" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CallableFixedRateBond_OAS" "', argument " "5"" of type '" "Compounding""'");
    } 
    arg5 = static_cast< Compounding >(val5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "CallableFixedRateBond_OAS" "', argument " "6"" of type '" "Frequency""'");
    } 
    arg6 = static_cast< Frequency >(val6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "CallableFixedRateBond_OAS" "', argument " "7"" of type '" "Date const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CallableFixedRateBond_OAS" "', argument " "7"" of type '" "Date const &""'"); 
    }
    arg7 = reinterpret_cast< Date * >(argp7);
    ecode8 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "CallableFixedRateBond_OAS" "', argument " "8"" of type '" "Real""'");
    } 
    arg8 = static_cast< Real >(val8);
    {
      try {
        result = (Real)CallableFixedRateBondPtr_OAS__SWIG_0(arg1,arg2,(Handle< YieldTermStructure > const &)*arg3,(DayCounter const &)*arg4,arg5,arg6,(Date const &)*arg7,arg8);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CallableFixedRateBond_OAS__SWIG_3) {
  {
    CallableFixedRateBondPtr *arg1 = (CallableFixedRateBondPtr *) 0 ;
    Real arg2 ;
    Handle< YieldTermStructure > *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    Compounding arg5 ;
    Frequency arg6 ;
    Date *arg7 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: CallableFixedRateBond_OAS(self,cleanPrice,engineTS,dc,compounding,freq,settlementDate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CallableFixedRateBondPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CallableFixedRateBond_OAS" "', argument " "1"" of type '" "CallableFixedRateBondPtr *""'"); 
    }
    arg1 = reinterpret_cast< CallableFixedRateBondPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CallableFixedRateBond_OAS" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CallableFixedRateBond_OAS" "', argument " "3"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CallableFixedRateBond_OAS" "', argument " "3"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< YieldTermStructure > * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "CallableFixedRateBond_OAS" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CallableFixedRateBond_OAS" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CallableFixedRateBond_OAS" "', argument " "5"" of type '" "Compounding""'");
    } 
    arg5 = static_cast< Compounding >(val5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "CallableFixedRateBond_OAS" "', argument " "6"" of type '" "Frequency""'");
    } 
    arg6 = static_cast< Frequency >(val6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "CallableFixedRateBond_OAS" "', argument " "7"" of type '" "Date const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CallableFixedRateBond_OAS" "', argument " "7"" of type '" "Date const &""'"); 
    }
    arg7 = reinterpret_cast< Date * >(argp7);
    {
      try {
        result = (Real)CallableFixedRateBondPtr_OAS__SWIG_0(arg1,arg2,(Handle< YieldTermStructure > const &)*arg3,(DayCounter const &)*arg4,arg5,arg6,(Date const &)*arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CallableFixedRateBond_OAS__SWIG_4) {
  {
    CallableFixedRateBondPtr *arg1 = (CallableFixedRateBondPtr *) 0 ;
    Real arg2 ;
    Handle< YieldTermStructure > *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    Compounding arg5 ;
    Frequency arg6 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: CallableFixedRateBond_OAS(self,cleanPrice,engineTS,dc,compounding,freq);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CallableFixedRateBondPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CallableFixedRateBond_OAS" "', argument " "1"" of type '" "CallableFixedRateBondPtr *""'"); 
    }
    arg1 = reinterpret_cast< CallableFixedRateBondPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CallableFixedRateBond_OAS" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CallableFixedRateBond_OAS" "', argument " "3"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CallableFixedRateBond_OAS" "', argument " "3"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< YieldTermStructure > * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "CallableFixedRateBond_OAS" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CallableFixedRateBond_OAS" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CallableFixedRateBond_OAS" "', argument " "5"" of type '" "Compounding""'");
    } 
    arg5 = static_cast< Compounding >(val5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "CallableFixedRateBond_OAS" "', argument " "6"" of type '" "Frequency""'");
    } 
    arg6 = static_cast< Frequency >(val6);
    {
      try {
        result = (Real)CallableFixedRateBondPtr_OAS__SWIG_0(arg1,arg2,(Handle< YieldTermStructure > const &)*arg3,(DayCounter const &)*arg4,arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CallableFixedRateBond_OAS) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_CallableFixedRateBondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_CallableFixedRateBondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 8) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_CallableFixedRateBondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 9) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_CallableFixedRateBondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(8), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 10) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_CallableFixedRateBondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(8), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CallableFixedRateBond_OAS__SWIG_4); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CallableFixedRateBond_OAS__SWIG_3); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CallableFixedRateBond_OAS__SWIG_2); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CallableFixedRateBond_OAS__SWIG_1); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CallableFixedRateBond_OAS__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'CallableFixedRateBond_OAS'");
  XSRETURN(0);
}


XS(_wrap_CallableFixedRateBond_cleanPriceOAS__SWIG_0) {
  {
    CallableFixedRateBondPtr *arg1 = (CallableFixedRateBondPtr *) 0 ;
    Real arg2 ;
    Handle< YieldTermStructure > *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    Compounding arg5 ;
    Frequency arg6 ;
    Date arg7 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: CallableFixedRateBond_cleanPriceOAS(self,oas,engineTS,dayCounter,compounding,frequency,settlementDate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CallableFixedRateBondPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CallableFixedRateBond_cleanPriceOAS" "', argument " "1"" of type '" "CallableFixedRateBondPtr *""'"); 
    }
    arg1 = reinterpret_cast< CallableFixedRateBondPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CallableFixedRateBond_cleanPriceOAS" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CallableFixedRateBond_cleanPriceOAS" "', argument " "3"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CallableFixedRateBond_cleanPriceOAS" "', argument " "3"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< YieldTermStructure > * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "CallableFixedRateBond_cleanPriceOAS" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CallableFixedRateBond_cleanPriceOAS" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CallableFixedRateBond_cleanPriceOAS" "', argument " "5"" of type '" "Compounding""'");
    } 
    arg5 = static_cast< Compounding >(val5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "CallableFixedRateBond_cleanPriceOAS" "', argument " "6"" of type '" "Frequency""'");
    } 
    arg6 = static_cast< Frequency >(val6);
    {
      res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res7)) {
        SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "CallableFixedRateBond_cleanPriceOAS" "', argument " "7"" of type '" "Date""'"); 
      }  
      if (!argp7) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CallableFixedRateBond_cleanPriceOAS" "', argument " "7"" of type '" "Date""'");
      } else {
        arg7 = *(reinterpret_cast< Date * >(argp7));
      }
    }
    {
      try {
        result = (Real)CallableFixedRateBondPtr_cleanPriceOAS__SWIG_0(arg1,arg2,(Handle< YieldTermStructure > const &)*arg3,(DayCounter const &)*arg4,arg5,arg6,arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CallableFixedRateBond_cleanPriceOAS__SWIG_1) {
  {
    CallableFixedRateBondPtr *arg1 = (CallableFixedRateBondPtr *) 0 ;
    Real arg2 ;
    Handle< YieldTermStructure > *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    Compounding arg5 ;
    Frequency arg6 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: CallableFixedRateBond_cleanPriceOAS(self,oas,engineTS,dayCounter,compounding,frequency);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CallableFixedRateBondPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CallableFixedRateBond_cleanPriceOAS" "', argument " "1"" of type '" "CallableFixedRateBondPtr *""'"); 
    }
    arg1 = reinterpret_cast< CallableFixedRateBondPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CallableFixedRateBond_cleanPriceOAS" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CallableFixedRateBond_cleanPriceOAS" "', argument " "3"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CallableFixedRateBond_cleanPriceOAS" "', argument " "3"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< YieldTermStructure > * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "CallableFixedRateBond_cleanPriceOAS" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CallableFixedRateBond_cleanPriceOAS" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CallableFixedRateBond_cleanPriceOAS" "', argument " "5"" of type '" "Compounding""'");
    } 
    arg5 = static_cast< Compounding >(val5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "CallableFixedRateBond_cleanPriceOAS" "', argument " "6"" of type '" "Frequency""'");
    } 
    arg6 = static_cast< Frequency >(val6);
    {
      try {
        result = (Real)CallableFixedRateBondPtr_cleanPriceOAS__SWIG_0(arg1,arg2,(Handle< YieldTermStructure > const &)*arg3,(DayCounter const &)*arg4,arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CallableFixedRateBond_cleanPriceOAS) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_CallableFixedRateBondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_CallableFixedRateBondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CallableFixedRateBond_cleanPriceOAS__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CallableFixedRateBond_cleanPriceOAS__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'CallableFixedRateBond_cleanPriceOAS'");
  XSRETURN(0);
}


XS(_wrap_CallableFixedRateBond_effectiveDuration__SWIG_0) {
  {
    CallableFixedRateBondPtr *arg1 = (CallableFixedRateBondPtr *) 0 ;
    Real arg2 ;
    Handle< YieldTermStructure > *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    Compounding arg5 ;
    Frequency arg6 ;
    Real arg7 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    double val7 ;
    int ecode7 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: CallableFixedRateBond_effectiveDuration(self,oas,engineTS,dayCounter,compounding,frequency,bump);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CallableFixedRateBondPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CallableFixedRateBond_effectiveDuration" "', argument " "1"" of type '" "CallableFixedRateBondPtr *""'"); 
    }
    arg1 = reinterpret_cast< CallableFixedRateBondPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CallableFixedRateBond_effectiveDuration" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CallableFixedRateBond_effectiveDuration" "', argument " "3"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CallableFixedRateBond_effectiveDuration" "', argument " "3"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< YieldTermStructure > * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "CallableFixedRateBond_effectiveDuration" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CallableFixedRateBond_effectiveDuration" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CallableFixedRateBond_effectiveDuration" "', argument " "5"" of type '" "Compounding""'");
    } 
    arg5 = static_cast< Compounding >(val5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "CallableFixedRateBond_effectiveDuration" "', argument " "6"" of type '" "Frequency""'");
    } 
    arg6 = static_cast< Frequency >(val6);
    ecode7 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "CallableFixedRateBond_effectiveDuration" "', argument " "7"" of type '" "Real""'");
    } 
    arg7 = static_cast< Real >(val7);
    {
      try {
        result = (Real)CallableFixedRateBondPtr_effectiveDuration__SWIG_0(arg1,arg2,(Handle< YieldTermStructure > const &)*arg3,(DayCounter const &)*arg4,arg5,arg6,arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CallableFixedRateBond_effectiveDuration__SWIG_1) {
  {
    CallableFixedRateBondPtr *arg1 = (CallableFixedRateBondPtr *) 0 ;
    Real arg2 ;
    Handle< YieldTermStructure > *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    Compounding arg5 ;
    Frequency arg6 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: CallableFixedRateBond_effectiveDuration(self,oas,engineTS,dayCounter,compounding,frequency);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CallableFixedRateBondPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CallableFixedRateBond_effectiveDuration" "', argument " "1"" of type '" "CallableFixedRateBondPtr *""'"); 
    }
    arg1 = reinterpret_cast< CallableFixedRateBondPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CallableFixedRateBond_effectiveDuration" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CallableFixedRateBond_effectiveDuration" "', argument " "3"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CallableFixedRateBond_effectiveDuration" "', argument " "3"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< YieldTermStructure > * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "CallableFixedRateBond_effectiveDuration" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CallableFixedRateBond_effectiveDuration" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CallableFixedRateBond_effectiveDuration" "', argument " "5"" of type '" "Compounding""'");
    } 
    arg5 = static_cast< Compounding >(val5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "CallableFixedRateBond_effectiveDuration" "', argument " "6"" of type '" "Frequency""'");
    } 
    arg6 = static_cast< Frequency >(val6);
    {
      try {
        result = (Real)CallableFixedRateBondPtr_effectiveDuration__SWIG_0(arg1,arg2,(Handle< YieldTermStructure > const &)*arg3,(DayCounter const &)*arg4,arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CallableFixedRateBond_effectiveDuration) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_CallableFixedRateBondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_CallableFixedRateBondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CallableFixedRateBond_effectiveDuration__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CallableFixedRateBond_effectiveDuration__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'CallableFixedRateBond_effectiveDuration'");
  XSRETURN(0);
}


XS(_wrap_CallableFixedRateBond_effectiveConvexity__SWIG_0) {
  {
    CallableFixedRateBondPtr *arg1 = (CallableFixedRateBondPtr *) 0 ;
    Real arg2 ;
    Handle< YieldTermStructure > *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    Compounding arg5 ;
    Frequency arg6 ;
    Real arg7 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    double val7 ;
    int ecode7 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: CallableFixedRateBond_effectiveConvexity(self,oas,engineTS,dayCounter,compounding,frequency,bump);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CallableFixedRateBondPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CallableFixedRateBond_effectiveConvexity" "', argument " "1"" of type '" "CallableFixedRateBondPtr *""'"); 
    }
    arg1 = reinterpret_cast< CallableFixedRateBondPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CallableFixedRateBond_effectiveConvexity" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CallableFixedRateBond_effectiveConvexity" "', argument " "3"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CallableFixedRateBond_effectiveConvexity" "', argument " "3"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< YieldTermStructure > * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "CallableFixedRateBond_effectiveConvexity" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CallableFixedRateBond_effectiveConvexity" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CallableFixedRateBond_effectiveConvexity" "', argument " "5"" of type '" "Compounding""'");
    } 
    arg5 = static_cast< Compounding >(val5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "CallableFixedRateBond_effectiveConvexity" "', argument " "6"" of type '" "Frequency""'");
    } 
    arg6 = static_cast< Frequency >(val6);
    ecode7 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "CallableFixedRateBond_effectiveConvexity" "', argument " "7"" of type '" "Real""'");
    } 
    arg7 = static_cast< Real >(val7);
    {
      try {
        result = (Real)CallableFixedRateBondPtr_effectiveConvexity__SWIG_0(arg1,arg2,(Handle< YieldTermStructure > const &)*arg3,(DayCounter const &)*arg4,arg5,arg6,arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CallableFixedRateBond_effectiveConvexity__SWIG_1) {
  {
    CallableFixedRateBondPtr *arg1 = (CallableFixedRateBondPtr *) 0 ;
    Real arg2 ;
    Handle< YieldTermStructure > *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    Compounding arg5 ;
    Frequency arg6 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: CallableFixedRateBond_effectiveConvexity(self,oas,engineTS,dayCounter,compounding,frequency);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CallableFixedRateBondPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CallableFixedRateBond_effectiveConvexity" "', argument " "1"" of type '" "CallableFixedRateBondPtr *""'"); 
    }
    arg1 = reinterpret_cast< CallableFixedRateBondPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CallableFixedRateBond_effectiveConvexity" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CallableFixedRateBond_effectiveConvexity" "', argument " "3"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CallableFixedRateBond_effectiveConvexity" "', argument " "3"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< YieldTermStructure > * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "CallableFixedRateBond_effectiveConvexity" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CallableFixedRateBond_effectiveConvexity" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CallableFixedRateBond_effectiveConvexity" "', argument " "5"" of type '" "Compounding""'");
    } 
    arg5 = static_cast< Compounding >(val5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "CallableFixedRateBond_effectiveConvexity" "', argument " "6"" of type '" "Frequency""'");
    } 
    arg6 = static_cast< Frequency >(val6);
    {
      try {
        result = (Real)CallableFixedRateBondPtr_effectiveConvexity__SWIG_0(arg1,arg2,(Handle< YieldTermStructure > const &)*arg3,(DayCounter const &)*arg4,arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CallableFixedRateBond_effectiveConvexity) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_CallableFixedRateBondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_CallableFixedRateBondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CallableFixedRateBond_effectiveConvexity__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CallableFixedRateBond_effectiveConvexity__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'CallableFixedRateBond_effectiveConvexity'");
  XSRETURN(0);
}


XS(_wrap_delete_CallableFixedRateBond) {
  {
    CallableFixedRateBondPtr *arg1 = (CallableFixedRateBondPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_CallableFixedRateBond(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CallableFixedRateBondPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CallableFixedRateBond" "', argument " "1"" of type '" "CallableFixedRateBondPtr *""'"); 
    }
    arg1 = reinterpret_cast< CallableFixedRateBondPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_TreeCallableFixedRateBondEngine__SWIG_0) {
  {
    boost::shared_ptr< ShortRateModel > *arg1 = 0 ;
    Size arg2 ;
    Handle< YieldTermStructure > *arg3 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    TreeCallableFixedRateBondEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_TreeCallableFixedRateBondEngine(model,timeSteps,termStructure);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_ShortRateModel_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_TreeCallableFixedRateBondEngine" "', argument " "1"" of type '" "boost::shared_ptr< ShortRateModel > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_TreeCallableFixedRateBondEngine" "', argument " "1"" of type '" "boost::shared_ptr< ShortRateModel > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< ShortRateModel > * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_TreeCallableFixedRateBondEngine" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_TreeCallableFixedRateBondEngine" "', argument " "3"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_TreeCallableFixedRateBondEngine" "', argument " "3"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< YieldTermStructure > * >(argp3);
    {
      try {
        result = (TreeCallableFixedRateBondEnginePtr *)new_TreeCallableFixedRateBondEnginePtr__SWIG_0((boost::shared_ptr< ShortRateModel > const &)*arg1,arg2,(Handle< YieldTermStructure > const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TreeCallableFixedRateBondEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_TreeCallableFixedRateBondEngine__SWIG_1) {
  {
    boost::shared_ptr< ShortRateModel > *arg1 = 0 ;
    Size arg2 ;
    void *argp1 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    TreeCallableFixedRateBondEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_TreeCallableFixedRateBondEngine(model,timeSteps);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_ShortRateModel_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_TreeCallableFixedRateBondEngine" "', argument " "1"" of type '" "boost::shared_ptr< ShortRateModel > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_TreeCallableFixedRateBondEngine" "', argument " "1"" of type '" "boost::shared_ptr< ShortRateModel > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< ShortRateModel > * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_TreeCallableFixedRateBondEngine" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    {
      try {
        result = (TreeCallableFixedRateBondEnginePtr *)new_TreeCallableFixedRateBondEnginePtr__SWIG_0((boost::shared_ptr< ShortRateModel > const &)*arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TreeCallableFixedRateBondEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_TreeCallableFixedRateBondEngine__SWIG_2) {
  {
    boost::shared_ptr< ShortRateModel > *arg1 = 0 ;
    TimeGrid *arg2 = 0 ;
    Handle< YieldTermStructure > *arg3 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    TreeCallableFixedRateBondEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_TreeCallableFixedRateBondEngine(model,grid,termStructure);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_ShortRateModel_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_TreeCallableFixedRateBondEngine" "', argument " "1"" of type '" "boost::shared_ptr< ShortRateModel > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_TreeCallableFixedRateBondEngine" "', argument " "1"" of type '" "boost::shared_ptr< ShortRateModel > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< ShortRateModel > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_TimeGrid,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_TreeCallableFixedRateBondEngine" "', argument " "2"" of type '" "TimeGrid const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_TreeCallableFixedRateBondEngine" "', argument " "2"" of type '" "TimeGrid const &""'"); 
    }
    arg2 = reinterpret_cast< TimeGrid * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_TreeCallableFixedRateBondEngine" "', argument " "3"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_TreeCallableFixedRateBondEngine" "', argument " "3"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< YieldTermStructure > * >(argp3);
    {
      try {
        result = (TreeCallableFixedRateBondEnginePtr *)new_TreeCallableFixedRateBondEnginePtr__SWIG_2((boost::shared_ptr< ShortRateModel > const &)*arg1,(TimeGrid const &)*arg2,(Handle< YieldTermStructure > const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TreeCallableFixedRateBondEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_TreeCallableFixedRateBondEngine__SWIG_3) {
  {
    boost::shared_ptr< ShortRateModel > *arg1 = 0 ;
    TimeGrid *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    TreeCallableFixedRateBondEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_TreeCallableFixedRateBondEngine(model,grid);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_ShortRateModel_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_TreeCallableFixedRateBondEngine" "', argument " "1"" of type '" "boost::shared_ptr< ShortRateModel > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_TreeCallableFixedRateBondEngine" "', argument " "1"" of type '" "boost::shared_ptr< ShortRateModel > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< ShortRateModel > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_TimeGrid,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_TreeCallableFixedRateBondEngine" "', argument " "2"" of type '" "TimeGrid const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_TreeCallableFixedRateBondEngine" "', argument " "2"" of type '" "TimeGrid const &""'"); 
    }
    arg2 = reinterpret_cast< TimeGrid * >(argp2);
    {
      try {
        result = (TreeCallableFixedRateBondEnginePtr *)new_TreeCallableFixedRateBondEnginePtr__SWIG_2((boost::shared_ptr< ShortRateModel > const &)*arg1,(TimeGrid const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TreeCallableFixedRateBondEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_TreeCallableFixedRateBondEngine) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_ShortRateModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_TimeGrid, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_ShortRateModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_ShortRateModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_TimeGrid, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_ShortRateModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_TreeCallableFixedRateBondEngine__SWIG_3); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_TreeCallableFixedRateBondEngine__SWIG_1); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_TreeCallableFixedRateBondEngine__SWIG_2); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_TreeCallableFixedRateBondEngine__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_TreeCallableFixedRateBondEngine'");
  XSRETURN(0);
}


XS(_wrap_delete_TreeCallableFixedRateBondEngine) {
  {
    TreeCallableFixedRateBondEnginePtr *arg1 = (TreeCallableFixedRateBondEnginePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_TreeCallableFixedRateBondEngine(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_TreeCallableFixedRateBondEnginePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_TreeCallableFixedRateBondEngine" "', argument " "1"" of type '" "TreeCallableFixedRateBondEnginePtr *""'"); 
    }
    arg1 = reinterpret_cast< TreeCallableFixedRateBondEnginePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BlackCallableFixedRateBondEngine) {
  {
    Handle< Quote > *arg1 = 0 ;
    Handle< YieldTermStructure > *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    BlackCallableFixedRateBondEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_BlackCallableFixedRateBondEngine(fwdYieldVol,discountCurve);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_BlackCallableFixedRateBondEngine" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BlackCallableFixedRateBondEngine" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< Quote > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_BlackCallableFixedRateBondEngine" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BlackCallableFixedRateBondEngine" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< YieldTermStructure > * >(argp2);
    {
      try {
        result = (BlackCallableFixedRateBondEnginePtr *)new_BlackCallableFixedRateBondEnginePtr((Handle< Quote > const &)*arg1,(Handle< YieldTermStructure > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BlackCallableFixedRateBondEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_BlackCallableFixedRateBondEngine) {
  {
    BlackCallableFixedRateBondEnginePtr *arg1 = (BlackCallableFixedRateBondEnginePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_BlackCallableFixedRateBondEngine(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BlackCallableFixedRateBondEnginePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_BlackCallableFixedRateBondEngine" "', argument " "1"" of type '" "BlackCallableFixedRateBondEnginePtr *""'"); 
    }
    arg1 = reinterpret_cast< BlackCallableFixedRateBondEnginePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CPIBond__SWIG_0) {
  {
    Natural arg1 ;
    Real arg2 ;
    bool arg3 ;
    Real arg4 ;
    Period *arg5 = 0 ;
    ZeroInflationIndexPtr *arg6 = 0 ;
    CPI::InterpolationType arg7 ;
    Schedule *arg8 = 0 ;
    std::vector< Rate > *arg9 = 0 ;
    DayCounter *arg10 = 0 ;
    BusinessDayConvention arg11 ;
    Date *arg12 = 0 ;
    Calendar *arg13 = 0 ;
    Period *arg14 = 0 ;
    Calendar *arg15 = 0 ;
    BusinessDayConvention arg16 ;
    bool arg17 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    int val7 ;
    int ecode7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    std::vector< double > temp9 ;
    std::vector< double > *v9 ;
    void *argp10 ;
    int res10 = 0 ;
    int val11 ;
    int ecode11 = 0 ;
    void *argp12 ;
    int res12 = 0 ;
    void *argp13 ;
    int res13 = 0 ;
    void *argp14 ;
    int res14 = 0 ;
    void *argp15 ;
    int res15 = 0 ;
    int val16 ;
    int ecode16 = 0 ;
    bool val17 ;
    int ecode17 = 0 ;
    int argvi = 0;
    CPIBondPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 17) || (items > 17)) {
      SWIG_croak("Usage: new_CPIBond(settlementDays,faceAmount,growthOnly,baseCPI,observationLag,cpiIndex,observationInterpolation,schedule,coupons,accrualDayCounter,paymentConvention,issueDate,paymentCalendar,exCouponPeriod,exCouponCalendar,exCouponConvention,exCouponEndOfMonth);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_CPIBond" "', argument " "1"" of type '" "Natural""'");
    } 
    arg1 = static_cast< Natural >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_CPIBond" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_CPIBond" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_CPIBond" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_CPIBond" "', argument " "5"" of type '" "Period const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CPIBond" "', argument " "5"" of type '" "Period const &""'"); 
    }
    arg5 = reinterpret_cast< Period * >(argp5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_ZeroInflationIndexPtr,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_CPIBond" "', argument " "6"" of type '" "ZeroInflationIndexPtr const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CPIBond" "', argument " "6"" of type '" "ZeroInflationIndexPtr const &""'"); 
    }
    arg6 = reinterpret_cast< ZeroInflationIndexPtr * >(argp6);
    ecode7 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_CPIBond" "', argument " "7"" of type '" "CPI::InterpolationType""'");
    } 
    arg7 = static_cast< CPI::InterpolationType >(val7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_CPIBond" "', argument " "8"" of type '" "Schedule const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CPIBond" "', argument " "8"" of type '" "Schedule const &""'"); 
    }
    arg8 = reinterpret_cast< Schedule * >(argp8);
    {
      if (SWIG_ConvertPtr(ST(8),(void **) &v9, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg9 = v9;
      } else if (SvROK(ST(8))) {
        AV *av = (AV *)SvRV(ST(8));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 9 of new_CPIBond. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp9.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 9 of "
              "new_CPIBond. "
              "Expected an array of ""double");
          }
        }
        arg9 = &temp9;
      } else {
        SWIG_croak("Type error in argument 9 of new_CPIBond. "
          "Expected an array of ""double");
      }
    }
    res10 = SWIG_ConvertPtr(ST(9), &argp10, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res10)) {
      SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "new_CPIBond" "', argument " "10"" of type '" "DayCounter const &""'"); 
    }
    if (!argp10) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CPIBond" "', argument " "10"" of type '" "DayCounter const &""'"); 
    }
    arg10 = reinterpret_cast< DayCounter * >(argp10);
    ecode11 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(10), &val11);
    if (!SWIG_IsOK(ecode11)) {
      SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "new_CPIBond" "', argument " "11"" of type '" "BusinessDayConvention""'");
    } 
    arg11 = static_cast< BusinessDayConvention >(val11);
    res12 = SWIG_ConvertPtr(ST(11), &argp12, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res12)) {
      SWIG_exception_fail(SWIG_ArgError(res12), "in method '" "new_CPIBond" "', argument " "12"" of type '" "Date const &""'"); 
    }
    if (!argp12) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CPIBond" "', argument " "12"" of type '" "Date const &""'"); 
    }
    arg12 = reinterpret_cast< Date * >(argp12);
    res13 = SWIG_ConvertPtr(ST(12), &argp13, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res13)) {
      SWIG_exception_fail(SWIG_ArgError(res13), "in method '" "new_CPIBond" "', argument " "13"" of type '" "Calendar const &""'"); 
    }
    if (!argp13) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CPIBond" "', argument " "13"" of type '" "Calendar const &""'"); 
    }
    arg13 = reinterpret_cast< Calendar * >(argp13);
    res14 = SWIG_ConvertPtr(ST(13), &argp14, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res14)) {
      SWIG_exception_fail(SWIG_ArgError(res14), "in method '" "new_CPIBond" "', argument " "14"" of type '" "Period const &""'"); 
    }
    if (!argp14) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CPIBond" "', argument " "14"" of type '" "Period const &""'"); 
    }
    arg14 = reinterpret_cast< Period * >(argp14);
    res15 = SWIG_ConvertPtr(ST(14), &argp15, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res15)) {
      SWIG_exception_fail(SWIG_ArgError(res15), "in method '" "new_CPIBond" "', argument " "15"" of type '" "Calendar const &""'"); 
    }
    if (!argp15) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CPIBond" "', argument " "15"" of type '" "Calendar const &""'"); 
    }
    arg15 = reinterpret_cast< Calendar * >(argp15);
    ecode16 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(15), &val16);
    if (!SWIG_IsOK(ecode16)) {
      SWIG_exception_fail(SWIG_ArgError(ecode16), "in method '" "new_CPIBond" "', argument " "16"" of type '" "BusinessDayConvention""'");
    } 
    arg16 = static_cast< BusinessDayConvention >(val16);
    ecode17 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(16), &val17);
    if (!SWIG_IsOK(ecode17)) {
      SWIG_exception_fail(SWIG_ArgError(ecode17), "in method '" "new_CPIBond" "', argument " "17"" of type '" "bool""'");
    } 
    arg17 = static_cast< bool >(val17);
    {
      try {
        result = (CPIBondPtr *)new_CPIBondPtr__SWIG_0(arg1,arg2,arg3,arg4,(Period const &)*arg5,(ZeroInflationIndexPtr const &)*arg6,arg7,(Schedule const &)*arg8,(std::vector< double > const &)*arg9,(DayCounter const &)*arg10,arg11,(Date const &)*arg12,(Calendar const &)*arg13,(Period const &)*arg14,(Calendar const &)*arg15,arg16,arg17);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CPIBondPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CPIBond__SWIG_1) {
  {
    Natural arg1 ;
    Real arg2 ;
    bool arg3 ;
    Real arg4 ;
    Period *arg5 = 0 ;
    ZeroInflationIndexPtr *arg6 = 0 ;
    CPI::InterpolationType arg7 ;
    Schedule *arg8 = 0 ;
    std::vector< Rate > *arg9 = 0 ;
    DayCounter *arg10 = 0 ;
    BusinessDayConvention arg11 ;
    Date *arg12 = 0 ;
    Calendar *arg13 = 0 ;
    Period *arg14 = 0 ;
    Calendar *arg15 = 0 ;
    BusinessDayConvention arg16 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    int val7 ;
    int ecode7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    std::vector< double > temp9 ;
    std::vector< double > *v9 ;
    void *argp10 ;
    int res10 = 0 ;
    int val11 ;
    int ecode11 = 0 ;
    void *argp12 ;
    int res12 = 0 ;
    void *argp13 ;
    int res13 = 0 ;
    void *argp14 ;
    int res14 = 0 ;
    void *argp15 ;
    int res15 = 0 ;
    int val16 ;
    int ecode16 = 0 ;
    int argvi = 0;
    CPIBondPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 16) || (items > 16)) {
      SWIG_croak("Usage: new_CPIBond(settlementDays,faceAmount,growthOnly,baseCPI,observationLag,cpiIndex,observationInterpolation,schedule,coupons,accrualDayCounter,paymentConvention,issueDate,paymentCalendar,exCouponPeriod,exCouponCalendar,exCouponConvention);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_CPIBond" "', argument " "1"" of type '" "Natural""'");
    } 
    arg1 = static_cast< Natural >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_CPIBond" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_CPIBond" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_CPIBond" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_CPIBond" "', argument " "5"" of type '" "Period const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CPIBond" "', argument " "5"" of type '" "Period const &""'"); 
    }
    arg5 = reinterpret_cast< Period * >(argp5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_ZeroInflationIndexPtr,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_CPIBond" "', argument " "6"" of type '" "ZeroInflationIndexPtr const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CPIBond" "', argument " "6"" of type '" "ZeroInflationIndexPtr const &""'"); 
    }
    arg6 = reinterpret_cast< ZeroInflationIndexPtr * >(argp6);
    ecode7 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_CPIBond" "', argument " "7"" of type '" "CPI::InterpolationType""'");
    } 
    arg7 = static_cast< CPI::InterpolationType >(val7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_CPIBond" "', argument " "8"" of type '" "Schedule const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CPIBond" "', argument " "8"" of type '" "Schedule const &""'"); 
    }
    arg8 = reinterpret_cast< Schedule * >(argp8);
    {
      if (SWIG_ConvertPtr(ST(8),(void **) &v9, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg9 = v9;
      } else if (SvROK(ST(8))) {
        AV *av = (AV *)SvRV(ST(8));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 9 of new_CPIBond. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp9.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 9 of "
              "new_CPIBond. "
              "Expected an array of ""double");
          }
        }
        arg9 = &temp9;
      } else {
        SWIG_croak("Type error in argument 9 of new_CPIBond. "
          "Expected an array of ""double");
      }
    }
    res10 = SWIG_ConvertPtr(ST(9), &argp10, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res10)) {
      SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "new_CPIBond" "', argument " "10"" of type '" "DayCounter const &""'"); 
    }
    if (!argp10) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CPIBond" "', argument " "10"" of type '" "DayCounter const &""'"); 
    }
    arg10 = reinterpret_cast< DayCounter * >(argp10);
    ecode11 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(10), &val11);
    if (!SWIG_IsOK(ecode11)) {
      SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "new_CPIBond" "', argument " "11"" of type '" "BusinessDayConvention""'");
    } 
    arg11 = static_cast< BusinessDayConvention >(val11);
    res12 = SWIG_ConvertPtr(ST(11), &argp12, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res12)) {
      SWIG_exception_fail(SWIG_ArgError(res12), "in method '" "new_CPIBond" "', argument " "12"" of type '" "Date const &""'"); 
    }
    if (!argp12) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CPIBond" "', argument " "12"" of type '" "Date const &""'"); 
    }
    arg12 = reinterpret_cast< Date * >(argp12);
    res13 = SWIG_ConvertPtr(ST(12), &argp13, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res13)) {
      SWIG_exception_fail(SWIG_ArgError(res13), "in method '" "new_CPIBond" "', argument " "13"" of type '" "Calendar const &""'"); 
    }
    if (!argp13) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CPIBond" "', argument " "13"" of type '" "Calendar const &""'"); 
    }
    arg13 = reinterpret_cast< Calendar * >(argp13);
    res14 = SWIG_ConvertPtr(ST(13), &argp14, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res14)) {
      SWIG_exception_fail(SWIG_ArgError(res14), "in method '" "new_CPIBond" "', argument " "14"" of type '" "Period const &""'"); 
    }
    if (!argp14) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CPIBond" "', argument " "14"" of type '" "Period const &""'"); 
    }
    arg14 = reinterpret_cast< Period * >(argp14);
    res15 = SWIG_ConvertPtr(ST(14), &argp15, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res15)) {
      SWIG_exception_fail(SWIG_ArgError(res15), "in method '" "new_CPIBond" "', argument " "15"" of type '" "Calendar const &""'"); 
    }
    if (!argp15) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CPIBond" "', argument " "15"" of type '" "Calendar const &""'"); 
    }
    arg15 = reinterpret_cast< Calendar * >(argp15);
    ecode16 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(15), &val16);
    if (!SWIG_IsOK(ecode16)) {
      SWIG_exception_fail(SWIG_ArgError(ecode16), "in method '" "new_CPIBond" "', argument " "16"" of type '" "BusinessDayConvention""'");
    } 
    arg16 = static_cast< BusinessDayConvention >(val16);
    {
      try {
        result = (CPIBondPtr *)new_CPIBondPtr__SWIG_0(arg1,arg2,arg3,arg4,(Period const &)*arg5,(ZeroInflationIndexPtr const &)*arg6,arg7,(Schedule const &)*arg8,(std::vector< double > const &)*arg9,(DayCounter const &)*arg10,arg11,(Date const &)*arg12,(Calendar const &)*arg13,(Period const &)*arg14,(Calendar const &)*arg15,arg16);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CPIBondPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CPIBond__SWIG_2) {
  {
    Natural arg1 ;
    Real arg2 ;
    bool arg3 ;
    Real arg4 ;
    Period *arg5 = 0 ;
    ZeroInflationIndexPtr *arg6 = 0 ;
    CPI::InterpolationType arg7 ;
    Schedule *arg8 = 0 ;
    std::vector< Rate > *arg9 = 0 ;
    DayCounter *arg10 = 0 ;
    BusinessDayConvention arg11 ;
    Date *arg12 = 0 ;
    Calendar *arg13 = 0 ;
    Period *arg14 = 0 ;
    Calendar *arg15 = 0 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    int val7 ;
    int ecode7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    std::vector< double > temp9 ;
    std::vector< double > *v9 ;
    void *argp10 ;
    int res10 = 0 ;
    int val11 ;
    int ecode11 = 0 ;
    void *argp12 ;
    int res12 = 0 ;
    void *argp13 ;
    int res13 = 0 ;
    void *argp14 ;
    int res14 = 0 ;
    void *argp15 ;
    int res15 = 0 ;
    int argvi = 0;
    CPIBondPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 15) || (items > 15)) {
      SWIG_croak("Usage: new_CPIBond(settlementDays,faceAmount,growthOnly,baseCPI,observationLag,cpiIndex,observationInterpolation,schedule,coupons,accrualDayCounter,paymentConvention,issueDate,paymentCalendar,exCouponPeriod,exCouponCalendar);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_CPIBond" "', argument " "1"" of type '" "Natural""'");
    } 
    arg1 = static_cast< Natural >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_CPIBond" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_CPIBond" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_CPIBond" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_CPIBond" "', argument " "5"" of type '" "Period const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CPIBond" "', argument " "5"" of type '" "Period const &""'"); 
    }
    arg5 = reinterpret_cast< Period * >(argp5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_ZeroInflationIndexPtr,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_CPIBond" "', argument " "6"" of type '" "ZeroInflationIndexPtr const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CPIBond" "', argument " "6"" of type '" "ZeroInflationIndexPtr const &""'"); 
    }
    arg6 = reinterpret_cast< ZeroInflationIndexPtr * >(argp6);
    ecode7 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_CPIBond" "', argument " "7"" of type '" "CPI::InterpolationType""'");
    } 
    arg7 = static_cast< CPI::InterpolationType >(val7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_CPIBond" "', argument " "8"" of type '" "Schedule const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CPIBond" "', argument " "8"" of type '" "Schedule const &""'"); 
    }
    arg8 = reinterpret_cast< Schedule * >(argp8);
    {
      if (SWIG_ConvertPtr(ST(8),(void **) &v9, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg9 = v9;
      } else if (SvROK(ST(8))) {
        AV *av = (AV *)SvRV(ST(8));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 9 of new_CPIBond. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp9.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 9 of "
              "new_CPIBond. "
              "Expected an array of ""double");
          }
        }
        arg9 = &temp9;
      } else {
        SWIG_croak("Type error in argument 9 of new_CPIBond. "
          "Expected an array of ""double");
      }
    }
    res10 = SWIG_ConvertPtr(ST(9), &argp10, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res10)) {
      SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "new_CPIBond" "', argument " "10"" of type '" "DayCounter const &""'"); 
    }
    if (!argp10) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CPIBond" "', argument " "10"" of type '" "DayCounter const &""'"); 
    }
    arg10 = reinterpret_cast< DayCounter * >(argp10);
    ecode11 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(10), &val11);
    if (!SWIG_IsOK(ecode11)) {
      SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "new_CPIBond" "', argument " "11"" of type '" "BusinessDayConvention""'");
    } 
    arg11 = static_cast< BusinessDayConvention >(val11);
    res12 = SWIG_ConvertPtr(ST(11), &argp12, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res12)) {
      SWIG_exception_fail(SWIG_ArgError(res12), "in method '" "new_CPIBond" "', argument " "12"" of type '" "Date const &""'"); 
    }
    if (!argp12) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CPIBond" "', argument " "12"" of type '" "Date const &""'"); 
    }
    arg12 = reinterpret_cast< Date * >(argp12);
    res13 = SWIG_ConvertPtr(ST(12), &argp13, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res13)) {
      SWIG_exception_fail(SWIG_ArgError(res13), "in method '" "new_CPIBond" "', argument " "13"" of type '" "Calendar const &""'"); 
    }
    if (!argp13) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CPIBond" "', argument " "13"" of type '" "Calendar const &""'"); 
    }
    arg13 = reinterpret_cast< Calendar * >(argp13);
    res14 = SWIG_ConvertPtr(ST(13), &argp14, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res14)) {
      SWIG_exception_fail(SWIG_ArgError(res14), "in method '" "new_CPIBond" "', argument " "14"" of type '" "Period const &""'"); 
    }
    if (!argp14) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CPIBond" "', argument " "14"" of type '" "Period const &""'"); 
    }
    arg14 = reinterpret_cast< Period * >(argp14);
    res15 = SWIG_ConvertPtr(ST(14), &argp15, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res15)) {
      SWIG_exception_fail(SWIG_ArgError(res15), "in method '" "new_CPIBond" "', argument " "15"" of type '" "Calendar const &""'"); 
    }
    if (!argp15) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CPIBond" "', argument " "15"" of type '" "Calendar const &""'"); 
    }
    arg15 = reinterpret_cast< Calendar * >(argp15);
    {
      try {
        result = (CPIBondPtr *)new_CPIBondPtr__SWIG_0(arg1,arg2,arg3,arg4,(Period const &)*arg5,(ZeroInflationIndexPtr const &)*arg6,arg7,(Schedule const &)*arg8,(std::vector< double > const &)*arg9,(DayCounter const &)*arg10,arg11,(Date const &)*arg12,(Calendar const &)*arg13,(Period const &)*arg14,(Calendar const &)*arg15);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CPIBondPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CPIBond__SWIG_3) {
  {
    Natural arg1 ;
    Real arg2 ;
    bool arg3 ;
    Real arg4 ;
    Period *arg5 = 0 ;
    ZeroInflationIndexPtr *arg6 = 0 ;
    CPI::InterpolationType arg7 ;
    Schedule *arg8 = 0 ;
    std::vector< Rate > *arg9 = 0 ;
    DayCounter *arg10 = 0 ;
    BusinessDayConvention arg11 ;
    Date *arg12 = 0 ;
    Calendar *arg13 = 0 ;
    Period *arg14 = 0 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    int val7 ;
    int ecode7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    std::vector< double > temp9 ;
    std::vector< double > *v9 ;
    void *argp10 ;
    int res10 = 0 ;
    int val11 ;
    int ecode11 = 0 ;
    void *argp12 ;
    int res12 = 0 ;
    void *argp13 ;
    int res13 = 0 ;
    void *argp14 ;
    int res14 = 0 ;
    int argvi = 0;
    CPIBondPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 14) || (items > 14)) {
      SWIG_croak("Usage: new_CPIBond(settlementDays,faceAmount,growthOnly,baseCPI,observationLag,cpiIndex,observationInterpolation,schedule,coupons,accrualDayCounter,paymentConvention,issueDate,paymentCalendar,exCouponPeriod);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_CPIBond" "', argument " "1"" of type '" "Natural""'");
    } 
    arg1 = static_cast< Natural >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_CPIBond" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_CPIBond" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_CPIBond" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_CPIBond" "', argument " "5"" of type '" "Period const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CPIBond" "', argument " "5"" of type '" "Period const &""'"); 
    }
    arg5 = reinterpret_cast< Period * >(argp5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_ZeroInflationIndexPtr,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_CPIBond" "', argument " "6"" of type '" "ZeroInflationIndexPtr const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CPIBond" "', argument " "6"" of type '" "ZeroInflationIndexPtr const &""'"); 
    }
    arg6 = reinterpret_cast< ZeroInflationIndexPtr * >(argp6);
    ecode7 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_CPIBond" "', argument " "7"" of type '" "CPI::InterpolationType""'");
    } 
    arg7 = static_cast< CPI::InterpolationType >(val7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_CPIBond" "', argument " "8"" of type '" "Schedule const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CPIBond" "', argument " "8"" of type '" "Schedule const &""'"); 
    }
    arg8 = reinterpret_cast< Schedule * >(argp8);
    {
      if (SWIG_ConvertPtr(ST(8),(void **) &v9, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg9 = v9;
      } else if (SvROK(ST(8))) {
        AV *av = (AV *)SvRV(ST(8));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 9 of new_CPIBond. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp9.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 9 of "
              "new_CPIBond. "
              "Expected an array of ""double");
          }
        }
        arg9 = &temp9;
      } else {
        SWIG_croak("Type error in argument 9 of new_CPIBond. "
          "Expected an array of ""double");
      }
    }
    res10 = SWIG_ConvertPtr(ST(9), &argp10, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res10)) {
      SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "new_CPIBond" "', argument " "10"" of type '" "DayCounter const &""'"); 
    }
    if (!argp10) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CPIBond" "', argument " "10"" of type '" "DayCounter const &""'"); 
    }
    arg10 = reinterpret_cast< DayCounter * >(argp10);
    ecode11 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(10), &val11);
    if (!SWIG_IsOK(ecode11)) {
      SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "new_CPIBond" "', argument " "11"" of type '" "BusinessDayConvention""'");
    } 
    arg11 = static_cast< BusinessDayConvention >(val11);
    res12 = SWIG_ConvertPtr(ST(11), &argp12, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res12)) {
      SWIG_exception_fail(SWIG_ArgError(res12), "in method '" "new_CPIBond" "', argument " "12"" of type '" "Date const &""'"); 
    }
    if (!argp12) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CPIBond" "', argument " "12"" of type '" "Date const &""'"); 
    }
    arg12 = reinterpret_cast< Date * >(argp12);
    res13 = SWIG_ConvertPtr(ST(12), &argp13, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res13)) {
      SWIG_exception_fail(SWIG_ArgError(res13), "in method '" "new_CPIBond" "', argument " "13"" of type '" "Calendar const &""'"); 
    }
    if (!argp13) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CPIBond" "', argument " "13"" of type '" "Calendar const &""'"); 
    }
    arg13 = reinterpret_cast< Calendar * >(argp13);
    res14 = SWIG_ConvertPtr(ST(13), &argp14, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res14)) {
      SWIG_exception_fail(SWIG_ArgError(res14), "in method '" "new_CPIBond" "', argument " "14"" of type '" "Period const &""'"); 
    }
    if (!argp14) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CPIBond" "', argument " "14"" of type '" "Period const &""'"); 
    }
    arg14 = reinterpret_cast< Period * >(argp14);
    {
      try {
        result = (CPIBondPtr *)new_CPIBondPtr__SWIG_0(arg1,arg2,arg3,arg4,(Period const &)*arg5,(ZeroInflationIndexPtr const &)*arg6,arg7,(Schedule const &)*arg8,(std::vector< double > const &)*arg9,(DayCounter const &)*arg10,arg11,(Date const &)*arg12,(Calendar const &)*arg13,(Period const &)*arg14);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CPIBondPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CPIBond__SWIG_4) {
  {
    Natural arg1 ;
    Real arg2 ;
    bool arg3 ;
    Real arg4 ;
    Period *arg5 = 0 ;
    ZeroInflationIndexPtr *arg6 = 0 ;
    CPI::InterpolationType arg7 ;
    Schedule *arg8 = 0 ;
    std::vector< Rate > *arg9 = 0 ;
    DayCounter *arg10 = 0 ;
    BusinessDayConvention arg11 ;
    Date *arg12 = 0 ;
    Calendar *arg13 = 0 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    int val7 ;
    int ecode7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    std::vector< double > temp9 ;
    std::vector< double > *v9 ;
    void *argp10 ;
    int res10 = 0 ;
    int val11 ;
    int ecode11 = 0 ;
    void *argp12 ;
    int res12 = 0 ;
    void *argp13 ;
    int res13 = 0 ;
    int argvi = 0;
    CPIBondPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 13) || (items > 13)) {
      SWIG_croak("Usage: new_CPIBond(settlementDays,faceAmount,growthOnly,baseCPI,observationLag,cpiIndex,observationInterpolation,schedule,coupons,accrualDayCounter,paymentConvention,issueDate,paymentCalendar);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_CPIBond" "', argument " "1"" of type '" "Natural""'");
    } 
    arg1 = static_cast< Natural >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_CPIBond" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_CPIBond" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_CPIBond" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_CPIBond" "', argument " "5"" of type '" "Period const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CPIBond" "', argument " "5"" of type '" "Period const &""'"); 
    }
    arg5 = reinterpret_cast< Period * >(argp5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_ZeroInflationIndexPtr,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_CPIBond" "', argument " "6"" of type '" "ZeroInflationIndexPtr const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CPIBond" "', argument " "6"" of type '" "ZeroInflationIndexPtr const &""'"); 
    }
    arg6 = reinterpret_cast< ZeroInflationIndexPtr * >(argp6);
    ecode7 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_CPIBond" "', argument " "7"" of type '" "CPI::InterpolationType""'");
    } 
    arg7 = static_cast< CPI::InterpolationType >(val7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_CPIBond" "', argument " "8"" of type '" "Schedule const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CPIBond" "', argument " "8"" of type '" "Schedule const &""'"); 
    }
    arg8 = reinterpret_cast< Schedule * >(argp8);
    {
      if (SWIG_ConvertPtr(ST(8),(void **) &v9, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg9 = v9;
      } else if (SvROK(ST(8))) {
        AV *av = (AV *)SvRV(ST(8));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 9 of new_CPIBond. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp9.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 9 of "
              "new_CPIBond. "
              "Expected an array of ""double");
          }
        }
        arg9 = &temp9;
      } else {
        SWIG_croak("Type error in argument 9 of new_CPIBond. "
          "Expected an array of ""double");
      }
    }
    res10 = SWIG_ConvertPtr(ST(9), &argp10, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res10)) {
      SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "new_CPIBond" "', argument " "10"" of type '" "DayCounter const &""'"); 
    }
    if (!argp10) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CPIBond" "', argument " "10"" of type '" "DayCounter const &""'"); 
    }
    arg10 = reinterpret_cast< DayCounter * >(argp10);
    ecode11 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(10), &val11);
    if (!SWIG_IsOK(ecode11)) {
      SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "new_CPIBond" "', argument " "11"" of type '" "BusinessDayConvention""'");
    } 
    arg11 = static_cast< BusinessDayConvention >(val11);
    res12 = SWIG_ConvertPtr(ST(11), &argp12, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res12)) {
      SWIG_exception_fail(SWIG_ArgError(res12), "in method '" "new_CPIBond" "', argument " "12"" of type '" "Date const &""'"); 
    }
    if (!argp12) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CPIBond" "', argument " "12"" of type '" "Date const &""'"); 
    }
    arg12 = reinterpret_cast< Date * >(argp12);
    res13 = SWIG_ConvertPtr(ST(12), &argp13, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res13)) {
      SWIG_exception_fail(SWIG_ArgError(res13), "in method '" "new_CPIBond" "', argument " "13"" of type '" "Calendar const &""'"); 
    }
    if (!argp13) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CPIBond" "', argument " "13"" of type '" "Calendar const &""'"); 
    }
    arg13 = reinterpret_cast< Calendar * >(argp13);
    {
      try {
        result = (CPIBondPtr *)new_CPIBondPtr__SWIG_0(arg1,arg2,arg3,arg4,(Period const &)*arg5,(ZeroInflationIndexPtr const &)*arg6,arg7,(Schedule const &)*arg8,(std::vector< double > const &)*arg9,(DayCounter const &)*arg10,arg11,(Date const &)*arg12,(Calendar const &)*arg13);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CPIBondPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CPIBond__SWIG_5) {
  {
    Natural arg1 ;
    Real arg2 ;
    bool arg3 ;
    Real arg4 ;
    Period *arg5 = 0 ;
    ZeroInflationIndexPtr *arg6 = 0 ;
    CPI::InterpolationType arg7 ;
    Schedule *arg8 = 0 ;
    std::vector< Rate > *arg9 = 0 ;
    DayCounter *arg10 = 0 ;
    BusinessDayConvention arg11 ;
    Date *arg12 = 0 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    int val7 ;
    int ecode7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    std::vector< double > temp9 ;
    std::vector< double > *v9 ;
    void *argp10 ;
    int res10 = 0 ;
    int val11 ;
    int ecode11 = 0 ;
    void *argp12 ;
    int res12 = 0 ;
    int argvi = 0;
    CPIBondPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 12) || (items > 12)) {
      SWIG_croak("Usage: new_CPIBond(settlementDays,faceAmount,growthOnly,baseCPI,observationLag,cpiIndex,observationInterpolation,schedule,coupons,accrualDayCounter,paymentConvention,issueDate);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_CPIBond" "', argument " "1"" of type '" "Natural""'");
    } 
    arg1 = static_cast< Natural >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_CPIBond" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_CPIBond" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_CPIBond" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_CPIBond" "', argument " "5"" of type '" "Period const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CPIBond" "', argument " "5"" of type '" "Period const &""'"); 
    }
    arg5 = reinterpret_cast< Period * >(argp5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_ZeroInflationIndexPtr,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_CPIBond" "', argument " "6"" of type '" "ZeroInflationIndexPtr const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CPIBond" "', argument " "6"" of type '" "ZeroInflationIndexPtr const &""'"); 
    }
    arg6 = reinterpret_cast< ZeroInflationIndexPtr * >(argp6);
    ecode7 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_CPIBond" "', argument " "7"" of type '" "CPI::InterpolationType""'");
    } 
    arg7 = static_cast< CPI::InterpolationType >(val7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_CPIBond" "', argument " "8"" of type '" "Schedule const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CPIBond" "', argument " "8"" of type '" "Schedule const &""'"); 
    }
    arg8 = reinterpret_cast< Schedule * >(argp8);
    {
      if (SWIG_ConvertPtr(ST(8),(void **) &v9, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg9 = v9;
      } else if (SvROK(ST(8))) {
        AV *av = (AV *)SvRV(ST(8));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 9 of new_CPIBond. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp9.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 9 of "
              "new_CPIBond. "
              "Expected an array of ""double");
          }
        }
        arg9 = &temp9;
      } else {
        SWIG_croak("Type error in argument 9 of new_CPIBond. "
          "Expected an array of ""double");
      }
    }
    res10 = SWIG_ConvertPtr(ST(9), &argp10, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res10)) {
      SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "new_CPIBond" "', argument " "10"" of type '" "DayCounter const &""'"); 
    }
    if (!argp10) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CPIBond" "', argument " "10"" of type '" "DayCounter const &""'"); 
    }
    arg10 = reinterpret_cast< DayCounter * >(argp10);
    ecode11 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(10), &val11);
    if (!SWIG_IsOK(ecode11)) {
      SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "new_CPIBond" "', argument " "11"" of type '" "BusinessDayConvention""'");
    } 
    arg11 = static_cast< BusinessDayConvention >(val11);
    res12 = SWIG_ConvertPtr(ST(11), &argp12, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res12)) {
      SWIG_exception_fail(SWIG_ArgError(res12), "in method '" "new_CPIBond" "', argument " "12"" of type '" "Date const &""'"); 
    }
    if (!argp12) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CPIBond" "', argument " "12"" of type '" "Date const &""'"); 
    }
    arg12 = reinterpret_cast< Date * >(argp12);
    {
      try {
        result = (CPIBondPtr *)new_CPIBondPtr__SWIG_0(arg1,arg2,arg3,arg4,(Period const &)*arg5,(ZeroInflationIndexPtr const &)*arg6,arg7,(Schedule const &)*arg8,(std::vector< double > const &)*arg9,(DayCounter const &)*arg10,arg11,(Date const &)*arg12);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CPIBondPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CPIBond__SWIG_6) {
  {
    Natural arg1 ;
    Real arg2 ;
    bool arg3 ;
    Real arg4 ;
    Period *arg5 = 0 ;
    ZeroInflationIndexPtr *arg6 = 0 ;
    CPI::InterpolationType arg7 ;
    Schedule *arg8 = 0 ;
    std::vector< Rate > *arg9 = 0 ;
    DayCounter *arg10 = 0 ;
    BusinessDayConvention arg11 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    int val7 ;
    int ecode7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    std::vector< double > temp9 ;
    std::vector< double > *v9 ;
    void *argp10 ;
    int res10 = 0 ;
    int val11 ;
    int ecode11 = 0 ;
    int argvi = 0;
    CPIBondPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 11) || (items > 11)) {
      SWIG_croak("Usage: new_CPIBond(settlementDays,faceAmount,growthOnly,baseCPI,observationLag,cpiIndex,observationInterpolation,schedule,coupons,accrualDayCounter,paymentConvention);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_CPIBond" "', argument " "1"" of type '" "Natural""'");
    } 
    arg1 = static_cast< Natural >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_CPIBond" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_CPIBond" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_CPIBond" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_CPIBond" "', argument " "5"" of type '" "Period const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CPIBond" "', argument " "5"" of type '" "Period const &""'"); 
    }
    arg5 = reinterpret_cast< Period * >(argp5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_ZeroInflationIndexPtr,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_CPIBond" "', argument " "6"" of type '" "ZeroInflationIndexPtr const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CPIBond" "', argument " "6"" of type '" "ZeroInflationIndexPtr const &""'"); 
    }
    arg6 = reinterpret_cast< ZeroInflationIndexPtr * >(argp6);
    ecode7 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_CPIBond" "', argument " "7"" of type '" "CPI::InterpolationType""'");
    } 
    arg7 = static_cast< CPI::InterpolationType >(val7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_CPIBond" "', argument " "8"" of type '" "Schedule const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CPIBond" "', argument " "8"" of type '" "Schedule const &""'"); 
    }
    arg8 = reinterpret_cast< Schedule * >(argp8);
    {
      if (SWIG_ConvertPtr(ST(8),(void **) &v9, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg9 = v9;
      } else if (SvROK(ST(8))) {
        AV *av = (AV *)SvRV(ST(8));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 9 of new_CPIBond. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp9.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 9 of "
              "new_CPIBond. "
              "Expected an array of ""double");
          }
        }
        arg9 = &temp9;
      } else {
        SWIG_croak("Type error in argument 9 of new_CPIBond. "
          "Expected an array of ""double");
      }
    }
    res10 = SWIG_ConvertPtr(ST(9), &argp10, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res10)) {
      SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "new_CPIBond" "', argument " "10"" of type '" "DayCounter const &""'"); 
    }
    if (!argp10) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CPIBond" "', argument " "10"" of type '" "DayCounter const &""'"); 
    }
    arg10 = reinterpret_cast< DayCounter * >(argp10);
    ecode11 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(10), &val11);
    if (!SWIG_IsOK(ecode11)) {
      SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "new_CPIBond" "', argument " "11"" of type '" "BusinessDayConvention""'");
    } 
    arg11 = static_cast< BusinessDayConvention >(val11);
    {
      try {
        result = (CPIBondPtr *)new_CPIBondPtr__SWIG_0(arg1,arg2,arg3,arg4,(Period const &)*arg5,(ZeroInflationIndexPtr const &)*arg6,arg7,(Schedule const &)*arg8,(std::vector< double > const &)*arg9,(DayCounter const &)*arg10,arg11);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CPIBondPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CPIBond__SWIG_7) {
  {
    Natural arg1 ;
    Real arg2 ;
    bool arg3 ;
    Real arg4 ;
    Period *arg5 = 0 ;
    ZeroInflationIndexPtr *arg6 = 0 ;
    CPI::InterpolationType arg7 ;
    Schedule *arg8 = 0 ;
    std::vector< Rate > *arg9 = 0 ;
    DayCounter *arg10 = 0 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    int val7 ;
    int ecode7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    std::vector< double > temp9 ;
    std::vector< double > *v9 ;
    void *argp10 ;
    int res10 = 0 ;
    int argvi = 0;
    CPIBondPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 10) || (items > 10)) {
      SWIG_croak("Usage: new_CPIBond(settlementDays,faceAmount,growthOnly,baseCPI,observationLag,cpiIndex,observationInterpolation,schedule,coupons,accrualDayCounter);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_CPIBond" "', argument " "1"" of type '" "Natural""'");
    } 
    arg1 = static_cast< Natural >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_CPIBond" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_CPIBond" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_CPIBond" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_CPIBond" "', argument " "5"" of type '" "Period const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CPIBond" "', argument " "5"" of type '" "Period const &""'"); 
    }
    arg5 = reinterpret_cast< Period * >(argp5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_ZeroInflationIndexPtr,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_CPIBond" "', argument " "6"" of type '" "ZeroInflationIndexPtr const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CPIBond" "', argument " "6"" of type '" "ZeroInflationIndexPtr const &""'"); 
    }
    arg6 = reinterpret_cast< ZeroInflationIndexPtr * >(argp6);
    ecode7 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_CPIBond" "', argument " "7"" of type '" "CPI::InterpolationType""'");
    } 
    arg7 = static_cast< CPI::InterpolationType >(val7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_CPIBond" "', argument " "8"" of type '" "Schedule const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CPIBond" "', argument " "8"" of type '" "Schedule const &""'"); 
    }
    arg8 = reinterpret_cast< Schedule * >(argp8);
    {
      if (SWIG_ConvertPtr(ST(8),(void **) &v9, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg9 = v9;
      } else if (SvROK(ST(8))) {
        AV *av = (AV *)SvRV(ST(8));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 9 of new_CPIBond. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp9.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 9 of "
              "new_CPIBond. "
              "Expected an array of ""double");
          }
        }
        arg9 = &temp9;
      } else {
        SWIG_croak("Type error in argument 9 of new_CPIBond. "
          "Expected an array of ""double");
      }
    }
    res10 = SWIG_ConvertPtr(ST(9), &argp10, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res10)) {
      SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "new_CPIBond" "', argument " "10"" of type '" "DayCounter const &""'"); 
    }
    if (!argp10) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CPIBond" "', argument " "10"" of type '" "DayCounter const &""'"); 
    }
    arg10 = reinterpret_cast< DayCounter * >(argp10);
    {
      try {
        result = (CPIBondPtr *)new_CPIBondPtr__SWIG_0(arg1,arg2,arg3,arg4,(Period const &)*arg5,(ZeroInflationIndexPtr const &)*arg6,arg7,(Schedule const &)*arg8,(std::vector< double > const &)*arg9,(DayCounter const &)*arg10);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CPIBondPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CPIBond) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 10) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_ZeroInflationIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(8),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(8))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(8));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(9), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 11) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_ZeroInflationIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(8),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(8))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(8));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(9), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(10), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 12) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_ZeroInflationIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(8),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(8))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(8));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(9), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(10), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(11), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 13) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_ZeroInflationIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(8),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(8))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(8));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(9), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(10), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(11), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(12), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 14) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_ZeroInflationIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(8),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(8))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(8));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(9), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(10), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(11), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(12), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(13), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 15) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_ZeroInflationIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(8),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(8))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(8));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(9), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(10), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(11), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(12), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(13), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(14), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
    if (items == 16) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_ZeroInflationIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(8),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(8))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(8));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(9), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(10), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(11), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(12), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(13), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(14), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(15), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 7;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_7:
    
    if (items == 17) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_ZeroInflationIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(8),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(8))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(8));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(9), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(10), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(11), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(12), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(13), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(14), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(15), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(16), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 8;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_8:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_CPIBond__SWIG_7); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_CPIBond__SWIG_6); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_CPIBond__SWIG_5); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_CPIBond__SWIG_4); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_CPIBond__SWIG_3); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_CPIBond__SWIG_2); return;
    case 7:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_CPIBond__SWIG_1); return;
    case 8:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_CPIBond__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_CPIBond'");
  XSRETURN(0);
}


XS(_wrap_delete_CPIBond) {
  {
    CPIBondPtr *arg1 = (CPIBondPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_CPIBond(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CPIBondPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CPIBond" "', argument " "1"" of type '" "CPIBondPtr *""'"); 
    }
    arg1 = reinterpret_cast< CPIBondPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_startDate) {
  {
    BondPtr *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BondFunctions_startDate(bond);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_startDate" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_startDate" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    {
      try {
        result = BondFunctions_startDate((BondPtr const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_maturityDate) {
  {
    BondPtr *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BondFunctions_maturityDate(bond);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_maturityDate" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_maturityDate" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    {
      try {
        result = BondFunctions_maturityDate((BondPtr const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_isTradable__SWIG_0) {
  {
    BondPtr *arg1 = 0 ;
    Date arg2 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: BondFunctions_isTradable(bond,settlementDate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_isTradable" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_isTradable" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    {
      res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BondFunctions_isTradable" "', argument " "2"" of type '" "Date""'"); 
      }  
      if (!argp2) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_isTradable" "', argument " "2"" of type '" "Date""'");
      } else {
        arg2 = *(reinterpret_cast< Date * >(argp2));
      }
    }
    {
      try {
        result = (bool)BondFunctions_isTradable__SWIG_0((BondPtr const &)*arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_isTradable__SWIG_1) {
  {
    BondPtr *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BondFunctions_isTradable(bond);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_isTradable" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_isTradable" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    {
      try {
        result = (bool)BondFunctions_isTradable__SWIG_0((BondPtr const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_isTradable) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_isTradable__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_isTradable__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'BondFunctions_isTradable'");
  XSRETURN(0);
}


XS(_wrap_BondFunctions_previousCashFlowDate__SWIG_0) {
  {
    BondPtr *arg1 = 0 ;
    Date arg2 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: BondFunctions_previousCashFlowDate(bond,refDate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_previousCashFlowDate" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_previousCashFlowDate" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    {
      res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BondFunctions_previousCashFlowDate" "', argument " "2"" of type '" "Date""'"); 
      }  
      if (!argp2) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_previousCashFlowDate" "', argument " "2"" of type '" "Date""'");
      } else {
        arg2 = *(reinterpret_cast< Date * >(argp2));
      }
    }
    {
      try {
        result = BondFunctions_previousCashFlowDate__SWIG_0((BondPtr const &)*arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_previousCashFlowDate__SWIG_1) {
  {
    BondPtr *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BondFunctions_previousCashFlowDate(bond);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_previousCashFlowDate" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_previousCashFlowDate" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    {
      try {
        result = BondFunctions_previousCashFlowDate__SWIG_0((BondPtr const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_previousCashFlowDate) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_previousCashFlowDate__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_previousCashFlowDate__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'BondFunctions_previousCashFlowDate'");
  XSRETURN(0);
}


XS(_wrap_BondFunctions_nextCashFlowDate__SWIG_0) {
  {
    BondPtr *arg1 = 0 ;
    Date arg2 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: BondFunctions_nextCashFlowDate(bond,refDate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_nextCashFlowDate" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_nextCashFlowDate" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    {
      res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BondFunctions_nextCashFlowDate" "', argument " "2"" of type '" "Date""'"); 
      }  
      if (!argp2) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_nextCashFlowDate" "', argument " "2"" of type '" "Date""'");
      } else {
        arg2 = *(reinterpret_cast< Date * >(argp2));
      }
    }
    {
      try {
        result = BondFunctions_nextCashFlowDate__SWIG_0((BondPtr const &)*arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_nextCashFlowDate__SWIG_1) {
  {
    BondPtr *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BondFunctions_nextCashFlowDate(bond);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_nextCashFlowDate" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_nextCashFlowDate" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    {
      try {
        result = BondFunctions_nextCashFlowDate__SWIG_0((BondPtr const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_nextCashFlowDate) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_nextCashFlowDate__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_nextCashFlowDate__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'BondFunctions_nextCashFlowDate'");
  XSRETURN(0);
}


XS(_wrap_BondFunctions_previousCashFlowAmount__SWIG_0) {
  {
    BondPtr *arg1 = 0 ;
    Date arg2 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: BondFunctions_previousCashFlowAmount(bond,refDate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_previousCashFlowAmount" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_previousCashFlowAmount" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    {
      res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BondFunctions_previousCashFlowAmount" "', argument " "2"" of type '" "Date""'"); 
      }  
      if (!argp2) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_previousCashFlowAmount" "', argument " "2"" of type '" "Date""'");
      } else {
        arg2 = *(reinterpret_cast< Date * >(argp2));
      }
    }
    {
      try {
        result = (Real)BondFunctions_previousCashFlowAmount__SWIG_0((BondPtr const &)*arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_previousCashFlowAmount__SWIG_1) {
  {
    BondPtr *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BondFunctions_previousCashFlowAmount(bond);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_previousCashFlowAmount" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_previousCashFlowAmount" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    {
      try {
        result = (Real)BondFunctions_previousCashFlowAmount__SWIG_0((BondPtr const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_previousCashFlowAmount) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_previousCashFlowAmount__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_previousCashFlowAmount__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'BondFunctions_previousCashFlowAmount'");
  XSRETURN(0);
}


XS(_wrap_BondFunctions_nextCashFlowAmount__SWIG_0) {
  {
    BondPtr *arg1 = 0 ;
    Date arg2 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: BondFunctions_nextCashFlowAmount(bond,refDate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_nextCashFlowAmount" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_nextCashFlowAmount" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    {
      res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BondFunctions_nextCashFlowAmount" "', argument " "2"" of type '" "Date""'"); 
      }  
      if (!argp2) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_nextCashFlowAmount" "', argument " "2"" of type '" "Date""'");
      } else {
        arg2 = *(reinterpret_cast< Date * >(argp2));
      }
    }
    {
      try {
        result = (Real)BondFunctions_nextCashFlowAmount__SWIG_0((BondPtr const &)*arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_nextCashFlowAmount__SWIG_1) {
  {
    BondPtr *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BondFunctions_nextCashFlowAmount(bond);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_nextCashFlowAmount" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_nextCashFlowAmount" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    {
      try {
        result = (Real)BondFunctions_nextCashFlowAmount__SWIG_0((BondPtr const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_nextCashFlowAmount) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_nextCashFlowAmount__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_nextCashFlowAmount__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'BondFunctions_nextCashFlowAmount'");
  XSRETURN(0);
}


XS(_wrap_BondFunctions_previousCouponRate__SWIG_0) {
  {
    BondPtr *arg1 = 0 ;
    Date arg2 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: BondFunctions_previousCouponRate(bond,settlementDate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_previousCouponRate" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_previousCouponRate" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    {
      res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BondFunctions_previousCouponRate" "', argument " "2"" of type '" "Date""'"); 
      }  
      if (!argp2) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_previousCouponRate" "', argument " "2"" of type '" "Date""'");
      } else {
        arg2 = *(reinterpret_cast< Date * >(argp2));
      }
    }
    {
      try {
        result = (Rate)BondFunctions_previousCouponRate__SWIG_0((BondPtr const &)*arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_previousCouponRate__SWIG_1) {
  {
    BondPtr *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BondFunctions_previousCouponRate(bond);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_previousCouponRate" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_previousCouponRate" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    {
      try {
        result = (Rate)BondFunctions_previousCouponRate__SWIG_0((BondPtr const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_previousCouponRate) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_previousCouponRate__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_previousCouponRate__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'BondFunctions_previousCouponRate'");
  XSRETURN(0);
}


XS(_wrap_BondFunctions_nextCouponRate__SWIG_0) {
  {
    BondPtr *arg1 = 0 ;
    Date arg2 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: BondFunctions_nextCouponRate(bond,settlementDate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_nextCouponRate" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_nextCouponRate" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    {
      res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BondFunctions_nextCouponRate" "', argument " "2"" of type '" "Date""'"); 
      }  
      if (!argp2) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_nextCouponRate" "', argument " "2"" of type '" "Date""'");
      } else {
        arg2 = *(reinterpret_cast< Date * >(argp2));
      }
    }
    {
      try {
        result = (Rate)BondFunctions_nextCouponRate__SWIG_0((BondPtr const &)*arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_nextCouponRate__SWIG_1) {
  {
    BondPtr *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BondFunctions_nextCouponRate(bond);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_nextCouponRate" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_nextCouponRate" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    {
      try {
        result = (Rate)BondFunctions_nextCouponRate__SWIG_0((BondPtr const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_nextCouponRate) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_nextCouponRate__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_nextCouponRate__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'BondFunctions_nextCouponRate'");
  XSRETURN(0);
}


XS(_wrap_BondFunctions_accrualStartDate__SWIG_0) {
  {
    BondPtr *arg1 = 0 ;
    Date arg2 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: BondFunctions_accrualStartDate(bond,settlementDate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_accrualStartDate" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_accrualStartDate" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    {
      res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BondFunctions_accrualStartDate" "', argument " "2"" of type '" "Date""'"); 
      }  
      if (!argp2) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_accrualStartDate" "', argument " "2"" of type '" "Date""'");
      } else {
        arg2 = *(reinterpret_cast< Date * >(argp2));
      }
    }
    {
      try {
        result = BondFunctions_accrualStartDate__SWIG_0((BondPtr const &)*arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_accrualStartDate__SWIG_1) {
  {
    BondPtr *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BondFunctions_accrualStartDate(bond);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_accrualStartDate" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_accrualStartDate" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    {
      try {
        result = BondFunctions_accrualStartDate__SWIG_0((BondPtr const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_accrualStartDate) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_accrualStartDate__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_accrualStartDate__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'BondFunctions_accrualStartDate'");
  XSRETURN(0);
}


XS(_wrap_BondFunctions_accrualEndDate__SWIG_0) {
  {
    BondPtr *arg1 = 0 ;
    Date arg2 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: BondFunctions_accrualEndDate(bond,settlementDate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_accrualEndDate" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_accrualEndDate" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    {
      res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BondFunctions_accrualEndDate" "', argument " "2"" of type '" "Date""'"); 
      }  
      if (!argp2) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_accrualEndDate" "', argument " "2"" of type '" "Date""'");
      } else {
        arg2 = *(reinterpret_cast< Date * >(argp2));
      }
    }
    {
      try {
        result = BondFunctions_accrualEndDate__SWIG_0((BondPtr const &)*arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_accrualEndDate__SWIG_1) {
  {
    BondPtr *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BondFunctions_accrualEndDate(bond);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_accrualEndDate" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_accrualEndDate" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    {
      try {
        result = BondFunctions_accrualEndDate__SWIG_0((BondPtr const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_accrualEndDate) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_accrualEndDate__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_accrualEndDate__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'BondFunctions_accrualEndDate'");
  XSRETURN(0);
}


XS(_wrap_BondFunctions_accrualPeriod__SWIG_0) {
  {
    BondPtr *arg1 = 0 ;
    Date arg2 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    Time result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: BondFunctions_accrualPeriod(bond,settlementDate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_accrualPeriod" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_accrualPeriod" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    {
      res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BondFunctions_accrualPeriod" "', argument " "2"" of type '" "Date""'"); 
      }  
      if (!argp2) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_accrualPeriod" "', argument " "2"" of type '" "Date""'");
      } else {
        arg2 = *(reinterpret_cast< Date * >(argp2));
      }
    }
    {
      try {
        result = (Time)BondFunctions_accrualPeriod__SWIG_0((BondPtr const &)*arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_accrualPeriod__SWIG_1) {
  {
    BondPtr *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Time result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BondFunctions_accrualPeriod(bond);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_accrualPeriod" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_accrualPeriod" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    {
      try {
        result = (Time)BondFunctions_accrualPeriod__SWIG_0((BondPtr const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_accrualPeriod) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_accrualPeriod__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_accrualPeriod__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'BondFunctions_accrualPeriod'");
  XSRETURN(0);
}


XS(_wrap_BondFunctions_accrualDays__SWIG_0) {
  {
    BondPtr *arg1 = 0 ;
    Date arg2 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    BigInteger result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: BondFunctions_accrualDays(bond,settlementDate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_accrualDays" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_accrualDays" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    {
      res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BondFunctions_accrualDays" "', argument " "2"" of type '" "Date""'"); 
      }  
      if (!argp2) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_accrualDays" "', argument " "2"" of type '" "Date""'");
      } else {
        arg2 = *(reinterpret_cast< Date * >(argp2));
      }
    }
    {
      try {
        result = (BigInteger)BondFunctions_accrualDays__SWIG_0((BondPtr const &)*arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_long  SWIG_PERL_CALL_ARGS_1(static_cast< long >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_accrualDays__SWIG_1) {
  {
    BondPtr *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    BigInteger result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BondFunctions_accrualDays(bond);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_accrualDays" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_accrualDays" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    {
      try {
        result = (BigInteger)BondFunctions_accrualDays__SWIG_0((BondPtr const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_long  SWIG_PERL_CALL_ARGS_1(static_cast< long >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_accrualDays) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_accrualDays__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_accrualDays__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'BondFunctions_accrualDays'");
  XSRETURN(0);
}


XS(_wrap_BondFunctions_accruedPeriod__SWIG_0) {
  {
    BondPtr *arg1 = 0 ;
    Date arg2 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    Time result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: BondFunctions_accruedPeriod(bond,settlementDate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_accruedPeriod" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_accruedPeriod" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    {
      res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BondFunctions_accruedPeriod" "', argument " "2"" of type '" "Date""'"); 
      }  
      if (!argp2) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_accruedPeriod" "', argument " "2"" of type '" "Date""'");
      } else {
        arg2 = *(reinterpret_cast< Date * >(argp2));
      }
    }
    {
      try {
        result = (Time)BondFunctions_accruedPeriod__SWIG_0((BondPtr const &)*arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_accruedPeriod__SWIG_1) {
  {
    BondPtr *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Time result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BondFunctions_accruedPeriod(bond);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_accruedPeriod" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_accruedPeriod" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    {
      try {
        result = (Time)BondFunctions_accruedPeriod__SWIG_0((BondPtr const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_accruedPeriod) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_accruedPeriod__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_accruedPeriod__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'BondFunctions_accruedPeriod'");
  XSRETURN(0);
}


XS(_wrap_BondFunctions_accruedDays__SWIG_0) {
  {
    BondPtr *arg1 = 0 ;
    Date arg2 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    BigInteger result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: BondFunctions_accruedDays(bond,settlementDate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_accruedDays" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_accruedDays" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    {
      res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BondFunctions_accruedDays" "', argument " "2"" of type '" "Date""'"); 
      }  
      if (!argp2) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_accruedDays" "', argument " "2"" of type '" "Date""'");
      } else {
        arg2 = *(reinterpret_cast< Date * >(argp2));
      }
    }
    {
      try {
        result = (BigInteger)BondFunctions_accruedDays__SWIG_0((BondPtr const &)*arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_long  SWIG_PERL_CALL_ARGS_1(static_cast< long >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_accruedDays__SWIG_1) {
  {
    BondPtr *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    BigInteger result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BondFunctions_accruedDays(bond);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_accruedDays" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_accruedDays" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    {
      try {
        result = (BigInteger)BondFunctions_accruedDays__SWIG_0((BondPtr const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_long  SWIG_PERL_CALL_ARGS_1(static_cast< long >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_accruedDays) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_accruedDays__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_accruedDays__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'BondFunctions_accruedDays'");
  XSRETURN(0);
}


XS(_wrap_BondFunctions_accruedAmount__SWIG_0) {
  {
    BondPtr *arg1 = 0 ;
    Date arg2 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: BondFunctions_accruedAmount(bond,settlementDate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_accruedAmount" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_accruedAmount" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    {
      res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BondFunctions_accruedAmount" "', argument " "2"" of type '" "Date""'"); 
      }  
      if (!argp2) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_accruedAmount" "', argument " "2"" of type '" "Date""'");
      } else {
        arg2 = *(reinterpret_cast< Date * >(argp2));
      }
    }
    {
      try {
        result = (Real)BondFunctions_accruedAmount__SWIG_0((BondPtr const &)*arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_accruedAmount__SWIG_1) {
  {
    BondPtr *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BondFunctions_accruedAmount(bond);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_accruedAmount" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_accruedAmount" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    {
      try {
        result = (Real)BondFunctions_accruedAmount__SWIG_0((BondPtr const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_accruedAmount) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_accruedAmount__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_accruedAmount__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'BondFunctions_accruedAmount'");
  XSRETURN(0);
}


XS(_wrap_BondFunctions_cleanPrice__SWIG_0) {
  {
    BondPtr *arg1 = 0 ;
    boost::shared_ptr< YieldTermStructure > *arg2 = 0 ;
    Date arg3 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: BondFunctions_cleanPrice(bond,discountCurve,settlementDate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_cleanPrice" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_cleanPrice" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BondFunctions_cleanPrice" "', argument " "2"" of type '" "boost::shared_ptr< YieldTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_cleanPrice" "', argument " "2"" of type '" "boost::shared_ptr< YieldTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< boost::shared_ptr< YieldTermStructure > * >(argp2);
    {
      res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res3)) {
        SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "BondFunctions_cleanPrice" "', argument " "3"" of type '" "Date""'"); 
      }  
      if (!argp3) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_cleanPrice" "', argument " "3"" of type '" "Date""'");
      } else {
        arg3 = *(reinterpret_cast< Date * >(argp3));
      }
    }
    {
      try {
        result = (Real)BondFunctions_cleanPrice__SWIG_0((BondPtr const &)*arg1,(boost::shared_ptr< YieldTermStructure > const &)*arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_cleanPrice__SWIG_1) {
  {
    BondPtr *arg1 = 0 ;
    boost::shared_ptr< YieldTermStructure > *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: BondFunctions_cleanPrice(bond,discountCurve);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_cleanPrice" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_cleanPrice" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BondFunctions_cleanPrice" "', argument " "2"" of type '" "boost::shared_ptr< YieldTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_cleanPrice" "', argument " "2"" of type '" "boost::shared_ptr< YieldTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< boost::shared_ptr< YieldTermStructure > * >(argp2);
    {
      try {
        result = (Real)BondFunctions_cleanPrice__SWIG_0((BondPtr const &)*arg1,(boost::shared_ptr< YieldTermStructure > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_bps__SWIG_0) {
  {
    BondPtr *arg1 = 0 ;
    boost::shared_ptr< YieldTermStructure > *arg2 = 0 ;
    Date arg3 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: BondFunctions_bps(bond,discountCurve,settlementDate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_bps" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_bps" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BondFunctions_bps" "', argument " "2"" of type '" "boost::shared_ptr< YieldTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_bps" "', argument " "2"" of type '" "boost::shared_ptr< YieldTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< boost::shared_ptr< YieldTermStructure > * >(argp2);
    {
      res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res3)) {
        SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "BondFunctions_bps" "', argument " "3"" of type '" "Date""'"); 
      }  
      if (!argp3) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_bps" "', argument " "3"" of type '" "Date""'");
      } else {
        arg3 = *(reinterpret_cast< Date * >(argp3));
      }
    }
    {
      try {
        result = (Real)BondFunctions_bps__SWIG_0((BondPtr const &)*arg1,(boost::shared_ptr< YieldTermStructure > const &)*arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_bps__SWIG_1) {
  {
    BondPtr *arg1 = 0 ;
    boost::shared_ptr< YieldTermStructure > *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: BondFunctions_bps(bond,discountCurve);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_bps" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_bps" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BondFunctions_bps" "', argument " "2"" of type '" "boost::shared_ptr< YieldTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_bps" "', argument " "2"" of type '" "boost::shared_ptr< YieldTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< boost::shared_ptr< YieldTermStructure > * >(argp2);
    {
      try {
        result = (Real)BondFunctions_bps__SWIG_0((BondPtr const &)*arg1,(boost::shared_ptr< YieldTermStructure > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_atmRate__SWIG_0) {
  {
    BondPtr *arg1 = 0 ;
    boost::shared_ptr< YieldTermStructure > *arg2 = 0 ;
    Date arg3 ;
    Real arg4 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: BondFunctions_atmRate(bond,discountCurve,settlementDate,cleanPrice);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_atmRate" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_atmRate" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BondFunctions_atmRate" "', argument " "2"" of type '" "boost::shared_ptr< YieldTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_atmRate" "', argument " "2"" of type '" "boost::shared_ptr< YieldTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< boost::shared_ptr< YieldTermStructure > * >(argp2);
    {
      res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res3)) {
        SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "BondFunctions_atmRate" "', argument " "3"" of type '" "Date""'"); 
      }  
      if (!argp3) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_atmRate" "', argument " "3"" of type '" "Date""'");
      } else {
        arg3 = *(reinterpret_cast< Date * >(argp3));
      }
    }
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "BondFunctions_atmRate" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    {
      try {
        result = (Rate)BondFunctions_atmRate__SWIG_0((BondPtr const &)*arg1,(boost::shared_ptr< YieldTermStructure > const &)*arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_atmRate__SWIG_1) {
  {
    BondPtr *arg1 = 0 ;
    boost::shared_ptr< YieldTermStructure > *arg2 = 0 ;
    Date arg3 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: BondFunctions_atmRate(bond,discountCurve,settlementDate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_atmRate" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_atmRate" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BondFunctions_atmRate" "', argument " "2"" of type '" "boost::shared_ptr< YieldTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_atmRate" "', argument " "2"" of type '" "boost::shared_ptr< YieldTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< boost::shared_ptr< YieldTermStructure > * >(argp2);
    {
      res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res3)) {
        SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "BondFunctions_atmRate" "', argument " "3"" of type '" "Date""'"); 
      }  
      if (!argp3) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_atmRate" "', argument " "3"" of type '" "Date""'");
      } else {
        arg3 = *(reinterpret_cast< Date * >(argp3));
      }
    }
    {
      try {
        result = (Rate)BondFunctions_atmRate__SWIG_0((BondPtr const &)*arg1,(boost::shared_ptr< YieldTermStructure > const &)*arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_atmRate__SWIG_2) {
  {
    BondPtr *arg1 = 0 ;
    boost::shared_ptr< YieldTermStructure > *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: BondFunctions_atmRate(bond,discountCurve);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_atmRate" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_atmRate" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BondFunctions_atmRate" "', argument " "2"" of type '" "boost::shared_ptr< YieldTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_atmRate" "', argument " "2"" of type '" "boost::shared_ptr< YieldTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< boost::shared_ptr< YieldTermStructure > * >(argp2);
    {
      try {
        result = (Rate)BondFunctions_atmRate__SWIG_0((BondPtr const &)*arg1,(boost::shared_ptr< YieldTermStructure > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_atmRate) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_atmRate__SWIG_2); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_atmRate__SWIG_1); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_atmRate__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'BondFunctions_atmRate'");
  XSRETURN(0);
}


XS(_wrap_BondFunctions_cleanPrice__SWIG_2) {
  {
    BondPtr *arg1 = 0 ;
    InterestRate *arg2 = 0 ;
    Date arg3 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: BondFunctions_cleanPrice(bond,yield,settlementDate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_cleanPrice" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_cleanPrice" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_InterestRate,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BondFunctions_cleanPrice" "', argument " "2"" of type '" "InterestRate const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_cleanPrice" "', argument " "2"" of type '" "InterestRate const &""'"); 
    }
    arg2 = reinterpret_cast< InterestRate * >(argp2);
    {
      res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res3)) {
        SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "BondFunctions_cleanPrice" "', argument " "3"" of type '" "Date""'"); 
      }  
      if (!argp3) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_cleanPrice" "', argument " "3"" of type '" "Date""'");
      } else {
        arg3 = *(reinterpret_cast< Date * >(argp3));
      }
    }
    {
      try {
        result = (Real)BondFunctions_cleanPrice__SWIG_2((BondPtr const &)*arg1,(InterestRate const &)*arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_cleanPrice__SWIG_3) {
  {
    BondPtr *arg1 = 0 ;
    InterestRate *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: BondFunctions_cleanPrice(bond,yield);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_cleanPrice" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_cleanPrice" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_InterestRate,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BondFunctions_cleanPrice" "', argument " "2"" of type '" "InterestRate const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_cleanPrice" "', argument " "2"" of type '" "InterestRate const &""'"); 
    }
    arg2 = reinterpret_cast< InterestRate * >(argp2);
    {
      try {
        result = (Real)BondFunctions_cleanPrice__SWIG_2((BondPtr const &)*arg1,(InterestRate const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_cleanPrice__SWIG_4) {
  {
    BondPtr *arg1 = 0 ;
    Rate arg2 ;
    DayCounter *arg3 = 0 ;
    Compounding arg4 ;
    Frequency arg5 ;
    Date arg6 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: BondFunctions_cleanPrice(bond,yield,dayCounter,compounding,frequency,settlementDate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_cleanPrice" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_cleanPrice" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BondFunctions_cleanPrice" "', argument " "2"" of type '" "Rate""'");
    } 
    arg2 = static_cast< Rate >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "BondFunctions_cleanPrice" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_cleanPrice" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "BondFunctions_cleanPrice" "', argument " "4"" of type '" "Compounding""'");
    } 
    arg4 = static_cast< Compounding >(val4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "BondFunctions_cleanPrice" "', argument " "5"" of type '" "Frequency""'");
    } 
    arg5 = static_cast< Frequency >(val5);
    {
      res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res6)) {
        SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "BondFunctions_cleanPrice" "', argument " "6"" of type '" "Date""'"); 
      }  
      if (!argp6) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_cleanPrice" "', argument " "6"" of type '" "Date""'");
      } else {
        arg6 = *(reinterpret_cast< Date * >(argp6));
      }
    }
    {
      try {
        result = (Real)BondFunctions_cleanPrice__SWIG_4((BondPtr const &)*arg1,arg2,(DayCounter const &)*arg3,arg4,arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_cleanPrice__SWIG_5) {
  {
    BondPtr *arg1 = 0 ;
    Rate arg2 ;
    DayCounter *arg3 = 0 ;
    Compounding arg4 ;
    Frequency arg5 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: BondFunctions_cleanPrice(bond,yield,dayCounter,compounding,frequency);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_cleanPrice" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_cleanPrice" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BondFunctions_cleanPrice" "', argument " "2"" of type '" "Rate""'");
    } 
    arg2 = static_cast< Rate >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "BondFunctions_cleanPrice" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_cleanPrice" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "BondFunctions_cleanPrice" "', argument " "4"" of type '" "Compounding""'");
    } 
    arg4 = static_cast< Compounding >(val4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "BondFunctions_cleanPrice" "', argument " "5"" of type '" "Frequency""'");
    } 
    arg5 = static_cast< Frequency >(val5);
    {
      try {
        result = (Real)BondFunctions_cleanPrice__SWIG_4((BondPtr const &)*arg1,arg2,(DayCounter const &)*arg3,arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_cleanPrice) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_InterestRate, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_InterestRate, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_cleanPrice__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_cleanPrice__SWIG_3); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_cleanPrice__SWIG_2); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_cleanPrice__SWIG_0); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_cleanPrice__SWIG_5); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_cleanPrice__SWIG_4); return;
    }
  }
  
  croak("No matching function for overloaded 'BondFunctions_cleanPrice'");
  XSRETURN(0);
}


XS(_wrap_BondFunctions_bps__SWIG_2) {
  {
    BondPtr *arg1 = 0 ;
    InterestRate *arg2 = 0 ;
    Date arg3 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: BondFunctions_bps(bond,yield,settlementDate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_bps" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_bps" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_InterestRate,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BondFunctions_bps" "', argument " "2"" of type '" "InterestRate const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_bps" "', argument " "2"" of type '" "InterestRate const &""'"); 
    }
    arg2 = reinterpret_cast< InterestRate * >(argp2);
    {
      res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res3)) {
        SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "BondFunctions_bps" "', argument " "3"" of type '" "Date""'"); 
      }  
      if (!argp3) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_bps" "', argument " "3"" of type '" "Date""'");
      } else {
        arg3 = *(reinterpret_cast< Date * >(argp3));
      }
    }
    {
      try {
        result = (Real)BondFunctions_bps__SWIG_2((BondPtr const &)*arg1,(InterestRate const &)*arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_bps__SWIG_3) {
  {
    BondPtr *arg1 = 0 ;
    InterestRate *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: BondFunctions_bps(bond,yield);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_bps" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_bps" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_InterestRate,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BondFunctions_bps" "', argument " "2"" of type '" "InterestRate const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_bps" "', argument " "2"" of type '" "InterestRate const &""'"); 
    }
    arg2 = reinterpret_cast< InterestRate * >(argp2);
    {
      try {
        result = (Real)BondFunctions_bps__SWIG_2((BondPtr const &)*arg1,(InterestRate const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_bps__SWIG_4) {
  {
    BondPtr *arg1 = 0 ;
    Rate arg2 ;
    DayCounter *arg3 = 0 ;
    Compounding arg4 ;
    Frequency arg5 ;
    Date arg6 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: BondFunctions_bps(bond,yield,dayCounter,compounding,frequency,settlementDate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_bps" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_bps" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BondFunctions_bps" "', argument " "2"" of type '" "Rate""'");
    } 
    arg2 = static_cast< Rate >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "BondFunctions_bps" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_bps" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "BondFunctions_bps" "', argument " "4"" of type '" "Compounding""'");
    } 
    arg4 = static_cast< Compounding >(val4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "BondFunctions_bps" "', argument " "5"" of type '" "Frequency""'");
    } 
    arg5 = static_cast< Frequency >(val5);
    {
      res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res6)) {
        SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "BondFunctions_bps" "', argument " "6"" of type '" "Date""'"); 
      }  
      if (!argp6) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_bps" "', argument " "6"" of type '" "Date""'");
      } else {
        arg6 = *(reinterpret_cast< Date * >(argp6));
      }
    }
    {
      try {
        result = (Real)BondFunctions_bps__SWIG_4((BondPtr const &)*arg1,arg2,(DayCounter const &)*arg3,arg4,arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_bps__SWIG_5) {
  {
    BondPtr *arg1 = 0 ;
    Rate arg2 ;
    DayCounter *arg3 = 0 ;
    Compounding arg4 ;
    Frequency arg5 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: BondFunctions_bps(bond,yield,dayCounter,compounding,frequency);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_bps" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_bps" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BondFunctions_bps" "', argument " "2"" of type '" "Rate""'");
    } 
    arg2 = static_cast< Rate >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "BondFunctions_bps" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_bps" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "BondFunctions_bps" "', argument " "4"" of type '" "Compounding""'");
    } 
    arg4 = static_cast< Compounding >(val4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "BondFunctions_bps" "', argument " "5"" of type '" "Frequency""'");
    } 
    arg5 = static_cast< Frequency >(val5);
    {
      try {
        result = (Real)BondFunctions_bps__SWIG_4((BondPtr const &)*arg1,arg2,(DayCounter const &)*arg3,arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_bps) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_InterestRate, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_InterestRate, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_bps__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_bps__SWIG_3); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_bps__SWIG_2); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_bps__SWIG_0); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_bps__SWIG_5); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_bps__SWIG_4); return;
    }
  }
  
  croak("No matching function for overloaded 'BondFunctions_bps'");
  XSRETURN(0);
}


XS(_wrap_BondFunctions_yield__SWIG_0) {
  {
    BondPtr *arg1 = 0 ;
    Real arg2 ;
    DayCounter *arg3 = 0 ;
    Compounding arg4 ;
    Frequency arg5 ;
    Date arg6 ;
    Real arg7 ;
    Size arg8 ;
    Rate arg9 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    double val7 ;
    int ecode7 = 0 ;
    size_t val8 ;
    int ecode8 = 0 ;
    double val9 ;
    int ecode9 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 9) || (items > 9)) {
      SWIG_croak("Usage: BondFunctions_yield(bond,cleanPrice,dayCounter,compounding,frequency,settlementDate,accuracy,maxIterations,guess);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_yield" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yield" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BondFunctions_yield" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "BondFunctions_yield" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yield" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "BondFunctions_yield" "', argument " "4"" of type '" "Compounding""'");
    } 
    arg4 = static_cast< Compounding >(val4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "BondFunctions_yield" "', argument " "5"" of type '" "Frequency""'");
    } 
    arg5 = static_cast< Frequency >(val5);
    {
      res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res6)) {
        SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "BondFunctions_yield" "', argument " "6"" of type '" "Date""'"); 
      }  
      if (!argp6) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yield" "', argument " "6"" of type '" "Date""'");
      } else {
        arg6 = *(reinterpret_cast< Date * >(argp6));
      }
    }
    ecode7 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "BondFunctions_yield" "', argument " "7"" of type '" "Real""'");
    } 
    arg7 = static_cast< Real >(val7);
    ecode8 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "BondFunctions_yield" "', argument " "8"" of type '" "Size""'");
    } 
    arg8 = static_cast< Size >(val8);
    ecode9 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(8), &val9);
    if (!SWIG_IsOK(ecode9)) {
      SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "BondFunctions_yield" "', argument " "9"" of type '" "Rate""'");
    } 
    arg9 = static_cast< Rate >(val9);
    {
      try {
        result = (Rate)BondFunctions_yield__SWIG_0((BondPtr const &)*arg1,arg2,(DayCounter const &)*arg3,arg4,arg5,arg6,arg7,arg8,arg9);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_yield__SWIG_1) {
  {
    BondPtr *arg1 = 0 ;
    Real arg2 ;
    DayCounter *arg3 = 0 ;
    Compounding arg4 ;
    Frequency arg5 ;
    Date arg6 ;
    Real arg7 ;
    Size arg8 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    double val7 ;
    int ecode7 = 0 ;
    size_t val8 ;
    int ecode8 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 8) || (items > 8)) {
      SWIG_croak("Usage: BondFunctions_yield(bond,cleanPrice,dayCounter,compounding,frequency,settlementDate,accuracy,maxIterations);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_yield" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yield" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BondFunctions_yield" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "BondFunctions_yield" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yield" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "BondFunctions_yield" "', argument " "4"" of type '" "Compounding""'");
    } 
    arg4 = static_cast< Compounding >(val4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "BondFunctions_yield" "', argument " "5"" of type '" "Frequency""'");
    } 
    arg5 = static_cast< Frequency >(val5);
    {
      res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res6)) {
        SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "BondFunctions_yield" "', argument " "6"" of type '" "Date""'"); 
      }  
      if (!argp6) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yield" "', argument " "6"" of type '" "Date""'");
      } else {
        arg6 = *(reinterpret_cast< Date * >(argp6));
      }
    }
    ecode7 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "BondFunctions_yield" "', argument " "7"" of type '" "Real""'");
    } 
    arg7 = static_cast< Real >(val7);
    ecode8 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "BondFunctions_yield" "', argument " "8"" of type '" "Size""'");
    } 
    arg8 = static_cast< Size >(val8);
    {
      try {
        result = (Rate)BondFunctions_yield__SWIG_0((BondPtr const &)*arg1,arg2,(DayCounter const &)*arg3,arg4,arg5,arg6,arg7,arg8);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_yield__SWIG_2) {
  {
    BondPtr *arg1 = 0 ;
    Real arg2 ;
    DayCounter *arg3 = 0 ;
    Compounding arg4 ;
    Frequency arg5 ;
    Date arg6 ;
    Real arg7 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    double val7 ;
    int ecode7 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: BondFunctions_yield(bond,cleanPrice,dayCounter,compounding,frequency,settlementDate,accuracy);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_yield" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yield" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BondFunctions_yield" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "BondFunctions_yield" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yield" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "BondFunctions_yield" "', argument " "4"" of type '" "Compounding""'");
    } 
    arg4 = static_cast< Compounding >(val4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "BondFunctions_yield" "', argument " "5"" of type '" "Frequency""'");
    } 
    arg5 = static_cast< Frequency >(val5);
    {
      res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res6)) {
        SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "BondFunctions_yield" "', argument " "6"" of type '" "Date""'"); 
      }  
      if (!argp6) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yield" "', argument " "6"" of type '" "Date""'");
      } else {
        arg6 = *(reinterpret_cast< Date * >(argp6));
      }
    }
    ecode7 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "BondFunctions_yield" "', argument " "7"" of type '" "Real""'");
    } 
    arg7 = static_cast< Real >(val7);
    {
      try {
        result = (Rate)BondFunctions_yield__SWIG_0((BondPtr const &)*arg1,arg2,(DayCounter const &)*arg3,arg4,arg5,arg6,arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_yield__SWIG_3) {
  {
    BondPtr *arg1 = 0 ;
    Real arg2 ;
    DayCounter *arg3 = 0 ;
    Compounding arg4 ;
    Frequency arg5 ;
    Date arg6 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: BondFunctions_yield(bond,cleanPrice,dayCounter,compounding,frequency,settlementDate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_yield" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yield" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BondFunctions_yield" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "BondFunctions_yield" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yield" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "BondFunctions_yield" "', argument " "4"" of type '" "Compounding""'");
    } 
    arg4 = static_cast< Compounding >(val4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "BondFunctions_yield" "', argument " "5"" of type '" "Frequency""'");
    } 
    arg5 = static_cast< Frequency >(val5);
    {
      res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res6)) {
        SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "BondFunctions_yield" "', argument " "6"" of type '" "Date""'"); 
      }  
      if (!argp6) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yield" "', argument " "6"" of type '" "Date""'");
      } else {
        arg6 = *(reinterpret_cast< Date * >(argp6));
      }
    }
    {
      try {
        result = (Rate)BondFunctions_yield__SWIG_0((BondPtr const &)*arg1,arg2,(DayCounter const &)*arg3,arg4,arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_yield__SWIG_4) {
  {
    BondPtr *arg1 = 0 ;
    Real arg2 ;
    DayCounter *arg3 = 0 ;
    Compounding arg4 ;
    Frequency arg5 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: BondFunctions_yield(bond,cleanPrice,dayCounter,compounding,frequency);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_yield" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yield" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BondFunctions_yield" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "BondFunctions_yield" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yield" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "BondFunctions_yield" "', argument " "4"" of type '" "Compounding""'");
    } 
    arg4 = static_cast< Compounding >(val4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "BondFunctions_yield" "', argument " "5"" of type '" "Frequency""'");
    } 
    arg5 = static_cast< Frequency >(val5);
    {
      try {
        result = (Rate)BondFunctions_yield__SWIG_0((BondPtr const &)*arg1,arg2,(DayCounter const &)*arg3,arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_yield) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 8) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 9) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(8), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_yield__SWIG_4); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_yield__SWIG_3); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_yield__SWIG_2); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_yield__SWIG_1); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_yield__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'BondFunctions_yield'");
  XSRETURN(0);
}


XS(_wrap_BondFunctions_yieldBrent__SWIG_0) {
  {
    Brent arg1 ;
    BondPtr *arg2 = 0 ;
    Real arg3 ;
    DayCounter *arg4 = 0 ;
    Compounding arg5 ;
    Frequency arg6 ;
    Date arg7 ;
    Real arg8 ;
    Rate arg9 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    double val8 ;
    int ecode8 = 0 ;
    double val9 ;
    int ecode9 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 9) || (items > 9)) {
      SWIG_croak("Usage: BondFunctions_yieldBrent(solver,bond,cleanPrice,dayCounter,compounding,frequency,settlementDate,accuracy,guess);");
    }
    {
      res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Brent,  0 );
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_yieldBrent" "', argument " "1"" of type '" "Brent""'"); 
      }  
      if (!argp1) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yieldBrent" "', argument " "1"" of type '" "Brent""'");
      } else {
        arg1 = *(reinterpret_cast< Brent * >(argp1));
      }
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BondFunctions_yieldBrent" "', argument " "2"" of type '" "BondPtr const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yieldBrent" "', argument " "2"" of type '" "BondPtr const &""'"); 
    }
    arg2 = reinterpret_cast< BondPtr * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "BondFunctions_yieldBrent" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "BondFunctions_yieldBrent" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yieldBrent" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "BondFunctions_yieldBrent" "', argument " "5"" of type '" "Compounding""'");
    } 
    arg5 = static_cast< Compounding >(val5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "BondFunctions_yieldBrent" "', argument " "6"" of type '" "Frequency""'");
    } 
    arg6 = static_cast< Frequency >(val6);
    {
      res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res7)) {
        SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "BondFunctions_yieldBrent" "', argument " "7"" of type '" "Date""'"); 
      }  
      if (!argp7) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yieldBrent" "', argument " "7"" of type '" "Date""'");
      } else {
        arg7 = *(reinterpret_cast< Date * >(argp7));
      }
    }
    ecode8 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "BondFunctions_yieldBrent" "', argument " "8"" of type '" "Real""'");
    } 
    arg8 = static_cast< Real >(val8);
    ecode9 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(8), &val9);
    if (!SWIG_IsOK(ecode9)) {
      SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "BondFunctions_yieldBrent" "', argument " "9"" of type '" "Rate""'");
    } 
    arg9 = static_cast< Rate >(val9);
    {
      try {
        result = (Rate)BondFunctions_yieldBrent__SWIG_0(arg1,(BondPtr const &)*arg2,arg3,(DayCounter const &)*arg4,arg5,arg6,arg7,arg8,arg9);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_yieldBrent__SWIG_1) {
  {
    Brent arg1 ;
    BondPtr *arg2 = 0 ;
    Real arg3 ;
    DayCounter *arg4 = 0 ;
    Compounding arg5 ;
    Frequency arg6 ;
    Date arg7 ;
    Real arg8 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    double val8 ;
    int ecode8 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 8) || (items > 8)) {
      SWIG_croak("Usage: BondFunctions_yieldBrent(solver,bond,cleanPrice,dayCounter,compounding,frequency,settlementDate,accuracy);");
    }
    {
      res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Brent,  0 );
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_yieldBrent" "', argument " "1"" of type '" "Brent""'"); 
      }  
      if (!argp1) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yieldBrent" "', argument " "1"" of type '" "Brent""'");
      } else {
        arg1 = *(reinterpret_cast< Brent * >(argp1));
      }
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BondFunctions_yieldBrent" "', argument " "2"" of type '" "BondPtr const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yieldBrent" "', argument " "2"" of type '" "BondPtr const &""'"); 
    }
    arg2 = reinterpret_cast< BondPtr * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "BondFunctions_yieldBrent" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "BondFunctions_yieldBrent" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yieldBrent" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "BondFunctions_yieldBrent" "', argument " "5"" of type '" "Compounding""'");
    } 
    arg5 = static_cast< Compounding >(val5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "BondFunctions_yieldBrent" "', argument " "6"" of type '" "Frequency""'");
    } 
    arg6 = static_cast< Frequency >(val6);
    {
      res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res7)) {
        SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "BondFunctions_yieldBrent" "', argument " "7"" of type '" "Date""'"); 
      }  
      if (!argp7) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yieldBrent" "', argument " "7"" of type '" "Date""'");
      } else {
        arg7 = *(reinterpret_cast< Date * >(argp7));
      }
    }
    ecode8 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "BondFunctions_yieldBrent" "', argument " "8"" of type '" "Real""'");
    } 
    arg8 = static_cast< Real >(val8);
    {
      try {
        result = (Rate)BondFunctions_yieldBrent__SWIG_0(arg1,(BondPtr const &)*arg2,arg3,(DayCounter const &)*arg4,arg5,arg6,arg7,arg8);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_yieldBrent__SWIG_2) {
  {
    Brent arg1 ;
    BondPtr *arg2 = 0 ;
    Real arg3 ;
    DayCounter *arg4 = 0 ;
    Compounding arg5 ;
    Frequency arg6 ;
    Date arg7 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: BondFunctions_yieldBrent(solver,bond,cleanPrice,dayCounter,compounding,frequency,settlementDate);");
    }
    {
      res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Brent,  0 );
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_yieldBrent" "', argument " "1"" of type '" "Brent""'"); 
      }  
      if (!argp1) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yieldBrent" "', argument " "1"" of type '" "Brent""'");
      } else {
        arg1 = *(reinterpret_cast< Brent * >(argp1));
      }
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BondFunctions_yieldBrent" "', argument " "2"" of type '" "BondPtr const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yieldBrent" "', argument " "2"" of type '" "BondPtr const &""'"); 
    }
    arg2 = reinterpret_cast< BondPtr * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "BondFunctions_yieldBrent" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "BondFunctions_yieldBrent" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yieldBrent" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "BondFunctions_yieldBrent" "', argument " "5"" of type '" "Compounding""'");
    } 
    arg5 = static_cast< Compounding >(val5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "BondFunctions_yieldBrent" "', argument " "6"" of type '" "Frequency""'");
    } 
    arg6 = static_cast< Frequency >(val6);
    {
      res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res7)) {
        SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "BondFunctions_yieldBrent" "', argument " "7"" of type '" "Date""'"); 
      }  
      if (!argp7) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yieldBrent" "', argument " "7"" of type '" "Date""'");
      } else {
        arg7 = *(reinterpret_cast< Date * >(argp7));
      }
    }
    {
      try {
        result = (Rate)BondFunctions_yieldBrent__SWIG_0(arg1,(BondPtr const &)*arg2,arg3,(DayCounter const &)*arg4,arg5,arg6,arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_yieldBrent__SWIG_3) {
  {
    Brent arg1 ;
    BondPtr *arg2 = 0 ;
    Real arg3 ;
    DayCounter *arg4 = 0 ;
    Compounding arg5 ;
    Frequency arg6 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: BondFunctions_yieldBrent(solver,bond,cleanPrice,dayCounter,compounding,frequency);");
    }
    {
      res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Brent,  0 );
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_yieldBrent" "', argument " "1"" of type '" "Brent""'"); 
      }  
      if (!argp1) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yieldBrent" "', argument " "1"" of type '" "Brent""'");
      } else {
        arg1 = *(reinterpret_cast< Brent * >(argp1));
      }
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BondFunctions_yieldBrent" "', argument " "2"" of type '" "BondPtr const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yieldBrent" "', argument " "2"" of type '" "BondPtr const &""'"); 
    }
    arg2 = reinterpret_cast< BondPtr * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "BondFunctions_yieldBrent" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "BondFunctions_yieldBrent" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yieldBrent" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "BondFunctions_yieldBrent" "', argument " "5"" of type '" "Compounding""'");
    } 
    arg5 = static_cast< Compounding >(val5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "BondFunctions_yieldBrent" "', argument " "6"" of type '" "Frequency""'");
    } 
    arg6 = static_cast< Frequency >(val6);
    {
      try {
        result = (Rate)BondFunctions_yieldBrent__SWIG_0(arg1,(BondPtr const &)*arg2,arg3,(DayCounter const &)*arg4,arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_yieldBrent) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Brent, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Brent, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 8) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Brent, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 9) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Brent, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(8), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_yieldBrent__SWIG_3); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_yieldBrent__SWIG_2); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_yieldBrent__SWIG_1); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_yieldBrent__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'BondFunctions_yieldBrent'");
  XSRETURN(0);
}


XS(_wrap_BondFunctions_yieldBisection__SWIG_0) {
  {
    Bisection arg1 ;
    BondPtr *arg2 = 0 ;
    Real arg3 ;
    DayCounter *arg4 = 0 ;
    Compounding arg5 ;
    Frequency arg6 ;
    Date arg7 ;
    Real arg8 ;
    Rate arg9 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    double val8 ;
    int ecode8 = 0 ;
    double val9 ;
    int ecode9 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 9) || (items > 9)) {
      SWIG_croak("Usage: BondFunctions_yieldBisection(solver,bond,cleanPrice,dayCounter,compounding,frequency,settlementDate,accuracy,guess);");
    }
    {
      res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Bisection,  0 );
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_yieldBisection" "', argument " "1"" of type '" "Bisection""'"); 
      }  
      if (!argp1) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yieldBisection" "', argument " "1"" of type '" "Bisection""'");
      } else {
        arg1 = *(reinterpret_cast< Bisection * >(argp1));
      }
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BondFunctions_yieldBisection" "', argument " "2"" of type '" "BondPtr const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yieldBisection" "', argument " "2"" of type '" "BondPtr const &""'"); 
    }
    arg2 = reinterpret_cast< BondPtr * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "BondFunctions_yieldBisection" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "BondFunctions_yieldBisection" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yieldBisection" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "BondFunctions_yieldBisection" "', argument " "5"" of type '" "Compounding""'");
    } 
    arg5 = static_cast< Compounding >(val5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "BondFunctions_yieldBisection" "', argument " "6"" of type '" "Frequency""'");
    } 
    arg6 = static_cast< Frequency >(val6);
    {
      res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res7)) {
        SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "BondFunctions_yieldBisection" "', argument " "7"" of type '" "Date""'"); 
      }  
      if (!argp7) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yieldBisection" "', argument " "7"" of type '" "Date""'");
      } else {
        arg7 = *(reinterpret_cast< Date * >(argp7));
      }
    }
    ecode8 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "BondFunctions_yieldBisection" "', argument " "8"" of type '" "Real""'");
    } 
    arg8 = static_cast< Real >(val8);
    ecode9 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(8), &val9);
    if (!SWIG_IsOK(ecode9)) {
      SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "BondFunctions_yieldBisection" "', argument " "9"" of type '" "Rate""'");
    } 
    arg9 = static_cast< Rate >(val9);
    {
      try {
        result = (Rate)BondFunctions_yieldBisection__SWIG_0(arg1,(BondPtr const &)*arg2,arg3,(DayCounter const &)*arg4,arg5,arg6,arg7,arg8,arg9);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_yieldBisection__SWIG_1) {
  {
    Bisection arg1 ;
    BondPtr *arg2 = 0 ;
    Real arg3 ;
    DayCounter *arg4 = 0 ;
    Compounding arg5 ;
    Frequency arg6 ;
    Date arg7 ;
    Real arg8 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    double val8 ;
    int ecode8 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 8) || (items > 8)) {
      SWIG_croak("Usage: BondFunctions_yieldBisection(solver,bond,cleanPrice,dayCounter,compounding,frequency,settlementDate,accuracy);");
    }
    {
      res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Bisection,  0 );
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_yieldBisection" "', argument " "1"" of type '" "Bisection""'"); 
      }  
      if (!argp1) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yieldBisection" "', argument " "1"" of type '" "Bisection""'");
      } else {
        arg1 = *(reinterpret_cast< Bisection * >(argp1));
      }
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BondFunctions_yieldBisection" "', argument " "2"" of type '" "BondPtr const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yieldBisection" "', argument " "2"" of type '" "BondPtr const &""'"); 
    }
    arg2 = reinterpret_cast< BondPtr * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "BondFunctions_yieldBisection" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "BondFunctions_yieldBisection" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yieldBisection" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "BondFunctions_yieldBisection" "', argument " "5"" of type '" "Compounding""'");
    } 
    arg5 = static_cast< Compounding >(val5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "BondFunctions_yieldBisection" "', argument " "6"" of type '" "Frequency""'");
    } 
    arg6 = static_cast< Frequency >(val6);
    {
      res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res7)) {
        SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "BondFunctions_yieldBisection" "', argument " "7"" of type '" "Date""'"); 
      }  
      if (!argp7) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yieldBisection" "', argument " "7"" of type '" "Date""'");
      } else {
        arg7 = *(reinterpret_cast< Date * >(argp7));
      }
    }
    ecode8 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "BondFunctions_yieldBisection" "', argument " "8"" of type '" "Real""'");
    } 
    arg8 = static_cast< Real >(val8);
    {
      try {
        result = (Rate)BondFunctions_yieldBisection__SWIG_0(arg1,(BondPtr const &)*arg2,arg3,(DayCounter const &)*arg4,arg5,arg6,arg7,arg8);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_yieldBisection__SWIG_2) {
  {
    Bisection arg1 ;
    BondPtr *arg2 = 0 ;
    Real arg3 ;
    DayCounter *arg4 = 0 ;
    Compounding arg5 ;
    Frequency arg6 ;
    Date arg7 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: BondFunctions_yieldBisection(solver,bond,cleanPrice,dayCounter,compounding,frequency,settlementDate);");
    }
    {
      res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Bisection,  0 );
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_yieldBisection" "', argument " "1"" of type '" "Bisection""'"); 
      }  
      if (!argp1) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yieldBisection" "', argument " "1"" of type '" "Bisection""'");
      } else {
        arg1 = *(reinterpret_cast< Bisection * >(argp1));
      }
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BondFunctions_yieldBisection" "', argument " "2"" of type '" "BondPtr const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yieldBisection" "', argument " "2"" of type '" "BondPtr const &""'"); 
    }
    arg2 = reinterpret_cast< BondPtr * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "BondFunctions_yieldBisection" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "BondFunctions_yieldBisection" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yieldBisection" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "BondFunctions_yieldBisection" "', argument " "5"" of type '" "Compounding""'");
    } 
    arg5 = static_cast< Compounding >(val5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "BondFunctions_yieldBisection" "', argument " "6"" of type '" "Frequency""'");
    } 
    arg6 = static_cast< Frequency >(val6);
    {
      res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res7)) {
        SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "BondFunctions_yieldBisection" "', argument " "7"" of type '" "Date""'"); 
      }  
      if (!argp7) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yieldBisection" "', argument " "7"" of type '" "Date""'");
      } else {
        arg7 = *(reinterpret_cast< Date * >(argp7));
      }
    }
    {
      try {
        result = (Rate)BondFunctions_yieldBisection__SWIG_0(arg1,(BondPtr const &)*arg2,arg3,(DayCounter const &)*arg4,arg5,arg6,arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_yieldBisection__SWIG_3) {
  {
    Bisection arg1 ;
    BondPtr *arg2 = 0 ;
    Real arg3 ;
    DayCounter *arg4 = 0 ;
    Compounding arg5 ;
    Frequency arg6 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: BondFunctions_yieldBisection(solver,bond,cleanPrice,dayCounter,compounding,frequency);");
    }
    {
      res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Bisection,  0 );
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_yieldBisection" "', argument " "1"" of type '" "Bisection""'"); 
      }  
      if (!argp1) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yieldBisection" "', argument " "1"" of type '" "Bisection""'");
      } else {
        arg1 = *(reinterpret_cast< Bisection * >(argp1));
      }
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BondFunctions_yieldBisection" "', argument " "2"" of type '" "BondPtr const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yieldBisection" "', argument " "2"" of type '" "BondPtr const &""'"); 
    }
    arg2 = reinterpret_cast< BondPtr * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "BondFunctions_yieldBisection" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "BondFunctions_yieldBisection" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yieldBisection" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "BondFunctions_yieldBisection" "', argument " "5"" of type '" "Compounding""'");
    } 
    arg5 = static_cast< Compounding >(val5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "BondFunctions_yieldBisection" "', argument " "6"" of type '" "Frequency""'");
    } 
    arg6 = static_cast< Frequency >(val6);
    {
      try {
        result = (Rate)BondFunctions_yieldBisection__SWIG_0(arg1,(BondPtr const &)*arg2,arg3,(DayCounter const &)*arg4,arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_yieldBisection) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Bisection, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Bisection, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 8) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Bisection, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 9) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Bisection, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(8), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_yieldBisection__SWIG_3); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_yieldBisection__SWIG_2); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_yieldBisection__SWIG_1); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_yieldBisection__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'BondFunctions_yieldBisection'");
  XSRETURN(0);
}


XS(_wrap_BondFunctions_yieldFalsePosition__SWIG_0) {
  {
    FalsePosition arg1 ;
    BondPtr *arg2 = 0 ;
    Real arg3 ;
    DayCounter *arg4 = 0 ;
    Compounding arg5 ;
    Frequency arg6 ;
    Date arg7 ;
    Real arg8 ;
    Rate arg9 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    double val8 ;
    int ecode8 = 0 ;
    double val9 ;
    int ecode9 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 9) || (items > 9)) {
      SWIG_croak("Usage: BondFunctions_yieldFalsePosition(solver,bond,cleanPrice,dayCounter,compounding,frequency,settlementDate,accuracy,guess);");
    }
    {
      res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_FalsePosition,  0 );
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_yieldFalsePosition" "', argument " "1"" of type '" "FalsePosition""'"); 
      }  
      if (!argp1) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yieldFalsePosition" "', argument " "1"" of type '" "FalsePosition""'");
      } else {
        arg1 = *(reinterpret_cast< FalsePosition * >(argp1));
      }
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BondFunctions_yieldFalsePosition" "', argument " "2"" of type '" "BondPtr const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yieldFalsePosition" "', argument " "2"" of type '" "BondPtr const &""'"); 
    }
    arg2 = reinterpret_cast< BondPtr * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "BondFunctions_yieldFalsePosition" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "BondFunctions_yieldFalsePosition" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yieldFalsePosition" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "BondFunctions_yieldFalsePosition" "', argument " "5"" of type '" "Compounding""'");
    } 
    arg5 = static_cast< Compounding >(val5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "BondFunctions_yieldFalsePosition" "', argument " "6"" of type '" "Frequency""'");
    } 
    arg6 = static_cast< Frequency >(val6);
    {
      res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res7)) {
        SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "BondFunctions_yieldFalsePosition" "', argument " "7"" of type '" "Date""'"); 
      }  
      if (!argp7) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yieldFalsePosition" "', argument " "7"" of type '" "Date""'");
      } else {
        arg7 = *(reinterpret_cast< Date * >(argp7));
      }
    }
    ecode8 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "BondFunctions_yieldFalsePosition" "', argument " "8"" of type '" "Real""'");
    } 
    arg8 = static_cast< Real >(val8);
    ecode9 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(8), &val9);
    if (!SWIG_IsOK(ecode9)) {
      SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "BondFunctions_yieldFalsePosition" "', argument " "9"" of type '" "Rate""'");
    } 
    arg9 = static_cast< Rate >(val9);
    {
      try {
        result = (Rate)BondFunctions_yieldFalsePosition__SWIG_0(arg1,(BondPtr const &)*arg2,arg3,(DayCounter const &)*arg4,arg5,arg6,arg7,arg8,arg9);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_yieldFalsePosition__SWIG_1) {
  {
    FalsePosition arg1 ;
    BondPtr *arg2 = 0 ;
    Real arg3 ;
    DayCounter *arg4 = 0 ;
    Compounding arg5 ;
    Frequency arg6 ;
    Date arg7 ;
    Real arg8 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    double val8 ;
    int ecode8 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 8) || (items > 8)) {
      SWIG_croak("Usage: BondFunctions_yieldFalsePosition(solver,bond,cleanPrice,dayCounter,compounding,frequency,settlementDate,accuracy);");
    }
    {
      res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_FalsePosition,  0 );
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_yieldFalsePosition" "', argument " "1"" of type '" "FalsePosition""'"); 
      }  
      if (!argp1) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yieldFalsePosition" "', argument " "1"" of type '" "FalsePosition""'");
      } else {
        arg1 = *(reinterpret_cast< FalsePosition * >(argp1));
      }
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BondFunctions_yieldFalsePosition" "', argument " "2"" of type '" "BondPtr const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yieldFalsePosition" "', argument " "2"" of type '" "BondPtr const &""'"); 
    }
    arg2 = reinterpret_cast< BondPtr * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "BondFunctions_yieldFalsePosition" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "BondFunctions_yieldFalsePosition" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yieldFalsePosition" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "BondFunctions_yieldFalsePosition" "', argument " "5"" of type '" "Compounding""'");
    } 
    arg5 = static_cast< Compounding >(val5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "BondFunctions_yieldFalsePosition" "', argument " "6"" of type '" "Frequency""'");
    } 
    arg6 = static_cast< Frequency >(val6);
    {
      res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res7)) {
        SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "BondFunctions_yieldFalsePosition" "', argument " "7"" of type '" "Date""'"); 
      }  
      if (!argp7) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yieldFalsePosition" "', argument " "7"" of type '" "Date""'");
      } else {
        arg7 = *(reinterpret_cast< Date * >(argp7));
      }
    }
    ecode8 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "BondFunctions_yieldFalsePosition" "', argument " "8"" of type '" "Real""'");
    } 
    arg8 = static_cast< Real >(val8);
    {
      try {
        result = (Rate)BondFunctions_yieldFalsePosition__SWIG_0(arg1,(BondPtr const &)*arg2,arg3,(DayCounter const &)*arg4,arg5,arg6,arg7,arg8);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_yieldFalsePosition__SWIG_2) {
  {
    FalsePosition arg1 ;
    BondPtr *arg2 = 0 ;
    Real arg3 ;
    DayCounter *arg4 = 0 ;
    Compounding arg5 ;
    Frequency arg6 ;
    Date arg7 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: BondFunctions_yieldFalsePosition(solver,bond,cleanPrice,dayCounter,compounding,frequency,settlementDate);");
    }
    {
      res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_FalsePosition,  0 );
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_yieldFalsePosition" "', argument " "1"" of type '" "FalsePosition""'"); 
      }  
      if (!argp1) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yieldFalsePosition" "', argument " "1"" of type '" "FalsePosition""'");
      } else {
        arg1 = *(reinterpret_cast< FalsePosition * >(argp1));
      }
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BondFunctions_yieldFalsePosition" "', argument " "2"" of type '" "BondPtr const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yieldFalsePosition" "', argument " "2"" of type '" "BondPtr const &""'"); 
    }
    arg2 = reinterpret_cast< BondPtr * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "BondFunctions_yieldFalsePosition" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "BondFunctions_yieldFalsePosition" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yieldFalsePosition" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "BondFunctions_yieldFalsePosition" "', argument " "5"" of type '" "Compounding""'");
    } 
    arg5 = static_cast< Compounding >(val5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "BondFunctions_yieldFalsePosition" "', argument " "6"" of type '" "Frequency""'");
    } 
    arg6 = static_cast< Frequency >(val6);
    {
      res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res7)) {
        SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "BondFunctions_yieldFalsePosition" "', argument " "7"" of type '" "Date""'"); 
      }  
      if (!argp7) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yieldFalsePosition" "', argument " "7"" of type '" "Date""'");
      } else {
        arg7 = *(reinterpret_cast< Date * >(argp7));
      }
    }
    {
      try {
        result = (Rate)BondFunctions_yieldFalsePosition__SWIG_0(arg1,(BondPtr const &)*arg2,arg3,(DayCounter const &)*arg4,arg5,arg6,arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_yieldFalsePosition__SWIG_3) {
  {
    FalsePosition arg1 ;
    BondPtr *arg2 = 0 ;
    Real arg3 ;
    DayCounter *arg4 = 0 ;
    Compounding arg5 ;
    Frequency arg6 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: BondFunctions_yieldFalsePosition(solver,bond,cleanPrice,dayCounter,compounding,frequency);");
    }
    {
      res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_FalsePosition,  0 );
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_yieldFalsePosition" "', argument " "1"" of type '" "FalsePosition""'"); 
      }  
      if (!argp1) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yieldFalsePosition" "', argument " "1"" of type '" "FalsePosition""'");
      } else {
        arg1 = *(reinterpret_cast< FalsePosition * >(argp1));
      }
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BondFunctions_yieldFalsePosition" "', argument " "2"" of type '" "BondPtr const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yieldFalsePosition" "', argument " "2"" of type '" "BondPtr const &""'"); 
    }
    arg2 = reinterpret_cast< BondPtr * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "BondFunctions_yieldFalsePosition" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "BondFunctions_yieldFalsePosition" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yieldFalsePosition" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "BondFunctions_yieldFalsePosition" "', argument " "5"" of type '" "Compounding""'");
    } 
    arg5 = static_cast< Compounding >(val5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "BondFunctions_yieldFalsePosition" "', argument " "6"" of type '" "Frequency""'");
    } 
    arg6 = static_cast< Frequency >(val6);
    {
      try {
        result = (Rate)BondFunctions_yieldFalsePosition__SWIG_0(arg1,(BondPtr const &)*arg2,arg3,(DayCounter const &)*arg4,arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_yieldFalsePosition) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_FalsePosition, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_FalsePosition, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 8) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_FalsePosition, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 9) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_FalsePosition, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(8), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_yieldFalsePosition__SWIG_3); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_yieldFalsePosition__SWIG_2); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_yieldFalsePosition__SWIG_1); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_yieldFalsePosition__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'BondFunctions_yieldFalsePosition'");
  XSRETURN(0);
}


XS(_wrap_BondFunctions_yieldRidder__SWIG_0) {
  {
    Ridder arg1 ;
    BondPtr *arg2 = 0 ;
    Real arg3 ;
    DayCounter *arg4 = 0 ;
    Compounding arg5 ;
    Frequency arg6 ;
    Date arg7 ;
    Real arg8 ;
    Rate arg9 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    double val8 ;
    int ecode8 = 0 ;
    double val9 ;
    int ecode9 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 9) || (items > 9)) {
      SWIG_croak("Usage: BondFunctions_yieldRidder(solver,bond,cleanPrice,dayCounter,compounding,frequency,settlementDate,accuracy,guess);");
    }
    {
      res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ridder,  0 );
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_yieldRidder" "', argument " "1"" of type '" "Ridder""'"); 
      }  
      if (!argp1) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yieldRidder" "', argument " "1"" of type '" "Ridder""'");
      } else {
        arg1 = *(reinterpret_cast< Ridder * >(argp1));
      }
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BondFunctions_yieldRidder" "', argument " "2"" of type '" "BondPtr const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yieldRidder" "', argument " "2"" of type '" "BondPtr const &""'"); 
    }
    arg2 = reinterpret_cast< BondPtr * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "BondFunctions_yieldRidder" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "BondFunctions_yieldRidder" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yieldRidder" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "BondFunctions_yieldRidder" "', argument " "5"" of type '" "Compounding""'");
    } 
    arg5 = static_cast< Compounding >(val5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "BondFunctions_yieldRidder" "', argument " "6"" of type '" "Frequency""'");
    } 
    arg6 = static_cast< Frequency >(val6);
    {
      res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res7)) {
        SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "BondFunctions_yieldRidder" "', argument " "7"" of type '" "Date""'"); 
      }  
      if (!argp7) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yieldRidder" "', argument " "7"" of type '" "Date""'");
      } else {
        arg7 = *(reinterpret_cast< Date * >(argp7));
      }
    }
    ecode8 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "BondFunctions_yieldRidder" "', argument " "8"" of type '" "Real""'");
    } 
    arg8 = static_cast< Real >(val8);
    ecode9 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(8), &val9);
    if (!SWIG_IsOK(ecode9)) {
      SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "BondFunctions_yieldRidder" "', argument " "9"" of type '" "Rate""'");
    } 
    arg9 = static_cast< Rate >(val9);
    {
      try {
        result = (Rate)BondFunctions_yieldRidder__SWIG_0(arg1,(BondPtr const &)*arg2,arg3,(DayCounter const &)*arg4,arg5,arg6,arg7,arg8,arg9);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_yieldRidder__SWIG_1) {
  {
    Ridder arg1 ;
    BondPtr *arg2 = 0 ;
    Real arg3 ;
    DayCounter *arg4 = 0 ;
    Compounding arg5 ;
    Frequency arg6 ;
    Date arg7 ;
    Real arg8 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    double val8 ;
    int ecode8 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 8) || (items > 8)) {
      SWIG_croak("Usage: BondFunctions_yieldRidder(solver,bond,cleanPrice,dayCounter,compounding,frequency,settlementDate,accuracy);");
    }
    {
      res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ridder,  0 );
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_yieldRidder" "', argument " "1"" of type '" "Ridder""'"); 
      }  
      if (!argp1) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yieldRidder" "', argument " "1"" of type '" "Ridder""'");
      } else {
        arg1 = *(reinterpret_cast< Ridder * >(argp1));
      }
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BondFunctions_yieldRidder" "', argument " "2"" of type '" "BondPtr const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yieldRidder" "', argument " "2"" of type '" "BondPtr const &""'"); 
    }
    arg2 = reinterpret_cast< BondPtr * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "BondFunctions_yieldRidder" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "BondFunctions_yieldRidder" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yieldRidder" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "BondFunctions_yieldRidder" "', argument " "5"" of type '" "Compounding""'");
    } 
    arg5 = static_cast< Compounding >(val5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "BondFunctions_yieldRidder" "', argument " "6"" of type '" "Frequency""'");
    } 
    arg6 = static_cast< Frequency >(val6);
    {
      res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res7)) {
        SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "BondFunctions_yieldRidder" "', argument " "7"" of type '" "Date""'"); 
      }  
      if (!argp7) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yieldRidder" "', argument " "7"" of type '" "Date""'");
      } else {
        arg7 = *(reinterpret_cast< Date * >(argp7));
      }
    }
    ecode8 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "BondFunctions_yieldRidder" "', argument " "8"" of type '" "Real""'");
    } 
    arg8 = static_cast< Real >(val8);
    {
      try {
        result = (Rate)BondFunctions_yieldRidder__SWIG_0(arg1,(BondPtr const &)*arg2,arg3,(DayCounter const &)*arg4,arg5,arg6,arg7,arg8);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_yieldRidder__SWIG_2) {
  {
    Ridder arg1 ;
    BondPtr *arg2 = 0 ;
    Real arg3 ;
    DayCounter *arg4 = 0 ;
    Compounding arg5 ;
    Frequency arg6 ;
    Date arg7 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: BondFunctions_yieldRidder(solver,bond,cleanPrice,dayCounter,compounding,frequency,settlementDate);");
    }
    {
      res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ridder,  0 );
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_yieldRidder" "', argument " "1"" of type '" "Ridder""'"); 
      }  
      if (!argp1) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yieldRidder" "', argument " "1"" of type '" "Ridder""'");
      } else {
        arg1 = *(reinterpret_cast< Ridder * >(argp1));
      }
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BondFunctions_yieldRidder" "', argument " "2"" of type '" "BondPtr const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yieldRidder" "', argument " "2"" of type '" "BondPtr const &""'"); 
    }
    arg2 = reinterpret_cast< BondPtr * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "BondFunctions_yieldRidder" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "BondFunctions_yieldRidder" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yieldRidder" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "BondFunctions_yieldRidder" "', argument " "5"" of type '" "Compounding""'");
    } 
    arg5 = static_cast< Compounding >(val5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "BondFunctions_yieldRidder" "', argument " "6"" of type '" "Frequency""'");
    } 
    arg6 = static_cast< Frequency >(val6);
    {
      res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res7)) {
        SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "BondFunctions_yieldRidder" "', argument " "7"" of type '" "Date""'"); 
      }  
      if (!argp7) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yieldRidder" "', argument " "7"" of type '" "Date""'");
      } else {
        arg7 = *(reinterpret_cast< Date * >(argp7));
      }
    }
    {
      try {
        result = (Rate)BondFunctions_yieldRidder__SWIG_0(arg1,(BondPtr const &)*arg2,arg3,(DayCounter const &)*arg4,arg5,arg6,arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_yieldRidder__SWIG_3) {
  {
    Ridder arg1 ;
    BondPtr *arg2 = 0 ;
    Real arg3 ;
    DayCounter *arg4 = 0 ;
    Compounding arg5 ;
    Frequency arg6 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: BondFunctions_yieldRidder(solver,bond,cleanPrice,dayCounter,compounding,frequency);");
    }
    {
      res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Ridder,  0 );
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_yieldRidder" "', argument " "1"" of type '" "Ridder""'"); 
      }  
      if (!argp1) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yieldRidder" "', argument " "1"" of type '" "Ridder""'");
      } else {
        arg1 = *(reinterpret_cast< Ridder * >(argp1));
      }
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BondFunctions_yieldRidder" "', argument " "2"" of type '" "BondPtr const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yieldRidder" "', argument " "2"" of type '" "BondPtr const &""'"); 
    }
    arg2 = reinterpret_cast< BondPtr * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "BondFunctions_yieldRidder" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "BondFunctions_yieldRidder" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yieldRidder" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "BondFunctions_yieldRidder" "', argument " "5"" of type '" "Compounding""'");
    } 
    arg5 = static_cast< Compounding >(val5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "BondFunctions_yieldRidder" "', argument " "6"" of type '" "Frequency""'");
    } 
    arg6 = static_cast< Frequency >(val6);
    {
      try {
        result = (Rate)BondFunctions_yieldRidder__SWIG_0(arg1,(BondPtr const &)*arg2,arg3,(DayCounter const &)*arg4,arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_yieldRidder) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ridder, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ridder, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 8) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ridder, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 9) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Ridder, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(8), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_yieldRidder__SWIG_3); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_yieldRidder__SWIG_2); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_yieldRidder__SWIG_1); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_yieldRidder__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'BondFunctions_yieldRidder'");
  XSRETURN(0);
}


XS(_wrap_BondFunctions_yieldSecant__SWIG_0) {
  {
    Secant arg1 ;
    BondPtr *arg2 = 0 ;
    Real arg3 ;
    DayCounter *arg4 = 0 ;
    Compounding arg5 ;
    Frequency arg6 ;
    Date arg7 ;
    Real arg8 ;
    Rate arg9 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    double val8 ;
    int ecode8 = 0 ;
    double val9 ;
    int ecode9 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 9) || (items > 9)) {
      SWIG_croak("Usage: BondFunctions_yieldSecant(solver,bond,cleanPrice,dayCounter,compounding,frequency,settlementDate,accuracy,guess);");
    }
    {
      res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Secant,  0 );
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_yieldSecant" "', argument " "1"" of type '" "Secant""'"); 
      }  
      if (!argp1) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yieldSecant" "', argument " "1"" of type '" "Secant""'");
      } else {
        arg1 = *(reinterpret_cast< Secant * >(argp1));
      }
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BondFunctions_yieldSecant" "', argument " "2"" of type '" "BondPtr const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yieldSecant" "', argument " "2"" of type '" "BondPtr const &""'"); 
    }
    arg2 = reinterpret_cast< BondPtr * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "BondFunctions_yieldSecant" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "BondFunctions_yieldSecant" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yieldSecant" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "BondFunctions_yieldSecant" "', argument " "5"" of type '" "Compounding""'");
    } 
    arg5 = static_cast< Compounding >(val5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "BondFunctions_yieldSecant" "', argument " "6"" of type '" "Frequency""'");
    } 
    arg6 = static_cast< Frequency >(val6);
    {
      res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res7)) {
        SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "BondFunctions_yieldSecant" "', argument " "7"" of type '" "Date""'"); 
      }  
      if (!argp7) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yieldSecant" "', argument " "7"" of type '" "Date""'");
      } else {
        arg7 = *(reinterpret_cast< Date * >(argp7));
      }
    }
    ecode8 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "BondFunctions_yieldSecant" "', argument " "8"" of type '" "Real""'");
    } 
    arg8 = static_cast< Real >(val8);
    ecode9 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(8), &val9);
    if (!SWIG_IsOK(ecode9)) {
      SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "BondFunctions_yieldSecant" "', argument " "9"" of type '" "Rate""'");
    } 
    arg9 = static_cast< Rate >(val9);
    {
      try {
        result = (Rate)BondFunctions_yieldSecant__SWIG_0(arg1,(BondPtr const &)*arg2,arg3,(DayCounter const &)*arg4,arg5,arg6,arg7,arg8,arg9);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_yieldSecant__SWIG_1) {
  {
    Secant arg1 ;
    BondPtr *arg2 = 0 ;
    Real arg3 ;
    DayCounter *arg4 = 0 ;
    Compounding arg5 ;
    Frequency arg6 ;
    Date arg7 ;
    Real arg8 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    double val8 ;
    int ecode8 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 8) || (items > 8)) {
      SWIG_croak("Usage: BondFunctions_yieldSecant(solver,bond,cleanPrice,dayCounter,compounding,frequency,settlementDate,accuracy);");
    }
    {
      res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Secant,  0 );
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_yieldSecant" "', argument " "1"" of type '" "Secant""'"); 
      }  
      if (!argp1) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yieldSecant" "', argument " "1"" of type '" "Secant""'");
      } else {
        arg1 = *(reinterpret_cast< Secant * >(argp1));
      }
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BondFunctions_yieldSecant" "', argument " "2"" of type '" "BondPtr const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yieldSecant" "', argument " "2"" of type '" "BondPtr const &""'"); 
    }
    arg2 = reinterpret_cast< BondPtr * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "BondFunctions_yieldSecant" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "BondFunctions_yieldSecant" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yieldSecant" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "BondFunctions_yieldSecant" "', argument " "5"" of type '" "Compounding""'");
    } 
    arg5 = static_cast< Compounding >(val5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "BondFunctions_yieldSecant" "', argument " "6"" of type '" "Frequency""'");
    } 
    arg6 = static_cast< Frequency >(val6);
    {
      res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res7)) {
        SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "BondFunctions_yieldSecant" "', argument " "7"" of type '" "Date""'"); 
      }  
      if (!argp7) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yieldSecant" "', argument " "7"" of type '" "Date""'");
      } else {
        arg7 = *(reinterpret_cast< Date * >(argp7));
      }
    }
    ecode8 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "BondFunctions_yieldSecant" "', argument " "8"" of type '" "Real""'");
    } 
    arg8 = static_cast< Real >(val8);
    {
      try {
        result = (Rate)BondFunctions_yieldSecant__SWIG_0(arg1,(BondPtr const &)*arg2,arg3,(DayCounter const &)*arg4,arg5,arg6,arg7,arg8);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_yieldSecant__SWIG_2) {
  {
    Secant arg1 ;
    BondPtr *arg2 = 0 ;
    Real arg3 ;
    DayCounter *arg4 = 0 ;
    Compounding arg5 ;
    Frequency arg6 ;
    Date arg7 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: BondFunctions_yieldSecant(solver,bond,cleanPrice,dayCounter,compounding,frequency,settlementDate);");
    }
    {
      res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Secant,  0 );
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_yieldSecant" "', argument " "1"" of type '" "Secant""'"); 
      }  
      if (!argp1) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yieldSecant" "', argument " "1"" of type '" "Secant""'");
      } else {
        arg1 = *(reinterpret_cast< Secant * >(argp1));
      }
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BondFunctions_yieldSecant" "', argument " "2"" of type '" "BondPtr const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yieldSecant" "', argument " "2"" of type '" "BondPtr const &""'"); 
    }
    arg2 = reinterpret_cast< BondPtr * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "BondFunctions_yieldSecant" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "BondFunctions_yieldSecant" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yieldSecant" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "BondFunctions_yieldSecant" "', argument " "5"" of type '" "Compounding""'");
    } 
    arg5 = static_cast< Compounding >(val5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "BondFunctions_yieldSecant" "', argument " "6"" of type '" "Frequency""'");
    } 
    arg6 = static_cast< Frequency >(val6);
    {
      res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res7)) {
        SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "BondFunctions_yieldSecant" "', argument " "7"" of type '" "Date""'"); 
      }  
      if (!argp7) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yieldSecant" "', argument " "7"" of type '" "Date""'");
      } else {
        arg7 = *(reinterpret_cast< Date * >(argp7));
      }
    }
    {
      try {
        result = (Rate)BondFunctions_yieldSecant__SWIG_0(arg1,(BondPtr const &)*arg2,arg3,(DayCounter const &)*arg4,arg5,arg6,arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_yieldSecant__SWIG_3) {
  {
    Secant arg1 ;
    BondPtr *arg2 = 0 ;
    Real arg3 ;
    DayCounter *arg4 = 0 ;
    Compounding arg5 ;
    Frequency arg6 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: BondFunctions_yieldSecant(solver,bond,cleanPrice,dayCounter,compounding,frequency);");
    }
    {
      res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Secant,  0 );
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_yieldSecant" "', argument " "1"" of type '" "Secant""'"); 
      }  
      if (!argp1) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yieldSecant" "', argument " "1"" of type '" "Secant""'");
      } else {
        arg1 = *(reinterpret_cast< Secant * >(argp1));
      }
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BondFunctions_yieldSecant" "', argument " "2"" of type '" "BondPtr const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yieldSecant" "', argument " "2"" of type '" "BondPtr const &""'"); 
    }
    arg2 = reinterpret_cast< BondPtr * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "BondFunctions_yieldSecant" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "BondFunctions_yieldSecant" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yieldSecant" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "BondFunctions_yieldSecant" "', argument " "5"" of type '" "Compounding""'");
    } 
    arg5 = static_cast< Compounding >(val5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "BondFunctions_yieldSecant" "', argument " "6"" of type '" "Frequency""'");
    } 
    arg6 = static_cast< Frequency >(val6);
    {
      try {
        result = (Rate)BondFunctions_yieldSecant__SWIG_0(arg1,(BondPtr const &)*arg2,arg3,(DayCounter const &)*arg4,arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_yieldSecant) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Secant, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Secant, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 8) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Secant, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 9) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Secant, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(8), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_yieldSecant__SWIG_3); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_yieldSecant__SWIG_2); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_yieldSecant__SWIG_1); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_yieldSecant__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'BondFunctions_yieldSecant'");
  XSRETURN(0);
}


XS(_wrap_BondFunctions_duration__SWIG_0) {
  {
    BondPtr *arg1 = 0 ;
    InterestRate *arg2 = 0 ;
    Duration::Type arg3 ;
    Date arg4 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int argvi = 0;
    Time result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: BondFunctions_duration(bond,yield,type,settlementDate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_duration" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_duration" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_InterestRate,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BondFunctions_duration" "', argument " "2"" of type '" "InterestRate const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_duration" "', argument " "2"" of type '" "InterestRate const &""'"); 
    }
    arg2 = reinterpret_cast< InterestRate * >(argp2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "BondFunctions_duration" "', argument " "3"" of type '" "Duration::Type""'");
    } 
    arg3 = static_cast< Duration::Type >(val3);
    {
      res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res4)) {
        SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "BondFunctions_duration" "', argument " "4"" of type '" "Date""'"); 
      }  
      if (!argp4) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_duration" "', argument " "4"" of type '" "Date""'");
      } else {
        arg4 = *(reinterpret_cast< Date * >(argp4));
      }
    }
    {
      try {
        result = (Time)BondFunctions_duration__SWIG_0((BondPtr const &)*arg1,(InterestRate const &)*arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_duration__SWIG_1) {
  {
    BondPtr *arg1 = 0 ;
    InterestRate *arg2 = 0 ;
    Duration::Type arg3 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Time result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: BondFunctions_duration(bond,yield,type);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_duration" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_duration" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_InterestRate,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BondFunctions_duration" "', argument " "2"" of type '" "InterestRate const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_duration" "', argument " "2"" of type '" "InterestRate const &""'"); 
    }
    arg2 = reinterpret_cast< InterestRate * >(argp2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "BondFunctions_duration" "', argument " "3"" of type '" "Duration::Type""'");
    } 
    arg3 = static_cast< Duration::Type >(val3);
    {
      try {
        result = (Time)BondFunctions_duration__SWIG_0((BondPtr const &)*arg1,(InterestRate const &)*arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_duration__SWIG_2) {
  {
    BondPtr *arg1 = 0 ;
    InterestRate *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    Time result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: BondFunctions_duration(bond,yield);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_duration" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_duration" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_InterestRate,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BondFunctions_duration" "', argument " "2"" of type '" "InterestRate const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_duration" "', argument " "2"" of type '" "InterestRate const &""'"); 
    }
    arg2 = reinterpret_cast< InterestRate * >(argp2);
    {
      try {
        result = (Time)BondFunctions_duration__SWIG_0((BondPtr const &)*arg1,(InterestRate const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_duration__SWIG_3) {
  {
    BondPtr *arg1 = 0 ;
    Rate arg2 ;
    DayCounter *arg3 = 0 ;
    Compounding arg4 ;
    Frequency arg5 ;
    Duration::Type arg6 ;
    Date arg7 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    int argvi = 0;
    Time result;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: BondFunctions_duration(bond,yield,dayCounter,compounding,frequency,type,settlementDate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_duration" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_duration" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BondFunctions_duration" "', argument " "2"" of type '" "Rate""'");
    } 
    arg2 = static_cast< Rate >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "BondFunctions_duration" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_duration" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "BondFunctions_duration" "', argument " "4"" of type '" "Compounding""'");
    } 
    arg4 = static_cast< Compounding >(val4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "BondFunctions_duration" "', argument " "5"" of type '" "Frequency""'");
    } 
    arg5 = static_cast< Frequency >(val5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "BondFunctions_duration" "', argument " "6"" of type '" "Duration::Type""'");
    } 
    arg6 = static_cast< Duration::Type >(val6);
    {
      res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res7)) {
        SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "BondFunctions_duration" "', argument " "7"" of type '" "Date""'"); 
      }  
      if (!argp7) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_duration" "', argument " "7"" of type '" "Date""'");
      } else {
        arg7 = *(reinterpret_cast< Date * >(argp7));
      }
    }
    {
      try {
        result = (Time)BondFunctions_duration__SWIG_3((BondPtr const &)*arg1,arg2,(DayCounter const &)*arg3,arg4,arg5,arg6,arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_duration__SWIG_4) {
  {
    BondPtr *arg1 = 0 ;
    Rate arg2 ;
    DayCounter *arg3 = 0 ;
    Compounding arg4 ;
    Frequency arg5 ;
    Duration::Type arg6 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    Time result;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: BondFunctions_duration(bond,yield,dayCounter,compounding,frequency,type);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_duration" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_duration" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BondFunctions_duration" "', argument " "2"" of type '" "Rate""'");
    } 
    arg2 = static_cast< Rate >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "BondFunctions_duration" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_duration" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "BondFunctions_duration" "', argument " "4"" of type '" "Compounding""'");
    } 
    arg4 = static_cast< Compounding >(val4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "BondFunctions_duration" "', argument " "5"" of type '" "Frequency""'");
    } 
    arg5 = static_cast< Frequency >(val5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "BondFunctions_duration" "', argument " "6"" of type '" "Duration::Type""'");
    } 
    arg6 = static_cast< Duration::Type >(val6);
    {
      try {
        result = (Time)BondFunctions_duration__SWIG_3((BondPtr const &)*arg1,arg2,(DayCounter const &)*arg3,arg4,arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_duration__SWIG_5) {
  {
    BondPtr *arg1 = 0 ;
    Rate arg2 ;
    DayCounter *arg3 = 0 ;
    Compounding arg4 ;
    Frequency arg5 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    Time result;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: BondFunctions_duration(bond,yield,dayCounter,compounding,frequency);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_duration" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_duration" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BondFunctions_duration" "', argument " "2"" of type '" "Rate""'");
    } 
    arg2 = static_cast< Rate >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "BondFunctions_duration" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_duration" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "BondFunctions_duration" "', argument " "4"" of type '" "Compounding""'");
    } 
    arg4 = static_cast< Compounding >(val4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "BondFunctions_duration" "', argument " "5"" of type '" "Frequency""'");
    } 
    arg5 = static_cast< Frequency >(val5);
    {
      try {
        result = (Time)BondFunctions_duration__SWIG_3((BondPtr const &)*arg1,arg2,(DayCounter const &)*arg3,arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_duration) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_InterestRate, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_InterestRate, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_InterestRate, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_duration__SWIG_2); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_duration__SWIG_1); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_duration__SWIG_0); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_duration__SWIG_5); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_duration__SWIG_4); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_duration__SWIG_3); return;
    }
  }
  
  croak("No matching function for overloaded 'BondFunctions_duration'");
  XSRETURN(0);
}


XS(_wrap_BondFunctions_convexity__SWIG_0) {
  {
    BondPtr *arg1 = 0 ;
    InterestRate *arg2 = 0 ;
    Date arg3 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: BondFunctions_convexity(bond,yield,settlementDate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_convexity" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_convexity" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_InterestRate,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BondFunctions_convexity" "', argument " "2"" of type '" "InterestRate const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_convexity" "', argument " "2"" of type '" "InterestRate const &""'"); 
    }
    arg2 = reinterpret_cast< InterestRate * >(argp2);
    {
      res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res3)) {
        SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "BondFunctions_convexity" "', argument " "3"" of type '" "Date""'"); 
      }  
      if (!argp3) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_convexity" "', argument " "3"" of type '" "Date""'");
      } else {
        arg3 = *(reinterpret_cast< Date * >(argp3));
      }
    }
    {
      try {
        result = (Real)BondFunctions_convexity__SWIG_0((BondPtr const &)*arg1,(InterestRate const &)*arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_convexity__SWIG_1) {
  {
    BondPtr *arg1 = 0 ;
    InterestRate *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: BondFunctions_convexity(bond,yield);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_convexity" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_convexity" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_InterestRate,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BondFunctions_convexity" "', argument " "2"" of type '" "InterestRate const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_convexity" "', argument " "2"" of type '" "InterestRate const &""'"); 
    }
    arg2 = reinterpret_cast< InterestRate * >(argp2);
    {
      try {
        result = (Real)BondFunctions_convexity__SWIG_0((BondPtr const &)*arg1,(InterestRate const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_convexity__SWIG_2) {
  {
    BondPtr *arg1 = 0 ;
    Rate arg2 ;
    DayCounter *arg3 = 0 ;
    Compounding arg4 ;
    Frequency arg5 ;
    Date arg6 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: BondFunctions_convexity(bond,yield,dayCounter,compounding,frequency,settlementDate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_convexity" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_convexity" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BondFunctions_convexity" "', argument " "2"" of type '" "Rate""'");
    } 
    arg2 = static_cast< Rate >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "BondFunctions_convexity" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_convexity" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "BondFunctions_convexity" "', argument " "4"" of type '" "Compounding""'");
    } 
    arg4 = static_cast< Compounding >(val4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "BondFunctions_convexity" "', argument " "5"" of type '" "Frequency""'");
    } 
    arg5 = static_cast< Frequency >(val5);
    {
      res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res6)) {
        SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "BondFunctions_convexity" "', argument " "6"" of type '" "Date""'"); 
      }  
      if (!argp6) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_convexity" "', argument " "6"" of type '" "Date""'");
      } else {
        arg6 = *(reinterpret_cast< Date * >(argp6));
      }
    }
    {
      try {
        result = (Real)BondFunctions_convexity__SWIG_2((BondPtr const &)*arg1,arg2,(DayCounter const &)*arg3,arg4,arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_convexity__SWIG_3) {
  {
    BondPtr *arg1 = 0 ;
    Rate arg2 ;
    DayCounter *arg3 = 0 ;
    Compounding arg4 ;
    Frequency arg5 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: BondFunctions_convexity(bond,yield,dayCounter,compounding,frequency);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_convexity" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_convexity" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BondFunctions_convexity" "', argument " "2"" of type '" "Rate""'");
    } 
    arg2 = static_cast< Rate >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "BondFunctions_convexity" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_convexity" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "BondFunctions_convexity" "', argument " "4"" of type '" "Compounding""'");
    } 
    arg4 = static_cast< Compounding >(val4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "BondFunctions_convexity" "', argument " "5"" of type '" "Frequency""'");
    } 
    arg5 = static_cast< Frequency >(val5);
    {
      try {
        result = (Real)BondFunctions_convexity__SWIG_2((BondPtr const &)*arg1,arg2,(DayCounter const &)*arg3,arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_convexity) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_InterestRate, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_InterestRate, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_convexity__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_convexity__SWIG_0); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_convexity__SWIG_3); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_convexity__SWIG_2); return;
    }
  }
  
  croak("No matching function for overloaded 'BondFunctions_convexity'");
  XSRETURN(0);
}


XS(_wrap_BondFunctions_basisPointValue__SWIG_0) {
  {
    BondPtr *arg1 = 0 ;
    InterestRate *arg2 = 0 ;
    Date arg3 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: BondFunctions_basisPointValue(bond,yield,settlementDate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_basisPointValue" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_basisPointValue" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_InterestRate,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BondFunctions_basisPointValue" "', argument " "2"" of type '" "InterestRate const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_basisPointValue" "', argument " "2"" of type '" "InterestRate const &""'"); 
    }
    arg2 = reinterpret_cast< InterestRate * >(argp2);
    {
      res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res3)) {
        SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "BondFunctions_basisPointValue" "', argument " "3"" of type '" "Date""'"); 
      }  
      if (!argp3) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_basisPointValue" "', argument " "3"" of type '" "Date""'");
      } else {
        arg3 = *(reinterpret_cast< Date * >(argp3));
      }
    }
    {
      try {
        result = (Real)BondFunctions_basisPointValue__SWIG_0((BondPtr const &)*arg1,(InterestRate const &)*arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_basisPointValue__SWIG_1) {
  {
    BondPtr *arg1 = 0 ;
    InterestRate *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: BondFunctions_basisPointValue(bond,yield);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_basisPointValue" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_basisPointValue" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_InterestRate,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BondFunctions_basisPointValue" "', argument " "2"" of type '" "InterestRate const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_basisPointValue" "', argument " "2"" of type '" "InterestRate const &""'"); 
    }
    arg2 = reinterpret_cast< InterestRate * >(argp2);
    {
      try {
        result = (Real)BondFunctions_basisPointValue__SWIG_0((BondPtr const &)*arg1,(InterestRate const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_basisPointValue__SWIG_2) {
  {
    BondPtr *arg1 = 0 ;
    Rate arg2 ;
    DayCounter *arg3 = 0 ;
    Compounding arg4 ;
    Frequency arg5 ;
    Date arg6 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: BondFunctions_basisPointValue(bond,yield,dayCounter,compounding,frequency,settlementDate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_basisPointValue" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_basisPointValue" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BondFunctions_basisPointValue" "', argument " "2"" of type '" "Rate""'");
    } 
    arg2 = static_cast< Rate >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "BondFunctions_basisPointValue" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_basisPointValue" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "BondFunctions_basisPointValue" "', argument " "4"" of type '" "Compounding""'");
    } 
    arg4 = static_cast< Compounding >(val4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "BondFunctions_basisPointValue" "', argument " "5"" of type '" "Frequency""'");
    } 
    arg5 = static_cast< Frequency >(val5);
    {
      res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res6)) {
        SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "BondFunctions_basisPointValue" "', argument " "6"" of type '" "Date""'"); 
      }  
      if (!argp6) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_basisPointValue" "', argument " "6"" of type '" "Date""'");
      } else {
        arg6 = *(reinterpret_cast< Date * >(argp6));
      }
    }
    {
      try {
        result = (Real)BondFunctions_basisPointValue__SWIG_2((BondPtr const &)*arg1,arg2,(DayCounter const &)*arg3,arg4,arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_basisPointValue__SWIG_3) {
  {
    BondPtr *arg1 = 0 ;
    Rate arg2 ;
    DayCounter *arg3 = 0 ;
    Compounding arg4 ;
    Frequency arg5 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: BondFunctions_basisPointValue(bond,yield,dayCounter,compounding,frequency);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_basisPointValue" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_basisPointValue" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BondFunctions_basisPointValue" "', argument " "2"" of type '" "Rate""'");
    } 
    arg2 = static_cast< Rate >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "BondFunctions_basisPointValue" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_basisPointValue" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "BondFunctions_basisPointValue" "', argument " "4"" of type '" "Compounding""'");
    } 
    arg4 = static_cast< Compounding >(val4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "BondFunctions_basisPointValue" "', argument " "5"" of type '" "Frequency""'");
    } 
    arg5 = static_cast< Frequency >(val5);
    {
      try {
        result = (Real)BondFunctions_basisPointValue__SWIG_2((BondPtr const &)*arg1,arg2,(DayCounter const &)*arg3,arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_basisPointValue) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_InterestRate, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_InterestRate, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_basisPointValue__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_basisPointValue__SWIG_0); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_basisPointValue__SWIG_3); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_basisPointValue__SWIG_2); return;
    }
  }
  
  croak("No matching function for overloaded 'BondFunctions_basisPointValue'");
  XSRETURN(0);
}


XS(_wrap_BondFunctions_yieldValueBasisPoint__SWIG_0) {
  {
    BondPtr *arg1 = 0 ;
    InterestRate *arg2 = 0 ;
    Date arg3 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: BondFunctions_yieldValueBasisPoint(bond,yield,settlementDate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_yieldValueBasisPoint" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yieldValueBasisPoint" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_InterestRate,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BondFunctions_yieldValueBasisPoint" "', argument " "2"" of type '" "InterestRate const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yieldValueBasisPoint" "', argument " "2"" of type '" "InterestRate const &""'"); 
    }
    arg2 = reinterpret_cast< InterestRate * >(argp2);
    {
      res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res3)) {
        SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "BondFunctions_yieldValueBasisPoint" "', argument " "3"" of type '" "Date""'"); 
      }  
      if (!argp3) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yieldValueBasisPoint" "', argument " "3"" of type '" "Date""'");
      } else {
        arg3 = *(reinterpret_cast< Date * >(argp3));
      }
    }
    {
      try {
        result = (Real)BondFunctions_yieldValueBasisPoint__SWIG_0((BondPtr const &)*arg1,(InterestRate const &)*arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_yieldValueBasisPoint__SWIG_1) {
  {
    BondPtr *arg1 = 0 ;
    InterestRate *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: BondFunctions_yieldValueBasisPoint(bond,yield);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_yieldValueBasisPoint" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yieldValueBasisPoint" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_InterestRate,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BondFunctions_yieldValueBasisPoint" "', argument " "2"" of type '" "InterestRate const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yieldValueBasisPoint" "', argument " "2"" of type '" "InterestRate const &""'"); 
    }
    arg2 = reinterpret_cast< InterestRate * >(argp2);
    {
      try {
        result = (Real)BondFunctions_yieldValueBasisPoint__SWIG_0((BondPtr const &)*arg1,(InterestRate const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_yieldValueBasisPoint__SWIG_2) {
  {
    BondPtr *arg1 = 0 ;
    Rate arg2 ;
    DayCounter *arg3 = 0 ;
    Compounding arg4 ;
    Frequency arg5 ;
    Date arg6 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: BondFunctions_yieldValueBasisPoint(bond,yield,dayCounter,compounding,frequency,settlementDate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_yieldValueBasisPoint" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yieldValueBasisPoint" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BondFunctions_yieldValueBasisPoint" "', argument " "2"" of type '" "Rate""'");
    } 
    arg2 = static_cast< Rate >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "BondFunctions_yieldValueBasisPoint" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yieldValueBasisPoint" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "BondFunctions_yieldValueBasisPoint" "', argument " "4"" of type '" "Compounding""'");
    } 
    arg4 = static_cast< Compounding >(val4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "BondFunctions_yieldValueBasisPoint" "', argument " "5"" of type '" "Frequency""'");
    } 
    arg5 = static_cast< Frequency >(val5);
    {
      res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res6)) {
        SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "BondFunctions_yieldValueBasisPoint" "', argument " "6"" of type '" "Date""'"); 
      }  
      if (!argp6) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yieldValueBasisPoint" "', argument " "6"" of type '" "Date""'");
      } else {
        arg6 = *(reinterpret_cast< Date * >(argp6));
      }
    }
    {
      try {
        result = (Real)BondFunctions_yieldValueBasisPoint__SWIG_2((BondPtr const &)*arg1,arg2,(DayCounter const &)*arg3,arg4,arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_yieldValueBasisPoint__SWIG_3) {
  {
    BondPtr *arg1 = 0 ;
    Rate arg2 ;
    DayCounter *arg3 = 0 ;
    Compounding arg4 ;
    Frequency arg5 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: BondFunctions_yieldValueBasisPoint(bond,yield,dayCounter,compounding,frequency);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_yieldValueBasisPoint" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yieldValueBasisPoint" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BondFunctions_yieldValueBasisPoint" "', argument " "2"" of type '" "Rate""'");
    } 
    arg2 = static_cast< Rate >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "BondFunctions_yieldValueBasisPoint" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_yieldValueBasisPoint" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "BondFunctions_yieldValueBasisPoint" "', argument " "4"" of type '" "Compounding""'");
    } 
    arg4 = static_cast< Compounding >(val4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "BondFunctions_yieldValueBasisPoint" "', argument " "5"" of type '" "Frequency""'");
    } 
    arg5 = static_cast< Frequency >(val5);
    {
      try {
        result = (Real)BondFunctions_yieldValueBasisPoint__SWIG_2((BondPtr const &)*arg1,arg2,(DayCounter const &)*arg3,arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_yieldValueBasisPoint) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_InterestRate, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_InterestRate, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_yieldValueBasisPoint__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_yieldValueBasisPoint__SWIG_0); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_yieldValueBasisPoint__SWIG_3); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_yieldValueBasisPoint__SWIG_2); return;
    }
  }
  
  croak("No matching function for overloaded 'BondFunctions_yieldValueBasisPoint'");
  XSRETURN(0);
}


XS(_wrap_BondFunctions_zSpread__SWIG_0) {
  {
    BondPtr *arg1 = 0 ;
    Real arg2 ;
    boost::shared_ptr< YieldTermStructure > *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    Compounding arg5 ;
    Frequency arg6 ;
    Date arg7 ;
    Real arg8 ;
    Size arg9 ;
    Rate arg10 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    double val8 ;
    int ecode8 = 0 ;
    size_t val9 ;
    int ecode9 = 0 ;
    double val10 ;
    int ecode10 = 0 ;
    int argvi = 0;
    Spread result;
    dXSARGS;
    
    if ((items < 10) || (items > 10)) {
      SWIG_croak("Usage: BondFunctions_zSpread(bond,cleanPrice,discountCurve,dayCounter,compounding,frequency,settlementDate,accuracy,maxIterations,guess);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_zSpread" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_zSpread" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BondFunctions_zSpread" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "BondFunctions_zSpread" "', argument " "3"" of type '" "boost::shared_ptr< YieldTermStructure > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_zSpread" "', argument " "3"" of type '" "boost::shared_ptr< YieldTermStructure > const &""'"); 
    }
    arg3 = reinterpret_cast< boost::shared_ptr< YieldTermStructure > * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "BondFunctions_zSpread" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_zSpread" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "BondFunctions_zSpread" "', argument " "5"" of type '" "Compounding""'");
    } 
    arg5 = static_cast< Compounding >(val5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "BondFunctions_zSpread" "', argument " "6"" of type '" "Frequency""'");
    } 
    arg6 = static_cast< Frequency >(val6);
    {
      res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res7)) {
        SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "BondFunctions_zSpread" "', argument " "7"" of type '" "Date""'"); 
      }  
      if (!argp7) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_zSpread" "', argument " "7"" of type '" "Date""'");
      } else {
        arg7 = *(reinterpret_cast< Date * >(argp7));
      }
    }
    ecode8 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "BondFunctions_zSpread" "', argument " "8"" of type '" "Real""'");
    } 
    arg8 = static_cast< Real >(val8);
    ecode9 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(8), &val9);
    if (!SWIG_IsOK(ecode9)) {
      SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "BondFunctions_zSpread" "', argument " "9"" of type '" "Size""'");
    } 
    arg9 = static_cast< Size >(val9);
    ecode10 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), &val10);
    if (!SWIG_IsOK(ecode10)) {
      SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "BondFunctions_zSpread" "', argument " "10"" of type '" "Rate""'");
    } 
    arg10 = static_cast< Rate >(val10);
    {
      try {
        result = (Spread)BondFunctions_zSpread__SWIG_0((BondPtr const &)*arg1,arg2,(boost::shared_ptr< YieldTermStructure > const &)*arg3,(DayCounter const &)*arg4,arg5,arg6,arg7,arg8,arg9,arg10);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_zSpread__SWIG_1) {
  {
    BondPtr *arg1 = 0 ;
    Real arg2 ;
    boost::shared_ptr< YieldTermStructure > *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    Compounding arg5 ;
    Frequency arg6 ;
    Date arg7 ;
    Real arg8 ;
    Size arg9 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    double val8 ;
    int ecode8 = 0 ;
    size_t val9 ;
    int ecode9 = 0 ;
    int argvi = 0;
    Spread result;
    dXSARGS;
    
    if ((items < 9) || (items > 9)) {
      SWIG_croak("Usage: BondFunctions_zSpread(bond,cleanPrice,discountCurve,dayCounter,compounding,frequency,settlementDate,accuracy,maxIterations);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_zSpread" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_zSpread" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BondFunctions_zSpread" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "BondFunctions_zSpread" "', argument " "3"" of type '" "boost::shared_ptr< YieldTermStructure > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_zSpread" "', argument " "3"" of type '" "boost::shared_ptr< YieldTermStructure > const &""'"); 
    }
    arg3 = reinterpret_cast< boost::shared_ptr< YieldTermStructure > * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "BondFunctions_zSpread" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_zSpread" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "BondFunctions_zSpread" "', argument " "5"" of type '" "Compounding""'");
    } 
    arg5 = static_cast< Compounding >(val5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "BondFunctions_zSpread" "', argument " "6"" of type '" "Frequency""'");
    } 
    arg6 = static_cast< Frequency >(val6);
    {
      res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res7)) {
        SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "BondFunctions_zSpread" "', argument " "7"" of type '" "Date""'"); 
      }  
      if (!argp7) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_zSpread" "', argument " "7"" of type '" "Date""'");
      } else {
        arg7 = *(reinterpret_cast< Date * >(argp7));
      }
    }
    ecode8 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "BondFunctions_zSpread" "', argument " "8"" of type '" "Real""'");
    } 
    arg8 = static_cast< Real >(val8);
    ecode9 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(8), &val9);
    if (!SWIG_IsOK(ecode9)) {
      SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "BondFunctions_zSpread" "', argument " "9"" of type '" "Size""'");
    } 
    arg9 = static_cast< Size >(val9);
    {
      try {
        result = (Spread)BondFunctions_zSpread__SWIG_0((BondPtr const &)*arg1,arg2,(boost::shared_ptr< YieldTermStructure > const &)*arg3,(DayCounter const &)*arg4,arg5,arg6,arg7,arg8,arg9);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_zSpread__SWIG_2) {
  {
    BondPtr *arg1 = 0 ;
    Real arg2 ;
    boost::shared_ptr< YieldTermStructure > *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    Compounding arg5 ;
    Frequency arg6 ;
    Date arg7 ;
    Real arg8 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    double val8 ;
    int ecode8 = 0 ;
    int argvi = 0;
    Spread result;
    dXSARGS;
    
    if ((items < 8) || (items > 8)) {
      SWIG_croak("Usage: BondFunctions_zSpread(bond,cleanPrice,discountCurve,dayCounter,compounding,frequency,settlementDate,accuracy);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_zSpread" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_zSpread" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BondFunctions_zSpread" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "BondFunctions_zSpread" "', argument " "3"" of type '" "boost::shared_ptr< YieldTermStructure > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_zSpread" "', argument " "3"" of type '" "boost::shared_ptr< YieldTermStructure > const &""'"); 
    }
    arg3 = reinterpret_cast< boost::shared_ptr< YieldTermStructure > * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "BondFunctions_zSpread" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_zSpread" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "BondFunctions_zSpread" "', argument " "5"" of type '" "Compounding""'");
    } 
    arg5 = static_cast< Compounding >(val5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "BondFunctions_zSpread" "', argument " "6"" of type '" "Frequency""'");
    } 
    arg6 = static_cast< Frequency >(val6);
    {
      res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res7)) {
        SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "BondFunctions_zSpread" "', argument " "7"" of type '" "Date""'"); 
      }  
      if (!argp7) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_zSpread" "', argument " "7"" of type '" "Date""'");
      } else {
        arg7 = *(reinterpret_cast< Date * >(argp7));
      }
    }
    ecode8 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "BondFunctions_zSpread" "', argument " "8"" of type '" "Real""'");
    } 
    arg8 = static_cast< Real >(val8);
    {
      try {
        result = (Spread)BondFunctions_zSpread__SWIG_0((BondPtr const &)*arg1,arg2,(boost::shared_ptr< YieldTermStructure > const &)*arg3,(DayCounter const &)*arg4,arg5,arg6,arg7,arg8);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_zSpread__SWIG_3) {
  {
    BondPtr *arg1 = 0 ;
    Real arg2 ;
    boost::shared_ptr< YieldTermStructure > *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    Compounding arg5 ;
    Frequency arg6 ;
    Date arg7 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    int argvi = 0;
    Spread result;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: BondFunctions_zSpread(bond,cleanPrice,discountCurve,dayCounter,compounding,frequency,settlementDate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_zSpread" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_zSpread" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BondFunctions_zSpread" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "BondFunctions_zSpread" "', argument " "3"" of type '" "boost::shared_ptr< YieldTermStructure > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_zSpread" "', argument " "3"" of type '" "boost::shared_ptr< YieldTermStructure > const &""'"); 
    }
    arg3 = reinterpret_cast< boost::shared_ptr< YieldTermStructure > * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "BondFunctions_zSpread" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_zSpread" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "BondFunctions_zSpread" "', argument " "5"" of type '" "Compounding""'");
    } 
    arg5 = static_cast< Compounding >(val5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "BondFunctions_zSpread" "', argument " "6"" of type '" "Frequency""'");
    } 
    arg6 = static_cast< Frequency >(val6);
    {
      res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res7)) {
        SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "BondFunctions_zSpread" "', argument " "7"" of type '" "Date""'"); 
      }  
      if (!argp7) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_zSpread" "', argument " "7"" of type '" "Date""'");
      } else {
        arg7 = *(reinterpret_cast< Date * >(argp7));
      }
    }
    {
      try {
        result = (Spread)BondFunctions_zSpread__SWIG_0((BondPtr const &)*arg1,arg2,(boost::shared_ptr< YieldTermStructure > const &)*arg3,(DayCounter const &)*arg4,arg5,arg6,arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_zSpread__SWIG_4) {
  {
    BondPtr *arg1 = 0 ;
    Real arg2 ;
    boost::shared_ptr< YieldTermStructure > *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    Compounding arg5 ;
    Frequency arg6 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    Spread result;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: BondFunctions_zSpread(bond,cleanPrice,discountCurve,dayCounter,compounding,frequency);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondFunctions_zSpread" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_zSpread" "', argument " "1"" of type '" "BondPtr const &""'"); 
    }
    arg1 = reinterpret_cast< BondPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BondFunctions_zSpread" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "BondFunctions_zSpread" "', argument " "3"" of type '" "boost::shared_ptr< YieldTermStructure > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_zSpread" "', argument " "3"" of type '" "boost::shared_ptr< YieldTermStructure > const &""'"); 
    }
    arg3 = reinterpret_cast< boost::shared_ptr< YieldTermStructure > * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "BondFunctions_zSpread" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "BondFunctions_zSpread" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "BondFunctions_zSpread" "', argument " "5"" of type '" "Compounding""'");
    } 
    arg5 = static_cast< Compounding >(val5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "BondFunctions_zSpread" "', argument " "6"" of type '" "Frequency""'");
    } 
    arg6 = static_cast< Frequency >(val6);
    {
      try {
        result = (Spread)BondFunctions_zSpread__SWIG_0((BondPtr const &)*arg1,arg2,(boost::shared_ptr< YieldTermStructure > const &)*arg3,(DayCounter const &)*arg4,arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BondFunctions_zSpread) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 8) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 9) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(8), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 10) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(8), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_zSpread__SWIG_4); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_zSpread__SWIG_3); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_zSpread__SWIG_2); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_zSpread__SWIG_1); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_BondFunctions_zSpread__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'BondFunctions_zSpread'");
  XSRETURN(0);
}


XS(_wrap_new_BondFunctions) {
  {
    int argvi = 0;
    BondFunctions *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_BondFunctions();");
    }
    {
      try {
        result = (BondFunctions *)new BondFunctions();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BondFunctions, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_BondFunctions) {
  {
    BondFunctions *arg1 = (BondFunctions *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_BondFunctions(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BondFunctions, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_BondFunctions" "', argument " "1"" of type '" "BondFunctions *""'"); 
    }
    arg1 = reinterpret_cast< BondFunctions * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CapFloor_impliedVolatility__SWIG_0) {
  {
    CapFloorPtr *arg1 = (CapFloorPtr *) 0 ;
    Real arg2 ;
    Handle< YieldTermStructure > *arg3 = 0 ;
    Volatility arg4 ;
    Real arg5 ;
    Natural arg6 ;
    Volatility arg7 ;
    Volatility arg8 ;
    VolatilityType arg9 ;
    Real arg10 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    double val5 ;
    int ecode5 = 0 ;
    unsigned int val6 ;
    int ecode6 = 0 ;
    double val7 ;
    int ecode7 = 0 ;
    double val8 ;
    int ecode8 = 0 ;
    int val9 ;
    int ecode9 = 0 ;
    double val10 ;
    int ecode10 = 0 ;
    int argvi = 0;
    Volatility result;
    dXSARGS;
    
    if ((items < 10) || (items > 10)) {
      SWIG_croak("Usage: CapFloor_impliedVolatility(self,price,disc,guess,accuracy,maxEvaluations,minVol,maxVol,type,displacement);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CapFloorPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CapFloor_impliedVolatility" "', argument " "1"" of type '" "CapFloorPtr const *""'"); 
    }
    arg1 = reinterpret_cast< CapFloorPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CapFloor_impliedVolatility" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CapFloor_impliedVolatility" "', argument " "3"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CapFloor_impliedVolatility" "', argument " "3"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< YieldTermStructure > * >(argp3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CapFloor_impliedVolatility" "', argument " "4"" of type '" "Volatility""'");
    } 
    arg4 = static_cast< Volatility >(val4);
    ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CapFloor_impliedVolatility" "', argument " "5"" of type '" "Real""'");
    } 
    arg5 = static_cast< Real >(val5);
    ecode6 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "CapFloor_impliedVolatility" "', argument " "6"" of type '" "Natural""'");
    } 
    arg6 = static_cast< Natural >(val6);
    ecode7 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "CapFloor_impliedVolatility" "', argument " "7"" of type '" "Volatility""'");
    } 
    arg7 = static_cast< Volatility >(val7);
    ecode8 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "CapFloor_impliedVolatility" "', argument " "8"" of type '" "Volatility""'");
    } 
    arg8 = static_cast< Volatility >(val8);
    ecode9 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(8), &val9);
    if (!SWIG_IsOK(ecode9)) {
      SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "CapFloor_impliedVolatility" "', argument " "9"" of type '" "VolatilityType""'");
    } 
    arg9 = static_cast< VolatilityType >(val9);
    ecode10 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), &val10);
    if (!SWIG_IsOK(ecode10)) {
      SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "CapFloor_impliedVolatility" "', argument " "10"" of type '" "Real""'");
    } 
    arg10 = static_cast< Real >(val10);
    {
      try {
        result = (Volatility)CapFloorPtr_impliedVolatility__SWIG_0((CapFloorPtr const *)arg1,arg2,(Handle< YieldTermStructure > const &)*arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CapFloor_impliedVolatility__SWIG_1) {
  {
    CapFloorPtr *arg1 = (CapFloorPtr *) 0 ;
    Real arg2 ;
    Handle< YieldTermStructure > *arg3 = 0 ;
    Volatility arg4 ;
    Real arg5 ;
    Natural arg6 ;
    Volatility arg7 ;
    Volatility arg8 ;
    VolatilityType arg9 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    double val5 ;
    int ecode5 = 0 ;
    unsigned int val6 ;
    int ecode6 = 0 ;
    double val7 ;
    int ecode7 = 0 ;
    double val8 ;
    int ecode8 = 0 ;
    int val9 ;
    int ecode9 = 0 ;
    int argvi = 0;
    Volatility result;
    dXSARGS;
    
    if ((items < 9) || (items > 9)) {
      SWIG_croak("Usage: CapFloor_impliedVolatility(self,price,disc,guess,accuracy,maxEvaluations,minVol,maxVol,type);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CapFloorPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CapFloor_impliedVolatility" "', argument " "1"" of type '" "CapFloorPtr const *""'"); 
    }
    arg1 = reinterpret_cast< CapFloorPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CapFloor_impliedVolatility" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CapFloor_impliedVolatility" "', argument " "3"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CapFloor_impliedVolatility" "', argument " "3"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< YieldTermStructure > * >(argp3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CapFloor_impliedVolatility" "', argument " "4"" of type '" "Volatility""'");
    } 
    arg4 = static_cast< Volatility >(val4);
    ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CapFloor_impliedVolatility" "', argument " "5"" of type '" "Real""'");
    } 
    arg5 = static_cast< Real >(val5);
    ecode6 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "CapFloor_impliedVolatility" "', argument " "6"" of type '" "Natural""'");
    } 
    arg6 = static_cast< Natural >(val6);
    ecode7 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "CapFloor_impliedVolatility" "', argument " "7"" of type '" "Volatility""'");
    } 
    arg7 = static_cast< Volatility >(val7);
    ecode8 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "CapFloor_impliedVolatility" "', argument " "8"" of type '" "Volatility""'");
    } 
    arg8 = static_cast< Volatility >(val8);
    ecode9 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(8), &val9);
    if (!SWIG_IsOK(ecode9)) {
      SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "CapFloor_impliedVolatility" "', argument " "9"" of type '" "VolatilityType""'");
    } 
    arg9 = static_cast< VolatilityType >(val9);
    {
      try {
        result = (Volatility)CapFloorPtr_impliedVolatility__SWIG_0((CapFloorPtr const *)arg1,arg2,(Handle< YieldTermStructure > const &)*arg3,arg4,arg5,arg6,arg7,arg8,arg9);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CapFloor_impliedVolatility__SWIG_2) {
  {
    CapFloorPtr *arg1 = (CapFloorPtr *) 0 ;
    Real arg2 ;
    Handle< YieldTermStructure > *arg3 = 0 ;
    Volatility arg4 ;
    Real arg5 ;
    Natural arg6 ;
    Volatility arg7 ;
    Volatility arg8 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    double val5 ;
    int ecode5 = 0 ;
    unsigned int val6 ;
    int ecode6 = 0 ;
    double val7 ;
    int ecode7 = 0 ;
    double val8 ;
    int ecode8 = 0 ;
    int argvi = 0;
    Volatility result;
    dXSARGS;
    
    if ((items < 8) || (items > 8)) {
      SWIG_croak("Usage: CapFloor_impliedVolatility(self,price,disc,guess,accuracy,maxEvaluations,minVol,maxVol);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CapFloorPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CapFloor_impliedVolatility" "', argument " "1"" of type '" "CapFloorPtr const *""'"); 
    }
    arg1 = reinterpret_cast< CapFloorPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CapFloor_impliedVolatility" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CapFloor_impliedVolatility" "', argument " "3"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CapFloor_impliedVolatility" "', argument " "3"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< YieldTermStructure > * >(argp3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CapFloor_impliedVolatility" "', argument " "4"" of type '" "Volatility""'");
    } 
    arg4 = static_cast< Volatility >(val4);
    ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CapFloor_impliedVolatility" "', argument " "5"" of type '" "Real""'");
    } 
    arg5 = static_cast< Real >(val5);
    ecode6 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "CapFloor_impliedVolatility" "', argument " "6"" of type '" "Natural""'");
    } 
    arg6 = static_cast< Natural >(val6);
    ecode7 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "CapFloor_impliedVolatility" "', argument " "7"" of type '" "Volatility""'");
    } 
    arg7 = static_cast< Volatility >(val7);
    ecode8 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "CapFloor_impliedVolatility" "', argument " "8"" of type '" "Volatility""'");
    } 
    arg8 = static_cast< Volatility >(val8);
    {
      try {
        result = (Volatility)CapFloorPtr_impliedVolatility__SWIG_0((CapFloorPtr const *)arg1,arg2,(Handle< YieldTermStructure > const &)*arg3,arg4,arg5,arg6,arg7,arg8);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CapFloor_impliedVolatility__SWIG_3) {
  {
    CapFloorPtr *arg1 = (CapFloorPtr *) 0 ;
    Real arg2 ;
    Handle< YieldTermStructure > *arg3 = 0 ;
    Volatility arg4 ;
    Real arg5 ;
    Natural arg6 ;
    Volatility arg7 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    double val5 ;
    int ecode5 = 0 ;
    unsigned int val6 ;
    int ecode6 = 0 ;
    double val7 ;
    int ecode7 = 0 ;
    int argvi = 0;
    Volatility result;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: CapFloor_impliedVolatility(self,price,disc,guess,accuracy,maxEvaluations,minVol);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CapFloorPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CapFloor_impliedVolatility" "', argument " "1"" of type '" "CapFloorPtr const *""'"); 
    }
    arg1 = reinterpret_cast< CapFloorPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CapFloor_impliedVolatility" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CapFloor_impliedVolatility" "', argument " "3"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CapFloor_impliedVolatility" "', argument " "3"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< YieldTermStructure > * >(argp3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CapFloor_impliedVolatility" "', argument " "4"" of type '" "Volatility""'");
    } 
    arg4 = static_cast< Volatility >(val4);
    ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CapFloor_impliedVolatility" "', argument " "5"" of type '" "Real""'");
    } 
    arg5 = static_cast< Real >(val5);
    ecode6 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "CapFloor_impliedVolatility" "', argument " "6"" of type '" "Natural""'");
    } 
    arg6 = static_cast< Natural >(val6);
    ecode7 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "CapFloor_impliedVolatility" "', argument " "7"" of type '" "Volatility""'");
    } 
    arg7 = static_cast< Volatility >(val7);
    {
      try {
        result = (Volatility)CapFloorPtr_impliedVolatility__SWIG_0((CapFloorPtr const *)arg1,arg2,(Handle< YieldTermStructure > const &)*arg3,arg4,arg5,arg6,arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CapFloor_impliedVolatility__SWIG_4) {
  {
    CapFloorPtr *arg1 = (CapFloorPtr *) 0 ;
    Real arg2 ;
    Handle< YieldTermStructure > *arg3 = 0 ;
    Volatility arg4 ;
    Real arg5 ;
    Natural arg6 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    double val5 ;
    int ecode5 = 0 ;
    unsigned int val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    Volatility result;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: CapFloor_impliedVolatility(self,price,disc,guess,accuracy,maxEvaluations);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CapFloorPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CapFloor_impliedVolatility" "', argument " "1"" of type '" "CapFloorPtr const *""'"); 
    }
    arg1 = reinterpret_cast< CapFloorPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CapFloor_impliedVolatility" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CapFloor_impliedVolatility" "', argument " "3"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CapFloor_impliedVolatility" "', argument " "3"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< YieldTermStructure > * >(argp3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CapFloor_impliedVolatility" "', argument " "4"" of type '" "Volatility""'");
    } 
    arg4 = static_cast< Volatility >(val4);
    ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CapFloor_impliedVolatility" "', argument " "5"" of type '" "Real""'");
    } 
    arg5 = static_cast< Real >(val5);
    ecode6 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "CapFloor_impliedVolatility" "', argument " "6"" of type '" "Natural""'");
    } 
    arg6 = static_cast< Natural >(val6);
    {
      try {
        result = (Volatility)CapFloorPtr_impliedVolatility__SWIG_0((CapFloorPtr const *)arg1,arg2,(Handle< YieldTermStructure > const &)*arg3,arg4,arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CapFloor_impliedVolatility__SWIG_5) {
  {
    CapFloorPtr *arg1 = (CapFloorPtr *) 0 ;
    Real arg2 ;
    Handle< YieldTermStructure > *arg3 = 0 ;
    Volatility arg4 ;
    Real arg5 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    double val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    Volatility result;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: CapFloor_impliedVolatility(self,price,disc,guess,accuracy);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CapFloorPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CapFloor_impliedVolatility" "', argument " "1"" of type '" "CapFloorPtr const *""'"); 
    }
    arg1 = reinterpret_cast< CapFloorPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CapFloor_impliedVolatility" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CapFloor_impliedVolatility" "', argument " "3"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CapFloor_impliedVolatility" "', argument " "3"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< YieldTermStructure > * >(argp3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CapFloor_impliedVolatility" "', argument " "4"" of type '" "Volatility""'");
    } 
    arg4 = static_cast< Volatility >(val4);
    ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CapFloor_impliedVolatility" "', argument " "5"" of type '" "Real""'");
    } 
    arg5 = static_cast< Real >(val5);
    {
      try {
        result = (Volatility)CapFloorPtr_impliedVolatility__SWIG_0((CapFloorPtr const *)arg1,arg2,(Handle< YieldTermStructure > const &)*arg3,arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CapFloor_impliedVolatility__SWIG_6) {
  {
    CapFloorPtr *arg1 = (CapFloorPtr *) 0 ;
    Real arg2 ;
    Handle< YieldTermStructure > *arg3 = 0 ;
    Volatility arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Volatility result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: CapFloor_impliedVolatility(self,price,disc,guess);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CapFloorPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CapFloor_impliedVolatility" "', argument " "1"" of type '" "CapFloorPtr const *""'"); 
    }
    arg1 = reinterpret_cast< CapFloorPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CapFloor_impliedVolatility" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CapFloor_impliedVolatility" "', argument " "3"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CapFloor_impliedVolatility" "', argument " "3"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< YieldTermStructure > * >(argp3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CapFloor_impliedVolatility" "', argument " "4"" of type '" "Volatility""'");
    } 
    arg4 = static_cast< Volatility >(val4);
    {
      try {
        result = (Volatility)CapFloorPtr_impliedVolatility__SWIG_0((CapFloorPtr const *)arg1,arg2,(Handle< YieldTermStructure > const &)*arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CapFloor_impliedVolatility) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_CapFloorPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_CapFloorPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_CapFloorPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_CapFloorPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 8) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_CapFloorPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 9) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_CapFloorPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(8), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
    if (items == 10) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_CapFloorPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(8), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 7;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_7:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CapFloor_impliedVolatility__SWIG_6); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CapFloor_impliedVolatility__SWIG_5); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CapFloor_impliedVolatility__SWIG_4); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CapFloor_impliedVolatility__SWIG_3); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CapFloor_impliedVolatility__SWIG_2); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CapFloor_impliedVolatility__SWIG_1); return;
    case 7:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CapFloor_impliedVolatility__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'CapFloor_impliedVolatility'");
  XSRETURN(0);
}


XS(_wrap_CapFloor_floatingLeg) {
  {
    CapFloorPtr *arg1 = (CapFloorPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Leg *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CapFloor_floatingLeg(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CapFloorPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CapFloor_floatingLeg" "', argument " "1"" of type '" "CapFloorPtr const *""'"); 
    }
    arg1 = reinterpret_cast< CapFloorPtr * >(argp1);
    {
      try {
        result = (Leg *) &CapFloorPtr_floatingLeg((CapFloorPtr const *)arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CapFloor_capRates) {
  {
    CapFloorPtr *arg1 = (CapFloorPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Rate > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CapFloor_capRates(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CapFloorPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CapFloor_capRates" "', argument " "1"" of type '" "CapFloorPtr const *""'"); 
    }
    arg1 = reinterpret_cast< CapFloorPtr * >(argp1);
    {
      try {
        result = (std::vector< Rate > *) &CapFloorPtr_capRates((CapFloorPtr const *)arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CapFloor_floorRates) {
  {
    CapFloorPtr *arg1 = (CapFloorPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Rate > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CapFloor_floorRates(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CapFloorPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CapFloor_floorRates" "', argument " "1"" of type '" "CapFloorPtr const *""'"); 
    }
    arg1 = reinterpret_cast< CapFloorPtr * >(argp1);
    {
      try {
        result = (std::vector< Rate > *) &CapFloorPtr_floorRates((CapFloorPtr const *)arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CapFloor_startDate) {
  {
    CapFloorPtr *arg1 = (CapFloorPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CapFloor_startDate(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CapFloorPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CapFloor_startDate" "', argument " "1"" of type '" "CapFloorPtr const *""'"); 
    }
    arg1 = reinterpret_cast< CapFloorPtr * >(argp1);
    {
      try {
        result = CapFloorPtr_startDate((CapFloorPtr const *)arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CapFloor_maturityDate) {
  {
    CapFloorPtr *arg1 = (CapFloorPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CapFloor_maturityDate(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CapFloorPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CapFloor_maturityDate" "', argument " "1"" of type '" "CapFloorPtr const *""'"); 
    }
    arg1 = reinterpret_cast< CapFloorPtr * >(argp1);
    {
      try {
        result = CapFloorPtr_maturityDate((CapFloorPtr const *)arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CapFloor_atmRate) {
  {
    CapFloorPtr *arg1 = (CapFloorPtr *) 0 ;
    boost::shared_ptr< YieldTermStructure > *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: CapFloor_atmRate(self,discountCurve);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CapFloorPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CapFloor_atmRate" "', argument " "1"" of type '" "CapFloorPtr const *""'"); 
    }
    arg1 = reinterpret_cast< CapFloorPtr * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CapFloor_atmRate" "', argument " "2"" of type '" "boost::shared_ptr< YieldTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CapFloor_atmRate" "', argument " "2"" of type '" "boost::shared_ptr< YieldTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< boost::shared_ptr< YieldTermStructure > * >(argp2);
    {
      try {
        result = (Rate)CapFloorPtr_atmRate((CapFloorPtr const *)arg1,(boost::shared_ptr< YieldTermStructure > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CapFloor) {
  {
    int argvi = 0;
    CapFloorPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_CapFloor();");
    }
    {
      try {
        result = (CapFloorPtr *)new CapFloorPtr();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CapFloorPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_CapFloor) {
  {
    CapFloorPtr *arg1 = (CapFloorPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_CapFloor(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CapFloorPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CapFloor" "', argument " "1"" of type '" "CapFloorPtr *""'"); 
    }
    arg1 = reinterpret_cast< CapFloorPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Cap) {
  {
    std::vector< boost::shared_ptr< CashFlow > > *arg1 = 0 ;
    std::vector< Rate > *arg2 = 0 ;
    std::vector< boost::shared_ptr< CashFlow > > temp1 ;
    std::vector< boost::shared_ptr< CashFlow > > *v1 ;
    std::vector< double > temp2 ;
    std::vector< double > *v2 ;
    int argvi = 0;
    CapPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_Cap(leg,capRates);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_Cap. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CashFlow >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_Cap. "
              "Expected an array of " "boost::shared_ptr< CashFlow >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_Cap. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_Cap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp2.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_Cap. "
              "Expected an array of ""double");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_Cap. "
          "Expected an array of ""double");
      }
    }
    {
      try {
        result = (CapPtr *)new_CapPtr((std::vector< boost::shared_ptr< CashFlow > > const &)*arg1,(std::vector< double > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CapPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_Cap) {
  {
    CapPtr *arg1 = (CapPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Cap(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CapPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Cap" "', argument " "1"" of type '" "CapPtr *""'"); 
    }
    arg1 = reinterpret_cast< CapPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Floor) {
  {
    std::vector< boost::shared_ptr< CashFlow > > *arg1 = 0 ;
    std::vector< Rate > *arg2 = 0 ;
    std::vector< boost::shared_ptr< CashFlow > > temp1 ;
    std::vector< boost::shared_ptr< CashFlow > > *v1 ;
    std::vector< double > temp2 ;
    std::vector< double > *v2 ;
    int argvi = 0;
    FloorPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_Floor(leg,floorRates);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_Floor. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CashFlow >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_Floor. "
              "Expected an array of " "boost::shared_ptr< CashFlow >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_Floor. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_Floor. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp2.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_Floor. "
              "Expected an array of ""double");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_Floor. "
          "Expected an array of ""double");
      }
    }
    {
      try {
        result = (FloorPtr *)new_FloorPtr((std::vector< boost::shared_ptr< CashFlow > > const &)*arg1,(std::vector< double > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FloorPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_Floor) {
  {
    FloorPtr *arg1 = (FloorPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Floor(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_FloorPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Floor" "', argument " "1"" of type '" "FloorPtr *""'"); 
    }
    arg1 = reinterpret_cast< FloorPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Collar) {
  {
    std::vector< boost::shared_ptr< CashFlow > > *arg1 = 0 ;
    std::vector< Rate > *arg2 = 0 ;
    std::vector< Rate > *arg3 = 0 ;
    std::vector< boost::shared_ptr< CashFlow > > temp1 ;
    std::vector< boost::shared_ptr< CashFlow > > *v1 ;
    std::vector< double > temp2 ;
    std::vector< double > *v2 ;
    std::vector< double > temp3 ;
    std::vector< double > *v3 ;
    int argvi = 0;
    CollarPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_Collar(leg,capRates,floorRates);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_Collar. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CashFlow >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_Collar. "
              "Expected an array of " "boost::shared_ptr< CashFlow >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_Collar. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_Collar. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp2.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_Collar. "
              "Expected an array of ""double");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_Collar. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_Collar. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp3.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_Collar. "
              "Expected an array of ""double");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_Collar. "
          "Expected an array of ""double");
      }
    }
    {
      try {
        result = (CollarPtr *)new_CollarPtr((std::vector< boost::shared_ptr< CashFlow > > const &)*arg1,(std::vector< double > const &)*arg2,(std::vector< double > const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CollarPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_Collar) {
  {
    CollarPtr *arg1 = (CollarPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Collar(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CollarPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Collar" "', argument " "1"" of type '" "CollarPtr *""'"); 
    }
    arg1 = reinterpret_cast< CollarPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BlackCapFloorEngine__SWIG_0) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    Handle< Quote > *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    BlackCapFloorEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_BlackCapFloorEngine(termStructure,vol);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_BlackCapFloorEngine" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BlackCapFloorEngine" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_BlackCapFloorEngine" "', argument " "2"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BlackCapFloorEngine" "', argument " "2"" of type '" "Handle< Quote > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< Quote > * >(argp2);
    {
      try {
        result = (BlackCapFloorEnginePtr *)new_BlackCapFloorEnginePtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1,(Handle< Quote > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BlackCapFloorEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BlackCapFloorEngine__SWIG_1) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    Handle< OptionletVolatilityStructure > *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    BlackCapFloorEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_BlackCapFloorEngine(termStructure,vol);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_BlackCapFloorEngine" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BlackCapFloorEngine" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_OptionletVolatilityStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_BlackCapFloorEngine" "', argument " "2"" of type '" "Handle< OptionletVolatilityStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BlackCapFloorEngine" "', argument " "2"" of type '" "Handle< OptionletVolatilityStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< OptionletVolatilityStructure > * >(argp2);
    {
      try {
        result = (BlackCapFloorEnginePtr *)new_BlackCapFloorEnginePtr__SWIG_1((Handle< YieldTermStructure > const &)*arg1,(Handle< OptionletVolatilityStructure > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BlackCapFloorEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BlackCapFloorEngine) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_OptionletVolatilityStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_BlackCapFloorEngine__SWIG_0); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_BlackCapFloorEngine__SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded 'new_BlackCapFloorEngine'");
  XSRETURN(0);
}


XS(_wrap_delete_BlackCapFloorEngine) {
  {
    BlackCapFloorEnginePtr *arg1 = (BlackCapFloorEnginePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_BlackCapFloorEngine(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BlackCapFloorEnginePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_BlackCapFloorEngine" "', argument " "1"" of type '" "BlackCapFloorEnginePtr *""'"); 
    }
    arg1 = reinterpret_cast< BlackCapFloorEnginePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BachelierCapFloorEngine__SWIG_0) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    Handle< Quote > *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    BachelierCapFloorEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_BachelierCapFloorEngine(termStructure,vol);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_BachelierCapFloorEngine" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BachelierCapFloorEngine" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_BachelierCapFloorEngine" "', argument " "2"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BachelierCapFloorEngine" "', argument " "2"" of type '" "Handle< Quote > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< Quote > * >(argp2);
    {
      try {
        result = (BachelierCapFloorEnginePtr *)new_BachelierCapFloorEnginePtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1,(Handle< Quote > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BachelierCapFloorEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BachelierCapFloorEngine__SWIG_1) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    Handle< OptionletVolatilityStructure > *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    BachelierCapFloorEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_BachelierCapFloorEngine(termStructure,vol);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_BachelierCapFloorEngine" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BachelierCapFloorEngine" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_OptionletVolatilityStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_BachelierCapFloorEngine" "', argument " "2"" of type '" "Handle< OptionletVolatilityStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BachelierCapFloorEngine" "', argument " "2"" of type '" "Handle< OptionletVolatilityStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< OptionletVolatilityStructure > * >(argp2);
    {
      try {
        result = (BachelierCapFloorEnginePtr *)new_BachelierCapFloorEnginePtr__SWIG_1((Handle< YieldTermStructure > const &)*arg1,(Handle< OptionletVolatilityStructure > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BachelierCapFloorEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BachelierCapFloorEngine) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_OptionletVolatilityStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_BachelierCapFloorEngine__SWIG_0); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_BachelierCapFloorEngine__SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded 'new_BachelierCapFloorEngine'");
  XSRETURN(0);
}


XS(_wrap_delete_BachelierCapFloorEngine) {
  {
    BachelierCapFloorEnginePtr *arg1 = (BachelierCapFloorEnginePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_BachelierCapFloorEngine(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BachelierCapFloorEnginePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_BachelierCapFloorEngine" "', argument " "1"" of type '" "BachelierCapFloorEnginePtr *""'"); 
    }
    arg1 = reinterpret_cast< BachelierCapFloorEnginePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Dividend___deref__) {
  {
    boost::shared_ptr< Dividend > *arg1 = (boost::shared_ptr< Dividend > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Dividend *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Dividend___deref__(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Dividend_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dividend___deref__" "', argument " "1"" of type '" "boost::shared_ptr< Dividend > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Dividend > * >(argp1);
    {
      try {
        result = (Dividend *)(arg1)->operator ->();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Dividend, 0 | 0); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Dividend_isNull) {
  {
    boost::shared_ptr< Dividend > *arg1 = (boost::shared_ptr< Dividend > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Dividend_isNull(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Dividend_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dividend_isNull" "', argument " "1"" of type '" "boost::shared_ptr< Dividend > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Dividend > * >(argp1);
    {
      try {
        result = (bool)boost_shared_ptr_Sl_Dividend_Sg__isNull(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Dividend) {
  {
    int argvi = 0;
    boost::shared_ptr< Dividend > *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Dividend();");
    }
    {
      try {
        result = (boost::shared_ptr< Dividend > *)new boost::shared_ptr< Dividend >();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_boost__shared_ptrT_Dividend_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_Dividend) {
  {
    boost::shared_ptr< Dividend > *arg1 = (boost::shared_ptr< Dividend > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Dividend(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Dividend_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Dividend" "', argument " "1"" of type '" "boost::shared_ptr< Dividend > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Dividend > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Dividend_amount) {
  {
    boost::shared_ptr< Dividend > *arg1 = (boost::shared_ptr< Dividend > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Dividend_amount(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Dividend_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dividend_amount" "', argument " "1"" of type '" "boost::shared_ptr< Dividend > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Dividend > * >(argp1);
    {
      try {
        result = (Real)(*arg1)->amount();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Dividend_date) {
  {
    boost::shared_ptr< Dividend > *arg1 = (boost::shared_ptr< Dividend > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Dividend_date(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Dividend_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Dividend_date" "', argument " "1"" of type '" "boost::shared_ptr< Dividend > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Dividend > * >(argp1);
    {
      try {
        result = (*arg1)->date();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FixedDividend) {
  {
    Real arg1 ;
    Date *arg2 = 0 ;
    double val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    FixedDividendPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_FixedDividend(amount,date);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FixedDividend" "', argument " "1"" of type '" "Real""'");
    } 
    arg1 = static_cast< Real >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FixedDividend" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedDividend" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    {
      try {
        result = (FixedDividendPtr *)new_FixedDividendPtr(arg1,(Date const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FixedDividendPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_FixedDividend) {
  {
    FixedDividendPtr *arg1 = (FixedDividendPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_FixedDividend(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_FixedDividendPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FixedDividend" "', argument " "1"" of type '" "FixedDividendPtr *""'"); 
    }
    arg1 = reinterpret_cast< FixedDividendPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FractionalDividend) {
  {
    Rate arg1 ;
    Date *arg2 = 0 ;
    double val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    FractionalDividendPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_FractionalDividend(rate,date);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FractionalDividend" "', argument " "1"" of type '" "Rate""'");
    } 
    arg1 = static_cast< Rate >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FractionalDividend" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FractionalDividend" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    {
      try {
        result = (FractionalDividendPtr *)new_FractionalDividendPtr(arg1,(Date const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FractionalDividendPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_FractionalDividend) {
  {
    FractionalDividendPtr *arg1 = (FractionalDividendPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_FractionalDividend(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_FractionalDividendPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FractionalDividend" "', argument " "1"" of type '" "FractionalDividendPtr *""'"); 
    }
    arg1 = reinterpret_cast< FractionalDividendPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DividendSchedule__SWIG_0) {
  {
    unsigned int arg1 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    std::vector< boost::shared_ptr< Dividend > > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_DividendSchedule(size);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_DividendSchedule" "', argument " "1"" of type '" "unsigned int""'");
    } 
    arg1 = static_cast< unsigned int >(val1);
    {
      try {
        result = (std::vector< boost::shared_ptr< Dividend > > *)new std::vector< boost::shared_ptr< Dividend > >(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Dividend_t_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DividendSchedule__SWIG_1) {
  {
    int argvi = 0;
    std::vector< boost::shared_ptr< Dividend > > *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_DividendSchedule();");
    }
    {
      try {
        result = (std::vector< boost::shared_ptr< Dividend > > *)new std::vector< boost::shared_ptr< Dividend > >();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Dividend_t_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_DividendSchedule__SWIG_2) {
  {
    unsigned int arg1 ;
    boost::shared_ptr< Dividend > *arg2 = 0 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    std::vector< boost::shared_ptr< Dividend > > *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_DividendSchedule(size,value);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_DividendSchedule" "', argument " "1"" of type '" "unsigned int""'");
    } 
    arg1 = static_cast< unsigned int >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_boost__shared_ptrT_Dividend_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_DividendSchedule" "', argument " "2"" of type '" "boost::shared_ptr< Dividend > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DividendSchedule" "', argument " "2"" of type '" "boost::shared_ptr< Dividend > const &""'"); 
    }
    arg2 = reinterpret_cast< boost::shared_ptr< Dividend > * >(argp2);
    {
      try {
        result = (std::vector< boost::shared_ptr< Dividend > > *)new std::vector< boost::shared_ptr< Dividend > >(arg1,(boost::shared_ptr< Dividend > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Dividend_t_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DividendSchedule__SWIG_3) {
  {
    std::vector< boost::shared_ptr< Dividend > > *arg1 = 0 ;
    std::vector< boost::shared_ptr< Dividend > > temp1 ;
    std::vector< boost::shared_ptr< Dividend > > *v1 ;
    int argvi = 0;
    std::vector< boost::shared_ptr< Dividend > > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_DividendSchedule(std::vector< boost::shared_ptr< Dividend > > const &);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Dividend_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_DividendSchedule. "
          "Expected an array of " "boost::shared_ptr< Dividend >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< Dividend >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_Dividend_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_DividendSchedule. "
              "Expected an array of " "boost::shared_ptr< Dividend >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_DividendSchedule. "
          "Expected an array of " "boost::shared_ptr< Dividend >");
      }
    }
    {
      try {
        result = (std::vector< boost::shared_ptr< Dividend > > *)new std::vector< boost::shared_ptr< Dividend > >((std::vector< boost::shared_ptr< Dividend > > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Dividend_t_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DividendSchedule) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< Dividend > >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Dividend_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< Dividend >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_Dividend_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_boost__shared_ptrT_Dividend_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DividendSchedule__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DividendSchedule__SWIG_0); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DividendSchedule__SWIG_3); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DividendSchedule__SWIG_2); return;
    }
  }
  
  croak("No matching function for overloaded 'new_DividendSchedule'");
  XSRETURN(0);
}


XS(_wrap_DividendSchedule_size) {
  {
    std::vector< boost::shared_ptr< Dividend > > *arg1 = (std::vector< boost::shared_ptr< Dividend > > *) 0 ;
    std::vector< boost::shared_ptr< Dividend > > temp1 ;
    std::vector< boost::shared_ptr< Dividend > > *v1 ;
    int argvi = 0;
    unsigned int result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DividendSchedule_size(self);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Dividend_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of DividendSchedule_size. "
          "Expected an array of " "boost::shared_ptr< Dividend >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< Dividend >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_Dividend_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "DividendSchedule_size. "
              "Expected an array of " "boost::shared_ptr< Dividend >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of DividendSchedule_size. "
          "Expected an array of " "boost::shared_ptr< Dividend >");
      }
    }
    {
      try {
        result = (unsigned int)((std::vector< boost::shared_ptr< Dividend > > const *)arg1)->size();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_DividendSchedule_empty) {
  {
    std::vector< boost::shared_ptr< Dividend > > *arg1 = (std::vector< boost::shared_ptr< Dividend > > *) 0 ;
    std::vector< boost::shared_ptr< Dividend > > temp1 ;
    std::vector< boost::shared_ptr< Dividend > > *v1 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DividendSchedule_empty(self);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Dividend_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of DividendSchedule_empty. "
          "Expected an array of " "boost::shared_ptr< Dividend >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< Dividend >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_Dividend_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "DividendSchedule_empty. "
              "Expected an array of " "boost::shared_ptr< Dividend >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of DividendSchedule_empty. "
          "Expected an array of " "boost::shared_ptr< Dividend >");
      }
    }
    {
      try {
        result = (bool)((std::vector< boost::shared_ptr< Dividend > > const *)arg1)->empty();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_DividendSchedule_clear) {
  {
    std::vector< boost::shared_ptr< Dividend > > *arg1 = (std::vector< boost::shared_ptr< Dividend > > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DividendSchedule_clear(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Dividend_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DividendSchedule_clear" "', argument " "1"" of type '" "std::vector< boost::shared_ptr< Dividend > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< boost::shared_ptr< Dividend > > * >(argp1);
    {
      try {
        (arg1)->clear();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_DividendSchedule_push) {
  {
    std::vector< boost::shared_ptr< Dividend > > *arg1 = (std::vector< boost::shared_ptr< Dividend > > *) 0 ;
    boost::shared_ptr< Dividend > *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: DividendSchedule_push(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Dividend_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DividendSchedule_push" "', argument " "1"" of type '" "std::vector< boost::shared_ptr< Dividend > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< boost::shared_ptr< Dividend > > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_boost__shared_ptrT_Dividend_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DividendSchedule_push" "', argument " "2"" of type '" "boost::shared_ptr< Dividend > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DividendSchedule_push" "', argument " "2"" of type '" "boost::shared_ptr< Dividend > const &""'"); 
    }
    arg2 = reinterpret_cast< boost::shared_ptr< Dividend > * >(argp2);
    {
      try {
        (arg1)->push_back((boost::shared_ptr< Dividend > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_DividendSchedule_pop) {
  {
    std::vector< boost::shared_ptr< Dividend > > *arg1 = (std::vector< boost::shared_ptr< Dividend > > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    boost::shared_ptr< Dividend > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DividendSchedule_pop(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Dividend_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DividendSchedule_pop" "', argument " "1"" of type '" "std::vector< boost::shared_ptr< Dividend > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< boost::shared_ptr< Dividend > > * >(argp1);
    {
      try {
        try {
          result = std_vector_Sl_boost_shared_ptr_Sl_Dividend_Sg__Sg__pop(arg1);
        }
        catch(std::out_of_range &_e) {
          sv_setsv(get_sv("@", GV_ADD), SWIG_NewPointerObj((new std::out_of_range(static_cast< const std::out_of_range& >(_e))),SWIGTYPE_p_std__out_of_range,SWIG_POINTER_OWN)); SWIG_fail ;
        }
        
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new boost::shared_ptr< Dividend >(static_cast< const boost::shared_ptr< Dividend >& >(result))), SWIGTYPE_p_boost__shared_ptrT_Dividend_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_DividendSchedule_get) {
  {
    std::vector< boost::shared_ptr< Dividend > > *arg1 = (std::vector< boost::shared_ptr< Dividend > > *) 0 ;
    int arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    boost::shared_ptr< Dividend > *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: DividendSchedule_get(self,i);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Dividend_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DividendSchedule_get" "', argument " "1"" of type '" "std::vector< boost::shared_ptr< Dividend > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< boost::shared_ptr< Dividend > > * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DividendSchedule_get" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    {
      try {
        try {
          result = (boost::shared_ptr< Dividend > *) &std_vector_Sl_boost_shared_ptr_Sl_Dividend_Sg__Sg__get(arg1,arg2);
        }
        catch(std::out_of_range &_e) {
          sv_setsv(get_sv("@", GV_ADD), SWIG_NewPointerObj((new std::out_of_range(static_cast< const std::out_of_range& >(_e))),SWIGTYPE_p_std__out_of_range,SWIG_POINTER_OWN)); SWIG_fail ;
        }
        
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_boost__shared_ptrT_Dividend_t, 0 | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_DividendSchedule_set) {
  {
    std::vector< boost::shared_ptr< Dividend > > *arg1 = (std::vector< boost::shared_ptr< Dividend > > *) 0 ;
    int arg2 ;
    boost::shared_ptr< Dividend > *arg3 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: DividendSchedule_set(self,i,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Dividend_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DividendSchedule_set" "', argument " "1"" of type '" "std::vector< boost::shared_ptr< Dividend > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< boost::shared_ptr< Dividend > > * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DividendSchedule_set" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_boost__shared_ptrT_Dividend_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "DividendSchedule_set" "', argument " "3"" of type '" "boost::shared_ptr< Dividend > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DividendSchedule_set" "', argument " "3"" of type '" "boost::shared_ptr< Dividend > const &""'"); 
    }
    arg3 = reinterpret_cast< boost::shared_ptr< Dividend > * >(argp3);
    {
      try {
        try {
          std_vector_Sl_boost_shared_ptr_Sl_Dividend_Sg__Sg__set(arg1,arg2,(boost::shared_ptr< Dividend > const &)*arg3);
        }
        catch(std::out_of_range &_e) {
          sv_setsv(get_sv("@", GV_ADD), SWIG_NewPointerObj((new std::out_of_range(static_cast< const std::out_of_range& >(_e))),SWIGTYPE_p_std__out_of_range,SWIG_POINTER_OWN)); SWIG_fail ;
        }
        
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_DividendSchedule) {
  {
    std::vector< boost::shared_ptr< Dividend > > *arg1 = (std::vector< boost::shared_ptr< Dividend > > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_DividendSchedule(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Dividend_t_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DividendSchedule" "', argument " "1"" of type '" "std::vector< boost::shared_ptr< Dividend > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< boost::shared_ptr< Dividend > > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ConvertibleZeroCouponBond__SWIG_0) {
  {
    boost::shared_ptr< Exercise > *arg1 = 0 ;
    Real arg2 ;
    std::vector< boost::shared_ptr< Dividend > > *arg3 = 0 ;
    std::vector< boost::shared_ptr< Callability > > *arg4 = 0 ;
    Handle< Quote > *arg5 = 0 ;
    Date *arg6 = 0 ;
    Integer arg7 ;
    DayCounter *arg8 = 0 ;
    Schedule *arg9 = 0 ;
    Real arg10 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    std::vector< boost::shared_ptr< Dividend > > temp3 ;
    std::vector< boost::shared_ptr< Dividend > > *v3 ;
    std::vector< boost::shared_ptr< Callability > > temp4 ;
    std::vector< boost::shared_ptr< Callability > > *v4 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    int val7 ;
    int ecode7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    double val10 ;
    int ecode10 = 0 ;
    int argvi = 0;
    ConvertibleZeroCouponBondPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 10) || (items > 10)) {
      SWIG_croak("Usage: new_ConvertibleZeroCouponBond(exercise,conversionRatio,dividends,callability,creditSpread,issueDate,settlementDays,dayCounter,schedule,redemption);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_Exercise_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ConvertibleZeroCouponBond" "', argument " "1"" of type '" "boost::shared_ptr< Exercise > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConvertibleZeroCouponBond" "', argument " "1"" of type '" "boost::shared_ptr< Exercise > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Exercise > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_ConvertibleZeroCouponBond" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Dividend_t_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_ConvertibleZeroCouponBond. "
          "Expected an array of " "boost::shared_ptr< Dividend >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< Dividend >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_Dividend_t,0) != -1) {
            temp3.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_ConvertibleZeroCouponBond. "
              "Expected an array of " "boost::shared_ptr< Dividend >");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_ConvertibleZeroCouponBond. "
          "Expected an array of " "boost::shared_ptr< Dividend >");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Callability_t_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of new_ConvertibleZeroCouponBond. "
          "Expected an array of " "boost::shared_ptr< Callability >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< Callability >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_Callability_t,0) != -1) {
            temp4.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 4 of "
              "new_ConvertibleZeroCouponBond. "
              "Expected an array of " "boost::shared_ptr< Callability >");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of new_ConvertibleZeroCouponBond. "
          "Expected an array of " "boost::shared_ptr< Callability >");
      }
    }
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_ConvertibleZeroCouponBond" "', argument " "5"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConvertibleZeroCouponBond" "', argument " "5"" of type '" "Handle< Quote > const &""'"); 
    }
    arg5 = reinterpret_cast< Handle< Quote > * >(argp5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_ConvertibleZeroCouponBond" "', argument " "6"" of type '" "Date const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConvertibleZeroCouponBond" "', argument " "6"" of type '" "Date const &""'"); 
    }
    arg6 = reinterpret_cast< Date * >(argp6);
    ecode7 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_ConvertibleZeroCouponBond" "', argument " "7"" of type '" "Integer""'");
    } 
    arg7 = static_cast< Integer >(val7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_ConvertibleZeroCouponBond" "', argument " "8"" of type '" "DayCounter const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConvertibleZeroCouponBond" "', argument " "8"" of type '" "DayCounter const &""'"); 
    }
    arg8 = reinterpret_cast< DayCounter * >(argp8);
    res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res9)) {
      SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_ConvertibleZeroCouponBond" "', argument " "9"" of type '" "Schedule const &""'"); 
    }
    if (!argp9) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConvertibleZeroCouponBond" "', argument " "9"" of type '" "Schedule const &""'"); 
    }
    arg9 = reinterpret_cast< Schedule * >(argp9);
    ecode10 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), &val10);
    if (!SWIG_IsOK(ecode10)) {
      SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "new_ConvertibleZeroCouponBond" "', argument " "10"" of type '" "Real""'");
    } 
    arg10 = static_cast< Real >(val10);
    {
      try {
        result = (ConvertibleZeroCouponBondPtr *)new_ConvertibleZeroCouponBondPtr__SWIG_0((boost::shared_ptr< Exercise > const &)*arg1,arg2,(std::vector< boost::shared_ptr< Dividend > > const &)*arg3,(std::vector< boost::shared_ptr< Callability > > const &)*arg4,(Handle< Quote > const &)*arg5,(Date const &)*arg6,arg7,(DayCounter const &)*arg8,(Schedule const &)*arg9,arg10);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ConvertibleZeroCouponBondPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ConvertibleZeroCouponBond__SWIG_1) {
  {
    boost::shared_ptr< Exercise > *arg1 = 0 ;
    Real arg2 ;
    std::vector< boost::shared_ptr< Dividend > > *arg3 = 0 ;
    std::vector< boost::shared_ptr< Callability > > *arg4 = 0 ;
    Handle< Quote > *arg5 = 0 ;
    Date *arg6 = 0 ;
    Integer arg7 ;
    DayCounter *arg8 = 0 ;
    Schedule *arg9 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    std::vector< boost::shared_ptr< Dividend > > temp3 ;
    std::vector< boost::shared_ptr< Dividend > > *v3 ;
    std::vector< boost::shared_ptr< Callability > > temp4 ;
    std::vector< boost::shared_ptr< Callability > > *v4 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    int val7 ;
    int ecode7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    int argvi = 0;
    ConvertibleZeroCouponBondPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 9) || (items > 9)) {
      SWIG_croak("Usage: new_ConvertibleZeroCouponBond(exercise,conversionRatio,dividends,callability,creditSpread,issueDate,settlementDays,dayCounter,schedule);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_Exercise_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ConvertibleZeroCouponBond" "', argument " "1"" of type '" "boost::shared_ptr< Exercise > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConvertibleZeroCouponBond" "', argument " "1"" of type '" "boost::shared_ptr< Exercise > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Exercise > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_ConvertibleZeroCouponBond" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Dividend_t_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_ConvertibleZeroCouponBond. "
          "Expected an array of " "boost::shared_ptr< Dividend >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< Dividend >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_Dividend_t,0) != -1) {
            temp3.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_ConvertibleZeroCouponBond. "
              "Expected an array of " "boost::shared_ptr< Dividend >");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_ConvertibleZeroCouponBond. "
          "Expected an array of " "boost::shared_ptr< Dividend >");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Callability_t_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of new_ConvertibleZeroCouponBond. "
          "Expected an array of " "boost::shared_ptr< Callability >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< Callability >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_Callability_t,0) != -1) {
            temp4.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 4 of "
              "new_ConvertibleZeroCouponBond. "
              "Expected an array of " "boost::shared_ptr< Callability >");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of new_ConvertibleZeroCouponBond. "
          "Expected an array of " "boost::shared_ptr< Callability >");
      }
    }
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_ConvertibleZeroCouponBond" "', argument " "5"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConvertibleZeroCouponBond" "', argument " "5"" of type '" "Handle< Quote > const &""'"); 
    }
    arg5 = reinterpret_cast< Handle< Quote > * >(argp5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_ConvertibleZeroCouponBond" "', argument " "6"" of type '" "Date const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConvertibleZeroCouponBond" "', argument " "6"" of type '" "Date const &""'"); 
    }
    arg6 = reinterpret_cast< Date * >(argp6);
    ecode7 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_ConvertibleZeroCouponBond" "', argument " "7"" of type '" "Integer""'");
    } 
    arg7 = static_cast< Integer >(val7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_ConvertibleZeroCouponBond" "', argument " "8"" of type '" "DayCounter const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConvertibleZeroCouponBond" "', argument " "8"" of type '" "DayCounter const &""'"); 
    }
    arg8 = reinterpret_cast< DayCounter * >(argp8);
    res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res9)) {
      SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_ConvertibleZeroCouponBond" "', argument " "9"" of type '" "Schedule const &""'"); 
    }
    if (!argp9) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConvertibleZeroCouponBond" "', argument " "9"" of type '" "Schedule const &""'"); 
    }
    arg9 = reinterpret_cast< Schedule * >(argp9);
    {
      try {
        result = (ConvertibleZeroCouponBondPtr *)new_ConvertibleZeroCouponBondPtr__SWIG_0((boost::shared_ptr< Exercise > const &)*arg1,arg2,(std::vector< boost::shared_ptr< Dividend > > const &)*arg3,(std::vector< boost::shared_ptr< Callability > > const &)*arg4,(Handle< Quote > const &)*arg5,(Date const &)*arg6,arg7,(DayCounter const &)*arg8,(Schedule const &)*arg9);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ConvertibleZeroCouponBondPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ConvertibleZeroCouponBond) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 9) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_Exercise_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< Dividend > >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Dividend_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< Dividend >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_Dividend_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< Callability > >* v;
            if (SWIG_ConvertPtr(ST(3),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Callability_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(3))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(3));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< Callability >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_Callability_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 10) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_Exercise_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< Dividend > >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Dividend_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< Dividend >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_Dividend_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< Callability > >* v;
            if (SWIG_ConvertPtr(ST(3),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Callability_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(3))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(3));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< Callability >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_Callability_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ConvertibleZeroCouponBond__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ConvertibleZeroCouponBond__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_ConvertibleZeroCouponBond'");
  XSRETURN(0);
}


XS(_wrap_delete_ConvertibleZeroCouponBond) {
  {
    ConvertibleZeroCouponBondPtr *arg1 = (ConvertibleZeroCouponBondPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_ConvertibleZeroCouponBond(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ConvertibleZeroCouponBondPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ConvertibleZeroCouponBond" "', argument " "1"" of type '" "ConvertibleZeroCouponBondPtr *""'"); 
    }
    arg1 = reinterpret_cast< ConvertibleZeroCouponBondPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ConvertibleFixedCouponBond__SWIG_0) {
  {
    boost::shared_ptr< Exercise > *arg1 = 0 ;
    Real arg2 ;
    std::vector< boost::shared_ptr< Dividend > > *arg3 = 0 ;
    std::vector< boost::shared_ptr< Callability > > *arg4 = 0 ;
    Handle< Quote > *arg5 = 0 ;
    Date *arg6 = 0 ;
    Integer arg7 ;
    std::vector< Rate > *arg8 = 0 ;
    DayCounter *arg9 = 0 ;
    Schedule *arg10 = 0 ;
    Real arg11 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    std::vector< boost::shared_ptr< Dividend > > temp3 ;
    std::vector< boost::shared_ptr< Dividend > > *v3 ;
    std::vector< boost::shared_ptr< Callability > > temp4 ;
    std::vector< boost::shared_ptr< Callability > > *v4 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    int val7 ;
    int ecode7 = 0 ;
    std::vector< double > temp8 ;
    std::vector< double > *v8 ;
    void *argp9 ;
    int res9 = 0 ;
    void *argp10 ;
    int res10 = 0 ;
    double val11 ;
    int ecode11 = 0 ;
    int argvi = 0;
    ConvertibleFixedCouponBondPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 11) || (items > 11)) {
      SWIG_croak("Usage: new_ConvertibleFixedCouponBond(exercise,conversionRatio,dividends,callability,creditSpread,issueDate,settlementDays,coupons,dayCounter,schedule,redemption);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_Exercise_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ConvertibleFixedCouponBond" "', argument " "1"" of type '" "boost::shared_ptr< Exercise > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConvertibleFixedCouponBond" "', argument " "1"" of type '" "boost::shared_ptr< Exercise > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Exercise > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_ConvertibleFixedCouponBond" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Dividend_t_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_ConvertibleFixedCouponBond. "
          "Expected an array of " "boost::shared_ptr< Dividend >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< Dividend >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_Dividend_t,0) != -1) {
            temp3.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_ConvertibleFixedCouponBond. "
              "Expected an array of " "boost::shared_ptr< Dividend >");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_ConvertibleFixedCouponBond. "
          "Expected an array of " "boost::shared_ptr< Dividend >");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Callability_t_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of new_ConvertibleFixedCouponBond. "
          "Expected an array of " "boost::shared_ptr< Callability >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< Callability >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_Callability_t,0) != -1) {
            temp4.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 4 of "
              "new_ConvertibleFixedCouponBond. "
              "Expected an array of " "boost::shared_ptr< Callability >");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of new_ConvertibleFixedCouponBond. "
          "Expected an array of " "boost::shared_ptr< Callability >");
      }
    }
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_ConvertibleFixedCouponBond" "', argument " "5"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConvertibleFixedCouponBond" "', argument " "5"" of type '" "Handle< Quote > const &""'"); 
    }
    arg5 = reinterpret_cast< Handle< Quote > * >(argp5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_ConvertibleFixedCouponBond" "', argument " "6"" of type '" "Date const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConvertibleFixedCouponBond" "', argument " "6"" of type '" "Date const &""'"); 
    }
    arg6 = reinterpret_cast< Date * >(argp6);
    ecode7 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_ConvertibleFixedCouponBond" "', argument " "7"" of type '" "Integer""'");
    } 
    arg7 = static_cast< Integer >(val7);
    {
      if (SWIG_ConvertPtr(ST(7),(void **) &v8, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg8 = v8;
      } else if (SvROK(ST(7))) {
        AV *av = (AV *)SvRV(ST(7));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 8 of new_ConvertibleFixedCouponBond. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp8.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 8 of "
              "new_ConvertibleFixedCouponBond. "
              "Expected an array of ""double");
          }
        }
        arg8 = &temp8;
      } else {
        SWIG_croak("Type error in argument 8 of new_ConvertibleFixedCouponBond. "
          "Expected an array of ""double");
      }
    }
    res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res9)) {
      SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_ConvertibleFixedCouponBond" "', argument " "9"" of type '" "DayCounter const &""'"); 
    }
    if (!argp9) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConvertibleFixedCouponBond" "', argument " "9"" of type '" "DayCounter const &""'"); 
    }
    arg9 = reinterpret_cast< DayCounter * >(argp9);
    res10 = SWIG_ConvertPtr(ST(9), &argp10, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res10)) {
      SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "new_ConvertibleFixedCouponBond" "', argument " "10"" of type '" "Schedule const &""'"); 
    }
    if (!argp10) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConvertibleFixedCouponBond" "', argument " "10"" of type '" "Schedule const &""'"); 
    }
    arg10 = reinterpret_cast< Schedule * >(argp10);
    ecode11 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(10), &val11);
    if (!SWIG_IsOK(ecode11)) {
      SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "new_ConvertibleFixedCouponBond" "', argument " "11"" of type '" "Real""'");
    } 
    arg11 = static_cast< Real >(val11);
    {
      try {
        result = (ConvertibleFixedCouponBondPtr *)new_ConvertibleFixedCouponBondPtr__SWIG_0((boost::shared_ptr< Exercise > const &)*arg1,arg2,(std::vector< boost::shared_ptr< Dividend > > const &)*arg3,(std::vector< boost::shared_ptr< Callability > > const &)*arg4,(Handle< Quote > const &)*arg5,(Date const &)*arg6,arg7,(std::vector< double > const &)*arg8,(DayCounter const &)*arg9,(Schedule const &)*arg10,arg11);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ConvertibleFixedCouponBondPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ConvertibleFixedCouponBond__SWIG_1) {
  {
    boost::shared_ptr< Exercise > *arg1 = 0 ;
    Real arg2 ;
    std::vector< boost::shared_ptr< Dividend > > *arg3 = 0 ;
    std::vector< boost::shared_ptr< Callability > > *arg4 = 0 ;
    Handle< Quote > *arg5 = 0 ;
    Date *arg6 = 0 ;
    Integer arg7 ;
    std::vector< Rate > *arg8 = 0 ;
    DayCounter *arg9 = 0 ;
    Schedule *arg10 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    std::vector< boost::shared_ptr< Dividend > > temp3 ;
    std::vector< boost::shared_ptr< Dividend > > *v3 ;
    std::vector< boost::shared_ptr< Callability > > temp4 ;
    std::vector< boost::shared_ptr< Callability > > *v4 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    int val7 ;
    int ecode7 = 0 ;
    std::vector< double > temp8 ;
    std::vector< double > *v8 ;
    void *argp9 ;
    int res9 = 0 ;
    void *argp10 ;
    int res10 = 0 ;
    int argvi = 0;
    ConvertibleFixedCouponBondPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 10) || (items > 10)) {
      SWIG_croak("Usage: new_ConvertibleFixedCouponBond(exercise,conversionRatio,dividends,callability,creditSpread,issueDate,settlementDays,coupons,dayCounter,schedule);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_Exercise_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ConvertibleFixedCouponBond" "', argument " "1"" of type '" "boost::shared_ptr< Exercise > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConvertibleFixedCouponBond" "', argument " "1"" of type '" "boost::shared_ptr< Exercise > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Exercise > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_ConvertibleFixedCouponBond" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Dividend_t_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_ConvertibleFixedCouponBond. "
          "Expected an array of " "boost::shared_ptr< Dividend >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< Dividend >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_Dividend_t,0) != -1) {
            temp3.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_ConvertibleFixedCouponBond. "
              "Expected an array of " "boost::shared_ptr< Dividend >");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_ConvertibleFixedCouponBond. "
          "Expected an array of " "boost::shared_ptr< Dividend >");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Callability_t_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of new_ConvertibleFixedCouponBond. "
          "Expected an array of " "boost::shared_ptr< Callability >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< Callability >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_Callability_t,0) != -1) {
            temp4.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 4 of "
              "new_ConvertibleFixedCouponBond. "
              "Expected an array of " "boost::shared_ptr< Callability >");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of new_ConvertibleFixedCouponBond. "
          "Expected an array of " "boost::shared_ptr< Callability >");
      }
    }
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_ConvertibleFixedCouponBond" "', argument " "5"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConvertibleFixedCouponBond" "', argument " "5"" of type '" "Handle< Quote > const &""'"); 
    }
    arg5 = reinterpret_cast< Handle< Quote > * >(argp5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_ConvertibleFixedCouponBond" "', argument " "6"" of type '" "Date const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConvertibleFixedCouponBond" "', argument " "6"" of type '" "Date const &""'"); 
    }
    arg6 = reinterpret_cast< Date * >(argp6);
    ecode7 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_ConvertibleFixedCouponBond" "', argument " "7"" of type '" "Integer""'");
    } 
    arg7 = static_cast< Integer >(val7);
    {
      if (SWIG_ConvertPtr(ST(7),(void **) &v8, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg8 = v8;
      } else if (SvROK(ST(7))) {
        AV *av = (AV *)SvRV(ST(7));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 8 of new_ConvertibleFixedCouponBond. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp8.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 8 of "
              "new_ConvertibleFixedCouponBond. "
              "Expected an array of ""double");
          }
        }
        arg8 = &temp8;
      } else {
        SWIG_croak("Type error in argument 8 of new_ConvertibleFixedCouponBond. "
          "Expected an array of ""double");
      }
    }
    res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res9)) {
      SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_ConvertibleFixedCouponBond" "', argument " "9"" of type '" "DayCounter const &""'"); 
    }
    if (!argp9) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConvertibleFixedCouponBond" "', argument " "9"" of type '" "DayCounter const &""'"); 
    }
    arg9 = reinterpret_cast< DayCounter * >(argp9);
    res10 = SWIG_ConvertPtr(ST(9), &argp10, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res10)) {
      SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "new_ConvertibleFixedCouponBond" "', argument " "10"" of type '" "Schedule const &""'"); 
    }
    if (!argp10) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConvertibleFixedCouponBond" "', argument " "10"" of type '" "Schedule const &""'"); 
    }
    arg10 = reinterpret_cast< Schedule * >(argp10);
    {
      try {
        result = (ConvertibleFixedCouponBondPtr *)new_ConvertibleFixedCouponBondPtr__SWIG_0((boost::shared_ptr< Exercise > const &)*arg1,arg2,(std::vector< boost::shared_ptr< Dividend > > const &)*arg3,(std::vector< boost::shared_ptr< Callability > > const &)*arg4,(Handle< Quote > const &)*arg5,(Date const &)*arg6,arg7,(std::vector< double > const &)*arg8,(DayCounter const &)*arg9,(Schedule const &)*arg10);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ConvertibleFixedCouponBondPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ConvertibleFixedCouponBond) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 10) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_Exercise_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< Dividend > >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Dividend_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< Dividend >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_Dividend_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< Callability > >* v;
            if (SWIG_ConvertPtr(ST(3),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Callability_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(3))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(3));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< Callability >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_Callability_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(7),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(7))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(7));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(9), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 11) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_Exercise_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< Dividend > >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Dividend_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< Dividend >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_Dividend_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< Callability > >* v;
            if (SWIG_ConvertPtr(ST(3),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Callability_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(3))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(3));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< Callability >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_Callability_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(7),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(7))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(7));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(9), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(10), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ConvertibleFixedCouponBond__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ConvertibleFixedCouponBond__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_ConvertibleFixedCouponBond'");
  XSRETURN(0);
}


XS(_wrap_delete_ConvertibleFixedCouponBond) {
  {
    ConvertibleFixedCouponBondPtr *arg1 = (ConvertibleFixedCouponBondPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_ConvertibleFixedCouponBond(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ConvertibleFixedCouponBondPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ConvertibleFixedCouponBond" "', argument " "1"" of type '" "ConvertibleFixedCouponBondPtr *""'"); 
    }
    arg1 = reinterpret_cast< ConvertibleFixedCouponBondPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ConvertibleFloatingRateBond__SWIG_0) {
  {
    boost::shared_ptr< Exercise > *arg1 = 0 ;
    Real arg2 ;
    std::vector< boost::shared_ptr< Dividend > > *arg3 = 0 ;
    std::vector< boost::shared_ptr< Callability > > *arg4 = 0 ;
    Handle< Quote > *arg5 = 0 ;
    Date *arg6 = 0 ;
    Integer arg7 ;
    IborIndexPtr *arg8 = 0 ;
    Integer arg9 ;
    std::vector< Spread > *arg10 = 0 ;
    DayCounter *arg11 = 0 ;
    Schedule *arg12 = 0 ;
    Real arg13 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    std::vector< boost::shared_ptr< Dividend > > temp3 ;
    std::vector< boost::shared_ptr< Dividend > > *v3 ;
    std::vector< boost::shared_ptr< Callability > > temp4 ;
    std::vector< boost::shared_ptr< Callability > > *v4 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    int val7 ;
    int ecode7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    int val9 ;
    int ecode9 = 0 ;
    std::vector< double > temp10 ;
    std::vector< double > *v10 ;
    void *argp11 ;
    int res11 = 0 ;
    void *argp12 ;
    int res12 = 0 ;
    double val13 ;
    int ecode13 = 0 ;
    int argvi = 0;
    ConvertibleFloatingRateBondPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 13) || (items > 13)) {
      SWIG_croak("Usage: new_ConvertibleFloatingRateBond(exercise,conversionRatio,dividends,callability,creditSpread,issueDate,settlementDays,index,fixingDays,spreads,dayCounter,schedule,redemption);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_Exercise_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ConvertibleFloatingRateBond" "', argument " "1"" of type '" "boost::shared_ptr< Exercise > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConvertibleFloatingRateBond" "', argument " "1"" of type '" "boost::shared_ptr< Exercise > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Exercise > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_ConvertibleFloatingRateBond" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Dividend_t_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_ConvertibleFloatingRateBond. "
          "Expected an array of " "boost::shared_ptr< Dividend >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< Dividend >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_Dividend_t,0) != -1) {
            temp3.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_ConvertibleFloatingRateBond. "
              "Expected an array of " "boost::shared_ptr< Dividend >");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_ConvertibleFloatingRateBond. "
          "Expected an array of " "boost::shared_ptr< Dividend >");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Callability_t_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of new_ConvertibleFloatingRateBond. "
          "Expected an array of " "boost::shared_ptr< Callability >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< Callability >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_Callability_t,0) != -1) {
            temp4.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 4 of "
              "new_ConvertibleFloatingRateBond. "
              "Expected an array of " "boost::shared_ptr< Callability >");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of new_ConvertibleFloatingRateBond. "
          "Expected an array of " "boost::shared_ptr< Callability >");
      }
    }
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_ConvertibleFloatingRateBond" "', argument " "5"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConvertibleFloatingRateBond" "', argument " "5"" of type '" "Handle< Quote > const &""'"); 
    }
    arg5 = reinterpret_cast< Handle< Quote > * >(argp5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_ConvertibleFloatingRateBond" "', argument " "6"" of type '" "Date const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConvertibleFloatingRateBond" "', argument " "6"" of type '" "Date const &""'"); 
    }
    arg6 = reinterpret_cast< Date * >(argp6);
    ecode7 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_ConvertibleFloatingRateBond" "', argument " "7"" of type '" "Integer""'");
    } 
    arg7 = static_cast< Integer >(val7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_IborIndexPtr,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_ConvertibleFloatingRateBond" "', argument " "8"" of type '" "IborIndexPtr const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConvertibleFloatingRateBond" "', argument " "8"" of type '" "IborIndexPtr const &""'"); 
    }
    arg8 = reinterpret_cast< IborIndexPtr * >(argp8);
    ecode9 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(8), &val9);
    if (!SWIG_IsOK(ecode9)) {
      SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "new_ConvertibleFloatingRateBond" "', argument " "9"" of type '" "Integer""'");
    } 
    arg9 = static_cast< Integer >(val9);
    {
      if (SWIG_ConvertPtr(ST(9),(void **) &v10, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg10 = v10;
      } else if (SvROK(ST(9))) {
        AV *av = (AV *)SvRV(ST(9));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 10 of new_ConvertibleFloatingRateBond. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp10.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 10 of "
              "new_ConvertibleFloatingRateBond. "
              "Expected an array of ""double");
          }
        }
        arg10 = &temp10;
      } else {
        SWIG_croak("Type error in argument 10 of new_ConvertibleFloatingRateBond. "
          "Expected an array of ""double");
      }
    }
    res11 = SWIG_ConvertPtr(ST(10), &argp11, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res11)) {
      SWIG_exception_fail(SWIG_ArgError(res11), "in method '" "new_ConvertibleFloatingRateBond" "', argument " "11"" of type '" "DayCounter const &""'"); 
    }
    if (!argp11) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConvertibleFloatingRateBond" "', argument " "11"" of type '" "DayCounter const &""'"); 
    }
    arg11 = reinterpret_cast< DayCounter * >(argp11);
    res12 = SWIG_ConvertPtr(ST(11), &argp12, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res12)) {
      SWIG_exception_fail(SWIG_ArgError(res12), "in method '" "new_ConvertibleFloatingRateBond" "', argument " "12"" of type '" "Schedule const &""'"); 
    }
    if (!argp12) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConvertibleFloatingRateBond" "', argument " "12"" of type '" "Schedule const &""'"); 
    }
    arg12 = reinterpret_cast< Schedule * >(argp12);
    ecode13 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(12), &val13);
    if (!SWIG_IsOK(ecode13)) {
      SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "new_ConvertibleFloatingRateBond" "', argument " "13"" of type '" "Real""'");
    } 
    arg13 = static_cast< Real >(val13);
    {
      try {
        result = (ConvertibleFloatingRateBondPtr *)new_ConvertibleFloatingRateBondPtr__SWIG_0((boost::shared_ptr< Exercise > const &)*arg1,arg2,(std::vector< boost::shared_ptr< Dividend > > const &)*arg3,(std::vector< boost::shared_ptr< Callability > > const &)*arg4,(Handle< Quote > const &)*arg5,(Date const &)*arg6,arg7,(IborIndexPtr const &)*arg8,arg9,(std::vector< double > const &)*arg10,(DayCounter const &)*arg11,(Schedule const &)*arg12,arg13);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ConvertibleFloatingRateBondPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ConvertibleFloatingRateBond__SWIG_1) {
  {
    boost::shared_ptr< Exercise > *arg1 = 0 ;
    Real arg2 ;
    std::vector< boost::shared_ptr< Dividend > > *arg3 = 0 ;
    std::vector< boost::shared_ptr< Callability > > *arg4 = 0 ;
    Handle< Quote > *arg5 = 0 ;
    Date *arg6 = 0 ;
    Integer arg7 ;
    IborIndexPtr *arg8 = 0 ;
    Integer arg9 ;
    std::vector< Spread > *arg10 = 0 ;
    DayCounter *arg11 = 0 ;
    Schedule *arg12 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    std::vector< boost::shared_ptr< Dividend > > temp3 ;
    std::vector< boost::shared_ptr< Dividend > > *v3 ;
    std::vector< boost::shared_ptr< Callability > > temp4 ;
    std::vector< boost::shared_ptr< Callability > > *v4 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    int val7 ;
    int ecode7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    int val9 ;
    int ecode9 = 0 ;
    std::vector< double > temp10 ;
    std::vector< double > *v10 ;
    void *argp11 ;
    int res11 = 0 ;
    void *argp12 ;
    int res12 = 0 ;
    int argvi = 0;
    ConvertibleFloatingRateBondPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 12) || (items > 12)) {
      SWIG_croak("Usage: new_ConvertibleFloatingRateBond(exercise,conversionRatio,dividends,callability,creditSpread,issueDate,settlementDays,index,fixingDays,spreads,dayCounter,schedule);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_Exercise_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ConvertibleFloatingRateBond" "', argument " "1"" of type '" "boost::shared_ptr< Exercise > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConvertibleFloatingRateBond" "', argument " "1"" of type '" "boost::shared_ptr< Exercise > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Exercise > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_ConvertibleFloatingRateBond" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Dividend_t_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_ConvertibleFloatingRateBond. "
          "Expected an array of " "boost::shared_ptr< Dividend >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< Dividend >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_Dividend_t,0) != -1) {
            temp3.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_ConvertibleFloatingRateBond. "
              "Expected an array of " "boost::shared_ptr< Dividend >");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_ConvertibleFloatingRateBond. "
          "Expected an array of " "boost::shared_ptr< Dividend >");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Callability_t_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of new_ConvertibleFloatingRateBond. "
          "Expected an array of " "boost::shared_ptr< Callability >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< Callability >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_Callability_t,0) != -1) {
            temp4.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 4 of "
              "new_ConvertibleFloatingRateBond. "
              "Expected an array of " "boost::shared_ptr< Callability >");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of new_ConvertibleFloatingRateBond. "
          "Expected an array of " "boost::shared_ptr< Callability >");
      }
    }
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_ConvertibleFloatingRateBond" "', argument " "5"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConvertibleFloatingRateBond" "', argument " "5"" of type '" "Handle< Quote > const &""'"); 
    }
    arg5 = reinterpret_cast< Handle< Quote > * >(argp5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_ConvertibleFloatingRateBond" "', argument " "6"" of type '" "Date const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConvertibleFloatingRateBond" "', argument " "6"" of type '" "Date const &""'"); 
    }
    arg6 = reinterpret_cast< Date * >(argp6);
    ecode7 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_ConvertibleFloatingRateBond" "', argument " "7"" of type '" "Integer""'");
    } 
    arg7 = static_cast< Integer >(val7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_IborIndexPtr,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_ConvertibleFloatingRateBond" "', argument " "8"" of type '" "IborIndexPtr const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConvertibleFloatingRateBond" "', argument " "8"" of type '" "IborIndexPtr const &""'"); 
    }
    arg8 = reinterpret_cast< IborIndexPtr * >(argp8);
    ecode9 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(8), &val9);
    if (!SWIG_IsOK(ecode9)) {
      SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "new_ConvertibleFloatingRateBond" "', argument " "9"" of type '" "Integer""'");
    } 
    arg9 = static_cast< Integer >(val9);
    {
      if (SWIG_ConvertPtr(ST(9),(void **) &v10, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg10 = v10;
      } else if (SvROK(ST(9))) {
        AV *av = (AV *)SvRV(ST(9));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 10 of new_ConvertibleFloatingRateBond. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp10.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 10 of "
              "new_ConvertibleFloatingRateBond. "
              "Expected an array of ""double");
          }
        }
        arg10 = &temp10;
      } else {
        SWIG_croak("Type error in argument 10 of new_ConvertibleFloatingRateBond. "
          "Expected an array of ""double");
      }
    }
    res11 = SWIG_ConvertPtr(ST(10), &argp11, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res11)) {
      SWIG_exception_fail(SWIG_ArgError(res11), "in method '" "new_ConvertibleFloatingRateBond" "', argument " "11"" of type '" "DayCounter const &""'"); 
    }
    if (!argp11) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConvertibleFloatingRateBond" "', argument " "11"" of type '" "DayCounter const &""'"); 
    }
    arg11 = reinterpret_cast< DayCounter * >(argp11);
    res12 = SWIG_ConvertPtr(ST(11), &argp12, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res12)) {
      SWIG_exception_fail(SWIG_ArgError(res12), "in method '" "new_ConvertibleFloatingRateBond" "', argument " "12"" of type '" "Schedule const &""'"); 
    }
    if (!argp12) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ConvertibleFloatingRateBond" "', argument " "12"" of type '" "Schedule const &""'"); 
    }
    arg12 = reinterpret_cast< Schedule * >(argp12);
    {
      try {
        result = (ConvertibleFloatingRateBondPtr *)new_ConvertibleFloatingRateBondPtr__SWIG_0((boost::shared_ptr< Exercise > const &)*arg1,arg2,(std::vector< boost::shared_ptr< Dividend > > const &)*arg3,(std::vector< boost::shared_ptr< Callability > > const &)*arg4,(Handle< Quote > const &)*arg5,(Date const &)*arg6,arg7,(IborIndexPtr const &)*arg8,arg9,(std::vector< double > const &)*arg10,(DayCounter const &)*arg11,(Schedule const &)*arg12);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ConvertibleFloatingRateBondPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ConvertibleFloatingRateBond) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 12) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_Exercise_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< Dividend > >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Dividend_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< Dividend >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_Dividend_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< Callability > >* v;
            if (SWIG_ConvertPtr(ST(3),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Callability_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(3))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(3));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< Callability >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_Callability_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_IborIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(8), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(9),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(9))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(9));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(10), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(11), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 13) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_Exercise_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< Dividend > >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Dividend_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< Dividend >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_Dividend_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< Callability > >* v;
            if (SWIG_ConvertPtr(ST(3),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Callability_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(3))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(3));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< Callability >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_Callability_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_IborIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(8), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(9),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(9))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(9));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(10), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(11), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(12), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ConvertibleFloatingRateBond__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ConvertibleFloatingRateBond__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_ConvertibleFloatingRateBond'");
  XSRETURN(0);
}


XS(_wrap_delete_ConvertibleFloatingRateBond) {
  {
    ConvertibleFloatingRateBondPtr *arg1 = (ConvertibleFloatingRateBondPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_ConvertibleFloatingRateBond(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ConvertibleFloatingRateBondPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ConvertibleFloatingRateBond" "', argument " "1"" of type '" "ConvertibleFloatingRateBondPtr *""'"); 
    }
    arg1 = reinterpret_cast< ConvertibleFloatingRateBondPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BinomialConvertibleEngine) {
  {
    GeneralizedBlackScholesProcessPtr *arg1 = 0 ;
    std::string *arg2 = 0 ;
    Size arg3 ;
    void *argp1 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    size_t val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    BinomialConvertibleEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_BinomialConvertibleEngine(process,type,steps);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_GeneralizedBlackScholesProcessPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_BinomialConvertibleEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BinomialConvertibleEngine" "', argument " "1"" of type '" "GeneralizedBlackScholesProcessPtr const &""'"); 
    }
    arg1 = reinterpret_cast< GeneralizedBlackScholesProcessPtr * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_BinomialConvertibleEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BinomialConvertibleEngine" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_BinomialConvertibleEngine" "', argument " "3"" of type '" "Size""'");
    } 
    arg3 = static_cast< Size >(val3);
    {
      try {
        result = (BinomialConvertibleEnginePtr *)new_BinomialConvertibleEnginePtr((GeneralizedBlackScholesProcessPtr const &)*arg1,(std::string const &)*arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BinomialConvertibleEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_BinomialConvertibleEngine) {
  {
    BinomialConvertibleEnginePtr *arg1 = (BinomialConvertibleEnginePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_BinomialConvertibleEngine(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BinomialConvertibleEnginePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_BinomialConvertibleEngine" "', argument " "1"" of type '" "BinomialConvertibleEnginePtr *""'"); 
    }
    arg1 = reinterpret_cast< BinomialConvertibleEnginePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_DefaultProbabilityTermStructure___deref__) {
  {
    boost::shared_ptr< DefaultProbabilityTermStructure > *arg1 = (boost::shared_ptr< DefaultProbabilityTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    DefaultProbabilityTermStructure *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DefaultProbabilityTermStructure___deref__(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DefaultProbabilityTermStructure___deref__" "', argument " "1"" of type '" "boost::shared_ptr< DefaultProbabilityTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< DefaultProbabilityTermStructure > * >(argp1);
    {
      try {
        result = (DefaultProbabilityTermStructure *)(arg1)->operator ->();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DefaultProbabilityTermStructure, 0 | 0); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_DefaultProbabilityTermStructure_isNull) {
  {
    boost::shared_ptr< DefaultProbabilityTermStructure > *arg1 = (boost::shared_ptr< DefaultProbabilityTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DefaultProbabilityTermStructure_isNull(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DefaultProbabilityTermStructure_isNull" "', argument " "1"" of type '" "boost::shared_ptr< DefaultProbabilityTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< DefaultProbabilityTermStructure > * >(argp1);
    {
      try {
        result = (bool)boost_shared_ptr_Sl_DefaultProbabilityTermStructure_Sg__isNull(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_DefaultProbabilityTermStructure_asObservable) {
  {
    boost::shared_ptr< DefaultProbabilityTermStructure > *arg1 = (boost::shared_ptr< DefaultProbabilityTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    boost::shared_ptr< Observable > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DefaultProbabilityTermStructure_asObservable(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DefaultProbabilityTermStructure_asObservable" "', argument " "1"" of type '" "boost::shared_ptr< DefaultProbabilityTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< DefaultProbabilityTermStructure > * >(argp1);
    {
      try {
        result = boost_shared_ptr_Sl_DefaultProbabilityTermStructure_Sg__asObservable(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new boost::shared_ptr< Observable >(static_cast< const boost::shared_ptr< Observable >& >(result))), SWIGTYPE_p_boost__shared_ptrT_Observable_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DefaultProbabilityTermStructure) {
  {
    int argvi = 0;
    boost::shared_ptr< DefaultProbabilityTermStructure > *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_DefaultProbabilityTermStructure();");
    }
    {
      try {
        result = (boost::shared_ptr< DefaultProbabilityTermStructure > *)new boost::shared_ptr< DefaultProbabilityTermStructure >();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityTermStructure_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_DefaultProbabilityTermStructure) {
  {
    boost::shared_ptr< DefaultProbabilityTermStructure > *arg1 = (boost::shared_ptr< DefaultProbabilityTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_DefaultProbabilityTermStructure(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityTermStructure_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DefaultProbabilityTermStructure" "', argument " "1"" of type '" "boost::shared_ptr< DefaultProbabilityTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< DefaultProbabilityTermStructure > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_DefaultProbabilityTermStructure_dayCounter) {
  {
    boost::shared_ptr< DefaultProbabilityTermStructure > *arg1 = (boost::shared_ptr< DefaultProbabilityTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    SwigValueWrapper< DayCounter > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DefaultProbabilityTermStructure_dayCounter(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DefaultProbabilityTermStructure_dayCounter" "', argument " "1"" of type '" "boost::shared_ptr< DefaultProbabilityTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< DefaultProbabilityTermStructure > * >(argp1);
    {
      try {
        result = (*arg1)->dayCounter();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new DayCounter(static_cast< const DayCounter& >(result))), SWIGTYPE_p_DayCounter, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_DefaultProbabilityTermStructure_calendar) {
  {
    boost::shared_ptr< DefaultProbabilityTermStructure > *arg1 = (boost::shared_ptr< DefaultProbabilityTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    SwigValueWrapper< Calendar > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DefaultProbabilityTermStructure_calendar(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DefaultProbabilityTermStructure_calendar" "', argument " "1"" of type '" "boost::shared_ptr< DefaultProbabilityTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< DefaultProbabilityTermStructure > * >(argp1);
    {
      try {
        result = (*arg1)->calendar();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Calendar(static_cast< const Calendar& >(result))), SWIGTYPE_p_Calendar, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_DefaultProbabilityTermStructure_referenceDate) {
  {
    boost::shared_ptr< DefaultProbabilityTermStructure > *arg1 = (boost::shared_ptr< DefaultProbabilityTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DefaultProbabilityTermStructure_referenceDate(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DefaultProbabilityTermStructure_referenceDate" "', argument " "1"" of type '" "boost::shared_ptr< DefaultProbabilityTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< DefaultProbabilityTermStructure > * >(argp1);
    {
      try {
        result = (*arg1)->referenceDate();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_DefaultProbabilityTermStructure_maxDate) {
  {
    boost::shared_ptr< DefaultProbabilityTermStructure > *arg1 = (boost::shared_ptr< DefaultProbabilityTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DefaultProbabilityTermStructure_maxDate(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DefaultProbabilityTermStructure_maxDate" "', argument " "1"" of type '" "boost::shared_ptr< DefaultProbabilityTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< DefaultProbabilityTermStructure > * >(argp1);
    {
      try {
        result = (*arg1)->maxDate();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_DefaultProbabilityTermStructure_maxTime) {
  {
    boost::shared_ptr< DefaultProbabilityTermStructure > *arg1 = (boost::shared_ptr< DefaultProbabilityTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Time result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DefaultProbabilityTermStructure_maxTime(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DefaultProbabilityTermStructure_maxTime" "', argument " "1"" of type '" "boost::shared_ptr< DefaultProbabilityTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< DefaultProbabilityTermStructure > * >(argp1);
    {
      try {
        result = (Time)(*arg1)->maxTime();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_DefaultProbabilityTermStructure_defaultProbability__SWIG_0) {
  {
    boost::shared_ptr< DefaultProbabilityTermStructure > *arg1 = (boost::shared_ptr< DefaultProbabilityTermStructure > *) 0 ;
    Date *arg2 = 0 ;
    bool arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Probability result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: DefaultProbabilityTermStructure_defaultProbability(self,Date const &,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DefaultProbabilityTermStructure_defaultProbability" "', argument " "1"" of type '" "boost::shared_ptr< DefaultProbabilityTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< DefaultProbabilityTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DefaultProbabilityTermStructure_defaultProbability" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DefaultProbabilityTermStructure_defaultProbability" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DefaultProbabilityTermStructure_defaultProbability" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (Probability)(*arg1)->defaultProbability((Date const &)*arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_DefaultProbabilityTermStructure_defaultProbability__SWIG_1) {
  {
    boost::shared_ptr< DefaultProbabilityTermStructure > *arg1 = (boost::shared_ptr< DefaultProbabilityTermStructure > *) 0 ;
    Date *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    Probability result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: DefaultProbabilityTermStructure_defaultProbability(self,Date const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DefaultProbabilityTermStructure_defaultProbability" "', argument " "1"" of type '" "boost::shared_ptr< DefaultProbabilityTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< DefaultProbabilityTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DefaultProbabilityTermStructure_defaultProbability" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DefaultProbabilityTermStructure_defaultProbability" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    {
      try {
        result = (Probability)(*arg1)->defaultProbability((Date const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_DefaultProbabilityTermStructure_defaultProbability__SWIG_2) {
  {
    boost::shared_ptr< DefaultProbabilityTermStructure > *arg1 = (boost::shared_ptr< DefaultProbabilityTermStructure > *) 0 ;
    Time arg2 ;
    bool arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Probability result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: DefaultProbabilityTermStructure_defaultProbability(self,Time,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DefaultProbabilityTermStructure_defaultProbability" "', argument " "1"" of type '" "boost::shared_ptr< DefaultProbabilityTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< DefaultProbabilityTermStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DefaultProbabilityTermStructure_defaultProbability" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DefaultProbabilityTermStructure_defaultProbability" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (Probability)(*arg1)->defaultProbability(arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_DefaultProbabilityTermStructure_defaultProbability__SWIG_3) {
  {
    boost::shared_ptr< DefaultProbabilityTermStructure > *arg1 = (boost::shared_ptr< DefaultProbabilityTermStructure > *) 0 ;
    Time arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Probability result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: DefaultProbabilityTermStructure_defaultProbability(self,Time);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DefaultProbabilityTermStructure_defaultProbability" "', argument " "1"" of type '" "boost::shared_ptr< DefaultProbabilityTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< DefaultProbabilityTermStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DefaultProbabilityTermStructure_defaultProbability" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    {
      try {
        result = (Probability)(*arg1)->defaultProbability(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_DefaultProbabilityTermStructure_defaultProbability__SWIG_4) {
  {
    boost::shared_ptr< DefaultProbabilityTermStructure > *arg1 = (boost::shared_ptr< DefaultProbabilityTermStructure > *) 0 ;
    Date *arg2 = 0 ;
    Date *arg3 = 0 ;
    bool arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Probability result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: DefaultProbabilityTermStructure_defaultProbability(self,Date const &,Date const &,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DefaultProbabilityTermStructure_defaultProbability" "', argument " "1"" of type '" "boost::shared_ptr< DefaultProbabilityTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< DefaultProbabilityTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DefaultProbabilityTermStructure_defaultProbability" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DefaultProbabilityTermStructure_defaultProbability" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "DefaultProbabilityTermStructure_defaultProbability" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DefaultProbabilityTermStructure_defaultProbability" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "DefaultProbabilityTermStructure_defaultProbability" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    {
      try {
        result = (Probability)(*arg1)->defaultProbability((Date const &)*arg2,(Date const &)*arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_DefaultProbabilityTermStructure_defaultProbability__SWIG_5) {
  {
    boost::shared_ptr< DefaultProbabilityTermStructure > *arg1 = (boost::shared_ptr< DefaultProbabilityTermStructure > *) 0 ;
    Date *arg2 = 0 ;
    Date *arg3 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    Probability result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: DefaultProbabilityTermStructure_defaultProbability(self,Date const &,Date const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DefaultProbabilityTermStructure_defaultProbability" "', argument " "1"" of type '" "boost::shared_ptr< DefaultProbabilityTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< DefaultProbabilityTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DefaultProbabilityTermStructure_defaultProbability" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DefaultProbabilityTermStructure_defaultProbability" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "DefaultProbabilityTermStructure_defaultProbability" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DefaultProbabilityTermStructure_defaultProbability" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    {
      try {
        result = (Probability)(*arg1)->defaultProbability((Date const &)*arg2,(Date const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_DefaultProbabilityTermStructure_defaultProbability__SWIG_6) {
  {
    boost::shared_ptr< DefaultProbabilityTermStructure > *arg1 = (boost::shared_ptr< DefaultProbabilityTermStructure > *) 0 ;
    Time arg2 ;
    Time arg3 ;
    bool arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Probability result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: DefaultProbabilityTermStructure_defaultProbability(self,Time,Time,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DefaultProbabilityTermStructure_defaultProbability" "', argument " "1"" of type '" "boost::shared_ptr< DefaultProbabilityTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< DefaultProbabilityTermStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DefaultProbabilityTermStructure_defaultProbability" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DefaultProbabilityTermStructure_defaultProbability" "', argument " "3"" of type '" "Time""'");
    } 
    arg3 = static_cast< Time >(val3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "DefaultProbabilityTermStructure_defaultProbability" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    {
      try {
        result = (Probability)(*arg1)->defaultProbability(arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_DefaultProbabilityTermStructure_defaultProbability__SWIG_7) {
  {
    boost::shared_ptr< DefaultProbabilityTermStructure > *arg1 = (boost::shared_ptr< DefaultProbabilityTermStructure > *) 0 ;
    Time arg2 ;
    Time arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Probability result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: DefaultProbabilityTermStructure_defaultProbability(self,Time,Time);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DefaultProbabilityTermStructure_defaultProbability" "', argument " "1"" of type '" "boost::shared_ptr< DefaultProbabilityTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< DefaultProbabilityTermStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DefaultProbabilityTermStructure_defaultProbability" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DefaultProbabilityTermStructure_defaultProbability" "', argument " "3"" of type '" "Time""'");
    } 
    arg3 = static_cast< Time >(val3);
    {
      try {
        result = (Probability)(*arg1)->defaultProbability(arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_DefaultProbabilityTermStructure_defaultProbability) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 7;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_7:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 8;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_8:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_DefaultProbabilityTermStructure_defaultProbability__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_DefaultProbabilityTermStructure_defaultProbability__SWIG_3); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_DefaultProbabilityTermStructure_defaultProbability__SWIG_5); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_DefaultProbabilityTermStructure_defaultProbability__SWIG_0); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_DefaultProbabilityTermStructure_defaultProbability__SWIG_2); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_DefaultProbabilityTermStructure_defaultProbability__SWIG_7); return;
    case 7:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_DefaultProbabilityTermStructure_defaultProbability__SWIG_4); return;
    case 8:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_DefaultProbabilityTermStructure_defaultProbability__SWIG_6); return;
    }
  }
  
  croak("No matching function for overloaded 'DefaultProbabilityTermStructure_defaultProbability'");
  XSRETURN(0);
}


XS(_wrap_DefaultProbabilityTermStructure_survivalProbability__SWIG_0) {
  {
    boost::shared_ptr< DefaultProbabilityTermStructure > *arg1 = (boost::shared_ptr< DefaultProbabilityTermStructure > *) 0 ;
    Date *arg2 = 0 ;
    bool arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Probability result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: DefaultProbabilityTermStructure_survivalProbability(self,Date const &,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DefaultProbabilityTermStructure_survivalProbability" "', argument " "1"" of type '" "boost::shared_ptr< DefaultProbabilityTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< DefaultProbabilityTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DefaultProbabilityTermStructure_survivalProbability" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DefaultProbabilityTermStructure_survivalProbability" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DefaultProbabilityTermStructure_survivalProbability" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (Probability)(*arg1)->survivalProbability((Date const &)*arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_DefaultProbabilityTermStructure_survivalProbability__SWIG_1) {
  {
    boost::shared_ptr< DefaultProbabilityTermStructure > *arg1 = (boost::shared_ptr< DefaultProbabilityTermStructure > *) 0 ;
    Date *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    Probability result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: DefaultProbabilityTermStructure_survivalProbability(self,Date const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DefaultProbabilityTermStructure_survivalProbability" "', argument " "1"" of type '" "boost::shared_ptr< DefaultProbabilityTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< DefaultProbabilityTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DefaultProbabilityTermStructure_survivalProbability" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DefaultProbabilityTermStructure_survivalProbability" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    {
      try {
        result = (Probability)(*arg1)->survivalProbability((Date const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_DefaultProbabilityTermStructure_survivalProbability__SWIG_2) {
  {
    boost::shared_ptr< DefaultProbabilityTermStructure > *arg1 = (boost::shared_ptr< DefaultProbabilityTermStructure > *) 0 ;
    Time arg2 ;
    bool arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Probability result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: DefaultProbabilityTermStructure_survivalProbability(self,Time,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DefaultProbabilityTermStructure_survivalProbability" "', argument " "1"" of type '" "boost::shared_ptr< DefaultProbabilityTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< DefaultProbabilityTermStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DefaultProbabilityTermStructure_survivalProbability" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DefaultProbabilityTermStructure_survivalProbability" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (Probability)(*arg1)->survivalProbability(arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_DefaultProbabilityTermStructure_survivalProbability__SWIG_3) {
  {
    boost::shared_ptr< DefaultProbabilityTermStructure > *arg1 = (boost::shared_ptr< DefaultProbabilityTermStructure > *) 0 ;
    Time arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Probability result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: DefaultProbabilityTermStructure_survivalProbability(self,Time);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DefaultProbabilityTermStructure_survivalProbability" "', argument " "1"" of type '" "boost::shared_ptr< DefaultProbabilityTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< DefaultProbabilityTermStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DefaultProbabilityTermStructure_survivalProbability" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    {
      try {
        result = (Probability)(*arg1)->survivalProbability(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_DefaultProbabilityTermStructure_survivalProbability) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_DefaultProbabilityTermStructure_survivalProbability__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_DefaultProbabilityTermStructure_survivalProbability__SWIG_3); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_DefaultProbabilityTermStructure_survivalProbability__SWIG_0); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_DefaultProbabilityTermStructure_survivalProbability__SWIG_2); return;
    }
  }
  
  croak("No matching function for overloaded 'DefaultProbabilityTermStructure_survivalProbability'");
  XSRETURN(0);
}


XS(_wrap_DefaultProbabilityTermStructure_defaultDensity__SWIG_0) {
  {
    boost::shared_ptr< DefaultProbabilityTermStructure > *arg1 = (boost::shared_ptr< DefaultProbabilityTermStructure > *) 0 ;
    Date *arg2 = 0 ;
    bool arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: DefaultProbabilityTermStructure_defaultDensity(self,Date const &,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DefaultProbabilityTermStructure_defaultDensity" "', argument " "1"" of type '" "boost::shared_ptr< DefaultProbabilityTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< DefaultProbabilityTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DefaultProbabilityTermStructure_defaultDensity" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DefaultProbabilityTermStructure_defaultDensity" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DefaultProbabilityTermStructure_defaultDensity" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (Real)(*arg1)->defaultDensity((Date const &)*arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_DefaultProbabilityTermStructure_defaultDensity__SWIG_1) {
  {
    boost::shared_ptr< DefaultProbabilityTermStructure > *arg1 = (boost::shared_ptr< DefaultProbabilityTermStructure > *) 0 ;
    Date *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: DefaultProbabilityTermStructure_defaultDensity(self,Date const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DefaultProbabilityTermStructure_defaultDensity" "', argument " "1"" of type '" "boost::shared_ptr< DefaultProbabilityTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< DefaultProbabilityTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DefaultProbabilityTermStructure_defaultDensity" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DefaultProbabilityTermStructure_defaultDensity" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    {
      try {
        result = (Real)(*arg1)->defaultDensity((Date const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_DefaultProbabilityTermStructure_defaultDensity__SWIG_2) {
  {
    boost::shared_ptr< DefaultProbabilityTermStructure > *arg1 = (boost::shared_ptr< DefaultProbabilityTermStructure > *) 0 ;
    Time arg2 ;
    bool arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: DefaultProbabilityTermStructure_defaultDensity(self,Time,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DefaultProbabilityTermStructure_defaultDensity" "', argument " "1"" of type '" "boost::shared_ptr< DefaultProbabilityTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< DefaultProbabilityTermStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DefaultProbabilityTermStructure_defaultDensity" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DefaultProbabilityTermStructure_defaultDensity" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (Real)(*arg1)->defaultDensity(arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_DefaultProbabilityTermStructure_defaultDensity__SWIG_3) {
  {
    boost::shared_ptr< DefaultProbabilityTermStructure > *arg1 = (boost::shared_ptr< DefaultProbabilityTermStructure > *) 0 ;
    Time arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: DefaultProbabilityTermStructure_defaultDensity(self,Time);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DefaultProbabilityTermStructure_defaultDensity" "', argument " "1"" of type '" "boost::shared_ptr< DefaultProbabilityTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< DefaultProbabilityTermStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DefaultProbabilityTermStructure_defaultDensity" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    {
      try {
        result = (Real)(*arg1)->defaultDensity(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_DefaultProbabilityTermStructure_defaultDensity) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_DefaultProbabilityTermStructure_defaultDensity__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_DefaultProbabilityTermStructure_defaultDensity__SWIG_3); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_DefaultProbabilityTermStructure_defaultDensity__SWIG_0); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_DefaultProbabilityTermStructure_defaultDensity__SWIG_2); return;
    }
  }
  
  croak("No matching function for overloaded 'DefaultProbabilityTermStructure_defaultDensity'");
  XSRETURN(0);
}


XS(_wrap_DefaultProbabilityTermStructure_hazardRate__SWIG_0) {
  {
    boost::shared_ptr< DefaultProbabilityTermStructure > *arg1 = (boost::shared_ptr< DefaultProbabilityTermStructure > *) 0 ;
    Date *arg2 = 0 ;
    bool arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: DefaultProbabilityTermStructure_hazardRate(self,Date const &,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DefaultProbabilityTermStructure_hazardRate" "', argument " "1"" of type '" "boost::shared_ptr< DefaultProbabilityTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< DefaultProbabilityTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DefaultProbabilityTermStructure_hazardRate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DefaultProbabilityTermStructure_hazardRate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DefaultProbabilityTermStructure_hazardRate" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (Real)(*arg1)->hazardRate((Date const &)*arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_DefaultProbabilityTermStructure_hazardRate__SWIG_1) {
  {
    boost::shared_ptr< DefaultProbabilityTermStructure > *arg1 = (boost::shared_ptr< DefaultProbabilityTermStructure > *) 0 ;
    Date *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: DefaultProbabilityTermStructure_hazardRate(self,Date const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DefaultProbabilityTermStructure_hazardRate" "', argument " "1"" of type '" "boost::shared_ptr< DefaultProbabilityTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< DefaultProbabilityTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DefaultProbabilityTermStructure_hazardRate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DefaultProbabilityTermStructure_hazardRate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    {
      try {
        result = (Real)(*arg1)->hazardRate((Date const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_DefaultProbabilityTermStructure_hazardRate__SWIG_2) {
  {
    boost::shared_ptr< DefaultProbabilityTermStructure > *arg1 = (boost::shared_ptr< DefaultProbabilityTermStructure > *) 0 ;
    Time arg2 ;
    bool arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: DefaultProbabilityTermStructure_hazardRate(self,Time,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DefaultProbabilityTermStructure_hazardRate" "', argument " "1"" of type '" "boost::shared_ptr< DefaultProbabilityTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< DefaultProbabilityTermStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DefaultProbabilityTermStructure_hazardRate" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DefaultProbabilityTermStructure_hazardRate" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (Real)(*arg1)->hazardRate(arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_DefaultProbabilityTermStructure_hazardRate__SWIG_3) {
  {
    boost::shared_ptr< DefaultProbabilityTermStructure > *arg1 = (boost::shared_ptr< DefaultProbabilityTermStructure > *) 0 ;
    Time arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: DefaultProbabilityTermStructure_hazardRate(self,Time);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DefaultProbabilityTermStructure_hazardRate" "', argument " "1"" of type '" "boost::shared_ptr< DefaultProbabilityTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< DefaultProbabilityTermStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DefaultProbabilityTermStructure_hazardRate" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    {
      try {
        result = (Real)(*arg1)->hazardRate(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_DefaultProbabilityTermStructure_hazardRate) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_DefaultProbabilityTermStructure_hazardRate__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_DefaultProbabilityTermStructure_hazardRate__SWIG_3); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_DefaultProbabilityTermStructure_hazardRate__SWIG_0); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_DefaultProbabilityTermStructure_hazardRate__SWIG_2); return;
    }
  }
  
  croak("No matching function for overloaded 'DefaultProbabilityTermStructure_hazardRate'");
  XSRETURN(0);
}


XS(_wrap_DefaultProbabilityTermStructure_enableExtrapolation) {
  {
    boost::shared_ptr< DefaultProbabilityTermStructure > *arg1 = (boost::shared_ptr< DefaultProbabilityTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DefaultProbabilityTermStructure_enableExtrapolation(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DefaultProbabilityTermStructure_enableExtrapolation" "', argument " "1"" of type '" "boost::shared_ptr< DefaultProbabilityTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< DefaultProbabilityTermStructure > * >(argp1);
    {
      try {
        (*arg1)->enableExtrapolation();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_DefaultProbabilityTermStructure_disableExtrapolation) {
  {
    boost::shared_ptr< DefaultProbabilityTermStructure > *arg1 = (boost::shared_ptr< DefaultProbabilityTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DefaultProbabilityTermStructure_disableExtrapolation(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DefaultProbabilityTermStructure_disableExtrapolation" "', argument " "1"" of type '" "boost::shared_ptr< DefaultProbabilityTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< DefaultProbabilityTermStructure > * >(argp1);
    {
      try {
        (*arg1)->disableExtrapolation();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_DefaultProbabilityTermStructure_allowsExtrapolation) {
  {
    boost::shared_ptr< DefaultProbabilityTermStructure > *arg1 = (boost::shared_ptr< DefaultProbabilityTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DefaultProbabilityTermStructure_allowsExtrapolation(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DefaultProbabilityTermStructure_allowsExtrapolation" "', argument " "1"" of type '" "boost::shared_ptr< DefaultProbabilityTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< DefaultProbabilityTermStructure > * >(argp1);
    {
      try {
        result = (bool)(*arg1)->allowsExtrapolation();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DefaultProbabilityTermStructureHandle__SWIG_0) {
  {
    boost::shared_ptr< DefaultProbabilityTermStructure > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Handle< DefaultProbabilityTermStructure > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_DefaultProbabilityTermStructureHandle(boost::shared_ptr< DefaultProbabilityTermStructure > const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DefaultProbabilityTermStructureHandle" "', argument " "1"" of type '" "boost::shared_ptr< DefaultProbabilityTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DefaultProbabilityTermStructureHandle" "', argument " "1"" of type '" "boost::shared_ptr< DefaultProbabilityTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< DefaultProbabilityTermStructure > * >(argp1);
    {
      try {
        result = (Handle< DefaultProbabilityTermStructure > *)new Handle< DefaultProbabilityTermStructure >((boost::shared_ptr< DefaultProbabilityTermStructure > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_HandleT_DefaultProbabilityTermStructure_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DefaultProbabilityTermStructureHandle__SWIG_1) {
  {
    int argvi = 0;
    Handle< DefaultProbabilityTermStructure > *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_DefaultProbabilityTermStructureHandle();");
    }
    {
      try {
        result = (Handle< DefaultProbabilityTermStructure > *)new Handle< DefaultProbabilityTermStructure >();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_HandleT_DefaultProbabilityTermStructure_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_DefaultProbabilityTermStructureHandle) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DefaultProbabilityTermStructureHandle__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DefaultProbabilityTermStructureHandle__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_DefaultProbabilityTermStructureHandle'");
  XSRETURN(0);
}


XS(_wrap_DefaultProbabilityTermStructureHandle___deref__) {
  {
    Handle< DefaultProbabilityTermStructure > *arg1 = (Handle< DefaultProbabilityTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    boost::shared_ptr< DefaultProbabilityTermStructure > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DefaultProbabilityTermStructureHandle___deref__(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_DefaultProbabilityTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DefaultProbabilityTermStructureHandle___deref__" "', argument " "1"" of type '" "Handle< DefaultProbabilityTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< DefaultProbabilityTermStructure > * >(argp1);
    {
      try {
        result = (arg1)->operator ->();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new boost::shared_ptr< DefaultProbabilityTermStructure >(static_cast< const boost::shared_ptr< DefaultProbabilityTermStructure >& >(result))), SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityTermStructure_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_DefaultProbabilityTermStructureHandle_empty) {
  {
    Handle< DefaultProbabilityTermStructure > *arg1 = (Handle< DefaultProbabilityTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DefaultProbabilityTermStructureHandle_empty(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_DefaultProbabilityTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DefaultProbabilityTermStructureHandle_empty" "', argument " "1"" of type '" "Handle< DefaultProbabilityTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< DefaultProbabilityTermStructure > * >(argp1);
    {
      try {
        result = (bool)(arg1)->empty();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_DefaultProbabilityTermStructureHandle_asObservable) {
  {
    Handle< DefaultProbabilityTermStructure > *arg1 = (Handle< DefaultProbabilityTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    boost::shared_ptr< Observable > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DefaultProbabilityTermStructureHandle_asObservable(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_DefaultProbabilityTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DefaultProbabilityTermStructureHandle_asObservable" "', argument " "1"" of type '" "Handle< DefaultProbabilityTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< DefaultProbabilityTermStructure > * >(argp1);
    {
      try {
        result = Handle_Sl_DefaultProbabilityTermStructure_Sg__asObservable(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new boost::shared_ptr< Observable >(static_cast< const boost::shared_ptr< Observable >& >(result))), SWIGTYPE_p_boost__shared_ptrT_Observable_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_DefaultProbabilityTermStructureHandle) {
  {
    Handle< DefaultProbabilityTermStructure > *arg1 = (Handle< DefaultProbabilityTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_DefaultProbabilityTermStructureHandle(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_DefaultProbabilityTermStructure_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DefaultProbabilityTermStructureHandle" "', argument " "1"" of type '" "Handle< DefaultProbabilityTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< DefaultProbabilityTermStructure > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_DefaultProbabilityTermStructureHandle_dayCounter) {
  {
    Handle< DefaultProbabilityTermStructure > *arg1 = (Handle< DefaultProbabilityTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    SwigValueWrapper< DayCounter > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DefaultProbabilityTermStructureHandle_dayCounter(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_DefaultProbabilityTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DefaultProbabilityTermStructureHandle_dayCounter" "', argument " "1"" of type '" "Handle< DefaultProbabilityTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< DefaultProbabilityTermStructure > * >(argp1);
    {
      try {
        result = (*arg1)->dayCounter();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new DayCounter(static_cast< const DayCounter& >(result))), SWIGTYPE_p_DayCounter, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_DefaultProbabilityTermStructureHandle_calendar) {
  {
    Handle< DefaultProbabilityTermStructure > *arg1 = (Handle< DefaultProbabilityTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    SwigValueWrapper< Calendar > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DefaultProbabilityTermStructureHandle_calendar(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_DefaultProbabilityTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DefaultProbabilityTermStructureHandle_calendar" "', argument " "1"" of type '" "Handle< DefaultProbabilityTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< DefaultProbabilityTermStructure > * >(argp1);
    {
      try {
        result = (*arg1)->calendar();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Calendar(static_cast< const Calendar& >(result))), SWIGTYPE_p_Calendar, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_DefaultProbabilityTermStructureHandle_referenceDate) {
  {
    Handle< DefaultProbabilityTermStructure > *arg1 = (Handle< DefaultProbabilityTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DefaultProbabilityTermStructureHandle_referenceDate(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_DefaultProbabilityTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DefaultProbabilityTermStructureHandle_referenceDate" "', argument " "1"" of type '" "Handle< DefaultProbabilityTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< DefaultProbabilityTermStructure > * >(argp1);
    {
      try {
        result = (*arg1)->referenceDate();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_DefaultProbabilityTermStructureHandle_maxDate) {
  {
    Handle< DefaultProbabilityTermStructure > *arg1 = (Handle< DefaultProbabilityTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DefaultProbabilityTermStructureHandle_maxDate(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_DefaultProbabilityTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DefaultProbabilityTermStructureHandle_maxDate" "', argument " "1"" of type '" "Handle< DefaultProbabilityTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< DefaultProbabilityTermStructure > * >(argp1);
    {
      try {
        result = (*arg1)->maxDate();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_DefaultProbabilityTermStructureHandle_maxTime) {
  {
    Handle< DefaultProbabilityTermStructure > *arg1 = (Handle< DefaultProbabilityTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Time result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DefaultProbabilityTermStructureHandle_maxTime(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_DefaultProbabilityTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DefaultProbabilityTermStructureHandle_maxTime" "', argument " "1"" of type '" "Handle< DefaultProbabilityTermStructure > const *""'"); 
    }
    arg1 = reinterpret_cast< Handle< DefaultProbabilityTermStructure > * >(argp1);
    {
      try {
        result = (Time)(*arg1)->maxTime();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_DefaultProbabilityTermStructureHandle_defaultProbability__SWIG_0) {
  {
    Handle< DefaultProbabilityTermStructure > *arg1 = (Handle< DefaultProbabilityTermStructure > *) 0 ;
    Date *arg2 = 0 ;
    bool arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Probability result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: DefaultProbabilityTermStructureHandle_defaultProbability(self,Date const &,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_DefaultProbabilityTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DefaultProbabilityTermStructureHandle_defaultProbability" "', argument " "1"" of type '" "Handle< DefaultProbabilityTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< DefaultProbabilityTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DefaultProbabilityTermStructureHandle_defaultProbability" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DefaultProbabilityTermStructureHandle_defaultProbability" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DefaultProbabilityTermStructureHandle_defaultProbability" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (Probability)(*arg1)->defaultProbability((Date const &)*arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_DefaultProbabilityTermStructureHandle_defaultProbability__SWIG_1) {
  {
    Handle< DefaultProbabilityTermStructure > *arg1 = (Handle< DefaultProbabilityTermStructure > *) 0 ;
    Date *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    Probability result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: DefaultProbabilityTermStructureHandle_defaultProbability(self,Date const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_DefaultProbabilityTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DefaultProbabilityTermStructureHandle_defaultProbability" "', argument " "1"" of type '" "Handle< DefaultProbabilityTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< DefaultProbabilityTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DefaultProbabilityTermStructureHandle_defaultProbability" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DefaultProbabilityTermStructureHandle_defaultProbability" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    {
      try {
        result = (Probability)(*arg1)->defaultProbability((Date const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_DefaultProbabilityTermStructureHandle_defaultProbability__SWIG_2) {
  {
    Handle< DefaultProbabilityTermStructure > *arg1 = (Handle< DefaultProbabilityTermStructure > *) 0 ;
    Time arg2 ;
    bool arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Probability result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: DefaultProbabilityTermStructureHandle_defaultProbability(self,Time,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_DefaultProbabilityTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DefaultProbabilityTermStructureHandle_defaultProbability" "', argument " "1"" of type '" "Handle< DefaultProbabilityTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< DefaultProbabilityTermStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DefaultProbabilityTermStructureHandle_defaultProbability" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DefaultProbabilityTermStructureHandle_defaultProbability" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (Probability)(*arg1)->defaultProbability(arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_DefaultProbabilityTermStructureHandle_defaultProbability__SWIG_3) {
  {
    Handle< DefaultProbabilityTermStructure > *arg1 = (Handle< DefaultProbabilityTermStructure > *) 0 ;
    Time arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Probability result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: DefaultProbabilityTermStructureHandle_defaultProbability(self,Time);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_DefaultProbabilityTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DefaultProbabilityTermStructureHandle_defaultProbability" "', argument " "1"" of type '" "Handle< DefaultProbabilityTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< DefaultProbabilityTermStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DefaultProbabilityTermStructureHandle_defaultProbability" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    {
      try {
        result = (Probability)(*arg1)->defaultProbability(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_DefaultProbabilityTermStructureHandle_defaultProbability__SWIG_4) {
  {
    Handle< DefaultProbabilityTermStructure > *arg1 = (Handle< DefaultProbabilityTermStructure > *) 0 ;
    Date *arg2 = 0 ;
    Date *arg3 = 0 ;
    bool arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Probability result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: DefaultProbabilityTermStructureHandle_defaultProbability(self,Date const &,Date const &,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_DefaultProbabilityTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DefaultProbabilityTermStructureHandle_defaultProbability" "', argument " "1"" of type '" "Handle< DefaultProbabilityTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< DefaultProbabilityTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DefaultProbabilityTermStructureHandle_defaultProbability" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DefaultProbabilityTermStructureHandle_defaultProbability" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "DefaultProbabilityTermStructureHandle_defaultProbability" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DefaultProbabilityTermStructureHandle_defaultProbability" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "DefaultProbabilityTermStructureHandle_defaultProbability" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    {
      try {
        result = (Probability)(*arg1)->defaultProbability((Date const &)*arg2,(Date const &)*arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_DefaultProbabilityTermStructureHandle_defaultProbability__SWIG_5) {
  {
    Handle< DefaultProbabilityTermStructure > *arg1 = (Handle< DefaultProbabilityTermStructure > *) 0 ;
    Date *arg2 = 0 ;
    Date *arg3 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    Probability result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: DefaultProbabilityTermStructureHandle_defaultProbability(self,Date const &,Date const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_DefaultProbabilityTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DefaultProbabilityTermStructureHandle_defaultProbability" "', argument " "1"" of type '" "Handle< DefaultProbabilityTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< DefaultProbabilityTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DefaultProbabilityTermStructureHandle_defaultProbability" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DefaultProbabilityTermStructureHandle_defaultProbability" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "DefaultProbabilityTermStructureHandle_defaultProbability" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DefaultProbabilityTermStructureHandle_defaultProbability" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    {
      try {
        result = (Probability)(*arg1)->defaultProbability((Date const &)*arg2,(Date const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_DefaultProbabilityTermStructureHandle_defaultProbability__SWIG_6) {
  {
    Handle< DefaultProbabilityTermStructure > *arg1 = (Handle< DefaultProbabilityTermStructure > *) 0 ;
    Time arg2 ;
    Time arg3 ;
    bool arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Probability result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: DefaultProbabilityTermStructureHandle_defaultProbability(self,Time,Time,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_DefaultProbabilityTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DefaultProbabilityTermStructureHandle_defaultProbability" "', argument " "1"" of type '" "Handle< DefaultProbabilityTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< DefaultProbabilityTermStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DefaultProbabilityTermStructureHandle_defaultProbability" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DefaultProbabilityTermStructureHandle_defaultProbability" "', argument " "3"" of type '" "Time""'");
    } 
    arg3 = static_cast< Time >(val3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "DefaultProbabilityTermStructureHandle_defaultProbability" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    {
      try {
        result = (Probability)(*arg1)->defaultProbability(arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_DefaultProbabilityTermStructureHandle_defaultProbability__SWIG_7) {
  {
    Handle< DefaultProbabilityTermStructure > *arg1 = (Handle< DefaultProbabilityTermStructure > *) 0 ;
    Time arg2 ;
    Time arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Probability result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: DefaultProbabilityTermStructureHandle_defaultProbability(self,Time,Time);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_DefaultProbabilityTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DefaultProbabilityTermStructureHandle_defaultProbability" "', argument " "1"" of type '" "Handle< DefaultProbabilityTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< DefaultProbabilityTermStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DefaultProbabilityTermStructureHandle_defaultProbability" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DefaultProbabilityTermStructureHandle_defaultProbability" "', argument " "3"" of type '" "Time""'");
    } 
    arg3 = static_cast< Time >(val3);
    {
      try {
        result = (Probability)(*arg1)->defaultProbability(arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_DefaultProbabilityTermStructureHandle_defaultProbability) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_DefaultProbabilityTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_DefaultProbabilityTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_DefaultProbabilityTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_DefaultProbabilityTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_DefaultProbabilityTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_DefaultProbabilityTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_DefaultProbabilityTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 7;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_7:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_DefaultProbabilityTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 8;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_8:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_DefaultProbabilityTermStructureHandle_defaultProbability__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_DefaultProbabilityTermStructureHandle_defaultProbability__SWIG_3); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_DefaultProbabilityTermStructureHandle_defaultProbability__SWIG_5); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_DefaultProbabilityTermStructureHandle_defaultProbability__SWIG_0); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_DefaultProbabilityTermStructureHandle_defaultProbability__SWIG_2); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_DefaultProbabilityTermStructureHandle_defaultProbability__SWIG_7); return;
    case 7:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_DefaultProbabilityTermStructureHandle_defaultProbability__SWIG_4); return;
    case 8:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_DefaultProbabilityTermStructureHandle_defaultProbability__SWIG_6); return;
    }
  }
  
  croak("No matching function for overloaded 'DefaultProbabilityTermStructureHandle_defaultProbability'");
  XSRETURN(0);
}


XS(_wrap_DefaultProbabilityTermStructureHandle_survivalProbability__SWIG_0) {
  {
    Handle< DefaultProbabilityTermStructure > *arg1 = (Handle< DefaultProbabilityTermStructure > *) 0 ;
    Date *arg2 = 0 ;
    bool arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Probability result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: DefaultProbabilityTermStructureHandle_survivalProbability(self,Date const &,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_DefaultProbabilityTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DefaultProbabilityTermStructureHandle_survivalProbability" "', argument " "1"" of type '" "Handle< DefaultProbabilityTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< DefaultProbabilityTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DefaultProbabilityTermStructureHandle_survivalProbability" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DefaultProbabilityTermStructureHandle_survivalProbability" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DefaultProbabilityTermStructureHandle_survivalProbability" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (Probability)(*arg1)->survivalProbability((Date const &)*arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_DefaultProbabilityTermStructureHandle_survivalProbability__SWIG_1) {
  {
    Handle< DefaultProbabilityTermStructure > *arg1 = (Handle< DefaultProbabilityTermStructure > *) 0 ;
    Date *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    Probability result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: DefaultProbabilityTermStructureHandle_survivalProbability(self,Date const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_DefaultProbabilityTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DefaultProbabilityTermStructureHandle_survivalProbability" "', argument " "1"" of type '" "Handle< DefaultProbabilityTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< DefaultProbabilityTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DefaultProbabilityTermStructureHandle_survivalProbability" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DefaultProbabilityTermStructureHandle_survivalProbability" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    {
      try {
        result = (Probability)(*arg1)->survivalProbability((Date const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_DefaultProbabilityTermStructureHandle_survivalProbability__SWIG_2) {
  {
    Handle< DefaultProbabilityTermStructure > *arg1 = (Handle< DefaultProbabilityTermStructure > *) 0 ;
    Time arg2 ;
    bool arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Probability result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: DefaultProbabilityTermStructureHandle_survivalProbability(self,Time,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_DefaultProbabilityTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DefaultProbabilityTermStructureHandle_survivalProbability" "', argument " "1"" of type '" "Handle< DefaultProbabilityTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< DefaultProbabilityTermStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DefaultProbabilityTermStructureHandle_survivalProbability" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DefaultProbabilityTermStructureHandle_survivalProbability" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (Probability)(*arg1)->survivalProbability(arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_DefaultProbabilityTermStructureHandle_survivalProbability__SWIG_3) {
  {
    Handle< DefaultProbabilityTermStructure > *arg1 = (Handle< DefaultProbabilityTermStructure > *) 0 ;
    Time arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Probability result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: DefaultProbabilityTermStructureHandle_survivalProbability(self,Time);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_DefaultProbabilityTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DefaultProbabilityTermStructureHandle_survivalProbability" "', argument " "1"" of type '" "Handle< DefaultProbabilityTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< DefaultProbabilityTermStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DefaultProbabilityTermStructureHandle_survivalProbability" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    {
      try {
        result = (Probability)(*arg1)->survivalProbability(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_DefaultProbabilityTermStructureHandle_survivalProbability) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_DefaultProbabilityTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_DefaultProbabilityTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_DefaultProbabilityTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_DefaultProbabilityTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_DefaultProbabilityTermStructureHandle_survivalProbability__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_DefaultProbabilityTermStructureHandle_survivalProbability__SWIG_3); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_DefaultProbabilityTermStructureHandle_survivalProbability__SWIG_0); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_DefaultProbabilityTermStructureHandle_survivalProbability__SWIG_2); return;
    }
  }
  
  croak("No matching function for overloaded 'DefaultProbabilityTermStructureHandle_survivalProbability'");
  XSRETURN(0);
}


XS(_wrap_DefaultProbabilityTermStructureHandle_defaultDensity__SWIG_0) {
  {
    Handle< DefaultProbabilityTermStructure > *arg1 = (Handle< DefaultProbabilityTermStructure > *) 0 ;
    Date *arg2 = 0 ;
    bool arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: DefaultProbabilityTermStructureHandle_defaultDensity(self,Date const &,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_DefaultProbabilityTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DefaultProbabilityTermStructureHandle_defaultDensity" "', argument " "1"" of type '" "Handle< DefaultProbabilityTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< DefaultProbabilityTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DefaultProbabilityTermStructureHandle_defaultDensity" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DefaultProbabilityTermStructureHandle_defaultDensity" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DefaultProbabilityTermStructureHandle_defaultDensity" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (Real)(*arg1)->defaultDensity((Date const &)*arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_DefaultProbabilityTermStructureHandle_defaultDensity__SWIG_1) {
  {
    Handle< DefaultProbabilityTermStructure > *arg1 = (Handle< DefaultProbabilityTermStructure > *) 0 ;
    Date *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: DefaultProbabilityTermStructureHandle_defaultDensity(self,Date const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_DefaultProbabilityTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DefaultProbabilityTermStructureHandle_defaultDensity" "', argument " "1"" of type '" "Handle< DefaultProbabilityTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< DefaultProbabilityTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DefaultProbabilityTermStructureHandle_defaultDensity" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DefaultProbabilityTermStructureHandle_defaultDensity" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    {
      try {
        result = (Real)(*arg1)->defaultDensity((Date const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_DefaultProbabilityTermStructureHandle_defaultDensity__SWIG_2) {
  {
    Handle< DefaultProbabilityTermStructure > *arg1 = (Handle< DefaultProbabilityTermStructure > *) 0 ;
    Time arg2 ;
    bool arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: DefaultProbabilityTermStructureHandle_defaultDensity(self,Time,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_DefaultProbabilityTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DefaultProbabilityTermStructureHandle_defaultDensity" "', argument " "1"" of type '" "Handle< DefaultProbabilityTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< DefaultProbabilityTermStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DefaultProbabilityTermStructureHandle_defaultDensity" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DefaultProbabilityTermStructureHandle_defaultDensity" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (Real)(*arg1)->defaultDensity(arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_DefaultProbabilityTermStructureHandle_defaultDensity__SWIG_3) {
  {
    Handle< DefaultProbabilityTermStructure > *arg1 = (Handle< DefaultProbabilityTermStructure > *) 0 ;
    Time arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: DefaultProbabilityTermStructureHandle_defaultDensity(self,Time);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_DefaultProbabilityTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DefaultProbabilityTermStructureHandle_defaultDensity" "', argument " "1"" of type '" "Handle< DefaultProbabilityTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< DefaultProbabilityTermStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DefaultProbabilityTermStructureHandle_defaultDensity" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    {
      try {
        result = (Real)(*arg1)->defaultDensity(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_DefaultProbabilityTermStructureHandle_defaultDensity) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_DefaultProbabilityTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_DefaultProbabilityTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_DefaultProbabilityTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_DefaultProbabilityTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_DefaultProbabilityTermStructureHandle_defaultDensity__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_DefaultProbabilityTermStructureHandle_defaultDensity__SWIG_3); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_DefaultProbabilityTermStructureHandle_defaultDensity__SWIG_0); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_DefaultProbabilityTermStructureHandle_defaultDensity__SWIG_2); return;
    }
  }
  
  croak("No matching function for overloaded 'DefaultProbabilityTermStructureHandle_defaultDensity'");
  XSRETURN(0);
}


XS(_wrap_DefaultProbabilityTermStructureHandle_hazardRate__SWIG_0) {
  {
    Handle< DefaultProbabilityTermStructure > *arg1 = (Handle< DefaultProbabilityTermStructure > *) 0 ;
    Date *arg2 = 0 ;
    bool arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: DefaultProbabilityTermStructureHandle_hazardRate(self,Date const &,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_DefaultProbabilityTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DefaultProbabilityTermStructureHandle_hazardRate" "', argument " "1"" of type '" "Handle< DefaultProbabilityTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< DefaultProbabilityTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DefaultProbabilityTermStructureHandle_hazardRate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DefaultProbabilityTermStructureHandle_hazardRate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DefaultProbabilityTermStructureHandle_hazardRate" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (Real)(*arg1)->hazardRate((Date const &)*arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_DefaultProbabilityTermStructureHandle_hazardRate__SWIG_1) {
  {
    Handle< DefaultProbabilityTermStructure > *arg1 = (Handle< DefaultProbabilityTermStructure > *) 0 ;
    Date *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: DefaultProbabilityTermStructureHandle_hazardRate(self,Date const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_DefaultProbabilityTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DefaultProbabilityTermStructureHandle_hazardRate" "', argument " "1"" of type '" "Handle< DefaultProbabilityTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< DefaultProbabilityTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DefaultProbabilityTermStructureHandle_hazardRate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DefaultProbabilityTermStructureHandle_hazardRate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    {
      try {
        result = (Real)(*arg1)->hazardRate((Date const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_DefaultProbabilityTermStructureHandle_hazardRate__SWIG_2) {
  {
    Handle< DefaultProbabilityTermStructure > *arg1 = (Handle< DefaultProbabilityTermStructure > *) 0 ;
    Time arg2 ;
    bool arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: DefaultProbabilityTermStructureHandle_hazardRate(self,Time,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_DefaultProbabilityTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DefaultProbabilityTermStructureHandle_hazardRate" "', argument " "1"" of type '" "Handle< DefaultProbabilityTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< DefaultProbabilityTermStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DefaultProbabilityTermStructureHandle_hazardRate" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DefaultProbabilityTermStructureHandle_hazardRate" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (Real)(*arg1)->hazardRate(arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_DefaultProbabilityTermStructureHandle_hazardRate__SWIG_3) {
  {
    Handle< DefaultProbabilityTermStructure > *arg1 = (Handle< DefaultProbabilityTermStructure > *) 0 ;
    Time arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: DefaultProbabilityTermStructureHandle_hazardRate(self,Time);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_DefaultProbabilityTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DefaultProbabilityTermStructureHandle_hazardRate" "', argument " "1"" of type '" "Handle< DefaultProbabilityTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< DefaultProbabilityTermStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DefaultProbabilityTermStructureHandle_hazardRate" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    {
      try {
        result = (Real)(*arg1)->hazardRate(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_DefaultProbabilityTermStructureHandle_hazardRate) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_DefaultProbabilityTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_DefaultProbabilityTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_DefaultProbabilityTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_DefaultProbabilityTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_DefaultProbabilityTermStructureHandle_hazardRate__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_DefaultProbabilityTermStructureHandle_hazardRate__SWIG_3); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_DefaultProbabilityTermStructureHandle_hazardRate__SWIG_0); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_DefaultProbabilityTermStructureHandle_hazardRate__SWIG_2); return;
    }
  }
  
  croak("No matching function for overloaded 'DefaultProbabilityTermStructureHandle_hazardRate'");
  XSRETURN(0);
}


XS(_wrap_DefaultProbabilityTermStructureHandle_enableExtrapolation) {
  {
    Handle< DefaultProbabilityTermStructure > *arg1 = (Handle< DefaultProbabilityTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DefaultProbabilityTermStructureHandle_enableExtrapolation(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_DefaultProbabilityTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DefaultProbabilityTermStructureHandle_enableExtrapolation" "', argument " "1"" of type '" "Handle< DefaultProbabilityTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< DefaultProbabilityTermStructure > * >(argp1);
    {
      try {
        (*arg1)->enableExtrapolation();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_DefaultProbabilityTermStructureHandle_disableExtrapolation) {
  {
    Handle< DefaultProbabilityTermStructure > *arg1 = (Handle< DefaultProbabilityTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DefaultProbabilityTermStructureHandle_disableExtrapolation(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_DefaultProbabilityTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DefaultProbabilityTermStructureHandle_disableExtrapolation" "', argument " "1"" of type '" "Handle< DefaultProbabilityTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< DefaultProbabilityTermStructure > * >(argp1);
    {
      try {
        (*arg1)->disableExtrapolation();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_DefaultProbabilityTermStructureHandle_allowsExtrapolation) {
  {
    Handle< DefaultProbabilityTermStructure > *arg1 = (Handle< DefaultProbabilityTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DefaultProbabilityTermStructureHandle_allowsExtrapolation(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_DefaultProbabilityTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DefaultProbabilityTermStructureHandle_allowsExtrapolation" "', argument " "1"" of type '" "Handle< DefaultProbabilityTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< DefaultProbabilityTermStructure > * >(argp1);
    {
      try {
        result = (bool)(*arg1)->allowsExtrapolation();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_RelinkableDefaultProbabilityTermStructureHandle__SWIG_0) {
  {
    boost::shared_ptr< DefaultProbabilityTermStructure > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    RelinkableHandle< DefaultProbabilityTermStructure > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_RelinkableDefaultProbabilityTermStructureHandle(boost::shared_ptr< DefaultProbabilityTermStructure > const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_RelinkableDefaultProbabilityTermStructureHandle" "', argument " "1"" of type '" "boost::shared_ptr< DefaultProbabilityTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_RelinkableDefaultProbabilityTermStructureHandle" "', argument " "1"" of type '" "boost::shared_ptr< DefaultProbabilityTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< DefaultProbabilityTermStructure > * >(argp1);
    {
      try {
        result = (RelinkableHandle< DefaultProbabilityTermStructure > *)new RelinkableHandle< DefaultProbabilityTermStructure >((boost::shared_ptr< DefaultProbabilityTermStructure > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_RelinkableHandleT_DefaultProbabilityTermStructure_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_RelinkableDefaultProbabilityTermStructureHandle__SWIG_1) {
  {
    int argvi = 0;
    RelinkableHandle< DefaultProbabilityTermStructure > *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_RelinkableDefaultProbabilityTermStructureHandle();");
    }
    {
      try {
        result = (RelinkableHandle< DefaultProbabilityTermStructure > *)new RelinkableHandle< DefaultProbabilityTermStructure >();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_RelinkableHandleT_DefaultProbabilityTermStructure_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_RelinkableDefaultProbabilityTermStructureHandle) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_RelinkableDefaultProbabilityTermStructureHandle__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_RelinkableDefaultProbabilityTermStructureHandle__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_RelinkableDefaultProbabilityTermStructureHandle'");
  XSRETURN(0);
}


XS(_wrap_RelinkableDefaultProbabilityTermStructureHandle_linkTo) {
  {
    RelinkableHandle< DefaultProbabilityTermStructure > *arg1 = (RelinkableHandle< DefaultProbabilityTermStructure > *) 0 ;
    boost::shared_ptr< DefaultProbabilityTermStructure > *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: RelinkableDefaultProbabilityTermStructureHandle_linkTo(self,boost::shared_ptr< DefaultProbabilityTermStructure > const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_RelinkableHandleT_DefaultProbabilityTermStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RelinkableDefaultProbabilityTermStructureHandle_linkTo" "', argument " "1"" of type '" "RelinkableHandle< DefaultProbabilityTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< RelinkableHandle< DefaultProbabilityTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "RelinkableDefaultProbabilityTermStructureHandle_linkTo" "', argument " "2"" of type '" "boost::shared_ptr< DefaultProbabilityTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "RelinkableDefaultProbabilityTermStructureHandle_linkTo" "', argument " "2"" of type '" "boost::shared_ptr< DefaultProbabilityTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< boost::shared_ptr< DefaultProbabilityTermStructure > * >(argp2);
    {
      try {
        (arg1)->linkTo((boost::shared_ptr< DefaultProbabilityTermStructure > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_RelinkableDefaultProbabilityTermStructureHandle) {
  {
    RelinkableHandle< DefaultProbabilityTermStructure > *arg1 = (RelinkableHandle< DefaultProbabilityTermStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_RelinkableDefaultProbabilityTermStructureHandle(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_RelinkableHandleT_DefaultProbabilityTermStructure_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_RelinkableDefaultProbabilityTermStructureHandle" "', argument " "1"" of type '" "RelinkableHandle< DefaultProbabilityTermStructure > *""'"); 
    }
    arg1 = reinterpret_cast< RelinkableHandle< DefaultProbabilityTermStructure > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FlatHazardRate__SWIG_0) {
  {
    Integer arg1 ;
    Calendar *arg2 = 0 ;
    Handle< Quote > *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int argvi = 0;
    FlatHazardRatePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_FlatHazardRate(settlementDays,calendar,hazardRate,dayCounter);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FlatHazardRate" "', argument " "1"" of type '" "Integer""'");
    } 
    arg1 = static_cast< Integer >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FlatHazardRate" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FlatHazardRate" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FlatHazardRate" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FlatHazardRate" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< Quote > * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FlatHazardRate" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FlatHazardRate" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    {
      try {
        result = (FlatHazardRatePtr *)new_FlatHazardRatePtr__SWIG_0(arg1,(Calendar const &)*arg2,(Handle< Quote > const &)*arg3,(DayCounter const &)*arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FlatHazardRatePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FlatHazardRate__SWIG_1) {
  {
    Date *arg1 = 0 ;
    Handle< Quote > *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    FlatHazardRatePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_FlatHazardRate(todaysDate,hazardRate,dayCounter);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FlatHazardRate" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FlatHazardRate" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FlatHazardRate" "', argument " "2"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FlatHazardRate" "', argument " "2"" of type '" "Handle< Quote > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< Quote > * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FlatHazardRate" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FlatHazardRate" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    {
      try {
        result = (FlatHazardRatePtr *)new_FlatHazardRatePtr__SWIG_1((Date const &)*arg1,(Handle< Quote > const &)*arg2,(DayCounter const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FlatHazardRatePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FlatHazardRate) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FlatHazardRate__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FlatHazardRate__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_FlatHazardRate'");
  XSRETURN(0);
}


XS(_wrap_delete_FlatHazardRate) {
  {
    FlatHazardRatePtr *arg1 = (FlatHazardRatePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_FlatHazardRate(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_FlatHazardRatePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FlatHazardRate" "', argument " "1"" of type '" "FlatHazardRatePtr *""'"); 
    }
    arg1 = reinterpret_cast< FlatHazardRatePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_HazardRateCurve__SWIG_0) {
  {
    std::vector< Date > *arg1 = 0 ;
    std::vector< Real > *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    Calendar *arg4 = 0 ;
    BackwardFlat *arg5 = 0 ;
    std::vector< Date > temp1 ;
    std::vector< Date > *v1 ;
    std::vector< double > temp2 ;
    std::vector< double > *v2 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int argvi = 0;
    HazardRateCurvePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_HazardRateCurve(dates,hazardRates,dayCounter,calendar,i);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_HazardRateCurve. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_HazardRateCurve. "
              "Expected an array of " "Date");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_HazardRateCurve. "
          "Expected an array of " "Date");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_HazardRateCurve. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp2.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_HazardRateCurve. "
              "Expected an array of ""double");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_HazardRateCurve. "
          "Expected an array of ""double");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_HazardRateCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_HazardRateCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_HazardRateCurve" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_HazardRateCurve" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    arg4 = reinterpret_cast< Calendar * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_BackwardFlat,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_HazardRateCurve" "', argument " "5"" of type '" "BackwardFlat const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_HazardRateCurve" "', argument " "5"" of type '" "BackwardFlat const &""'"); 
    }
    arg5 = reinterpret_cast< BackwardFlat * >(argp5);
    {
      try {
        result = (HazardRateCurvePtr *)new_HazardRateCurvePtr__SWIG_0((std::vector< Date > const &)*arg1,(std::vector< double > const &)*arg2,(DayCounter const &)*arg3,(Calendar const &)*arg4,(BackwardFlat const &)*arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_HazardRateCurvePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_HazardRateCurve__SWIG_1) {
  {
    std::vector< Date > *arg1 = 0 ;
    std::vector< Real > *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    Calendar *arg4 = 0 ;
    std::vector< Date > temp1 ;
    std::vector< Date > *v1 ;
    std::vector< double > temp2 ;
    std::vector< double > *v2 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int argvi = 0;
    HazardRateCurvePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_HazardRateCurve(dates,hazardRates,dayCounter,calendar);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_HazardRateCurve. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_HazardRateCurve. "
              "Expected an array of " "Date");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_HazardRateCurve. "
          "Expected an array of " "Date");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_HazardRateCurve. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp2.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_HazardRateCurve. "
              "Expected an array of ""double");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_HazardRateCurve. "
          "Expected an array of ""double");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_HazardRateCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_HazardRateCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_HazardRateCurve" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_HazardRateCurve" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    arg4 = reinterpret_cast< Calendar * >(argp4);
    {
      try {
        result = (HazardRateCurvePtr *)new_HazardRateCurvePtr__SWIG_0((std::vector< Date > const &)*arg1,(std::vector< double > const &)*arg2,(DayCounter const &)*arg3,(Calendar const &)*arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_HazardRateCurvePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_HazardRateCurve__SWIG_2) {
  {
    std::vector< Date > *arg1 = 0 ;
    std::vector< Real > *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    std::vector< Date > temp1 ;
    std::vector< Date > *v1 ;
    std::vector< double > temp2 ;
    std::vector< double > *v2 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    HazardRateCurvePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_HazardRateCurve(dates,hazardRates,dayCounter);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_HazardRateCurve. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_HazardRateCurve. "
              "Expected an array of " "Date");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_HazardRateCurve. "
          "Expected an array of " "Date");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_HazardRateCurve. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp2.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_HazardRateCurve. "
              "Expected an array of ""double");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_HazardRateCurve. "
          "Expected an array of ""double");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_HazardRateCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_HazardRateCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    {
      try {
        result = (HazardRateCurvePtr *)new_HazardRateCurvePtr__SWIG_0((std::vector< Date > const &)*arg1,(std::vector< double > const &)*arg2,(DayCounter const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_HazardRateCurvePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_HazardRateCurve) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_BackwardFlat, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_HazardRateCurve__SWIG_2); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_HazardRateCurve__SWIG_1); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_HazardRateCurve__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_HazardRateCurve'");
  XSRETURN(0);
}


XS(_wrap_HazardRateCurve_dates) {
  {
    HazardRateCurvePtr *arg1 = (HazardRateCurvePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Date > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: HazardRateCurve_dates(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HazardRateCurvePtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HazardRateCurve_dates" "', argument " "1"" of type '" "HazardRateCurvePtr *""'"); 
    }
    arg1 = reinterpret_cast< HazardRateCurvePtr * >(argp1);
    {
      try {
        result = (std::vector< Date > *) &HazardRateCurvePtr_dates(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_Date_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_HazardRateCurve_hazardRates) {
  {
    HazardRateCurvePtr *arg1 = (HazardRateCurvePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Real > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: HazardRateCurve_hazardRates(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HazardRateCurvePtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HazardRateCurve_hazardRates" "', argument " "1"" of type '" "HazardRateCurvePtr *""'"); 
    }
    arg1 = reinterpret_cast< HazardRateCurvePtr * >(argp1);
    {
      try {
        result = (std::vector< Real > *) &HazardRateCurvePtr_hazardRates(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_HazardRateCurve_nodes) {
  {
    HazardRateCurvePtr *arg1 = (HazardRateCurvePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< std::pair< Date,Real > > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: HazardRateCurve_nodes(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HazardRateCurvePtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HazardRateCurve_nodes" "', argument " "1"" of type '" "HazardRateCurvePtr *""'"); 
    }
    arg1 = reinterpret_cast< HazardRateCurvePtr * >(argp1);
    {
      try {
        result = HazardRateCurvePtr_nodes(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        std::pair< Date,double >* ptr = new std::pair< Date,double >(result[i]);
        svs[i] = sv_newmortal();
        SWIG_MakePtr(svs[i], (void*) ptr, 
          SWIGTYPE_p_std__pairT_Date_double_t, SWIG_SHADOW|0);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_HazardRateCurve) {
  {
    HazardRateCurvePtr *arg1 = (HazardRateCurvePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_HazardRateCurve(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HazardRateCurvePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_HazardRateCurve" "', argument " "1"" of type '" "HazardRateCurvePtr *""'"); 
    }
    arg1 = reinterpret_cast< HazardRateCurvePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DefaultDensityCurve__SWIG_0) {
  {
    std::vector< Date > *arg1 = 0 ;
    std::vector< Real > *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    Calendar *arg4 = 0 ;
    Linear *arg5 = 0 ;
    std::vector< Date > temp1 ;
    std::vector< Date > *v1 ;
    std::vector< double > temp2 ;
    std::vector< double > *v2 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int argvi = 0;
    DefaultDensityCurvePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_DefaultDensityCurve(dates,densities,dayCounter,calendar,i);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_DefaultDensityCurve. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_DefaultDensityCurve. "
              "Expected an array of " "Date");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_DefaultDensityCurve. "
          "Expected an array of " "Date");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_DefaultDensityCurve. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp2.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_DefaultDensityCurve. "
              "Expected an array of ""double");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_DefaultDensityCurve. "
          "Expected an array of ""double");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_DefaultDensityCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DefaultDensityCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_DefaultDensityCurve" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DefaultDensityCurve" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    arg4 = reinterpret_cast< Calendar * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Linear,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_DefaultDensityCurve" "', argument " "5"" of type '" "Linear const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DefaultDensityCurve" "', argument " "5"" of type '" "Linear const &""'"); 
    }
    arg5 = reinterpret_cast< Linear * >(argp5);
    {
      try {
        result = (DefaultDensityCurvePtr *)new_DefaultDensityCurvePtr__SWIG_0((std::vector< Date > const &)*arg1,(std::vector< double > const &)*arg2,(DayCounter const &)*arg3,(Calendar const &)*arg4,(Linear const &)*arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DefaultDensityCurvePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DefaultDensityCurve__SWIG_1) {
  {
    std::vector< Date > *arg1 = 0 ;
    std::vector< Real > *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    Calendar *arg4 = 0 ;
    std::vector< Date > temp1 ;
    std::vector< Date > *v1 ;
    std::vector< double > temp2 ;
    std::vector< double > *v2 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int argvi = 0;
    DefaultDensityCurvePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_DefaultDensityCurve(dates,densities,dayCounter,calendar);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_DefaultDensityCurve. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_DefaultDensityCurve. "
              "Expected an array of " "Date");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_DefaultDensityCurve. "
          "Expected an array of " "Date");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_DefaultDensityCurve. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp2.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_DefaultDensityCurve. "
              "Expected an array of ""double");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_DefaultDensityCurve. "
          "Expected an array of ""double");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_DefaultDensityCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DefaultDensityCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_DefaultDensityCurve" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DefaultDensityCurve" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    arg4 = reinterpret_cast< Calendar * >(argp4);
    {
      try {
        result = (DefaultDensityCurvePtr *)new_DefaultDensityCurvePtr__SWIG_0((std::vector< Date > const &)*arg1,(std::vector< double > const &)*arg2,(DayCounter const &)*arg3,(Calendar const &)*arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DefaultDensityCurvePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DefaultDensityCurve__SWIG_2) {
  {
    std::vector< Date > *arg1 = 0 ;
    std::vector< Real > *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    std::vector< Date > temp1 ;
    std::vector< Date > *v1 ;
    std::vector< double > temp2 ;
    std::vector< double > *v2 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    DefaultDensityCurvePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_DefaultDensityCurve(dates,densities,dayCounter);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_DefaultDensityCurve. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_DefaultDensityCurve. "
              "Expected an array of " "Date");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_DefaultDensityCurve. "
          "Expected an array of " "Date");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_DefaultDensityCurve. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp2.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_DefaultDensityCurve. "
              "Expected an array of ""double");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_DefaultDensityCurve. "
          "Expected an array of ""double");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_DefaultDensityCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DefaultDensityCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    {
      try {
        result = (DefaultDensityCurvePtr *)new_DefaultDensityCurvePtr__SWIG_0((std::vector< Date > const &)*arg1,(std::vector< double > const &)*arg2,(DayCounter const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DefaultDensityCurvePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DefaultDensityCurve) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Linear, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DefaultDensityCurve__SWIG_2); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DefaultDensityCurve__SWIG_1); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DefaultDensityCurve__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_DefaultDensityCurve'");
  XSRETURN(0);
}


XS(_wrap_DefaultDensityCurve_dates) {
  {
    DefaultDensityCurvePtr *arg1 = (DefaultDensityCurvePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Date > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DefaultDensityCurve_dates(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_DefaultDensityCurvePtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DefaultDensityCurve_dates" "', argument " "1"" of type '" "DefaultDensityCurvePtr *""'"); 
    }
    arg1 = reinterpret_cast< DefaultDensityCurvePtr * >(argp1);
    {
      try {
        result = (std::vector< Date > *) &DefaultDensityCurvePtr_dates(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_Date_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_DefaultDensityCurve_defaultDensities) {
  {
    DefaultDensityCurvePtr *arg1 = (DefaultDensityCurvePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Real > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DefaultDensityCurve_defaultDensities(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_DefaultDensityCurvePtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DefaultDensityCurve_defaultDensities" "', argument " "1"" of type '" "DefaultDensityCurvePtr *""'"); 
    }
    arg1 = reinterpret_cast< DefaultDensityCurvePtr * >(argp1);
    {
      try {
        result = (std::vector< Real > *) &DefaultDensityCurvePtr_defaultDensities(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_DefaultDensityCurve_nodes) {
  {
    DefaultDensityCurvePtr *arg1 = (DefaultDensityCurvePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< std::pair< Date,Real > > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DefaultDensityCurve_nodes(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_DefaultDensityCurvePtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DefaultDensityCurve_nodes" "', argument " "1"" of type '" "DefaultDensityCurvePtr *""'"); 
    }
    arg1 = reinterpret_cast< DefaultDensityCurvePtr * >(argp1);
    {
      try {
        result = DefaultDensityCurvePtr_nodes(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        std::pair< Date,double >* ptr = new std::pair< Date,double >(result[i]);
        svs[i] = sv_newmortal();
        SWIG_MakePtr(svs[i], (void*) ptr, 
          SWIGTYPE_p_std__pairT_Date_double_t, SWIG_SHADOW|0);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_DefaultDensityCurve) {
  {
    DefaultDensityCurvePtr *arg1 = (DefaultDensityCurvePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_DefaultDensityCurve(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_DefaultDensityCurvePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DefaultDensityCurve" "', argument " "1"" of type '" "DefaultDensityCurvePtr *""'"); 
    }
    arg1 = reinterpret_cast< DefaultDensityCurvePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_DefaultProbabilityHelper___deref__) {
  {
    boost::shared_ptr< DefaultProbabilityHelper > *arg1 = (boost::shared_ptr< DefaultProbabilityHelper > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    DefaultProbabilityHelper *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DefaultProbabilityHelper___deref__(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityHelper_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DefaultProbabilityHelper___deref__" "', argument " "1"" of type '" "boost::shared_ptr< DefaultProbabilityHelper > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< DefaultProbabilityHelper > * >(argp1);
    {
      try {
        result = (DefaultProbabilityHelper *)(arg1)->operator ->();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DefaultProbabilityHelper, 0 | 0); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_DefaultProbabilityHelper_isNull) {
  {
    boost::shared_ptr< DefaultProbabilityHelper > *arg1 = (boost::shared_ptr< DefaultProbabilityHelper > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DefaultProbabilityHelper_isNull(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityHelper_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DefaultProbabilityHelper_isNull" "', argument " "1"" of type '" "boost::shared_ptr< DefaultProbabilityHelper > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< DefaultProbabilityHelper > * >(argp1);
    {
      try {
        result = (bool)boost_shared_ptr_Sl_DefaultProbabilityHelper_Sg__isNull(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DefaultProbabilityHelper) {
  {
    int argvi = 0;
    boost::shared_ptr< DefaultProbabilityHelper > *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_DefaultProbabilityHelper();");
    }
    {
      try {
        result = (boost::shared_ptr< DefaultProbabilityHelper > *)new boost::shared_ptr< DefaultProbabilityHelper >();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityHelper_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_DefaultProbabilityHelper) {
  {
    boost::shared_ptr< DefaultProbabilityHelper > *arg1 = (boost::shared_ptr< DefaultProbabilityHelper > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_DefaultProbabilityHelper(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityHelper_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DefaultProbabilityHelper" "', argument " "1"" of type '" "boost::shared_ptr< DefaultProbabilityHelper > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< DefaultProbabilityHelper > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DefaultProbabilityHelperVector__SWIG_0) {
  {
    unsigned int arg1 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    std::vector< boost::shared_ptr< DefaultProbabilityHelper > > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_DefaultProbabilityHelperVector(size);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_DefaultProbabilityHelperVector" "', argument " "1"" of type '" "unsigned int""'");
    } 
    arg1 = static_cast< unsigned int >(val1);
    {
      try {
        result = (std::vector< boost::shared_ptr< DefaultProbabilityHelper > > *)new std::vector< boost::shared_ptr< DefaultProbabilityHelper > >(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_boost__shared_ptrT_DefaultProbabilityHelper_t_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DefaultProbabilityHelperVector__SWIG_1) {
  {
    int argvi = 0;
    std::vector< boost::shared_ptr< DefaultProbabilityHelper > > *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_DefaultProbabilityHelperVector();");
    }
    {
      try {
        result = (std::vector< boost::shared_ptr< DefaultProbabilityHelper > > *)new std::vector< boost::shared_ptr< DefaultProbabilityHelper > >();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_boost__shared_ptrT_DefaultProbabilityHelper_t_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_DefaultProbabilityHelperVector__SWIG_2) {
  {
    unsigned int arg1 ;
    boost::shared_ptr< DefaultProbabilityHelper > *arg2 = 0 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    std::vector< boost::shared_ptr< DefaultProbabilityHelper > > *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_DefaultProbabilityHelperVector(size,value);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_DefaultProbabilityHelperVector" "', argument " "1"" of type '" "unsigned int""'");
    } 
    arg1 = static_cast< unsigned int >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityHelper_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_DefaultProbabilityHelperVector" "', argument " "2"" of type '" "boost::shared_ptr< DefaultProbabilityHelper > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DefaultProbabilityHelperVector" "', argument " "2"" of type '" "boost::shared_ptr< DefaultProbabilityHelper > const &""'"); 
    }
    arg2 = reinterpret_cast< boost::shared_ptr< DefaultProbabilityHelper > * >(argp2);
    {
      try {
        result = (std::vector< boost::shared_ptr< DefaultProbabilityHelper > > *)new std::vector< boost::shared_ptr< DefaultProbabilityHelper > >(arg1,(boost::shared_ptr< DefaultProbabilityHelper > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_boost__shared_ptrT_DefaultProbabilityHelper_t_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DefaultProbabilityHelperVector__SWIG_3) {
  {
    std::vector< boost::shared_ptr< DefaultProbabilityHelper > > *arg1 = 0 ;
    std::vector< boost::shared_ptr< DefaultProbabilityHelper > > temp1 ;
    std::vector< boost::shared_ptr< DefaultProbabilityHelper > > *v1 ;
    int argvi = 0;
    std::vector< boost::shared_ptr< DefaultProbabilityHelper > > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_DefaultProbabilityHelperVector(std::vector< boost::shared_ptr< DefaultProbabilityHelper > > const &);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_DefaultProbabilityHelper_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_DefaultProbabilityHelperVector. "
          "Expected an array of " "boost::shared_ptr< DefaultProbabilityHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< DefaultProbabilityHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityHelper_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_DefaultProbabilityHelperVector. "
              "Expected an array of " "boost::shared_ptr< DefaultProbabilityHelper >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_DefaultProbabilityHelperVector. "
          "Expected an array of " "boost::shared_ptr< DefaultProbabilityHelper >");
      }
    }
    {
      try {
        result = (std::vector< boost::shared_ptr< DefaultProbabilityHelper > > *)new std::vector< boost::shared_ptr< DefaultProbabilityHelper > >((std::vector< boost::shared_ptr< DefaultProbabilityHelper > > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_boost__shared_ptrT_DefaultProbabilityHelper_t_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DefaultProbabilityHelperVector) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< DefaultProbabilityHelper > >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_DefaultProbabilityHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< DefaultProbabilityHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityHelper_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DefaultProbabilityHelperVector__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DefaultProbabilityHelperVector__SWIG_0); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DefaultProbabilityHelperVector__SWIG_3); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DefaultProbabilityHelperVector__SWIG_2); return;
    }
  }
  
  croak("No matching function for overloaded 'new_DefaultProbabilityHelperVector'");
  XSRETURN(0);
}


XS(_wrap_DefaultProbabilityHelperVector_size) {
  {
    std::vector< boost::shared_ptr< DefaultProbabilityHelper > > *arg1 = (std::vector< boost::shared_ptr< DefaultProbabilityHelper > > *) 0 ;
    std::vector< boost::shared_ptr< DefaultProbabilityHelper > > temp1 ;
    std::vector< boost::shared_ptr< DefaultProbabilityHelper > > *v1 ;
    int argvi = 0;
    unsigned int result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DefaultProbabilityHelperVector_size(self);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_DefaultProbabilityHelper_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of DefaultProbabilityHelperVector_size. "
          "Expected an array of " "boost::shared_ptr< DefaultProbabilityHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< DefaultProbabilityHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityHelper_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "DefaultProbabilityHelperVector_size. "
              "Expected an array of " "boost::shared_ptr< DefaultProbabilityHelper >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of DefaultProbabilityHelperVector_size. "
          "Expected an array of " "boost::shared_ptr< DefaultProbabilityHelper >");
      }
    }
    {
      try {
        result = (unsigned int)((std::vector< boost::shared_ptr< DefaultProbabilityHelper > > const *)arg1)->size();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_DefaultProbabilityHelperVector_empty) {
  {
    std::vector< boost::shared_ptr< DefaultProbabilityHelper > > *arg1 = (std::vector< boost::shared_ptr< DefaultProbabilityHelper > > *) 0 ;
    std::vector< boost::shared_ptr< DefaultProbabilityHelper > > temp1 ;
    std::vector< boost::shared_ptr< DefaultProbabilityHelper > > *v1 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DefaultProbabilityHelperVector_empty(self);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_DefaultProbabilityHelper_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of DefaultProbabilityHelperVector_empty. "
          "Expected an array of " "boost::shared_ptr< DefaultProbabilityHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< DefaultProbabilityHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityHelper_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "DefaultProbabilityHelperVector_empty. "
              "Expected an array of " "boost::shared_ptr< DefaultProbabilityHelper >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of DefaultProbabilityHelperVector_empty. "
          "Expected an array of " "boost::shared_ptr< DefaultProbabilityHelper >");
      }
    }
    {
      try {
        result = (bool)((std::vector< boost::shared_ptr< DefaultProbabilityHelper > > const *)arg1)->empty();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_DefaultProbabilityHelperVector_clear) {
  {
    std::vector< boost::shared_ptr< DefaultProbabilityHelper > > *arg1 = (std::vector< boost::shared_ptr< DefaultProbabilityHelper > > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DefaultProbabilityHelperVector_clear(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_boost__shared_ptrT_DefaultProbabilityHelper_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DefaultProbabilityHelperVector_clear" "', argument " "1"" of type '" "std::vector< boost::shared_ptr< DefaultProbabilityHelper > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< boost::shared_ptr< DefaultProbabilityHelper > > * >(argp1);
    {
      try {
        (arg1)->clear();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_DefaultProbabilityHelperVector_push) {
  {
    std::vector< boost::shared_ptr< DefaultProbabilityHelper > > *arg1 = (std::vector< boost::shared_ptr< DefaultProbabilityHelper > > *) 0 ;
    boost::shared_ptr< DefaultProbabilityHelper > *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: DefaultProbabilityHelperVector_push(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_boost__shared_ptrT_DefaultProbabilityHelper_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DefaultProbabilityHelperVector_push" "', argument " "1"" of type '" "std::vector< boost::shared_ptr< DefaultProbabilityHelper > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< boost::shared_ptr< DefaultProbabilityHelper > > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityHelper_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DefaultProbabilityHelperVector_push" "', argument " "2"" of type '" "boost::shared_ptr< DefaultProbabilityHelper > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DefaultProbabilityHelperVector_push" "', argument " "2"" of type '" "boost::shared_ptr< DefaultProbabilityHelper > const &""'"); 
    }
    arg2 = reinterpret_cast< boost::shared_ptr< DefaultProbabilityHelper > * >(argp2);
    {
      try {
        (arg1)->push_back((boost::shared_ptr< DefaultProbabilityHelper > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_DefaultProbabilityHelperVector_pop) {
  {
    std::vector< boost::shared_ptr< DefaultProbabilityHelper > > *arg1 = (std::vector< boost::shared_ptr< DefaultProbabilityHelper > > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    boost::shared_ptr< DefaultProbabilityHelper > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DefaultProbabilityHelperVector_pop(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_boost__shared_ptrT_DefaultProbabilityHelper_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DefaultProbabilityHelperVector_pop" "', argument " "1"" of type '" "std::vector< boost::shared_ptr< DefaultProbabilityHelper > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< boost::shared_ptr< DefaultProbabilityHelper > > * >(argp1);
    {
      try {
        try {
          result = std_vector_Sl_boost_shared_ptr_Sl_DefaultProbabilityHelper_Sg__Sg__pop(arg1);
        }
        catch(std::out_of_range &_e) {
          sv_setsv(get_sv("@", GV_ADD), SWIG_NewPointerObj((new std::out_of_range(static_cast< const std::out_of_range& >(_e))),SWIGTYPE_p_std__out_of_range,SWIG_POINTER_OWN)); SWIG_fail ;
        }
        
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new boost::shared_ptr< DefaultProbabilityHelper >(static_cast< const boost::shared_ptr< DefaultProbabilityHelper >& >(result))), SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityHelper_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_DefaultProbabilityHelperVector_get) {
  {
    std::vector< boost::shared_ptr< DefaultProbabilityHelper > > *arg1 = (std::vector< boost::shared_ptr< DefaultProbabilityHelper > > *) 0 ;
    int arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    boost::shared_ptr< DefaultProbabilityHelper > *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: DefaultProbabilityHelperVector_get(self,i);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_boost__shared_ptrT_DefaultProbabilityHelper_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DefaultProbabilityHelperVector_get" "', argument " "1"" of type '" "std::vector< boost::shared_ptr< DefaultProbabilityHelper > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< boost::shared_ptr< DefaultProbabilityHelper > > * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DefaultProbabilityHelperVector_get" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    {
      try {
        try {
          result = (boost::shared_ptr< DefaultProbabilityHelper > *) &std_vector_Sl_boost_shared_ptr_Sl_DefaultProbabilityHelper_Sg__Sg__get(arg1,arg2);
        }
        catch(std::out_of_range &_e) {
          sv_setsv(get_sv("@", GV_ADD), SWIG_NewPointerObj((new std::out_of_range(static_cast< const std::out_of_range& >(_e))),SWIGTYPE_p_std__out_of_range,SWIG_POINTER_OWN)); SWIG_fail ;
        }
        
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityHelper_t, 0 | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_DefaultProbabilityHelperVector_set) {
  {
    std::vector< boost::shared_ptr< DefaultProbabilityHelper > > *arg1 = (std::vector< boost::shared_ptr< DefaultProbabilityHelper > > *) 0 ;
    int arg2 ;
    boost::shared_ptr< DefaultProbabilityHelper > *arg3 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: DefaultProbabilityHelperVector_set(self,i,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_boost__shared_ptrT_DefaultProbabilityHelper_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DefaultProbabilityHelperVector_set" "', argument " "1"" of type '" "std::vector< boost::shared_ptr< DefaultProbabilityHelper > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< boost::shared_ptr< DefaultProbabilityHelper > > * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DefaultProbabilityHelperVector_set" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityHelper_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "DefaultProbabilityHelperVector_set" "', argument " "3"" of type '" "boost::shared_ptr< DefaultProbabilityHelper > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DefaultProbabilityHelperVector_set" "', argument " "3"" of type '" "boost::shared_ptr< DefaultProbabilityHelper > const &""'"); 
    }
    arg3 = reinterpret_cast< boost::shared_ptr< DefaultProbabilityHelper > * >(argp3);
    {
      try {
        try {
          std_vector_Sl_boost_shared_ptr_Sl_DefaultProbabilityHelper_Sg__Sg__set(arg1,arg2,(boost::shared_ptr< DefaultProbabilityHelper > const &)*arg3);
        }
        catch(std::out_of_range &_e) {
          sv_setsv(get_sv("@", GV_ADD), SWIG_NewPointerObj((new std::out_of_range(static_cast< const std::out_of_range& >(_e))),SWIGTYPE_p_std__out_of_range,SWIG_POINTER_OWN)); SWIG_fail ;
        }
        
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_DefaultProbabilityHelperVector) {
  {
    std::vector< boost::shared_ptr< DefaultProbabilityHelper > > *arg1 = (std::vector< boost::shared_ptr< DefaultProbabilityHelper > > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_DefaultProbabilityHelperVector(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_boost__shared_ptrT_DefaultProbabilityHelper_t_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DefaultProbabilityHelperVector" "', argument " "1"" of type '" "std::vector< boost::shared_ptr< DefaultProbabilityHelper > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< boost::shared_ptr< DefaultProbabilityHelper > > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SpreadCdsHelper__SWIG_0) {
  {
    Handle< Quote > *arg1 = 0 ;
    Period *arg2 = 0 ;
    Integer arg3 ;
    Calendar *arg4 = 0 ;
    Frequency arg5 ;
    BusinessDayConvention arg6 ;
    DateGeneration::Rule arg7 ;
    DayCounter *arg8 = 0 ;
    Real arg9 ;
    Handle< YieldTermStructure > *arg10 = 0 ;
    bool arg11 ;
    bool arg12 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    int val7 ;
    int ecode7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    double val9 ;
    int ecode9 = 0 ;
    void *argp10 ;
    int res10 = 0 ;
    bool val11 ;
    int ecode11 = 0 ;
    bool val12 ;
    int ecode12 = 0 ;
    int argvi = 0;
    SpreadCdsHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 12) || (items > 12)) {
      SWIG_croak("Usage: new_SpreadCdsHelper(spread,tenor,settlementDays,calendar,frequency,convention,rule,dayCounter,recoveryRate,discountCurve,settlesAccrual,paysAtDefaultTime);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SpreadCdsHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SpreadCdsHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< Quote > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SpreadCdsHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SpreadCdsHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    arg2 = reinterpret_cast< Period * >(argp2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_SpreadCdsHelper" "', argument " "3"" of type '" "Integer""'");
    } 
    arg3 = static_cast< Integer >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_SpreadCdsHelper" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SpreadCdsHelper" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    arg4 = reinterpret_cast< Calendar * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_SpreadCdsHelper" "', argument " "5"" of type '" "Frequency""'");
    } 
    arg5 = static_cast< Frequency >(val5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_SpreadCdsHelper" "', argument " "6"" of type '" "BusinessDayConvention""'");
    } 
    arg6 = static_cast< BusinessDayConvention >(val6);
    ecode7 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_SpreadCdsHelper" "', argument " "7"" of type '" "DateGeneration::Rule""'");
    } 
    arg7 = static_cast< DateGeneration::Rule >(val7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_SpreadCdsHelper" "', argument " "8"" of type '" "DayCounter const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SpreadCdsHelper" "', argument " "8"" of type '" "DayCounter const &""'"); 
    }
    arg8 = reinterpret_cast< DayCounter * >(argp8);
    ecode9 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(8), &val9);
    if (!SWIG_IsOK(ecode9)) {
      SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "new_SpreadCdsHelper" "', argument " "9"" of type '" "Real""'");
    } 
    arg9 = static_cast< Real >(val9);
    res10 = SWIG_ConvertPtr(ST(9), &argp10, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res10)) {
      SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "new_SpreadCdsHelper" "', argument " "10"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp10) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SpreadCdsHelper" "', argument " "10"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg10 = reinterpret_cast< Handle< YieldTermStructure > * >(argp10);
    ecode11 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(10), &val11);
    if (!SWIG_IsOK(ecode11)) {
      SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "new_SpreadCdsHelper" "', argument " "11"" of type '" "bool""'");
    } 
    arg11 = static_cast< bool >(val11);
    ecode12 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(11), &val12);
    if (!SWIG_IsOK(ecode12)) {
      SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "new_SpreadCdsHelper" "', argument " "12"" of type '" "bool""'");
    } 
    arg12 = static_cast< bool >(val12);
    {
      try {
        result = (SpreadCdsHelperPtr *)new_SpreadCdsHelperPtr__SWIG_0((Handle< Quote > const &)*arg1,(Period const &)*arg2,arg3,(Calendar const &)*arg4,arg5,arg6,arg7,(DayCounter const &)*arg8,arg9,(Handle< YieldTermStructure > const &)*arg10,arg11,arg12);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SpreadCdsHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SpreadCdsHelper__SWIG_1) {
  {
    Handle< Quote > *arg1 = 0 ;
    Period *arg2 = 0 ;
    Integer arg3 ;
    Calendar *arg4 = 0 ;
    Frequency arg5 ;
    BusinessDayConvention arg6 ;
    DateGeneration::Rule arg7 ;
    DayCounter *arg8 = 0 ;
    Real arg9 ;
    Handle< YieldTermStructure > *arg10 = 0 ;
    bool arg11 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    int val7 ;
    int ecode7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    double val9 ;
    int ecode9 = 0 ;
    void *argp10 ;
    int res10 = 0 ;
    bool val11 ;
    int ecode11 = 0 ;
    int argvi = 0;
    SpreadCdsHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 11) || (items > 11)) {
      SWIG_croak("Usage: new_SpreadCdsHelper(spread,tenor,settlementDays,calendar,frequency,convention,rule,dayCounter,recoveryRate,discountCurve,settlesAccrual);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SpreadCdsHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SpreadCdsHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< Quote > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SpreadCdsHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SpreadCdsHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    arg2 = reinterpret_cast< Period * >(argp2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_SpreadCdsHelper" "', argument " "3"" of type '" "Integer""'");
    } 
    arg3 = static_cast< Integer >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_SpreadCdsHelper" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SpreadCdsHelper" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    arg4 = reinterpret_cast< Calendar * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_SpreadCdsHelper" "', argument " "5"" of type '" "Frequency""'");
    } 
    arg5 = static_cast< Frequency >(val5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_SpreadCdsHelper" "', argument " "6"" of type '" "BusinessDayConvention""'");
    } 
    arg6 = static_cast< BusinessDayConvention >(val6);
    ecode7 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_SpreadCdsHelper" "', argument " "7"" of type '" "DateGeneration::Rule""'");
    } 
    arg7 = static_cast< DateGeneration::Rule >(val7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_SpreadCdsHelper" "', argument " "8"" of type '" "DayCounter const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SpreadCdsHelper" "', argument " "8"" of type '" "DayCounter const &""'"); 
    }
    arg8 = reinterpret_cast< DayCounter * >(argp8);
    ecode9 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(8), &val9);
    if (!SWIG_IsOK(ecode9)) {
      SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "new_SpreadCdsHelper" "', argument " "9"" of type '" "Real""'");
    } 
    arg9 = static_cast< Real >(val9);
    res10 = SWIG_ConvertPtr(ST(9), &argp10, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res10)) {
      SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "new_SpreadCdsHelper" "', argument " "10"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp10) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SpreadCdsHelper" "', argument " "10"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg10 = reinterpret_cast< Handle< YieldTermStructure > * >(argp10);
    ecode11 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(10), &val11);
    if (!SWIG_IsOK(ecode11)) {
      SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "new_SpreadCdsHelper" "', argument " "11"" of type '" "bool""'");
    } 
    arg11 = static_cast< bool >(val11);
    {
      try {
        result = (SpreadCdsHelperPtr *)new_SpreadCdsHelperPtr__SWIG_0((Handle< Quote > const &)*arg1,(Period const &)*arg2,arg3,(Calendar const &)*arg4,arg5,arg6,arg7,(DayCounter const &)*arg8,arg9,(Handle< YieldTermStructure > const &)*arg10,arg11);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SpreadCdsHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SpreadCdsHelper__SWIG_2) {
  {
    Handle< Quote > *arg1 = 0 ;
    Period *arg2 = 0 ;
    Integer arg3 ;
    Calendar *arg4 = 0 ;
    Frequency arg5 ;
    BusinessDayConvention arg6 ;
    DateGeneration::Rule arg7 ;
    DayCounter *arg8 = 0 ;
    Real arg9 ;
    Handle< YieldTermStructure > *arg10 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    int val7 ;
    int ecode7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    double val9 ;
    int ecode9 = 0 ;
    void *argp10 ;
    int res10 = 0 ;
    int argvi = 0;
    SpreadCdsHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 10) || (items > 10)) {
      SWIG_croak("Usage: new_SpreadCdsHelper(spread,tenor,settlementDays,calendar,frequency,convention,rule,dayCounter,recoveryRate,discountCurve);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SpreadCdsHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SpreadCdsHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< Quote > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SpreadCdsHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SpreadCdsHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    arg2 = reinterpret_cast< Period * >(argp2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_SpreadCdsHelper" "', argument " "3"" of type '" "Integer""'");
    } 
    arg3 = static_cast< Integer >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_SpreadCdsHelper" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SpreadCdsHelper" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    arg4 = reinterpret_cast< Calendar * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_SpreadCdsHelper" "', argument " "5"" of type '" "Frequency""'");
    } 
    arg5 = static_cast< Frequency >(val5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_SpreadCdsHelper" "', argument " "6"" of type '" "BusinessDayConvention""'");
    } 
    arg6 = static_cast< BusinessDayConvention >(val6);
    ecode7 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_SpreadCdsHelper" "', argument " "7"" of type '" "DateGeneration::Rule""'");
    } 
    arg7 = static_cast< DateGeneration::Rule >(val7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_SpreadCdsHelper" "', argument " "8"" of type '" "DayCounter const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SpreadCdsHelper" "', argument " "8"" of type '" "DayCounter const &""'"); 
    }
    arg8 = reinterpret_cast< DayCounter * >(argp8);
    ecode9 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(8), &val9);
    if (!SWIG_IsOK(ecode9)) {
      SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "new_SpreadCdsHelper" "', argument " "9"" of type '" "Real""'");
    } 
    arg9 = static_cast< Real >(val9);
    res10 = SWIG_ConvertPtr(ST(9), &argp10, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res10)) {
      SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "new_SpreadCdsHelper" "', argument " "10"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp10) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SpreadCdsHelper" "', argument " "10"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg10 = reinterpret_cast< Handle< YieldTermStructure > * >(argp10);
    {
      try {
        result = (SpreadCdsHelperPtr *)new_SpreadCdsHelperPtr__SWIG_0((Handle< Quote > const &)*arg1,(Period const &)*arg2,arg3,(Calendar const &)*arg4,arg5,arg6,arg7,(DayCounter const &)*arg8,arg9,(Handle< YieldTermStructure > const &)*arg10);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SpreadCdsHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SpreadCdsHelper__SWIG_3) {
  {
    Rate arg1 ;
    Period *arg2 = 0 ;
    Integer arg3 ;
    Calendar *arg4 = 0 ;
    Frequency arg5 ;
    BusinessDayConvention arg6 ;
    DateGeneration::Rule arg7 ;
    DayCounter *arg8 = 0 ;
    Real arg9 ;
    Handle< YieldTermStructure > *arg10 = 0 ;
    bool arg11 ;
    bool arg12 ;
    double val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    int val7 ;
    int ecode7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    double val9 ;
    int ecode9 = 0 ;
    void *argp10 ;
    int res10 = 0 ;
    bool val11 ;
    int ecode11 = 0 ;
    bool val12 ;
    int ecode12 = 0 ;
    int argvi = 0;
    SpreadCdsHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 12) || (items > 12)) {
      SWIG_croak("Usage: new_SpreadCdsHelper(spread,tenor,settlementDays,calendar,frequency,convention,rule,dayCounter,recoveryRate,discountCurve,settlesAccrual,paysAtDefaultTime);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_SpreadCdsHelper" "', argument " "1"" of type '" "Rate""'");
    } 
    arg1 = static_cast< Rate >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SpreadCdsHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SpreadCdsHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    arg2 = reinterpret_cast< Period * >(argp2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_SpreadCdsHelper" "', argument " "3"" of type '" "Integer""'");
    } 
    arg3 = static_cast< Integer >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_SpreadCdsHelper" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SpreadCdsHelper" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    arg4 = reinterpret_cast< Calendar * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_SpreadCdsHelper" "', argument " "5"" of type '" "Frequency""'");
    } 
    arg5 = static_cast< Frequency >(val5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_SpreadCdsHelper" "', argument " "6"" of type '" "BusinessDayConvention""'");
    } 
    arg6 = static_cast< BusinessDayConvention >(val6);
    ecode7 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_SpreadCdsHelper" "', argument " "7"" of type '" "DateGeneration::Rule""'");
    } 
    arg7 = static_cast< DateGeneration::Rule >(val7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_SpreadCdsHelper" "', argument " "8"" of type '" "DayCounter const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SpreadCdsHelper" "', argument " "8"" of type '" "DayCounter const &""'"); 
    }
    arg8 = reinterpret_cast< DayCounter * >(argp8);
    ecode9 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(8), &val9);
    if (!SWIG_IsOK(ecode9)) {
      SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "new_SpreadCdsHelper" "', argument " "9"" of type '" "Real""'");
    } 
    arg9 = static_cast< Real >(val9);
    res10 = SWIG_ConvertPtr(ST(9), &argp10, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res10)) {
      SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "new_SpreadCdsHelper" "', argument " "10"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp10) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SpreadCdsHelper" "', argument " "10"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg10 = reinterpret_cast< Handle< YieldTermStructure > * >(argp10);
    ecode11 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(10), &val11);
    if (!SWIG_IsOK(ecode11)) {
      SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "new_SpreadCdsHelper" "', argument " "11"" of type '" "bool""'");
    } 
    arg11 = static_cast< bool >(val11);
    ecode12 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(11), &val12);
    if (!SWIG_IsOK(ecode12)) {
      SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "new_SpreadCdsHelper" "', argument " "12"" of type '" "bool""'");
    } 
    arg12 = static_cast< bool >(val12);
    {
      try {
        result = (SpreadCdsHelperPtr *)new_SpreadCdsHelperPtr__SWIG_3(arg1,(Period const &)*arg2,arg3,(Calendar const &)*arg4,arg5,arg6,arg7,(DayCounter const &)*arg8,arg9,(Handle< YieldTermStructure > const &)*arg10,arg11,arg12);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SpreadCdsHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SpreadCdsHelper__SWIG_4) {
  {
    Rate arg1 ;
    Period *arg2 = 0 ;
    Integer arg3 ;
    Calendar *arg4 = 0 ;
    Frequency arg5 ;
    BusinessDayConvention arg6 ;
    DateGeneration::Rule arg7 ;
    DayCounter *arg8 = 0 ;
    Real arg9 ;
    Handle< YieldTermStructure > *arg10 = 0 ;
    bool arg11 ;
    double val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    int val7 ;
    int ecode7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    double val9 ;
    int ecode9 = 0 ;
    void *argp10 ;
    int res10 = 0 ;
    bool val11 ;
    int ecode11 = 0 ;
    int argvi = 0;
    SpreadCdsHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 11) || (items > 11)) {
      SWIG_croak("Usage: new_SpreadCdsHelper(spread,tenor,settlementDays,calendar,frequency,convention,rule,dayCounter,recoveryRate,discountCurve,settlesAccrual);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_SpreadCdsHelper" "', argument " "1"" of type '" "Rate""'");
    } 
    arg1 = static_cast< Rate >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SpreadCdsHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SpreadCdsHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    arg2 = reinterpret_cast< Period * >(argp2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_SpreadCdsHelper" "', argument " "3"" of type '" "Integer""'");
    } 
    arg3 = static_cast< Integer >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_SpreadCdsHelper" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SpreadCdsHelper" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    arg4 = reinterpret_cast< Calendar * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_SpreadCdsHelper" "', argument " "5"" of type '" "Frequency""'");
    } 
    arg5 = static_cast< Frequency >(val5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_SpreadCdsHelper" "', argument " "6"" of type '" "BusinessDayConvention""'");
    } 
    arg6 = static_cast< BusinessDayConvention >(val6);
    ecode7 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_SpreadCdsHelper" "', argument " "7"" of type '" "DateGeneration::Rule""'");
    } 
    arg7 = static_cast< DateGeneration::Rule >(val7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_SpreadCdsHelper" "', argument " "8"" of type '" "DayCounter const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SpreadCdsHelper" "', argument " "8"" of type '" "DayCounter const &""'"); 
    }
    arg8 = reinterpret_cast< DayCounter * >(argp8);
    ecode9 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(8), &val9);
    if (!SWIG_IsOK(ecode9)) {
      SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "new_SpreadCdsHelper" "', argument " "9"" of type '" "Real""'");
    } 
    arg9 = static_cast< Real >(val9);
    res10 = SWIG_ConvertPtr(ST(9), &argp10, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res10)) {
      SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "new_SpreadCdsHelper" "', argument " "10"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp10) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SpreadCdsHelper" "', argument " "10"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg10 = reinterpret_cast< Handle< YieldTermStructure > * >(argp10);
    ecode11 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(10), &val11);
    if (!SWIG_IsOK(ecode11)) {
      SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "new_SpreadCdsHelper" "', argument " "11"" of type '" "bool""'");
    } 
    arg11 = static_cast< bool >(val11);
    {
      try {
        result = (SpreadCdsHelperPtr *)new_SpreadCdsHelperPtr__SWIG_3(arg1,(Period const &)*arg2,arg3,(Calendar const &)*arg4,arg5,arg6,arg7,(DayCounter const &)*arg8,arg9,(Handle< YieldTermStructure > const &)*arg10,arg11);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SpreadCdsHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SpreadCdsHelper__SWIG_5) {
  {
    Rate arg1 ;
    Period *arg2 = 0 ;
    Integer arg3 ;
    Calendar *arg4 = 0 ;
    Frequency arg5 ;
    BusinessDayConvention arg6 ;
    DateGeneration::Rule arg7 ;
    DayCounter *arg8 = 0 ;
    Real arg9 ;
    Handle< YieldTermStructure > *arg10 = 0 ;
    double val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    int val7 ;
    int ecode7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    double val9 ;
    int ecode9 = 0 ;
    void *argp10 ;
    int res10 = 0 ;
    int argvi = 0;
    SpreadCdsHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 10) || (items > 10)) {
      SWIG_croak("Usage: new_SpreadCdsHelper(spread,tenor,settlementDays,calendar,frequency,convention,rule,dayCounter,recoveryRate,discountCurve);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_SpreadCdsHelper" "', argument " "1"" of type '" "Rate""'");
    } 
    arg1 = static_cast< Rate >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SpreadCdsHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SpreadCdsHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    arg2 = reinterpret_cast< Period * >(argp2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_SpreadCdsHelper" "', argument " "3"" of type '" "Integer""'");
    } 
    arg3 = static_cast< Integer >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_SpreadCdsHelper" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SpreadCdsHelper" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    arg4 = reinterpret_cast< Calendar * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_SpreadCdsHelper" "', argument " "5"" of type '" "Frequency""'");
    } 
    arg5 = static_cast< Frequency >(val5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_SpreadCdsHelper" "', argument " "6"" of type '" "BusinessDayConvention""'");
    } 
    arg6 = static_cast< BusinessDayConvention >(val6);
    ecode7 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_SpreadCdsHelper" "', argument " "7"" of type '" "DateGeneration::Rule""'");
    } 
    arg7 = static_cast< DateGeneration::Rule >(val7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_SpreadCdsHelper" "', argument " "8"" of type '" "DayCounter const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SpreadCdsHelper" "', argument " "8"" of type '" "DayCounter const &""'"); 
    }
    arg8 = reinterpret_cast< DayCounter * >(argp8);
    ecode9 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(8), &val9);
    if (!SWIG_IsOK(ecode9)) {
      SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "new_SpreadCdsHelper" "', argument " "9"" of type '" "Real""'");
    } 
    arg9 = static_cast< Real >(val9);
    res10 = SWIG_ConvertPtr(ST(9), &argp10, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res10)) {
      SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "new_SpreadCdsHelper" "', argument " "10"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp10) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SpreadCdsHelper" "', argument " "10"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg10 = reinterpret_cast< Handle< YieldTermStructure > * >(argp10);
    {
      try {
        result = (SpreadCdsHelperPtr *)new_SpreadCdsHelperPtr__SWIG_3(arg1,(Period const &)*arg2,arg3,(Calendar const &)*arg4,arg5,arg6,arg7,(DayCounter const &)*arg8,arg9,(Handle< YieldTermStructure > const &)*arg10);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SpreadCdsHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SpreadCdsHelper) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 10) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(8), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(9), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 10) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(8), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(9), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 11) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(8), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(9), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(10), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 11) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(8), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(9), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(10), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 12) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(8), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(9), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(10), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(11), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 12) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(8), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(9), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(10), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(11), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SpreadCdsHelper__SWIG_2); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SpreadCdsHelper__SWIG_5); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SpreadCdsHelper__SWIG_1); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SpreadCdsHelper__SWIG_4); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SpreadCdsHelper__SWIG_0); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SpreadCdsHelper__SWIG_3); return;
    }
  }
  
  croak("No matching function for overloaded 'new_SpreadCdsHelper'");
  XSRETURN(0);
}


XS(_wrap_delete_SpreadCdsHelper) {
  {
    SpreadCdsHelperPtr *arg1 = (SpreadCdsHelperPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_SpreadCdsHelper(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SpreadCdsHelperPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SpreadCdsHelper" "', argument " "1"" of type '" "SpreadCdsHelperPtr *""'"); 
    }
    arg1 = reinterpret_cast< SpreadCdsHelperPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_UpfrontCdsHelper__SWIG_0) {
  {
    Handle< Quote > *arg1 = 0 ;
    Rate arg2 ;
    Period *arg3 = 0 ;
    Integer arg4 ;
    Calendar *arg5 = 0 ;
    Frequency arg6 ;
    BusinessDayConvention arg7 ;
    DateGeneration::Rule arg8 ;
    DayCounter *arg9 = 0 ;
    Real arg10 ;
    Handle< YieldTermStructure > *arg11 = 0 ;
    Natural arg12 ;
    bool arg13 ;
    bool arg14 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    int val7 ;
    int ecode7 = 0 ;
    int val8 ;
    int ecode8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    double val10 ;
    int ecode10 = 0 ;
    void *argp11 ;
    int res11 = 0 ;
    unsigned int val12 ;
    int ecode12 = 0 ;
    bool val13 ;
    int ecode13 = 0 ;
    bool val14 ;
    int ecode14 = 0 ;
    int argvi = 0;
    UpfrontCdsHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 14) || (items > 14)) {
      SWIG_croak("Usage: new_UpfrontCdsHelper(upfront,spread,tenor,settlementDays,calendar,frequency,convention,rule,dayCounter,recoveryRate,discountCurve,upfrontSettlementDays,settlesAccrual,paysAtDefaultTime);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_UpfrontCdsHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_UpfrontCdsHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< Quote > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_UpfrontCdsHelper" "', argument " "2"" of type '" "Rate""'");
    } 
    arg2 = static_cast< Rate >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_UpfrontCdsHelper" "', argument " "3"" of type '" "Period const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_UpfrontCdsHelper" "', argument " "3"" of type '" "Period const &""'"); 
    }
    arg3 = reinterpret_cast< Period * >(argp3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_UpfrontCdsHelper" "', argument " "4"" of type '" "Integer""'");
    } 
    arg4 = static_cast< Integer >(val4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_UpfrontCdsHelper" "', argument " "5"" of type '" "Calendar const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_UpfrontCdsHelper" "', argument " "5"" of type '" "Calendar const &""'"); 
    }
    arg5 = reinterpret_cast< Calendar * >(argp5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_UpfrontCdsHelper" "', argument " "6"" of type '" "Frequency""'");
    } 
    arg6 = static_cast< Frequency >(val6);
    ecode7 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_UpfrontCdsHelper" "', argument " "7"" of type '" "BusinessDayConvention""'");
    } 
    arg7 = static_cast< BusinessDayConvention >(val7);
    ecode8 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_UpfrontCdsHelper" "', argument " "8"" of type '" "DateGeneration::Rule""'");
    } 
    arg8 = static_cast< DateGeneration::Rule >(val8);
    res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res9)) {
      SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_UpfrontCdsHelper" "', argument " "9"" of type '" "DayCounter const &""'"); 
    }
    if (!argp9) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_UpfrontCdsHelper" "', argument " "9"" of type '" "DayCounter const &""'"); 
    }
    arg9 = reinterpret_cast< DayCounter * >(argp9);
    ecode10 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), &val10);
    if (!SWIG_IsOK(ecode10)) {
      SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "new_UpfrontCdsHelper" "', argument " "10"" of type '" "Real""'");
    } 
    arg10 = static_cast< Real >(val10);
    res11 = SWIG_ConvertPtr(ST(10), &argp11, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res11)) {
      SWIG_exception_fail(SWIG_ArgError(res11), "in method '" "new_UpfrontCdsHelper" "', argument " "11"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp11) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_UpfrontCdsHelper" "', argument " "11"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg11 = reinterpret_cast< Handle< YieldTermStructure > * >(argp11);
    ecode12 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(11), &val12);
    if (!SWIG_IsOK(ecode12)) {
      SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "new_UpfrontCdsHelper" "', argument " "12"" of type '" "Natural""'");
    } 
    arg12 = static_cast< Natural >(val12);
    ecode13 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(12), &val13);
    if (!SWIG_IsOK(ecode13)) {
      SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "new_UpfrontCdsHelper" "', argument " "13"" of type '" "bool""'");
    } 
    arg13 = static_cast< bool >(val13);
    ecode14 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(13), &val14);
    if (!SWIG_IsOK(ecode14)) {
      SWIG_exception_fail(SWIG_ArgError(ecode14), "in method '" "new_UpfrontCdsHelper" "', argument " "14"" of type '" "bool""'");
    } 
    arg14 = static_cast< bool >(val14);
    {
      try {
        result = (UpfrontCdsHelperPtr *)new_UpfrontCdsHelperPtr__SWIG_0((Handle< Quote > const &)*arg1,arg2,(Period const &)*arg3,arg4,(Calendar const &)*arg5,arg6,arg7,arg8,(DayCounter const &)*arg9,arg10,(Handle< YieldTermStructure > const &)*arg11,arg12,arg13,arg14);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UpfrontCdsHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_UpfrontCdsHelper__SWIG_1) {
  {
    Handle< Quote > *arg1 = 0 ;
    Rate arg2 ;
    Period *arg3 = 0 ;
    Integer arg4 ;
    Calendar *arg5 = 0 ;
    Frequency arg6 ;
    BusinessDayConvention arg7 ;
    DateGeneration::Rule arg8 ;
    DayCounter *arg9 = 0 ;
    Real arg10 ;
    Handle< YieldTermStructure > *arg11 = 0 ;
    Natural arg12 ;
    bool arg13 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    int val7 ;
    int ecode7 = 0 ;
    int val8 ;
    int ecode8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    double val10 ;
    int ecode10 = 0 ;
    void *argp11 ;
    int res11 = 0 ;
    unsigned int val12 ;
    int ecode12 = 0 ;
    bool val13 ;
    int ecode13 = 0 ;
    int argvi = 0;
    UpfrontCdsHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 13) || (items > 13)) {
      SWIG_croak("Usage: new_UpfrontCdsHelper(upfront,spread,tenor,settlementDays,calendar,frequency,convention,rule,dayCounter,recoveryRate,discountCurve,upfrontSettlementDays,settlesAccrual);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_UpfrontCdsHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_UpfrontCdsHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< Quote > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_UpfrontCdsHelper" "', argument " "2"" of type '" "Rate""'");
    } 
    arg2 = static_cast< Rate >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_UpfrontCdsHelper" "', argument " "3"" of type '" "Period const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_UpfrontCdsHelper" "', argument " "3"" of type '" "Period const &""'"); 
    }
    arg3 = reinterpret_cast< Period * >(argp3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_UpfrontCdsHelper" "', argument " "4"" of type '" "Integer""'");
    } 
    arg4 = static_cast< Integer >(val4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_UpfrontCdsHelper" "', argument " "5"" of type '" "Calendar const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_UpfrontCdsHelper" "', argument " "5"" of type '" "Calendar const &""'"); 
    }
    arg5 = reinterpret_cast< Calendar * >(argp5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_UpfrontCdsHelper" "', argument " "6"" of type '" "Frequency""'");
    } 
    arg6 = static_cast< Frequency >(val6);
    ecode7 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_UpfrontCdsHelper" "', argument " "7"" of type '" "BusinessDayConvention""'");
    } 
    arg7 = static_cast< BusinessDayConvention >(val7);
    ecode8 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_UpfrontCdsHelper" "', argument " "8"" of type '" "DateGeneration::Rule""'");
    } 
    arg8 = static_cast< DateGeneration::Rule >(val8);
    res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res9)) {
      SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_UpfrontCdsHelper" "', argument " "9"" of type '" "DayCounter const &""'"); 
    }
    if (!argp9) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_UpfrontCdsHelper" "', argument " "9"" of type '" "DayCounter const &""'"); 
    }
    arg9 = reinterpret_cast< DayCounter * >(argp9);
    ecode10 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), &val10);
    if (!SWIG_IsOK(ecode10)) {
      SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "new_UpfrontCdsHelper" "', argument " "10"" of type '" "Real""'");
    } 
    arg10 = static_cast< Real >(val10);
    res11 = SWIG_ConvertPtr(ST(10), &argp11, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res11)) {
      SWIG_exception_fail(SWIG_ArgError(res11), "in method '" "new_UpfrontCdsHelper" "', argument " "11"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp11) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_UpfrontCdsHelper" "', argument " "11"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg11 = reinterpret_cast< Handle< YieldTermStructure > * >(argp11);
    ecode12 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(11), &val12);
    if (!SWIG_IsOK(ecode12)) {
      SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "new_UpfrontCdsHelper" "', argument " "12"" of type '" "Natural""'");
    } 
    arg12 = static_cast< Natural >(val12);
    ecode13 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(12), &val13);
    if (!SWIG_IsOK(ecode13)) {
      SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "new_UpfrontCdsHelper" "', argument " "13"" of type '" "bool""'");
    } 
    arg13 = static_cast< bool >(val13);
    {
      try {
        result = (UpfrontCdsHelperPtr *)new_UpfrontCdsHelperPtr__SWIG_0((Handle< Quote > const &)*arg1,arg2,(Period const &)*arg3,arg4,(Calendar const &)*arg5,arg6,arg7,arg8,(DayCounter const &)*arg9,arg10,(Handle< YieldTermStructure > const &)*arg11,arg12,arg13);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UpfrontCdsHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_UpfrontCdsHelper__SWIG_2) {
  {
    Handle< Quote > *arg1 = 0 ;
    Rate arg2 ;
    Period *arg3 = 0 ;
    Integer arg4 ;
    Calendar *arg5 = 0 ;
    Frequency arg6 ;
    BusinessDayConvention arg7 ;
    DateGeneration::Rule arg8 ;
    DayCounter *arg9 = 0 ;
    Real arg10 ;
    Handle< YieldTermStructure > *arg11 = 0 ;
    Natural arg12 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    int val7 ;
    int ecode7 = 0 ;
    int val8 ;
    int ecode8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    double val10 ;
    int ecode10 = 0 ;
    void *argp11 ;
    int res11 = 0 ;
    unsigned int val12 ;
    int ecode12 = 0 ;
    int argvi = 0;
    UpfrontCdsHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 12) || (items > 12)) {
      SWIG_croak("Usage: new_UpfrontCdsHelper(upfront,spread,tenor,settlementDays,calendar,frequency,convention,rule,dayCounter,recoveryRate,discountCurve,upfrontSettlementDays);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_UpfrontCdsHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_UpfrontCdsHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< Quote > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_UpfrontCdsHelper" "', argument " "2"" of type '" "Rate""'");
    } 
    arg2 = static_cast< Rate >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_UpfrontCdsHelper" "', argument " "3"" of type '" "Period const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_UpfrontCdsHelper" "', argument " "3"" of type '" "Period const &""'"); 
    }
    arg3 = reinterpret_cast< Period * >(argp3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_UpfrontCdsHelper" "', argument " "4"" of type '" "Integer""'");
    } 
    arg4 = static_cast< Integer >(val4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_UpfrontCdsHelper" "', argument " "5"" of type '" "Calendar const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_UpfrontCdsHelper" "', argument " "5"" of type '" "Calendar const &""'"); 
    }
    arg5 = reinterpret_cast< Calendar * >(argp5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_UpfrontCdsHelper" "', argument " "6"" of type '" "Frequency""'");
    } 
    arg6 = static_cast< Frequency >(val6);
    ecode7 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_UpfrontCdsHelper" "', argument " "7"" of type '" "BusinessDayConvention""'");
    } 
    arg7 = static_cast< BusinessDayConvention >(val7);
    ecode8 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_UpfrontCdsHelper" "', argument " "8"" of type '" "DateGeneration::Rule""'");
    } 
    arg8 = static_cast< DateGeneration::Rule >(val8);
    res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res9)) {
      SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_UpfrontCdsHelper" "', argument " "9"" of type '" "DayCounter const &""'"); 
    }
    if (!argp9) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_UpfrontCdsHelper" "', argument " "9"" of type '" "DayCounter const &""'"); 
    }
    arg9 = reinterpret_cast< DayCounter * >(argp9);
    ecode10 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), &val10);
    if (!SWIG_IsOK(ecode10)) {
      SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "new_UpfrontCdsHelper" "', argument " "10"" of type '" "Real""'");
    } 
    arg10 = static_cast< Real >(val10);
    res11 = SWIG_ConvertPtr(ST(10), &argp11, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res11)) {
      SWIG_exception_fail(SWIG_ArgError(res11), "in method '" "new_UpfrontCdsHelper" "', argument " "11"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp11) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_UpfrontCdsHelper" "', argument " "11"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg11 = reinterpret_cast< Handle< YieldTermStructure > * >(argp11);
    ecode12 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(11), &val12);
    if (!SWIG_IsOK(ecode12)) {
      SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "new_UpfrontCdsHelper" "', argument " "12"" of type '" "Natural""'");
    } 
    arg12 = static_cast< Natural >(val12);
    {
      try {
        result = (UpfrontCdsHelperPtr *)new_UpfrontCdsHelperPtr__SWIG_0((Handle< Quote > const &)*arg1,arg2,(Period const &)*arg3,arg4,(Calendar const &)*arg5,arg6,arg7,arg8,(DayCounter const &)*arg9,arg10,(Handle< YieldTermStructure > const &)*arg11,arg12);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UpfrontCdsHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_UpfrontCdsHelper__SWIG_3) {
  {
    Handle< Quote > *arg1 = 0 ;
    Rate arg2 ;
    Period *arg3 = 0 ;
    Integer arg4 ;
    Calendar *arg5 = 0 ;
    Frequency arg6 ;
    BusinessDayConvention arg7 ;
    DateGeneration::Rule arg8 ;
    DayCounter *arg9 = 0 ;
    Real arg10 ;
    Handle< YieldTermStructure > *arg11 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    int val7 ;
    int ecode7 = 0 ;
    int val8 ;
    int ecode8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    double val10 ;
    int ecode10 = 0 ;
    void *argp11 ;
    int res11 = 0 ;
    int argvi = 0;
    UpfrontCdsHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 11) || (items > 11)) {
      SWIG_croak("Usage: new_UpfrontCdsHelper(upfront,spread,tenor,settlementDays,calendar,frequency,convention,rule,dayCounter,recoveryRate,discountCurve);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_UpfrontCdsHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_UpfrontCdsHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< Quote > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_UpfrontCdsHelper" "', argument " "2"" of type '" "Rate""'");
    } 
    arg2 = static_cast< Rate >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_UpfrontCdsHelper" "', argument " "3"" of type '" "Period const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_UpfrontCdsHelper" "', argument " "3"" of type '" "Period const &""'"); 
    }
    arg3 = reinterpret_cast< Period * >(argp3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_UpfrontCdsHelper" "', argument " "4"" of type '" "Integer""'");
    } 
    arg4 = static_cast< Integer >(val4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_UpfrontCdsHelper" "', argument " "5"" of type '" "Calendar const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_UpfrontCdsHelper" "', argument " "5"" of type '" "Calendar const &""'"); 
    }
    arg5 = reinterpret_cast< Calendar * >(argp5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_UpfrontCdsHelper" "', argument " "6"" of type '" "Frequency""'");
    } 
    arg6 = static_cast< Frequency >(val6);
    ecode7 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_UpfrontCdsHelper" "', argument " "7"" of type '" "BusinessDayConvention""'");
    } 
    arg7 = static_cast< BusinessDayConvention >(val7);
    ecode8 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_UpfrontCdsHelper" "', argument " "8"" of type '" "DateGeneration::Rule""'");
    } 
    arg8 = static_cast< DateGeneration::Rule >(val8);
    res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res9)) {
      SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_UpfrontCdsHelper" "', argument " "9"" of type '" "DayCounter const &""'"); 
    }
    if (!argp9) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_UpfrontCdsHelper" "', argument " "9"" of type '" "DayCounter const &""'"); 
    }
    arg9 = reinterpret_cast< DayCounter * >(argp9);
    ecode10 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), &val10);
    if (!SWIG_IsOK(ecode10)) {
      SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "new_UpfrontCdsHelper" "', argument " "10"" of type '" "Real""'");
    } 
    arg10 = static_cast< Real >(val10);
    res11 = SWIG_ConvertPtr(ST(10), &argp11, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res11)) {
      SWIG_exception_fail(SWIG_ArgError(res11), "in method '" "new_UpfrontCdsHelper" "', argument " "11"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp11) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_UpfrontCdsHelper" "', argument " "11"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg11 = reinterpret_cast< Handle< YieldTermStructure > * >(argp11);
    {
      try {
        result = (UpfrontCdsHelperPtr *)new_UpfrontCdsHelperPtr__SWIG_0((Handle< Quote > const &)*arg1,arg2,(Period const &)*arg3,arg4,(Calendar const &)*arg5,arg6,arg7,arg8,(DayCounter const &)*arg9,arg10,(Handle< YieldTermStructure > const &)*arg11);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UpfrontCdsHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_UpfrontCdsHelper__SWIG_4) {
  {
    Rate arg1 ;
    Rate arg2 ;
    Period *arg3 = 0 ;
    Integer arg4 ;
    Calendar *arg5 = 0 ;
    Frequency arg6 ;
    BusinessDayConvention arg7 ;
    DateGeneration::Rule arg8 ;
    DayCounter *arg9 = 0 ;
    Real arg10 ;
    Handle< YieldTermStructure > *arg11 = 0 ;
    Natural arg12 ;
    bool arg13 ;
    bool arg14 ;
    double val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    int val7 ;
    int ecode7 = 0 ;
    int val8 ;
    int ecode8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    double val10 ;
    int ecode10 = 0 ;
    void *argp11 ;
    int res11 = 0 ;
    unsigned int val12 ;
    int ecode12 = 0 ;
    bool val13 ;
    int ecode13 = 0 ;
    bool val14 ;
    int ecode14 = 0 ;
    int argvi = 0;
    UpfrontCdsHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 14) || (items > 14)) {
      SWIG_croak("Usage: new_UpfrontCdsHelper(upfront,spread,tenor,settlementDays,calendar,frequency,convention,rule,dayCounter,recoveryRate,discountCurve,upfrontSettlementDays,settlesAccrual,paysAtDefaultTime);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_UpfrontCdsHelper" "', argument " "1"" of type '" "Rate""'");
    } 
    arg1 = static_cast< Rate >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_UpfrontCdsHelper" "', argument " "2"" of type '" "Rate""'");
    } 
    arg2 = static_cast< Rate >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_UpfrontCdsHelper" "', argument " "3"" of type '" "Period const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_UpfrontCdsHelper" "', argument " "3"" of type '" "Period const &""'"); 
    }
    arg3 = reinterpret_cast< Period * >(argp3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_UpfrontCdsHelper" "', argument " "4"" of type '" "Integer""'");
    } 
    arg4 = static_cast< Integer >(val4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_UpfrontCdsHelper" "', argument " "5"" of type '" "Calendar const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_UpfrontCdsHelper" "', argument " "5"" of type '" "Calendar const &""'"); 
    }
    arg5 = reinterpret_cast< Calendar * >(argp5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_UpfrontCdsHelper" "', argument " "6"" of type '" "Frequency""'");
    } 
    arg6 = static_cast< Frequency >(val6);
    ecode7 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_UpfrontCdsHelper" "', argument " "7"" of type '" "BusinessDayConvention""'");
    } 
    arg7 = static_cast< BusinessDayConvention >(val7);
    ecode8 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_UpfrontCdsHelper" "', argument " "8"" of type '" "DateGeneration::Rule""'");
    } 
    arg8 = static_cast< DateGeneration::Rule >(val8);
    res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res9)) {
      SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_UpfrontCdsHelper" "', argument " "9"" of type '" "DayCounter const &""'"); 
    }
    if (!argp9) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_UpfrontCdsHelper" "', argument " "9"" of type '" "DayCounter const &""'"); 
    }
    arg9 = reinterpret_cast< DayCounter * >(argp9);
    ecode10 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), &val10);
    if (!SWIG_IsOK(ecode10)) {
      SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "new_UpfrontCdsHelper" "', argument " "10"" of type '" "Real""'");
    } 
    arg10 = static_cast< Real >(val10);
    res11 = SWIG_ConvertPtr(ST(10), &argp11, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res11)) {
      SWIG_exception_fail(SWIG_ArgError(res11), "in method '" "new_UpfrontCdsHelper" "', argument " "11"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp11) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_UpfrontCdsHelper" "', argument " "11"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg11 = reinterpret_cast< Handle< YieldTermStructure > * >(argp11);
    ecode12 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(11), &val12);
    if (!SWIG_IsOK(ecode12)) {
      SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "new_UpfrontCdsHelper" "', argument " "12"" of type '" "Natural""'");
    } 
    arg12 = static_cast< Natural >(val12);
    ecode13 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(12), &val13);
    if (!SWIG_IsOK(ecode13)) {
      SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "new_UpfrontCdsHelper" "', argument " "13"" of type '" "bool""'");
    } 
    arg13 = static_cast< bool >(val13);
    ecode14 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(13), &val14);
    if (!SWIG_IsOK(ecode14)) {
      SWIG_exception_fail(SWIG_ArgError(ecode14), "in method '" "new_UpfrontCdsHelper" "', argument " "14"" of type '" "bool""'");
    } 
    arg14 = static_cast< bool >(val14);
    {
      try {
        result = (UpfrontCdsHelperPtr *)new_UpfrontCdsHelperPtr__SWIG_4(arg1,arg2,(Period const &)*arg3,arg4,(Calendar const &)*arg5,arg6,arg7,arg8,(DayCounter const &)*arg9,arg10,(Handle< YieldTermStructure > const &)*arg11,arg12,arg13,arg14);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UpfrontCdsHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_UpfrontCdsHelper__SWIG_5) {
  {
    Rate arg1 ;
    Rate arg2 ;
    Period *arg3 = 0 ;
    Integer arg4 ;
    Calendar *arg5 = 0 ;
    Frequency arg6 ;
    BusinessDayConvention arg7 ;
    DateGeneration::Rule arg8 ;
    DayCounter *arg9 = 0 ;
    Real arg10 ;
    Handle< YieldTermStructure > *arg11 = 0 ;
    Natural arg12 ;
    bool arg13 ;
    double val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    int val7 ;
    int ecode7 = 0 ;
    int val8 ;
    int ecode8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    double val10 ;
    int ecode10 = 0 ;
    void *argp11 ;
    int res11 = 0 ;
    unsigned int val12 ;
    int ecode12 = 0 ;
    bool val13 ;
    int ecode13 = 0 ;
    int argvi = 0;
    UpfrontCdsHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 13) || (items > 13)) {
      SWIG_croak("Usage: new_UpfrontCdsHelper(upfront,spread,tenor,settlementDays,calendar,frequency,convention,rule,dayCounter,recoveryRate,discountCurve,upfrontSettlementDays,settlesAccrual);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_UpfrontCdsHelper" "', argument " "1"" of type '" "Rate""'");
    } 
    arg1 = static_cast< Rate >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_UpfrontCdsHelper" "', argument " "2"" of type '" "Rate""'");
    } 
    arg2 = static_cast< Rate >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_UpfrontCdsHelper" "', argument " "3"" of type '" "Period const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_UpfrontCdsHelper" "', argument " "3"" of type '" "Period const &""'"); 
    }
    arg3 = reinterpret_cast< Period * >(argp3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_UpfrontCdsHelper" "', argument " "4"" of type '" "Integer""'");
    } 
    arg4 = static_cast< Integer >(val4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_UpfrontCdsHelper" "', argument " "5"" of type '" "Calendar const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_UpfrontCdsHelper" "', argument " "5"" of type '" "Calendar const &""'"); 
    }
    arg5 = reinterpret_cast< Calendar * >(argp5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_UpfrontCdsHelper" "', argument " "6"" of type '" "Frequency""'");
    } 
    arg6 = static_cast< Frequency >(val6);
    ecode7 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_UpfrontCdsHelper" "', argument " "7"" of type '" "BusinessDayConvention""'");
    } 
    arg7 = static_cast< BusinessDayConvention >(val7);
    ecode8 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_UpfrontCdsHelper" "', argument " "8"" of type '" "DateGeneration::Rule""'");
    } 
    arg8 = static_cast< DateGeneration::Rule >(val8);
    res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res9)) {
      SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_UpfrontCdsHelper" "', argument " "9"" of type '" "DayCounter const &""'"); 
    }
    if (!argp9) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_UpfrontCdsHelper" "', argument " "9"" of type '" "DayCounter const &""'"); 
    }
    arg9 = reinterpret_cast< DayCounter * >(argp9);
    ecode10 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), &val10);
    if (!SWIG_IsOK(ecode10)) {
      SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "new_UpfrontCdsHelper" "', argument " "10"" of type '" "Real""'");
    } 
    arg10 = static_cast< Real >(val10);
    res11 = SWIG_ConvertPtr(ST(10), &argp11, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res11)) {
      SWIG_exception_fail(SWIG_ArgError(res11), "in method '" "new_UpfrontCdsHelper" "', argument " "11"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp11) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_UpfrontCdsHelper" "', argument " "11"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg11 = reinterpret_cast< Handle< YieldTermStructure > * >(argp11);
    ecode12 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(11), &val12);
    if (!SWIG_IsOK(ecode12)) {
      SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "new_UpfrontCdsHelper" "', argument " "12"" of type '" "Natural""'");
    } 
    arg12 = static_cast< Natural >(val12);
    ecode13 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(12), &val13);
    if (!SWIG_IsOK(ecode13)) {
      SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "new_UpfrontCdsHelper" "', argument " "13"" of type '" "bool""'");
    } 
    arg13 = static_cast< bool >(val13);
    {
      try {
        result = (UpfrontCdsHelperPtr *)new_UpfrontCdsHelperPtr__SWIG_4(arg1,arg2,(Period const &)*arg3,arg4,(Calendar const &)*arg5,arg6,arg7,arg8,(DayCounter const &)*arg9,arg10,(Handle< YieldTermStructure > const &)*arg11,arg12,arg13);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UpfrontCdsHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_UpfrontCdsHelper__SWIG_6) {
  {
    Rate arg1 ;
    Rate arg2 ;
    Period *arg3 = 0 ;
    Integer arg4 ;
    Calendar *arg5 = 0 ;
    Frequency arg6 ;
    BusinessDayConvention arg7 ;
    DateGeneration::Rule arg8 ;
    DayCounter *arg9 = 0 ;
    Real arg10 ;
    Handle< YieldTermStructure > *arg11 = 0 ;
    Natural arg12 ;
    double val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    int val7 ;
    int ecode7 = 0 ;
    int val8 ;
    int ecode8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    double val10 ;
    int ecode10 = 0 ;
    void *argp11 ;
    int res11 = 0 ;
    unsigned int val12 ;
    int ecode12 = 0 ;
    int argvi = 0;
    UpfrontCdsHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 12) || (items > 12)) {
      SWIG_croak("Usage: new_UpfrontCdsHelper(upfront,spread,tenor,settlementDays,calendar,frequency,convention,rule,dayCounter,recoveryRate,discountCurve,upfrontSettlementDays);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_UpfrontCdsHelper" "', argument " "1"" of type '" "Rate""'");
    } 
    arg1 = static_cast< Rate >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_UpfrontCdsHelper" "', argument " "2"" of type '" "Rate""'");
    } 
    arg2 = static_cast< Rate >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_UpfrontCdsHelper" "', argument " "3"" of type '" "Period const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_UpfrontCdsHelper" "', argument " "3"" of type '" "Period const &""'"); 
    }
    arg3 = reinterpret_cast< Period * >(argp3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_UpfrontCdsHelper" "', argument " "4"" of type '" "Integer""'");
    } 
    arg4 = static_cast< Integer >(val4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_UpfrontCdsHelper" "', argument " "5"" of type '" "Calendar const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_UpfrontCdsHelper" "', argument " "5"" of type '" "Calendar const &""'"); 
    }
    arg5 = reinterpret_cast< Calendar * >(argp5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_UpfrontCdsHelper" "', argument " "6"" of type '" "Frequency""'");
    } 
    arg6 = static_cast< Frequency >(val6);
    ecode7 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_UpfrontCdsHelper" "', argument " "7"" of type '" "BusinessDayConvention""'");
    } 
    arg7 = static_cast< BusinessDayConvention >(val7);
    ecode8 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_UpfrontCdsHelper" "', argument " "8"" of type '" "DateGeneration::Rule""'");
    } 
    arg8 = static_cast< DateGeneration::Rule >(val8);
    res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res9)) {
      SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_UpfrontCdsHelper" "', argument " "9"" of type '" "DayCounter const &""'"); 
    }
    if (!argp9) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_UpfrontCdsHelper" "', argument " "9"" of type '" "DayCounter const &""'"); 
    }
    arg9 = reinterpret_cast< DayCounter * >(argp9);
    ecode10 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), &val10);
    if (!SWIG_IsOK(ecode10)) {
      SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "new_UpfrontCdsHelper" "', argument " "10"" of type '" "Real""'");
    } 
    arg10 = static_cast< Real >(val10);
    res11 = SWIG_ConvertPtr(ST(10), &argp11, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res11)) {
      SWIG_exception_fail(SWIG_ArgError(res11), "in method '" "new_UpfrontCdsHelper" "', argument " "11"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp11) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_UpfrontCdsHelper" "', argument " "11"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg11 = reinterpret_cast< Handle< YieldTermStructure > * >(argp11);
    ecode12 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(11), &val12);
    if (!SWIG_IsOK(ecode12)) {
      SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "new_UpfrontCdsHelper" "', argument " "12"" of type '" "Natural""'");
    } 
    arg12 = static_cast< Natural >(val12);
    {
      try {
        result = (UpfrontCdsHelperPtr *)new_UpfrontCdsHelperPtr__SWIG_4(arg1,arg2,(Period const &)*arg3,arg4,(Calendar const &)*arg5,arg6,arg7,arg8,(DayCounter const &)*arg9,arg10,(Handle< YieldTermStructure > const &)*arg11,arg12);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UpfrontCdsHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_UpfrontCdsHelper__SWIG_7) {
  {
    Rate arg1 ;
    Rate arg2 ;
    Period *arg3 = 0 ;
    Integer arg4 ;
    Calendar *arg5 = 0 ;
    Frequency arg6 ;
    BusinessDayConvention arg7 ;
    DateGeneration::Rule arg8 ;
    DayCounter *arg9 = 0 ;
    Real arg10 ;
    Handle< YieldTermStructure > *arg11 = 0 ;
    double val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    int val7 ;
    int ecode7 = 0 ;
    int val8 ;
    int ecode8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    double val10 ;
    int ecode10 = 0 ;
    void *argp11 ;
    int res11 = 0 ;
    int argvi = 0;
    UpfrontCdsHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 11) || (items > 11)) {
      SWIG_croak("Usage: new_UpfrontCdsHelper(upfront,spread,tenor,settlementDays,calendar,frequency,convention,rule,dayCounter,recoveryRate,discountCurve);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_UpfrontCdsHelper" "', argument " "1"" of type '" "Rate""'");
    } 
    arg1 = static_cast< Rate >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_UpfrontCdsHelper" "', argument " "2"" of type '" "Rate""'");
    } 
    arg2 = static_cast< Rate >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_UpfrontCdsHelper" "', argument " "3"" of type '" "Period const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_UpfrontCdsHelper" "', argument " "3"" of type '" "Period const &""'"); 
    }
    arg3 = reinterpret_cast< Period * >(argp3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_UpfrontCdsHelper" "', argument " "4"" of type '" "Integer""'");
    } 
    arg4 = static_cast< Integer >(val4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_UpfrontCdsHelper" "', argument " "5"" of type '" "Calendar const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_UpfrontCdsHelper" "', argument " "5"" of type '" "Calendar const &""'"); 
    }
    arg5 = reinterpret_cast< Calendar * >(argp5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_UpfrontCdsHelper" "', argument " "6"" of type '" "Frequency""'");
    } 
    arg6 = static_cast< Frequency >(val6);
    ecode7 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_UpfrontCdsHelper" "', argument " "7"" of type '" "BusinessDayConvention""'");
    } 
    arg7 = static_cast< BusinessDayConvention >(val7);
    ecode8 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_UpfrontCdsHelper" "', argument " "8"" of type '" "DateGeneration::Rule""'");
    } 
    arg8 = static_cast< DateGeneration::Rule >(val8);
    res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res9)) {
      SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_UpfrontCdsHelper" "', argument " "9"" of type '" "DayCounter const &""'"); 
    }
    if (!argp9) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_UpfrontCdsHelper" "', argument " "9"" of type '" "DayCounter const &""'"); 
    }
    arg9 = reinterpret_cast< DayCounter * >(argp9);
    ecode10 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), &val10);
    if (!SWIG_IsOK(ecode10)) {
      SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "new_UpfrontCdsHelper" "', argument " "10"" of type '" "Real""'");
    } 
    arg10 = static_cast< Real >(val10);
    res11 = SWIG_ConvertPtr(ST(10), &argp11, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res11)) {
      SWIG_exception_fail(SWIG_ArgError(res11), "in method '" "new_UpfrontCdsHelper" "', argument " "11"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp11) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_UpfrontCdsHelper" "', argument " "11"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg11 = reinterpret_cast< Handle< YieldTermStructure > * >(argp11);
    {
      try {
        result = (UpfrontCdsHelperPtr *)new_UpfrontCdsHelperPtr__SWIG_4(arg1,arg2,(Period const &)*arg3,arg4,(Calendar const &)*arg5,arg6,arg7,arg8,(DayCounter const &)*arg9,arg10,(Handle< YieldTermStructure > const &)*arg11);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UpfrontCdsHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_UpfrontCdsHelper) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 11) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(10), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 11) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(10), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 12) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(10), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(11), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 12) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(10), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(11), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 13) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(10), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(11), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(12), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 13) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(10), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(11), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(12), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
    if (items == 14) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(10), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(11), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(12), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(13), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 7;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_7:
    
    if (items == 14) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(10), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(11), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(12), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(13), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 8;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_8:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_UpfrontCdsHelper__SWIG_3); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_UpfrontCdsHelper__SWIG_7); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_UpfrontCdsHelper__SWIG_2); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_UpfrontCdsHelper__SWIG_6); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_UpfrontCdsHelper__SWIG_1); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_UpfrontCdsHelper__SWIG_5); return;
    case 7:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_UpfrontCdsHelper__SWIG_0); return;
    case 8:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_UpfrontCdsHelper__SWIG_4); return;
    }
  }
  
  croak("No matching function for overloaded 'new_UpfrontCdsHelper'");
  XSRETURN(0);
}


XS(_wrap_delete_UpfrontCdsHelper) {
  {
    UpfrontCdsHelperPtr *arg1 = (UpfrontCdsHelperPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_UpfrontCdsHelper(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_UpfrontCdsHelperPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UpfrontCdsHelper" "', argument " "1"" of type '" "UpfrontCdsHelperPtr *""'"); 
    }
    arg1 = reinterpret_cast< UpfrontCdsHelperPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_HazardRate) {
  {
    int argvi = 0;
    HazardRate *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_HazardRate();");
    }
    {
      try {
        result = (HazardRate *)new HazardRate();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_HazardRate, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_HazardRate) {
  {
    HazardRate *arg1 = (HazardRate *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_HazardRate(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HazardRate, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_HazardRate" "', argument " "1"" of type '" "HazardRate *""'"); 
    }
    arg1 = reinterpret_cast< HazardRate * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DefaultDensity) {
  {
    int argvi = 0;
    DefaultDensity *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_DefaultDensity();");
    }
    {
      try {
        result = (DefaultDensity *)new DefaultDensity();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DefaultDensity, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_DefaultDensity) {
  {
    DefaultDensity *arg1 = (DefaultDensity *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_DefaultDensity(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_DefaultDensity, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DefaultDensity" "', argument " "1"" of type '" "DefaultDensity *""'"); 
    }
    arg1 = reinterpret_cast< DefaultDensity * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PiecewiseFlatHazardRate__SWIG_0) {
  {
    Date *arg1 = 0 ;
    std::vector< boost::shared_ptr< DefaultProbabilityHelper > > *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    Real arg4 ;
    BackwardFlat *arg5 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    std::vector< boost::shared_ptr< DefaultProbabilityHelper > > temp2 ;
    std::vector< boost::shared_ptr< DefaultProbabilityHelper > > *v2 ;
    void *argp3 ;
    int res3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int argvi = 0;
    PiecewiseFlatHazardRatePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_PiecewiseFlatHazardRate(referenceDate,instruments,dayCounter,accuracy,i);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_PiecewiseFlatHazardRate" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseFlatHazardRate" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_DefaultProbabilityHelper_t_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_PiecewiseFlatHazardRate. "
          "Expected an array of " "boost::shared_ptr< DefaultProbabilityHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< DefaultProbabilityHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityHelper_t,0) != -1) {
            temp2.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_PiecewiseFlatHazardRate. "
              "Expected an array of " "boost::shared_ptr< DefaultProbabilityHelper >");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_PiecewiseFlatHazardRate. "
          "Expected an array of " "boost::shared_ptr< DefaultProbabilityHelper >");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_PiecewiseFlatHazardRate" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseFlatHazardRate" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_PiecewiseFlatHazardRate" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_BackwardFlat,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_PiecewiseFlatHazardRate" "', argument " "5"" of type '" "BackwardFlat const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseFlatHazardRate" "', argument " "5"" of type '" "BackwardFlat const &""'"); 
    }
    arg5 = reinterpret_cast< BackwardFlat * >(argp5);
    {
      try {
        result = (PiecewiseFlatHazardRatePtr *)new_PiecewiseFlatHazardRatePtr__SWIG_0((Date const &)*arg1,(std::vector< boost::shared_ptr< DefaultProbabilityHelper > > const &)*arg2,(DayCounter const &)*arg3,arg4,(BackwardFlat const &)*arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PiecewiseFlatHazardRatePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PiecewiseFlatHazardRate__SWIG_1) {
  {
    Date *arg1 = 0 ;
    std::vector< boost::shared_ptr< DefaultProbabilityHelper > > *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    Real arg4 ;
    void *argp1 ;
    int res1 = 0 ;
    std::vector< boost::shared_ptr< DefaultProbabilityHelper > > temp2 ;
    std::vector< boost::shared_ptr< DefaultProbabilityHelper > > *v2 ;
    void *argp3 ;
    int res3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    PiecewiseFlatHazardRatePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_PiecewiseFlatHazardRate(referenceDate,instruments,dayCounter,accuracy);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_PiecewiseFlatHazardRate" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseFlatHazardRate" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_DefaultProbabilityHelper_t_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_PiecewiseFlatHazardRate. "
          "Expected an array of " "boost::shared_ptr< DefaultProbabilityHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< DefaultProbabilityHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityHelper_t,0) != -1) {
            temp2.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_PiecewiseFlatHazardRate. "
              "Expected an array of " "boost::shared_ptr< DefaultProbabilityHelper >");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_PiecewiseFlatHazardRate. "
          "Expected an array of " "boost::shared_ptr< DefaultProbabilityHelper >");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_PiecewiseFlatHazardRate" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseFlatHazardRate" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_PiecewiseFlatHazardRate" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    {
      try {
        result = (PiecewiseFlatHazardRatePtr *)new_PiecewiseFlatHazardRatePtr__SWIG_0((Date const &)*arg1,(std::vector< boost::shared_ptr< DefaultProbabilityHelper > > const &)*arg2,(DayCounter const &)*arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PiecewiseFlatHazardRatePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PiecewiseFlatHazardRate__SWIG_2) {
  {
    Date *arg1 = 0 ;
    std::vector< boost::shared_ptr< DefaultProbabilityHelper > > *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    std::vector< boost::shared_ptr< DefaultProbabilityHelper > > temp2 ;
    std::vector< boost::shared_ptr< DefaultProbabilityHelper > > *v2 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    PiecewiseFlatHazardRatePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_PiecewiseFlatHazardRate(referenceDate,instruments,dayCounter);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_PiecewiseFlatHazardRate" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseFlatHazardRate" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_DefaultProbabilityHelper_t_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_PiecewiseFlatHazardRate. "
          "Expected an array of " "boost::shared_ptr< DefaultProbabilityHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< DefaultProbabilityHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityHelper_t,0) != -1) {
            temp2.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_PiecewiseFlatHazardRate. "
              "Expected an array of " "boost::shared_ptr< DefaultProbabilityHelper >");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_PiecewiseFlatHazardRate. "
          "Expected an array of " "boost::shared_ptr< DefaultProbabilityHelper >");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_PiecewiseFlatHazardRate" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseFlatHazardRate" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    {
      try {
        result = (PiecewiseFlatHazardRatePtr *)new_PiecewiseFlatHazardRatePtr__SWIG_0((Date const &)*arg1,(std::vector< boost::shared_ptr< DefaultProbabilityHelper > > const &)*arg2,(DayCounter const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PiecewiseFlatHazardRatePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PiecewiseFlatHazardRate__SWIG_3) {
  {
    Integer arg1 ;
    Calendar *arg2 = 0 ;
    std::vector< boost::shared_ptr< DefaultProbabilityHelper > > *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    Real arg5 ;
    BackwardFlat *arg6 = 0 ;
    int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    std::vector< boost::shared_ptr< DefaultProbabilityHelper > > temp3 ;
    std::vector< boost::shared_ptr< DefaultProbabilityHelper > > *v3 ;
    void *argp4 ;
    int res4 = 0 ;
    double val5 ;
    int ecode5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    int argvi = 0;
    PiecewiseFlatHazardRatePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_PiecewiseFlatHazardRate(settlementDays,calendar,instruments,dayCounter,accuracy,i);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_PiecewiseFlatHazardRate" "', argument " "1"" of type '" "Integer""'");
    } 
    arg1 = static_cast< Integer >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_PiecewiseFlatHazardRate" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseFlatHazardRate" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_DefaultProbabilityHelper_t_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_PiecewiseFlatHazardRate. "
          "Expected an array of " "boost::shared_ptr< DefaultProbabilityHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< DefaultProbabilityHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityHelper_t,0) != -1) {
            temp3.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_PiecewiseFlatHazardRate. "
              "Expected an array of " "boost::shared_ptr< DefaultProbabilityHelper >");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_PiecewiseFlatHazardRate. "
          "Expected an array of " "boost::shared_ptr< DefaultProbabilityHelper >");
      }
    }
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_PiecewiseFlatHazardRate" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseFlatHazardRate" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_PiecewiseFlatHazardRate" "', argument " "5"" of type '" "Real""'");
    } 
    arg5 = static_cast< Real >(val5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_BackwardFlat,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_PiecewiseFlatHazardRate" "', argument " "6"" of type '" "BackwardFlat const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseFlatHazardRate" "', argument " "6"" of type '" "BackwardFlat const &""'"); 
    }
    arg6 = reinterpret_cast< BackwardFlat * >(argp6);
    {
      try {
        result = (PiecewiseFlatHazardRatePtr *)new_PiecewiseFlatHazardRatePtr__SWIG_3(arg1,(Calendar const &)*arg2,(std::vector< boost::shared_ptr< DefaultProbabilityHelper > > const &)*arg3,(DayCounter const &)*arg4,arg5,(BackwardFlat const &)*arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PiecewiseFlatHazardRatePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PiecewiseFlatHazardRate__SWIG_4) {
  {
    Integer arg1 ;
    Calendar *arg2 = 0 ;
    std::vector< boost::shared_ptr< DefaultProbabilityHelper > > *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    Real arg5 ;
    int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    std::vector< boost::shared_ptr< DefaultProbabilityHelper > > temp3 ;
    std::vector< boost::shared_ptr< DefaultProbabilityHelper > > *v3 ;
    void *argp4 ;
    int res4 = 0 ;
    double val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    PiecewiseFlatHazardRatePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_PiecewiseFlatHazardRate(settlementDays,calendar,instruments,dayCounter,accuracy);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_PiecewiseFlatHazardRate" "', argument " "1"" of type '" "Integer""'");
    } 
    arg1 = static_cast< Integer >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_PiecewiseFlatHazardRate" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseFlatHazardRate" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_DefaultProbabilityHelper_t_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_PiecewiseFlatHazardRate. "
          "Expected an array of " "boost::shared_ptr< DefaultProbabilityHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< DefaultProbabilityHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityHelper_t,0) != -1) {
            temp3.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_PiecewiseFlatHazardRate. "
              "Expected an array of " "boost::shared_ptr< DefaultProbabilityHelper >");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_PiecewiseFlatHazardRate. "
          "Expected an array of " "boost::shared_ptr< DefaultProbabilityHelper >");
      }
    }
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_PiecewiseFlatHazardRate" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseFlatHazardRate" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_PiecewiseFlatHazardRate" "', argument " "5"" of type '" "Real""'");
    } 
    arg5 = static_cast< Real >(val5);
    {
      try {
        result = (PiecewiseFlatHazardRatePtr *)new_PiecewiseFlatHazardRatePtr__SWIG_3(arg1,(Calendar const &)*arg2,(std::vector< boost::shared_ptr< DefaultProbabilityHelper > > const &)*arg3,(DayCounter const &)*arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PiecewiseFlatHazardRatePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PiecewiseFlatHazardRate__SWIG_5) {
  {
    Integer arg1 ;
    Calendar *arg2 = 0 ;
    std::vector< boost::shared_ptr< DefaultProbabilityHelper > > *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    std::vector< boost::shared_ptr< DefaultProbabilityHelper > > temp3 ;
    std::vector< boost::shared_ptr< DefaultProbabilityHelper > > *v3 ;
    void *argp4 ;
    int res4 = 0 ;
    int argvi = 0;
    PiecewiseFlatHazardRatePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_PiecewiseFlatHazardRate(settlementDays,calendar,instruments,dayCounter);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_PiecewiseFlatHazardRate" "', argument " "1"" of type '" "Integer""'");
    } 
    arg1 = static_cast< Integer >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_PiecewiseFlatHazardRate" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseFlatHazardRate" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_DefaultProbabilityHelper_t_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_PiecewiseFlatHazardRate. "
          "Expected an array of " "boost::shared_ptr< DefaultProbabilityHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< DefaultProbabilityHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityHelper_t,0) != -1) {
            temp3.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_PiecewiseFlatHazardRate. "
              "Expected an array of " "boost::shared_ptr< DefaultProbabilityHelper >");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_PiecewiseFlatHazardRate. "
          "Expected an array of " "boost::shared_ptr< DefaultProbabilityHelper >");
      }
    }
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_PiecewiseFlatHazardRate" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseFlatHazardRate" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    {
      try {
        result = (PiecewiseFlatHazardRatePtr *)new_PiecewiseFlatHazardRatePtr__SWIG_3(arg1,(Calendar const &)*arg2,(std::vector< boost::shared_ptr< DefaultProbabilityHelper > > const &)*arg3,(DayCounter const &)*arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PiecewiseFlatHazardRatePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PiecewiseFlatHazardRate) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< DefaultProbabilityHelper > >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_DefaultProbabilityHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< DefaultProbabilityHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< DefaultProbabilityHelper > >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_DefaultProbabilityHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< DefaultProbabilityHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< DefaultProbabilityHelper > >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_DefaultProbabilityHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< DefaultProbabilityHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< DefaultProbabilityHelper > >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_DefaultProbabilityHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< DefaultProbabilityHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_BackwardFlat, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< DefaultProbabilityHelper > >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_DefaultProbabilityHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< DefaultProbabilityHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< DefaultProbabilityHelper > >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_DefaultProbabilityHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< DefaultProbabilityHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_BackwardFlat, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_PiecewiseFlatHazardRate__SWIG_2); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_PiecewiseFlatHazardRate__SWIG_1); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_PiecewiseFlatHazardRate__SWIG_5); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_PiecewiseFlatHazardRate__SWIG_0); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_PiecewiseFlatHazardRate__SWIG_4); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_PiecewiseFlatHazardRate__SWIG_3); return;
    }
  }
  
  croak("No matching function for overloaded 'new_PiecewiseFlatHazardRate'");
  XSRETURN(0);
}


XS(_wrap_PiecewiseFlatHazardRate_dates) {
  {
    PiecewiseFlatHazardRatePtr *arg1 = (PiecewiseFlatHazardRatePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Date > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: PiecewiseFlatHazardRate_dates(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PiecewiseFlatHazardRatePtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PiecewiseFlatHazardRate_dates" "', argument " "1"" of type '" "PiecewiseFlatHazardRatePtr *""'"); 
    }
    arg1 = reinterpret_cast< PiecewiseFlatHazardRatePtr * >(argp1);
    {
      try {
        result = (std::vector< Date > *) &PiecewiseFlatHazardRatePtr_dates(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_Date_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_PiecewiseFlatHazardRate_times) {
  {
    PiecewiseFlatHazardRatePtr *arg1 = (PiecewiseFlatHazardRatePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Time > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: PiecewiseFlatHazardRate_times(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PiecewiseFlatHazardRatePtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PiecewiseFlatHazardRate_times" "', argument " "1"" of type '" "PiecewiseFlatHazardRatePtr *""'"); 
    }
    arg1 = reinterpret_cast< PiecewiseFlatHazardRatePtr * >(argp1);
    {
      try {
        result = (std::vector< Time > *) &PiecewiseFlatHazardRatePtr_times(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_PiecewiseFlatHazardRate_nodes) {
  {
    PiecewiseFlatHazardRatePtr *arg1 = (PiecewiseFlatHazardRatePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< std::pair< Date,Real > > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: PiecewiseFlatHazardRate_nodes(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PiecewiseFlatHazardRatePtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PiecewiseFlatHazardRate_nodes" "', argument " "1"" of type '" "PiecewiseFlatHazardRatePtr *""'"); 
    }
    arg1 = reinterpret_cast< PiecewiseFlatHazardRatePtr * >(argp1);
    {
      try {
        result = PiecewiseFlatHazardRatePtr_nodes(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        std::pair< Date,double >* ptr = new std::pair< Date,double >(result[i]);
        svs[i] = sv_newmortal();
        SWIG_MakePtr(svs[i], (void*) ptr, 
          SWIGTYPE_p_std__pairT_Date_double_t, SWIG_SHADOW|0);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_PiecewiseFlatHazardRate) {
  {
    PiecewiseFlatHazardRatePtr *arg1 = (PiecewiseFlatHazardRatePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_PiecewiseFlatHazardRate(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PiecewiseFlatHazardRatePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_PiecewiseFlatHazardRate" "', argument " "1"" of type '" "PiecewiseFlatHazardRatePtr *""'"); 
    }
    arg1 = reinterpret_cast< PiecewiseFlatHazardRatePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Protection) {
  {
    int argvi = 0;
    Protection *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Protection();");
    }
    {
      try {
        result = (Protection *)new Protection();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Protection, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_Protection) {
  {
    Protection *arg1 = (Protection *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Protection(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Protection, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Protection" "', argument " "1"" of type '" "Protection *""'"); 
    }
    arg1 = reinterpret_cast< Protection * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CreditDefaultSwap__SWIG_0) {
  {
    Protection::Side arg1 ;
    Real arg2 ;
    Rate arg3 ;
    Schedule *arg4 = 0 ;
    BusinessDayConvention arg5 ;
    DayCounter *arg6 = 0 ;
    bool arg7 ;
    bool arg8 ;
    int val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    bool val7 ;
    int ecode7 = 0 ;
    bool val8 ;
    int ecode8 = 0 ;
    int argvi = 0;
    CreditDefaultSwapPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 8) || (items > 8)) {
      SWIG_croak("Usage: new_CreditDefaultSwap(side,notional,spread,schedule,paymentConvention,dayCounter,settlesAccrual,paysAtDefaultTime);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_CreditDefaultSwap" "', argument " "1"" of type '" "Protection::Side""'");
    } 
    arg1 = static_cast< Protection::Side >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_CreditDefaultSwap" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_CreditDefaultSwap" "', argument " "3"" of type '" "Rate""'");
    } 
    arg3 = static_cast< Rate >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_CreditDefaultSwap" "', argument " "4"" of type '" "Schedule const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CreditDefaultSwap" "', argument " "4"" of type '" "Schedule const &""'"); 
    }
    arg4 = reinterpret_cast< Schedule * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_CreditDefaultSwap" "', argument " "5"" of type '" "BusinessDayConvention""'");
    } 
    arg5 = static_cast< BusinessDayConvention >(val5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_CreditDefaultSwap" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CreditDefaultSwap" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    arg6 = reinterpret_cast< DayCounter * >(argp6);
    ecode7 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_CreditDefaultSwap" "', argument " "7"" of type '" "bool""'");
    } 
    arg7 = static_cast< bool >(val7);
    ecode8 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_CreditDefaultSwap" "', argument " "8"" of type '" "bool""'");
    } 
    arg8 = static_cast< bool >(val8);
    {
      try {
        result = (CreditDefaultSwapPtr *)new_CreditDefaultSwapPtr__SWIG_0(arg1,arg2,arg3,(Schedule const &)*arg4,arg5,(DayCounter const &)*arg6,arg7,arg8);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CreditDefaultSwapPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CreditDefaultSwap__SWIG_1) {
  {
    Protection::Side arg1 ;
    Real arg2 ;
    Rate arg3 ;
    Schedule *arg4 = 0 ;
    BusinessDayConvention arg5 ;
    DayCounter *arg6 = 0 ;
    bool arg7 ;
    int val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    bool val7 ;
    int ecode7 = 0 ;
    int argvi = 0;
    CreditDefaultSwapPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: new_CreditDefaultSwap(side,notional,spread,schedule,paymentConvention,dayCounter,settlesAccrual);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_CreditDefaultSwap" "', argument " "1"" of type '" "Protection::Side""'");
    } 
    arg1 = static_cast< Protection::Side >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_CreditDefaultSwap" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_CreditDefaultSwap" "', argument " "3"" of type '" "Rate""'");
    } 
    arg3 = static_cast< Rate >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_CreditDefaultSwap" "', argument " "4"" of type '" "Schedule const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CreditDefaultSwap" "', argument " "4"" of type '" "Schedule const &""'"); 
    }
    arg4 = reinterpret_cast< Schedule * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_CreditDefaultSwap" "', argument " "5"" of type '" "BusinessDayConvention""'");
    } 
    arg5 = static_cast< BusinessDayConvention >(val5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_CreditDefaultSwap" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CreditDefaultSwap" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    arg6 = reinterpret_cast< DayCounter * >(argp6);
    ecode7 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_CreditDefaultSwap" "', argument " "7"" of type '" "bool""'");
    } 
    arg7 = static_cast< bool >(val7);
    {
      try {
        result = (CreditDefaultSwapPtr *)new_CreditDefaultSwapPtr__SWIG_0(arg1,arg2,arg3,(Schedule const &)*arg4,arg5,(DayCounter const &)*arg6,arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CreditDefaultSwapPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CreditDefaultSwap__SWIG_2) {
  {
    Protection::Side arg1 ;
    Real arg2 ;
    Rate arg3 ;
    Schedule *arg4 = 0 ;
    BusinessDayConvention arg5 ;
    DayCounter *arg6 = 0 ;
    int val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    int argvi = 0;
    CreditDefaultSwapPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_CreditDefaultSwap(side,notional,spread,schedule,paymentConvention,dayCounter);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_CreditDefaultSwap" "', argument " "1"" of type '" "Protection::Side""'");
    } 
    arg1 = static_cast< Protection::Side >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_CreditDefaultSwap" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_CreditDefaultSwap" "', argument " "3"" of type '" "Rate""'");
    } 
    arg3 = static_cast< Rate >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_CreditDefaultSwap" "', argument " "4"" of type '" "Schedule const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CreditDefaultSwap" "', argument " "4"" of type '" "Schedule const &""'"); 
    }
    arg4 = reinterpret_cast< Schedule * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_CreditDefaultSwap" "', argument " "5"" of type '" "BusinessDayConvention""'");
    } 
    arg5 = static_cast< BusinessDayConvention >(val5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_CreditDefaultSwap" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CreditDefaultSwap" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    arg6 = reinterpret_cast< DayCounter * >(argp6);
    {
      try {
        result = (CreditDefaultSwapPtr *)new_CreditDefaultSwapPtr__SWIG_0(arg1,arg2,arg3,(Schedule const &)*arg4,arg5,(DayCounter const &)*arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CreditDefaultSwapPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CreditDefaultSwap__SWIG_3) {
  {
    Protection::Side arg1 ;
    Real arg2 ;
    Rate arg3 ;
    Rate arg4 ;
    Schedule *arg5 = 0 ;
    BusinessDayConvention arg6 ;
    DayCounter *arg7 = 0 ;
    bool arg8 ;
    bool arg9 ;
    int val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    bool val8 ;
    int ecode8 = 0 ;
    bool val9 ;
    int ecode9 = 0 ;
    int argvi = 0;
    CreditDefaultSwapPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 9) || (items > 9)) {
      SWIG_croak("Usage: new_CreditDefaultSwap(side,notional,upfront,spread,schedule,paymentConvention,dayCounter,settlesAccrual,paysAtDefaultTime);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_CreditDefaultSwap" "', argument " "1"" of type '" "Protection::Side""'");
    } 
    arg1 = static_cast< Protection::Side >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_CreditDefaultSwap" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_CreditDefaultSwap" "', argument " "3"" of type '" "Rate""'");
    } 
    arg3 = static_cast< Rate >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_CreditDefaultSwap" "', argument " "4"" of type '" "Rate""'");
    } 
    arg4 = static_cast< Rate >(val4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_CreditDefaultSwap" "', argument " "5"" of type '" "Schedule const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CreditDefaultSwap" "', argument " "5"" of type '" "Schedule const &""'"); 
    }
    arg5 = reinterpret_cast< Schedule * >(argp5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_CreditDefaultSwap" "', argument " "6"" of type '" "BusinessDayConvention""'");
    } 
    arg6 = static_cast< BusinessDayConvention >(val6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_CreditDefaultSwap" "', argument " "7"" of type '" "DayCounter const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CreditDefaultSwap" "', argument " "7"" of type '" "DayCounter const &""'"); 
    }
    arg7 = reinterpret_cast< DayCounter * >(argp7);
    ecode8 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_CreditDefaultSwap" "', argument " "8"" of type '" "bool""'");
    } 
    arg8 = static_cast< bool >(val8);
    ecode9 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(8), &val9);
    if (!SWIG_IsOK(ecode9)) {
      SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "new_CreditDefaultSwap" "', argument " "9"" of type '" "bool""'");
    } 
    arg9 = static_cast< bool >(val9);
    {
      try {
        result = (CreditDefaultSwapPtr *)new_CreditDefaultSwapPtr__SWIG_3(arg1,arg2,arg3,arg4,(Schedule const &)*arg5,arg6,(DayCounter const &)*arg7,arg8,arg9);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CreditDefaultSwapPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CreditDefaultSwap__SWIG_4) {
  {
    Protection::Side arg1 ;
    Real arg2 ;
    Rate arg3 ;
    Rate arg4 ;
    Schedule *arg5 = 0 ;
    BusinessDayConvention arg6 ;
    DayCounter *arg7 = 0 ;
    bool arg8 ;
    int val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    bool val8 ;
    int ecode8 = 0 ;
    int argvi = 0;
    CreditDefaultSwapPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 8) || (items > 8)) {
      SWIG_croak("Usage: new_CreditDefaultSwap(side,notional,upfront,spread,schedule,paymentConvention,dayCounter,settlesAccrual);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_CreditDefaultSwap" "', argument " "1"" of type '" "Protection::Side""'");
    } 
    arg1 = static_cast< Protection::Side >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_CreditDefaultSwap" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_CreditDefaultSwap" "', argument " "3"" of type '" "Rate""'");
    } 
    arg3 = static_cast< Rate >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_CreditDefaultSwap" "', argument " "4"" of type '" "Rate""'");
    } 
    arg4 = static_cast< Rate >(val4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_CreditDefaultSwap" "', argument " "5"" of type '" "Schedule const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CreditDefaultSwap" "', argument " "5"" of type '" "Schedule const &""'"); 
    }
    arg5 = reinterpret_cast< Schedule * >(argp5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_CreditDefaultSwap" "', argument " "6"" of type '" "BusinessDayConvention""'");
    } 
    arg6 = static_cast< BusinessDayConvention >(val6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_CreditDefaultSwap" "', argument " "7"" of type '" "DayCounter const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CreditDefaultSwap" "', argument " "7"" of type '" "DayCounter const &""'"); 
    }
    arg7 = reinterpret_cast< DayCounter * >(argp7);
    ecode8 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_CreditDefaultSwap" "', argument " "8"" of type '" "bool""'");
    } 
    arg8 = static_cast< bool >(val8);
    {
      try {
        result = (CreditDefaultSwapPtr *)new_CreditDefaultSwapPtr__SWIG_3(arg1,arg2,arg3,arg4,(Schedule const &)*arg5,arg6,(DayCounter const &)*arg7,arg8);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CreditDefaultSwapPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CreditDefaultSwap__SWIG_5) {
  {
    Protection::Side arg1 ;
    Real arg2 ;
    Rate arg3 ;
    Rate arg4 ;
    Schedule *arg5 = 0 ;
    BusinessDayConvention arg6 ;
    DayCounter *arg7 = 0 ;
    int val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    int argvi = 0;
    CreditDefaultSwapPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: new_CreditDefaultSwap(side,notional,upfront,spread,schedule,paymentConvention,dayCounter);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_CreditDefaultSwap" "', argument " "1"" of type '" "Protection::Side""'");
    } 
    arg1 = static_cast< Protection::Side >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_CreditDefaultSwap" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_CreditDefaultSwap" "', argument " "3"" of type '" "Rate""'");
    } 
    arg3 = static_cast< Rate >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_CreditDefaultSwap" "', argument " "4"" of type '" "Rate""'");
    } 
    arg4 = static_cast< Rate >(val4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_CreditDefaultSwap" "', argument " "5"" of type '" "Schedule const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CreditDefaultSwap" "', argument " "5"" of type '" "Schedule const &""'"); 
    }
    arg5 = reinterpret_cast< Schedule * >(argp5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_CreditDefaultSwap" "', argument " "6"" of type '" "BusinessDayConvention""'");
    } 
    arg6 = static_cast< BusinessDayConvention >(val6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_CreditDefaultSwap" "', argument " "7"" of type '" "DayCounter const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CreditDefaultSwap" "', argument " "7"" of type '" "DayCounter const &""'"); 
    }
    arg7 = reinterpret_cast< DayCounter * >(argp7);
    {
      try {
        result = (CreditDefaultSwapPtr *)new_CreditDefaultSwapPtr__SWIG_3(arg1,arg2,arg3,arg4,(Schedule const &)*arg5,arg6,(DayCounter const &)*arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CreditDefaultSwapPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CreditDefaultSwap) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 8) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 8) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 9) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(8), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_CreditDefaultSwap__SWIG_2); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_CreditDefaultSwap__SWIG_1); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_CreditDefaultSwap__SWIG_5); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_CreditDefaultSwap__SWIG_0); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_CreditDefaultSwap__SWIG_4); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_CreditDefaultSwap__SWIG_3); return;
    }
  }
  
  croak("No matching function for overloaded 'new_CreditDefaultSwap'");
  XSRETURN(0);
}


XS(_wrap_CreditDefaultSwap_side) {
  {
    CreditDefaultSwapPtr *arg1 = (CreditDefaultSwapPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Protection::Side result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CreditDefaultSwap_side(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CreditDefaultSwapPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CreditDefaultSwap_side" "', argument " "1"" of type '" "CreditDefaultSwapPtr const *""'"); 
    }
    arg1 = reinterpret_cast< CreditDefaultSwapPtr * >(argp1);
    {
      try {
        result = (Protection::Side)CreditDefaultSwapPtr_side((CreditDefaultSwapPtr const *)arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CreditDefaultSwap_notional) {
  {
    CreditDefaultSwapPtr *arg1 = (CreditDefaultSwapPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CreditDefaultSwap_notional(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CreditDefaultSwapPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CreditDefaultSwap_notional" "', argument " "1"" of type '" "CreditDefaultSwapPtr const *""'"); 
    }
    arg1 = reinterpret_cast< CreditDefaultSwapPtr * >(argp1);
    {
      try {
        result = (Real)CreditDefaultSwapPtr_notional((CreditDefaultSwapPtr const *)arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CreditDefaultSwap_runningSpread) {
  {
    CreditDefaultSwapPtr *arg1 = (CreditDefaultSwapPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CreditDefaultSwap_runningSpread(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CreditDefaultSwapPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CreditDefaultSwap_runningSpread" "', argument " "1"" of type '" "CreditDefaultSwapPtr const *""'"); 
    }
    arg1 = reinterpret_cast< CreditDefaultSwapPtr * >(argp1);
    {
      try {
        result = (Rate)CreditDefaultSwapPtr_runningSpread((CreditDefaultSwapPtr const *)arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CreditDefaultSwap_upfront) {
  {
    CreditDefaultSwapPtr *arg1 = (CreditDefaultSwapPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    doubleOrNull result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CreditDefaultSwap_upfront(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CreditDefaultSwapPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CreditDefaultSwap_upfront" "', argument " "1"" of type '" "CreditDefaultSwapPtr const *""'"); 
    }
    arg1 = reinterpret_cast< CreditDefaultSwapPtr * >(argp1);
    {
      try {
        result = CreditDefaultSwapPtr_upfront((CreditDefaultSwapPtr const *)arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new doubleOrNull(static_cast< const doubleOrNull& >(result))), SWIGTYPE_p_doubleOrNull, SWIG_POINTER_OWN | 0); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CreditDefaultSwap_settlesAccrual) {
  {
    CreditDefaultSwapPtr *arg1 = (CreditDefaultSwapPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CreditDefaultSwap_settlesAccrual(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CreditDefaultSwapPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CreditDefaultSwap_settlesAccrual" "', argument " "1"" of type '" "CreditDefaultSwapPtr const *""'"); 
    }
    arg1 = reinterpret_cast< CreditDefaultSwapPtr * >(argp1);
    {
      try {
        result = (bool)CreditDefaultSwapPtr_settlesAccrual((CreditDefaultSwapPtr const *)arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CreditDefaultSwap_paysAtDefaultTime) {
  {
    CreditDefaultSwapPtr *arg1 = (CreditDefaultSwapPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CreditDefaultSwap_paysAtDefaultTime(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CreditDefaultSwapPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CreditDefaultSwap_paysAtDefaultTime" "', argument " "1"" of type '" "CreditDefaultSwapPtr const *""'"); 
    }
    arg1 = reinterpret_cast< CreditDefaultSwapPtr * >(argp1);
    {
      try {
        result = (bool)CreditDefaultSwapPtr_paysAtDefaultTime((CreditDefaultSwapPtr const *)arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CreditDefaultSwap_fairSpread) {
  {
    CreditDefaultSwapPtr *arg1 = (CreditDefaultSwapPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CreditDefaultSwap_fairSpread(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CreditDefaultSwapPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CreditDefaultSwap_fairSpread" "', argument " "1"" of type '" "CreditDefaultSwapPtr const *""'"); 
    }
    arg1 = reinterpret_cast< CreditDefaultSwapPtr * >(argp1);
    {
      try {
        result = (Rate)CreditDefaultSwapPtr_fairSpread((CreditDefaultSwapPtr const *)arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CreditDefaultSwap_fairUpfront) {
  {
    CreditDefaultSwapPtr *arg1 = (CreditDefaultSwapPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CreditDefaultSwap_fairUpfront(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CreditDefaultSwapPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CreditDefaultSwap_fairUpfront" "', argument " "1"" of type '" "CreditDefaultSwapPtr const *""'"); 
    }
    arg1 = reinterpret_cast< CreditDefaultSwapPtr * >(argp1);
    {
      try {
        result = (Rate)CreditDefaultSwapPtr_fairUpfront((CreditDefaultSwapPtr const *)arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CreditDefaultSwap_couponLegBPS) {
  {
    CreditDefaultSwapPtr *arg1 = (CreditDefaultSwapPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CreditDefaultSwap_couponLegBPS(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CreditDefaultSwapPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CreditDefaultSwap_couponLegBPS" "', argument " "1"" of type '" "CreditDefaultSwapPtr const *""'"); 
    }
    arg1 = reinterpret_cast< CreditDefaultSwapPtr * >(argp1);
    {
      try {
        result = (Real)CreditDefaultSwapPtr_couponLegBPS((CreditDefaultSwapPtr const *)arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CreditDefaultSwap_couponLegNPV) {
  {
    CreditDefaultSwapPtr *arg1 = (CreditDefaultSwapPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CreditDefaultSwap_couponLegNPV(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CreditDefaultSwapPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CreditDefaultSwap_couponLegNPV" "', argument " "1"" of type '" "CreditDefaultSwapPtr const *""'"); 
    }
    arg1 = reinterpret_cast< CreditDefaultSwapPtr * >(argp1);
    {
      try {
        result = (Real)CreditDefaultSwapPtr_couponLegNPV((CreditDefaultSwapPtr const *)arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CreditDefaultSwap_defaultLegNPV) {
  {
    CreditDefaultSwapPtr *arg1 = (CreditDefaultSwapPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CreditDefaultSwap_defaultLegNPV(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CreditDefaultSwapPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CreditDefaultSwap_defaultLegNPV" "', argument " "1"" of type '" "CreditDefaultSwapPtr const *""'"); 
    }
    arg1 = reinterpret_cast< CreditDefaultSwapPtr * >(argp1);
    {
      try {
        result = (Real)CreditDefaultSwapPtr_defaultLegNPV((CreditDefaultSwapPtr const *)arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CreditDefaultSwap_upfrontBPS) {
  {
    CreditDefaultSwapPtr *arg1 = (CreditDefaultSwapPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CreditDefaultSwap_upfrontBPS(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CreditDefaultSwapPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CreditDefaultSwap_upfrontBPS" "', argument " "1"" of type '" "CreditDefaultSwapPtr const *""'"); 
    }
    arg1 = reinterpret_cast< CreditDefaultSwapPtr * >(argp1);
    {
      try {
        result = (Real)CreditDefaultSwapPtr_upfrontBPS((CreditDefaultSwapPtr const *)arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CreditDefaultSwap_upfrontNPV) {
  {
    CreditDefaultSwapPtr *arg1 = (CreditDefaultSwapPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CreditDefaultSwap_upfrontNPV(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CreditDefaultSwapPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CreditDefaultSwap_upfrontNPV" "', argument " "1"" of type '" "CreditDefaultSwapPtr const *""'"); 
    }
    arg1 = reinterpret_cast< CreditDefaultSwapPtr * >(argp1);
    {
      try {
        result = (Real)CreditDefaultSwapPtr_upfrontNPV((CreditDefaultSwapPtr const *)arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CreditDefaultSwap_impliedHazardRate__SWIG_0) {
  {
    CreditDefaultSwapPtr *arg1 = (CreditDefaultSwapPtr *) 0 ;
    Real arg2 ;
    Handle< YieldTermStructure > *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    Real arg5 ;
    Real arg6 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    double val5 ;
    int ecode5 = 0 ;
    double val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: CreditDefaultSwap_impliedHazardRate(self,targetNPV,discountCurve,dayCounter,recoveryRate,accuracy);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CreditDefaultSwapPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CreditDefaultSwap_impliedHazardRate" "', argument " "1"" of type '" "CreditDefaultSwapPtr const *""'"); 
    }
    arg1 = reinterpret_cast< CreditDefaultSwapPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CreditDefaultSwap_impliedHazardRate" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CreditDefaultSwap_impliedHazardRate" "', argument " "3"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CreditDefaultSwap_impliedHazardRate" "', argument " "3"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< YieldTermStructure > * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "CreditDefaultSwap_impliedHazardRate" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CreditDefaultSwap_impliedHazardRate" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CreditDefaultSwap_impliedHazardRate" "', argument " "5"" of type '" "Real""'");
    } 
    arg5 = static_cast< Real >(val5);
    ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "CreditDefaultSwap_impliedHazardRate" "', argument " "6"" of type '" "Real""'");
    } 
    arg6 = static_cast< Real >(val6);
    {
      try {
        result = (Rate)CreditDefaultSwapPtr_impliedHazardRate__SWIG_0((CreditDefaultSwapPtr const *)arg1,arg2,(Handle< YieldTermStructure > const &)*arg3,(DayCounter const &)*arg4,arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CreditDefaultSwap_impliedHazardRate__SWIG_1) {
  {
    CreditDefaultSwapPtr *arg1 = (CreditDefaultSwapPtr *) 0 ;
    Real arg2 ;
    Handle< YieldTermStructure > *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    Real arg5 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    double val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: CreditDefaultSwap_impliedHazardRate(self,targetNPV,discountCurve,dayCounter,recoveryRate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CreditDefaultSwapPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CreditDefaultSwap_impliedHazardRate" "', argument " "1"" of type '" "CreditDefaultSwapPtr const *""'"); 
    }
    arg1 = reinterpret_cast< CreditDefaultSwapPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CreditDefaultSwap_impliedHazardRate" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CreditDefaultSwap_impliedHazardRate" "', argument " "3"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CreditDefaultSwap_impliedHazardRate" "', argument " "3"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< YieldTermStructure > * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "CreditDefaultSwap_impliedHazardRate" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CreditDefaultSwap_impliedHazardRate" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CreditDefaultSwap_impliedHazardRate" "', argument " "5"" of type '" "Real""'");
    } 
    arg5 = static_cast< Real >(val5);
    {
      try {
        result = (Rate)CreditDefaultSwapPtr_impliedHazardRate__SWIG_0((CreditDefaultSwapPtr const *)arg1,arg2,(Handle< YieldTermStructure > const &)*arg3,(DayCounter const &)*arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CreditDefaultSwap_impliedHazardRate__SWIG_2) {
  {
    CreditDefaultSwapPtr *arg1 = (CreditDefaultSwapPtr *) 0 ;
    Real arg2 ;
    Handle< YieldTermStructure > *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: CreditDefaultSwap_impliedHazardRate(self,targetNPV,discountCurve,dayCounter);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CreditDefaultSwapPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CreditDefaultSwap_impliedHazardRate" "', argument " "1"" of type '" "CreditDefaultSwapPtr const *""'"); 
    }
    arg1 = reinterpret_cast< CreditDefaultSwapPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CreditDefaultSwap_impliedHazardRate" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CreditDefaultSwap_impliedHazardRate" "', argument " "3"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CreditDefaultSwap_impliedHazardRate" "', argument " "3"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< YieldTermStructure > * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "CreditDefaultSwap_impliedHazardRate" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CreditDefaultSwap_impliedHazardRate" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    {
      try {
        result = (Rate)CreditDefaultSwapPtr_impliedHazardRate__SWIG_0((CreditDefaultSwapPtr const *)arg1,arg2,(Handle< YieldTermStructure > const &)*arg3,(DayCounter const &)*arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CreditDefaultSwap_impliedHazardRate) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_CreditDefaultSwapPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_CreditDefaultSwapPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_CreditDefaultSwapPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CreditDefaultSwap_impliedHazardRate__SWIG_2); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CreditDefaultSwap_impliedHazardRate__SWIG_1); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CreditDefaultSwap_impliedHazardRate__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'CreditDefaultSwap_impliedHazardRate'");
  XSRETURN(0);
}


XS(_wrap_CreditDefaultSwap_coupons) {
  {
    CreditDefaultSwapPtr *arg1 = (CreditDefaultSwapPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< boost::shared_ptr< CashFlow > > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CreditDefaultSwap_coupons(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CreditDefaultSwapPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CreditDefaultSwap_coupons" "', argument " "1"" of type '" "CreditDefaultSwapPtr *""'"); 
    }
    arg1 = reinterpret_cast< CreditDefaultSwapPtr * >(argp1);
    {
      try {
        result = CreditDefaultSwapPtr_coupons(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        boost::shared_ptr< CashFlow >* ptr = new boost::shared_ptr< CashFlow >(result[i]);
        svs[i] = sv_newmortal();
        SWIG_MakePtr(svs[i], (void*) ptr, 
          SWIGTYPE_p_boost__shared_ptrT_CashFlow_t, SWIG_SHADOW|0);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_CreditDefaultSwap) {
  {
    CreditDefaultSwapPtr *arg1 = (CreditDefaultSwapPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_CreditDefaultSwap(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CreditDefaultSwapPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CreditDefaultSwap" "', argument " "1"" of type '" "CreditDefaultSwapPtr *""'"); 
    }
    arg1 = reinterpret_cast< CreditDefaultSwapPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MidPointCdsEngine) {
  {
    Handle< DefaultProbabilityTermStructure > *arg1 = 0 ;
    Real arg2 ;
    Handle< YieldTermStructure > *arg3 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    MidPointCdsEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_MidPointCdsEngine(probability,recoveryRate,discountCurve);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_DefaultProbabilityTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MidPointCdsEngine" "', argument " "1"" of type '" "Handle< DefaultProbabilityTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MidPointCdsEngine" "', argument " "1"" of type '" "Handle< DefaultProbabilityTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< DefaultProbabilityTermStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_MidPointCdsEngine" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_MidPointCdsEngine" "', argument " "3"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MidPointCdsEngine" "', argument " "3"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< YieldTermStructure > * >(argp3);
    {
      try {
        result = (MidPointCdsEnginePtr *)new_MidPointCdsEnginePtr((Handle< DefaultProbabilityTermStructure > const &)*arg1,arg2,(Handle< YieldTermStructure > const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MidPointCdsEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_MidPointCdsEngine) {
  {
    MidPointCdsEnginePtr *arg1 = (MidPointCdsEnginePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_MidPointCdsEngine(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_MidPointCdsEnginePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MidPointCdsEngine" "', argument " "1"" of type '" "MidPointCdsEnginePtr *""'"); 
    }
    arg1 = reinterpret_cast< MidPointCdsEnginePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_IntegralCdsEngine__SWIG_0) {
  {
    Period *arg1 = 0 ;
    Handle< DefaultProbabilityTermStructure > *arg2 = 0 ;
    Real arg3 ;
    Handle< YieldTermStructure > *arg4 = 0 ;
    bool arg5 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    bool val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    IntegralCdsEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_IntegralCdsEngine(integrationStep,probability,recoveryRate,discountCurve,includeSettlementDateFlows);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_IntegralCdsEngine" "', argument " "1"" of type '" "Period const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_IntegralCdsEngine" "', argument " "1"" of type '" "Period const &""'"); 
    }
    arg1 = reinterpret_cast< Period * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_DefaultProbabilityTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_IntegralCdsEngine" "', argument " "2"" of type '" "Handle< DefaultProbabilityTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_IntegralCdsEngine" "', argument " "2"" of type '" "Handle< DefaultProbabilityTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< DefaultProbabilityTermStructure > * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_IntegralCdsEngine" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_IntegralCdsEngine" "', argument " "4"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_IntegralCdsEngine" "', argument " "4"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg4 = reinterpret_cast< Handle< YieldTermStructure > * >(argp4);
    ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_IntegralCdsEngine" "', argument " "5"" of type '" "bool""'");
    } 
    arg5 = static_cast< bool >(val5);
    {
      try {
        result = (IntegralCdsEnginePtr *)new_IntegralCdsEnginePtr__SWIG_0((Period const &)*arg1,(Handle< DefaultProbabilityTermStructure > const &)*arg2,arg3,(Handle< YieldTermStructure > const &)*arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IntegralCdsEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_IntegralCdsEngine__SWIG_1) {
  {
    Period *arg1 = 0 ;
    Handle< DefaultProbabilityTermStructure > *arg2 = 0 ;
    Real arg3 ;
    Handle< YieldTermStructure > *arg4 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int argvi = 0;
    IntegralCdsEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_IntegralCdsEngine(integrationStep,probability,recoveryRate,discountCurve);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_IntegralCdsEngine" "', argument " "1"" of type '" "Period const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_IntegralCdsEngine" "', argument " "1"" of type '" "Period const &""'"); 
    }
    arg1 = reinterpret_cast< Period * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_DefaultProbabilityTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_IntegralCdsEngine" "', argument " "2"" of type '" "Handle< DefaultProbabilityTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_IntegralCdsEngine" "', argument " "2"" of type '" "Handle< DefaultProbabilityTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< DefaultProbabilityTermStructure > * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_IntegralCdsEngine" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_IntegralCdsEngine" "', argument " "4"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_IntegralCdsEngine" "', argument " "4"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg4 = reinterpret_cast< Handle< YieldTermStructure > * >(argp4);
    {
      try {
        result = (IntegralCdsEnginePtr *)new_IntegralCdsEnginePtr__SWIG_0((Period const &)*arg1,(Handle< DefaultProbabilityTermStructure > const &)*arg2,arg3,(Handle< YieldTermStructure > const &)*arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IntegralCdsEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_IntegralCdsEngine) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_DefaultProbabilityTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_DefaultProbabilityTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_IntegralCdsEngine__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_IntegralCdsEngine__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_IntegralCdsEngine'");
  XSRETURN(0);
}


XS(_wrap_delete_IntegralCdsEngine) {
  {
    IntegralCdsEnginePtr *arg1 = (IntegralCdsEnginePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_IntegralCdsEngine(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_IntegralCdsEnginePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IntegralCdsEngine" "', argument " "1"" of type '" "IntegralCdsEnginePtr *""'"); 
    }
    arg1 = reinterpret_cast< IntegralCdsEnginePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DiscountCurve__SWIG_0) {
  {
    std::vector< Date > *arg1 = 0 ;
    std::vector< DiscountFactor > *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    Calendar *arg4 = 0 ;
    LogLinear *arg5 = 0 ;
    std::vector< Date > temp1 ;
    std::vector< Date > *v1 ;
    std::vector< double > temp2 ;
    std::vector< double > *v2 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int argvi = 0;
    DiscountCurvePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_DiscountCurve(dates,discounts,dayCounter,calendar,i);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_DiscountCurve. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_DiscountCurve. "
              "Expected an array of " "Date");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_DiscountCurve. "
          "Expected an array of " "Date");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_DiscountCurve. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp2.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_DiscountCurve. "
              "Expected an array of ""double");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_DiscountCurve. "
          "Expected an array of ""double");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_DiscountCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DiscountCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_DiscountCurve" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DiscountCurve" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    arg4 = reinterpret_cast< Calendar * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_LogLinear,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_DiscountCurve" "', argument " "5"" of type '" "LogLinear const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DiscountCurve" "', argument " "5"" of type '" "LogLinear const &""'"); 
    }
    arg5 = reinterpret_cast< LogLinear * >(argp5);
    {
      try {
        result = (DiscountCurvePtr *)new_DiscountCurvePtr__SWIG_0((std::vector< Date > const &)*arg1,(std::vector< double > const &)*arg2,(DayCounter const &)*arg3,(Calendar const &)*arg4,(LogLinear const &)*arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DiscountCurvePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DiscountCurve__SWIG_1) {
  {
    std::vector< Date > *arg1 = 0 ;
    std::vector< DiscountFactor > *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    Calendar *arg4 = 0 ;
    std::vector< Date > temp1 ;
    std::vector< Date > *v1 ;
    std::vector< double > temp2 ;
    std::vector< double > *v2 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int argvi = 0;
    DiscountCurvePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_DiscountCurve(dates,discounts,dayCounter,calendar);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_DiscountCurve. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_DiscountCurve. "
              "Expected an array of " "Date");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_DiscountCurve. "
          "Expected an array of " "Date");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_DiscountCurve. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp2.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_DiscountCurve. "
              "Expected an array of ""double");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_DiscountCurve. "
          "Expected an array of ""double");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_DiscountCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DiscountCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_DiscountCurve" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DiscountCurve" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    arg4 = reinterpret_cast< Calendar * >(argp4);
    {
      try {
        result = (DiscountCurvePtr *)new_DiscountCurvePtr__SWIG_0((std::vector< Date > const &)*arg1,(std::vector< double > const &)*arg2,(DayCounter const &)*arg3,(Calendar const &)*arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DiscountCurvePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DiscountCurve__SWIG_2) {
  {
    std::vector< Date > *arg1 = 0 ;
    std::vector< DiscountFactor > *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    std::vector< Date > temp1 ;
    std::vector< Date > *v1 ;
    std::vector< double > temp2 ;
    std::vector< double > *v2 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    DiscountCurvePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_DiscountCurve(dates,discounts,dayCounter);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_DiscountCurve. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_DiscountCurve. "
              "Expected an array of " "Date");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_DiscountCurve. "
          "Expected an array of " "Date");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_DiscountCurve. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp2.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_DiscountCurve. "
              "Expected an array of ""double");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_DiscountCurve. "
          "Expected an array of ""double");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_DiscountCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DiscountCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    {
      try {
        result = (DiscountCurvePtr *)new_DiscountCurvePtr__SWIG_0((std::vector< Date > const &)*arg1,(std::vector< double > const &)*arg2,(DayCounter const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DiscountCurvePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DiscountCurve) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_LogLinear, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DiscountCurve__SWIG_2); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DiscountCurve__SWIG_1); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DiscountCurve__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_DiscountCurve'");
  XSRETURN(0);
}


XS(_wrap_DiscountCurve_times) {
  {
    DiscountCurvePtr *arg1 = (DiscountCurvePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Time > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DiscountCurve_times(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_DiscountCurvePtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DiscountCurve_times" "', argument " "1"" of type '" "DiscountCurvePtr *""'"); 
    }
    arg1 = reinterpret_cast< DiscountCurvePtr * >(argp1);
    {
      try {
        result = (std::vector< Time > *) &DiscountCurvePtr_times(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_DiscountCurve_data) {
  {
    DiscountCurvePtr *arg1 = (DiscountCurvePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Real > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DiscountCurve_data(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_DiscountCurvePtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DiscountCurve_data" "', argument " "1"" of type '" "DiscountCurvePtr *""'"); 
    }
    arg1 = reinterpret_cast< DiscountCurvePtr * >(argp1);
    {
      try {
        result = (std::vector< Real > *) &DiscountCurvePtr_data(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_DiscountCurve_dates) {
  {
    DiscountCurvePtr *arg1 = (DiscountCurvePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Date > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DiscountCurve_dates(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_DiscountCurvePtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DiscountCurve_dates" "', argument " "1"" of type '" "DiscountCurvePtr *""'"); 
    }
    arg1 = reinterpret_cast< DiscountCurvePtr * >(argp1);
    {
      try {
        result = (std::vector< Date > *) &DiscountCurvePtr_dates(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_Date_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_DiscountCurve_discounts) {
  {
    DiscountCurvePtr *arg1 = (DiscountCurvePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< DiscountFactor > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DiscountCurve_discounts(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_DiscountCurvePtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DiscountCurve_discounts" "', argument " "1"" of type '" "DiscountCurvePtr *""'"); 
    }
    arg1 = reinterpret_cast< DiscountCurvePtr * >(argp1);
    {
      try {
        result = (std::vector< DiscountFactor > *) &DiscountCurvePtr_discounts(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_DiscountCurve_nodes) {
  {
    DiscountCurvePtr *arg1 = (DiscountCurvePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< std::pair< Date,DiscountFactor > > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DiscountCurve_nodes(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_DiscountCurvePtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DiscountCurve_nodes" "', argument " "1"" of type '" "DiscountCurvePtr *""'"); 
    }
    arg1 = reinterpret_cast< DiscountCurvePtr * >(argp1);
    {
      try {
        result = DiscountCurvePtr_nodes(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        std::pair< Date,double >* ptr = new std::pair< Date,double >(result[i]);
        svs[i] = sv_newmortal();
        SWIG_MakePtr(svs[i], (void*) ptr, 
          SWIGTYPE_p_std__pairT_Date_double_t, SWIG_SHADOW|0);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_DiscountCurve) {
  {
    DiscountCurvePtr *arg1 = (DiscountCurvePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_DiscountCurve(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_DiscountCurvePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DiscountCurve" "', argument " "1"" of type '" "DiscountCurvePtr *""'"); 
    }
    arg1 = reinterpret_cast< DiscountCurvePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_NormalDistribution__SWIG_0) {
  {
    Real arg1 ;
    Real arg2 ;
    double val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    NormalDistribution *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_NormalDistribution(average,sigma);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_NormalDistribution" "', argument " "1"" of type '" "Real""'");
    } 
    arg1 = static_cast< Real >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_NormalDistribution" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (NormalDistribution *)new NormalDistribution(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_NormalDistribution, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_NormalDistribution__SWIG_1) {
  {
    Real arg1 ;
    double val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    NormalDistribution *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_NormalDistribution(average);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_NormalDistribution" "', argument " "1"" of type '" "Real""'");
    } 
    arg1 = static_cast< Real >(val1);
    {
      try {
        result = (NormalDistribution *)new NormalDistribution(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_NormalDistribution, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_NormalDistribution__SWIG_2) {
  {
    int argvi = 0;
    NormalDistribution *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_NormalDistribution();");
    }
    {
      try {
        result = (NormalDistribution *)new NormalDistribution();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_NormalDistribution, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_NormalDistribution) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_NormalDistribution__SWIG_2); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_NormalDistribution__SWIG_1); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_NormalDistribution__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_NormalDistribution'");
  XSRETURN(0);
}


XS(_wrap_NormalDistribution_call) {
  {
    NormalDistribution *arg1 = (NormalDistribution *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: NormalDistribution_call(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_NormalDistribution, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NormalDistribution_call" "', argument " "1"" of type '" "NormalDistribution *""'"); 
    }
    arg1 = reinterpret_cast< NormalDistribution * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "NormalDistribution_call" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (Real)(arg1)->operator ()(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_NormalDistribution_derivative) {
  {
    NormalDistribution *arg1 = (NormalDistribution *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: NormalDistribution_derivative(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_NormalDistribution, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NormalDistribution_derivative" "', argument " "1"" of type '" "NormalDistribution *""'"); 
    }
    arg1 = reinterpret_cast< NormalDistribution * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "NormalDistribution_derivative" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (Real)(arg1)->derivative(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_NormalDistribution) {
  {
    NormalDistribution *arg1 = (NormalDistribution *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_NormalDistribution(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_NormalDistribution, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_NormalDistribution" "', argument " "1"" of type '" "NormalDistribution *""'"); 
    }
    arg1 = reinterpret_cast< NormalDistribution * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CumulativeNormalDistribution__SWIG_0) {
  {
    Real arg1 ;
    Real arg2 ;
    double val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    CumulativeNormalDistribution *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_CumulativeNormalDistribution(average,sigma);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_CumulativeNormalDistribution" "', argument " "1"" of type '" "Real""'");
    } 
    arg1 = static_cast< Real >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_CumulativeNormalDistribution" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (CumulativeNormalDistribution *)new CumulativeNormalDistribution(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CumulativeNormalDistribution, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CumulativeNormalDistribution__SWIG_1) {
  {
    Real arg1 ;
    double val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    CumulativeNormalDistribution *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_CumulativeNormalDistribution(average);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_CumulativeNormalDistribution" "', argument " "1"" of type '" "Real""'");
    } 
    arg1 = static_cast< Real >(val1);
    {
      try {
        result = (CumulativeNormalDistribution *)new CumulativeNormalDistribution(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CumulativeNormalDistribution, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CumulativeNormalDistribution__SWIG_2) {
  {
    int argvi = 0;
    CumulativeNormalDistribution *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_CumulativeNormalDistribution();");
    }
    {
      try {
        result = (CumulativeNormalDistribution *)new CumulativeNormalDistribution();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CumulativeNormalDistribution, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_CumulativeNormalDistribution) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_CumulativeNormalDistribution__SWIG_2); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_CumulativeNormalDistribution__SWIG_1); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_CumulativeNormalDistribution__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_CumulativeNormalDistribution'");
  XSRETURN(0);
}


XS(_wrap_CumulativeNormalDistribution_call) {
  {
    CumulativeNormalDistribution *arg1 = (CumulativeNormalDistribution *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: CumulativeNormalDistribution_call(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CumulativeNormalDistribution, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CumulativeNormalDistribution_call" "', argument " "1"" of type '" "CumulativeNormalDistribution *""'"); 
    }
    arg1 = reinterpret_cast< CumulativeNormalDistribution * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CumulativeNormalDistribution_call" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (Real)(arg1)->operator ()(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CumulativeNormalDistribution_derivative) {
  {
    CumulativeNormalDistribution *arg1 = (CumulativeNormalDistribution *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: CumulativeNormalDistribution_derivative(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CumulativeNormalDistribution, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CumulativeNormalDistribution_derivative" "', argument " "1"" of type '" "CumulativeNormalDistribution *""'"); 
    }
    arg1 = reinterpret_cast< CumulativeNormalDistribution * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CumulativeNormalDistribution_derivative" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (Real)(arg1)->derivative(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_CumulativeNormalDistribution) {
  {
    CumulativeNormalDistribution *arg1 = (CumulativeNormalDistribution *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_CumulativeNormalDistribution(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CumulativeNormalDistribution, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CumulativeNormalDistribution" "', argument " "1"" of type '" "CumulativeNormalDistribution *""'"); 
    }
    arg1 = reinterpret_cast< CumulativeNormalDistribution * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_InverseCumulativeNormal__SWIG_0) {
  {
    Real arg1 ;
    Real arg2 ;
    double val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    InverseCumulativeNormal *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_InverseCumulativeNormal(average,sigma);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_InverseCumulativeNormal" "', argument " "1"" of type '" "Real""'");
    } 
    arg1 = static_cast< Real >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_InverseCumulativeNormal" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (InverseCumulativeNormal *)new InverseCumulativeNormal(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_InverseCumulativeNormal, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_InverseCumulativeNormal__SWIG_1) {
  {
    Real arg1 ;
    double val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    InverseCumulativeNormal *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_InverseCumulativeNormal(average);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_InverseCumulativeNormal" "', argument " "1"" of type '" "Real""'");
    } 
    arg1 = static_cast< Real >(val1);
    {
      try {
        result = (InverseCumulativeNormal *)new InverseCumulativeNormal(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_InverseCumulativeNormal, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_InverseCumulativeNormal__SWIG_2) {
  {
    int argvi = 0;
    InverseCumulativeNormal *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_InverseCumulativeNormal();");
    }
    {
      try {
        result = (InverseCumulativeNormal *)new InverseCumulativeNormal();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_InverseCumulativeNormal, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_InverseCumulativeNormal) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_InverseCumulativeNormal__SWIG_2); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_InverseCumulativeNormal__SWIG_1); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_InverseCumulativeNormal__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_InverseCumulativeNormal'");
  XSRETURN(0);
}


XS(_wrap_InverseCumulativeNormal_call) {
  {
    InverseCumulativeNormal *arg1 = (InverseCumulativeNormal *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: InverseCumulativeNormal_call(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_InverseCumulativeNormal, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InverseCumulativeNormal_call" "', argument " "1"" of type '" "InverseCumulativeNormal *""'"); 
    }
    arg1 = reinterpret_cast< InverseCumulativeNormal * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "InverseCumulativeNormal_call" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (Real)(arg1)->operator ()(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_InverseCumulativeNormal) {
  {
    InverseCumulativeNormal *arg1 = (InverseCumulativeNormal *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_InverseCumulativeNormal(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_InverseCumulativeNormal, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_InverseCumulativeNormal" "', argument " "1"" of type '" "InverseCumulativeNormal *""'"); 
    }
    arg1 = reinterpret_cast< InverseCumulativeNormal * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MoroInverseCumulativeNormal__SWIG_0) {
  {
    Real arg1 ;
    Real arg2 ;
    double val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    MoroInverseCumulativeNormal *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_MoroInverseCumulativeNormal(average,sigma);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_MoroInverseCumulativeNormal" "', argument " "1"" of type '" "Real""'");
    } 
    arg1 = static_cast< Real >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_MoroInverseCumulativeNormal" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (MoroInverseCumulativeNormal *)new MoroInverseCumulativeNormal(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MoroInverseCumulativeNormal, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MoroInverseCumulativeNormal__SWIG_1) {
  {
    Real arg1 ;
    double val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    MoroInverseCumulativeNormal *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_MoroInverseCumulativeNormal(average);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_MoroInverseCumulativeNormal" "', argument " "1"" of type '" "Real""'");
    } 
    arg1 = static_cast< Real >(val1);
    {
      try {
        result = (MoroInverseCumulativeNormal *)new MoroInverseCumulativeNormal(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MoroInverseCumulativeNormal, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MoroInverseCumulativeNormal__SWIG_2) {
  {
    int argvi = 0;
    MoroInverseCumulativeNormal *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_MoroInverseCumulativeNormal();");
    }
    {
      try {
        result = (MoroInverseCumulativeNormal *)new MoroInverseCumulativeNormal();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MoroInverseCumulativeNormal, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_MoroInverseCumulativeNormal) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MoroInverseCumulativeNormal__SWIG_2); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MoroInverseCumulativeNormal__SWIG_1); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MoroInverseCumulativeNormal__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_MoroInverseCumulativeNormal'");
  XSRETURN(0);
}


XS(_wrap_MoroInverseCumulativeNormal_call) {
  {
    MoroInverseCumulativeNormal *arg1 = (MoroInverseCumulativeNormal *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: MoroInverseCumulativeNormal_call(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_MoroInverseCumulativeNormal, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MoroInverseCumulativeNormal_call" "', argument " "1"" of type '" "MoroInverseCumulativeNormal *""'"); 
    }
    arg1 = reinterpret_cast< MoroInverseCumulativeNormal * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MoroInverseCumulativeNormal_call" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (Real)(arg1)->operator ()(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_MoroInverseCumulativeNormal) {
  {
    MoroInverseCumulativeNormal *arg1 = (MoroInverseCumulativeNormal *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_MoroInverseCumulativeNormal(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_MoroInverseCumulativeNormal, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MoroInverseCumulativeNormal" "', argument " "1"" of type '" "MoroInverseCumulativeNormal *""'"); 
    }
    arg1 = reinterpret_cast< MoroInverseCumulativeNormal * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BivariateCumulativeNormalDistribution) {
  {
    Real arg1 ;
    double val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    BivariateCumulativeNormalDistribution *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_BivariateCumulativeNormalDistribution(rho);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_BivariateCumulativeNormalDistribution" "', argument " "1"" of type '" "Real""'");
    } 
    arg1 = static_cast< Real >(val1);
    {
      try {
        result = (BivariateCumulativeNormalDistribution *)new BivariateCumulativeNormalDistribution(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BivariateCumulativeNormalDistribution, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BivariateCumulativeNormalDistribution_call) {
  {
    BivariateCumulativeNormalDistribution *arg1 = (BivariateCumulativeNormalDistribution *) 0 ;
    Real arg2 ;
    Real arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: BivariateCumulativeNormalDistribution_call(self,x,y);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BivariateCumulativeNormalDistribution, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BivariateCumulativeNormalDistribution_call" "', argument " "1"" of type '" "BivariateCumulativeNormalDistribution *""'"); 
    }
    arg1 = reinterpret_cast< BivariateCumulativeNormalDistribution * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BivariateCumulativeNormalDistribution_call" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "BivariateCumulativeNormalDistribution_call" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    {
      try {
        result = (Real)(arg1)->operator ()(arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_BivariateCumulativeNormalDistribution) {
  {
    BivariateCumulativeNormalDistribution *arg1 = (BivariateCumulativeNormalDistribution *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_BivariateCumulativeNormalDistribution(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BivariateCumulativeNormalDistribution, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_BivariateCumulativeNormalDistribution" "', argument " "1"" of type '" "BivariateCumulativeNormalDistribution *""'"); 
    }
    arg1 = reinterpret_cast< BivariateCumulativeNormalDistribution * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BinomialDistribution) {
  {
    Real arg1 ;
    BigNatural arg2 ;
    double val1 ;
    int ecode1 = 0 ;
    unsigned long val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    BinomialDistribution *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_BinomialDistribution(p,n);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_BinomialDistribution" "', argument " "1"" of type '" "Real""'");
    } 
    arg1 = static_cast< Real >(val1);
    ecode2 = SWIG_AsVal_unsigned_SS_long SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_BinomialDistribution" "', argument " "2"" of type '" "BigNatural""'");
    } 
    arg2 = static_cast< BigNatural >(val2);
    {
      try {
        result = (BinomialDistribution *)new BinomialDistribution(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BinomialDistribution, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BinomialDistribution_call) {
  {
    BinomialDistribution *arg1 = (BinomialDistribution *) 0 ;
    BigNatural arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned long val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: BinomialDistribution_call(self,k);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BinomialDistribution, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BinomialDistribution_call" "', argument " "1"" of type '" "BinomialDistribution *""'"); 
    }
    arg1 = reinterpret_cast< BinomialDistribution * >(argp1);
    ecode2 = SWIG_AsVal_unsigned_SS_long SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BinomialDistribution_call" "', argument " "2"" of type '" "BigNatural""'");
    } 
    arg2 = static_cast< BigNatural >(val2);
    {
      try {
        result = (Real)(arg1)->operator ()(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_BinomialDistribution) {
  {
    BinomialDistribution *arg1 = (BinomialDistribution *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_BinomialDistribution(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BinomialDistribution, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_BinomialDistribution" "', argument " "1"" of type '" "BinomialDistribution *""'"); 
    }
    arg1 = reinterpret_cast< BinomialDistribution * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CumulativeBinomialDistribution) {
  {
    Real arg1 ;
    BigNatural arg2 ;
    double val1 ;
    int ecode1 = 0 ;
    unsigned long val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    CumulativeBinomialDistribution *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_CumulativeBinomialDistribution(p,n);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_CumulativeBinomialDistribution" "', argument " "1"" of type '" "Real""'");
    } 
    arg1 = static_cast< Real >(val1);
    ecode2 = SWIG_AsVal_unsigned_SS_long SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_CumulativeBinomialDistribution" "', argument " "2"" of type '" "BigNatural""'");
    } 
    arg2 = static_cast< BigNatural >(val2);
    {
      try {
        result = (CumulativeBinomialDistribution *)new CumulativeBinomialDistribution(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CumulativeBinomialDistribution, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CumulativeBinomialDistribution_call) {
  {
    CumulativeBinomialDistribution *arg1 = (CumulativeBinomialDistribution *) 0 ;
    BigNatural arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned long val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: CumulativeBinomialDistribution_call(self,k);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CumulativeBinomialDistribution, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CumulativeBinomialDistribution_call" "', argument " "1"" of type '" "CumulativeBinomialDistribution *""'"); 
    }
    arg1 = reinterpret_cast< CumulativeBinomialDistribution * >(argp1);
    ecode2 = SWIG_AsVal_unsigned_SS_long SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CumulativeBinomialDistribution_call" "', argument " "2"" of type '" "BigNatural""'");
    } 
    arg2 = static_cast< BigNatural >(val2);
    {
      try {
        result = (Real)(arg1)->operator ()(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_CumulativeBinomialDistribution) {
  {
    CumulativeBinomialDistribution *arg1 = (CumulativeBinomialDistribution *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_CumulativeBinomialDistribution(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CumulativeBinomialDistribution, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CumulativeBinomialDistribution" "', argument " "1"" of type '" "CumulativeBinomialDistribution *""'"); 
    }
    arg1 = reinterpret_cast< CumulativeBinomialDistribution * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BivariateCumulativeNormalDistributionDr78) {
  {
    Real arg1 ;
    double val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    BivariateCumulativeNormalDistributionDr78 *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_BivariateCumulativeNormalDistributionDr78(rho);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_BivariateCumulativeNormalDistributionDr78" "', argument " "1"" of type '" "Real""'");
    } 
    arg1 = static_cast< Real >(val1);
    {
      try {
        result = (BivariateCumulativeNormalDistributionDr78 *)new BivariateCumulativeNormalDistributionDr78(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BivariateCumulativeNormalDistributionDr78, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BivariateCumulativeNormalDistributionDr78_call) {
  {
    BivariateCumulativeNormalDistributionDr78 *arg1 = (BivariateCumulativeNormalDistributionDr78 *) 0 ;
    Real arg2 ;
    Real arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: BivariateCumulativeNormalDistributionDr78_call(self,a,b);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BivariateCumulativeNormalDistributionDr78, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BivariateCumulativeNormalDistributionDr78_call" "', argument " "1"" of type '" "BivariateCumulativeNormalDistributionDr78 *""'"); 
    }
    arg1 = reinterpret_cast< BivariateCumulativeNormalDistributionDr78 * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BivariateCumulativeNormalDistributionDr78_call" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "BivariateCumulativeNormalDistributionDr78_call" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    {
      try {
        result = (Real)(arg1)->operator ()(arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_BivariateCumulativeNormalDistributionDr78) {
  {
    BivariateCumulativeNormalDistributionDr78 *arg1 = (BivariateCumulativeNormalDistributionDr78 *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_BivariateCumulativeNormalDistributionDr78(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BivariateCumulativeNormalDistributionDr78, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_BivariateCumulativeNormalDistributionDr78" "', argument " "1"" of type '" "BivariateCumulativeNormalDistributionDr78 *""'"); 
    }
    arg1 = reinterpret_cast< BivariateCumulativeNormalDistributionDr78 * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BivariateCumulativeNormalDistributionWe04DP) {
  {
    Real arg1 ;
    double val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    BivariateCumulativeNormalDistributionWe04DP *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_BivariateCumulativeNormalDistributionWe04DP(rho);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_BivariateCumulativeNormalDistributionWe04DP" "', argument " "1"" of type '" "Real""'");
    } 
    arg1 = static_cast< Real >(val1);
    {
      try {
        result = (BivariateCumulativeNormalDistributionWe04DP *)new BivariateCumulativeNormalDistributionWe04DP(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BivariateCumulativeNormalDistributionWe04DP, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BivariateCumulativeNormalDistributionWe04DP_call) {
  {
    BivariateCumulativeNormalDistributionWe04DP *arg1 = (BivariateCumulativeNormalDistributionWe04DP *) 0 ;
    Real arg2 ;
    Real arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: BivariateCumulativeNormalDistributionWe04DP_call(self,a,b);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BivariateCumulativeNormalDistributionWe04DP, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BivariateCumulativeNormalDistributionWe04DP_call" "', argument " "1"" of type '" "BivariateCumulativeNormalDistributionWe04DP *""'"); 
    }
    arg1 = reinterpret_cast< BivariateCumulativeNormalDistributionWe04DP * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BivariateCumulativeNormalDistributionWe04DP_call" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "BivariateCumulativeNormalDistributionWe04DP_call" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    {
      try {
        result = (Real)(arg1)->operator ()(arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_BivariateCumulativeNormalDistributionWe04DP) {
  {
    BivariateCumulativeNormalDistributionWe04DP *arg1 = (BivariateCumulativeNormalDistributionWe04DP *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_BivariateCumulativeNormalDistributionWe04DP(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BivariateCumulativeNormalDistributionWe04DP, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_BivariateCumulativeNormalDistributionWe04DP" "', argument " "1"" of type '" "BivariateCumulativeNormalDistributionWe04DP *""'"); 
    }
    arg1 = reinterpret_cast< BivariateCumulativeNormalDistributionWe04DP * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CumulativeChiSquareDistribution) {
  {
    Real arg1 ;
    double val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    CumulativeChiSquareDistribution *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_CumulativeChiSquareDistribution(df);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_CumulativeChiSquareDistribution" "', argument " "1"" of type '" "Real""'");
    } 
    arg1 = static_cast< Real >(val1);
    {
      try {
        result = (CumulativeChiSquareDistribution *)new CumulativeChiSquareDistribution(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CumulativeChiSquareDistribution, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CumulativeChiSquareDistribution_call) {
  {
    CumulativeChiSquareDistribution *arg1 = (CumulativeChiSquareDistribution *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: CumulativeChiSquareDistribution_call(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CumulativeChiSquareDistribution, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CumulativeChiSquareDistribution_call" "', argument " "1"" of type '" "CumulativeChiSquareDistribution *""'"); 
    }
    arg1 = reinterpret_cast< CumulativeChiSquareDistribution * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CumulativeChiSquareDistribution_call" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (Real)(arg1)->operator ()(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_CumulativeChiSquareDistribution) {
  {
    CumulativeChiSquareDistribution *arg1 = (CumulativeChiSquareDistribution *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_CumulativeChiSquareDistribution(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CumulativeChiSquareDistribution, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CumulativeChiSquareDistribution" "', argument " "1"" of type '" "CumulativeChiSquareDistribution *""'"); 
    }
    arg1 = reinterpret_cast< CumulativeChiSquareDistribution * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_NonCentralCumulativeChiSquareDistribution) {
  {
    Real arg1 ;
    Real arg2 ;
    double val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    NonCentralCumulativeChiSquareDistribution *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_NonCentralCumulativeChiSquareDistribution(df,ncp);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_NonCentralCumulativeChiSquareDistribution" "', argument " "1"" of type '" "Real""'");
    } 
    arg1 = static_cast< Real >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_NonCentralCumulativeChiSquareDistribution" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (NonCentralCumulativeChiSquareDistribution *)new NonCentralCumulativeChiSquareDistribution(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_NonCentralCumulativeChiSquareDistribution, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_NonCentralCumulativeChiSquareDistribution_call) {
  {
    NonCentralCumulativeChiSquareDistribution *arg1 = (NonCentralCumulativeChiSquareDistribution *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: NonCentralCumulativeChiSquareDistribution_call(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_NonCentralCumulativeChiSquareDistribution, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NonCentralCumulativeChiSquareDistribution_call" "', argument " "1"" of type '" "NonCentralCumulativeChiSquareDistribution *""'"); 
    }
    arg1 = reinterpret_cast< NonCentralCumulativeChiSquareDistribution * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "NonCentralCumulativeChiSquareDistribution_call" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (Real)(arg1)->operator ()(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_NonCentralCumulativeChiSquareDistribution) {
  {
    NonCentralCumulativeChiSquareDistribution *arg1 = (NonCentralCumulativeChiSquareDistribution *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_NonCentralCumulativeChiSquareDistribution(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_NonCentralCumulativeChiSquareDistribution, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_NonCentralCumulativeChiSquareDistribution" "', argument " "1"" of type '" "NonCentralCumulativeChiSquareDistribution *""'"); 
    }
    arg1 = reinterpret_cast< NonCentralCumulativeChiSquareDistribution * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_InverseNonCentralCumulativeChiSquareDistribution__SWIG_0) {
  {
    Real arg1 ;
    Real arg2 ;
    Size arg3 ;
    Real arg4 ;
    double val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    size_t val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    InverseNonCentralCumulativeChiSquareDistribution *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_InverseNonCentralCumulativeChiSquareDistribution(df,ncp,maxEvaluations,accuracy);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_InverseNonCentralCumulativeChiSquareDistribution" "', argument " "1"" of type '" "Real""'");
    } 
    arg1 = static_cast< Real >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_InverseNonCentralCumulativeChiSquareDistribution" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_InverseNonCentralCumulativeChiSquareDistribution" "', argument " "3"" of type '" "Size""'");
    } 
    arg3 = static_cast< Size >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_InverseNonCentralCumulativeChiSquareDistribution" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    {
      try {
        result = (InverseNonCentralCumulativeChiSquareDistribution *)new InverseNonCentralCumulativeChiSquareDistribution(arg1,arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_InverseNonCentralCumulativeChiSquareDistribution, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_InverseNonCentralCumulativeChiSquareDistribution__SWIG_1) {
  {
    Real arg1 ;
    Real arg2 ;
    Size arg3 ;
    double val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    size_t val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    InverseNonCentralCumulativeChiSquareDistribution *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_InverseNonCentralCumulativeChiSquareDistribution(df,ncp,maxEvaluations);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_InverseNonCentralCumulativeChiSquareDistribution" "', argument " "1"" of type '" "Real""'");
    } 
    arg1 = static_cast< Real >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_InverseNonCentralCumulativeChiSquareDistribution" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_InverseNonCentralCumulativeChiSquareDistribution" "', argument " "3"" of type '" "Size""'");
    } 
    arg3 = static_cast< Size >(val3);
    {
      try {
        result = (InverseNonCentralCumulativeChiSquareDistribution *)new InverseNonCentralCumulativeChiSquareDistribution(arg1,arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_InverseNonCentralCumulativeChiSquareDistribution, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_InverseNonCentralCumulativeChiSquareDistribution__SWIG_2) {
  {
    Real arg1 ;
    Real arg2 ;
    double val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    InverseNonCentralCumulativeChiSquareDistribution *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_InverseNonCentralCumulativeChiSquareDistribution(df,ncp);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_InverseNonCentralCumulativeChiSquareDistribution" "', argument " "1"" of type '" "Real""'");
    } 
    arg1 = static_cast< Real >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_InverseNonCentralCumulativeChiSquareDistribution" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (InverseNonCentralCumulativeChiSquareDistribution *)new InverseNonCentralCumulativeChiSquareDistribution(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_InverseNonCentralCumulativeChiSquareDistribution, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_InverseNonCentralCumulativeChiSquareDistribution) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_InverseNonCentralCumulativeChiSquareDistribution__SWIG_2); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_InverseNonCentralCumulativeChiSquareDistribution__SWIG_1); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_InverseNonCentralCumulativeChiSquareDistribution__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_InverseNonCentralCumulativeChiSquareDistribution'");
  XSRETURN(0);
}


XS(_wrap_InverseNonCentralCumulativeChiSquareDistribution_call) {
  {
    InverseNonCentralCumulativeChiSquareDistribution *arg1 = (InverseNonCentralCumulativeChiSquareDistribution *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: InverseNonCentralCumulativeChiSquareDistribution_call(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_InverseNonCentralCumulativeChiSquareDistribution, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InverseNonCentralCumulativeChiSquareDistribution_call" "', argument " "1"" of type '" "InverseNonCentralCumulativeChiSquareDistribution *""'"); 
    }
    arg1 = reinterpret_cast< InverseNonCentralCumulativeChiSquareDistribution * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "InverseNonCentralCumulativeChiSquareDistribution_call" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (Real)(arg1)->operator ()(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_InverseNonCentralCumulativeChiSquareDistribution) {
  {
    InverseNonCentralCumulativeChiSquareDistribution *arg1 = (InverseNonCentralCumulativeChiSquareDistribution *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_InverseNonCentralCumulativeChiSquareDistribution(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_InverseNonCentralCumulativeChiSquareDistribution, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_InverseNonCentralCumulativeChiSquareDistribution" "', argument " "1"" of type '" "InverseNonCentralCumulativeChiSquareDistribution *""'"); 
    }
    arg1 = reinterpret_cast< InverseNonCentralCumulativeChiSquareDistribution * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CumulativeGammaDistribution) {
  {
    Real arg1 ;
    double val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    CumulativeGammaDistribution *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_CumulativeGammaDistribution(a);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_CumulativeGammaDistribution" "', argument " "1"" of type '" "Real""'");
    } 
    arg1 = static_cast< Real >(val1);
    {
      try {
        result = (CumulativeGammaDistribution *)new CumulativeGammaDistribution(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CumulativeGammaDistribution, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CumulativeGammaDistribution_call) {
  {
    CumulativeGammaDistribution *arg1 = (CumulativeGammaDistribution *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: CumulativeGammaDistribution_call(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CumulativeGammaDistribution, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CumulativeGammaDistribution_call" "', argument " "1"" of type '" "CumulativeGammaDistribution *""'"); 
    }
    arg1 = reinterpret_cast< CumulativeGammaDistribution * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CumulativeGammaDistribution_call" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (Real)(arg1)->operator ()(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_CumulativeGammaDistribution) {
  {
    CumulativeGammaDistribution *arg1 = (CumulativeGammaDistribution *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_CumulativeGammaDistribution(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CumulativeGammaDistribution, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CumulativeGammaDistribution" "', argument " "1"" of type '" "CumulativeGammaDistribution *""'"); 
    }
    arg1 = reinterpret_cast< CumulativeGammaDistribution * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_GammaFunction_logValue) {
  {
    GammaFunction *arg1 = (GammaFunction *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: GammaFunction_logValue(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GammaFunction, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GammaFunction_logValue" "', argument " "1"" of type '" "GammaFunction *""'"); 
    }
    arg1 = reinterpret_cast< GammaFunction * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GammaFunction_logValue" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (Real)(arg1)->logValue(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_GammaFunction) {
  {
    int argvi = 0;
    GammaFunction *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_GammaFunction();");
    }
    {
      try {
        result = (GammaFunction *)new GammaFunction();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GammaFunction, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_GammaFunction) {
  {
    GammaFunction *arg1 = (GammaFunction *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_GammaFunction(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GammaFunction, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GammaFunction" "', argument " "1"" of type '" "GammaFunction *""'"); 
    }
    arg1 = reinterpret_cast< GammaFunction * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PoissonDistribution) {
  {
    Real arg1 ;
    double val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    PoissonDistribution *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_PoissonDistribution(mu);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_PoissonDistribution" "', argument " "1"" of type '" "Real""'");
    } 
    arg1 = static_cast< Real >(val1);
    {
      try {
        result = (PoissonDistribution *)new PoissonDistribution(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PoissonDistribution, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_PoissonDistribution_call) {
  {
    PoissonDistribution *arg1 = (PoissonDistribution *) 0 ;
    BigNatural arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned long val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: PoissonDistribution_call(self,k);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PoissonDistribution, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PoissonDistribution_call" "', argument " "1"" of type '" "PoissonDistribution *""'"); 
    }
    arg1 = reinterpret_cast< PoissonDistribution * >(argp1);
    ecode2 = SWIG_AsVal_unsigned_SS_long SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "PoissonDistribution_call" "', argument " "2"" of type '" "BigNatural""'");
    } 
    arg2 = static_cast< BigNatural >(val2);
    {
      try {
        result = (Real)(arg1)->operator ()(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_PoissonDistribution) {
  {
    PoissonDistribution *arg1 = (PoissonDistribution *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_PoissonDistribution(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PoissonDistribution, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_PoissonDistribution" "', argument " "1"" of type '" "PoissonDistribution *""'"); 
    }
    arg1 = reinterpret_cast< PoissonDistribution * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CumulativePoissonDistribution) {
  {
    Real arg1 ;
    double val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    CumulativePoissonDistribution *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_CumulativePoissonDistribution(mu);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_CumulativePoissonDistribution" "', argument " "1"" of type '" "Real""'");
    } 
    arg1 = static_cast< Real >(val1);
    {
      try {
        result = (CumulativePoissonDistribution *)new CumulativePoissonDistribution(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CumulativePoissonDistribution, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CumulativePoissonDistribution_call) {
  {
    CumulativePoissonDistribution *arg1 = (CumulativePoissonDistribution *) 0 ;
    BigNatural arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned long val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: CumulativePoissonDistribution_call(self,k);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CumulativePoissonDistribution, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CumulativePoissonDistribution_call" "', argument " "1"" of type '" "CumulativePoissonDistribution *""'"); 
    }
    arg1 = reinterpret_cast< CumulativePoissonDistribution * >(argp1);
    ecode2 = SWIG_AsVal_unsigned_SS_long SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CumulativePoissonDistribution_call" "', argument " "2"" of type '" "BigNatural""'");
    } 
    arg2 = static_cast< BigNatural >(val2);
    {
      try {
        result = (Real)(arg1)->operator ()(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_CumulativePoissonDistribution) {
  {
    CumulativePoissonDistribution *arg1 = (CumulativePoissonDistribution *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_CumulativePoissonDistribution(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CumulativePoissonDistribution, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CumulativePoissonDistribution" "', argument " "1"" of type '" "CumulativePoissonDistribution *""'"); 
    }
    arg1 = reinterpret_cast< CumulativePoissonDistribution * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_InverseCumulativePoisson) {
  {
    Real arg1 ;
    double val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    InverseCumulativePoisson *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_InverseCumulativePoisson(lambda);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_InverseCumulativePoisson" "', argument " "1"" of type '" "Real""'");
    } 
    arg1 = static_cast< Real >(val1);
    {
      try {
        result = (InverseCumulativePoisson *)new InverseCumulativePoisson(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_InverseCumulativePoisson, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_InverseCumulativePoisson_call) {
  {
    InverseCumulativePoisson *arg1 = (InverseCumulativePoisson *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: InverseCumulativePoisson_call(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_InverseCumulativePoisson, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InverseCumulativePoisson_call" "', argument " "1"" of type '" "InverseCumulativePoisson *""'"); 
    }
    arg1 = reinterpret_cast< InverseCumulativePoisson * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "InverseCumulativePoisson_call" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (Real)(arg1)->operator ()(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_InverseCumulativePoisson) {
  {
    InverseCumulativePoisson *arg1 = (InverseCumulativePoisson *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_InverseCumulativePoisson(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_InverseCumulativePoisson, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_InverseCumulativePoisson" "', argument " "1"" of type '" "InverseCumulativePoisson *""'"); 
    }
    arg1 = reinterpret_cast< InverseCumulativePoisson * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_StudentDistribution) {
  {
    Integer arg1 ;
    int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    StudentDistribution *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_StudentDistribution(n);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_StudentDistribution" "', argument " "1"" of type '" "Integer""'");
    } 
    arg1 = static_cast< Integer >(val1);
    {
      try {
        result = (StudentDistribution *)new StudentDistribution(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_StudentDistribution, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_StudentDistribution_call) {
  {
    StudentDistribution *arg1 = (StudentDistribution *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: StudentDistribution_call(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_StudentDistribution, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StudentDistribution_call" "', argument " "1"" of type '" "StudentDistribution *""'"); 
    }
    arg1 = reinterpret_cast< StudentDistribution * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StudentDistribution_call" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (Real)(arg1)->operator ()(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_StudentDistribution) {
  {
    StudentDistribution *arg1 = (StudentDistribution *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_StudentDistribution(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_StudentDistribution, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_StudentDistribution" "', argument " "1"" of type '" "StudentDistribution *""'"); 
    }
    arg1 = reinterpret_cast< StudentDistribution * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CumulativeStudentDistribution) {
  {
    Integer arg1 ;
    int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    CumulativeStudentDistribution *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_CumulativeStudentDistribution(n);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_CumulativeStudentDistribution" "', argument " "1"" of type '" "Integer""'");
    } 
    arg1 = static_cast< Integer >(val1);
    {
      try {
        result = (CumulativeStudentDistribution *)new CumulativeStudentDistribution(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CumulativeStudentDistribution, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CumulativeStudentDistribution_call) {
  {
    CumulativeStudentDistribution *arg1 = (CumulativeStudentDistribution *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: CumulativeStudentDistribution_call(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CumulativeStudentDistribution, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CumulativeStudentDistribution_call" "', argument " "1"" of type '" "CumulativeStudentDistribution *""'"); 
    }
    arg1 = reinterpret_cast< CumulativeStudentDistribution * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CumulativeStudentDistribution_call" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (Real)(arg1)->operator ()(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_CumulativeStudentDistribution) {
  {
    CumulativeStudentDistribution *arg1 = (CumulativeStudentDistribution *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_CumulativeStudentDistribution(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CumulativeStudentDistribution, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CumulativeStudentDistribution" "', argument " "1"" of type '" "CumulativeStudentDistribution *""'"); 
    }
    arg1 = reinterpret_cast< CumulativeStudentDistribution * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_InverseCumulativeStudent__SWIG_0) {
  {
    Integer arg1 ;
    Real arg2 ;
    Size arg3 ;
    int val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    size_t val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    InverseCumulativeStudent *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_InverseCumulativeStudent(n,accuracy,maxIterations);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_InverseCumulativeStudent" "', argument " "1"" of type '" "Integer""'");
    } 
    arg1 = static_cast< Integer >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_InverseCumulativeStudent" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_InverseCumulativeStudent" "', argument " "3"" of type '" "Size""'");
    } 
    arg3 = static_cast< Size >(val3);
    {
      try {
        result = (InverseCumulativeStudent *)new InverseCumulativeStudent(arg1,arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_InverseCumulativeStudent, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_InverseCumulativeStudent__SWIG_1) {
  {
    Integer arg1 ;
    Real arg2 ;
    int val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    InverseCumulativeStudent *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_InverseCumulativeStudent(n,accuracy);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_InverseCumulativeStudent" "', argument " "1"" of type '" "Integer""'");
    } 
    arg1 = static_cast< Integer >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_InverseCumulativeStudent" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (InverseCumulativeStudent *)new InverseCumulativeStudent(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_InverseCumulativeStudent, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_InverseCumulativeStudent__SWIG_2) {
  {
    Integer arg1 ;
    int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    InverseCumulativeStudent *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_InverseCumulativeStudent(n);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_InverseCumulativeStudent" "', argument " "1"" of type '" "Integer""'");
    } 
    arg1 = static_cast< Integer >(val1);
    {
      try {
        result = (InverseCumulativeStudent *)new InverseCumulativeStudent(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_InverseCumulativeStudent, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_InverseCumulativeStudent) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_InverseCumulativeStudent__SWIG_2); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_InverseCumulativeStudent__SWIG_1); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_InverseCumulativeStudent__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_InverseCumulativeStudent'");
  XSRETURN(0);
}


XS(_wrap_InverseCumulativeStudent_call) {
  {
    InverseCumulativeStudent *arg1 = (InverseCumulativeStudent *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: InverseCumulativeStudent_call(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_InverseCumulativeStudent, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InverseCumulativeStudent_call" "', argument " "1"" of type '" "InverseCumulativeStudent *""'"); 
    }
    arg1 = reinterpret_cast< InverseCumulativeStudent * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "InverseCumulativeStudent_call" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (Real)(arg1)->operator ()(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_InverseCumulativeStudent) {
  {
    InverseCumulativeStudent *arg1 = (InverseCumulativeStudent *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_InverseCumulativeStudent(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_InverseCumulativeStudent, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_InverseCumulativeStudent" "', argument " "1"" of type '" "InverseCumulativeStudent *""'"); 
    }
    arg1 = reinterpret_cast< InverseCumulativeStudent * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Money__SWIG_0) {
  {
    Currency *arg1 = 0 ;
    Decimal arg2 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Money *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_Money(currency,value);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Currency,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Money" "', argument " "1"" of type '" "Currency const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Money" "', argument " "1"" of type '" "Currency const &""'"); 
    }
    arg1 = reinterpret_cast< Currency * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Money" "', argument " "2"" of type '" "Decimal""'");
    } 
    arg2 = static_cast< Decimal >(val2);
    {
      try {
        result = (Money *)new Money((Currency const &)*arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Money, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Money__SWIG_1) {
  {
    Decimal arg1 ;
    Currency *arg2 = 0 ;
    double val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    Money *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_Money(value,currency);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Money" "', argument " "1"" of type '" "Decimal""'");
    } 
    arg1 = static_cast< Decimal >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Currency,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Money" "', argument " "2"" of type '" "Currency const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Money" "', argument " "2"" of type '" "Currency const &""'"); 
    }
    arg2 = reinterpret_cast< Currency * >(argp2);
    {
      try {
        result = (Money *)new Money(arg1,(Currency const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Money, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Money) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Currency, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Currency, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Money__SWIG_0); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Money__SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Money'");
  XSRETURN(0);
}


XS(_wrap_Money_currency) {
  {
    Money *arg1 = (Money *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Currency *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Money_currency(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Money, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Money_currency" "', argument " "1"" of type '" "Money const *""'"); 
    }
    arg1 = reinterpret_cast< Money * >(argp1);
    {
      try {
        result = (Currency *) &((Money const *)arg1)->currency();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Currency, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Money_value) {
  {
    Money *arg1 = (Money *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Decimal result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Money_value(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Money, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Money_value" "', argument " "1"" of type '" "Money const *""'"); 
    }
    arg1 = reinterpret_cast< Money * >(argp1);
    {
      try {
        result = (Decimal)((Money const *)arg1)->value();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Money_rounded) {
  {
    Money *arg1 = (Money *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    SwigValueWrapper< Money > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Money_rounded(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Money, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Money_rounded" "', argument " "1"" of type '" "Money const *""'"); 
    }
    arg1 = reinterpret_cast< Money * >(argp1);
    {
      try {
        result = ((Money const *)arg1)->rounded();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Money(static_cast< const Money& >(result))), SWIGTYPE_p_Money, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Money_setConversionType) {
  {
    Money::ConversionType arg1 ;
    int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Money_setConversionType(type);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "Money_setConversionType" "', argument " "1"" of type '" "Money::ConversionType""'");
    } 
    arg1 = static_cast< Money::ConversionType >(val1);
    {
      try {
        Money_setConversionType(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Money_setBaseCurrency) {
  {
    Currency *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Money_setBaseCurrency(c);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Currency,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Money_setBaseCurrency" "', argument " "1"" of type '" "Currency const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Money_setBaseCurrency" "', argument " "1"" of type '" "Currency const &""'"); 
    }
    arg1 = reinterpret_cast< Currency * >(argp1);
    {
      try {
        Money_setBaseCurrency((Currency const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_Money) {
  {
    Money *arg1 = (Money *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Money(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Money, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Money" "', argument " "1"" of type '" "Money *""'"); 
    }
    arg1 = reinterpret_cast< Money * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ExchangeRate) {
  {
    Currency *arg1 = 0 ;
    Currency *arg2 = 0 ;
    Decimal arg3 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    ExchangeRate *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_ExchangeRate(source,target,rate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Currency,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ExchangeRate" "', argument " "1"" of type '" "Currency const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ExchangeRate" "', argument " "1"" of type '" "Currency const &""'"); 
    }
    arg1 = reinterpret_cast< Currency * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Currency,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ExchangeRate" "', argument " "2"" of type '" "Currency const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ExchangeRate" "', argument " "2"" of type '" "Currency const &""'"); 
    }
    arg2 = reinterpret_cast< Currency * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_ExchangeRate" "', argument " "3"" of type '" "Decimal""'");
    } 
    arg3 = static_cast< Decimal >(val3);
    {
      try {
        result = (ExchangeRate *)new ExchangeRate((Currency const &)*arg1,(Currency const &)*arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ExchangeRate, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_ExchangeRate_source) {
  {
    ExchangeRate *arg1 = (ExchangeRate *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Currency *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ExchangeRate_source(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ExchangeRate, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExchangeRate_source" "', argument " "1"" of type '" "ExchangeRate const *""'"); 
    }
    arg1 = reinterpret_cast< ExchangeRate * >(argp1);
    {
      try {
        result = (Currency *) &((ExchangeRate const *)arg1)->source();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Currency, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ExchangeRate_target) {
  {
    ExchangeRate *arg1 = (ExchangeRate *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Currency *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ExchangeRate_target(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ExchangeRate, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExchangeRate_target" "', argument " "1"" of type '" "ExchangeRate const *""'"); 
    }
    arg1 = reinterpret_cast< ExchangeRate * >(argp1);
    {
      try {
        result = (Currency *) &((ExchangeRate const *)arg1)->target();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Currency, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ExchangeRate_type) {
  {
    ExchangeRate *arg1 = (ExchangeRate *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    ExchangeRate::Type result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ExchangeRate_type(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ExchangeRate, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExchangeRate_type" "', argument " "1"" of type '" "ExchangeRate const *""'"); 
    }
    arg1 = reinterpret_cast< ExchangeRate * >(argp1);
    {
      try {
        result = (ExchangeRate::Type)((ExchangeRate const *)arg1)->type();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ExchangeRate_rate) {
  {
    ExchangeRate *arg1 = (ExchangeRate *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Decimal result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ExchangeRate_rate(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ExchangeRate, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExchangeRate_rate" "', argument " "1"" of type '" "ExchangeRate const *""'"); 
    }
    arg1 = reinterpret_cast< ExchangeRate * >(argp1);
    {
      try {
        result = (Decimal)((ExchangeRate const *)arg1)->rate();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ExchangeRate_exchange) {
  {
    ExchangeRate *arg1 = (ExchangeRate *) 0 ;
    Money *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    SwigValueWrapper< Money > result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: ExchangeRate_exchange(self,amount);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ExchangeRate, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExchangeRate_exchange" "', argument " "1"" of type '" "ExchangeRate const *""'"); 
    }
    arg1 = reinterpret_cast< ExchangeRate * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Money,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ExchangeRate_exchange" "', argument " "2"" of type '" "Money const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ExchangeRate_exchange" "', argument " "2"" of type '" "Money const &""'"); 
    }
    arg2 = reinterpret_cast< Money * >(argp2);
    {
      try {
        result = ((ExchangeRate const *)arg1)->exchange((Money const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Money(static_cast< const Money& >(result))), SWIGTYPE_p_Money, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_ExchangeRate_chain) {
  {
    ExchangeRate *arg1 = 0 ;
    ExchangeRate *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    SwigValueWrapper< ExchangeRate > result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: ExchangeRate_chain(r1,r2);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_ExchangeRate,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExchangeRate_chain" "', argument " "1"" of type '" "ExchangeRate const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ExchangeRate_chain" "', argument " "1"" of type '" "ExchangeRate const &""'"); 
    }
    arg1 = reinterpret_cast< ExchangeRate * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_ExchangeRate,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ExchangeRate_chain" "', argument " "2"" of type '" "ExchangeRate const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ExchangeRate_chain" "', argument " "2"" of type '" "ExchangeRate const &""'"); 
    }
    arg2 = reinterpret_cast< ExchangeRate * >(argp2);
    {
      try {
        result = ExchangeRate::chain((ExchangeRate const &)*arg1,(ExchangeRate const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new ExchangeRate(static_cast< const ExchangeRate& >(result))), SWIGTYPE_p_ExchangeRate, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_ExchangeRate) {
  {
    ExchangeRate *arg1 = (ExchangeRate *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_ExchangeRate(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ExchangeRate, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ExchangeRate" "', argument " "1"" of type '" "ExchangeRate *""'"); 
    }
    arg1 = reinterpret_cast< ExchangeRate * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ExchangeRateManager_instance) {
  {
    int argvi = 0;
    ExchangeRateManager *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: ExchangeRateManager_instance();");
    }
    {
      try {
        result = (ExchangeRateManager *) &ExchangeRateManager::instance();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ExchangeRateManager, 0 | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_ExchangeRateManager_add__SWIG_0) {
  {
    ExchangeRateManager *arg1 = (ExchangeRateManager *) 0 ;
    ExchangeRate *arg2 = 0 ;
    Date *arg3 = 0 ;
    Date *arg4 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: ExchangeRateManager_add(self,ExchangeRate const &,startDate,endDate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ExchangeRateManager, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExchangeRateManager_add" "', argument " "1"" of type '" "ExchangeRateManager *""'"); 
    }
    arg1 = reinterpret_cast< ExchangeRateManager * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_ExchangeRate,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ExchangeRateManager_add" "', argument " "2"" of type '" "ExchangeRate const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ExchangeRateManager_add" "', argument " "2"" of type '" "ExchangeRate const &""'"); 
    }
    arg2 = reinterpret_cast< ExchangeRate * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ExchangeRateManager_add" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ExchangeRateManager_add" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ExchangeRateManager_add" "', argument " "4"" of type '" "Date const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ExchangeRateManager_add" "', argument " "4"" of type '" "Date const &""'"); 
    }
    arg4 = reinterpret_cast< Date * >(argp4);
    {
      try {
        (arg1)->add((ExchangeRate const &)*arg2,(Date const &)*arg3,(Date const &)*arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_ExchangeRateManager_add__SWIG_1) {
  {
    ExchangeRateManager *arg1 = (ExchangeRateManager *) 0 ;
    ExchangeRate *arg2 = 0 ;
    Date *arg3 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: ExchangeRateManager_add(self,ExchangeRate const &,startDate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ExchangeRateManager, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExchangeRateManager_add" "', argument " "1"" of type '" "ExchangeRateManager *""'"); 
    }
    arg1 = reinterpret_cast< ExchangeRateManager * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_ExchangeRate,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ExchangeRateManager_add" "', argument " "2"" of type '" "ExchangeRate const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ExchangeRateManager_add" "', argument " "2"" of type '" "ExchangeRate const &""'"); 
    }
    arg2 = reinterpret_cast< ExchangeRate * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ExchangeRateManager_add" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ExchangeRateManager_add" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    {
      try {
        (arg1)->add((ExchangeRate const &)*arg2,(Date const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_ExchangeRateManager_add__SWIG_2) {
  {
    ExchangeRateManager *arg1 = (ExchangeRateManager *) 0 ;
    ExchangeRate *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: ExchangeRateManager_add(self,ExchangeRate const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ExchangeRateManager, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExchangeRateManager_add" "', argument " "1"" of type '" "ExchangeRateManager *""'"); 
    }
    arg1 = reinterpret_cast< ExchangeRateManager * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_ExchangeRate,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ExchangeRateManager_add" "', argument " "2"" of type '" "ExchangeRate const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ExchangeRateManager_add" "', argument " "2"" of type '" "ExchangeRate const &""'"); 
    }
    arg2 = reinterpret_cast< ExchangeRate * >(argp2);
    {
      try {
        (arg1)->add((ExchangeRate const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_ExchangeRateManager_add) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_ExchangeRateManager, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_ExchangeRate, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_ExchangeRateManager, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_ExchangeRate, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_ExchangeRateManager, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_ExchangeRate, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_ExchangeRateManager_add__SWIG_2); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_ExchangeRateManager_add__SWIG_1); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_ExchangeRateManager_add__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'ExchangeRateManager_add'");
  XSRETURN(0);
}


XS(_wrap_ExchangeRateManager_lookup__SWIG_0) {
  {
    ExchangeRateManager *arg1 = (ExchangeRateManager *) 0 ;
    Currency *arg2 = 0 ;
    Currency *arg3 = 0 ;
    Date *arg4 = 0 ;
    ExchangeRate::Type arg5 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    SwigValueWrapper< ExchangeRate > result;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: ExchangeRateManager_lookup(self,source,target,date,type);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ExchangeRateManager, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExchangeRateManager_lookup" "', argument " "1"" of type '" "ExchangeRateManager const *""'"); 
    }
    arg1 = reinterpret_cast< ExchangeRateManager * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Currency,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ExchangeRateManager_lookup" "', argument " "2"" of type '" "Currency const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ExchangeRateManager_lookup" "', argument " "2"" of type '" "Currency const &""'"); 
    }
    arg2 = reinterpret_cast< Currency * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Currency,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ExchangeRateManager_lookup" "', argument " "3"" of type '" "Currency const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ExchangeRateManager_lookup" "', argument " "3"" of type '" "Currency const &""'"); 
    }
    arg3 = reinterpret_cast< Currency * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ExchangeRateManager_lookup" "', argument " "4"" of type '" "Date const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ExchangeRateManager_lookup" "', argument " "4"" of type '" "Date const &""'"); 
    }
    arg4 = reinterpret_cast< Date * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "ExchangeRateManager_lookup" "', argument " "5"" of type '" "ExchangeRate::Type""'");
    } 
    arg5 = static_cast< ExchangeRate::Type >(val5);
    {
      try {
        result = ((ExchangeRateManager const *)arg1)->lookup((Currency const &)*arg2,(Currency const &)*arg3,(Date const &)*arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new ExchangeRate(static_cast< const ExchangeRate& >(result))), SWIGTYPE_p_ExchangeRate, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_ExchangeRateManager_lookup__SWIG_1) {
  {
    ExchangeRateManager *arg1 = (ExchangeRateManager *) 0 ;
    Currency *arg2 = 0 ;
    Currency *arg3 = 0 ;
    Date *arg4 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int argvi = 0;
    SwigValueWrapper< ExchangeRate > result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: ExchangeRateManager_lookup(self,source,target,date);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ExchangeRateManager, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExchangeRateManager_lookup" "', argument " "1"" of type '" "ExchangeRateManager const *""'"); 
    }
    arg1 = reinterpret_cast< ExchangeRateManager * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Currency,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ExchangeRateManager_lookup" "', argument " "2"" of type '" "Currency const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ExchangeRateManager_lookup" "', argument " "2"" of type '" "Currency const &""'"); 
    }
    arg2 = reinterpret_cast< Currency * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Currency,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ExchangeRateManager_lookup" "', argument " "3"" of type '" "Currency const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ExchangeRateManager_lookup" "', argument " "3"" of type '" "Currency const &""'"); 
    }
    arg3 = reinterpret_cast< Currency * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ExchangeRateManager_lookup" "', argument " "4"" of type '" "Date const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ExchangeRateManager_lookup" "', argument " "4"" of type '" "Date const &""'"); 
    }
    arg4 = reinterpret_cast< Date * >(argp4);
    {
      try {
        result = ((ExchangeRateManager const *)arg1)->lookup((Currency const &)*arg2,(Currency const &)*arg3,(Date const &)*arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new ExchangeRate(static_cast< const ExchangeRate& >(result))), SWIGTYPE_p_ExchangeRate, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_ExchangeRateManager_lookup) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_ExchangeRateManager, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Currency, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Currency, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_ExchangeRateManager, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Currency, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Currency, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_ExchangeRateManager_lookup__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_ExchangeRateManager_lookup__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'ExchangeRateManager_lookup'");
  XSRETURN(0);
}


XS(_wrap_ExchangeRateManager_clear) {
  {
    ExchangeRateManager *arg1 = (ExchangeRateManager *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ExchangeRateManager_clear(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ExchangeRateManager, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExchangeRateManager_clear" "', argument " "1"" of type '" "ExchangeRateManager *""'"); 
    }
    arg1 = reinterpret_cast< ExchangeRateManager * >(argp1);
    {
      try {
        (arg1)->clear();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_ExchangeRateManager) {
  {
    ExchangeRateManager *arg1 = (ExchangeRateManager *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_ExchangeRateManager(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ExchangeRateManager, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ExchangeRateManager" "', argument " "1"" of type '" "ExchangeRateManager *""'"); 
    }
    arg1 = reinterpret_cast< ExchangeRateManager * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Futures) {
  {
    int argvi = 0;
    Futures *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Futures();");
    }
    {
      try {
        result = (Futures *)new Futures();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Futures, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_Futures) {
  {
    Futures *arg1 = (Futures *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Futures(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Futures, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Futures" "', argument " "1"" of type '" "Futures *""'"); 
    }
    arg1 = reinterpret_cast< Futures * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_TimeBasket__SWIG_0) {
  {
    int argvi = 0;
    TimeBasket *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_TimeBasket();");
    }
    {
      try {
        result = (TimeBasket *)new TimeBasket();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TimeBasket, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_TimeBasket__SWIG_1) {
  {
    std::vector< Date > *arg1 = 0 ;
    std::vector< Real > *arg2 = 0 ;
    std::vector< Date > temp1 ;
    std::vector< Date > *v1 ;
    std::vector< double > temp2 ;
    std::vector< double > *v2 ;
    int argvi = 0;
    TimeBasket *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_TimeBasket(std::vector< Date > const &,std::vector< Real > const &);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_TimeBasket. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_TimeBasket. "
              "Expected an array of " "Date");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_TimeBasket. "
          "Expected an array of " "Date");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_TimeBasket. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp2.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_TimeBasket. "
              "Expected an array of ""double");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_TimeBasket. "
          "Expected an array of ""double");
      }
    }
    {
      try {
        result = (TimeBasket *)new TimeBasket((std::vector< Date > const &)*arg1,(std::vector< Real > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TimeBasket, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_TimeBasket) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_TimeBasket__SWIG_0); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_TimeBasket__SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded 'new_TimeBasket'");
  XSRETURN(0);
}


XS(_wrap_TimeBasket_size) {
  {
    TimeBasket *arg1 = (TimeBasket *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Size result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: TimeBasket_size(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_TimeBasket, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TimeBasket_size" "', argument " "1"" of type '" "TimeBasket *""'"); 
    }
    arg1 = reinterpret_cast< TimeBasket * >(argp1);
    {
      try {
        result = (arg1)->size();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_size_t  SWIG_PERL_CALL_ARGS_1(static_cast< size_t >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_TimeBasket_rebin) {
  {
    TimeBasket *arg1 = (TimeBasket *) 0 ;
    std::vector< Date > *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    std::vector< Date > temp2 ;
    std::vector< Date > *v2 ;
    int argvi = 0;
    TimeBasket result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: TimeBasket_rebin(self,std::vector< Date > const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_TimeBasket, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TimeBasket_rebin" "', argument " "1"" of type '" "TimeBasket const *""'"); 
    }
    arg1 = reinterpret_cast< TimeBasket * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of TimeBasket_rebin. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp2.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 2 of "
              "TimeBasket_rebin. "
              "Expected an array of " "Date");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of TimeBasket_rebin. "
          "Expected an array of " "Date");
      }
    }
    {
      try {
        result = ((TimeBasket const *)arg1)->rebin((std::vector< Date > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new TimeBasket(static_cast< const TimeBasket& >(result))), SWIGTYPE_p_TimeBasket, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_TimeBasket) {
  {
    TimeBasket *arg1 = (TimeBasket *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_TimeBasket(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_TimeBasket, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_TimeBasket" "', argument " "1"" of type '" "TimeBasket *""'"); 
    }
    arg1 = reinterpret_cast< TimeBasket * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Swap) {
  {
    std::vector< boost::shared_ptr< CashFlow > > *arg1 = 0 ;
    std::vector< boost::shared_ptr< CashFlow > > *arg2 = 0 ;
    std::vector< boost::shared_ptr< CashFlow > > temp1 ;
    std::vector< boost::shared_ptr< CashFlow > > *v1 ;
    std::vector< boost::shared_ptr< CashFlow > > temp2 ;
    std::vector< boost::shared_ptr< CashFlow > > *v2 ;
    int argvi = 0;
    SwapPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_Swap(firstLeg,secondLeg);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_Swap. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CashFlow >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_Swap. "
              "Expected an array of " "boost::shared_ptr< CashFlow >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_Swap. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_Swap. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CashFlow >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CashFlow_t,0) != -1) {
            temp2.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_Swap. "
              "Expected an array of " "boost::shared_ptr< CashFlow >");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_Swap. "
          "Expected an array of " "boost::shared_ptr< CashFlow >");
      }
    }
    {
      try {
        result = (SwapPtr *)new_SwapPtr((std::vector< boost::shared_ptr< CashFlow > > const &)*arg1,(std::vector< boost::shared_ptr< CashFlow > > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SwapPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Swap_startDate) {
  {
    SwapPtr *arg1 = (SwapPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Swap_startDate(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SwapPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Swap_startDate" "', argument " "1"" of type '" "SwapPtr *""'"); 
    }
    arg1 = reinterpret_cast< SwapPtr * >(argp1);
    {
      try {
        result = SwapPtr_startDate(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Swap_maturityDate) {
  {
    SwapPtr *arg1 = (SwapPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Swap_maturityDate(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SwapPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Swap_maturityDate" "', argument " "1"" of type '" "SwapPtr *""'"); 
    }
    arg1 = reinterpret_cast< SwapPtr * >(argp1);
    {
      try {
        result = SwapPtr_maturityDate(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Swap_leg) {
  {
    SwapPtr *arg1 = (SwapPtr *) 0 ;
    Size arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Leg *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Swap_leg(self,i);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SwapPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Swap_leg" "', argument " "1"" of type '" "SwapPtr *""'"); 
    }
    arg1 = reinterpret_cast< SwapPtr * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Swap_leg" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    {
      try {
        result = (Leg *) &SwapPtr_leg(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t, 0 | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Swap_legNPV) {
  {
    SwapPtr *arg1 = (SwapPtr *) 0 ;
    Size arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Swap_legNPV(self,j);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SwapPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Swap_legNPV" "', argument " "1"" of type '" "SwapPtr const *""'"); 
    }
    arg1 = reinterpret_cast< SwapPtr * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Swap_legNPV" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    {
      try {
        result = (Real)SwapPtr_legNPV((SwapPtr const *)arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_Swap) {
  {
    SwapPtr *arg1 = (SwapPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Swap(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SwapPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Swap" "', argument " "1"" of type '" "SwapPtr *""'"); 
    }
    arg1 = reinterpret_cast< SwapPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_VanillaSwap) {
  {
    VanillaSwap::Type arg1 ;
    Real arg2 ;
    Schedule *arg3 = 0 ;
    Rate arg4 ;
    DayCounter *arg5 = 0 ;
    Schedule *arg6 = 0 ;
    IborIndexPtr *arg7 = 0 ;
    Spread arg8 ;
    DayCounter *arg9 = 0 ;
    int val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    double val8 ;
    int ecode8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    int argvi = 0;
    VanillaSwapPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 9) || (items > 9)) {
      SWIG_croak("Usage: new_VanillaSwap(type,nominal,fixedSchedule,fixedRate,fixedDayCount,floatSchedule,index,spread,floatingDayCount);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_VanillaSwap" "', argument " "1"" of type '" "VanillaSwap::Type""'");
    } 
    arg1 = static_cast< VanillaSwap::Type >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_VanillaSwap" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_VanillaSwap" "', argument " "3"" of type '" "Schedule const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_VanillaSwap" "', argument " "3"" of type '" "Schedule const &""'"); 
    }
    arg3 = reinterpret_cast< Schedule * >(argp3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_VanillaSwap" "', argument " "4"" of type '" "Rate""'");
    } 
    arg4 = static_cast< Rate >(val4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_VanillaSwap" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_VanillaSwap" "', argument " "5"" of type '" "DayCounter const &""'"); 
    }
    arg5 = reinterpret_cast< DayCounter * >(argp5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_VanillaSwap" "', argument " "6"" of type '" "Schedule const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_VanillaSwap" "', argument " "6"" of type '" "Schedule const &""'"); 
    }
    arg6 = reinterpret_cast< Schedule * >(argp6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_IborIndexPtr,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_VanillaSwap" "', argument " "7"" of type '" "IborIndexPtr const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_VanillaSwap" "', argument " "7"" of type '" "IborIndexPtr const &""'"); 
    }
    arg7 = reinterpret_cast< IborIndexPtr * >(argp7);
    ecode8 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_VanillaSwap" "', argument " "8"" of type '" "Spread""'");
    } 
    arg8 = static_cast< Spread >(val8);
    res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res9)) {
      SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_VanillaSwap" "', argument " "9"" of type '" "DayCounter const &""'"); 
    }
    if (!argp9) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_VanillaSwap" "', argument " "9"" of type '" "DayCounter const &""'"); 
    }
    arg9 = reinterpret_cast< DayCounter * >(argp9);
    {
      try {
        result = (VanillaSwapPtr *)new_VanillaSwapPtr(arg1,arg2,(Schedule const &)*arg3,arg4,(DayCounter const &)*arg5,(Schedule const &)*arg6,(IborIndexPtr const &)*arg7,arg8,(DayCounter const &)*arg9);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_VanillaSwapPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_VanillaSwap_fairRate) {
  {
    VanillaSwapPtr *arg1 = (VanillaSwapPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: VanillaSwap_fairRate(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_VanillaSwapPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VanillaSwap_fairRate" "', argument " "1"" of type '" "VanillaSwapPtr *""'"); 
    }
    arg1 = reinterpret_cast< VanillaSwapPtr * >(argp1);
    {
      try {
        result = (Rate)VanillaSwapPtr_fairRate(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_VanillaSwap_fairSpread) {
  {
    VanillaSwapPtr *arg1 = (VanillaSwapPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Spread result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: VanillaSwap_fairSpread(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_VanillaSwapPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VanillaSwap_fairSpread" "', argument " "1"" of type '" "VanillaSwapPtr *""'"); 
    }
    arg1 = reinterpret_cast< VanillaSwapPtr * >(argp1);
    {
      try {
        result = (Spread)VanillaSwapPtr_fairSpread(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_VanillaSwap_fixedLegBPS) {
  {
    VanillaSwapPtr *arg1 = (VanillaSwapPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: VanillaSwap_fixedLegBPS(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_VanillaSwapPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VanillaSwap_fixedLegBPS" "', argument " "1"" of type '" "VanillaSwapPtr *""'"); 
    }
    arg1 = reinterpret_cast< VanillaSwapPtr * >(argp1);
    {
      try {
        result = (Real)VanillaSwapPtr_fixedLegBPS(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_VanillaSwap_floatingLegBPS) {
  {
    VanillaSwapPtr *arg1 = (VanillaSwapPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: VanillaSwap_floatingLegBPS(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_VanillaSwapPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VanillaSwap_floatingLegBPS" "', argument " "1"" of type '" "VanillaSwapPtr *""'"); 
    }
    arg1 = reinterpret_cast< VanillaSwapPtr * >(argp1);
    {
      try {
        result = (Real)VanillaSwapPtr_floatingLegBPS(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_VanillaSwap_fixedLegNPV) {
  {
    VanillaSwapPtr *arg1 = (VanillaSwapPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: VanillaSwap_fixedLegNPV(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_VanillaSwapPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VanillaSwap_fixedLegNPV" "', argument " "1"" of type '" "VanillaSwapPtr *""'"); 
    }
    arg1 = reinterpret_cast< VanillaSwapPtr * >(argp1);
    {
      try {
        result = (Real)VanillaSwapPtr_fixedLegNPV(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_VanillaSwap_floatingLegNPV) {
  {
    VanillaSwapPtr *arg1 = (VanillaSwapPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: VanillaSwap_floatingLegNPV(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_VanillaSwapPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VanillaSwap_floatingLegNPV" "', argument " "1"" of type '" "VanillaSwapPtr *""'"); 
    }
    arg1 = reinterpret_cast< VanillaSwapPtr * >(argp1);
    {
      try {
        result = (Real)VanillaSwapPtr_floatingLegNPV(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_VanillaSwap_fixedLeg) {
  {
    VanillaSwapPtr *arg1 = (VanillaSwapPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Leg *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: VanillaSwap_fixedLeg(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_VanillaSwapPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VanillaSwap_fixedLeg" "', argument " "1"" of type '" "VanillaSwapPtr *""'"); 
    }
    arg1 = reinterpret_cast< VanillaSwapPtr * >(argp1);
    {
      try {
        result = (Leg *) &VanillaSwapPtr_fixedLeg(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_VanillaSwap_floatingLeg) {
  {
    VanillaSwapPtr *arg1 = (VanillaSwapPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Leg *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: VanillaSwap_floatingLeg(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_VanillaSwapPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VanillaSwap_floatingLeg" "', argument " "1"" of type '" "VanillaSwapPtr *""'"); 
    }
    arg1 = reinterpret_cast< VanillaSwapPtr * >(argp1);
    {
      try {
        result = (Leg *) &VanillaSwapPtr_floatingLeg(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_VanillaSwap_nominal) {
  {
    VanillaSwapPtr *arg1 = (VanillaSwapPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: VanillaSwap_nominal(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_VanillaSwapPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VanillaSwap_nominal" "', argument " "1"" of type '" "VanillaSwapPtr *""'"); 
    }
    arg1 = reinterpret_cast< VanillaSwapPtr * >(argp1);
    {
      try {
        result = (Real)VanillaSwapPtr_nominal(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_VanillaSwap_fixedSchedule) {
  {
    VanillaSwapPtr *arg1 = (VanillaSwapPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Schedule *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: VanillaSwap_fixedSchedule(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_VanillaSwapPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VanillaSwap_fixedSchedule" "', argument " "1"" of type '" "VanillaSwapPtr *""'"); 
    }
    arg1 = reinterpret_cast< VanillaSwapPtr * >(argp1);
    {
      try {
        result = (Schedule *) &VanillaSwapPtr_fixedSchedule(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Schedule, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_VanillaSwap_floatingSchedule) {
  {
    VanillaSwapPtr *arg1 = (VanillaSwapPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Schedule *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: VanillaSwap_floatingSchedule(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_VanillaSwapPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VanillaSwap_floatingSchedule" "', argument " "1"" of type '" "VanillaSwapPtr *""'"); 
    }
    arg1 = reinterpret_cast< VanillaSwapPtr * >(argp1);
    {
      try {
        result = (Schedule *) &VanillaSwapPtr_floatingSchedule(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Schedule, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_VanillaSwap_fixedRate) {
  {
    VanillaSwapPtr *arg1 = (VanillaSwapPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: VanillaSwap_fixedRate(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_VanillaSwapPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VanillaSwap_fixedRate" "', argument " "1"" of type '" "VanillaSwapPtr *""'"); 
    }
    arg1 = reinterpret_cast< VanillaSwapPtr * >(argp1);
    {
      try {
        result = (Rate)VanillaSwapPtr_fixedRate(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_VanillaSwap_spread) {
  {
    VanillaSwapPtr *arg1 = (VanillaSwapPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Spread result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: VanillaSwap_spread(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_VanillaSwapPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VanillaSwap_spread" "', argument " "1"" of type '" "VanillaSwapPtr *""'"); 
    }
    arg1 = reinterpret_cast< VanillaSwapPtr * >(argp1);
    {
      try {
        result = (Spread)VanillaSwapPtr_spread(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_VanillaSwap_floatingDayCount) {
  {
    VanillaSwapPtr *arg1 = (VanillaSwapPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    DayCounter *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: VanillaSwap_floatingDayCount(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_VanillaSwapPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VanillaSwap_floatingDayCount" "', argument " "1"" of type '" "VanillaSwapPtr *""'"); 
    }
    arg1 = reinterpret_cast< VanillaSwapPtr * >(argp1);
    {
      try {
        result = (DayCounter *) &VanillaSwapPtr_floatingDayCount(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DayCounter, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_VanillaSwap_fixedDayCount) {
  {
    VanillaSwapPtr *arg1 = (VanillaSwapPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    DayCounter *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: VanillaSwap_fixedDayCount(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_VanillaSwapPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VanillaSwap_fixedDayCount" "', argument " "1"" of type '" "VanillaSwapPtr *""'"); 
    }
    arg1 = reinterpret_cast< VanillaSwapPtr * >(argp1);
    {
      try {
        result = (DayCounter *) &VanillaSwapPtr_fixedDayCount(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DayCounter, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_VanillaSwap) {
  {
    VanillaSwapPtr *arg1 = (VanillaSwapPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_VanillaSwap(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_VanillaSwapPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_VanillaSwap" "', argument " "1"" of type '" "VanillaSwapPtr *""'"); 
    }
    arg1 = reinterpret_cast< VanillaSwapPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_NonstandardSwap__SWIG_0) {
  {
    VanillaSwap::Type arg1 ;
    std::vector< Real > *arg2 = 0 ;
    std::vector< Real > *arg3 = 0 ;
    Schedule *arg4 = 0 ;
    std::vector< Real > *arg5 = 0 ;
    DayCounter *arg6 = 0 ;
    Schedule *arg7 = 0 ;
    IborIndexPtr *arg8 = 0 ;
    std::vector< Real > *arg9 = 0 ;
    std::vector< Spread > *arg10 = 0 ;
    DayCounter *arg11 = 0 ;
    bool arg12 ;
    bool arg13 ;
    BusinessDayConvention arg14 ;
    int val1 ;
    int ecode1 = 0 ;
    std::vector< double > temp2 ;
    std::vector< double > *v2 ;
    std::vector< double > temp3 ;
    std::vector< double > *v3 ;
    void *argp4 ;
    int res4 = 0 ;
    std::vector< double > temp5 ;
    std::vector< double > *v5 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    std::vector< double > temp9 ;
    std::vector< double > *v9 ;
    std::vector< double > temp10 ;
    std::vector< double > *v10 ;
    void *argp11 ;
    int res11 = 0 ;
    bool val12 ;
    int ecode12 = 0 ;
    bool val13 ;
    int ecode13 = 0 ;
    int val14 ;
    int ecode14 = 0 ;
    int argvi = 0;
    NonstandardSwapPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 14) || (items > 14)) {
      SWIG_croak("Usage: new_NonstandardSwap(type,fixedNominal,floatingNominal,fixedSchedule,fixedRate,fixedDayCount,floatSchedule,index,gearing,spread,floatDayCount,intermediateCapitalExchange,finalCapitalExchange,paymentConvention);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_NonstandardSwap" "', argument " "1"" of type '" "VanillaSwap::Type""'");
    } 
    arg1 = static_cast< VanillaSwap::Type >(val1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_NonstandardSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp2.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_NonstandardSwap. "
              "Expected an array of ""double");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_NonstandardSwap. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_NonstandardSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp3.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_NonstandardSwap. "
              "Expected an array of ""double");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_NonstandardSwap. "
          "Expected an array of ""double");
      }
    }
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_NonstandardSwap" "', argument " "4"" of type '" "Schedule const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NonstandardSwap" "', argument " "4"" of type '" "Schedule const &""'"); 
    }
    arg4 = reinterpret_cast< Schedule * >(argp4);
    {
      if (SWIG_ConvertPtr(ST(4),(void **) &v5, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg5 = v5;
      } else if (SvROK(ST(4))) {
        AV *av = (AV *)SvRV(ST(4));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 5 of new_NonstandardSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp5.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 5 of "
              "new_NonstandardSwap. "
              "Expected an array of ""double");
          }
        }
        arg5 = &temp5;
      } else {
        SWIG_croak("Type error in argument 5 of new_NonstandardSwap. "
          "Expected an array of ""double");
      }
    }
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_NonstandardSwap" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NonstandardSwap" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    arg6 = reinterpret_cast< DayCounter * >(argp6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_NonstandardSwap" "', argument " "7"" of type '" "Schedule const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NonstandardSwap" "', argument " "7"" of type '" "Schedule const &""'"); 
    }
    arg7 = reinterpret_cast< Schedule * >(argp7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_IborIndexPtr,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_NonstandardSwap" "', argument " "8"" of type '" "IborIndexPtr const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NonstandardSwap" "', argument " "8"" of type '" "IborIndexPtr const &""'"); 
    }
    arg8 = reinterpret_cast< IborIndexPtr * >(argp8);
    {
      if (SWIG_ConvertPtr(ST(8),(void **) &v9, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg9 = v9;
      } else if (SvROK(ST(8))) {
        AV *av = (AV *)SvRV(ST(8));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 9 of new_NonstandardSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp9.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 9 of "
              "new_NonstandardSwap. "
              "Expected an array of ""double");
          }
        }
        arg9 = &temp9;
      } else {
        SWIG_croak("Type error in argument 9 of new_NonstandardSwap. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(9),(void **) &v10, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg10 = v10;
      } else if (SvROK(ST(9))) {
        AV *av = (AV *)SvRV(ST(9));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 10 of new_NonstandardSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp10.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 10 of "
              "new_NonstandardSwap. "
              "Expected an array of ""double");
          }
        }
        arg10 = &temp10;
      } else {
        SWIG_croak("Type error in argument 10 of new_NonstandardSwap. "
          "Expected an array of ""double");
      }
    }
    res11 = SWIG_ConvertPtr(ST(10), &argp11, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res11)) {
      SWIG_exception_fail(SWIG_ArgError(res11), "in method '" "new_NonstandardSwap" "', argument " "11"" of type '" "DayCounter const &""'"); 
    }
    if (!argp11) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NonstandardSwap" "', argument " "11"" of type '" "DayCounter const &""'"); 
    }
    arg11 = reinterpret_cast< DayCounter * >(argp11);
    ecode12 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(11), &val12);
    if (!SWIG_IsOK(ecode12)) {
      SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "new_NonstandardSwap" "', argument " "12"" of type '" "bool""'");
    } 
    arg12 = static_cast< bool >(val12);
    ecode13 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(12), &val13);
    if (!SWIG_IsOK(ecode13)) {
      SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "new_NonstandardSwap" "', argument " "13"" of type '" "bool""'");
    } 
    arg13 = static_cast< bool >(val13);
    ecode14 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(13), &val14);
    if (!SWIG_IsOK(ecode14)) {
      SWIG_exception_fail(SWIG_ArgError(ecode14), "in method '" "new_NonstandardSwap" "', argument " "14"" of type '" "BusinessDayConvention""'");
    } 
    arg14 = static_cast< BusinessDayConvention >(val14);
    {
      try {
        result = (NonstandardSwapPtr *)new_NonstandardSwapPtr__SWIG_0(arg1,(std::vector< double > const &)*arg2,(std::vector< double > const &)*arg3,(Schedule const &)*arg4,(std::vector< double > const &)*arg5,(DayCounter const &)*arg6,(Schedule const &)*arg7,(IborIndexPtr const &)*arg8,(std::vector< double > const &)*arg9,(std::vector< double > const &)*arg10,(DayCounter const &)*arg11,arg12,arg13,arg14);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_NonstandardSwapPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_NonstandardSwap__SWIG_1) {
  {
    VanillaSwap::Type arg1 ;
    std::vector< Real > *arg2 = 0 ;
    std::vector< Real > *arg3 = 0 ;
    Schedule *arg4 = 0 ;
    std::vector< Real > *arg5 = 0 ;
    DayCounter *arg6 = 0 ;
    Schedule *arg7 = 0 ;
    IborIndexPtr *arg8 = 0 ;
    std::vector< Real > *arg9 = 0 ;
    std::vector< Spread > *arg10 = 0 ;
    DayCounter *arg11 = 0 ;
    bool arg12 ;
    bool arg13 ;
    int val1 ;
    int ecode1 = 0 ;
    std::vector< double > temp2 ;
    std::vector< double > *v2 ;
    std::vector< double > temp3 ;
    std::vector< double > *v3 ;
    void *argp4 ;
    int res4 = 0 ;
    std::vector< double > temp5 ;
    std::vector< double > *v5 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    std::vector< double > temp9 ;
    std::vector< double > *v9 ;
    std::vector< double > temp10 ;
    std::vector< double > *v10 ;
    void *argp11 ;
    int res11 = 0 ;
    bool val12 ;
    int ecode12 = 0 ;
    bool val13 ;
    int ecode13 = 0 ;
    int argvi = 0;
    NonstandardSwapPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 13) || (items > 13)) {
      SWIG_croak("Usage: new_NonstandardSwap(type,fixedNominal,floatingNominal,fixedSchedule,fixedRate,fixedDayCount,floatSchedule,index,gearing,spread,floatDayCount,intermediateCapitalExchange,finalCapitalExchange);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_NonstandardSwap" "', argument " "1"" of type '" "VanillaSwap::Type""'");
    } 
    arg1 = static_cast< VanillaSwap::Type >(val1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_NonstandardSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp2.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_NonstandardSwap. "
              "Expected an array of ""double");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_NonstandardSwap. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_NonstandardSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp3.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_NonstandardSwap. "
              "Expected an array of ""double");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_NonstandardSwap. "
          "Expected an array of ""double");
      }
    }
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_NonstandardSwap" "', argument " "4"" of type '" "Schedule const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NonstandardSwap" "', argument " "4"" of type '" "Schedule const &""'"); 
    }
    arg4 = reinterpret_cast< Schedule * >(argp4);
    {
      if (SWIG_ConvertPtr(ST(4),(void **) &v5, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg5 = v5;
      } else if (SvROK(ST(4))) {
        AV *av = (AV *)SvRV(ST(4));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 5 of new_NonstandardSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp5.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 5 of "
              "new_NonstandardSwap. "
              "Expected an array of ""double");
          }
        }
        arg5 = &temp5;
      } else {
        SWIG_croak("Type error in argument 5 of new_NonstandardSwap. "
          "Expected an array of ""double");
      }
    }
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_NonstandardSwap" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NonstandardSwap" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    arg6 = reinterpret_cast< DayCounter * >(argp6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_NonstandardSwap" "', argument " "7"" of type '" "Schedule const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NonstandardSwap" "', argument " "7"" of type '" "Schedule const &""'"); 
    }
    arg7 = reinterpret_cast< Schedule * >(argp7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_IborIndexPtr,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_NonstandardSwap" "', argument " "8"" of type '" "IborIndexPtr const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NonstandardSwap" "', argument " "8"" of type '" "IborIndexPtr const &""'"); 
    }
    arg8 = reinterpret_cast< IborIndexPtr * >(argp8);
    {
      if (SWIG_ConvertPtr(ST(8),(void **) &v9, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg9 = v9;
      } else if (SvROK(ST(8))) {
        AV *av = (AV *)SvRV(ST(8));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 9 of new_NonstandardSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp9.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 9 of "
              "new_NonstandardSwap. "
              "Expected an array of ""double");
          }
        }
        arg9 = &temp9;
      } else {
        SWIG_croak("Type error in argument 9 of new_NonstandardSwap. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(9),(void **) &v10, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg10 = v10;
      } else if (SvROK(ST(9))) {
        AV *av = (AV *)SvRV(ST(9));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 10 of new_NonstandardSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp10.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 10 of "
              "new_NonstandardSwap. "
              "Expected an array of ""double");
          }
        }
        arg10 = &temp10;
      } else {
        SWIG_croak("Type error in argument 10 of new_NonstandardSwap. "
          "Expected an array of ""double");
      }
    }
    res11 = SWIG_ConvertPtr(ST(10), &argp11, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res11)) {
      SWIG_exception_fail(SWIG_ArgError(res11), "in method '" "new_NonstandardSwap" "', argument " "11"" of type '" "DayCounter const &""'"); 
    }
    if (!argp11) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NonstandardSwap" "', argument " "11"" of type '" "DayCounter const &""'"); 
    }
    arg11 = reinterpret_cast< DayCounter * >(argp11);
    ecode12 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(11), &val12);
    if (!SWIG_IsOK(ecode12)) {
      SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "new_NonstandardSwap" "', argument " "12"" of type '" "bool""'");
    } 
    arg12 = static_cast< bool >(val12);
    ecode13 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(12), &val13);
    if (!SWIG_IsOK(ecode13)) {
      SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "new_NonstandardSwap" "', argument " "13"" of type '" "bool""'");
    } 
    arg13 = static_cast< bool >(val13);
    {
      try {
        result = (NonstandardSwapPtr *)new_NonstandardSwapPtr__SWIG_0(arg1,(std::vector< double > const &)*arg2,(std::vector< double > const &)*arg3,(Schedule const &)*arg4,(std::vector< double > const &)*arg5,(DayCounter const &)*arg6,(Schedule const &)*arg7,(IborIndexPtr const &)*arg8,(std::vector< double > const &)*arg9,(std::vector< double > const &)*arg10,(DayCounter const &)*arg11,arg12,arg13);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_NonstandardSwapPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_NonstandardSwap__SWIG_2) {
  {
    VanillaSwap::Type arg1 ;
    std::vector< Real > *arg2 = 0 ;
    std::vector< Real > *arg3 = 0 ;
    Schedule *arg4 = 0 ;
    std::vector< Real > *arg5 = 0 ;
    DayCounter *arg6 = 0 ;
    Schedule *arg7 = 0 ;
    IborIndexPtr *arg8 = 0 ;
    std::vector< Real > *arg9 = 0 ;
    std::vector< Spread > *arg10 = 0 ;
    DayCounter *arg11 = 0 ;
    bool arg12 ;
    int val1 ;
    int ecode1 = 0 ;
    std::vector< double > temp2 ;
    std::vector< double > *v2 ;
    std::vector< double > temp3 ;
    std::vector< double > *v3 ;
    void *argp4 ;
    int res4 = 0 ;
    std::vector< double > temp5 ;
    std::vector< double > *v5 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    std::vector< double > temp9 ;
    std::vector< double > *v9 ;
    std::vector< double > temp10 ;
    std::vector< double > *v10 ;
    void *argp11 ;
    int res11 = 0 ;
    bool val12 ;
    int ecode12 = 0 ;
    int argvi = 0;
    NonstandardSwapPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 12) || (items > 12)) {
      SWIG_croak("Usage: new_NonstandardSwap(type,fixedNominal,floatingNominal,fixedSchedule,fixedRate,fixedDayCount,floatSchedule,index,gearing,spread,floatDayCount,intermediateCapitalExchange);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_NonstandardSwap" "', argument " "1"" of type '" "VanillaSwap::Type""'");
    } 
    arg1 = static_cast< VanillaSwap::Type >(val1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_NonstandardSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp2.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_NonstandardSwap. "
              "Expected an array of ""double");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_NonstandardSwap. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_NonstandardSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp3.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_NonstandardSwap. "
              "Expected an array of ""double");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_NonstandardSwap. "
          "Expected an array of ""double");
      }
    }
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_NonstandardSwap" "', argument " "4"" of type '" "Schedule const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NonstandardSwap" "', argument " "4"" of type '" "Schedule const &""'"); 
    }
    arg4 = reinterpret_cast< Schedule * >(argp4);
    {
      if (SWIG_ConvertPtr(ST(4),(void **) &v5, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg5 = v5;
      } else if (SvROK(ST(4))) {
        AV *av = (AV *)SvRV(ST(4));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 5 of new_NonstandardSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp5.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 5 of "
              "new_NonstandardSwap. "
              "Expected an array of ""double");
          }
        }
        arg5 = &temp5;
      } else {
        SWIG_croak("Type error in argument 5 of new_NonstandardSwap. "
          "Expected an array of ""double");
      }
    }
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_NonstandardSwap" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NonstandardSwap" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    arg6 = reinterpret_cast< DayCounter * >(argp6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_NonstandardSwap" "', argument " "7"" of type '" "Schedule const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NonstandardSwap" "', argument " "7"" of type '" "Schedule const &""'"); 
    }
    arg7 = reinterpret_cast< Schedule * >(argp7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_IborIndexPtr,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_NonstandardSwap" "', argument " "8"" of type '" "IborIndexPtr const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NonstandardSwap" "', argument " "8"" of type '" "IborIndexPtr const &""'"); 
    }
    arg8 = reinterpret_cast< IborIndexPtr * >(argp8);
    {
      if (SWIG_ConvertPtr(ST(8),(void **) &v9, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg9 = v9;
      } else if (SvROK(ST(8))) {
        AV *av = (AV *)SvRV(ST(8));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 9 of new_NonstandardSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp9.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 9 of "
              "new_NonstandardSwap. "
              "Expected an array of ""double");
          }
        }
        arg9 = &temp9;
      } else {
        SWIG_croak("Type error in argument 9 of new_NonstandardSwap. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(9),(void **) &v10, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg10 = v10;
      } else if (SvROK(ST(9))) {
        AV *av = (AV *)SvRV(ST(9));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 10 of new_NonstandardSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp10.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 10 of "
              "new_NonstandardSwap. "
              "Expected an array of ""double");
          }
        }
        arg10 = &temp10;
      } else {
        SWIG_croak("Type error in argument 10 of new_NonstandardSwap. "
          "Expected an array of ""double");
      }
    }
    res11 = SWIG_ConvertPtr(ST(10), &argp11, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res11)) {
      SWIG_exception_fail(SWIG_ArgError(res11), "in method '" "new_NonstandardSwap" "', argument " "11"" of type '" "DayCounter const &""'"); 
    }
    if (!argp11) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NonstandardSwap" "', argument " "11"" of type '" "DayCounter const &""'"); 
    }
    arg11 = reinterpret_cast< DayCounter * >(argp11);
    ecode12 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(11), &val12);
    if (!SWIG_IsOK(ecode12)) {
      SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "new_NonstandardSwap" "', argument " "12"" of type '" "bool""'");
    } 
    arg12 = static_cast< bool >(val12);
    {
      try {
        result = (NonstandardSwapPtr *)new_NonstandardSwapPtr__SWIG_0(arg1,(std::vector< double > const &)*arg2,(std::vector< double > const &)*arg3,(Schedule const &)*arg4,(std::vector< double > const &)*arg5,(DayCounter const &)*arg6,(Schedule const &)*arg7,(IborIndexPtr const &)*arg8,(std::vector< double > const &)*arg9,(std::vector< double > const &)*arg10,(DayCounter const &)*arg11,arg12);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_NonstandardSwapPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_NonstandardSwap__SWIG_3) {
  {
    VanillaSwap::Type arg1 ;
    std::vector< Real > *arg2 = 0 ;
    std::vector< Real > *arg3 = 0 ;
    Schedule *arg4 = 0 ;
    std::vector< Real > *arg5 = 0 ;
    DayCounter *arg6 = 0 ;
    Schedule *arg7 = 0 ;
    IborIndexPtr *arg8 = 0 ;
    std::vector< Real > *arg9 = 0 ;
    std::vector< Spread > *arg10 = 0 ;
    DayCounter *arg11 = 0 ;
    int val1 ;
    int ecode1 = 0 ;
    std::vector< double > temp2 ;
    std::vector< double > *v2 ;
    std::vector< double > temp3 ;
    std::vector< double > *v3 ;
    void *argp4 ;
    int res4 = 0 ;
    std::vector< double > temp5 ;
    std::vector< double > *v5 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    std::vector< double > temp9 ;
    std::vector< double > *v9 ;
    std::vector< double > temp10 ;
    std::vector< double > *v10 ;
    void *argp11 ;
    int res11 = 0 ;
    int argvi = 0;
    NonstandardSwapPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 11) || (items > 11)) {
      SWIG_croak("Usage: new_NonstandardSwap(type,fixedNominal,floatingNominal,fixedSchedule,fixedRate,fixedDayCount,floatSchedule,index,gearing,spread,floatDayCount);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_NonstandardSwap" "', argument " "1"" of type '" "VanillaSwap::Type""'");
    } 
    arg1 = static_cast< VanillaSwap::Type >(val1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_NonstandardSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp2.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_NonstandardSwap. "
              "Expected an array of ""double");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_NonstandardSwap. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_NonstandardSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp3.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_NonstandardSwap. "
              "Expected an array of ""double");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_NonstandardSwap. "
          "Expected an array of ""double");
      }
    }
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_NonstandardSwap" "', argument " "4"" of type '" "Schedule const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NonstandardSwap" "', argument " "4"" of type '" "Schedule const &""'"); 
    }
    arg4 = reinterpret_cast< Schedule * >(argp4);
    {
      if (SWIG_ConvertPtr(ST(4),(void **) &v5, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg5 = v5;
      } else if (SvROK(ST(4))) {
        AV *av = (AV *)SvRV(ST(4));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 5 of new_NonstandardSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp5.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 5 of "
              "new_NonstandardSwap. "
              "Expected an array of ""double");
          }
        }
        arg5 = &temp5;
      } else {
        SWIG_croak("Type error in argument 5 of new_NonstandardSwap. "
          "Expected an array of ""double");
      }
    }
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_NonstandardSwap" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NonstandardSwap" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    arg6 = reinterpret_cast< DayCounter * >(argp6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_NonstandardSwap" "', argument " "7"" of type '" "Schedule const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NonstandardSwap" "', argument " "7"" of type '" "Schedule const &""'"); 
    }
    arg7 = reinterpret_cast< Schedule * >(argp7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_IborIndexPtr,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_NonstandardSwap" "', argument " "8"" of type '" "IborIndexPtr const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NonstandardSwap" "', argument " "8"" of type '" "IborIndexPtr const &""'"); 
    }
    arg8 = reinterpret_cast< IborIndexPtr * >(argp8);
    {
      if (SWIG_ConvertPtr(ST(8),(void **) &v9, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg9 = v9;
      } else if (SvROK(ST(8))) {
        AV *av = (AV *)SvRV(ST(8));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 9 of new_NonstandardSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp9.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 9 of "
              "new_NonstandardSwap. "
              "Expected an array of ""double");
          }
        }
        arg9 = &temp9;
      } else {
        SWIG_croak("Type error in argument 9 of new_NonstandardSwap. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(9),(void **) &v10, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg10 = v10;
      } else if (SvROK(ST(9))) {
        AV *av = (AV *)SvRV(ST(9));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 10 of new_NonstandardSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp10.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 10 of "
              "new_NonstandardSwap. "
              "Expected an array of ""double");
          }
        }
        arg10 = &temp10;
      } else {
        SWIG_croak("Type error in argument 10 of new_NonstandardSwap. "
          "Expected an array of ""double");
      }
    }
    res11 = SWIG_ConvertPtr(ST(10), &argp11, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res11)) {
      SWIG_exception_fail(SWIG_ArgError(res11), "in method '" "new_NonstandardSwap" "', argument " "11"" of type '" "DayCounter const &""'"); 
    }
    if (!argp11) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NonstandardSwap" "', argument " "11"" of type '" "DayCounter const &""'"); 
    }
    arg11 = reinterpret_cast< DayCounter * >(argp11);
    {
      try {
        result = (NonstandardSwapPtr *)new_NonstandardSwapPtr__SWIG_0(arg1,(std::vector< double > const &)*arg2,(std::vector< double > const &)*arg3,(Schedule const &)*arg4,(std::vector< double > const &)*arg5,(DayCounter const &)*arg6,(Schedule const &)*arg7,(IborIndexPtr const &)*arg8,(std::vector< double > const &)*arg9,(std::vector< double > const &)*arg10,(DayCounter const &)*arg11);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_NonstandardSwapPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_NonstandardSwap) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 11) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(4),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(4))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(4));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_IborIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(8),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(8))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(8));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(9),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(9))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(9));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(10), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 12) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(4),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(4))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(4));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_IborIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(8),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(8))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(8));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(9),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(9))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(9));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(10), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(11), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 13) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(4),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(4))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(4));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_IborIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(8),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(8))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(8));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(9),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(9))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(9));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(10), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(11), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(12), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 14) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(4),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(4))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(4));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_IborIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(8),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(8))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(8));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(9),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(9))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(9));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(10), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(11), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(12), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(13), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_NonstandardSwap__SWIG_3); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_NonstandardSwap__SWIG_2); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_NonstandardSwap__SWIG_1); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_NonstandardSwap__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_NonstandardSwap'");
  XSRETURN(0);
}


XS(_wrap_NonstandardSwap_fixedLeg) {
  {
    NonstandardSwapPtr *arg1 = (NonstandardSwapPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Leg *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: NonstandardSwap_fixedLeg(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_NonstandardSwapPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NonstandardSwap_fixedLeg" "', argument " "1"" of type '" "NonstandardSwapPtr *""'"); 
    }
    arg1 = reinterpret_cast< NonstandardSwapPtr * >(argp1);
    {
      try {
        result = (Leg *) &NonstandardSwapPtr_fixedLeg(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_NonstandardSwap_floatingLeg) {
  {
    NonstandardSwapPtr *arg1 = (NonstandardSwapPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Leg *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: NonstandardSwap_floatingLeg(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_NonstandardSwapPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NonstandardSwap_floatingLeg" "', argument " "1"" of type '" "NonstandardSwapPtr *""'"); 
    }
    arg1 = reinterpret_cast< NonstandardSwapPtr * >(argp1);
    {
      try {
        result = (Leg *) &NonstandardSwapPtr_floatingLeg(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_NonstandardSwap_fixedNominals) {
  {
    NonstandardSwapPtr *arg1 = (NonstandardSwapPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Real > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: NonstandardSwap_fixedNominals(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_NonstandardSwapPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NonstandardSwap_fixedNominals" "', argument " "1"" of type '" "NonstandardSwapPtr *""'"); 
    }
    arg1 = reinterpret_cast< NonstandardSwapPtr * >(argp1);
    {
      try {
        result = NonstandardSwapPtr_fixedNominals(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        svs[i] = sv_newmortal();
        sv_setnv(svs[i], result[i]);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_NonstandardSwap_floatingNominals) {
  {
    NonstandardSwapPtr *arg1 = (NonstandardSwapPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Real > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: NonstandardSwap_floatingNominals(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_NonstandardSwapPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NonstandardSwap_floatingNominals" "', argument " "1"" of type '" "NonstandardSwapPtr *""'"); 
    }
    arg1 = reinterpret_cast< NonstandardSwapPtr * >(argp1);
    {
      try {
        result = NonstandardSwapPtr_floatingNominals(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        svs[i] = sv_newmortal();
        sv_setnv(svs[i], result[i]);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_NonstandardSwap_fixedSchedule) {
  {
    NonstandardSwapPtr *arg1 = (NonstandardSwapPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Schedule *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: NonstandardSwap_fixedSchedule(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_NonstandardSwapPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NonstandardSwap_fixedSchedule" "', argument " "1"" of type '" "NonstandardSwapPtr *""'"); 
    }
    arg1 = reinterpret_cast< NonstandardSwapPtr * >(argp1);
    {
      try {
        result = (Schedule *) &NonstandardSwapPtr_fixedSchedule(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Schedule, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_NonstandardSwap_floatingSchedule) {
  {
    NonstandardSwapPtr *arg1 = (NonstandardSwapPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Schedule *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: NonstandardSwap_floatingSchedule(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_NonstandardSwapPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NonstandardSwap_floatingSchedule" "', argument " "1"" of type '" "NonstandardSwapPtr *""'"); 
    }
    arg1 = reinterpret_cast< NonstandardSwapPtr * >(argp1);
    {
      try {
        result = (Schedule *) &NonstandardSwapPtr_floatingSchedule(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Schedule, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_NonstandardSwap_fixedRate) {
  {
    NonstandardSwapPtr *arg1 = (NonstandardSwapPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Rate > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: NonstandardSwap_fixedRate(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_NonstandardSwapPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NonstandardSwap_fixedRate" "', argument " "1"" of type '" "NonstandardSwapPtr *""'"); 
    }
    arg1 = reinterpret_cast< NonstandardSwapPtr * >(argp1);
    {
      try {
        result = NonstandardSwapPtr_fixedRate(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        svs[i] = sv_newmortal();
        sv_setnv(svs[i], result[i]);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_NonstandardSwap_spreads) {
  {
    NonstandardSwapPtr *arg1 = (NonstandardSwapPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Spread > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: NonstandardSwap_spreads(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_NonstandardSwapPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NonstandardSwap_spreads" "', argument " "1"" of type '" "NonstandardSwapPtr *""'"); 
    }
    arg1 = reinterpret_cast< NonstandardSwapPtr * >(argp1);
    {
      try {
        result = NonstandardSwapPtr_spreads(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        svs[i] = sv_newmortal();
        sv_setnv(svs[i], result[i]);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_NonstandardSwap_gearings) {
  {
    NonstandardSwapPtr *arg1 = (NonstandardSwapPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Spread > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: NonstandardSwap_gearings(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_NonstandardSwapPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NonstandardSwap_gearings" "', argument " "1"" of type '" "NonstandardSwapPtr *""'"); 
    }
    arg1 = reinterpret_cast< NonstandardSwapPtr * >(argp1);
    {
      try {
        result = NonstandardSwapPtr_gearings(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        svs[i] = sv_newmortal();
        sv_setnv(svs[i], result[i]);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_NonstandardSwap_floatingDayCount) {
  {
    NonstandardSwapPtr *arg1 = (NonstandardSwapPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    DayCounter *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: NonstandardSwap_floatingDayCount(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_NonstandardSwapPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NonstandardSwap_floatingDayCount" "', argument " "1"" of type '" "NonstandardSwapPtr *""'"); 
    }
    arg1 = reinterpret_cast< NonstandardSwapPtr * >(argp1);
    {
      try {
        result = (DayCounter *) &NonstandardSwapPtr_floatingDayCount(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DayCounter, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_NonstandardSwap_fixedDayCount) {
  {
    NonstandardSwapPtr *arg1 = (NonstandardSwapPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    DayCounter *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: NonstandardSwap_fixedDayCount(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_NonstandardSwapPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NonstandardSwap_fixedDayCount" "', argument " "1"" of type '" "NonstandardSwapPtr *""'"); 
    }
    arg1 = reinterpret_cast< NonstandardSwapPtr * >(argp1);
    {
      try {
        result = (DayCounter *) &NonstandardSwapPtr_fixedDayCount(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DayCounter, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_NonstandardSwap) {
  {
    NonstandardSwapPtr *arg1 = (NonstandardSwapPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_NonstandardSwap(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_NonstandardSwapPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_NonstandardSwap" "', argument " "1"" of type '" "NonstandardSwapPtr *""'"); 
    }
    arg1 = reinterpret_cast< NonstandardSwapPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DiscountingSwapEngine__SWIG_0) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    Date *arg2 = 0 ;
    Date *arg3 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    DiscountingSwapEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_DiscountingSwapEngine(discountCurve,settlementDate,npvDate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DiscountingSwapEngine" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DiscountingSwapEngine" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_DiscountingSwapEngine" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DiscountingSwapEngine" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_DiscountingSwapEngine" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DiscountingSwapEngine" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    {
      try {
        result = (DiscountingSwapEnginePtr *)new_DiscountingSwapEnginePtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1,(Date const &)*arg2,(Date const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DiscountingSwapEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DiscountingSwapEngine__SWIG_1) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    Date *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    DiscountingSwapEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_DiscountingSwapEngine(discountCurve,settlementDate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DiscountingSwapEngine" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DiscountingSwapEngine" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_DiscountingSwapEngine" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DiscountingSwapEngine" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    {
      try {
        result = (DiscountingSwapEnginePtr *)new_DiscountingSwapEnginePtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1,(Date const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DiscountingSwapEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DiscountingSwapEngine__SWIG_2) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    DiscountingSwapEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_DiscountingSwapEngine(discountCurve);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DiscountingSwapEngine" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DiscountingSwapEngine" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    {
      try {
        result = (DiscountingSwapEnginePtr *)new_DiscountingSwapEnginePtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DiscountingSwapEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DiscountingSwapEngine__SWIG_3) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    bool arg2 ;
    Date *arg3 = 0 ;
    Date *arg4 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    bool val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int argvi = 0;
    DiscountingSwapEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_DiscountingSwapEngine(discountCurve,includeSettlementDateFlows,settlementDate,npvDate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DiscountingSwapEngine" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DiscountingSwapEngine" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    ecode2 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_DiscountingSwapEngine" "', argument " "2"" of type '" "bool""'");
    } 
    arg2 = static_cast< bool >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_DiscountingSwapEngine" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DiscountingSwapEngine" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_DiscountingSwapEngine" "', argument " "4"" of type '" "Date const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DiscountingSwapEngine" "', argument " "4"" of type '" "Date const &""'"); 
    }
    arg4 = reinterpret_cast< Date * >(argp4);
    {
      try {
        result = (DiscountingSwapEnginePtr *)new_DiscountingSwapEnginePtr__SWIG_3((Handle< YieldTermStructure > const &)*arg1,arg2,(Date const &)*arg3,(Date const &)*arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DiscountingSwapEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DiscountingSwapEngine__SWIG_4) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    bool arg2 ;
    Date *arg3 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    bool val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    DiscountingSwapEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_DiscountingSwapEngine(discountCurve,includeSettlementDateFlows,settlementDate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DiscountingSwapEngine" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DiscountingSwapEngine" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    ecode2 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_DiscountingSwapEngine" "', argument " "2"" of type '" "bool""'");
    } 
    arg2 = static_cast< bool >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_DiscountingSwapEngine" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DiscountingSwapEngine" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    {
      try {
        result = (DiscountingSwapEnginePtr *)new_DiscountingSwapEnginePtr__SWIG_3((Handle< YieldTermStructure > const &)*arg1,arg2,(Date const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DiscountingSwapEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DiscountingSwapEngine__SWIG_5) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    bool arg2 ;
    void *argp1 ;
    int res1 = 0 ;
    bool val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    DiscountingSwapEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_DiscountingSwapEngine(discountCurve,includeSettlementDateFlows);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DiscountingSwapEngine" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DiscountingSwapEngine" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    ecode2 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_DiscountingSwapEngine" "', argument " "2"" of type '" "bool""'");
    } 
    arg2 = static_cast< bool >(val2);
    {
      try {
        result = (DiscountingSwapEnginePtr *)new_DiscountingSwapEnginePtr__SWIG_3((Handle< YieldTermStructure > const &)*arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DiscountingSwapEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DiscountingSwapEngine) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DiscountingSwapEngine__SWIG_2); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DiscountingSwapEngine__SWIG_1); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DiscountingSwapEngine__SWIG_5); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DiscountingSwapEngine__SWIG_0); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DiscountingSwapEngine__SWIG_4); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DiscountingSwapEngine__SWIG_3); return;
    }
  }
  
  croak("No matching function for overloaded 'new_DiscountingSwapEngine'");
  XSRETURN(0);
}


XS(_wrap_delete_DiscountingSwapEngine) {
  {
    DiscountingSwapEnginePtr *arg1 = (DiscountingSwapEnginePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_DiscountingSwapEngine(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_DiscountingSwapEnginePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DiscountingSwapEngine" "', argument " "1"" of type '" "DiscountingSwapEnginePtr *""'"); 
    }
    arg1 = reinterpret_cast< DiscountingSwapEnginePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_AssetSwap__SWIG_0) {
  {
    bool arg1 ;
    BondPtr *arg2 = 0 ;
    Real arg3 ;
    InterestRateIndexPtr *arg4 = 0 ;
    Spread arg5 ;
    Schedule *arg6 = 0 ;
    DayCounter *arg7 = 0 ;
    bool arg8 ;
    bool val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    double val5 ;
    int ecode5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    bool val8 ;
    int ecode8 = 0 ;
    int argvi = 0;
    AssetSwapPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 8) || (items > 8)) {
      SWIG_croak("Usage: new_AssetSwap(payFixedRate,bond,bondCleanPrice,index,spread,floatSchedule,floatingDayCount,parAssetSwap);");
    }
    ecode1 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_AssetSwap" "', argument " "1"" of type '" "bool""'");
    } 
    arg1 = static_cast< bool >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_AssetSwap" "', argument " "2"" of type '" "BondPtr const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AssetSwap" "', argument " "2"" of type '" "BondPtr const &""'"); 
    }
    arg2 = reinterpret_cast< BondPtr * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_AssetSwap" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_InterestRateIndexPtr,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_AssetSwap" "', argument " "4"" of type '" "InterestRateIndexPtr const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AssetSwap" "', argument " "4"" of type '" "InterestRateIndexPtr const &""'"); 
    }
    arg4 = reinterpret_cast< InterestRateIndexPtr * >(argp4);
    ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_AssetSwap" "', argument " "5"" of type '" "Spread""'");
    } 
    arg5 = static_cast< Spread >(val5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_AssetSwap" "', argument " "6"" of type '" "Schedule const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AssetSwap" "', argument " "6"" of type '" "Schedule const &""'"); 
    }
    arg6 = reinterpret_cast< Schedule * >(argp6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_AssetSwap" "', argument " "7"" of type '" "DayCounter const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AssetSwap" "', argument " "7"" of type '" "DayCounter const &""'"); 
    }
    arg7 = reinterpret_cast< DayCounter * >(argp7);
    ecode8 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_AssetSwap" "', argument " "8"" of type '" "bool""'");
    } 
    arg8 = static_cast< bool >(val8);
    {
      try {
        result = (AssetSwapPtr *)new_AssetSwapPtr__SWIG_0(arg1,(BondPtr const &)*arg2,arg3,(InterestRateIndexPtr const &)*arg4,arg5,(Schedule const &)*arg6,(DayCounter const &)*arg7,arg8);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_AssetSwapPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_AssetSwap__SWIG_1) {
  {
    bool arg1 ;
    BondPtr *arg2 = 0 ;
    Real arg3 ;
    InterestRateIndexPtr *arg4 = 0 ;
    Spread arg5 ;
    Schedule *arg6 = 0 ;
    DayCounter *arg7 = 0 ;
    bool val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    double val5 ;
    int ecode5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    int argvi = 0;
    AssetSwapPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: new_AssetSwap(payFixedRate,bond,bondCleanPrice,index,spread,floatSchedule,floatingDayCount);");
    }
    ecode1 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_AssetSwap" "', argument " "1"" of type '" "bool""'");
    } 
    arg1 = static_cast< bool >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_AssetSwap" "', argument " "2"" of type '" "BondPtr const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AssetSwap" "', argument " "2"" of type '" "BondPtr const &""'"); 
    }
    arg2 = reinterpret_cast< BondPtr * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_AssetSwap" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_InterestRateIndexPtr,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_AssetSwap" "', argument " "4"" of type '" "InterestRateIndexPtr const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AssetSwap" "', argument " "4"" of type '" "InterestRateIndexPtr const &""'"); 
    }
    arg4 = reinterpret_cast< InterestRateIndexPtr * >(argp4);
    ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_AssetSwap" "', argument " "5"" of type '" "Spread""'");
    } 
    arg5 = static_cast< Spread >(val5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_AssetSwap" "', argument " "6"" of type '" "Schedule const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AssetSwap" "', argument " "6"" of type '" "Schedule const &""'"); 
    }
    arg6 = reinterpret_cast< Schedule * >(argp6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_AssetSwap" "', argument " "7"" of type '" "DayCounter const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AssetSwap" "', argument " "7"" of type '" "DayCounter const &""'"); 
    }
    arg7 = reinterpret_cast< DayCounter * >(argp7);
    {
      try {
        result = (AssetSwapPtr *)new_AssetSwapPtr__SWIG_0(arg1,(BondPtr const &)*arg2,arg3,(InterestRateIndexPtr const &)*arg4,arg5,(Schedule const &)*arg6,(DayCounter const &)*arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_AssetSwapPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_AssetSwap__SWIG_2) {
  {
    bool arg1 ;
    BondPtr *arg2 = 0 ;
    Real arg3 ;
    InterestRateIndexPtr *arg4 = 0 ;
    Spread arg5 ;
    Schedule *arg6 = 0 ;
    bool val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    double val5 ;
    int ecode5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    int argvi = 0;
    AssetSwapPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_AssetSwap(payFixedRate,bond,bondCleanPrice,index,spread,floatSchedule);");
    }
    ecode1 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_AssetSwap" "', argument " "1"" of type '" "bool""'");
    } 
    arg1 = static_cast< bool >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_AssetSwap" "', argument " "2"" of type '" "BondPtr const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AssetSwap" "', argument " "2"" of type '" "BondPtr const &""'"); 
    }
    arg2 = reinterpret_cast< BondPtr * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_AssetSwap" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_InterestRateIndexPtr,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_AssetSwap" "', argument " "4"" of type '" "InterestRateIndexPtr const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AssetSwap" "', argument " "4"" of type '" "InterestRateIndexPtr const &""'"); 
    }
    arg4 = reinterpret_cast< InterestRateIndexPtr * >(argp4);
    ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_AssetSwap" "', argument " "5"" of type '" "Spread""'");
    } 
    arg5 = static_cast< Spread >(val5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_AssetSwap" "', argument " "6"" of type '" "Schedule const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AssetSwap" "', argument " "6"" of type '" "Schedule const &""'"); 
    }
    arg6 = reinterpret_cast< Schedule * >(argp6);
    {
      try {
        result = (AssetSwapPtr *)new_AssetSwapPtr__SWIG_0(arg1,(BondPtr const &)*arg2,arg3,(InterestRateIndexPtr const &)*arg4,arg5,(Schedule const &)*arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_AssetSwapPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_AssetSwap__SWIG_3) {
  {
    bool arg1 ;
    BondPtr *arg2 = 0 ;
    Real arg3 ;
    InterestRateIndexPtr *arg4 = 0 ;
    Spread arg5 ;
    bool val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    double val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    AssetSwapPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_AssetSwap(payFixedRate,bond,bondCleanPrice,index,spread);");
    }
    ecode1 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_AssetSwap" "', argument " "1"" of type '" "bool""'");
    } 
    arg1 = static_cast< bool >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_AssetSwap" "', argument " "2"" of type '" "BondPtr const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AssetSwap" "', argument " "2"" of type '" "BondPtr const &""'"); 
    }
    arg2 = reinterpret_cast< BondPtr * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_AssetSwap" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_InterestRateIndexPtr,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_AssetSwap" "', argument " "4"" of type '" "InterestRateIndexPtr const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AssetSwap" "', argument " "4"" of type '" "InterestRateIndexPtr const &""'"); 
    }
    arg4 = reinterpret_cast< InterestRateIndexPtr * >(argp4);
    ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_AssetSwap" "', argument " "5"" of type '" "Spread""'");
    } 
    arg5 = static_cast< Spread >(val5);
    {
      try {
        result = (AssetSwapPtr *)new_AssetSwapPtr__SWIG_0(arg1,(BondPtr const &)*arg2,arg3,(InterestRateIndexPtr const &)*arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_AssetSwapPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_AssetSwap) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_InterestRateIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_InterestRateIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_InterestRateIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 8) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_InterestRateIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_AssetSwap__SWIG_3); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_AssetSwap__SWIG_2); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_AssetSwap__SWIG_1); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_AssetSwap__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_AssetSwap'");
  XSRETURN(0);
}


XS(_wrap_AssetSwap_fairCleanPrice) {
  {
    AssetSwapPtr *arg1 = (AssetSwapPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: AssetSwap_fairCleanPrice(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_AssetSwapPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AssetSwap_fairCleanPrice" "', argument " "1"" of type '" "AssetSwapPtr *""'"); 
    }
    arg1 = reinterpret_cast< AssetSwapPtr * >(argp1);
    {
      try {
        result = (Real)AssetSwapPtr_fairCleanPrice(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_AssetSwap_fairSpread) {
  {
    AssetSwapPtr *arg1 = (AssetSwapPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Spread result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: AssetSwap_fairSpread(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_AssetSwapPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AssetSwap_fairSpread" "', argument " "1"" of type '" "AssetSwapPtr *""'"); 
    }
    arg1 = reinterpret_cast< AssetSwapPtr * >(argp1);
    {
      try {
        result = (Spread)AssetSwapPtr_fairSpread(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_AssetSwap) {
  {
    AssetSwapPtr *arg1 = (AssetSwapPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_AssetSwap(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_AssetSwapPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_AssetSwap" "', argument " "1"" of type '" "AssetSwapPtr *""'"); 
    }
    arg1 = reinterpret_cast< AssetSwapPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FloatFloatSwap__SWIG_0) {
  {
    VanillaSwap::Type arg1 ;
    std::vector< Real > *arg2 = 0 ;
    std::vector< Real > *arg3 = 0 ;
    Schedule *arg4 = 0 ;
    InterestRateIndexPtr *arg5 = 0 ;
    DayCounter *arg6 = 0 ;
    Schedule *arg7 = 0 ;
    InterestRateIndexPtr *arg8 = 0 ;
    DayCounter *arg9 = 0 ;
    bool arg10 ;
    bool arg11 ;
    std::vector< Real > *arg12 = 0 ;
    std::vector< Real > *arg13 = 0 ;
    std::vector< Real > *arg14 = 0 ;
    std::vector< Real > *arg15 = 0 ;
    std::vector< Real > *arg16 = 0 ;
    std::vector< Real > *arg17 = 0 ;
    std::vector< Real > *arg18 = 0 ;
    std::vector< Real > *arg19 = 0 ;
    BusinessDayConvention arg20 ;
    BusinessDayConvention arg21 ;
    int val1 ;
    int ecode1 = 0 ;
    std::vector< double > temp2 ;
    std::vector< double > *v2 ;
    std::vector< double > temp3 ;
    std::vector< double > *v3 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    bool val10 ;
    int ecode10 = 0 ;
    bool val11 ;
    int ecode11 = 0 ;
    std::vector< double > temp12 ;
    std::vector< double > *v12 ;
    std::vector< double > temp13 ;
    std::vector< double > *v13 ;
    std::vector< double > temp14 ;
    std::vector< double > *v14 ;
    std::vector< double > temp15 ;
    std::vector< double > *v15 ;
    std::vector< double > temp16 ;
    std::vector< double > *v16 ;
    std::vector< double > temp17 ;
    std::vector< double > *v17 ;
    std::vector< double > temp18 ;
    std::vector< double > *v18 ;
    std::vector< double > temp19 ;
    std::vector< double > *v19 ;
    int val20 ;
    int ecode20 = 0 ;
    int val21 ;
    int ecode21 = 0 ;
    int argvi = 0;
    FloatFloatSwapPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 21) || (items > 21)) {
      SWIG_croak("Usage: new_FloatFloatSwap(type,nominal1,nominal2,schedule1,indexPtr1,dayCount1,schedule2,indexPtr2,dayCount2,intermediateCapitalExchange,finalCapitalExchange,gearing1,spread1,cappedRate1,flooredRate1,gearing2,spread2,cappedRate2,flooredRate2,paymentConvention1,paymentConvention2);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FloatFloatSwap" "', argument " "1"" of type '" "VanillaSwap::Type""'");
    } 
    arg1 = static_cast< VanillaSwap::Type >(val1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_FloatFloatSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp2.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_FloatFloatSwap. "
              "Expected an array of ""double");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_FloatFloatSwap. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_FloatFloatSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp3.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_FloatFloatSwap. "
              "Expected an array of ""double");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_FloatFloatSwap. "
          "Expected an array of ""double");
      }
    }
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FloatFloatSwap" "', argument " "4"" of type '" "Schedule const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatFloatSwap" "', argument " "4"" of type '" "Schedule const &""'"); 
    }
    arg4 = reinterpret_cast< Schedule * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_InterestRateIndexPtr,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_FloatFloatSwap" "', argument " "5"" of type '" "InterestRateIndexPtr const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatFloatSwap" "', argument " "5"" of type '" "InterestRateIndexPtr const &""'"); 
    }
    arg5 = reinterpret_cast< InterestRateIndexPtr * >(argp5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_FloatFloatSwap" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatFloatSwap" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    arg6 = reinterpret_cast< DayCounter * >(argp6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_FloatFloatSwap" "', argument " "7"" of type '" "Schedule const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatFloatSwap" "', argument " "7"" of type '" "Schedule const &""'"); 
    }
    arg7 = reinterpret_cast< Schedule * >(argp7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_InterestRateIndexPtr,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_FloatFloatSwap" "', argument " "8"" of type '" "InterestRateIndexPtr const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatFloatSwap" "', argument " "8"" of type '" "InterestRateIndexPtr const &""'"); 
    }
    arg8 = reinterpret_cast< InterestRateIndexPtr * >(argp8);
    res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res9)) {
      SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_FloatFloatSwap" "', argument " "9"" of type '" "DayCounter const &""'"); 
    }
    if (!argp9) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatFloatSwap" "', argument " "9"" of type '" "DayCounter const &""'"); 
    }
    arg9 = reinterpret_cast< DayCounter * >(argp9);
    ecode10 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(9), &val10);
    if (!SWIG_IsOK(ecode10)) {
      SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "new_FloatFloatSwap" "', argument " "10"" of type '" "bool""'");
    } 
    arg10 = static_cast< bool >(val10);
    ecode11 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(10), &val11);
    if (!SWIG_IsOK(ecode11)) {
      SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "new_FloatFloatSwap" "', argument " "11"" of type '" "bool""'");
    } 
    arg11 = static_cast< bool >(val11);
    {
      if (SWIG_ConvertPtr(ST(11),(void **) &v12, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg12 = v12;
      } else if (SvROK(ST(11))) {
        AV *av = (AV *)SvRV(ST(11));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 12 of new_FloatFloatSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp12.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 12 of "
              "new_FloatFloatSwap. "
              "Expected an array of ""double");
          }
        }
        arg12 = &temp12;
      } else {
        SWIG_croak("Type error in argument 12 of new_FloatFloatSwap. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(12),(void **) &v13, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg13 = v13;
      } else if (SvROK(ST(12))) {
        AV *av = (AV *)SvRV(ST(12));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 13 of new_FloatFloatSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp13.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 13 of "
              "new_FloatFloatSwap. "
              "Expected an array of ""double");
          }
        }
        arg13 = &temp13;
      } else {
        SWIG_croak("Type error in argument 13 of new_FloatFloatSwap. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(13),(void **) &v14, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg14 = v14;
      } else if (SvROK(ST(13))) {
        AV *av = (AV *)SvRV(ST(13));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 14 of new_FloatFloatSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp14.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 14 of "
              "new_FloatFloatSwap. "
              "Expected an array of ""double");
          }
        }
        arg14 = &temp14;
      } else {
        SWIG_croak("Type error in argument 14 of new_FloatFloatSwap. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(14),(void **) &v15, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg15 = v15;
      } else if (SvROK(ST(14))) {
        AV *av = (AV *)SvRV(ST(14));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 15 of new_FloatFloatSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp15.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 15 of "
              "new_FloatFloatSwap. "
              "Expected an array of ""double");
          }
        }
        arg15 = &temp15;
      } else {
        SWIG_croak("Type error in argument 15 of new_FloatFloatSwap. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(15),(void **) &v16, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg16 = v16;
      } else if (SvROK(ST(15))) {
        AV *av = (AV *)SvRV(ST(15));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 16 of new_FloatFloatSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp16.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 16 of "
              "new_FloatFloatSwap. "
              "Expected an array of ""double");
          }
        }
        arg16 = &temp16;
      } else {
        SWIG_croak("Type error in argument 16 of new_FloatFloatSwap. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(16),(void **) &v17, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg17 = v17;
      } else if (SvROK(ST(16))) {
        AV *av = (AV *)SvRV(ST(16));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 17 of new_FloatFloatSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp17.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 17 of "
              "new_FloatFloatSwap. "
              "Expected an array of ""double");
          }
        }
        arg17 = &temp17;
      } else {
        SWIG_croak("Type error in argument 17 of new_FloatFloatSwap. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(17),(void **) &v18, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg18 = v18;
      } else if (SvROK(ST(17))) {
        AV *av = (AV *)SvRV(ST(17));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 18 of new_FloatFloatSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp18.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 18 of "
              "new_FloatFloatSwap. "
              "Expected an array of ""double");
          }
        }
        arg18 = &temp18;
      } else {
        SWIG_croak("Type error in argument 18 of new_FloatFloatSwap. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(18),(void **) &v19, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg19 = v19;
      } else if (SvROK(ST(18))) {
        AV *av = (AV *)SvRV(ST(18));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 19 of new_FloatFloatSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp19.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 19 of "
              "new_FloatFloatSwap. "
              "Expected an array of ""double");
          }
        }
        arg19 = &temp19;
      } else {
        SWIG_croak("Type error in argument 19 of new_FloatFloatSwap. "
          "Expected an array of ""double");
      }
    }
    ecode20 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(19), &val20);
    if (!SWIG_IsOK(ecode20)) {
      SWIG_exception_fail(SWIG_ArgError(ecode20), "in method '" "new_FloatFloatSwap" "', argument " "20"" of type '" "BusinessDayConvention""'");
    } 
    arg20 = static_cast< BusinessDayConvention >(val20);
    ecode21 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(20), &val21);
    if (!SWIG_IsOK(ecode21)) {
      SWIG_exception_fail(SWIG_ArgError(ecode21), "in method '" "new_FloatFloatSwap" "', argument " "21"" of type '" "BusinessDayConvention""'");
    } 
    arg21 = static_cast< BusinessDayConvention >(val21);
    {
      try {
        result = (FloatFloatSwapPtr *)new_FloatFloatSwapPtr__SWIG_0(arg1,(std::vector< double > const &)*arg2,(std::vector< double > const &)*arg3,(Schedule const &)*arg4,(InterestRateIndexPtr const &)*arg5,(DayCounter const &)*arg6,(Schedule const &)*arg7,(InterestRateIndexPtr const &)*arg8,(DayCounter const &)*arg9,arg10,arg11,(std::vector< double > const &)*arg12,(std::vector< double > const &)*arg13,(std::vector< double > const &)*arg14,(std::vector< double > const &)*arg15,(std::vector< double > const &)*arg16,(std::vector< double > const &)*arg17,(std::vector< double > const &)*arg18,(std::vector< double > const &)*arg19,arg20,arg21);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FloatFloatSwapPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FloatFloatSwap__SWIG_1) {
  {
    VanillaSwap::Type arg1 ;
    std::vector< Real > *arg2 = 0 ;
    std::vector< Real > *arg3 = 0 ;
    Schedule *arg4 = 0 ;
    InterestRateIndexPtr *arg5 = 0 ;
    DayCounter *arg6 = 0 ;
    Schedule *arg7 = 0 ;
    InterestRateIndexPtr *arg8 = 0 ;
    DayCounter *arg9 = 0 ;
    bool arg10 ;
    bool arg11 ;
    std::vector< Real > *arg12 = 0 ;
    std::vector< Real > *arg13 = 0 ;
    std::vector< Real > *arg14 = 0 ;
    std::vector< Real > *arg15 = 0 ;
    std::vector< Real > *arg16 = 0 ;
    std::vector< Real > *arg17 = 0 ;
    std::vector< Real > *arg18 = 0 ;
    std::vector< Real > *arg19 = 0 ;
    BusinessDayConvention arg20 ;
    int val1 ;
    int ecode1 = 0 ;
    std::vector< double > temp2 ;
    std::vector< double > *v2 ;
    std::vector< double > temp3 ;
    std::vector< double > *v3 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    bool val10 ;
    int ecode10 = 0 ;
    bool val11 ;
    int ecode11 = 0 ;
    std::vector< double > temp12 ;
    std::vector< double > *v12 ;
    std::vector< double > temp13 ;
    std::vector< double > *v13 ;
    std::vector< double > temp14 ;
    std::vector< double > *v14 ;
    std::vector< double > temp15 ;
    std::vector< double > *v15 ;
    std::vector< double > temp16 ;
    std::vector< double > *v16 ;
    std::vector< double > temp17 ;
    std::vector< double > *v17 ;
    std::vector< double > temp18 ;
    std::vector< double > *v18 ;
    std::vector< double > temp19 ;
    std::vector< double > *v19 ;
    int val20 ;
    int ecode20 = 0 ;
    int argvi = 0;
    FloatFloatSwapPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 20) || (items > 20)) {
      SWIG_croak("Usage: new_FloatFloatSwap(type,nominal1,nominal2,schedule1,indexPtr1,dayCount1,schedule2,indexPtr2,dayCount2,intermediateCapitalExchange,finalCapitalExchange,gearing1,spread1,cappedRate1,flooredRate1,gearing2,spread2,cappedRate2,flooredRate2,paymentConvention1);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FloatFloatSwap" "', argument " "1"" of type '" "VanillaSwap::Type""'");
    } 
    arg1 = static_cast< VanillaSwap::Type >(val1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_FloatFloatSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp2.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_FloatFloatSwap. "
              "Expected an array of ""double");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_FloatFloatSwap. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_FloatFloatSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp3.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_FloatFloatSwap. "
              "Expected an array of ""double");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_FloatFloatSwap. "
          "Expected an array of ""double");
      }
    }
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FloatFloatSwap" "', argument " "4"" of type '" "Schedule const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatFloatSwap" "', argument " "4"" of type '" "Schedule const &""'"); 
    }
    arg4 = reinterpret_cast< Schedule * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_InterestRateIndexPtr,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_FloatFloatSwap" "', argument " "5"" of type '" "InterestRateIndexPtr const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatFloatSwap" "', argument " "5"" of type '" "InterestRateIndexPtr const &""'"); 
    }
    arg5 = reinterpret_cast< InterestRateIndexPtr * >(argp5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_FloatFloatSwap" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatFloatSwap" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    arg6 = reinterpret_cast< DayCounter * >(argp6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_FloatFloatSwap" "', argument " "7"" of type '" "Schedule const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatFloatSwap" "', argument " "7"" of type '" "Schedule const &""'"); 
    }
    arg7 = reinterpret_cast< Schedule * >(argp7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_InterestRateIndexPtr,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_FloatFloatSwap" "', argument " "8"" of type '" "InterestRateIndexPtr const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatFloatSwap" "', argument " "8"" of type '" "InterestRateIndexPtr const &""'"); 
    }
    arg8 = reinterpret_cast< InterestRateIndexPtr * >(argp8);
    res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res9)) {
      SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_FloatFloatSwap" "', argument " "9"" of type '" "DayCounter const &""'"); 
    }
    if (!argp9) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatFloatSwap" "', argument " "9"" of type '" "DayCounter const &""'"); 
    }
    arg9 = reinterpret_cast< DayCounter * >(argp9);
    ecode10 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(9), &val10);
    if (!SWIG_IsOK(ecode10)) {
      SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "new_FloatFloatSwap" "', argument " "10"" of type '" "bool""'");
    } 
    arg10 = static_cast< bool >(val10);
    ecode11 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(10), &val11);
    if (!SWIG_IsOK(ecode11)) {
      SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "new_FloatFloatSwap" "', argument " "11"" of type '" "bool""'");
    } 
    arg11 = static_cast< bool >(val11);
    {
      if (SWIG_ConvertPtr(ST(11),(void **) &v12, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg12 = v12;
      } else if (SvROK(ST(11))) {
        AV *av = (AV *)SvRV(ST(11));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 12 of new_FloatFloatSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp12.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 12 of "
              "new_FloatFloatSwap. "
              "Expected an array of ""double");
          }
        }
        arg12 = &temp12;
      } else {
        SWIG_croak("Type error in argument 12 of new_FloatFloatSwap. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(12),(void **) &v13, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg13 = v13;
      } else if (SvROK(ST(12))) {
        AV *av = (AV *)SvRV(ST(12));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 13 of new_FloatFloatSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp13.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 13 of "
              "new_FloatFloatSwap. "
              "Expected an array of ""double");
          }
        }
        arg13 = &temp13;
      } else {
        SWIG_croak("Type error in argument 13 of new_FloatFloatSwap. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(13),(void **) &v14, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg14 = v14;
      } else if (SvROK(ST(13))) {
        AV *av = (AV *)SvRV(ST(13));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 14 of new_FloatFloatSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp14.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 14 of "
              "new_FloatFloatSwap. "
              "Expected an array of ""double");
          }
        }
        arg14 = &temp14;
      } else {
        SWIG_croak("Type error in argument 14 of new_FloatFloatSwap. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(14),(void **) &v15, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg15 = v15;
      } else if (SvROK(ST(14))) {
        AV *av = (AV *)SvRV(ST(14));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 15 of new_FloatFloatSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp15.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 15 of "
              "new_FloatFloatSwap. "
              "Expected an array of ""double");
          }
        }
        arg15 = &temp15;
      } else {
        SWIG_croak("Type error in argument 15 of new_FloatFloatSwap. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(15),(void **) &v16, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg16 = v16;
      } else if (SvROK(ST(15))) {
        AV *av = (AV *)SvRV(ST(15));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 16 of new_FloatFloatSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp16.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 16 of "
              "new_FloatFloatSwap. "
              "Expected an array of ""double");
          }
        }
        arg16 = &temp16;
      } else {
        SWIG_croak("Type error in argument 16 of new_FloatFloatSwap. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(16),(void **) &v17, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg17 = v17;
      } else if (SvROK(ST(16))) {
        AV *av = (AV *)SvRV(ST(16));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 17 of new_FloatFloatSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp17.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 17 of "
              "new_FloatFloatSwap. "
              "Expected an array of ""double");
          }
        }
        arg17 = &temp17;
      } else {
        SWIG_croak("Type error in argument 17 of new_FloatFloatSwap. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(17),(void **) &v18, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg18 = v18;
      } else if (SvROK(ST(17))) {
        AV *av = (AV *)SvRV(ST(17));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 18 of new_FloatFloatSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp18.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 18 of "
              "new_FloatFloatSwap. "
              "Expected an array of ""double");
          }
        }
        arg18 = &temp18;
      } else {
        SWIG_croak("Type error in argument 18 of new_FloatFloatSwap. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(18),(void **) &v19, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg19 = v19;
      } else if (SvROK(ST(18))) {
        AV *av = (AV *)SvRV(ST(18));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 19 of new_FloatFloatSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp19.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 19 of "
              "new_FloatFloatSwap. "
              "Expected an array of ""double");
          }
        }
        arg19 = &temp19;
      } else {
        SWIG_croak("Type error in argument 19 of new_FloatFloatSwap. "
          "Expected an array of ""double");
      }
    }
    ecode20 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(19), &val20);
    if (!SWIG_IsOK(ecode20)) {
      SWIG_exception_fail(SWIG_ArgError(ecode20), "in method '" "new_FloatFloatSwap" "', argument " "20"" of type '" "BusinessDayConvention""'");
    } 
    arg20 = static_cast< BusinessDayConvention >(val20);
    {
      try {
        result = (FloatFloatSwapPtr *)new_FloatFloatSwapPtr__SWIG_0(arg1,(std::vector< double > const &)*arg2,(std::vector< double > const &)*arg3,(Schedule const &)*arg4,(InterestRateIndexPtr const &)*arg5,(DayCounter const &)*arg6,(Schedule const &)*arg7,(InterestRateIndexPtr const &)*arg8,(DayCounter const &)*arg9,arg10,arg11,(std::vector< double > const &)*arg12,(std::vector< double > const &)*arg13,(std::vector< double > const &)*arg14,(std::vector< double > const &)*arg15,(std::vector< double > const &)*arg16,(std::vector< double > const &)*arg17,(std::vector< double > const &)*arg18,(std::vector< double > const &)*arg19,arg20);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FloatFloatSwapPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FloatFloatSwap__SWIG_2) {
  {
    VanillaSwap::Type arg1 ;
    std::vector< Real > *arg2 = 0 ;
    std::vector< Real > *arg3 = 0 ;
    Schedule *arg4 = 0 ;
    InterestRateIndexPtr *arg5 = 0 ;
    DayCounter *arg6 = 0 ;
    Schedule *arg7 = 0 ;
    InterestRateIndexPtr *arg8 = 0 ;
    DayCounter *arg9 = 0 ;
    bool arg10 ;
    bool arg11 ;
    std::vector< Real > *arg12 = 0 ;
    std::vector< Real > *arg13 = 0 ;
    std::vector< Real > *arg14 = 0 ;
    std::vector< Real > *arg15 = 0 ;
    std::vector< Real > *arg16 = 0 ;
    std::vector< Real > *arg17 = 0 ;
    std::vector< Real > *arg18 = 0 ;
    std::vector< Real > *arg19 = 0 ;
    int val1 ;
    int ecode1 = 0 ;
    std::vector< double > temp2 ;
    std::vector< double > *v2 ;
    std::vector< double > temp3 ;
    std::vector< double > *v3 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    bool val10 ;
    int ecode10 = 0 ;
    bool val11 ;
    int ecode11 = 0 ;
    std::vector< double > temp12 ;
    std::vector< double > *v12 ;
    std::vector< double > temp13 ;
    std::vector< double > *v13 ;
    std::vector< double > temp14 ;
    std::vector< double > *v14 ;
    std::vector< double > temp15 ;
    std::vector< double > *v15 ;
    std::vector< double > temp16 ;
    std::vector< double > *v16 ;
    std::vector< double > temp17 ;
    std::vector< double > *v17 ;
    std::vector< double > temp18 ;
    std::vector< double > *v18 ;
    std::vector< double > temp19 ;
    std::vector< double > *v19 ;
    int argvi = 0;
    FloatFloatSwapPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 19) || (items > 19)) {
      SWIG_croak("Usage: new_FloatFloatSwap(type,nominal1,nominal2,schedule1,indexPtr1,dayCount1,schedule2,indexPtr2,dayCount2,intermediateCapitalExchange,finalCapitalExchange,gearing1,spread1,cappedRate1,flooredRate1,gearing2,spread2,cappedRate2,flooredRate2);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FloatFloatSwap" "', argument " "1"" of type '" "VanillaSwap::Type""'");
    } 
    arg1 = static_cast< VanillaSwap::Type >(val1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_FloatFloatSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp2.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_FloatFloatSwap. "
              "Expected an array of ""double");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_FloatFloatSwap. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_FloatFloatSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp3.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_FloatFloatSwap. "
              "Expected an array of ""double");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_FloatFloatSwap. "
          "Expected an array of ""double");
      }
    }
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FloatFloatSwap" "', argument " "4"" of type '" "Schedule const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatFloatSwap" "', argument " "4"" of type '" "Schedule const &""'"); 
    }
    arg4 = reinterpret_cast< Schedule * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_InterestRateIndexPtr,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_FloatFloatSwap" "', argument " "5"" of type '" "InterestRateIndexPtr const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatFloatSwap" "', argument " "5"" of type '" "InterestRateIndexPtr const &""'"); 
    }
    arg5 = reinterpret_cast< InterestRateIndexPtr * >(argp5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_FloatFloatSwap" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatFloatSwap" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    arg6 = reinterpret_cast< DayCounter * >(argp6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_FloatFloatSwap" "', argument " "7"" of type '" "Schedule const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatFloatSwap" "', argument " "7"" of type '" "Schedule const &""'"); 
    }
    arg7 = reinterpret_cast< Schedule * >(argp7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_InterestRateIndexPtr,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_FloatFloatSwap" "', argument " "8"" of type '" "InterestRateIndexPtr const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatFloatSwap" "', argument " "8"" of type '" "InterestRateIndexPtr const &""'"); 
    }
    arg8 = reinterpret_cast< InterestRateIndexPtr * >(argp8);
    res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res9)) {
      SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_FloatFloatSwap" "', argument " "9"" of type '" "DayCounter const &""'"); 
    }
    if (!argp9) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatFloatSwap" "', argument " "9"" of type '" "DayCounter const &""'"); 
    }
    arg9 = reinterpret_cast< DayCounter * >(argp9);
    ecode10 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(9), &val10);
    if (!SWIG_IsOK(ecode10)) {
      SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "new_FloatFloatSwap" "', argument " "10"" of type '" "bool""'");
    } 
    arg10 = static_cast< bool >(val10);
    ecode11 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(10), &val11);
    if (!SWIG_IsOK(ecode11)) {
      SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "new_FloatFloatSwap" "', argument " "11"" of type '" "bool""'");
    } 
    arg11 = static_cast< bool >(val11);
    {
      if (SWIG_ConvertPtr(ST(11),(void **) &v12, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg12 = v12;
      } else if (SvROK(ST(11))) {
        AV *av = (AV *)SvRV(ST(11));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 12 of new_FloatFloatSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp12.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 12 of "
              "new_FloatFloatSwap. "
              "Expected an array of ""double");
          }
        }
        arg12 = &temp12;
      } else {
        SWIG_croak("Type error in argument 12 of new_FloatFloatSwap. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(12),(void **) &v13, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg13 = v13;
      } else if (SvROK(ST(12))) {
        AV *av = (AV *)SvRV(ST(12));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 13 of new_FloatFloatSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp13.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 13 of "
              "new_FloatFloatSwap. "
              "Expected an array of ""double");
          }
        }
        arg13 = &temp13;
      } else {
        SWIG_croak("Type error in argument 13 of new_FloatFloatSwap. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(13),(void **) &v14, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg14 = v14;
      } else if (SvROK(ST(13))) {
        AV *av = (AV *)SvRV(ST(13));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 14 of new_FloatFloatSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp14.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 14 of "
              "new_FloatFloatSwap. "
              "Expected an array of ""double");
          }
        }
        arg14 = &temp14;
      } else {
        SWIG_croak("Type error in argument 14 of new_FloatFloatSwap. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(14),(void **) &v15, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg15 = v15;
      } else if (SvROK(ST(14))) {
        AV *av = (AV *)SvRV(ST(14));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 15 of new_FloatFloatSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp15.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 15 of "
              "new_FloatFloatSwap. "
              "Expected an array of ""double");
          }
        }
        arg15 = &temp15;
      } else {
        SWIG_croak("Type error in argument 15 of new_FloatFloatSwap. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(15),(void **) &v16, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg16 = v16;
      } else if (SvROK(ST(15))) {
        AV *av = (AV *)SvRV(ST(15));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 16 of new_FloatFloatSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp16.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 16 of "
              "new_FloatFloatSwap. "
              "Expected an array of ""double");
          }
        }
        arg16 = &temp16;
      } else {
        SWIG_croak("Type error in argument 16 of new_FloatFloatSwap. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(16),(void **) &v17, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg17 = v17;
      } else if (SvROK(ST(16))) {
        AV *av = (AV *)SvRV(ST(16));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 17 of new_FloatFloatSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp17.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 17 of "
              "new_FloatFloatSwap. "
              "Expected an array of ""double");
          }
        }
        arg17 = &temp17;
      } else {
        SWIG_croak("Type error in argument 17 of new_FloatFloatSwap. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(17),(void **) &v18, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg18 = v18;
      } else if (SvROK(ST(17))) {
        AV *av = (AV *)SvRV(ST(17));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 18 of new_FloatFloatSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp18.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 18 of "
              "new_FloatFloatSwap. "
              "Expected an array of ""double");
          }
        }
        arg18 = &temp18;
      } else {
        SWIG_croak("Type error in argument 18 of new_FloatFloatSwap. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(18),(void **) &v19, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg19 = v19;
      } else if (SvROK(ST(18))) {
        AV *av = (AV *)SvRV(ST(18));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 19 of new_FloatFloatSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp19.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 19 of "
              "new_FloatFloatSwap. "
              "Expected an array of ""double");
          }
        }
        arg19 = &temp19;
      } else {
        SWIG_croak("Type error in argument 19 of new_FloatFloatSwap. "
          "Expected an array of ""double");
      }
    }
    {
      try {
        result = (FloatFloatSwapPtr *)new_FloatFloatSwapPtr__SWIG_0(arg1,(std::vector< double > const &)*arg2,(std::vector< double > const &)*arg3,(Schedule const &)*arg4,(InterestRateIndexPtr const &)*arg5,(DayCounter const &)*arg6,(Schedule const &)*arg7,(InterestRateIndexPtr const &)*arg8,(DayCounter const &)*arg9,arg10,arg11,(std::vector< double > const &)*arg12,(std::vector< double > const &)*arg13,(std::vector< double > const &)*arg14,(std::vector< double > const &)*arg15,(std::vector< double > const &)*arg16,(std::vector< double > const &)*arg17,(std::vector< double > const &)*arg18,(std::vector< double > const &)*arg19);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FloatFloatSwapPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FloatFloatSwap__SWIG_3) {
  {
    VanillaSwap::Type arg1 ;
    std::vector< Real > *arg2 = 0 ;
    std::vector< Real > *arg3 = 0 ;
    Schedule *arg4 = 0 ;
    InterestRateIndexPtr *arg5 = 0 ;
    DayCounter *arg6 = 0 ;
    Schedule *arg7 = 0 ;
    InterestRateIndexPtr *arg8 = 0 ;
    DayCounter *arg9 = 0 ;
    bool arg10 ;
    bool arg11 ;
    std::vector< Real > *arg12 = 0 ;
    std::vector< Real > *arg13 = 0 ;
    std::vector< Real > *arg14 = 0 ;
    std::vector< Real > *arg15 = 0 ;
    std::vector< Real > *arg16 = 0 ;
    std::vector< Real > *arg17 = 0 ;
    std::vector< Real > *arg18 = 0 ;
    int val1 ;
    int ecode1 = 0 ;
    std::vector< double > temp2 ;
    std::vector< double > *v2 ;
    std::vector< double > temp3 ;
    std::vector< double > *v3 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    bool val10 ;
    int ecode10 = 0 ;
    bool val11 ;
    int ecode11 = 0 ;
    std::vector< double > temp12 ;
    std::vector< double > *v12 ;
    std::vector< double > temp13 ;
    std::vector< double > *v13 ;
    std::vector< double > temp14 ;
    std::vector< double > *v14 ;
    std::vector< double > temp15 ;
    std::vector< double > *v15 ;
    std::vector< double > temp16 ;
    std::vector< double > *v16 ;
    std::vector< double > temp17 ;
    std::vector< double > *v17 ;
    std::vector< double > temp18 ;
    std::vector< double > *v18 ;
    int argvi = 0;
    FloatFloatSwapPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 18) || (items > 18)) {
      SWIG_croak("Usage: new_FloatFloatSwap(type,nominal1,nominal2,schedule1,indexPtr1,dayCount1,schedule2,indexPtr2,dayCount2,intermediateCapitalExchange,finalCapitalExchange,gearing1,spread1,cappedRate1,flooredRate1,gearing2,spread2,cappedRate2);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FloatFloatSwap" "', argument " "1"" of type '" "VanillaSwap::Type""'");
    } 
    arg1 = static_cast< VanillaSwap::Type >(val1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_FloatFloatSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp2.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_FloatFloatSwap. "
              "Expected an array of ""double");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_FloatFloatSwap. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_FloatFloatSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp3.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_FloatFloatSwap. "
              "Expected an array of ""double");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_FloatFloatSwap. "
          "Expected an array of ""double");
      }
    }
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FloatFloatSwap" "', argument " "4"" of type '" "Schedule const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatFloatSwap" "', argument " "4"" of type '" "Schedule const &""'"); 
    }
    arg4 = reinterpret_cast< Schedule * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_InterestRateIndexPtr,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_FloatFloatSwap" "', argument " "5"" of type '" "InterestRateIndexPtr const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatFloatSwap" "', argument " "5"" of type '" "InterestRateIndexPtr const &""'"); 
    }
    arg5 = reinterpret_cast< InterestRateIndexPtr * >(argp5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_FloatFloatSwap" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatFloatSwap" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    arg6 = reinterpret_cast< DayCounter * >(argp6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_FloatFloatSwap" "', argument " "7"" of type '" "Schedule const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatFloatSwap" "', argument " "7"" of type '" "Schedule const &""'"); 
    }
    arg7 = reinterpret_cast< Schedule * >(argp7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_InterestRateIndexPtr,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_FloatFloatSwap" "', argument " "8"" of type '" "InterestRateIndexPtr const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatFloatSwap" "', argument " "8"" of type '" "InterestRateIndexPtr const &""'"); 
    }
    arg8 = reinterpret_cast< InterestRateIndexPtr * >(argp8);
    res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res9)) {
      SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_FloatFloatSwap" "', argument " "9"" of type '" "DayCounter const &""'"); 
    }
    if (!argp9) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatFloatSwap" "', argument " "9"" of type '" "DayCounter const &""'"); 
    }
    arg9 = reinterpret_cast< DayCounter * >(argp9);
    ecode10 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(9), &val10);
    if (!SWIG_IsOK(ecode10)) {
      SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "new_FloatFloatSwap" "', argument " "10"" of type '" "bool""'");
    } 
    arg10 = static_cast< bool >(val10);
    ecode11 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(10), &val11);
    if (!SWIG_IsOK(ecode11)) {
      SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "new_FloatFloatSwap" "', argument " "11"" of type '" "bool""'");
    } 
    arg11 = static_cast< bool >(val11);
    {
      if (SWIG_ConvertPtr(ST(11),(void **) &v12, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg12 = v12;
      } else if (SvROK(ST(11))) {
        AV *av = (AV *)SvRV(ST(11));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 12 of new_FloatFloatSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp12.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 12 of "
              "new_FloatFloatSwap. "
              "Expected an array of ""double");
          }
        }
        arg12 = &temp12;
      } else {
        SWIG_croak("Type error in argument 12 of new_FloatFloatSwap. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(12),(void **) &v13, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg13 = v13;
      } else if (SvROK(ST(12))) {
        AV *av = (AV *)SvRV(ST(12));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 13 of new_FloatFloatSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp13.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 13 of "
              "new_FloatFloatSwap. "
              "Expected an array of ""double");
          }
        }
        arg13 = &temp13;
      } else {
        SWIG_croak("Type error in argument 13 of new_FloatFloatSwap. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(13),(void **) &v14, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg14 = v14;
      } else if (SvROK(ST(13))) {
        AV *av = (AV *)SvRV(ST(13));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 14 of new_FloatFloatSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp14.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 14 of "
              "new_FloatFloatSwap. "
              "Expected an array of ""double");
          }
        }
        arg14 = &temp14;
      } else {
        SWIG_croak("Type error in argument 14 of new_FloatFloatSwap. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(14),(void **) &v15, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg15 = v15;
      } else if (SvROK(ST(14))) {
        AV *av = (AV *)SvRV(ST(14));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 15 of new_FloatFloatSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp15.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 15 of "
              "new_FloatFloatSwap. "
              "Expected an array of ""double");
          }
        }
        arg15 = &temp15;
      } else {
        SWIG_croak("Type error in argument 15 of new_FloatFloatSwap. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(15),(void **) &v16, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg16 = v16;
      } else if (SvROK(ST(15))) {
        AV *av = (AV *)SvRV(ST(15));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 16 of new_FloatFloatSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp16.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 16 of "
              "new_FloatFloatSwap. "
              "Expected an array of ""double");
          }
        }
        arg16 = &temp16;
      } else {
        SWIG_croak("Type error in argument 16 of new_FloatFloatSwap. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(16),(void **) &v17, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg17 = v17;
      } else if (SvROK(ST(16))) {
        AV *av = (AV *)SvRV(ST(16));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 17 of new_FloatFloatSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp17.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 17 of "
              "new_FloatFloatSwap. "
              "Expected an array of ""double");
          }
        }
        arg17 = &temp17;
      } else {
        SWIG_croak("Type error in argument 17 of new_FloatFloatSwap. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(17),(void **) &v18, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg18 = v18;
      } else if (SvROK(ST(17))) {
        AV *av = (AV *)SvRV(ST(17));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 18 of new_FloatFloatSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp18.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 18 of "
              "new_FloatFloatSwap. "
              "Expected an array of ""double");
          }
        }
        arg18 = &temp18;
      } else {
        SWIG_croak("Type error in argument 18 of new_FloatFloatSwap. "
          "Expected an array of ""double");
      }
    }
    {
      try {
        result = (FloatFloatSwapPtr *)new_FloatFloatSwapPtr__SWIG_0(arg1,(std::vector< double > const &)*arg2,(std::vector< double > const &)*arg3,(Schedule const &)*arg4,(InterestRateIndexPtr const &)*arg5,(DayCounter const &)*arg6,(Schedule const &)*arg7,(InterestRateIndexPtr const &)*arg8,(DayCounter const &)*arg9,arg10,arg11,(std::vector< double > const &)*arg12,(std::vector< double > const &)*arg13,(std::vector< double > const &)*arg14,(std::vector< double > const &)*arg15,(std::vector< double > const &)*arg16,(std::vector< double > const &)*arg17,(std::vector< double > const &)*arg18);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FloatFloatSwapPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FloatFloatSwap__SWIG_4) {
  {
    VanillaSwap::Type arg1 ;
    std::vector< Real > *arg2 = 0 ;
    std::vector< Real > *arg3 = 0 ;
    Schedule *arg4 = 0 ;
    InterestRateIndexPtr *arg5 = 0 ;
    DayCounter *arg6 = 0 ;
    Schedule *arg7 = 0 ;
    InterestRateIndexPtr *arg8 = 0 ;
    DayCounter *arg9 = 0 ;
    bool arg10 ;
    bool arg11 ;
    std::vector< Real > *arg12 = 0 ;
    std::vector< Real > *arg13 = 0 ;
    std::vector< Real > *arg14 = 0 ;
    std::vector< Real > *arg15 = 0 ;
    std::vector< Real > *arg16 = 0 ;
    std::vector< Real > *arg17 = 0 ;
    int val1 ;
    int ecode1 = 0 ;
    std::vector< double > temp2 ;
    std::vector< double > *v2 ;
    std::vector< double > temp3 ;
    std::vector< double > *v3 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    bool val10 ;
    int ecode10 = 0 ;
    bool val11 ;
    int ecode11 = 0 ;
    std::vector< double > temp12 ;
    std::vector< double > *v12 ;
    std::vector< double > temp13 ;
    std::vector< double > *v13 ;
    std::vector< double > temp14 ;
    std::vector< double > *v14 ;
    std::vector< double > temp15 ;
    std::vector< double > *v15 ;
    std::vector< double > temp16 ;
    std::vector< double > *v16 ;
    std::vector< double > temp17 ;
    std::vector< double > *v17 ;
    int argvi = 0;
    FloatFloatSwapPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 17) || (items > 17)) {
      SWIG_croak("Usage: new_FloatFloatSwap(type,nominal1,nominal2,schedule1,indexPtr1,dayCount1,schedule2,indexPtr2,dayCount2,intermediateCapitalExchange,finalCapitalExchange,gearing1,spread1,cappedRate1,flooredRate1,gearing2,spread2);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FloatFloatSwap" "', argument " "1"" of type '" "VanillaSwap::Type""'");
    } 
    arg1 = static_cast< VanillaSwap::Type >(val1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_FloatFloatSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp2.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_FloatFloatSwap. "
              "Expected an array of ""double");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_FloatFloatSwap. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_FloatFloatSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp3.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_FloatFloatSwap. "
              "Expected an array of ""double");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_FloatFloatSwap. "
          "Expected an array of ""double");
      }
    }
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FloatFloatSwap" "', argument " "4"" of type '" "Schedule const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatFloatSwap" "', argument " "4"" of type '" "Schedule const &""'"); 
    }
    arg4 = reinterpret_cast< Schedule * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_InterestRateIndexPtr,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_FloatFloatSwap" "', argument " "5"" of type '" "InterestRateIndexPtr const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatFloatSwap" "', argument " "5"" of type '" "InterestRateIndexPtr const &""'"); 
    }
    arg5 = reinterpret_cast< InterestRateIndexPtr * >(argp5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_FloatFloatSwap" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatFloatSwap" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    arg6 = reinterpret_cast< DayCounter * >(argp6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_FloatFloatSwap" "', argument " "7"" of type '" "Schedule const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatFloatSwap" "', argument " "7"" of type '" "Schedule const &""'"); 
    }
    arg7 = reinterpret_cast< Schedule * >(argp7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_InterestRateIndexPtr,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_FloatFloatSwap" "', argument " "8"" of type '" "InterestRateIndexPtr const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatFloatSwap" "', argument " "8"" of type '" "InterestRateIndexPtr const &""'"); 
    }
    arg8 = reinterpret_cast< InterestRateIndexPtr * >(argp8);
    res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res9)) {
      SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_FloatFloatSwap" "', argument " "9"" of type '" "DayCounter const &""'"); 
    }
    if (!argp9) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatFloatSwap" "', argument " "9"" of type '" "DayCounter const &""'"); 
    }
    arg9 = reinterpret_cast< DayCounter * >(argp9);
    ecode10 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(9), &val10);
    if (!SWIG_IsOK(ecode10)) {
      SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "new_FloatFloatSwap" "', argument " "10"" of type '" "bool""'");
    } 
    arg10 = static_cast< bool >(val10);
    ecode11 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(10), &val11);
    if (!SWIG_IsOK(ecode11)) {
      SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "new_FloatFloatSwap" "', argument " "11"" of type '" "bool""'");
    } 
    arg11 = static_cast< bool >(val11);
    {
      if (SWIG_ConvertPtr(ST(11),(void **) &v12, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg12 = v12;
      } else if (SvROK(ST(11))) {
        AV *av = (AV *)SvRV(ST(11));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 12 of new_FloatFloatSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp12.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 12 of "
              "new_FloatFloatSwap. "
              "Expected an array of ""double");
          }
        }
        arg12 = &temp12;
      } else {
        SWIG_croak("Type error in argument 12 of new_FloatFloatSwap. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(12),(void **) &v13, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg13 = v13;
      } else if (SvROK(ST(12))) {
        AV *av = (AV *)SvRV(ST(12));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 13 of new_FloatFloatSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp13.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 13 of "
              "new_FloatFloatSwap. "
              "Expected an array of ""double");
          }
        }
        arg13 = &temp13;
      } else {
        SWIG_croak("Type error in argument 13 of new_FloatFloatSwap. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(13),(void **) &v14, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg14 = v14;
      } else if (SvROK(ST(13))) {
        AV *av = (AV *)SvRV(ST(13));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 14 of new_FloatFloatSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp14.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 14 of "
              "new_FloatFloatSwap. "
              "Expected an array of ""double");
          }
        }
        arg14 = &temp14;
      } else {
        SWIG_croak("Type error in argument 14 of new_FloatFloatSwap. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(14),(void **) &v15, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg15 = v15;
      } else if (SvROK(ST(14))) {
        AV *av = (AV *)SvRV(ST(14));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 15 of new_FloatFloatSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp15.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 15 of "
              "new_FloatFloatSwap. "
              "Expected an array of ""double");
          }
        }
        arg15 = &temp15;
      } else {
        SWIG_croak("Type error in argument 15 of new_FloatFloatSwap. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(15),(void **) &v16, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg16 = v16;
      } else if (SvROK(ST(15))) {
        AV *av = (AV *)SvRV(ST(15));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 16 of new_FloatFloatSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp16.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 16 of "
              "new_FloatFloatSwap. "
              "Expected an array of ""double");
          }
        }
        arg16 = &temp16;
      } else {
        SWIG_croak("Type error in argument 16 of new_FloatFloatSwap. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(16),(void **) &v17, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg17 = v17;
      } else if (SvROK(ST(16))) {
        AV *av = (AV *)SvRV(ST(16));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 17 of new_FloatFloatSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp17.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 17 of "
              "new_FloatFloatSwap. "
              "Expected an array of ""double");
          }
        }
        arg17 = &temp17;
      } else {
        SWIG_croak("Type error in argument 17 of new_FloatFloatSwap. "
          "Expected an array of ""double");
      }
    }
    {
      try {
        result = (FloatFloatSwapPtr *)new_FloatFloatSwapPtr__SWIG_0(arg1,(std::vector< double > const &)*arg2,(std::vector< double > const &)*arg3,(Schedule const &)*arg4,(InterestRateIndexPtr const &)*arg5,(DayCounter const &)*arg6,(Schedule const &)*arg7,(InterestRateIndexPtr const &)*arg8,(DayCounter const &)*arg9,arg10,arg11,(std::vector< double > const &)*arg12,(std::vector< double > const &)*arg13,(std::vector< double > const &)*arg14,(std::vector< double > const &)*arg15,(std::vector< double > const &)*arg16,(std::vector< double > const &)*arg17);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FloatFloatSwapPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FloatFloatSwap__SWIG_5) {
  {
    VanillaSwap::Type arg1 ;
    std::vector< Real > *arg2 = 0 ;
    std::vector< Real > *arg3 = 0 ;
    Schedule *arg4 = 0 ;
    InterestRateIndexPtr *arg5 = 0 ;
    DayCounter *arg6 = 0 ;
    Schedule *arg7 = 0 ;
    InterestRateIndexPtr *arg8 = 0 ;
    DayCounter *arg9 = 0 ;
    bool arg10 ;
    bool arg11 ;
    std::vector< Real > *arg12 = 0 ;
    std::vector< Real > *arg13 = 0 ;
    std::vector< Real > *arg14 = 0 ;
    std::vector< Real > *arg15 = 0 ;
    std::vector< Real > *arg16 = 0 ;
    int val1 ;
    int ecode1 = 0 ;
    std::vector< double > temp2 ;
    std::vector< double > *v2 ;
    std::vector< double > temp3 ;
    std::vector< double > *v3 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    bool val10 ;
    int ecode10 = 0 ;
    bool val11 ;
    int ecode11 = 0 ;
    std::vector< double > temp12 ;
    std::vector< double > *v12 ;
    std::vector< double > temp13 ;
    std::vector< double > *v13 ;
    std::vector< double > temp14 ;
    std::vector< double > *v14 ;
    std::vector< double > temp15 ;
    std::vector< double > *v15 ;
    std::vector< double > temp16 ;
    std::vector< double > *v16 ;
    int argvi = 0;
    FloatFloatSwapPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 16) || (items > 16)) {
      SWIG_croak("Usage: new_FloatFloatSwap(type,nominal1,nominal2,schedule1,indexPtr1,dayCount1,schedule2,indexPtr2,dayCount2,intermediateCapitalExchange,finalCapitalExchange,gearing1,spread1,cappedRate1,flooredRate1,gearing2);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FloatFloatSwap" "', argument " "1"" of type '" "VanillaSwap::Type""'");
    } 
    arg1 = static_cast< VanillaSwap::Type >(val1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_FloatFloatSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp2.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_FloatFloatSwap. "
              "Expected an array of ""double");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_FloatFloatSwap. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_FloatFloatSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp3.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_FloatFloatSwap. "
              "Expected an array of ""double");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_FloatFloatSwap. "
          "Expected an array of ""double");
      }
    }
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FloatFloatSwap" "', argument " "4"" of type '" "Schedule const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatFloatSwap" "', argument " "4"" of type '" "Schedule const &""'"); 
    }
    arg4 = reinterpret_cast< Schedule * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_InterestRateIndexPtr,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_FloatFloatSwap" "', argument " "5"" of type '" "InterestRateIndexPtr const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatFloatSwap" "', argument " "5"" of type '" "InterestRateIndexPtr const &""'"); 
    }
    arg5 = reinterpret_cast< InterestRateIndexPtr * >(argp5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_FloatFloatSwap" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatFloatSwap" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    arg6 = reinterpret_cast< DayCounter * >(argp6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_FloatFloatSwap" "', argument " "7"" of type '" "Schedule const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatFloatSwap" "', argument " "7"" of type '" "Schedule const &""'"); 
    }
    arg7 = reinterpret_cast< Schedule * >(argp7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_InterestRateIndexPtr,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_FloatFloatSwap" "', argument " "8"" of type '" "InterestRateIndexPtr const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatFloatSwap" "', argument " "8"" of type '" "InterestRateIndexPtr const &""'"); 
    }
    arg8 = reinterpret_cast< InterestRateIndexPtr * >(argp8);
    res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res9)) {
      SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_FloatFloatSwap" "', argument " "9"" of type '" "DayCounter const &""'"); 
    }
    if (!argp9) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatFloatSwap" "', argument " "9"" of type '" "DayCounter const &""'"); 
    }
    arg9 = reinterpret_cast< DayCounter * >(argp9);
    ecode10 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(9), &val10);
    if (!SWIG_IsOK(ecode10)) {
      SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "new_FloatFloatSwap" "', argument " "10"" of type '" "bool""'");
    } 
    arg10 = static_cast< bool >(val10);
    ecode11 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(10), &val11);
    if (!SWIG_IsOK(ecode11)) {
      SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "new_FloatFloatSwap" "', argument " "11"" of type '" "bool""'");
    } 
    arg11 = static_cast< bool >(val11);
    {
      if (SWIG_ConvertPtr(ST(11),(void **) &v12, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg12 = v12;
      } else if (SvROK(ST(11))) {
        AV *av = (AV *)SvRV(ST(11));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 12 of new_FloatFloatSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp12.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 12 of "
              "new_FloatFloatSwap. "
              "Expected an array of ""double");
          }
        }
        arg12 = &temp12;
      } else {
        SWIG_croak("Type error in argument 12 of new_FloatFloatSwap. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(12),(void **) &v13, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg13 = v13;
      } else if (SvROK(ST(12))) {
        AV *av = (AV *)SvRV(ST(12));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 13 of new_FloatFloatSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp13.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 13 of "
              "new_FloatFloatSwap. "
              "Expected an array of ""double");
          }
        }
        arg13 = &temp13;
      } else {
        SWIG_croak("Type error in argument 13 of new_FloatFloatSwap. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(13),(void **) &v14, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg14 = v14;
      } else if (SvROK(ST(13))) {
        AV *av = (AV *)SvRV(ST(13));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 14 of new_FloatFloatSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp14.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 14 of "
              "new_FloatFloatSwap. "
              "Expected an array of ""double");
          }
        }
        arg14 = &temp14;
      } else {
        SWIG_croak("Type error in argument 14 of new_FloatFloatSwap. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(14),(void **) &v15, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg15 = v15;
      } else if (SvROK(ST(14))) {
        AV *av = (AV *)SvRV(ST(14));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 15 of new_FloatFloatSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp15.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 15 of "
              "new_FloatFloatSwap. "
              "Expected an array of ""double");
          }
        }
        arg15 = &temp15;
      } else {
        SWIG_croak("Type error in argument 15 of new_FloatFloatSwap. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(15),(void **) &v16, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg16 = v16;
      } else if (SvROK(ST(15))) {
        AV *av = (AV *)SvRV(ST(15));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 16 of new_FloatFloatSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp16.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 16 of "
              "new_FloatFloatSwap. "
              "Expected an array of ""double");
          }
        }
        arg16 = &temp16;
      } else {
        SWIG_croak("Type error in argument 16 of new_FloatFloatSwap. "
          "Expected an array of ""double");
      }
    }
    {
      try {
        result = (FloatFloatSwapPtr *)new_FloatFloatSwapPtr__SWIG_0(arg1,(std::vector< double > const &)*arg2,(std::vector< double > const &)*arg3,(Schedule const &)*arg4,(InterestRateIndexPtr const &)*arg5,(DayCounter const &)*arg6,(Schedule const &)*arg7,(InterestRateIndexPtr const &)*arg8,(DayCounter const &)*arg9,arg10,arg11,(std::vector< double > const &)*arg12,(std::vector< double > const &)*arg13,(std::vector< double > const &)*arg14,(std::vector< double > const &)*arg15,(std::vector< double > const &)*arg16);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FloatFloatSwapPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FloatFloatSwap__SWIG_6) {
  {
    VanillaSwap::Type arg1 ;
    std::vector< Real > *arg2 = 0 ;
    std::vector< Real > *arg3 = 0 ;
    Schedule *arg4 = 0 ;
    InterestRateIndexPtr *arg5 = 0 ;
    DayCounter *arg6 = 0 ;
    Schedule *arg7 = 0 ;
    InterestRateIndexPtr *arg8 = 0 ;
    DayCounter *arg9 = 0 ;
    bool arg10 ;
    bool arg11 ;
    std::vector< Real > *arg12 = 0 ;
    std::vector< Real > *arg13 = 0 ;
    std::vector< Real > *arg14 = 0 ;
    std::vector< Real > *arg15 = 0 ;
    int val1 ;
    int ecode1 = 0 ;
    std::vector< double > temp2 ;
    std::vector< double > *v2 ;
    std::vector< double > temp3 ;
    std::vector< double > *v3 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    bool val10 ;
    int ecode10 = 0 ;
    bool val11 ;
    int ecode11 = 0 ;
    std::vector< double > temp12 ;
    std::vector< double > *v12 ;
    std::vector< double > temp13 ;
    std::vector< double > *v13 ;
    std::vector< double > temp14 ;
    std::vector< double > *v14 ;
    std::vector< double > temp15 ;
    std::vector< double > *v15 ;
    int argvi = 0;
    FloatFloatSwapPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 15) || (items > 15)) {
      SWIG_croak("Usage: new_FloatFloatSwap(type,nominal1,nominal2,schedule1,indexPtr1,dayCount1,schedule2,indexPtr2,dayCount2,intermediateCapitalExchange,finalCapitalExchange,gearing1,spread1,cappedRate1,flooredRate1);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FloatFloatSwap" "', argument " "1"" of type '" "VanillaSwap::Type""'");
    } 
    arg1 = static_cast< VanillaSwap::Type >(val1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_FloatFloatSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp2.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_FloatFloatSwap. "
              "Expected an array of ""double");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_FloatFloatSwap. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_FloatFloatSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp3.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_FloatFloatSwap. "
              "Expected an array of ""double");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_FloatFloatSwap. "
          "Expected an array of ""double");
      }
    }
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FloatFloatSwap" "', argument " "4"" of type '" "Schedule const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatFloatSwap" "', argument " "4"" of type '" "Schedule const &""'"); 
    }
    arg4 = reinterpret_cast< Schedule * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_InterestRateIndexPtr,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_FloatFloatSwap" "', argument " "5"" of type '" "InterestRateIndexPtr const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatFloatSwap" "', argument " "5"" of type '" "InterestRateIndexPtr const &""'"); 
    }
    arg5 = reinterpret_cast< InterestRateIndexPtr * >(argp5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_FloatFloatSwap" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatFloatSwap" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    arg6 = reinterpret_cast< DayCounter * >(argp6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_FloatFloatSwap" "', argument " "7"" of type '" "Schedule const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatFloatSwap" "', argument " "7"" of type '" "Schedule const &""'"); 
    }
    arg7 = reinterpret_cast< Schedule * >(argp7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_InterestRateIndexPtr,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_FloatFloatSwap" "', argument " "8"" of type '" "InterestRateIndexPtr const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatFloatSwap" "', argument " "8"" of type '" "InterestRateIndexPtr const &""'"); 
    }
    arg8 = reinterpret_cast< InterestRateIndexPtr * >(argp8);
    res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res9)) {
      SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_FloatFloatSwap" "', argument " "9"" of type '" "DayCounter const &""'"); 
    }
    if (!argp9) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatFloatSwap" "', argument " "9"" of type '" "DayCounter const &""'"); 
    }
    arg9 = reinterpret_cast< DayCounter * >(argp9);
    ecode10 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(9), &val10);
    if (!SWIG_IsOK(ecode10)) {
      SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "new_FloatFloatSwap" "', argument " "10"" of type '" "bool""'");
    } 
    arg10 = static_cast< bool >(val10);
    ecode11 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(10), &val11);
    if (!SWIG_IsOK(ecode11)) {
      SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "new_FloatFloatSwap" "', argument " "11"" of type '" "bool""'");
    } 
    arg11 = static_cast< bool >(val11);
    {
      if (SWIG_ConvertPtr(ST(11),(void **) &v12, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg12 = v12;
      } else if (SvROK(ST(11))) {
        AV *av = (AV *)SvRV(ST(11));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 12 of new_FloatFloatSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp12.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 12 of "
              "new_FloatFloatSwap. "
              "Expected an array of ""double");
          }
        }
        arg12 = &temp12;
      } else {
        SWIG_croak("Type error in argument 12 of new_FloatFloatSwap. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(12),(void **) &v13, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg13 = v13;
      } else if (SvROK(ST(12))) {
        AV *av = (AV *)SvRV(ST(12));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 13 of new_FloatFloatSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp13.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 13 of "
              "new_FloatFloatSwap. "
              "Expected an array of ""double");
          }
        }
        arg13 = &temp13;
      } else {
        SWIG_croak("Type error in argument 13 of new_FloatFloatSwap. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(13),(void **) &v14, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg14 = v14;
      } else if (SvROK(ST(13))) {
        AV *av = (AV *)SvRV(ST(13));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 14 of new_FloatFloatSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp14.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 14 of "
              "new_FloatFloatSwap. "
              "Expected an array of ""double");
          }
        }
        arg14 = &temp14;
      } else {
        SWIG_croak("Type error in argument 14 of new_FloatFloatSwap. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(14),(void **) &v15, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg15 = v15;
      } else if (SvROK(ST(14))) {
        AV *av = (AV *)SvRV(ST(14));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 15 of new_FloatFloatSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp15.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 15 of "
              "new_FloatFloatSwap. "
              "Expected an array of ""double");
          }
        }
        arg15 = &temp15;
      } else {
        SWIG_croak("Type error in argument 15 of new_FloatFloatSwap. "
          "Expected an array of ""double");
      }
    }
    {
      try {
        result = (FloatFloatSwapPtr *)new_FloatFloatSwapPtr__SWIG_0(arg1,(std::vector< double > const &)*arg2,(std::vector< double > const &)*arg3,(Schedule const &)*arg4,(InterestRateIndexPtr const &)*arg5,(DayCounter const &)*arg6,(Schedule const &)*arg7,(InterestRateIndexPtr const &)*arg8,(DayCounter const &)*arg9,arg10,arg11,(std::vector< double > const &)*arg12,(std::vector< double > const &)*arg13,(std::vector< double > const &)*arg14,(std::vector< double > const &)*arg15);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FloatFloatSwapPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FloatFloatSwap__SWIG_7) {
  {
    VanillaSwap::Type arg1 ;
    std::vector< Real > *arg2 = 0 ;
    std::vector< Real > *arg3 = 0 ;
    Schedule *arg4 = 0 ;
    InterestRateIndexPtr *arg5 = 0 ;
    DayCounter *arg6 = 0 ;
    Schedule *arg7 = 0 ;
    InterestRateIndexPtr *arg8 = 0 ;
    DayCounter *arg9 = 0 ;
    bool arg10 ;
    bool arg11 ;
    std::vector< Real > *arg12 = 0 ;
    std::vector< Real > *arg13 = 0 ;
    std::vector< Real > *arg14 = 0 ;
    int val1 ;
    int ecode1 = 0 ;
    std::vector< double > temp2 ;
    std::vector< double > *v2 ;
    std::vector< double > temp3 ;
    std::vector< double > *v3 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    bool val10 ;
    int ecode10 = 0 ;
    bool val11 ;
    int ecode11 = 0 ;
    std::vector< double > temp12 ;
    std::vector< double > *v12 ;
    std::vector< double > temp13 ;
    std::vector< double > *v13 ;
    std::vector< double > temp14 ;
    std::vector< double > *v14 ;
    int argvi = 0;
    FloatFloatSwapPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 14) || (items > 14)) {
      SWIG_croak("Usage: new_FloatFloatSwap(type,nominal1,nominal2,schedule1,indexPtr1,dayCount1,schedule2,indexPtr2,dayCount2,intermediateCapitalExchange,finalCapitalExchange,gearing1,spread1,cappedRate1);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FloatFloatSwap" "', argument " "1"" of type '" "VanillaSwap::Type""'");
    } 
    arg1 = static_cast< VanillaSwap::Type >(val1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_FloatFloatSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp2.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_FloatFloatSwap. "
              "Expected an array of ""double");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_FloatFloatSwap. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_FloatFloatSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp3.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_FloatFloatSwap. "
              "Expected an array of ""double");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_FloatFloatSwap. "
          "Expected an array of ""double");
      }
    }
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FloatFloatSwap" "', argument " "4"" of type '" "Schedule const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatFloatSwap" "', argument " "4"" of type '" "Schedule const &""'"); 
    }
    arg4 = reinterpret_cast< Schedule * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_InterestRateIndexPtr,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_FloatFloatSwap" "', argument " "5"" of type '" "InterestRateIndexPtr const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatFloatSwap" "', argument " "5"" of type '" "InterestRateIndexPtr const &""'"); 
    }
    arg5 = reinterpret_cast< InterestRateIndexPtr * >(argp5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_FloatFloatSwap" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatFloatSwap" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    arg6 = reinterpret_cast< DayCounter * >(argp6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_FloatFloatSwap" "', argument " "7"" of type '" "Schedule const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatFloatSwap" "', argument " "7"" of type '" "Schedule const &""'"); 
    }
    arg7 = reinterpret_cast< Schedule * >(argp7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_InterestRateIndexPtr,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_FloatFloatSwap" "', argument " "8"" of type '" "InterestRateIndexPtr const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatFloatSwap" "', argument " "8"" of type '" "InterestRateIndexPtr const &""'"); 
    }
    arg8 = reinterpret_cast< InterestRateIndexPtr * >(argp8);
    res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res9)) {
      SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_FloatFloatSwap" "', argument " "9"" of type '" "DayCounter const &""'"); 
    }
    if (!argp9) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatFloatSwap" "', argument " "9"" of type '" "DayCounter const &""'"); 
    }
    arg9 = reinterpret_cast< DayCounter * >(argp9);
    ecode10 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(9), &val10);
    if (!SWIG_IsOK(ecode10)) {
      SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "new_FloatFloatSwap" "', argument " "10"" of type '" "bool""'");
    } 
    arg10 = static_cast< bool >(val10);
    ecode11 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(10), &val11);
    if (!SWIG_IsOK(ecode11)) {
      SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "new_FloatFloatSwap" "', argument " "11"" of type '" "bool""'");
    } 
    arg11 = static_cast< bool >(val11);
    {
      if (SWIG_ConvertPtr(ST(11),(void **) &v12, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg12 = v12;
      } else if (SvROK(ST(11))) {
        AV *av = (AV *)SvRV(ST(11));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 12 of new_FloatFloatSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp12.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 12 of "
              "new_FloatFloatSwap. "
              "Expected an array of ""double");
          }
        }
        arg12 = &temp12;
      } else {
        SWIG_croak("Type error in argument 12 of new_FloatFloatSwap. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(12),(void **) &v13, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg13 = v13;
      } else if (SvROK(ST(12))) {
        AV *av = (AV *)SvRV(ST(12));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 13 of new_FloatFloatSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp13.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 13 of "
              "new_FloatFloatSwap. "
              "Expected an array of ""double");
          }
        }
        arg13 = &temp13;
      } else {
        SWIG_croak("Type error in argument 13 of new_FloatFloatSwap. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(13),(void **) &v14, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg14 = v14;
      } else if (SvROK(ST(13))) {
        AV *av = (AV *)SvRV(ST(13));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 14 of new_FloatFloatSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp14.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 14 of "
              "new_FloatFloatSwap. "
              "Expected an array of ""double");
          }
        }
        arg14 = &temp14;
      } else {
        SWIG_croak("Type error in argument 14 of new_FloatFloatSwap. "
          "Expected an array of ""double");
      }
    }
    {
      try {
        result = (FloatFloatSwapPtr *)new_FloatFloatSwapPtr__SWIG_0(arg1,(std::vector< double > const &)*arg2,(std::vector< double > const &)*arg3,(Schedule const &)*arg4,(InterestRateIndexPtr const &)*arg5,(DayCounter const &)*arg6,(Schedule const &)*arg7,(InterestRateIndexPtr const &)*arg8,(DayCounter const &)*arg9,arg10,arg11,(std::vector< double > const &)*arg12,(std::vector< double > const &)*arg13,(std::vector< double > const &)*arg14);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FloatFloatSwapPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FloatFloatSwap__SWIG_8) {
  {
    VanillaSwap::Type arg1 ;
    std::vector< Real > *arg2 = 0 ;
    std::vector< Real > *arg3 = 0 ;
    Schedule *arg4 = 0 ;
    InterestRateIndexPtr *arg5 = 0 ;
    DayCounter *arg6 = 0 ;
    Schedule *arg7 = 0 ;
    InterestRateIndexPtr *arg8 = 0 ;
    DayCounter *arg9 = 0 ;
    bool arg10 ;
    bool arg11 ;
    std::vector< Real > *arg12 = 0 ;
    std::vector< Real > *arg13 = 0 ;
    int val1 ;
    int ecode1 = 0 ;
    std::vector< double > temp2 ;
    std::vector< double > *v2 ;
    std::vector< double > temp3 ;
    std::vector< double > *v3 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    bool val10 ;
    int ecode10 = 0 ;
    bool val11 ;
    int ecode11 = 0 ;
    std::vector< double > temp12 ;
    std::vector< double > *v12 ;
    std::vector< double > temp13 ;
    std::vector< double > *v13 ;
    int argvi = 0;
    FloatFloatSwapPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 13) || (items > 13)) {
      SWIG_croak("Usage: new_FloatFloatSwap(type,nominal1,nominal2,schedule1,indexPtr1,dayCount1,schedule2,indexPtr2,dayCount2,intermediateCapitalExchange,finalCapitalExchange,gearing1,spread1);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FloatFloatSwap" "', argument " "1"" of type '" "VanillaSwap::Type""'");
    } 
    arg1 = static_cast< VanillaSwap::Type >(val1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_FloatFloatSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp2.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_FloatFloatSwap. "
              "Expected an array of ""double");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_FloatFloatSwap. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_FloatFloatSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp3.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_FloatFloatSwap. "
              "Expected an array of ""double");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_FloatFloatSwap. "
          "Expected an array of ""double");
      }
    }
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FloatFloatSwap" "', argument " "4"" of type '" "Schedule const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatFloatSwap" "', argument " "4"" of type '" "Schedule const &""'"); 
    }
    arg4 = reinterpret_cast< Schedule * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_InterestRateIndexPtr,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_FloatFloatSwap" "', argument " "5"" of type '" "InterestRateIndexPtr const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatFloatSwap" "', argument " "5"" of type '" "InterestRateIndexPtr const &""'"); 
    }
    arg5 = reinterpret_cast< InterestRateIndexPtr * >(argp5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_FloatFloatSwap" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatFloatSwap" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    arg6 = reinterpret_cast< DayCounter * >(argp6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_FloatFloatSwap" "', argument " "7"" of type '" "Schedule const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatFloatSwap" "', argument " "7"" of type '" "Schedule const &""'"); 
    }
    arg7 = reinterpret_cast< Schedule * >(argp7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_InterestRateIndexPtr,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_FloatFloatSwap" "', argument " "8"" of type '" "InterestRateIndexPtr const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatFloatSwap" "', argument " "8"" of type '" "InterestRateIndexPtr const &""'"); 
    }
    arg8 = reinterpret_cast< InterestRateIndexPtr * >(argp8);
    res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res9)) {
      SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_FloatFloatSwap" "', argument " "9"" of type '" "DayCounter const &""'"); 
    }
    if (!argp9) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatFloatSwap" "', argument " "9"" of type '" "DayCounter const &""'"); 
    }
    arg9 = reinterpret_cast< DayCounter * >(argp9);
    ecode10 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(9), &val10);
    if (!SWIG_IsOK(ecode10)) {
      SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "new_FloatFloatSwap" "', argument " "10"" of type '" "bool""'");
    } 
    arg10 = static_cast< bool >(val10);
    ecode11 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(10), &val11);
    if (!SWIG_IsOK(ecode11)) {
      SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "new_FloatFloatSwap" "', argument " "11"" of type '" "bool""'");
    } 
    arg11 = static_cast< bool >(val11);
    {
      if (SWIG_ConvertPtr(ST(11),(void **) &v12, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg12 = v12;
      } else if (SvROK(ST(11))) {
        AV *av = (AV *)SvRV(ST(11));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 12 of new_FloatFloatSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp12.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 12 of "
              "new_FloatFloatSwap. "
              "Expected an array of ""double");
          }
        }
        arg12 = &temp12;
      } else {
        SWIG_croak("Type error in argument 12 of new_FloatFloatSwap. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(12),(void **) &v13, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg13 = v13;
      } else if (SvROK(ST(12))) {
        AV *av = (AV *)SvRV(ST(12));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 13 of new_FloatFloatSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp13.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 13 of "
              "new_FloatFloatSwap. "
              "Expected an array of ""double");
          }
        }
        arg13 = &temp13;
      } else {
        SWIG_croak("Type error in argument 13 of new_FloatFloatSwap. "
          "Expected an array of ""double");
      }
    }
    {
      try {
        result = (FloatFloatSwapPtr *)new_FloatFloatSwapPtr__SWIG_0(arg1,(std::vector< double > const &)*arg2,(std::vector< double > const &)*arg3,(Schedule const &)*arg4,(InterestRateIndexPtr const &)*arg5,(DayCounter const &)*arg6,(Schedule const &)*arg7,(InterestRateIndexPtr const &)*arg8,(DayCounter const &)*arg9,arg10,arg11,(std::vector< double > const &)*arg12,(std::vector< double > const &)*arg13);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FloatFloatSwapPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FloatFloatSwap__SWIG_9) {
  {
    VanillaSwap::Type arg1 ;
    std::vector< Real > *arg2 = 0 ;
    std::vector< Real > *arg3 = 0 ;
    Schedule *arg4 = 0 ;
    InterestRateIndexPtr *arg5 = 0 ;
    DayCounter *arg6 = 0 ;
    Schedule *arg7 = 0 ;
    InterestRateIndexPtr *arg8 = 0 ;
    DayCounter *arg9 = 0 ;
    bool arg10 ;
    bool arg11 ;
    std::vector< Real > *arg12 = 0 ;
    int val1 ;
    int ecode1 = 0 ;
    std::vector< double > temp2 ;
    std::vector< double > *v2 ;
    std::vector< double > temp3 ;
    std::vector< double > *v3 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    bool val10 ;
    int ecode10 = 0 ;
    bool val11 ;
    int ecode11 = 0 ;
    std::vector< double > temp12 ;
    std::vector< double > *v12 ;
    int argvi = 0;
    FloatFloatSwapPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 12) || (items > 12)) {
      SWIG_croak("Usage: new_FloatFloatSwap(type,nominal1,nominal2,schedule1,indexPtr1,dayCount1,schedule2,indexPtr2,dayCount2,intermediateCapitalExchange,finalCapitalExchange,gearing1);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FloatFloatSwap" "', argument " "1"" of type '" "VanillaSwap::Type""'");
    } 
    arg1 = static_cast< VanillaSwap::Type >(val1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_FloatFloatSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp2.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_FloatFloatSwap. "
              "Expected an array of ""double");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_FloatFloatSwap. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_FloatFloatSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp3.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_FloatFloatSwap. "
              "Expected an array of ""double");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_FloatFloatSwap. "
          "Expected an array of ""double");
      }
    }
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FloatFloatSwap" "', argument " "4"" of type '" "Schedule const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatFloatSwap" "', argument " "4"" of type '" "Schedule const &""'"); 
    }
    arg4 = reinterpret_cast< Schedule * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_InterestRateIndexPtr,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_FloatFloatSwap" "', argument " "5"" of type '" "InterestRateIndexPtr const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatFloatSwap" "', argument " "5"" of type '" "InterestRateIndexPtr const &""'"); 
    }
    arg5 = reinterpret_cast< InterestRateIndexPtr * >(argp5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_FloatFloatSwap" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatFloatSwap" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    arg6 = reinterpret_cast< DayCounter * >(argp6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_FloatFloatSwap" "', argument " "7"" of type '" "Schedule const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatFloatSwap" "', argument " "7"" of type '" "Schedule const &""'"); 
    }
    arg7 = reinterpret_cast< Schedule * >(argp7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_InterestRateIndexPtr,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_FloatFloatSwap" "', argument " "8"" of type '" "InterestRateIndexPtr const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatFloatSwap" "', argument " "8"" of type '" "InterestRateIndexPtr const &""'"); 
    }
    arg8 = reinterpret_cast< InterestRateIndexPtr * >(argp8);
    res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res9)) {
      SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_FloatFloatSwap" "', argument " "9"" of type '" "DayCounter const &""'"); 
    }
    if (!argp9) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatFloatSwap" "', argument " "9"" of type '" "DayCounter const &""'"); 
    }
    arg9 = reinterpret_cast< DayCounter * >(argp9);
    ecode10 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(9), &val10);
    if (!SWIG_IsOK(ecode10)) {
      SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "new_FloatFloatSwap" "', argument " "10"" of type '" "bool""'");
    } 
    arg10 = static_cast< bool >(val10);
    ecode11 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(10), &val11);
    if (!SWIG_IsOK(ecode11)) {
      SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "new_FloatFloatSwap" "', argument " "11"" of type '" "bool""'");
    } 
    arg11 = static_cast< bool >(val11);
    {
      if (SWIG_ConvertPtr(ST(11),(void **) &v12, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg12 = v12;
      } else if (SvROK(ST(11))) {
        AV *av = (AV *)SvRV(ST(11));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 12 of new_FloatFloatSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp12.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 12 of "
              "new_FloatFloatSwap. "
              "Expected an array of ""double");
          }
        }
        arg12 = &temp12;
      } else {
        SWIG_croak("Type error in argument 12 of new_FloatFloatSwap. "
          "Expected an array of ""double");
      }
    }
    {
      try {
        result = (FloatFloatSwapPtr *)new_FloatFloatSwapPtr__SWIG_0(arg1,(std::vector< double > const &)*arg2,(std::vector< double > const &)*arg3,(Schedule const &)*arg4,(InterestRateIndexPtr const &)*arg5,(DayCounter const &)*arg6,(Schedule const &)*arg7,(InterestRateIndexPtr const &)*arg8,(DayCounter const &)*arg9,arg10,arg11,(std::vector< double > const &)*arg12);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FloatFloatSwapPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FloatFloatSwap__SWIG_10) {
  {
    VanillaSwap::Type arg1 ;
    std::vector< Real > *arg2 = 0 ;
    std::vector< Real > *arg3 = 0 ;
    Schedule *arg4 = 0 ;
    InterestRateIndexPtr *arg5 = 0 ;
    DayCounter *arg6 = 0 ;
    Schedule *arg7 = 0 ;
    InterestRateIndexPtr *arg8 = 0 ;
    DayCounter *arg9 = 0 ;
    bool arg10 ;
    bool arg11 ;
    int val1 ;
    int ecode1 = 0 ;
    std::vector< double > temp2 ;
    std::vector< double > *v2 ;
    std::vector< double > temp3 ;
    std::vector< double > *v3 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    bool val10 ;
    int ecode10 = 0 ;
    bool val11 ;
    int ecode11 = 0 ;
    int argvi = 0;
    FloatFloatSwapPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 11) || (items > 11)) {
      SWIG_croak("Usage: new_FloatFloatSwap(type,nominal1,nominal2,schedule1,indexPtr1,dayCount1,schedule2,indexPtr2,dayCount2,intermediateCapitalExchange,finalCapitalExchange);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FloatFloatSwap" "', argument " "1"" of type '" "VanillaSwap::Type""'");
    } 
    arg1 = static_cast< VanillaSwap::Type >(val1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_FloatFloatSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp2.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_FloatFloatSwap. "
              "Expected an array of ""double");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_FloatFloatSwap. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_FloatFloatSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp3.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_FloatFloatSwap. "
              "Expected an array of ""double");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_FloatFloatSwap. "
          "Expected an array of ""double");
      }
    }
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FloatFloatSwap" "', argument " "4"" of type '" "Schedule const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatFloatSwap" "', argument " "4"" of type '" "Schedule const &""'"); 
    }
    arg4 = reinterpret_cast< Schedule * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_InterestRateIndexPtr,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_FloatFloatSwap" "', argument " "5"" of type '" "InterestRateIndexPtr const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatFloatSwap" "', argument " "5"" of type '" "InterestRateIndexPtr const &""'"); 
    }
    arg5 = reinterpret_cast< InterestRateIndexPtr * >(argp5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_FloatFloatSwap" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatFloatSwap" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    arg6 = reinterpret_cast< DayCounter * >(argp6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_FloatFloatSwap" "', argument " "7"" of type '" "Schedule const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatFloatSwap" "', argument " "7"" of type '" "Schedule const &""'"); 
    }
    arg7 = reinterpret_cast< Schedule * >(argp7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_InterestRateIndexPtr,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_FloatFloatSwap" "', argument " "8"" of type '" "InterestRateIndexPtr const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatFloatSwap" "', argument " "8"" of type '" "InterestRateIndexPtr const &""'"); 
    }
    arg8 = reinterpret_cast< InterestRateIndexPtr * >(argp8);
    res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res9)) {
      SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_FloatFloatSwap" "', argument " "9"" of type '" "DayCounter const &""'"); 
    }
    if (!argp9) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatFloatSwap" "', argument " "9"" of type '" "DayCounter const &""'"); 
    }
    arg9 = reinterpret_cast< DayCounter * >(argp9);
    ecode10 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(9), &val10);
    if (!SWIG_IsOK(ecode10)) {
      SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "new_FloatFloatSwap" "', argument " "10"" of type '" "bool""'");
    } 
    arg10 = static_cast< bool >(val10);
    ecode11 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(10), &val11);
    if (!SWIG_IsOK(ecode11)) {
      SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "new_FloatFloatSwap" "', argument " "11"" of type '" "bool""'");
    } 
    arg11 = static_cast< bool >(val11);
    {
      try {
        result = (FloatFloatSwapPtr *)new_FloatFloatSwapPtr__SWIG_0(arg1,(std::vector< double > const &)*arg2,(std::vector< double > const &)*arg3,(Schedule const &)*arg4,(InterestRateIndexPtr const &)*arg5,(DayCounter const &)*arg6,(Schedule const &)*arg7,(InterestRateIndexPtr const &)*arg8,(DayCounter const &)*arg9,arg10,arg11);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FloatFloatSwapPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FloatFloatSwap__SWIG_11) {
  {
    VanillaSwap::Type arg1 ;
    std::vector< Real > *arg2 = 0 ;
    std::vector< Real > *arg3 = 0 ;
    Schedule *arg4 = 0 ;
    InterestRateIndexPtr *arg5 = 0 ;
    DayCounter *arg6 = 0 ;
    Schedule *arg7 = 0 ;
    InterestRateIndexPtr *arg8 = 0 ;
    DayCounter *arg9 = 0 ;
    bool arg10 ;
    int val1 ;
    int ecode1 = 0 ;
    std::vector< double > temp2 ;
    std::vector< double > *v2 ;
    std::vector< double > temp3 ;
    std::vector< double > *v3 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    bool val10 ;
    int ecode10 = 0 ;
    int argvi = 0;
    FloatFloatSwapPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 10) || (items > 10)) {
      SWIG_croak("Usage: new_FloatFloatSwap(type,nominal1,nominal2,schedule1,indexPtr1,dayCount1,schedule2,indexPtr2,dayCount2,intermediateCapitalExchange);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FloatFloatSwap" "', argument " "1"" of type '" "VanillaSwap::Type""'");
    } 
    arg1 = static_cast< VanillaSwap::Type >(val1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_FloatFloatSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp2.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_FloatFloatSwap. "
              "Expected an array of ""double");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_FloatFloatSwap. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_FloatFloatSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp3.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_FloatFloatSwap. "
              "Expected an array of ""double");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_FloatFloatSwap. "
          "Expected an array of ""double");
      }
    }
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FloatFloatSwap" "', argument " "4"" of type '" "Schedule const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatFloatSwap" "', argument " "4"" of type '" "Schedule const &""'"); 
    }
    arg4 = reinterpret_cast< Schedule * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_InterestRateIndexPtr,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_FloatFloatSwap" "', argument " "5"" of type '" "InterestRateIndexPtr const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatFloatSwap" "', argument " "5"" of type '" "InterestRateIndexPtr const &""'"); 
    }
    arg5 = reinterpret_cast< InterestRateIndexPtr * >(argp5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_FloatFloatSwap" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatFloatSwap" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    arg6 = reinterpret_cast< DayCounter * >(argp6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_FloatFloatSwap" "', argument " "7"" of type '" "Schedule const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatFloatSwap" "', argument " "7"" of type '" "Schedule const &""'"); 
    }
    arg7 = reinterpret_cast< Schedule * >(argp7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_InterestRateIndexPtr,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_FloatFloatSwap" "', argument " "8"" of type '" "InterestRateIndexPtr const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatFloatSwap" "', argument " "8"" of type '" "InterestRateIndexPtr const &""'"); 
    }
    arg8 = reinterpret_cast< InterestRateIndexPtr * >(argp8);
    res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res9)) {
      SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_FloatFloatSwap" "', argument " "9"" of type '" "DayCounter const &""'"); 
    }
    if (!argp9) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatFloatSwap" "', argument " "9"" of type '" "DayCounter const &""'"); 
    }
    arg9 = reinterpret_cast< DayCounter * >(argp9);
    ecode10 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(9), &val10);
    if (!SWIG_IsOK(ecode10)) {
      SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "new_FloatFloatSwap" "', argument " "10"" of type '" "bool""'");
    } 
    arg10 = static_cast< bool >(val10);
    {
      try {
        result = (FloatFloatSwapPtr *)new_FloatFloatSwapPtr__SWIG_0(arg1,(std::vector< double > const &)*arg2,(std::vector< double > const &)*arg3,(Schedule const &)*arg4,(InterestRateIndexPtr const &)*arg5,(DayCounter const &)*arg6,(Schedule const &)*arg7,(InterestRateIndexPtr const &)*arg8,(DayCounter const &)*arg9,arg10);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FloatFloatSwapPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FloatFloatSwap__SWIG_12) {
  {
    VanillaSwap::Type arg1 ;
    std::vector< Real > *arg2 = 0 ;
    std::vector< Real > *arg3 = 0 ;
    Schedule *arg4 = 0 ;
    InterestRateIndexPtr *arg5 = 0 ;
    DayCounter *arg6 = 0 ;
    Schedule *arg7 = 0 ;
    InterestRateIndexPtr *arg8 = 0 ;
    DayCounter *arg9 = 0 ;
    int val1 ;
    int ecode1 = 0 ;
    std::vector< double > temp2 ;
    std::vector< double > *v2 ;
    std::vector< double > temp3 ;
    std::vector< double > *v3 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    int argvi = 0;
    FloatFloatSwapPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 9) || (items > 9)) {
      SWIG_croak("Usage: new_FloatFloatSwap(type,nominal1,nominal2,schedule1,indexPtr1,dayCount1,schedule2,indexPtr2,dayCount2);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FloatFloatSwap" "', argument " "1"" of type '" "VanillaSwap::Type""'");
    } 
    arg1 = static_cast< VanillaSwap::Type >(val1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_FloatFloatSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp2.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_FloatFloatSwap. "
              "Expected an array of ""double");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_FloatFloatSwap. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_FloatFloatSwap. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp3.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_FloatFloatSwap. "
              "Expected an array of ""double");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_FloatFloatSwap. "
          "Expected an array of ""double");
      }
    }
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FloatFloatSwap" "', argument " "4"" of type '" "Schedule const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatFloatSwap" "', argument " "4"" of type '" "Schedule const &""'"); 
    }
    arg4 = reinterpret_cast< Schedule * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_InterestRateIndexPtr,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_FloatFloatSwap" "', argument " "5"" of type '" "InterestRateIndexPtr const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatFloatSwap" "', argument " "5"" of type '" "InterestRateIndexPtr const &""'"); 
    }
    arg5 = reinterpret_cast< InterestRateIndexPtr * >(argp5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_FloatFloatSwap" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatFloatSwap" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    arg6 = reinterpret_cast< DayCounter * >(argp6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_FloatFloatSwap" "', argument " "7"" of type '" "Schedule const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatFloatSwap" "', argument " "7"" of type '" "Schedule const &""'"); 
    }
    arg7 = reinterpret_cast< Schedule * >(argp7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_InterestRateIndexPtr,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_FloatFloatSwap" "', argument " "8"" of type '" "InterestRateIndexPtr const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatFloatSwap" "', argument " "8"" of type '" "InterestRateIndexPtr const &""'"); 
    }
    arg8 = reinterpret_cast< InterestRateIndexPtr * >(argp8);
    res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res9)) {
      SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_FloatFloatSwap" "', argument " "9"" of type '" "DayCounter const &""'"); 
    }
    if (!argp9) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatFloatSwap" "', argument " "9"" of type '" "DayCounter const &""'"); 
    }
    arg9 = reinterpret_cast< DayCounter * >(argp9);
    {
      try {
        result = (FloatFloatSwapPtr *)new_FloatFloatSwapPtr__SWIG_0(arg1,(std::vector< double > const &)*arg2,(std::vector< double > const &)*arg3,(Schedule const &)*arg4,(InterestRateIndexPtr const &)*arg5,(DayCounter const &)*arg6,(Schedule const &)*arg7,(InterestRateIndexPtr const &)*arg8,(DayCounter const &)*arg9);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FloatFloatSwapPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FloatFloatSwap) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 9) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_InterestRateIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_InterestRateIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 10) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_InterestRateIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_InterestRateIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(9), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 11) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_InterestRateIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_InterestRateIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(9), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(10), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 12) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_InterestRateIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_InterestRateIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(9), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(10), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(11),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(11))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(11));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 13) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_InterestRateIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_InterestRateIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(9), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(10), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(11),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(11))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(11));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(12),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(12))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(12));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 14) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_InterestRateIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_InterestRateIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(9), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(10), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(11),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(11))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(11));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(12),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(12))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(12));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(13),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(13))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(13));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
    if (items == 15) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_InterestRateIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_InterestRateIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(9), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(10), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(11),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(11))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(11));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(12),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(12))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(12));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(13),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(13))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(13));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(14),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(14))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(14));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 7;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_7:
    
    if (items == 16) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_InterestRateIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_InterestRateIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(9), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(10), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(11),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(11))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(11));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(12),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(12))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(12));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(13),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(13))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(13));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(14),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(14))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(14));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(15),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(15))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(15));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 8;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_8:
    
    if (items == 17) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_InterestRateIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_InterestRateIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(9), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(10), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(11),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(11))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(11));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(12),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(12))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(12));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(13),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(13))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(13));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(14),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(14))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(14));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(15),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(15))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(15));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(16),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(16))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(16));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 9;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_9:
    
    if (items == 18) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_InterestRateIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_InterestRateIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(9), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(10), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(11),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(11))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(11));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(12),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(12))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(12));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(13),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(13))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(13));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(14),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(14))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(14));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(15),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(15))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(15));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(16),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(16))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(16));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(17),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(17))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(17));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 10;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_10:
    
    if (items == 19) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_InterestRateIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_InterestRateIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(9), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(10), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(11),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(11))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(11));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(12),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(12))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(12));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(13),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(13))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(13));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(14),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(14))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(14));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(15),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(15))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(15));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(16),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(16))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(16));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(17),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(17))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(17));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(18),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(18))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(18));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 11;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_11:
    
    if (items == 20) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_InterestRateIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_InterestRateIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(9), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(10), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(11),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(11))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(11));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(12),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(12))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(12));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(13),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(13))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(13));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(14),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(14))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(14));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(15),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(15))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(15));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(16),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(16))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(16));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(17),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(17))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(17));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(18),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(18))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(18));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(19), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 12;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_12:
    
    if (items == 21) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_13;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_13;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_13;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_13;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_InterestRateIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_13;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_13;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_13;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_InterestRateIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_13;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_13;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(9), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_13;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(10), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_13;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(11),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(11))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(11));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_13;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(12),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(12))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(12));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_13;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(13),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(13))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(13));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_13;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(14),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(14))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(14));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_13;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(15),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(15))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(15));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_13;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(16),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(16))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(16));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_13;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(17),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(17))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(17));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_13;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(18),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(18))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(18));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_13;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(19), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_13;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(20), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_13;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 13;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_13:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FloatFloatSwap__SWIG_12); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FloatFloatSwap__SWIG_11); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FloatFloatSwap__SWIG_10); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FloatFloatSwap__SWIG_9); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FloatFloatSwap__SWIG_8); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FloatFloatSwap__SWIG_7); return;
    case 7:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FloatFloatSwap__SWIG_6); return;
    case 8:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FloatFloatSwap__SWIG_5); return;
    case 9:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FloatFloatSwap__SWIG_4); return;
    case 10:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FloatFloatSwap__SWIG_3); return;
    case 11:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FloatFloatSwap__SWIG_2); return;
    case 12:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FloatFloatSwap__SWIG_1); return;
    case 13:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FloatFloatSwap__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_FloatFloatSwap'");
  XSRETURN(0);
}


XS(_wrap_delete_FloatFloatSwap) {
  {
    FloatFloatSwapPtr *arg1 = (FloatFloatSwapPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_FloatFloatSwap(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_FloatFloatSwapPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FloatFloatSwap" "', argument " "1"" of type '" "FloatFloatSwapPtr *""'"); 
    }
    arg1 = reinterpret_cast< FloatFloatSwapPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Pillar) {
  {
    int argvi = 0;
    Pillar *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Pillar();");
    }
    {
      try {
        result = (Pillar *)new Pillar();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Pillar, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_Pillar) {
  {
    Pillar *arg1 = (Pillar *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Pillar(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Pillar, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Pillar" "', argument " "1"" of type '" "Pillar *""'"); 
    }
    arg1 = reinterpret_cast< Pillar * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_RateHelper___deref__) {
  {
    boost::shared_ptr< RateHelper > *arg1 = (boost::shared_ptr< RateHelper > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    RateHelper *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: RateHelper___deref__(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_RateHelper_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RateHelper___deref__" "', argument " "1"" of type '" "boost::shared_ptr< RateHelper > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< RateHelper > * >(argp1);
    {
      try {
        result = (RateHelper *)(arg1)->operator ->();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_RateHelper, 0 | 0); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_RateHelper_isNull) {
  {
    boost::shared_ptr< RateHelper > *arg1 = (boost::shared_ptr< RateHelper > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: RateHelper_isNull(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_RateHelper_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RateHelper_isNull" "', argument " "1"" of type '" "boost::shared_ptr< RateHelper > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< RateHelper > * >(argp1);
    {
      try {
        result = (bool)boost_shared_ptr_Sl_RateHelper_Sg__isNull(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_RateHelper) {
  {
    int argvi = 0;
    boost::shared_ptr< RateHelper > *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_RateHelper();");
    }
    {
      try {
        result = (boost::shared_ptr< RateHelper > *)new boost::shared_ptr< RateHelper >();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_boost__shared_ptrT_RateHelper_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_RateHelper) {
  {
    boost::shared_ptr< RateHelper > *arg1 = (boost::shared_ptr< RateHelper > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_RateHelper(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_RateHelper_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_RateHelper" "', argument " "1"" of type '" "boost::shared_ptr< RateHelper > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< RateHelper > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_RateHelper_quote) {
  {
    boost::shared_ptr< RateHelper > *arg1 = (boost::shared_ptr< RateHelper > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Handle< Quote > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: RateHelper_quote(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_RateHelper_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RateHelper_quote" "', argument " "1"" of type '" "boost::shared_ptr< RateHelper > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< RateHelper > * >(argp1);
    {
      try {
        result = (*arg1)->quote();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Handle< Quote >(static_cast< const Handle< Quote >& >(result))), SWIGTYPE_p_HandleT_Quote_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_RateHelper_latestDate) {
  {
    boost::shared_ptr< RateHelper > *arg1 = (boost::shared_ptr< RateHelper > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: RateHelper_latestDate(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_RateHelper_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RateHelper_latestDate" "', argument " "1"" of type '" "boost::shared_ptr< RateHelper > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< RateHelper > * >(argp1);
    {
      try {
        result = (*arg1)->latestDate();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DepositRateHelper__SWIG_0) {
  {
    Handle< Quote > *arg1 = 0 ;
    Period *arg2 = 0 ;
    Natural arg3 ;
    Calendar *arg4 = 0 ;
    BusinessDayConvention arg5 ;
    bool arg6 ;
    DayCounter *arg7 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    unsigned int val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    bool val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    int argvi = 0;
    DepositRateHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: new_DepositRateHelper(rate,tenor,fixingDays,calendar,convention,endOfMonth,dayCounter);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DepositRateHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DepositRateHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< Quote > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_DepositRateHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DepositRateHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    arg2 = reinterpret_cast< Period * >(argp2);
    ecode3 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_DepositRateHelper" "', argument " "3"" of type '" "Natural""'");
    } 
    arg3 = static_cast< Natural >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_DepositRateHelper" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DepositRateHelper" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    arg4 = reinterpret_cast< Calendar * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_DepositRateHelper" "', argument " "5"" of type '" "BusinessDayConvention""'");
    } 
    arg5 = static_cast< BusinessDayConvention >(val5);
    ecode6 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_DepositRateHelper" "', argument " "6"" of type '" "bool""'");
    } 
    arg6 = static_cast< bool >(val6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_DepositRateHelper" "', argument " "7"" of type '" "DayCounter const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DepositRateHelper" "', argument " "7"" of type '" "DayCounter const &""'"); 
    }
    arg7 = reinterpret_cast< DayCounter * >(argp7);
    {
      try {
        result = (DepositRateHelperPtr *)new_DepositRateHelperPtr__SWIG_0((Handle< Quote > const &)*arg1,(Period const &)*arg2,arg3,(Calendar const &)*arg4,arg5,arg6,(DayCounter const &)*arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DepositRateHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DepositRateHelper__SWIG_1) {
  {
    Rate arg1 ;
    Period *arg2 = 0 ;
    Natural arg3 ;
    Calendar *arg4 = 0 ;
    BusinessDayConvention arg5 ;
    bool arg6 ;
    DayCounter *arg7 = 0 ;
    double val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    unsigned int val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    bool val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    int argvi = 0;
    DepositRateHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: new_DepositRateHelper(rate,tenor,fixingDays,calendar,convention,endOfMonth,dayCounter);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_DepositRateHelper" "', argument " "1"" of type '" "Rate""'");
    } 
    arg1 = static_cast< Rate >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_DepositRateHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DepositRateHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    arg2 = reinterpret_cast< Period * >(argp2);
    ecode3 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_DepositRateHelper" "', argument " "3"" of type '" "Natural""'");
    } 
    arg3 = static_cast< Natural >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_DepositRateHelper" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DepositRateHelper" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    arg4 = reinterpret_cast< Calendar * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_DepositRateHelper" "', argument " "5"" of type '" "BusinessDayConvention""'");
    } 
    arg5 = static_cast< BusinessDayConvention >(val5);
    ecode6 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_DepositRateHelper" "', argument " "6"" of type '" "bool""'");
    } 
    arg6 = static_cast< bool >(val6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_DepositRateHelper" "', argument " "7"" of type '" "DayCounter const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DepositRateHelper" "', argument " "7"" of type '" "DayCounter const &""'"); 
    }
    arg7 = reinterpret_cast< DayCounter * >(argp7);
    {
      try {
        result = (DepositRateHelperPtr *)new_DepositRateHelperPtr__SWIG_1(arg1,(Period const &)*arg2,arg3,(Calendar const &)*arg4,arg5,arg6,(DayCounter const &)*arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DepositRateHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DepositRateHelper__SWIG_2) {
  {
    Handle< Quote > *arg1 = 0 ;
    IborIndexPtr *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    DepositRateHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_DepositRateHelper(rate,index);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DepositRateHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DepositRateHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< Quote > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_IborIndexPtr,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_DepositRateHelper" "', argument " "2"" of type '" "IborIndexPtr const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DepositRateHelper" "', argument " "2"" of type '" "IborIndexPtr const &""'"); 
    }
    arg2 = reinterpret_cast< IborIndexPtr * >(argp2);
    {
      try {
        result = (DepositRateHelperPtr *)new_DepositRateHelperPtr__SWIG_2((Handle< Quote > const &)*arg1,(IborIndexPtr const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DepositRateHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DepositRateHelper__SWIG_3) {
  {
    Rate arg1 ;
    IborIndexPtr *arg2 = 0 ;
    double val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    DepositRateHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_DepositRateHelper(rate,index);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_DepositRateHelper" "', argument " "1"" of type '" "Rate""'");
    } 
    arg1 = static_cast< Rate >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_IborIndexPtr,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_DepositRateHelper" "', argument " "2"" of type '" "IborIndexPtr const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DepositRateHelper" "', argument " "2"" of type '" "IborIndexPtr const &""'"); 
    }
    arg2 = reinterpret_cast< IborIndexPtr * >(argp2);
    {
      try {
        result = (DepositRateHelperPtr *)new_DepositRateHelperPtr__SWIG_3(arg1,(IborIndexPtr const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DepositRateHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DepositRateHelper) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_IborIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_IborIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DepositRateHelper__SWIG_2); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DepositRateHelper__SWIG_3); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DepositRateHelper__SWIG_0); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DepositRateHelper__SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded 'new_DepositRateHelper'");
  XSRETURN(0);
}


XS(_wrap_delete_DepositRateHelper) {
  {
    DepositRateHelperPtr *arg1 = (DepositRateHelperPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_DepositRateHelper(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_DepositRateHelperPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DepositRateHelper" "', argument " "1"" of type '" "DepositRateHelperPtr *""'"); 
    }
    arg1 = reinterpret_cast< DepositRateHelperPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FraRateHelper__SWIG_0) {
  {
    Handle< Quote > *arg1 = 0 ;
    Natural arg2 ;
    Natural arg3 ;
    Natural arg4 ;
    Calendar *arg5 = 0 ;
    BusinessDayConvention arg6 ;
    bool arg7 ;
    DayCounter *arg8 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    unsigned int val3 ;
    int ecode3 = 0 ;
    unsigned int val4 ;
    int ecode4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    bool val7 ;
    int ecode7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    int argvi = 0;
    FraRateHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 8) || (items > 8)) {
      SWIG_croak("Usage: new_FraRateHelper(rate,monthsToStart,monthsToEnd,fixingDays,calendar,convention,endOfMonth,dayCounter);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FraRateHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FraRateHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< Quote > * >(argp1);
    ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FraRateHelper" "', argument " "2"" of type '" "Natural""'");
    } 
    arg2 = static_cast< Natural >(val2);
    ecode3 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_FraRateHelper" "', argument " "3"" of type '" "Natural""'");
    } 
    arg3 = static_cast< Natural >(val3);
    ecode4 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_FraRateHelper" "', argument " "4"" of type '" "Natural""'");
    } 
    arg4 = static_cast< Natural >(val4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_FraRateHelper" "', argument " "5"" of type '" "Calendar const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FraRateHelper" "', argument " "5"" of type '" "Calendar const &""'"); 
    }
    arg5 = reinterpret_cast< Calendar * >(argp5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_FraRateHelper" "', argument " "6"" of type '" "BusinessDayConvention""'");
    } 
    arg6 = static_cast< BusinessDayConvention >(val6);
    ecode7 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_FraRateHelper" "', argument " "7"" of type '" "bool""'");
    } 
    arg7 = static_cast< bool >(val7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_FraRateHelper" "', argument " "8"" of type '" "DayCounter const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FraRateHelper" "', argument " "8"" of type '" "DayCounter const &""'"); 
    }
    arg8 = reinterpret_cast< DayCounter * >(argp8);
    {
      try {
        result = (FraRateHelperPtr *)new_FraRateHelperPtr__SWIG_0((Handle< Quote > const &)*arg1,arg2,arg3,arg4,(Calendar const &)*arg5,arg6,arg7,(DayCounter const &)*arg8);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FraRateHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FraRateHelper__SWIG_1) {
  {
    Rate arg1 ;
    Natural arg2 ;
    Natural arg3 ;
    Natural arg4 ;
    Calendar *arg5 = 0 ;
    BusinessDayConvention arg6 ;
    bool arg7 ;
    DayCounter *arg8 = 0 ;
    double val1 ;
    int ecode1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    unsigned int val3 ;
    int ecode3 = 0 ;
    unsigned int val4 ;
    int ecode4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    bool val7 ;
    int ecode7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    int argvi = 0;
    FraRateHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 8) || (items > 8)) {
      SWIG_croak("Usage: new_FraRateHelper(rate,monthsToStart,monthsToEnd,fixingDays,calendar,convention,endOfMonth,dayCounter);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FraRateHelper" "', argument " "1"" of type '" "Rate""'");
    } 
    arg1 = static_cast< Rate >(val1);
    ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FraRateHelper" "', argument " "2"" of type '" "Natural""'");
    } 
    arg2 = static_cast< Natural >(val2);
    ecode3 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_FraRateHelper" "', argument " "3"" of type '" "Natural""'");
    } 
    arg3 = static_cast< Natural >(val3);
    ecode4 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_FraRateHelper" "', argument " "4"" of type '" "Natural""'");
    } 
    arg4 = static_cast< Natural >(val4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_FraRateHelper" "', argument " "5"" of type '" "Calendar const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FraRateHelper" "', argument " "5"" of type '" "Calendar const &""'"); 
    }
    arg5 = reinterpret_cast< Calendar * >(argp5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_FraRateHelper" "', argument " "6"" of type '" "BusinessDayConvention""'");
    } 
    arg6 = static_cast< BusinessDayConvention >(val6);
    ecode7 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_FraRateHelper" "', argument " "7"" of type '" "bool""'");
    } 
    arg7 = static_cast< bool >(val7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_FraRateHelper" "', argument " "8"" of type '" "DayCounter const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FraRateHelper" "', argument " "8"" of type '" "DayCounter const &""'"); 
    }
    arg8 = reinterpret_cast< DayCounter * >(argp8);
    {
      try {
        result = (FraRateHelperPtr *)new_FraRateHelperPtr__SWIG_1(arg1,arg2,arg3,arg4,(Calendar const &)*arg5,arg6,arg7,(DayCounter const &)*arg8);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FraRateHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FraRateHelper__SWIG_2) {
  {
    Handle< Quote > *arg1 = 0 ;
    Natural arg2 ;
    IborIndexPtr *arg3 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    FraRateHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_FraRateHelper(rate,monthsToStart,index);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FraRateHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FraRateHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< Quote > * >(argp1);
    ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FraRateHelper" "', argument " "2"" of type '" "Natural""'");
    } 
    arg2 = static_cast< Natural >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_IborIndexPtr,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FraRateHelper" "', argument " "3"" of type '" "IborIndexPtr const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FraRateHelper" "', argument " "3"" of type '" "IborIndexPtr const &""'"); 
    }
    arg3 = reinterpret_cast< IborIndexPtr * >(argp3);
    {
      try {
        result = (FraRateHelperPtr *)new_FraRateHelperPtr__SWIG_2((Handle< Quote > const &)*arg1,arg2,(IborIndexPtr const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FraRateHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FraRateHelper__SWIG_3) {
  {
    Rate arg1 ;
    Natural arg2 ;
    IborIndexPtr *arg3 = 0 ;
    double val1 ;
    int ecode1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    FraRateHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_FraRateHelper(rate,monthsToStart,index);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FraRateHelper" "', argument " "1"" of type '" "Rate""'");
    } 
    arg1 = static_cast< Rate >(val1);
    ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FraRateHelper" "', argument " "2"" of type '" "Natural""'");
    } 
    arg2 = static_cast< Natural >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_IborIndexPtr,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FraRateHelper" "', argument " "3"" of type '" "IborIndexPtr const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FraRateHelper" "', argument " "3"" of type '" "IborIndexPtr const &""'"); 
    }
    arg3 = reinterpret_cast< IborIndexPtr * >(argp3);
    {
      try {
        result = (FraRateHelperPtr *)new_FraRateHelperPtr__SWIG_3(arg1,arg2,(IborIndexPtr const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FraRateHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FraRateHelper) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_IborIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_IborIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 8) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 8) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FraRateHelper__SWIG_2); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FraRateHelper__SWIG_3); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FraRateHelper__SWIG_0); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FraRateHelper__SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded 'new_FraRateHelper'");
  XSRETURN(0);
}


XS(_wrap_delete_FraRateHelper) {
  {
    FraRateHelperPtr *arg1 = (FraRateHelperPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_FraRateHelper(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_FraRateHelperPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FraRateHelper" "', argument " "1"" of type '" "FraRateHelperPtr *""'"); 
    }
    arg1 = reinterpret_cast< FraRateHelperPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FuturesRateHelper__SWIG_0) {
  {
    Handle< Quote > *arg1 = 0 ;
    Date *arg2 = 0 ;
    Natural arg3 ;
    Calendar *arg4 = 0 ;
    BusinessDayConvention arg5 ;
    bool arg6 ;
    DayCounter *arg7 = 0 ;
    Handle< Quote > *arg8 = 0 ;
    Futures::Type arg9 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    unsigned int val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    bool val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    int val9 ;
    int ecode9 = 0 ;
    int argvi = 0;
    FuturesRateHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 9) || (items > 9)) {
      SWIG_croak("Usage: new_FuturesRateHelper(price,iborStartDate,nMonths,calendar,convention,endOfMonth,dayCounter,convexityAdjustment,type);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FuturesRateHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FuturesRateHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< Quote > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FuturesRateHelper" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FuturesRateHelper" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    ecode3 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_FuturesRateHelper" "', argument " "3"" of type '" "Natural""'");
    } 
    arg3 = static_cast< Natural >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FuturesRateHelper" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FuturesRateHelper" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    arg4 = reinterpret_cast< Calendar * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_FuturesRateHelper" "', argument " "5"" of type '" "BusinessDayConvention""'");
    } 
    arg5 = static_cast< BusinessDayConvention >(val5);
    ecode6 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_FuturesRateHelper" "', argument " "6"" of type '" "bool""'");
    } 
    arg6 = static_cast< bool >(val6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_FuturesRateHelper" "', argument " "7"" of type '" "DayCounter const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FuturesRateHelper" "', argument " "7"" of type '" "DayCounter const &""'"); 
    }
    arg7 = reinterpret_cast< DayCounter * >(argp7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_FuturesRateHelper" "', argument " "8"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FuturesRateHelper" "', argument " "8"" of type '" "Handle< Quote > const &""'"); 
    }
    arg8 = reinterpret_cast< Handle< Quote > * >(argp8);
    ecode9 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(8), &val9);
    if (!SWIG_IsOK(ecode9)) {
      SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "new_FuturesRateHelper" "', argument " "9"" of type '" "Futures::Type""'");
    } 
    arg9 = static_cast< Futures::Type >(val9);
    {
      try {
        result = (FuturesRateHelperPtr *)new_FuturesRateHelperPtr__SWIG_0((Handle< Quote > const &)*arg1,(Date const &)*arg2,arg3,(Calendar const &)*arg4,arg5,arg6,(DayCounter const &)*arg7,(Handle< Quote > const &)*arg8,arg9);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FuturesRateHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FuturesRateHelper__SWIG_1) {
  {
    Handle< Quote > *arg1 = 0 ;
    Date *arg2 = 0 ;
    Natural arg3 ;
    Calendar *arg4 = 0 ;
    BusinessDayConvention arg5 ;
    bool arg6 ;
    DayCounter *arg7 = 0 ;
    Handle< Quote > *arg8 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    unsigned int val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    bool val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    int argvi = 0;
    FuturesRateHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 8) || (items > 8)) {
      SWIG_croak("Usage: new_FuturesRateHelper(price,iborStartDate,nMonths,calendar,convention,endOfMonth,dayCounter,convexityAdjustment);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FuturesRateHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FuturesRateHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< Quote > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FuturesRateHelper" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FuturesRateHelper" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    ecode3 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_FuturesRateHelper" "', argument " "3"" of type '" "Natural""'");
    } 
    arg3 = static_cast< Natural >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FuturesRateHelper" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FuturesRateHelper" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    arg4 = reinterpret_cast< Calendar * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_FuturesRateHelper" "', argument " "5"" of type '" "BusinessDayConvention""'");
    } 
    arg5 = static_cast< BusinessDayConvention >(val5);
    ecode6 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_FuturesRateHelper" "', argument " "6"" of type '" "bool""'");
    } 
    arg6 = static_cast< bool >(val6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_FuturesRateHelper" "', argument " "7"" of type '" "DayCounter const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FuturesRateHelper" "', argument " "7"" of type '" "DayCounter const &""'"); 
    }
    arg7 = reinterpret_cast< DayCounter * >(argp7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_FuturesRateHelper" "', argument " "8"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FuturesRateHelper" "', argument " "8"" of type '" "Handle< Quote > const &""'"); 
    }
    arg8 = reinterpret_cast< Handle< Quote > * >(argp8);
    {
      try {
        result = (FuturesRateHelperPtr *)new_FuturesRateHelperPtr__SWIG_0((Handle< Quote > const &)*arg1,(Date const &)*arg2,arg3,(Calendar const &)*arg4,arg5,arg6,(DayCounter const &)*arg7,(Handle< Quote > const &)*arg8);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FuturesRateHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FuturesRateHelper__SWIG_2) {
  {
    Real arg1 ;
    Date *arg2 = 0 ;
    Natural arg3 ;
    Calendar *arg4 = 0 ;
    BusinessDayConvention arg5 ;
    bool arg6 ;
    DayCounter *arg7 = 0 ;
    Rate arg8 ;
    Futures::Type arg9 ;
    double val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    unsigned int val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    bool val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    double val8 ;
    int ecode8 = 0 ;
    int val9 ;
    int ecode9 = 0 ;
    int argvi = 0;
    FuturesRateHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 9) || (items > 9)) {
      SWIG_croak("Usage: new_FuturesRateHelper(price,iborStartDate,nMonths,calendar,convention,endOfMonth,dayCounter,convexityAdjustment,type);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FuturesRateHelper" "', argument " "1"" of type '" "Real""'");
    } 
    arg1 = static_cast< Real >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FuturesRateHelper" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FuturesRateHelper" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    ecode3 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_FuturesRateHelper" "', argument " "3"" of type '" "Natural""'");
    } 
    arg3 = static_cast< Natural >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FuturesRateHelper" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FuturesRateHelper" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    arg4 = reinterpret_cast< Calendar * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_FuturesRateHelper" "', argument " "5"" of type '" "BusinessDayConvention""'");
    } 
    arg5 = static_cast< BusinessDayConvention >(val5);
    ecode6 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_FuturesRateHelper" "', argument " "6"" of type '" "bool""'");
    } 
    arg6 = static_cast< bool >(val6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_FuturesRateHelper" "', argument " "7"" of type '" "DayCounter const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FuturesRateHelper" "', argument " "7"" of type '" "DayCounter const &""'"); 
    }
    arg7 = reinterpret_cast< DayCounter * >(argp7);
    ecode8 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_FuturesRateHelper" "', argument " "8"" of type '" "Rate""'");
    } 
    arg8 = static_cast< Rate >(val8);
    ecode9 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(8), &val9);
    if (!SWIG_IsOK(ecode9)) {
      SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "new_FuturesRateHelper" "', argument " "9"" of type '" "Futures::Type""'");
    } 
    arg9 = static_cast< Futures::Type >(val9);
    {
      try {
        result = (FuturesRateHelperPtr *)new_FuturesRateHelperPtr__SWIG_2(arg1,(Date const &)*arg2,arg3,(Calendar const &)*arg4,arg5,arg6,(DayCounter const &)*arg7,arg8,arg9);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FuturesRateHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FuturesRateHelper__SWIG_3) {
  {
    Real arg1 ;
    Date *arg2 = 0 ;
    Natural arg3 ;
    Calendar *arg4 = 0 ;
    BusinessDayConvention arg5 ;
    bool arg6 ;
    DayCounter *arg7 = 0 ;
    Rate arg8 ;
    double val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    unsigned int val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    bool val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    double val8 ;
    int ecode8 = 0 ;
    int argvi = 0;
    FuturesRateHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 8) || (items > 8)) {
      SWIG_croak("Usage: new_FuturesRateHelper(price,iborStartDate,nMonths,calendar,convention,endOfMonth,dayCounter,convexityAdjustment);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FuturesRateHelper" "', argument " "1"" of type '" "Real""'");
    } 
    arg1 = static_cast< Real >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FuturesRateHelper" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FuturesRateHelper" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    ecode3 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_FuturesRateHelper" "', argument " "3"" of type '" "Natural""'");
    } 
    arg3 = static_cast< Natural >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FuturesRateHelper" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FuturesRateHelper" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    arg4 = reinterpret_cast< Calendar * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_FuturesRateHelper" "', argument " "5"" of type '" "BusinessDayConvention""'");
    } 
    arg5 = static_cast< BusinessDayConvention >(val5);
    ecode6 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_FuturesRateHelper" "', argument " "6"" of type '" "bool""'");
    } 
    arg6 = static_cast< bool >(val6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_FuturesRateHelper" "', argument " "7"" of type '" "DayCounter const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FuturesRateHelper" "', argument " "7"" of type '" "DayCounter const &""'"); 
    }
    arg7 = reinterpret_cast< DayCounter * >(argp7);
    ecode8 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_FuturesRateHelper" "', argument " "8"" of type '" "Rate""'");
    } 
    arg8 = static_cast< Rate >(val8);
    {
      try {
        result = (FuturesRateHelperPtr *)new_FuturesRateHelperPtr__SWIG_2(arg1,(Date const &)*arg2,arg3,(Calendar const &)*arg4,arg5,arg6,(DayCounter const &)*arg7,arg8);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FuturesRateHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FuturesRateHelper__SWIG_4) {
  {
    Real arg1 ;
    Date *arg2 = 0 ;
    Natural arg3 ;
    Calendar *arg4 = 0 ;
    BusinessDayConvention arg5 ;
    bool arg6 ;
    DayCounter *arg7 = 0 ;
    double val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    unsigned int val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    bool val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    int argvi = 0;
    FuturesRateHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: new_FuturesRateHelper(price,iborStartDate,nMonths,calendar,convention,endOfMonth,dayCounter);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FuturesRateHelper" "', argument " "1"" of type '" "Real""'");
    } 
    arg1 = static_cast< Real >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FuturesRateHelper" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FuturesRateHelper" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    ecode3 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_FuturesRateHelper" "', argument " "3"" of type '" "Natural""'");
    } 
    arg3 = static_cast< Natural >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FuturesRateHelper" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FuturesRateHelper" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    arg4 = reinterpret_cast< Calendar * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_FuturesRateHelper" "', argument " "5"" of type '" "BusinessDayConvention""'");
    } 
    arg5 = static_cast< BusinessDayConvention >(val5);
    ecode6 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_FuturesRateHelper" "', argument " "6"" of type '" "bool""'");
    } 
    arg6 = static_cast< bool >(val6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_FuturesRateHelper" "', argument " "7"" of type '" "DayCounter const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FuturesRateHelper" "', argument " "7"" of type '" "DayCounter const &""'"); 
    }
    arg7 = reinterpret_cast< DayCounter * >(argp7);
    {
      try {
        result = (FuturesRateHelperPtr *)new_FuturesRateHelperPtr__SWIG_2(arg1,(Date const &)*arg2,arg3,(Calendar const &)*arg4,arg5,arg6,(DayCounter const &)*arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FuturesRateHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FuturesRateHelper__SWIG_5) {
  {
    Handle< Quote > *arg1 = 0 ;
    Date *arg2 = 0 ;
    Date *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    Handle< Quote > *arg5 = 0 ;
    Futures::Type arg6 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    FuturesRateHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_FuturesRateHelper(price,iborStartDate,iborEndDate,dayCounter,convexityAdjustment,type);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FuturesRateHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FuturesRateHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< Quote > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FuturesRateHelper" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FuturesRateHelper" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FuturesRateHelper" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FuturesRateHelper" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FuturesRateHelper" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FuturesRateHelper" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_FuturesRateHelper" "', argument " "5"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FuturesRateHelper" "', argument " "5"" of type '" "Handle< Quote > const &""'"); 
    }
    arg5 = reinterpret_cast< Handle< Quote > * >(argp5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_FuturesRateHelper" "', argument " "6"" of type '" "Futures::Type""'");
    } 
    arg6 = static_cast< Futures::Type >(val6);
    {
      try {
        result = (FuturesRateHelperPtr *)new_FuturesRateHelperPtr__SWIG_5((Handle< Quote > const &)*arg1,(Date const &)*arg2,(Date const &)*arg3,(DayCounter const &)*arg4,(Handle< Quote > const &)*arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FuturesRateHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FuturesRateHelper__SWIG_6) {
  {
    Handle< Quote > *arg1 = 0 ;
    Date *arg2 = 0 ;
    Date *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    Handle< Quote > *arg5 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int argvi = 0;
    FuturesRateHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_FuturesRateHelper(price,iborStartDate,iborEndDate,dayCounter,convexityAdjustment);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FuturesRateHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FuturesRateHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< Quote > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FuturesRateHelper" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FuturesRateHelper" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FuturesRateHelper" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FuturesRateHelper" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FuturesRateHelper" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FuturesRateHelper" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_FuturesRateHelper" "', argument " "5"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FuturesRateHelper" "', argument " "5"" of type '" "Handle< Quote > const &""'"); 
    }
    arg5 = reinterpret_cast< Handle< Quote > * >(argp5);
    {
      try {
        result = (FuturesRateHelperPtr *)new_FuturesRateHelperPtr__SWIG_5((Handle< Quote > const &)*arg1,(Date const &)*arg2,(Date const &)*arg3,(DayCounter const &)*arg4,(Handle< Quote > const &)*arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FuturesRateHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FuturesRateHelper__SWIG_7) {
  {
    Real arg1 ;
    Date *arg2 = 0 ;
    Date *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    Rate arg5 ;
    Futures::Type arg6 ;
    double val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    double val5 ;
    int ecode5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    FuturesRateHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_FuturesRateHelper(price,iborStartDate,iborEndDate,dayCounter,convexityAdjustment,type);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FuturesRateHelper" "', argument " "1"" of type '" "Real""'");
    } 
    arg1 = static_cast< Real >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FuturesRateHelper" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FuturesRateHelper" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FuturesRateHelper" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FuturesRateHelper" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FuturesRateHelper" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FuturesRateHelper" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_FuturesRateHelper" "', argument " "5"" of type '" "Rate""'");
    } 
    arg5 = static_cast< Rate >(val5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_FuturesRateHelper" "', argument " "6"" of type '" "Futures::Type""'");
    } 
    arg6 = static_cast< Futures::Type >(val6);
    {
      try {
        result = (FuturesRateHelperPtr *)new_FuturesRateHelperPtr__SWIG_7(arg1,(Date const &)*arg2,(Date const &)*arg3,(DayCounter const &)*arg4,arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FuturesRateHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FuturesRateHelper__SWIG_8) {
  {
    Real arg1 ;
    Date *arg2 = 0 ;
    Date *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    Rate arg5 ;
    double val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    double val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    FuturesRateHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_FuturesRateHelper(price,iborStartDate,iborEndDate,dayCounter,convexityAdjustment);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FuturesRateHelper" "', argument " "1"" of type '" "Real""'");
    } 
    arg1 = static_cast< Real >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FuturesRateHelper" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FuturesRateHelper" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FuturesRateHelper" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FuturesRateHelper" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FuturesRateHelper" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FuturesRateHelper" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_FuturesRateHelper" "', argument " "5"" of type '" "Rate""'");
    } 
    arg5 = static_cast< Rate >(val5);
    {
      try {
        result = (FuturesRateHelperPtr *)new_FuturesRateHelperPtr__SWIG_7(arg1,(Date const &)*arg2,(Date const &)*arg3,(DayCounter const &)*arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FuturesRateHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FuturesRateHelper__SWIG_9) {
  {
    Real arg1 ;
    Date *arg2 = 0 ;
    Date *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    double val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int argvi = 0;
    FuturesRateHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_FuturesRateHelper(price,iborStartDate,iborEndDate,dayCounter);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FuturesRateHelper" "', argument " "1"" of type '" "Real""'");
    } 
    arg1 = static_cast< Real >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FuturesRateHelper" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FuturesRateHelper" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FuturesRateHelper" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FuturesRateHelper" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FuturesRateHelper" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FuturesRateHelper" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    {
      try {
        result = (FuturesRateHelperPtr *)new_FuturesRateHelperPtr__SWIG_7(arg1,(Date const &)*arg2,(Date const &)*arg3,(DayCounter const &)*arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FuturesRateHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FuturesRateHelper__SWIG_10) {
  {
    Handle< Quote > *arg1 = 0 ;
    Date *arg2 = 0 ;
    IborIndexPtr *arg3 = 0 ;
    Handle< Quote > *arg4 = 0 ;
    Futures::Type arg5 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    FuturesRateHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_FuturesRateHelper(price,iborStartDate,index,convexityAdjustment,type);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FuturesRateHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FuturesRateHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< Quote > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FuturesRateHelper" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FuturesRateHelper" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_IborIndexPtr,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FuturesRateHelper" "', argument " "3"" of type '" "IborIndexPtr const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FuturesRateHelper" "', argument " "3"" of type '" "IborIndexPtr const &""'"); 
    }
    arg3 = reinterpret_cast< IborIndexPtr * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FuturesRateHelper" "', argument " "4"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FuturesRateHelper" "', argument " "4"" of type '" "Handle< Quote > const &""'"); 
    }
    arg4 = reinterpret_cast< Handle< Quote > * >(argp4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_FuturesRateHelper" "', argument " "5"" of type '" "Futures::Type""'");
    } 
    arg5 = static_cast< Futures::Type >(val5);
    {
      try {
        result = (FuturesRateHelperPtr *)new_FuturesRateHelperPtr__SWIG_10((Handle< Quote > const &)*arg1,(Date const &)*arg2,(IborIndexPtr const &)*arg3,(Handle< Quote > const &)*arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FuturesRateHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FuturesRateHelper__SWIG_11) {
  {
    Handle< Quote > *arg1 = 0 ;
    Date *arg2 = 0 ;
    IborIndexPtr *arg3 = 0 ;
    Handle< Quote > *arg4 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int argvi = 0;
    FuturesRateHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_FuturesRateHelper(price,iborStartDate,index,convexityAdjustment);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FuturesRateHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FuturesRateHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< Quote > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FuturesRateHelper" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FuturesRateHelper" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_IborIndexPtr,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FuturesRateHelper" "', argument " "3"" of type '" "IborIndexPtr const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FuturesRateHelper" "', argument " "3"" of type '" "IborIndexPtr const &""'"); 
    }
    arg3 = reinterpret_cast< IborIndexPtr * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FuturesRateHelper" "', argument " "4"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FuturesRateHelper" "', argument " "4"" of type '" "Handle< Quote > const &""'"); 
    }
    arg4 = reinterpret_cast< Handle< Quote > * >(argp4);
    {
      try {
        result = (FuturesRateHelperPtr *)new_FuturesRateHelperPtr__SWIG_10((Handle< Quote > const &)*arg1,(Date const &)*arg2,(IborIndexPtr const &)*arg3,(Handle< Quote > const &)*arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FuturesRateHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FuturesRateHelper__SWIG_12) {
  {
    Real arg1 ;
    Date *arg2 = 0 ;
    IborIndexPtr *arg3 = 0 ;
    Real arg4 ;
    Futures::Type arg5 ;
    double val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    FuturesRateHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_FuturesRateHelper(price,iborStartDate,index,convexityAdjustment,type);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FuturesRateHelper" "', argument " "1"" of type '" "Real""'");
    } 
    arg1 = static_cast< Real >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FuturesRateHelper" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FuturesRateHelper" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_IborIndexPtr,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FuturesRateHelper" "', argument " "3"" of type '" "IborIndexPtr const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FuturesRateHelper" "', argument " "3"" of type '" "IborIndexPtr const &""'"); 
    }
    arg3 = reinterpret_cast< IborIndexPtr * >(argp3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_FuturesRateHelper" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_FuturesRateHelper" "', argument " "5"" of type '" "Futures::Type""'");
    } 
    arg5 = static_cast< Futures::Type >(val5);
    {
      try {
        result = (FuturesRateHelperPtr *)new_FuturesRateHelperPtr__SWIG_12(arg1,(Date const &)*arg2,(IborIndexPtr const &)*arg3,arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FuturesRateHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FuturesRateHelper__SWIG_13) {
  {
    Real arg1 ;
    Date *arg2 = 0 ;
    IborIndexPtr *arg3 = 0 ;
    Real arg4 ;
    double val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    FuturesRateHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_FuturesRateHelper(price,iborStartDate,index,convexityAdjustment);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FuturesRateHelper" "', argument " "1"" of type '" "Real""'");
    } 
    arg1 = static_cast< Real >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FuturesRateHelper" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FuturesRateHelper" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_IborIndexPtr,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FuturesRateHelper" "', argument " "3"" of type '" "IborIndexPtr const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FuturesRateHelper" "', argument " "3"" of type '" "IborIndexPtr const &""'"); 
    }
    arg3 = reinterpret_cast< IborIndexPtr * >(argp3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_FuturesRateHelper" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    {
      try {
        result = (FuturesRateHelperPtr *)new_FuturesRateHelperPtr__SWIG_12(arg1,(Date const &)*arg2,(IborIndexPtr const &)*arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FuturesRateHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FuturesRateHelper__SWIG_14) {
  {
    Real arg1 ;
    Date *arg2 = 0 ;
    IborIndexPtr *arg3 = 0 ;
    double val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    FuturesRateHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_FuturesRateHelper(price,iborStartDate,index);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FuturesRateHelper" "', argument " "1"" of type '" "Real""'");
    } 
    arg1 = static_cast< Real >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FuturesRateHelper" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FuturesRateHelper" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_IborIndexPtr,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FuturesRateHelper" "', argument " "3"" of type '" "IborIndexPtr const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FuturesRateHelper" "', argument " "3"" of type '" "IborIndexPtr const &""'"); 
    }
    arg3 = reinterpret_cast< IborIndexPtr * >(argp3);
    {
      try {
        result = (FuturesRateHelperPtr *)new_FuturesRateHelperPtr__SWIG_12(arg1,(Date const &)*arg2,(IborIndexPtr const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FuturesRateHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FuturesRateHelper) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_IborIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_IborIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_IborIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_IborIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 7;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_7:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_IborIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 8;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_8:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 9;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_9:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 10;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_10:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 11;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_11:
    
    if (items == 8) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 12;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_12:
    
    if (items == 8) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_13;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_13;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_13;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_13;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_13;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_13;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_13;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_13;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 13;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_13:
    
    if (items == 9) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_14;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_14;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_14;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_14;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_14;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_14;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_14;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_14;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(8), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_14;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 14;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_14:
    
    if (items == 9) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_15;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_15;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_15;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_15;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_15;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_15;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_15;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_15;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(8), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_15;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 15;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_15:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FuturesRateHelper__SWIG_14); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FuturesRateHelper__SWIG_11); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FuturesRateHelper__SWIG_13); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FuturesRateHelper__SWIG_9); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FuturesRateHelper__SWIG_6); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FuturesRateHelper__SWIG_10); return;
    case 7:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FuturesRateHelper__SWIG_8); return;
    case 8:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FuturesRateHelper__SWIG_12); return;
    case 9:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FuturesRateHelper__SWIG_5); return;
    case 10:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FuturesRateHelper__SWIG_7); return;
    case 11:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FuturesRateHelper__SWIG_4); return;
    case 12:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FuturesRateHelper__SWIG_1); return;
    case 13:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FuturesRateHelper__SWIG_3); return;
    case 14:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FuturesRateHelper__SWIG_0); return;
    case 15:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FuturesRateHelper__SWIG_2); return;
    }
  }
  
  croak("No matching function for overloaded 'new_FuturesRateHelper'");
  XSRETURN(0);
}


XS(_wrap_delete_FuturesRateHelper) {
  {
    FuturesRateHelperPtr *arg1 = (FuturesRateHelperPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_FuturesRateHelper(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_FuturesRateHelperPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FuturesRateHelper" "', argument " "1"" of type '" "FuturesRateHelperPtr *""'"); 
    }
    arg1 = reinterpret_cast< FuturesRateHelperPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SwapRateHelper__SWIG_0) {
  {
    Handle< Quote > *arg1 = 0 ;
    Period *arg2 = 0 ;
    Calendar *arg3 = 0 ;
    Frequency arg4 ;
    BusinessDayConvention arg5 ;
    DayCounter *arg6 = 0 ;
    IborIndexPtr *arg7 = 0 ;
    Handle< Quote > *arg8 = 0 ;
    Period *arg9 = 0 ;
    Handle< YieldTermStructure > *arg10 = 0 ;
    Natural arg11 ;
    Pillar::Choice arg12 ;
    Date arg13 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    void *argp10 ;
    int res10 = 0 ;
    unsigned int val11 ;
    int ecode11 = 0 ;
    int val12 ;
    int ecode12 = 0 ;
    void *argp13 ;
    int res13 = 0 ;
    int argvi = 0;
    SwapRateHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 13) || (items > 13)) {
      SWIG_croak("Usage: new_SwapRateHelper(rate,tenor,calendar,fixedFrequency,fixedConvention,fixedDayCount,index,spread,fwdStart,discountingCurve,settlementDays,pillar,customPillarDate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SwapRateHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< Quote > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SwapRateHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    arg2 = reinterpret_cast< Period * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_SwapRateHelper" "', argument " "3"" of type '" "Calendar const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "3"" of type '" "Calendar const &""'"); 
    }
    arg3 = reinterpret_cast< Calendar * >(argp3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_SwapRateHelper" "', argument " "4"" of type '" "Frequency""'");
    } 
    arg4 = static_cast< Frequency >(val4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_SwapRateHelper" "', argument " "5"" of type '" "BusinessDayConvention""'");
    } 
    arg5 = static_cast< BusinessDayConvention >(val5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_SwapRateHelper" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    arg6 = reinterpret_cast< DayCounter * >(argp6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_IborIndexPtr,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_SwapRateHelper" "', argument " "7"" of type '" "IborIndexPtr const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "7"" of type '" "IborIndexPtr const &""'"); 
    }
    arg7 = reinterpret_cast< IborIndexPtr * >(argp7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_SwapRateHelper" "', argument " "8"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "8"" of type '" "Handle< Quote > const &""'"); 
    }
    arg8 = reinterpret_cast< Handle< Quote > * >(argp8);
    res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res9)) {
      SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_SwapRateHelper" "', argument " "9"" of type '" "Period const &""'"); 
    }
    if (!argp9) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "9"" of type '" "Period const &""'"); 
    }
    arg9 = reinterpret_cast< Period * >(argp9);
    res10 = SWIG_ConvertPtr(ST(9), &argp10, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res10)) {
      SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "new_SwapRateHelper" "', argument " "10"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp10) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "10"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg10 = reinterpret_cast< Handle< YieldTermStructure > * >(argp10);
    ecode11 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(10), &val11);
    if (!SWIG_IsOK(ecode11)) {
      SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "new_SwapRateHelper" "', argument " "11"" of type '" "Natural""'");
    } 
    arg11 = static_cast< Natural >(val11);
    ecode12 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(11), &val12);
    if (!SWIG_IsOK(ecode12)) {
      SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "new_SwapRateHelper" "', argument " "12"" of type '" "Pillar::Choice""'");
    } 
    arg12 = static_cast< Pillar::Choice >(val12);
    {
      res13 = SWIG_ConvertPtr(ST(12), &argp13, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res13)) {
        SWIG_exception_fail(SWIG_ArgError(res13), "in method '" "new_SwapRateHelper" "', argument " "13"" of type '" "Date""'"); 
      }  
      if (!argp13) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "13"" of type '" "Date""'");
      } else {
        arg13 = *(reinterpret_cast< Date * >(argp13));
      }
    }
    {
      try {
        result = (SwapRateHelperPtr *)new_SwapRateHelperPtr__SWIG_0((Handle< Quote > const &)*arg1,(Period const &)*arg2,(Calendar const &)*arg3,arg4,arg5,(DayCounter const &)*arg6,(IborIndexPtr const &)*arg7,(Handle< Quote > const &)*arg8,(Period const &)*arg9,(Handle< YieldTermStructure > const &)*arg10,arg11,arg12,arg13);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SwapRateHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SwapRateHelper__SWIG_1) {
  {
    Handle< Quote > *arg1 = 0 ;
    Period *arg2 = 0 ;
    Calendar *arg3 = 0 ;
    Frequency arg4 ;
    BusinessDayConvention arg5 ;
    DayCounter *arg6 = 0 ;
    IborIndexPtr *arg7 = 0 ;
    Handle< Quote > *arg8 = 0 ;
    Period *arg9 = 0 ;
    Handle< YieldTermStructure > *arg10 = 0 ;
    Natural arg11 ;
    Pillar::Choice arg12 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    void *argp10 ;
    int res10 = 0 ;
    unsigned int val11 ;
    int ecode11 = 0 ;
    int val12 ;
    int ecode12 = 0 ;
    int argvi = 0;
    SwapRateHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 12) || (items > 12)) {
      SWIG_croak("Usage: new_SwapRateHelper(rate,tenor,calendar,fixedFrequency,fixedConvention,fixedDayCount,index,spread,fwdStart,discountingCurve,settlementDays,pillar);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SwapRateHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< Quote > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SwapRateHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    arg2 = reinterpret_cast< Period * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_SwapRateHelper" "', argument " "3"" of type '" "Calendar const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "3"" of type '" "Calendar const &""'"); 
    }
    arg3 = reinterpret_cast< Calendar * >(argp3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_SwapRateHelper" "', argument " "4"" of type '" "Frequency""'");
    } 
    arg4 = static_cast< Frequency >(val4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_SwapRateHelper" "', argument " "5"" of type '" "BusinessDayConvention""'");
    } 
    arg5 = static_cast< BusinessDayConvention >(val5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_SwapRateHelper" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    arg6 = reinterpret_cast< DayCounter * >(argp6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_IborIndexPtr,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_SwapRateHelper" "', argument " "7"" of type '" "IborIndexPtr const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "7"" of type '" "IborIndexPtr const &""'"); 
    }
    arg7 = reinterpret_cast< IborIndexPtr * >(argp7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_SwapRateHelper" "', argument " "8"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "8"" of type '" "Handle< Quote > const &""'"); 
    }
    arg8 = reinterpret_cast< Handle< Quote > * >(argp8);
    res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res9)) {
      SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_SwapRateHelper" "', argument " "9"" of type '" "Period const &""'"); 
    }
    if (!argp9) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "9"" of type '" "Period const &""'"); 
    }
    arg9 = reinterpret_cast< Period * >(argp9);
    res10 = SWIG_ConvertPtr(ST(9), &argp10, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res10)) {
      SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "new_SwapRateHelper" "', argument " "10"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp10) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "10"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg10 = reinterpret_cast< Handle< YieldTermStructure > * >(argp10);
    ecode11 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(10), &val11);
    if (!SWIG_IsOK(ecode11)) {
      SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "new_SwapRateHelper" "', argument " "11"" of type '" "Natural""'");
    } 
    arg11 = static_cast< Natural >(val11);
    ecode12 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(11), &val12);
    if (!SWIG_IsOK(ecode12)) {
      SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "new_SwapRateHelper" "', argument " "12"" of type '" "Pillar::Choice""'");
    } 
    arg12 = static_cast< Pillar::Choice >(val12);
    {
      try {
        result = (SwapRateHelperPtr *)new_SwapRateHelperPtr__SWIG_0((Handle< Quote > const &)*arg1,(Period const &)*arg2,(Calendar const &)*arg3,arg4,arg5,(DayCounter const &)*arg6,(IborIndexPtr const &)*arg7,(Handle< Quote > const &)*arg8,(Period const &)*arg9,(Handle< YieldTermStructure > const &)*arg10,arg11,arg12);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SwapRateHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SwapRateHelper__SWIG_2) {
  {
    Handle< Quote > *arg1 = 0 ;
    Period *arg2 = 0 ;
    Calendar *arg3 = 0 ;
    Frequency arg4 ;
    BusinessDayConvention arg5 ;
    DayCounter *arg6 = 0 ;
    IborIndexPtr *arg7 = 0 ;
    Handle< Quote > *arg8 = 0 ;
    Period *arg9 = 0 ;
    Handle< YieldTermStructure > *arg10 = 0 ;
    Natural arg11 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    void *argp10 ;
    int res10 = 0 ;
    unsigned int val11 ;
    int ecode11 = 0 ;
    int argvi = 0;
    SwapRateHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 11) || (items > 11)) {
      SWIG_croak("Usage: new_SwapRateHelper(rate,tenor,calendar,fixedFrequency,fixedConvention,fixedDayCount,index,spread,fwdStart,discountingCurve,settlementDays);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SwapRateHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< Quote > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SwapRateHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    arg2 = reinterpret_cast< Period * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_SwapRateHelper" "', argument " "3"" of type '" "Calendar const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "3"" of type '" "Calendar const &""'"); 
    }
    arg3 = reinterpret_cast< Calendar * >(argp3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_SwapRateHelper" "', argument " "4"" of type '" "Frequency""'");
    } 
    arg4 = static_cast< Frequency >(val4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_SwapRateHelper" "', argument " "5"" of type '" "BusinessDayConvention""'");
    } 
    arg5 = static_cast< BusinessDayConvention >(val5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_SwapRateHelper" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    arg6 = reinterpret_cast< DayCounter * >(argp6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_IborIndexPtr,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_SwapRateHelper" "', argument " "7"" of type '" "IborIndexPtr const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "7"" of type '" "IborIndexPtr const &""'"); 
    }
    arg7 = reinterpret_cast< IborIndexPtr * >(argp7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_SwapRateHelper" "', argument " "8"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "8"" of type '" "Handle< Quote > const &""'"); 
    }
    arg8 = reinterpret_cast< Handle< Quote > * >(argp8);
    res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res9)) {
      SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_SwapRateHelper" "', argument " "9"" of type '" "Period const &""'"); 
    }
    if (!argp9) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "9"" of type '" "Period const &""'"); 
    }
    arg9 = reinterpret_cast< Period * >(argp9);
    res10 = SWIG_ConvertPtr(ST(9), &argp10, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res10)) {
      SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "new_SwapRateHelper" "', argument " "10"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp10) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "10"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg10 = reinterpret_cast< Handle< YieldTermStructure > * >(argp10);
    ecode11 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(10), &val11);
    if (!SWIG_IsOK(ecode11)) {
      SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "new_SwapRateHelper" "', argument " "11"" of type '" "Natural""'");
    } 
    arg11 = static_cast< Natural >(val11);
    {
      try {
        result = (SwapRateHelperPtr *)new_SwapRateHelperPtr__SWIG_0((Handle< Quote > const &)*arg1,(Period const &)*arg2,(Calendar const &)*arg3,arg4,arg5,(DayCounter const &)*arg6,(IborIndexPtr const &)*arg7,(Handle< Quote > const &)*arg8,(Period const &)*arg9,(Handle< YieldTermStructure > const &)*arg10,arg11);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SwapRateHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SwapRateHelper__SWIG_3) {
  {
    Handle< Quote > *arg1 = 0 ;
    Period *arg2 = 0 ;
    Calendar *arg3 = 0 ;
    Frequency arg4 ;
    BusinessDayConvention arg5 ;
    DayCounter *arg6 = 0 ;
    IborIndexPtr *arg7 = 0 ;
    Handle< Quote > *arg8 = 0 ;
    Period *arg9 = 0 ;
    Handle< YieldTermStructure > *arg10 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    void *argp10 ;
    int res10 = 0 ;
    int argvi = 0;
    SwapRateHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 10) || (items > 10)) {
      SWIG_croak("Usage: new_SwapRateHelper(rate,tenor,calendar,fixedFrequency,fixedConvention,fixedDayCount,index,spread,fwdStart,discountingCurve);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SwapRateHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< Quote > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SwapRateHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    arg2 = reinterpret_cast< Period * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_SwapRateHelper" "', argument " "3"" of type '" "Calendar const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "3"" of type '" "Calendar const &""'"); 
    }
    arg3 = reinterpret_cast< Calendar * >(argp3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_SwapRateHelper" "', argument " "4"" of type '" "Frequency""'");
    } 
    arg4 = static_cast< Frequency >(val4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_SwapRateHelper" "', argument " "5"" of type '" "BusinessDayConvention""'");
    } 
    arg5 = static_cast< BusinessDayConvention >(val5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_SwapRateHelper" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    arg6 = reinterpret_cast< DayCounter * >(argp6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_IborIndexPtr,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_SwapRateHelper" "', argument " "7"" of type '" "IborIndexPtr const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "7"" of type '" "IborIndexPtr const &""'"); 
    }
    arg7 = reinterpret_cast< IborIndexPtr * >(argp7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_SwapRateHelper" "', argument " "8"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "8"" of type '" "Handle< Quote > const &""'"); 
    }
    arg8 = reinterpret_cast< Handle< Quote > * >(argp8);
    res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res9)) {
      SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_SwapRateHelper" "', argument " "9"" of type '" "Period const &""'"); 
    }
    if (!argp9) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "9"" of type '" "Period const &""'"); 
    }
    arg9 = reinterpret_cast< Period * >(argp9);
    res10 = SWIG_ConvertPtr(ST(9), &argp10, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res10)) {
      SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "new_SwapRateHelper" "', argument " "10"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp10) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "10"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg10 = reinterpret_cast< Handle< YieldTermStructure > * >(argp10);
    {
      try {
        result = (SwapRateHelperPtr *)new_SwapRateHelperPtr__SWIG_0((Handle< Quote > const &)*arg1,(Period const &)*arg2,(Calendar const &)*arg3,arg4,arg5,(DayCounter const &)*arg6,(IborIndexPtr const &)*arg7,(Handle< Quote > const &)*arg8,(Period const &)*arg9,(Handle< YieldTermStructure > const &)*arg10);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SwapRateHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SwapRateHelper__SWIG_4) {
  {
    Handle< Quote > *arg1 = 0 ;
    Period *arg2 = 0 ;
    Calendar *arg3 = 0 ;
    Frequency arg4 ;
    BusinessDayConvention arg5 ;
    DayCounter *arg6 = 0 ;
    IborIndexPtr *arg7 = 0 ;
    Handle< Quote > *arg8 = 0 ;
    Period *arg9 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    int argvi = 0;
    SwapRateHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 9) || (items > 9)) {
      SWIG_croak("Usage: new_SwapRateHelper(rate,tenor,calendar,fixedFrequency,fixedConvention,fixedDayCount,index,spread,fwdStart);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SwapRateHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< Quote > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SwapRateHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    arg2 = reinterpret_cast< Period * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_SwapRateHelper" "', argument " "3"" of type '" "Calendar const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "3"" of type '" "Calendar const &""'"); 
    }
    arg3 = reinterpret_cast< Calendar * >(argp3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_SwapRateHelper" "', argument " "4"" of type '" "Frequency""'");
    } 
    arg4 = static_cast< Frequency >(val4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_SwapRateHelper" "', argument " "5"" of type '" "BusinessDayConvention""'");
    } 
    arg5 = static_cast< BusinessDayConvention >(val5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_SwapRateHelper" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    arg6 = reinterpret_cast< DayCounter * >(argp6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_IborIndexPtr,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_SwapRateHelper" "', argument " "7"" of type '" "IborIndexPtr const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "7"" of type '" "IborIndexPtr const &""'"); 
    }
    arg7 = reinterpret_cast< IborIndexPtr * >(argp7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_SwapRateHelper" "', argument " "8"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "8"" of type '" "Handle< Quote > const &""'"); 
    }
    arg8 = reinterpret_cast< Handle< Quote > * >(argp8);
    res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res9)) {
      SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_SwapRateHelper" "', argument " "9"" of type '" "Period const &""'"); 
    }
    if (!argp9) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "9"" of type '" "Period const &""'"); 
    }
    arg9 = reinterpret_cast< Period * >(argp9);
    {
      try {
        result = (SwapRateHelperPtr *)new_SwapRateHelperPtr__SWIG_0((Handle< Quote > const &)*arg1,(Period const &)*arg2,(Calendar const &)*arg3,arg4,arg5,(DayCounter const &)*arg6,(IborIndexPtr const &)*arg7,(Handle< Quote > const &)*arg8,(Period const &)*arg9);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SwapRateHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SwapRateHelper__SWIG_5) {
  {
    Handle< Quote > *arg1 = 0 ;
    Period *arg2 = 0 ;
    Calendar *arg3 = 0 ;
    Frequency arg4 ;
    BusinessDayConvention arg5 ;
    DayCounter *arg6 = 0 ;
    IborIndexPtr *arg7 = 0 ;
    Handle< Quote > *arg8 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    int argvi = 0;
    SwapRateHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 8) || (items > 8)) {
      SWIG_croak("Usage: new_SwapRateHelper(rate,tenor,calendar,fixedFrequency,fixedConvention,fixedDayCount,index,spread);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SwapRateHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< Quote > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SwapRateHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    arg2 = reinterpret_cast< Period * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_SwapRateHelper" "', argument " "3"" of type '" "Calendar const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "3"" of type '" "Calendar const &""'"); 
    }
    arg3 = reinterpret_cast< Calendar * >(argp3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_SwapRateHelper" "', argument " "4"" of type '" "Frequency""'");
    } 
    arg4 = static_cast< Frequency >(val4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_SwapRateHelper" "', argument " "5"" of type '" "BusinessDayConvention""'");
    } 
    arg5 = static_cast< BusinessDayConvention >(val5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_SwapRateHelper" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    arg6 = reinterpret_cast< DayCounter * >(argp6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_IborIndexPtr,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_SwapRateHelper" "', argument " "7"" of type '" "IborIndexPtr const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "7"" of type '" "IborIndexPtr const &""'"); 
    }
    arg7 = reinterpret_cast< IborIndexPtr * >(argp7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_SwapRateHelper" "', argument " "8"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "8"" of type '" "Handle< Quote > const &""'"); 
    }
    arg8 = reinterpret_cast< Handle< Quote > * >(argp8);
    {
      try {
        result = (SwapRateHelperPtr *)new_SwapRateHelperPtr__SWIG_0((Handle< Quote > const &)*arg1,(Period const &)*arg2,(Calendar const &)*arg3,arg4,arg5,(DayCounter const &)*arg6,(IborIndexPtr const &)*arg7,(Handle< Quote > const &)*arg8);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SwapRateHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SwapRateHelper__SWIG_6) {
  {
    Handle< Quote > *arg1 = 0 ;
    Period *arg2 = 0 ;
    Calendar *arg3 = 0 ;
    Frequency arg4 ;
    BusinessDayConvention arg5 ;
    DayCounter *arg6 = 0 ;
    IborIndexPtr *arg7 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    int argvi = 0;
    SwapRateHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: new_SwapRateHelper(rate,tenor,calendar,fixedFrequency,fixedConvention,fixedDayCount,index);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SwapRateHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< Quote > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SwapRateHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    arg2 = reinterpret_cast< Period * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_SwapRateHelper" "', argument " "3"" of type '" "Calendar const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "3"" of type '" "Calendar const &""'"); 
    }
    arg3 = reinterpret_cast< Calendar * >(argp3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_SwapRateHelper" "', argument " "4"" of type '" "Frequency""'");
    } 
    arg4 = static_cast< Frequency >(val4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_SwapRateHelper" "', argument " "5"" of type '" "BusinessDayConvention""'");
    } 
    arg5 = static_cast< BusinessDayConvention >(val5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_SwapRateHelper" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    arg6 = reinterpret_cast< DayCounter * >(argp6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_IborIndexPtr,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_SwapRateHelper" "', argument " "7"" of type '" "IborIndexPtr const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "7"" of type '" "IborIndexPtr const &""'"); 
    }
    arg7 = reinterpret_cast< IborIndexPtr * >(argp7);
    {
      try {
        result = (SwapRateHelperPtr *)new_SwapRateHelperPtr__SWIG_0((Handle< Quote > const &)*arg1,(Period const &)*arg2,(Calendar const &)*arg3,arg4,arg5,(DayCounter const &)*arg6,(IborIndexPtr const &)*arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SwapRateHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SwapRateHelper__SWIG_7) {
  {
    Rate arg1 ;
    Period *arg2 = 0 ;
    Calendar *arg3 = 0 ;
    Frequency arg4 ;
    BusinessDayConvention arg5 ;
    DayCounter *arg6 = 0 ;
    IborIndexPtr *arg7 = 0 ;
    Handle< Quote > *arg8 = 0 ;
    Period *arg9 = 0 ;
    Handle< YieldTermStructure > *arg10 = 0 ;
    Natural arg11 ;
    Pillar::Choice arg12 ;
    Date arg13 ;
    double val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    void *argp10 ;
    int res10 = 0 ;
    unsigned int val11 ;
    int ecode11 = 0 ;
    int val12 ;
    int ecode12 = 0 ;
    void *argp13 ;
    int res13 = 0 ;
    int argvi = 0;
    SwapRateHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 13) || (items > 13)) {
      SWIG_croak("Usage: new_SwapRateHelper(rate,tenor,calendar,fixedFrequency,fixedConvention,fixedDayCount,index,spread,fwdStart,discountingCurve,settlementDays,pillar,customPillarDate);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_SwapRateHelper" "', argument " "1"" of type '" "Rate""'");
    } 
    arg1 = static_cast< Rate >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SwapRateHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    arg2 = reinterpret_cast< Period * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_SwapRateHelper" "', argument " "3"" of type '" "Calendar const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "3"" of type '" "Calendar const &""'"); 
    }
    arg3 = reinterpret_cast< Calendar * >(argp3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_SwapRateHelper" "', argument " "4"" of type '" "Frequency""'");
    } 
    arg4 = static_cast< Frequency >(val4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_SwapRateHelper" "', argument " "5"" of type '" "BusinessDayConvention""'");
    } 
    arg5 = static_cast< BusinessDayConvention >(val5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_SwapRateHelper" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    arg6 = reinterpret_cast< DayCounter * >(argp6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_IborIndexPtr,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_SwapRateHelper" "', argument " "7"" of type '" "IborIndexPtr const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "7"" of type '" "IborIndexPtr const &""'"); 
    }
    arg7 = reinterpret_cast< IborIndexPtr * >(argp7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_SwapRateHelper" "', argument " "8"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "8"" of type '" "Handle< Quote > const &""'"); 
    }
    arg8 = reinterpret_cast< Handle< Quote > * >(argp8);
    res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res9)) {
      SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_SwapRateHelper" "', argument " "9"" of type '" "Period const &""'"); 
    }
    if (!argp9) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "9"" of type '" "Period const &""'"); 
    }
    arg9 = reinterpret_cast< Period * >(argp9);
    res10 = SWIG_ConvertPtr(ST(9), &argp10, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res10)) {
      SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "new_SwapRateHelper" "', argument " "10"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp10) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "10"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg10 = reinterpret_cast< Handle< YieldTermStructure > * >(argp10);
    ecode11 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(10), &val11);
    if (!SWIG_IsOK(ecode11)) {
      SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "new_SwapRateHelper" "', argument " "11"" of type '" "Natural""'");
    } 
    arg11 = static_cast< Natural >(val11);
    ecode12 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(11), &val12);
    if (!SWIG_IsOK(ecode12)) {
      SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "new_SwapRateHelper" "', argument " "12"" of type '" "Pillar::Choice""'");
    } 
    arg12 = static_cast< Pillar::Choice >(val12);
    {
      res13 = SWIG_ConvertPtr(ST(12), &argp13, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res13)) {
        SWIG_exception_fail(SWIG_ArgError(res13), "in method '" "new_SwapRateHelper" "', argument " "13"" of type '" "Date""'"); 
      }  
      if (!argp13) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "13"" of type '" "Date""'");
      } else {
        arg13 = *(reinterpret_cast< Date * >(argp13));
      }
    }
    {
      try {
        result = (SwapRateHelperPtr *)new_SwapRateHelperPtr__SWIG_7(arg1,(Period const &)*arg2,(Calendar const &)*arg3,arg4,arg5,(DayCounter const &)*arg6,(IborIndexPtr const &)*arg7,(Handle< Quote > const &)*arg8,(Period const &)*arg9,(Handle< YieldTermStructure > const &)*arg10,arg11,arg12,arg13);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SwapRateHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SwapRateHelper__SWIG_8) {
  {
    Rate arg1 ;
    Period *arg2 = 0 ;
    Calendar *arg3 = 0 ;
    Frequency arg4 ;
    BusinessDayConvention arg5 ;
    DayCounter *arg6 = 0 ;
    IborIndexPtr *arg7 = 0 ;
    Handle< Quote > *arg8 = 0 ;
    Period *arg9 = 0 ;
    Handle< YieldTermStructure > *arg10 = 0 ;
    Natural arg11 ;
    Pillar::Choice arg12 ;
    double val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    void *argp10 ;
    int res10 = 0 ;
    unsigned int val11 ;
    int ecode11 = 0 ;
    int val12 ;
    int ecode12 = 0 ;
    int argvi = 0;
    SwapRateHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 12) || (items > 12)) {
      SWIG_croak("Usage: new_SwapRateHelper(rate,tenor,calendar,fixedFrequency,fixedConvention,fixedDayCount,index,spread,fwdStart,discountingCurve,settlementDays,pillar);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_SwapRateHelper" "', argument " "1"" of type '" "Rate""'");
    } 
    arg1 = static_cast< Rate >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SwapRateHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    arg2 = reinterpret_cast< Period * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_SwapRateHelper" "', argument " "3"" of type '" "Calendar const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "3"" of type '" "Calendar const &""'"); 
    }
    arg3 = reinterpret_cast< Calendar * >(argp3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_SwapRateHelper" "', argument " "4"" of type '" "Frequency""'");
    } 
    arg4 = static_cast< Frequency >(val4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_SwapRateHelper" "', argument " "5"" of type '" "BusinessDayConvention""'");
    } 
    arg5 = static_cast< BusinessDayConvention >(val5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_SwapRateHelper" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    arg6 = reinterpret_cast< DayCounter * >(argp6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_IborIndexPtr,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_SwapRateHelper" "', argument " "7"" of type '" "IborIndexPtr const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "7"" of type '" "IborIndexPtr const &""'"); 
    }
    arg7 = reinterpret_cast< IborIndexPtr * >(argp7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_SwapRateHelper" "', argument " "8"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "8"" of type '" "Handle< Quote > const &""'"); 
    }
    arg8 = reinterpret_cast< Handle< Quote > * >(argp8);
    res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res9)) {
      SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_SwapRateHelper" "', argument " "9"" of type '" "Period const &""'"); 
    }
    if (!argp9) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "9"" of type '" "Period const &""'"); 
    }
    arg9 = reinterpret_cast< Period * >(argp9);
    res10 = SWIG_ConvertPtr(ST(9), &argp10, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res10)) {
      SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "new_SwapRateHelper" "', argument " "10"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp10) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "10"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg10 = reinterpret_cast< Handle< YieldTermStructure > * >(argp10);
    ecode11 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(10), &val11);
    if (!SWIG_IsOK(ecode11)) {
      SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "new_SwapRateHelper" "', argument " "11"" of type '" "Natural""'");
    } 
    arg11 = static_cast< Natural >(val11);
    ecode12 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(11), &val12);
    if (!SWIG_IsOK(ecode12)) {
      SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "new_SwapRateHelper" "', argument " "12"" of type '" "Pillar::Choice""'");
    } 
    arg12 = static_cast< Pillar::Choice >(val12);
    {
      try {
        result = (SwapRateHelperPtr *)new_SwapRateHelperPtr__SWIG_7(arg1,(Period const &)*arg2,(Calendar const &)*arg3,arg4,arg5,(DayCounter const &)*arg6,(IborIndexPtr const &)*arg7,(Handle< Quote > const &)*arg8,(Period const &)*arg9,(Handle< YieldTermStructure > const &)*arg10,arg11,arg12);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SwapRateHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SwapRateHelper__SWIG_9) {
  {
    Rate arg1 ;
    Period *arg2 = 0 ;
    Calendar *arg3 = 0 ;
    Frequency arg4 ;
    BusinessDayConvention arg5 ;
    DayCounter *arg6 = 0 ;
    IborIndexPtr *arg7 = 0 ;
    Handle< Quote > *arg8 = 0 ;
    Period *arg9 = 0 ;
    Handle< YieldTermStructure > *arg10 = 0 ;
    Natural arg11 ;
    double val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    void *argp10 ;
    int res10 = 0 ;
    unsigned int val11 ;
    int ecode11 = 0 ;
    int argvi = 0;
    SwapRateHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 11) || (items > 11)) {
      SWIG_croak("Usage: new_SwapRateHelper(rate,tenor,calendar,fixedFrequency,fixedConvention,fixedDayCount,index,spread,fwdStart,discountingCurve,settlementDays);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_SwapRateHelper" "', argument " "1"" of type '" "Rate""'");
    } 
    arg1 = static_cast< Rate >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SwapRateHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    arg2 = reinterpret_cast< Period * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_SwapRateHelper" "', argument " "3"" of type '" "Calendar const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "3"" of type '" "Calendar const &""'"); 
    }
    arg3 = reinterpret_cast< Calendar * >(argp3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_SwapRateHelper" "', argument " "4"" of type '" "Frequency""'");
    } 
    arg4 = static_cast< Frequency >(val4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_SwapRateHelper" "', argument " "5"" of type '" "BusinessDayConvention""'");
    } 
    arg5 = static_cast< BusinessDayConvention >(val5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_SwapRateHelper" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    arg6 = reinterpret_cast< DayCounter * >(argp6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_IborIndexPtr,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_SwapRateHelper" "', argument " "7"" of type '" "IborIndexPtr const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "7"" of type '" "IborIndexPtr const &""'"); 
    }
    arg7 = reinterpret_cast< IborIndexPtr * >(argp7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_SwapRateHelper" "', argument " "8"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "8"" of type '" "Handle< Quote > const &""'"); 
    }
    arg8 = reinterpret_cast< Handle< Quote > * >(argp8);
    res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res9)) {
      SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_SwapRateHelper" "', argument " "9"" of type '" "Period const &""'"); 
    }
    if (!argp9) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "9"" of type '" "Period const &""'"); 
    }
    arg9 = reinterpret_cast< Period * >(argp9);
    res10 = SWIG_ConvertPtr(ST(9), &argp10, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res10)) {
      SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "new_SwapRateHelper" "', argument " "10"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp10) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "10"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg10 = reinterpret_cast< Handle< YieldTermStructure > * >(argp10);
    ecode11 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(10), &val11);
    if (!SWIG_IsOK(ecode11)) {
      SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "new_SwapRateHelper" "', argument " "11"" of type '" "Natural""'");
    } 
    arg11 = static_cast< Natural >(val11);
    {
      try {
        result = (SwapRateHelperPtr *)new_SwapRateHelperPtr__SWIG_7(arg1,(Period const &)*arg2,(Calendar const &)*arg3,arg4,arg5,(DayCounter const &)*arg6,(IborIndexPtr const &)*arg7,(Handle< Quote > const &)*arg8,(Period const &)*arg9,(Handle< YieldTermStructure > const &)*arg10,arg11);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SwapRateHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SwapRateHelper__SWIG_10) {
  {
    Rate arg1 ;
    Period *arg2 = 0 ;
    Calendar *arg3 = 0 ;
    Frequency arg4 ;
    BusinessDayConvention arg5 ;
    DayCounter *arg6 = 0 ;
    IborIndexPtr *arg7 = 0 ;
    Handle< Quote > *arg8 = 0 ;
    Period *arg9 = 0 ;
    Handle< YieldTermStructure > *arg10 = 0 ;
    double val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    void *argp10 ;
    int res10 = 0 ;
    int argvi = 0;
    SwapRateHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 10) || (items > 10)) {
      SWIG_croak("Usage: new_SwapRateHelper(rate,tenor,calendar,fixedFrequency,fixedConvention,fixedDayCount,index,spread,fwdStart,discountingCurve);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_SwapRateHelper" "', argument " "1"" of type '" "Rate""'");
    } 
    arg1 = static_cast< Rate >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SwapRateHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    arg2 = reinterpret_cast< Period * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_SwapRateHelper" "', argument " "3"" of type '" "Calendar const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "3"" of type '" "Calendar const &""'"); 
    }
    arg3 = reinterpret_cast< Calendar * >(argp3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_SwapRateHelper" "', argument " "4"" of type '" "Frequency""'");
    } 
    arg4 = static_cast< Frequency >(val4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_SwapRateHelper" "', argument " "5"" of type '" "BusinessDayConvention""'");
    } 
    arg5 = static_cast< BusinessDayConvention >(val5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_SwapRateHelper" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    arg6 = reinterpret_cast< DayCounter * >(argp6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_IborIndexPtr,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_SwapRateHelper" "', argument " "7"" of type '" "IborIndexPtr const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "7"" of type '" "IborIndexPtr const &""'"); 
    }
    arg7 = reinterpret_cast< IborIndexPtr * >(argp7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_SwapRateHelper" "', argument " "8"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "8"" of type '" "Handle< Quote > const &""'"); 
    }
    arg8 = reinterpret_cast< Handle< Quote > * >(argp8);
    res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res9)) {
      SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_SwapRateHelper" "', argument " "9"" of type '" "Period const &""'"); 
    }
    if (!argp9) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "9"" of type '" "Period const &""'"); 
    }
    arg9 = reinterpret_cast< Period * >(argp9);
    res10 = SWIG_ConvertPtr(ST(9), &argp10, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res10)) {
      SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "new_SwapRateHelper" "', argument " "10"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp10) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "10"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg10 = reinterpret_cast< Handle< YieldTermStructure > * >(argp10);
    {
      try {
        result = (SwapRateHelperPtr *)new_SwapRateHelperPtr__SWIG_7(arg1,(Period const &)*arg2,(Calendar const &)*arg3,arg4,arg5,(DayCounter const &)*arg6,(IborIndexPtr const &)*arg7,(Handle< Quote > const &)*arg8,(Period const &)*arg9,(Handle< YieldTermStructure > const &)*arg10);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SwapRateHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SwapRateHelper__SWIG_11) {
  {
    Rate arg1 ;
    Period *arg2 = 0 ;
    Calendar *arg3 = 0 ;
    Frequency arg4 ;
    BusinessDayConvention arg5 ;
    DayCounter *arg6 = 0 ;
    IborIndexPtr *arg7 = 0 ;
    Handle< Quote > *arg8 = 0 ;
    Period *arg9 = 0 ;
    double val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    int argvi = 0;
    SwapRateHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 9) || (items > 9)) {
      SWIG_croak("Usage: new_SwapRateHelper(rate,tenor,calendar,fixedFrequency,fixedConvention,fixedDayCount,index,spread,fwdStart);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_SwapRateHelper" "', argument " "1"" of type '" "Rate""'");
    } 
    arg1 = static_cast< Rate >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SwapRateHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    arg2 = reinterpret_cast< Period * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_SwapRateHelper" "', argument " "3"" of type '" "Calendar const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "3"" of type '" "Calendar const &""'"); 
    }
    arg3 = reinterpret_cast< Calendar * >(argp3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_SwapRateHelper" "', argument " "4"" of type '" "Frequency""'");
    } 
    arg4 = static_cast< Frequency >(val4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_SwapRateHelper" "', argument " "5"" of type '" "BusinessDayConvention""'");
    } 
    arg5 = static_cast< BusinessDayConvention >(val5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_SwapRateHelper" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    arg6 = reinterpret_cast< DayCounter * >(argp6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_IborIndexPtr,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_SwapRateHelper" "', argument " "7"" of type '" "IborIndexPtr const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "7"" of type '" "IborIndexPtr const &""'"); 
    }
    arg7 = reinterpret_cast< IborIndexPtr * >(argp7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_SwapRateHelper" "', argument " "8"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "8"" of type '" "Handle< Quote > const &""'"); 
    }
    arg8 = reinterpret_cast< Handle< Quote > * >(argp8);
    res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res9)) {
      SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_SwapRateHelper" "', argument " "9"" of type '" "Period const &""'"); 
    }
    if (!argp9) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "9"" of type '" "Period const &""'"); 
    }
    arg9 = reinterpret_cast< Period * >(argp9);
    {
      try {
        result = (SwapRateHelperPtr *)new_SwapRateHelperPtr__SWIG_7(arg1,(Period const &)*arg2,(Calendar const &)*arg3,arg4,arg5,(DayCounter const &)*arg6,(IborIndexPtr const &)*arg7,(Handle< Quote > const &)*arg8,(Period const &)*arg9);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SwapRateHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SwapRateHelper__SWIG_12) {
  {
    Rate arg1 ;
    Period *arg2 = 0 ;
    Calendar *arg3 = 0 ;
    Frequency arg4 ;
    BusinessDayConvention arg5 ;
    DayCounter *arg6 = 0 ;
    IborIndexPtr *arg7 = 0 ;
    Handle< Quote > *arg8 = 0 ;
    double val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    int argvi = 0;
    SwapRateHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 8) || (items > 8)) {
      SWIG_croak("Usage: new_SwapRateHelper(rate,tenor,calendar,fixedFrequency,fixedConvention,fixedDayCount,index,spread);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_SwapRateHelper" "', argument " "1"" of type '" "Rate""'");
    } 
    arg1 = static_cast< Rate >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SwapRateHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    arg2 = reinterpret_cast< Period * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_SwapRateHelper" "', argument " "3"" of type '" "Calendar const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "3"" of type '" "Calendar const &""'"); 
    }
    arg3 = reinterpret_cast< Calendar * >(argp3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_SwapRateHelper" "', argument " "4"" of type '" "Frequency""'");
    } 
    arg4 = static_cast< Frequency >(val4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_SwapRateHelper" "', argument " "5"" of type '" "BusinessDayConvention""'");
    } 
    arg5 = static_cast< BusinessDayConvention >(val5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_SwapRateHelper" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    arg6 = reinterpret_cast< DayCounter * >(argp6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_IborIndexPtr,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_SwapRateHelper" "', argument " "7"" of type '" "IborIndexPtr const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "7"" of type '" "IborIndexPtr const &""'"); 
    }
    arg7 = reinterpret_cast< IborIndexPtr * >(argp7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_SwapRateHelper" "', argument " "8"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "8"" of type '" "Handle< Quote > const &""'"); 
    }
    arg8 = reinterpret_cast< Handle< Quote > * >(argp8);
    {
      try {
        result = (SwapRateHelperPtr *)new_SwapRateHelperPtr__SWIG_7(arg1,(Period const &)*arg2,(Calendar const &)*arg3,arg4,arg5,(DayCounter const &)*arg6,(IborIndexPtr const &)*arg7,(Handle< Quote > const &)*arg8);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SwapRateHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SwapRateHelper__SWIG_13) {
  {
    Rate arg1 ;
    Period *arg2 = 0 ;
    Calendar *arg3 = 0 ;
    Frequency arg4 ;
    BusinessDayConvention arg5 ;
    DayCounter *arg6 = 0 ;
    IborIndexPtr *arg7 = 0 ;
    double val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    int argvi = 0;
    SwapRateHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: new_SwapRateHelper(rate,tenor,calendar,fixedFrequency,fixedConvention,fixedDayCount,index);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_SwapRateHelper" "', argument " "1"" of type '" "Rate""'");
    } 
    arg1 = static_cast< Rate >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SwapRateHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    arg2 = reinterpret_cast< Period * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_SwapRateHelper" "', argument " "3"" of type '" "Calendar const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "3"" of type '" "Calendar const &""'"); 
    }
    arg3 = reinterpret_cast< Calendar * >(argp3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_SwapRateHelper" "', argument " "4"" of type '" "Frequency""'");
    } 
    arg4 = static_cast< Frequency >(val4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_SwapRateHelper" "', argument " "5"" of type '" "BusinessDayConvention""'");
    } 
    arg5 = static_cast< BusinessDayConvention >(val5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_SwapRateHelper" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    arg6 = reinterpret_cast< DayCounter * >(argp6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_IborIndexPtr,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_SwapRateHelper" "', argument " "7"" of type '" "IborIndexPtr const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "7"" of type '" "IborIndexPtr const &""'"); 
    }
    arg7 = reinterpret_cast< IborIndexPtr * >(argp7);
    {
      try {
        result = (SwapRateHelperPtr *)new_SwapRateHelperPtr__SWIG_7(arg1,(Period const &)*arg2,(Calendar const &)*arg3,arg4,arg5,(DayCounter const &)*arg6,(IborIndexPtr const &)*arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SwapRateHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SwapRateHelper__SWIG_14) {
  {
    Handle< Quote > *arg1 = 0 ;
    SwapIndexPtr *arg2 = 0 ;
    Handle< Quote > *arg3 = 0 ;
    Period *arg4 = 0 ;
    Handle< YieldTermStructure > *arg5 = 0 ;
    Pillar::Choice arg6 ;
    Date arg7 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    int argvi = 0;
    SwapRateHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: new_SwapRateHelper(rate,index,spread,fwdStart,discountingCurve,pillar,customPillarDate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SwapRateHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< Quote > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_SwapIndexPtr,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SwapRateHelper" "', argument " "2"" of type '" "SwapIndexPtr const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "2"" of type '" "SwapIndexPtr const &""'"); 
    }
    arg2 = reinterpret_cast< SwapIndexPtr * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_SwapRateHelper" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< Quote > * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_SwapRateHelper" "', argument " "4"" of type '" "Period const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "4"" of type '" "Period const &""'"); 
    }
    arg4 = reinterpret_cast< Period * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_SwapRateHelper" "', argument " "5"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "5"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg5 = reinterpret_cast< Handle< YieldTermStructure > * >(argp5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_SwapRateHelper" "', argument " "6"" of type '" "Pillar::Choice""'");
    } 
    arg6 = static_cast< Pillar::Choice >(val6);
    {
      res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res7)) {
        SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_SwapRateHelper" "', argument " "7"" of type '" "Date""'"); 
      }  
      if (!argp7) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "7"" of type '" "Date""'");
      } else {
        arg7 = *(reinterpret_cast< Date * >(argp7));
      }
    }
    {
      try {
        result = (SwapRateHelperPtr *)new_SwapRateHelperPtr__SWIG_14((Handle< Quote > const &)*arg1,(SwapIndexPtr const &)*arg2,(Handle< Quote > const &)*arg3,(Period const &)*arg4,(Handle< YieldTermStructure > const &)*arg5,arg6,arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SwapRateHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SwapRateHelper__SWIG_15) {
  {
    Handle< Quote > *arg1 = 0 ;
    SwapIndexPtr *arg2 = 0 ;
    Handle< Quote > *arg3 = 0 ;
    Period *arg4 = 0 ;
    Handle< YieldTermStructure > *arg5 = 0 ;
    Pillar::Choice arg6 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    SwapRateHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_SwapRateHelper(rate,index,spread,fwdStart,discountingCurve,pillar);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SwapRateHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< Quote > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_SwapIndexPtr,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SwapRateHelper" "', argument " "2"" of type '" "SwapIndexPtr const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "2"" of type '" "SwapIndexPtr const &""'"); 
    }
    arg2 = reinterpret_cast< SwapIndexPtr * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_SwapRateHelper" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< Quote > * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_SwapRateHelper" "', argument " "4"" of type '" "Period const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "4"" of type '" "Period const &""'"); 
    }
    arg4 = reinterpret_cast< Period * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_SwapRateHelper" "', argument " "5"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "5"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg5 = reinterpret_cast< Handle< YieldTermStructure > * >(argp5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_SwapRateHelper" "', argument " "6"" of type '" "Pillar::Choice""'");
    } 
    arg6 = static_cast< Pillar::Choice >(val6);
    {
      try {
        result = (SwapRateHelperPtr *)new_SwapRateHelperPtr__SWIG_14((Handle< Quote > const &)*arg1,(SwapIndexPtr const &)*arg2,(Handle< Quote > const &)*arg3,(Period const &)*arg4,(Handle< YieldTermStructure > const &)*arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SwapRateHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SwapRateHelper__SWIG_16) {
  {
    Handle< Quote > *arg1 = 0 ;
    SwapIndexPtr *arg2 = 0 ;
    Handle< Quote > *arg3 = 0 ;
    Period *arg4 = 0 ;
    Handle< YieldTermStructure > *arg5 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int argvi = 0;
    SwapRateHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_SwapRateHelper(rate,index,spread,fwdStart,discountingCurve);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SwapRateHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< Quote > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_SwapIndexPtr,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SwapRateHelper" "', argument " "2"" of type '" "SwapIndexPtr const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "2"" of type '" "SwapIndexPtr const &""'"); 
    }
    arg2 = reinterpret_cast< SwapIndexPtr * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_SwapRateHelper" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< Quote > * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_SwapRateHelper" "', argument " "4"" of type '" "Period const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "4"" of type '" "Period const &""'"); 
    }
    arg4 = reinterpret_cast< Period * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_SwapRateHelper" "', argument " "5"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "5"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg5 = reinterpret_cast< Handle< YieldTermStructure > * >(argp5);
    {
      try {
        result = (SwapRateHelperPtr *)new_SwapRateHelperPtr__SWIG_14((Handle< Quote > const &)*arg1,(SwapIndexPtr const &)*arg2,(Handle< Quote > const &)*arg3,(Period const &)*arg4,(Handle< YieldTermStructure > const &)*arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SwapRateHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SwapRateHelper__SWIG_17) {
  {
    Handle< Quote > *arg1 = 0 ;
    SwapIndexPtr *arg2 = 0 ;
    Handle< Quote > *arg3 = 0 ;
    Period *arg4 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int argvi = 0;
    SwapRateHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_SwapRateHelper(rate,index,spread,fwdStart);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SwapRateHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< Quote > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_SwapIndexPtr,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SwapRateHelper" "', argument " "2"" of type '" "SwapIndexPtr const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "2"" of type '" "SwapIndexPtr const &""'"); 
    }
    arg2 = reinterpret_cast< SwapIndexPtr * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_SwapRateHelper" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< Quote > * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_SwapRateHelper" "', argument " "4"" of type '" "Period const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "4"" of type '" "Period const &""'"); 
    }
    arg4 = reinterpret_cast< Period * >(argp4);
    {
      try {
        result = (SwapRateHelperPtr *)new_SwapRateHelperPtr__SWIG_14((Handle< Quote > const &)*arg1,(SwapIndexPtr const &)*arg2,(Handle< Quote > const &)*arg3,(Period const &)*arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SwapRateHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SwapRateHelper__SWIG_18) {
  {
    Handle< Quote > *arg1 = 0 ;
    SwapIndexPtr *arg2 = 0 ;
    Handle< Quote > *arg3 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    SwapRateHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_SwapRateHelper(rate,index,spread);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SwapRateHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< Quote > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_SwapIndexPtr,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SwapRateHelper" "', argument " "2"" of type '" "SwapIndexPtr const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "2"" of type '" "SwapIndexPtr const &""'"); 
    }
    arg2 = reinterpret_cast< SwapIndexPtr * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_SwapRateHelper" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< Quote > * >(argp3);
    {
      try {
        result = (SwapRateHelperPtr *)new_SwapRateHelperPtr__SWIG_14((Handle< Quote > const &)*arg1,(SwapIndexPtr const &)*arg2,(Handle< Quote > const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SwapRateHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SwapRateHelper__SWIG_19) {
  {
    Handle< Quote > *arg1 = 0 ;
    SwapIndexPtr *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    SwapRateHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_SwapRateHelper(rate,index);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SwapRateHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< Quote > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_SwapIndexPtr,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SwapRateHelper" "', argument " "2"" of type '" "SwapIndexPtr const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "2"" of type '" "SwapIndexPtr const &""'"); 
    }
    arg2 = reinterpret_cast< SwapIndexPtr * >(argp2);
    {
      try {
        result = (SwapRateHelperPtr *)new_SwapRateHelperPtr__SWIG_14((Handle< Quote > const &)*arg1,(SwapIndexPtr const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SwapRateHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SwapRateHelper__SWIG_20) {
  {
    Rate arg1 ;
    SwapIndexPtr *arg2 = 0 ;
    Handle< Quote > *arg3 = 0 ;
    Period *arg4 = 0 ;
    Handle< YieldTermStructure > *arg5 = 0 ;
    Pillar::Choice arg6 ;
    Date arg7 ;
    double val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    int argvi = 0;
    SwapRateHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: new_SwapRateHelper(rate,index,spread,fwdStart,discountingCurve,pillar,customPillarDate);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_SwapRateHelper" "', argument " "1"" of type '" "Rate""'");
    } 
    arg1 = static_cast< Rate >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_SwapIndexPtr,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SwapRateHelper" "', argument " "2"" of type '" "SwapIndexPtr const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "2"" of type '" "SwapIndexPtr const &""'"); 
    }
    arg2 = reinterpret_cast< SwapIndexPtr * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_SwapRateHelper" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< Quote > * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_SwapRateHelper" "', argument " "4"" of type '" "Period const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "4"" of type '" "Period const &""'"); 
    }
    arg4 = reinterpret_cast< Period * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_SwapRateHelper" "', argument " "5"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "5"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg5 = reinterpret_cast< Handle< YieldTermStructure > * >(argp5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_SwapRateHelper" "', argument " "6"" of type '" "Pillar::Choice""'");
    } 
    arg6 = static_cast< Pillar::Choice >(val6);
    {
      res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res7)) {
        SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_SwapRateHelper" "', argument " "7"" of type '" "Date""'"); 
      }  
      if (!argp7) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "7"" of type '" "Date""'");
      } else {
        arg7 = *(reinterpret_cast< Date * >(argp7));
      }
    }
    {
      try {
        result = (SwapRateHelperPtr *)new_SwapRateHelperPtr__SWIG_20(arg1,(SwapIndexPtr const &)*arg2,(Handle< Quote > const &)*arg3,(Period const &)*arg4,(Handle< YieldTermStructure > const &)*arg5,arg6,arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SwapRateHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SwapRateHelper__SWIG_21) {
  {
    Rate arg1 ;
    SwapIndexPtr *arg2 = 0 ;
    Handle< Quote > *arg3 = 0 ;
    Period *arg4 = 0 ;
    Handle< YieldTermStructure > *arg5 = 0 ;
    Pillar::Choice arg6 ;
    double val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    SwapRateHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_SwapRateHelper(rate,index,spread,fwdStart,discountingCurve,pillar);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_SwapRateHelper" "', argument " "1"" of type '" "Rate""'");
    } 
    arg1 = static_cast< Rate >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_SwapIndexPtr,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SwapRateHelper" "', argument " "2"" of type '" "SwapIndexPtr const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "2"" of type '" "SwapIndexPtr const &""'"); 
    }
    arg2 = reinterpret_cast< SwapIndexPtr * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_SwapRateHelper" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< Quote > * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_SwapRateHelper" "', argument " "4"" of type '" "Period const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "4"" of type '" "Period const &""'"); 
    }
    arg4 = reinterpret_cast< Period * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_SwapRateHelper" "', argument " "5"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "5"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg5 = reinterpret_cast< Handle< YieldTermStructure > * >(argp5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_SwapRateHelper" "', argument " "6"" of type '" "Pillar::Choice""'");
    } 
    arg6 = static_cast< Pillar::Choice >(val6);
    {
      try {
        result = (SwapRateHelperPtr *)new_SwapRateHelperPtr__SWIG_20(arg1,(SwapIndexPtr const &)*arg2,(Handle< Quote > const &)*arg3,(Period const &)*arg4,(Handle< YieldTermStructure > const &)*arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SwapRateHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SwapRateHelper__SWIG_22) {
  {
    Rate arg1 ;
    SwapIndexPtr *arg2 = 0 ;
    Handle< Quote > *arg3 = 0 ;
    Period *arg4 = 0 ;
    Handle< YieldTermStructure > *arg5 = 0 ;
    double val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int argvi = 0;
    SwapRateHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_SwapRateHelper(rate,index,spread,fwdStart,discountingCurve);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_SwapRateHelper" "', argument " "1"" of type '" "Rate""'");
    } 
    arg1 = static_cast< Rate >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_SwapIndexPtr,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SwapRateHelper" "', argument " "2"" of type '" "SwapIndexPtr const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "2"" of type '" "SwapIndexPtr const &""'"); 
    }
    arg2 = reinterpret_cast< SwapIndexPtr * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_SwapRateHelper" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< Quote > * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_SwapRateHelper" "', argument " "4"" of type '" "Period const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "4"" of type '" "Period const &""'"); 
    }
    arg4 = reinterpret_cast< Period * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_SwapRateHelper" "', argument " "5"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "5"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg5 = reinterpret_cast< Handle< YieldTermStructure > * >(argp5);
    {
      try {
        result = (SwapRateHelperPtr *)new_SwapRateHelperPtr__SWIG_20(arg1,(SwapIndexPtr const &)*arg2,(Handle< Quote > const &)*arg3,(Period const &)*arg4,(Handle< YieldTermStructure > const &)*arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SwapRateHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SwapRateHelper__SWIG_23) {
  {
    Rate arg1 ;
    SwapIndexPtr *arg2 = 0 ;
    Handle< Quote > *arg3 = 0 ;
    Period *arg4 = 0 ;
    double val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int argvi = 0;
    SwapRateHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_SwapRateHelper(rate,index,spread,fwdStart);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_SwapRateHelper" "', argument " "1"" of type '" "Rate""'");
    } 
    arg1 = static_cast< Rate >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_SwapIndexPtr,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SwapRateHelper" "', argument " "2"" of type '" "SwapIndexPtr const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "2"" of type '" "SwapIndexPtr const &""'"); 
    }
    arg2 = reinterpret_cast< SwapIndexPtr * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_SwapRateHelper" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< Quote > * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_SwapRateHelper" "', argument " "4"" of type '" "Period const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "4"" of type '" "Period const &""'"); 
    }
    arg4 = reinterpret_cast< Period * >(argp4);
    {
      try {
        result = (SwapRateHelperPtr *)new_SwapRateHelperPtr__SWIG_20(arg1,(SwapIndexPtr const &)*arg2,(Handle< Quote > const &)*arg3,(Period const &)*arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SwapRateHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SwapRateHelper__SWIG_24) {
  {
    Rate arg1 ;
    SwapIndexPtr *arg2 = 0 ;
    Handle< Quote > *arg3 = 0 ;
    double val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    SwapRateHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_SwapRateHelper(rate,index,spread);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_SwapRateHelper" "', argument " "1"" of type '" "Rate""'");
    } 
    arg1 = static_cast< Rate >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_SwapIndexPtr,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SwapRateHelper" "', argument " "2"" of type '" "SwapIndexPtr const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "2"" of type '" "SwapIndexPtr const &""'"); 
    }
    arg2 = reinterpret_cast< SwapIndexPtr * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_SwapRateHelper" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< Quote > * >(argp3);
    {
      try {
        result = (SwapRateHelperPtr *)new_SwapRateHelperPtr__SWIG_20(arg1,(SwapIndexPtr const &)*arg2,(Handle< Quote > const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SwapRateHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SwapRateHelper__SWIG_25) {
  {
    Rate arg1 ;
    SwapIndexPtr *arg2 = 0 ;
    double val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    SwapRateHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_SwapRateHelper(rate,index);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_SwapRateHelper" "', argument " "1"" of type '" "Rate""'");
    } 
    arg1 = static_cast< Rate >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_SwapIndexPtr,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SwapRateHelper" "', argument " "2"" of type '" "SwapIndexPtr const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SwapRateHelper" "', argument " "2"" of type '" "SwapIndexPtr const &""'"); 
    }
    arg2 = reinterpret_cast< SwapIndexPtr * >(argp2);
    {
      try {
        result = (SwapRateHelperPtr *)new_SwapRateHelperPtr__SWIG_20(arg1,(SwapIndexPtr const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SwapRateHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SwapRateHelper) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_SwapIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_SwapIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_SwapIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_SwapIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_SwapIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_SwapIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_SwapIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 7;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_7:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_SwapIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 8;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_8:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_SwapIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 9;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_9:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_SwapIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 10;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_10:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_IborIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 11;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_11:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_SwapIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 12;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_12:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_13;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_SwapIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_13;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_13;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_13;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_13;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_13;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_13;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 13;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_13:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_14;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_14;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_14;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_14;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_14;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_14;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_IborIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_14;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 14;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_14:
    
    if (items == 8) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_15;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_15;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_15;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_15;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_15;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_15;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_IborIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_15;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_15;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 15;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_15:
    
    if (items == 8) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_16;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_16;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_16;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_16;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_16;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_16;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_IborIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_16;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_16;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 16;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_16:
    
    if (items == 9) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_17;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_17;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_17;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_17;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_17;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_17;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_IborIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_17;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_17;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_17;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 17;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_17:
    
    if (items == 9) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_18;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_18;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_18;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_18;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_18;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_18;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_IborIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_18;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_18;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_18;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 18;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_18:
    
    if (items == 10) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_19;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_19;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_19;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_19;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_19;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_19;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_IborIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_19;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_19;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_19;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(9), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_19;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 19;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_19:
    
    if (items == 10) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_20;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_20;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_20;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_20;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_20;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_20;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_IborIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_20;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_20;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_20;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(9), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_20;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 20;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_20:
    
    if (items == 11) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_21;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_21;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_21;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_21;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_21;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_21;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_IborIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_21;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_21;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_21;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(9), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_21;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(10), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_21;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 21;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_21:
    
    if (items == 11) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_22;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_22;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_22;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_22;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_22;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_22;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_IborIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_22;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_22;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_22;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(9), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_22;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(10), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_22;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 22;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_22:
    
    if (items == 12) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_23;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_23;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_23;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_23;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_23;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_23;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_IborIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_23;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_23;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_23;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(9), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_23;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(10), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_23;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(11), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_23;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 23;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_23:
    
    if (items == 12) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_24;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_24;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_24;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_24;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_24;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_24;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_IborIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_24;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_24;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_24;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(9), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_24;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(10), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_24;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(11), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_24;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 24;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_24:
    
    if (items == 13) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_25;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_25;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_25;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_25;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_25;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_25;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_IborIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_25;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_25;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_25;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(9), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_25;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(10), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_25;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(11), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_25;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(12), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_25;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 25;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_25:
    
    if (items == 13) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_26;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_26;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_26;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_26;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_26;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_26;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_IborIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_26;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_26;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_26;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(9), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_26;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(10), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_26;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(11), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_26;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(12), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_26;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 26;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_26:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SwapRateHelper__SWIG_19); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SwapRateHelper__SWIG_25); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SwapRateHelper__SWIG_18); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SwapRateHelper__SWIG_24); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SwapRateHelper__SWIG_17); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SwapRateHelper__SWIG_23); return;
    case 7:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SwapRateHelper__SWIG_16); return;
    case 8:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SwapRateHelper__SWIG_22); return;
    case 9:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SwapRateHelper__SWIG_15); return;
    case 10:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SwapRateHelper__SWIG_21); return;
    case 11:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SwapRateHelper__SWIG_6); return;
    case 12:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SwapRateHelper__SWIG_14); return;
    case 13:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SwapRateHelper__SWIG_20); return;
    case 14:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SwapRateHelper__SWIG_13); return;
    case 15:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SwapRateHelper__SWIG_5); return;
    case 16:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SwapRateHelper__SWIG_12); return;
    case 17:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SwapRateHelper__SWIG_4); return;
    case 18:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SwapRateHelper__SWIG_11); return;
    case 19:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SwapRateHelper__SWIG_3); return;
    case 20:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SwapRateHelper__SWIG_10); return;
    case 21:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SwapRateHelper__SWIG_2); return;
    case 22:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SwapRateHelper__SWIG_9); return;
    case 23:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SwapRateHelper__SWIG_1); return;
    case 24:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SwapRateHelper__SWIG_8); return;
    case 25:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SwapRateHelper__SWIG_0); return;
    case 26:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SwapRateHelper__SWIG_7); return;
    }
  }
  
  croak("No matching function for overloaded 'new_SwapRateHelper'");
  XSRETURN(0);
}


XS(_wrap_SwapRateHelper_swap) {
  {
    SwapRateHelperPtr *arg1 = (SwapRateHelperPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    SwigValueWrapper< VanillaSwapPtr > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: SwapRateHelper_swap(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SwapRateHelperPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwapRateHelper_swap" "', argument " "1"" of type '" "SwapRateHelperPtr *""'"); 
    }
    arg1 = reinterpret_cast< SwapRateHelperPtr * >(argp1);
    {
      try {
        result = SwapRateHelperPtr_swap(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new VanillaSwapPtr(static_cast< const VanillaSwapPtr& >(result))), SWIGTYPE_p_VanillaSwapPtr, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_SwapRateHelper) {
  {
    SwapRateHelperPtr *arg1 = (SwapRateHelperPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_SwapRateHelper(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SwapRateHelperPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SwapRateHelper" "', argument " "1"" of type '" "SwapRateHelperPtr *""'"); 
    }
    arg1 = reinterpret_cast< SwapRateHelperPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BondHelper__SWIG_0) {
  {
    Handle< Quote > *arg1 = 0 ;
    BondPtr *arg2 = 0 ;
    bool arg3 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    BondHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_BondHelper(cleanPrice,bond,useCleanPrice);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_BondHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BondHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< Quote > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_BondHelper" "', argument " "2"" of type '" "BondPtr const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BondHelper" "', argument " "2"" of type '" "BondPtr const &""'"); 
    }
    arg2 = reinterpret_cast< BondPtr * >(argp2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_BondHelper" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (BondHelperPtr *)new_BondHelperPtr__SWIG_0((Handle< Quote > const &)*arg1,(BondPtr const &)*arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BondHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BondHelper__SWIG_1) {
  {
    Handle< Quote > *arg1 = 0 ;
    BondPtr *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    BondHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_BondHelper(cleanPrice,bond);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_BondHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BondHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< Quote > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_BondPtr,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_BondHelper" "', argument " "2"" of type '" "BondPtr const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BondHelper" "', argument " "2"" of type '" "BondPtr const &""'"); 
    }
    arg2 = reinterpret_cast< BondPtr * >(argp2);
    {
      try {
        result = (BondHelperPtr *)new_BondHelperPtr__SWIG_0((Handle< Quote > const &)*arg1,(BondPtr const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BondHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BondHelper) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_BondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_BondHelper__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_BondHelper__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_BondHelper'");
  XSRETURN(0);
}


XS(_wrap_BondHelper_bond) {
  {
    BondHelperPtr *arg1 = (BondHelperPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    SwigValueWrapper< BondPtr > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BondHelper_bond(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BondHelperPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BondHelper_bond" "', argument " "1"" of type '" "BondHelperPtr *""'"); 
    }
    arg1 = reinterpret_cast< BondHelperPtr * >(argp1);
    {
      try {
        result = BondHelperPtr_bond(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new BondPtr(static_cast< const BondPtr& >(result))), SWIGTYPE_p_BondPtr, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_BondHelper) {
  {
    BondHelperPtr *arg1 = (BondHelperPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_BondHelper(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BondHelperPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_BondHelper" "', argument " "1"" of type '" "BondHelperPtr *""'"); 
    }
    arg1 = reinterpret_cast< BondHelperPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FixedRateBondHelper__SWIG_0) {
  {
    Handle< Quote > *arg1 = 0 ;
    Size arg2 ;
    Real arg3 ;
    Schedule *arg4 = 0 ;
    std::vector< Rate > *arg5 = 0 ;
    DayCounter *arg6 = 0 ;
    BusinessDayConvention arg7 ;
    Real arg8 ;
    Date *arg9 = 0 ;
    Calendar *arg10 = 0 ;
    Period *arg11 = 0 ;
    Calendar *arg12 = 0 ;
    BusinessDayConvention arg13 ;
    bool arg14 ;
    bool arg15 ;
    void *argp1 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    std::vector< double > temp5 ;
    std::vector< double > *v5 ;
    void *argp6 ;
    int res6 = 0 ;
    int val7 ;
    int ecode7 = 0 ;
    double val8 ;
    int ecode8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    void *argp10 ;
    int res10 = 0 ;
    void *argp11 ;
    int res11 = 0 ;
    void *argp12 ;
    int res12 = 0 ;
    int val13 ;
    int ecode13 = 0 ;
    bool val14 ;
    int ecode14 = 0 ;
    bool val15 ;
    int ecode15 = 0 ;
    int argvi = 0;
    FixedRateBondHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 15) || (items > 15)) {
      SWIG_croak("Usage: new_FixedRateBondHelper(cleanPrice,settlementDays,faceAmount,schedule,coupons,paymentDayCounter,paymentConvention,redemption,issueDate,paymentCalendar,exCouponPeriod,exCouponCalendar,exCouponConvention,exCouponEndOfMonth,useCleanPrice);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FixedRateBondHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBondHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< Quote > * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FixedRateBondHelper" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_FixedRateBondHelper" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FixedRateBondHelper" "', argument " "4"" of type '" "Schedule const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBondHelper" "', argument " "4"" of type '" "Schedule const &""'"); 
    }
    arg4 = reinterpret_cast< Schedule * >(argp4);
    {
      if (SWIG_ConvertPtr(ST(4),(void **) &v5, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg5 = v5;
      } else if (SvROK(ST(4))) {
        AV *av = (AV *)SvRV(ST(4));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 5 of new_FixedRateBondHelper. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp5.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 5 of "
              "new_FixedRateBondHelper. "
              "Expected an array of ""double");
          }
        }
        arg5 = &temp5;
      } else {
        SWIG_croak("Type error in argument 5 of new_FixedRateBondHelper. "
          "Expected an array of ""double");
      }
    }
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_FixedRateBondHelper" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBondHelper" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    arg6 = reinterpret_cast< DayCounter * >(argp6);
    ecode7 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_FixedRateBondHelper" "', argument " "7"" of type '" "BusinessDayConvention""'");
    } 
    arg7 = static_cast< BusinessDayConvention >(val7);
    ecode8 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_FixedRateBondHelper" "', argument " "8"" of type '" "Real""'");
    } 
    arg8 = static_cast< Real >(val8);
    res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res9)) {
      SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_FixedRateBondHelper" "', argument " "9"" of type '" "Date const &""'"); 
    }
    if (!argp9) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBondHelper" "', argument " "9"" of type '" "Date const &""'"); 
    }
    arg9 = reinterpret_cast< Date * >(argp9);
    res10 = SWIG_ConvertPtr(ST(9), &argp10, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res10)) {
      SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "new_FixedRateBondHelper" "', argument " "10"" of type '" "Calendar const &""'"); 
    }
    if (!argp10) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBondHelper" "', argument " "10"" of type '" "Calendar const &""'"); 
    }
    arg10 = reinterpret_cast< Calendar * >(argp10);
    res11 = SWIG_ConvertPtr(ST(10), &argp11, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res11)) {
      SWIG_exception_fail(SWIG_ArgError(res11), "in method '" "new_FixedRateBondHelper" "', argument " "11"" of type '" "Period const &""'"); 
    }
    if (!argp11) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBondHelper" "', argument " "11"" of type '" "Period const &""'"); 
    }
    arg11 = reinterpret_cast< Period * >(argp11);
    res12 = SWIG_ConvertPtr(ST(11), &argp12, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res12)) {
      SWIG_exception_fail(SWIG_ArgError(res12), "in method '" "new_FixedRateBondHelper" "', argument " "12"" of type '" "Calendar const &""'"); 
    }
    if (!argp12) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBondHelper" "', argument " "12"" of type '" "Calendar const &""'"); 
    }
    arg12 = reinterpret_cast< Calendar * >(argp12);
    ecode13 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(12), &val13);
    if (!SWIG_IsOK(ecode13)) {
      SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "new_FixedRateBondHelper" "', argument " "13"" of type '" "BusinessDayConvention""'");
    } 
    arg13 = static_cast< BusinessDayConvention >(val13);
    ecode14 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(13), &val14);
    if (!SWIG_IsOK(ecode14)) {
      SWIG_exception_fail(SWIG_ArgError(ecode14), "in method '" "new_FixedRateBondHelper" "', argument " "14"" of type '" "bool""'");
    } 
    arg14 = static_cast< bool >(val14);
    ecode15 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(14), &val15);
    if (!SWIG_IsOK(ecode15)) {
      SWIG_exception_fail(SWIG_ArgError(ecode15), "in method '" "new_FixedRateBondHelper" "', argument " "15"" of type '" "bool""'");
    } 
    arg15 = static_cast< bool >(val15);
    {
      try {
        result = (FixedRateBondHelperPtr *)new_FixedRateBondHelperPtr__SWIG_0((Handle< Quote > const &)*arg1,arg2,arg3,(Schedule const &)*arg4,(std::vector< double > const &)*arg5,(DayCounter const &)*arg6,arg7,arg8,(Date const &)*arg9,(Calendar const &)*arg10,(Period const &)*arg11,(Calendar const &)*arg12,arg13,arg14,arg15);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FixedRateBondHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FixedRateBondHelper__SWIG_1) {
  {
    Handle< Quote > *arg1 = 0 ;
    Size arg2 ;
    Real arg3 ;
    Schedule *arg4 = 0 ;
    std::vector< Rate > *arg5 = 0 ;
    DayCounter *arg6 = 0 ;
    BusinessDayConvention arg7 ;
    Real arg8 ;
    Date *arg9 = 0 ;
    Calendar *arg10 = 0 ;
    Period *arg11 = 0 ;
    Calendar *arg12 = 0 ;
    BusinessDayConvention arg13 ;
    bool arg14 ;
    void *argp1 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    std::vector< double > temp5 ;
    std::vector< double > *v5 ;
    void *argp6 ;
    int res6 = 0 ;
    int val7 ;
    int ecode7 = 0 ;
    double val8 ;
    int ecode8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    void *argp10 ;
    int res10 = 0 ;
    void *argp11 ;
    int res11 = 0 ;
    void *argp12 ;
    int res12 = 0 ;
    int val13 ;
    int ecode13 = 0 ;
    bool val14 ;
    int ecode14 = 0 ;
    int argvi = 0;
    FixedRateBondHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 14) || (items > 14)) {
      SWIG_croak("Usage: new_FixedRateBondHelper(cleanPrice,settlementDays,faceAmount,schedule,coupons,paymentDayCounter,paymentConvention,redemption,issueDate,paymentCalendar,exCouponPeriod,exCouponCalendar,exCouponConvention,exCouponEndOfMonth);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FixedRateBondHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBondHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< Quote > * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FixedRateBondHelper" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_FixedRateBondHelper" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FixedRateBondHelper" "', argument " "4"" of type '" "Schedule const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBondHelper" "', argument " "4"" of type '" "Schedule const &""'"); 
    }
    arg4 = reinterpret_cast< Schedule * >(argp4);
    {
      if (SWIG_ConvertPtr(ST(4),(void **) &v5, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg5 = v5;
      } else if (SvROK(ST(4))) {
        AV *av = (AV *)SvRV(ST(4));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 5 of new_FixedRateBondHelper. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp5.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 5 of "
              "new_FixedRateBondHelper. "
              "Expected an array of ""double");
          }
        }
        arg5 = &temp5;
      } else {
        SWIG_croak("Type error in argument 5 of new_FixedRateBondHelper. "
          "Expected an array of ""double");
      }
    }
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_FixedRateBondHelper" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBondHelper" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    arg6 = reinterpret_cast< DayCounter * >(argp6);
    ecode7 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_FixedRateBondHelper" "', argument " "7"" of type '" "BusinessDayConvention""'");
    } 
    arg7 = static_cast< BusinessDayConvention >(val7);
    ecode8 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_FixedRateBondHelper" "', argument " "8"" of type '" "Real""'");
    } 
    arg8 = static_cast< Real >(val8);
    res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res9)) {
      SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_FixedRateBondHelper" "', argument " "9"" of type '" "Date const &""'"); 
    }
    if (!argp9) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBondHelper" "', argument " "9"" of type '" "Date const &""'"); 
    }
    arg9 = reinterpret_cast< Date * >(argp9);
    res10 = SWIG_ConvertPtr(ST(9), &argp10, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res10)) {
      SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "new_FixedRateBondHelper" "', argument " "10"" of type '" "Calendar const &""'"); 
    }
    if (!argp10) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBondHelper" "', argument " "10"" of type '" "Calendar const &""'"); 
    }
    arg10 = reinterpret_cast< Calendar * >(argp10);
    res11 = SWIG_ConvertPtr(ST(10), &argp11, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res11)) {
      SWIG_exception_fail(SWIG_ArgError(res11), "in method '" "new_FixedRateBondHelper" "', argument " "11"" of type '" "Period const &""'"); 
    }
    if (!argp11) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBondHelper" "', argument " "11"" of type '" "Period const &""'"); 
    }
    arg11 = reinterpret_cast< Period * >(argp11);
    res12 = SWIG_ConvertPtr(ST(11), &argp12, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res12)) {
      SWIG_exception_fail(SWIG_ArgError(res12), "in method '" "new_FixedRateBondHelper" "', argument " "12"" of type '" "Calendar const &""'"); 
    }
    if (!argp12) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBondHelper" "', argument " "12"" of type '" "Calendar const &""'"); 
    }
    arg12 = reinterpret_cast< Calendar * >(argp12);
    ecode13 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(12), &val13);
    if (!SWIG_IsOK(ecode13)) {
      SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "new_FixedRateBondHelper" "', argument " "13"" of type '" "BusinessDayConvention""'");
    } 
    arg13 = static_cast< BusinessDayConvention >(val13);
    ecode14 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(13), &val14);
    if (!SWIG_IsOK(ecode14)) {
      SWIG_exception_fail(SWIG_ArgError(ecode14), "in method '" "new_FixedRateBondHelper" "', argument " "14"" of type '" "bool""'");
    } 
    arg14 = static_cast< bool >(val14);
    {
      try {
        result = (FixedRateBondHelperPtr *)new_FixedRateBondHelperPtr__SWIG_0((Handle< Quote > const &)*arg1,arg2,arg3,(Schedule const &)*arg4,(std::vector< double > const &)*arg5,(DayCounter const &)*arg6,arg7,arg8,(Date const &)*arg9,(Calendar const &)*arg10,(Period const &)*arg11,(Calendar const &)*arg12,arg13,arg14);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FixedRateBondHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FixedRateBondHelper__SWIG_2) {
  {
    Handle< Quote > *arg1 = 0 ;
    Size arg2 ;
    Real arg3 ;
    Schedule *arg4 = 0 ;
    std::vector< Rate > *arg5 = 0 ;
    DayCounter *arg6 = 0 ;
    BusinessDayConvention arg7 ;
    Real arg8 ;
    Date *arg9 = 0 ;
    Calendar *arg10 = 0 ;
    Period *arg11 = 0 ;
    Calendar *arg12 = 0 ;
    BusinessDayConvention arg13 ;
    void *argp1 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    std::vector< double > temp5 ;
    std::vector< double > *v5 ;
    void *argp6 ;
    int res6 = 0 ;
    int val7 ;
    int ecode7 = 0 ;
    double val8 ;
    int ecode8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    void *argp10 ;
    int res10 = 0 ;
    void *argp11 ;
    int res11 = 0 ;
    void *argp12 ;
    int res12 = 0 ;
    int val13 ;
    int ecode13 = 0 ;
    int argvi = 0;
    FixedRateBondHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 13) || (items > 13)) {
      SWIG_croak("Usage: new_FixedRateBondHelper(cleanPrice,settlementDays,faceAmount,schedule,coupons,paymentDayCounter,paymentConvention,redemption,issueDate,paymentCalendar,exCouponPeriod,exCouponCalendar,exCouponConvention);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FixedRateBondHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBondHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< Quote > * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FixedRateBondHelper" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_FixedRateBondHelper" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FixedRateBondHelper" "', argument " "4"" of type '" "Schedule const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBondHelper" "', argument " "4"" of type '" "Schedule const &""'"); 
    }
    arg4 = reinterpret_cast< Schedule * >(argp4);
    {
      if (SWIG_ConvertPtr(ST(4),(void **) &v5, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg5 = v5;
      } else if (SvROK(ST(4))) {
        AV *av = (AV *)SvRV(ST(4));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 5 of new_FixedRateBondHelper. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp5.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 5 of "
              "new_FixedRateBondHelper. "
              "Expected an array of ""double");
          }
        }
        arg5 = &temp5;
      } else {
        SWIG_croak("Type error in argument 5 of new_FixedRateBondHelper. "
          "Expected an array of ""double");
      }
    }
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_FixedRateBondHelper" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBondHelper" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    arg6 = reinterpret_cast< DayCounter * >(argp6);
    ecode7 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_FixedRateBondHelper" "', argument " "7"" of type '" "BusinessDayConvention""'");
    } 
    arg7 = static_cast< BusinessDayConvention >(val7);
    ecode8 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_FixedRateBondHelper" "', argument " "8"" of type '" "Real""'");
    } 
    arg8 = static_cast< Real >(val8);
    res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res9)) {
      SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_FixedRateBondHelper" "', argument " "9"" of type '" "Date const &""'"); 
    }
    if (!argp9) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBondHelper" "', argument " "9"" of type '" "Date const &""'"); 
    }
    arg9 = reinterpret_cast< Date * >(argp9);
    res10 = SWIG_ConvertPtr(ST(9), &argp10, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res10)) {
      SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "new_FixedRateBondHelper" "', argument " "10"" of type '" "Calendar const &""'"); 
    }
    if (!argp10) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBondHelper" "', argument " "10"" of type '" "Calendar const &""'"); 
    }
    arg10 = reinterpret_cast< Calendar * >(argp10);
    res11 = SWIG_ConvertPtr(ST(10), &argp11, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res11)) {
      SWIG_exception_fail(SWIG_ArgError(res11), "in method '" "new_FixedRateBondHelper" "', argument " "11"" of type '" "Period const &""'"); 
    }
    if (!argp11) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBondHelper" "', argument " "11"" of type '" "Period const &""'"); 
    }
    arg11 = reinterpret_cast< Period * >(argp11);
    res12 = SWIG_ConvertPtr(ST(11), &argp12, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res12)) {
      SWIG_exception_fail(SWIG_ArgError(res12), "in method '" "new_FixedRateBondHelper" "', argument " "12"" of type '" "Calendar const &""'"); 
    }
    if (!argp12) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBondHelper" "', argument " "12"" of type '" "Calendar const &""'"); 
    }
    arg12 = reinterpret_cast< Calendar * >(argp12);
    ecode13 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(12), &val13);
    if (!SWIG_IsOK(ecode13)) {
      SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "new_FixedRateBondHelper" "', argument " "13"" of type '" "BusinessDayConvention""'");
    } 
    arg13 = static_cast< BusinessDayConvention >(val13);
    {
      try {
        result = (FixedRateBondHelperPtr *)new_FixedRateBondHelperPtr__SWIG_0((Handle< Quote > const &)*arg1,arg2,arg3,(Schedule const &)*arg4,(std::vector< double > const &)*arg5,(DayCounter const &)*arg6,arg7,arg8,(Date const &)*arg9,(Calendar const &)*arg10,(Period const &)*arg11,(Calendar const &)*arg12,arg13);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FixedRateBondHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FixedRateBondHelper__SWIG_3) {
  {
    Handle< Quote > *arg1 = 0 ;
    Size arg2 ;
    Real arg3 ;
    Schedule *arg4 = 0 ;
    std::vector< Rate > *arg5 = 0 ;
    DayCounter *arg6 = 0 ;
    BusinessDayConvention arg7 ;
    Real arg8 ;
    Date *arg9 = 0 ;
    Calendar *arg10 = 0 ;
    Period *arg11 = 0 ;
    Calendar *arg12 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    std::vector< double > temp5 ;
    std::vector< double > *v5 ;
    void *argp6 ;
    int res6 = 0 ;
    int val7 ;
    int ecode7 = 0 ;
    double val8 ;
    int ecode8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    void *argp10 ;
    int res10 = 0 ;
    void *argp11 ;
    int res11 = 0 ;
    void *argp12 ;
    int res12 = 0 ;
    int argvi = 0;
    FixedRateBondHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 12) || (items > 12)) {
      SWIG_croak("Usage: new_FixedRateBondHelper(cleanPrice,settlementDays,faceAmount,schedule,coupons,paymentDayCounter,paymentConvention,redemption,issueDate,paymentCalendar,exCouponPeriod,exCouponCalendar);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FixedRateBondHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBondHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< Quote > * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FixedRateBondHelper" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_FixedRateBondHelper" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FixedRateBondHelper" "', argument " "4"" of type '" "Schedule const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBondHelper" "', argument " "4"" of type '" "Schedule const &""'"); 
    }
    arg4 = reinterpret_cast< Schedule * >(argp4);
    {
      if (SWIG_ConvertPtr(ST(4),(void **) &v5, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg5 = v5;
      } else if (SvROK(ST(4))) {
        AV *av = (AV *)SvRV(ST(4));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 5 of new_FixedRateBondHelper. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp5.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 5 of "
              "new_FixedRateBondHelper. "
              "Expected an array of ""double");
          }
        }
        arg5 = &temp5;
      } else {
        SWIG_croak("Type error in argument 5 of new_FixedRateBondHelper. "
          "Expected an array of ""double");
      }
    }
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_FixedRateBondHelper" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBondHelper" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    arg6 = reinterpret_cast< DayCounter * >(argp6);
    ecode7 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_FixedRateBondHelper" "', argument " "7"" of type '" "BusinessDayConvention""'");
    } 
    arg7 = static_cast< BusinessDayConvention >(val7);
    ecode8 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_FixedRateBondHelper" "', argument " "8"" of type '" "Real""'");
    } 
    arg8 = static_cast< Real >(val8);
    res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res9)) {
      SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_FixedRateBondHelper" "', argument " "9"" of type '" "Date const &""'"); 
    }
    if (!argp9) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBondHelper" "', argument " "9"" of type '" "Date const &""'"); 
    }
    arg9 = reinterpret_cast< Date * >(argp9);
    res10 = SWIG_ConvertPtr(ST(9), &argp10, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res10)) {
      SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "new_FixedRateBondHelper" "', argument " "10"" of type '" "Calendar const &""'"); 
    }
    if (!argp10) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBondHelper" "', argument " "10"" of type '" "Calendar const &""'"); 
    }
    arg10 = reinterpret_cast< Calendar * >(argp10);
    res11 = SWIG_ConvertPtr(ST(10), &argp11, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res11)) {
      SWIG_exception_fail(SWIG_ArgError(res11), "in method '" "new_FixedRateBondHelper" "', argument " "11"" of type '" "Period const &""'"); 
    }
    if (!argp11) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBondHelper" "', argument " "11"" of type '" "Period const &""'"); 
    }
    arg11 = reinterpret_cast< Period * >(argp11);
    res12 = SWIG_ConvertPtr(ST(11), &argp12, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res12)) {
      SWIG_exception_fail(SWIG_ArgError(res12), "in method '" "new_FixedRateBondHelper" "', argument " "12"" of type '" "Calendar const &""'"); 
    }
    if (!argp12) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBondHelper" "', argument " "12"" of type '" "Calendar const &""'"); 
    }
    arg12 = reinterpret_cast< Calendar * >(argp12);
    {
      try {
        result = (FixedRateBondHelperPtr *)new_FixedRateBondHelperPtr__SWIG_0((Handle< Quote > const &)*arg1,arg2,arg3,(Schedule const &)*arg4,(std::vector< double > const &)*arg5,(DayCounter const &)*arg6,arg7,arg8,(Date const &)*arg9,(Calendar const &)*arg10,(Period const &)*arg11,(Calendar const &)*arg12);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FixedRateBondHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FixedRateBondHelper__SWIG_4) {
  {
    Handle< Quote > *arg1 = 0 ;
    Size arg2 ;
    Real arg3 ;
    Schedule *arg4 = 0 ;
    std::vector< Rate > *arg5 = 0 ;
    DayCounter *arg6 = 0 ;
    BusinessDayConvention arg7 ;
    Real arg8 ;
    Date *arg9 = 0 ;
    Calendar *arg10 = 0 ;
    Period *arg11 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    std::vector< double > temp5 ;
    std::vector< double > *v5 ;
    void *argp6 ;
    int res6 = 0 ;
    int val7 ;
    int ecode7 = 0 ;
    double val8 ;
    int ecode8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    void *argp10 ;
    int res10 = 0 ;
    void *argp11 ;
    int res11 = 0 ;
    int argvi = 0;
    FixedRateBondHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 11) || (items > 11)) {
      SWIG_croak("Usage: new_FixedRateBondHelper(cleanPrice,settlementDays,faceAmount,schedule,coupons,paymentDayCounter,paymentConvention,redemption,issueDate,paymentCalendar,exCouponPeriod);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FixedRateBondHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBondHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< Quote > * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FixedRateBondHelper" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_FixedRateBondHelper" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FixedRateBondHelper" "', argument " "4"" of type '" "Schedule const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBondHelper" "', argument " "4"" of type '" "Schedule const &""'"); 
    }
    arg4 = reinterpret_cast< Schedule * >(argp4);
    {
      if (SWIG_ConvertPtr(ST(4),(void **) &v5, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg5 = v5;
      } else if (SvROK(ST(4))) {
        AV *av = (AV *)SvRV(ST(4));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 5 of new_FixedRateBondHelper. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp5.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 5 of "
              "new_FixedRateBondHelper. "
              "Expected an array of ""double");
          }
        }
        arg5 = &temp5;
      } else {
        SWIG_croak("Type error in argument 5 of new_FixedRateBondHelper. "
          "Expected an array of ""double");
      }
    }
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_FixedRateBondHelper" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBondHelper" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    arg6 = reinterpret_cast< DayCounter * >(argp6);
    ecode7 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_FixedRateBondHelper" "', argument " "7"" of type '" "BusinessDayConvention""'");
    } 
    arg7 = static_cast< BusinessDayConvention >(val7);
    ecode8 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_FixedRateBondHelper" "', argument " "8"" of type '" "Real""'");
    } 
    arg8 = static_cast< Real >(val8);
    res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res9)) {
      SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_FixedRateBondHelper" "', argument " "9"" of type '" "Date const &""'"); 
    }
    if (!argp9) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBondHelper" "', argument " "9"" of type '" "Date const &""'"); 
    }
    arg9 = reinterpret_cast< Date * >(argp9);
    res10 = SWIG_ConvertPtr(ST(9), &argp10, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res10)) {
      SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "new_FixedRateBondHelper" "', argument " "10"" of type '" "Calendar const &""'"); 
    }
    if (!argp10) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBondHelper" "', argument " "10"" of type '" "Calendar const &""'"); 
    }
    arg10 = reinterpret_cast< Calendar * >(argp10);
    res11 = SWIG_ConvertPtr(ST(10), &argp11, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res11)) {
      SWIG_exception_fail(SWIG_ArgError(res11), "in method '" "new_FixedRateBondHelper" "', argument " "11"" of type '" "Period const &""'"); 
    }
    if (!argp11) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBondHelper" "', argument " "11"" of type '" "Period const &""'"); 
    }
    arg11 = reinterpret_cast< Period * >(argp11);
    {
      try {
        result = (FixedRateBondHelperPtr *)new_FixedRateBondHelperPtr__SWIG_0((Handle< Quote > const &)*arg1,arg2,arg3,(Schedule const &)*arg4,(std::vector< double > const &)*arg5,(DayCounter const &)*arg6,arg7,arg8,(Date const &)*arg9,(Calendar const &)*arg10,(Period const &)*arg11);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FixedRateBondHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FixedRateBondHelper__SWIG_5) {
  {
    Handle< Quote > *arg1 = 0 ;
    Size arg2 ;
    Real arg3 ;
    Schedule *arg4 = 0 ;
    std::vector< Rate > *arg5 = 0 ;
    DayCounter *arg6 = 0 ;
    BusinessDayConvention arg7 ;
    Real arg8 ;
    Date *arg9 = 0 ;
    Calendar *arg10 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    std::vector< double > temp5 ;
    std::vector< double > *v5 ;
    void *argp6 ;
    int res6 = 0 ;
    int val7 ;
    int ecode7 = 0 ;
    double val8 ;
    int ecode8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    void *argp10 ;
    int res10 = 0 ;
    int argvi = 0;
    FixedRateBondHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 10) || (items > 10)) {
      SWIG_croak("Usage: new_FixedRateBondHelper(cleanPrice,settlementDays,faceAmount,schedule,coupons,paymentDayCounter,paymentConvention,redemption,issueDate,paymentCalendar);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FixedRateBondHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBondHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< Quote > * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FixedRateBondHelper" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_FixedRateBondHelper" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FixedRateBondHelper" "', argument " "4"" of type '" "Schedule const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBondHelper" "', argument " "4"" of type '" "Schedule const &""'"); 
    }
    arg4 = reinterpret_cast< Schedule * >(argp4);
    {
      if (SWIG_ConvertPtr(ST(4),(void **) &v5, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg5 = v5;
      } else if (SvROK(ST(4))) {
        AV *av = (AV *)SvRV(ST(4));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 5 of new_FixedRateBondHelper. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp5.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 5 of "
              "new_FixedRateBondHelper. "
              "Expected an array of ""double");
          }
        }
        arg5 = &temp5;
      } else {
        SWIG_croak("Type error in argument 5 of new_FixedRateBondHelper. "
          "Expected an array of ""double");
      }
    }
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_FixedRateBondHelper" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBondHelper" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    arg6 = reinterpret_cast< DayCounter * >(argp6);
    ecode7 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_FixedRateBondHelper" "', argument " "7"" of type '" "BusinessDayConvention""'");
    } 
    arg7 = static_cast< BusinessDayConvention >(val7);
    ecode8 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_FixedRateBondHelper" "', argument " "8"" of type '" "Real""'");
    } 
    arg8 = static_cast< Real >(val8);
    res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res9)) {
      SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_FixedRateBondHelper" "', argument " "9"" of type '" "Date const &""'"); 
    }
    if (!argp9) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBondHelper" "', argument " "9"" of type '" "Date const &""'"); 
    }
    arg9 = reinterpret_cast< Date * >(argp9);
    res10 = SWIG_ConvertPtr(ST(9), &argp10, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res10)) {
      SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "new_FixedRateBondHelper" "', argument " "10"" of type '" "Calendar const &""'"); 
    }
    if (!argp10) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBondHelper" "', argument " "10"" of type '" "Calendar const &""'"); 
    }
    arg10 = reinterpret_cast< Calendar * >(argp10);
    {
      try {
        result = (FixedRateBondHelperPtr *)new_FixedRateBondHelperPtr__SWIG_0((Handle< Quote > const &)*arg1,arg2,arg3,(Schedule const &)*arg4,(std::vector< double > const &)*arg5,(DayCounter const &)*arg6,arg7,arg8,(Date const &)*arg9,(Calendar const &)*arg10);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FixedRateBondHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FixedRateBondHelper__SWIG_6) {
  {
    Handle< Quote > *arg1 = 0 ;
    Size arg2 ;
    Real arg3 ;
    Schedule *arg4 = 0 ;
    std::vector< Rate > *arg5 = 0 ;
    DayCounter *arg6 = 0 ;
    BusinessDayConvention arg7 ;
    Real arg8 ;
    Date *arg9 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    std::vector< double > temp5 ;
    std::vector< double > *v5 ;
    void *argp6 ;
    int res6 = 0 ;
    int val7 ;
    int ecode7 = 0 ;
    double val8 ;
    int ecode8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    int argvi = 0;
    FixedRateBondHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 9) || (items > 9)) {
      SWIG_croak("Usage: new_FixedRateBondHelper(cleanPrice,settlementDays,faceAmount,schedule,coupons,paymentDayCounter,paymentConvention,redemption,issueDate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FixedRateBondHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBondHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< Quote > * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FixedRateBondHelper" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_FixedRateBondHelper" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FixedRateBondHelper" "', argument " "4"" of type '" "Schedule const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBondHelper" "', argument " "4"" of type '" "Schedule const &""'"); 
    }
    arg4 = reinterpret_cast< Schedule * >(argp4);
    {
      if (SWIG_ConvertPtr(ST(4),(void **) &v5, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg5 = v5;
      } else if (SvROK(ST(4))) {
        AV *av = (AV *)SvRV(ST(4));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 5 of new_FixedRateBondHelper. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp5.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 5 of "
              "new_FixedRateBondHelper. "
              "Expected an array of ""double");
          }
        }
        arg5 = &temp5;
      } else {
        SWIG_croak("Type error in argument 5 of new_FixedRateBondHelper. "
          "Expected an array of ""double");
      }
    }
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_FixedRateBondHelper" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBondHelper" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    arg6 = reinterpret_cast< DayCounter * >(argp6);
    ecode7 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_FixedRateBondHelper" "', argument " "7"" of type '" "BusinessDayConvention""'");
    } 
    arg7 = static_cast< BusinessDayConvention >(val7);
    ecode8 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_FixedRateBondHelper" "', argument " "8"" of type '" "Real""'");
    } 
    arg8 = static_cast< Real >(val8);
    res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res9)) {
      SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_FixedRateBondHelper" "', argument " "9"" of type '" "Date const &""'"); 
    }
    if (!argp9) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBondHelper" "', argument " "9"" of type '" "Date const &""'"); 
    }
    arg9 = reinterpret_cast< Date * >(argp9);
    {
      try {
        result = (FixedRateBondHelperPtr *)new_FixedRateBondHelperPtr__SWIG_0((Handle< Quote > const &)*arg1,arg2,arg3,(Schedule const &)*arg4,(std::vector< double > const &)*arg5,(DayCounter const &)*arg6,arg7,arg8,(Date const &)*arg9);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FixedRateBondHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FixedRateBondHelper__SWIG_7) {
  {
    Handle< Quote > *arg1 = 0 ;
    Size arg2 ;
    Real arg3 ;
    Schedule *arg4 = 0 ;
    std::vector< Rate > *arg5 = 0 ;
    DayCounter *arg6 = 0 ;
    BusinessDayConvention arg7 ;
    Real arg8 ;
    void *argp1 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    std::vector< double > temp5 ;
    std::vector< double > *v5 ;
    void *argp6 ;
    int res6 = 0 ;
    int val7 ;
    int ecode7 = 0 ;
    double val8 ;
    int ecode8 = 0 ;
    int argvi = 0;
    FixedRateBondHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 8) || (items > 8)) {
      SWIG_croak("Usage: new_FixedRateBondHelper(cleanPrice,settlementDays,faceAmount,schedule,coupons,paymentDayCounter,paymentConvention,redemption);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FixedRateBondHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBondHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< Quote > * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FixedRateBondHelper" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_FixedRateBondHelper" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FixedRateBondHelper" "', argument " "4"" of type '" "Schedule const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBondHelper" "', argument " "4"" of type '" "Schedule const &""'"); 
    }
    arg4 = reinterpret_cast< Schedule * >(argp4);
    {
      if (SWIG_ConvertPtr(ST(4),(void **) &v5, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg5 = v5;
      } else if (SvROK(ST(4))) {
        AV *av = (AV *)SvRV(ST(4));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 5 of new_FixedRateBondHelper. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp5.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 5 of "
              "new_FixedRateBondHelper. "
              "Expected an array of ""double");
          }
        }
        arg5 = &temp5;
      } else {
        SWIG_croak("Type error in argument 5 of new_FixedRateBondHelper. "
          "Expected an array of ""double");
      }
    }
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_FixedRateBondHelper" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBondHelper" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    arg6 = reinterpret_cast< DayCounter * >(argp6);
    ecode7 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_FixedRateBondHelper" "', argument " "7"" of type '" "BusinessDayConvention""'");
    } 
    arg7 = static_cast< BusinessDayConvention >(val7);
    ecode8 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_FixedRateBondHelper" "', argument " "8"" of type '" "Real""'");
    } 
    arg8 = static_cast< Real >(val8);
    {
      try {
        result = (FixedRateBondHelperPtr *)new_FixedRateBondHelperPtr__SWIG_0((Handle< Quote > const &)*arg1,arg2,arg3,(Schedule const &)*arg4,(std::vector< double > const &)*arg5,(DayCounter const &)*arg6,arg7,arg8);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FixedRateBondHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FixedRateBondHelper__SWIG_8) {
  {
    Handle< Quote > *arg1 = 0 ;
    Size arg2 ;
    Real arg3 ;
    Schedule *arg4 = 0 ;
    std::vector< Rate > *arg5 = 0 ;
    DayCounter *arg6 = 0 ;
    BusinessDayConvention arg7 ;
    void *argp1 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    std::vector< double > temp5 ;
    std::vector< double > *v5 ;
    void *argp6 ;
    int res6 = 0 ;
    int val7 ;
    int ecode7 = 0 ;
    int argvi = 0;
    FixedRateBondHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: new_FixedRateBondHelper(cleanPrice,settlementDays,faceAmount,schedule,coupons,paymentDayCounter,paymentConvention);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FixedRateBondHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBondHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< Quote > * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FixedRateBondHelper" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_FixedRateBondHelper" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FixedRateBondHelper" "', argument " "4"" of type '" "Schedule const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBondHelper" "', argument " "4"" of type '" "Schedule const &""'"); 
    }
    arg4 = reinterpret_cast< Schedule * >(argp4);
    {
      if (SWIG_ConvertPtr(ST(4),(void **) &v5, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg5 = v5;
      } else if (SvROK(ST(4))) {
        AV *av = (AV *)SvRV(ST(4));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 5 of new_FixedRateBondHelper. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp5.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 5 of "
              "new_FixedRateBondHelper. "
              "Expected an array of ""double");
          }
        }
        arg5 = &temp5;
      } else {
        SWIG_croak("Type error in argument 5 of new_FixedRateBondHelper. "
          "Expected an array of ""double");
      }
    }
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_FixedRateBondHelper" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBondHelper" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    arg6 = reinterpret_cast< DayCounter * >(argp6);
    ecode7 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_FixedRateBondHelper" "', argument " "7"" of type '" "BusinessDayConvention""'");
    } 
    arg7 = static_cast< BusinessDayConvention >(val7);
    {
      try {
        result = (FixedRateBondHelperPtr *)new_FixedRateBondHelperPtr__SWIG_0((Handle< Quote > const &)*arg1,arg2,arg3,(Schedule const &)*arg4,(std::vector< double > const &)*arg5,(DayCounter const &)*arg6,arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FixedRateBondHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FixedRateBondHelper__SWIG_9) {
  {
    Handle< Quote > *arg1 = 0 ;
    Size arg2 ;
    Real arg3 ;
    Schedule *arg4 = 0 ;
    std::vector< Rate > *arg5 = 0 ;
    DayCounter *arg6 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    std::vector< double > temp5 ;
    std::vector< double > *v5 ;
    void *argp6 ;
    int res6 = 0 ;
    int argvi = 0;
    FixedRateBondHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_FixedRateBondHelper(cleanPrice,settlementDays,faceAmount,schedule,coupons,paymentDayCounter);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FixedRateBondHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBondHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< Quote > * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FixedRateBondHelper" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_FixedRateBondHelper" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Schedule,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FixedRateBondHelper" "', argument " "4"" of type '" "Schedule const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBondHelper" "', argument " "4"" of type '" "Schedule const &""'"); 
    }
    arg4 = reinterpret_cast< Schedule * >(argp4);
    {
      if (SWIG_ConvertPtr(ST(4),(void **) &v5, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg5 = v5;
      } else if (SvROK(ST(4))) {
        AV *av = (AV *)SvRV(ST(4));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 5 of new_FixedRateBondHelper. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp5.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 5 of "
              "new_FixedRateBondHelper. "
              "Expected an array of ""double");
          }
        }
        arg5 = &temp5;
      } else {
        SWIG_croak("Type error in argument 5 of new_FixedRateBondHelper. "
          "Expected an array of ""double");
      }
    }
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_FixedRateBondHelper" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBondHelper" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    arg6 = reinterpret_cast< DayCounter * >(argp6);
    {
      try {
        result = (FixedRateBondHelperPtr *)new_FixedRateBondHelperPtr__SWIG_0((Handle< Quote > const &)*arg1,arg2,arg3,(Schedule const &)*arg4,(std::vector< double > const &)*arg5,(DayCounter const &)*arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FixedRateBondHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FixedRateBondHelper) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(4),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(4))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(4));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(4),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(4))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(4));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 8) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(4),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(4))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(4));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 9) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(4),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(4))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(4));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 10) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(4),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(4))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(4));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(9), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 11) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(4),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(4))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(4));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(9), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(10), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
    if (items == 12) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(4),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(4))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(4));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(9), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(10), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(11), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 7;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_7:
    
    if (items == 13) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(4),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(4))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(4));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(9), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(10), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(11), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(12), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 8;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_8:
    
    if (items == 14) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(4),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(4))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(4));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(9), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(10), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(11), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(12), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(13), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 9;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_9:
    
    if (items == 15) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Schedule, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(4),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(4))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(4));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(9), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(10), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(11), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(12), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(13), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(14), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 10;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_10:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FixedRateBondHelper__SWIG_9); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FixedRateBondHelper__SWIG_8); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FixedRateBondHelper__SWIG_7); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FixedRateBondHelper__SWIG_6); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FixedRateBondHelper__SWIG_5); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FixedRateBondHelper__SWIG_4); return;
    case 7:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FixedRateBondHelper__SWIG_3); return;
    case 8:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FixedRateBondHelper__SWIG_2); return;
    case 9:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FixedRateBondHelper__SWIG_1); return;
    case 10:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FixedRateBondHelper__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_FixedRateBondHelper'");
  XSRETURN(0);
}


XS(_wrap_FixedRateBondHelper_bond) {
  {
    FixedRateBondHelperPtr *arg1 = (FixedRateBondHelperPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    SwigValueWrapper< FixedRateBondPtr > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: FixedRateBondHelper_bond(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_FixedRateBondHelperPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FixedRateBondHelper_bond" "', argument " "1"" of type '" "FixedRateBondHelperPtr *""'"); 
    }
    arg1 = reinterpret_cast< FixedRateBondHelperPtr * >(argp1);
    {
      try {
        result = FixedRateBondHelperPtr_bond(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new FixedRateBondPtr(static_cast< const FixedRateBondPtr& >(result))), SWIGTYPE_p_FixedRateBondPtr, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_FixedRateBondHelper) {
  {
    FixedRateBondHelperPtr *arg1 = (FixedRateBondHelperPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_FixedRateBondHelper(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_FixedRateBondHelperPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FixedRateBondHelper" "', argument " "1"" of type '" "FixedRateBondHelperPtr *""'"); 
    }
    arg1 = reinterpret_cast< FixedRateBondHelperPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_OISRateHelper__SWIG_0) {
  {
    Natural arg1 ;
    Period *arg2 = 0 ;
    Handle< Quote > *arg3 = 0 ;
    OvernightIndexPtr *arg4 = 0 ;
    Handle< YieldTermStructure > *arg5 = 0 ;
    bool arg6 ;
    Natural arg7 ;
    BusinessDayConvention arg8 ;
    Frequency arg9 ;
    Calendar *arg10 = 0 ;
    Period *arg11 = 0 ;
    Spread arg12 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    bool val6 ;
    int ecode6 = 0 ;
    unsigned int val7 ;
    int ecode7 = 0 ;
    int val8 ;
    int ecode8 = 0 ;
    int val9 ;
    int ecode9 = 0 ;
    void *argp10 ;
    int res10 = 0 ;
    void *argp11 ;
    int res11 = 0 ;
    double val12 ;
    int ecode12 = 0 ;
    int argvi = 0;
    OISRateHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 12) || (items > 12)) {
      SWIG_croak("Usage: new_OISRateHelper(settlementDays,tenor,rate,index,discountingCurve,telescopicValueDates,paymentLag,paymentConvention,paymentFrequency,paymentCalendar,forwardStart,overnightSpread);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_OISRateHelper" "', argument " "1"" of type '" "Natural""'");
    } 
    arg1 = static_cast< Natural >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_OISRateHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_OISRateHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    arg2 = reinterpret_cast< Period * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_OISRateHelper" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_OISRateHelper" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< Quote > * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_OvernightIndexPtr,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_OISRateHelper" "', argument " "4"" of type '" "OvernightIndexPtr const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_OISRateHelper" "', argument " "4"" of type '" "OvernightIndexPtr const &""'"); 
    }
    arg4 = reinterpret_cast< OvernightIndexPtr * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_OISRateHelper" "', argument " "5"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_OISRateHelper" "', argument " "5"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg5 = reinterpret_cast< Handle< YieldTermStructure > * >(argp5);
    ecode6 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_OISRateHelper" "', argument " "6"" of type '" "bool""'");
    } 
    arg6 = static_cast< bool >(val6);
    ecode7 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_OISRateHelper" "', argument " "7"" of type '" "Natural""'");
    } 
    arg7 = static_cast< Natural >(val7);
    ecode8 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_OISRateHelper" "', argument " "8"" of type '" "BusinessDayConvention""'");
    } 
    arg8 = static_cast< BusinessDayConvention >(val8);
    ecode9 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(8), &val9);
    if (!SWIG_IsOK(ecode9)) {
      SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "new_OISRateHelper" "', argument " "9"" of type '" "Frequency""'");
    } 
    arg9 = static_cast< Frequency >(val9);
    res10 = SWIG_ConvertPtr(ST(9), &argp10, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res10)) {
      SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "new_OISRateHelper" "', argument " "10"" of type '" "Calendar const &""'"); 
    }
    if (!argp10) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_OISRateHelper" "', argument " "10"" of type '" "Calendar const &""'"); 
    }
    arg10 = reinterpret_cast< Calendar * >(argp10);
    res11 = SWIG_ConvertPtr(ST(10), &argp11, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res11)) {
      SWIG_exception_fail(SWIG_ArgError(res11), "in method '" "new_OISRateHelper" "', argument " "11"" of type '" "Period const &""'"); 
    }
    if (!argp11) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_OISRateHelper" "', argument " "11"" of type '" "Period const &""'"); 
    }
    arg11 = reinterpret_cast< Period * >(argp11);
    ecode12 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(11), &val12);
    if (!SWIG_IsOK(ecode12)) {
      SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "new_OISRateHelper" "', argument " "12"" of type '" "Spread""'");
    } 
    arg12 = static_cast< Spread >(val12);
    {
      try {
        result = (OISRateHelperPtr *)new_OISRateHelperPtr__SWIG_0(arg1,(Period const &)*arg2,(Handle< Quote > const &)*arg3,(OvernightIndexPtr const &)*arg4,(Handle< YieldTermStructure > const &)*arg5,arg6,arg7,arg8,arg9,(Calendar const &)*arg10,(Period const &)*arg11,arg12);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OISRateHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_OISRateHelper__SWIG_1) {
  {
    Natural arg1 ;
    Period *arg2 = 0 ;
    Handle< Quote > *arg3 = 0 ;
    OvernightIndexPtr *arg4 = 0 ;
    Handle< YieldTermStructure > *arg5 = 0 ;
    bool arg6 ;
    Natural arg7 ;
    BusinessDayConvention arg8 ;
    Frequency arg9 ;
    Calendar *arg10 = 0 ;
    Period *arg11 = 0 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    bool val6 ;
    int ecode6 = 0 ;
    unsigned int val7 ;
    int ecode7 = 0 ;
    int val8 ;
    int ecode8 = 0 ;
    int val9 ;
    int ecode9 = 0 ;
    void *argp10 ;
    int res10 = 0 ;
    void *argp11 ;
    int res11 = 0 ;
    int argvi = 0;
    OISRateHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 11) || (items > 11)) {
      SWIG_croak("Usage: new_OISRateHelper(settlementDays,tenor,rate,index,discountingCurve,telescopicValueDates,paymentLag,paymentConvention,paymentFrequency,paymentCalendar,forwardStart);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_OISRateHelper" "', argument " "1"" of type '" "Natural""'");
    } 
    arg1 = static_cast< Natural >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_OISRateHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_OISRateHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    arg2 = reinterpret_cast< Period * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_OISRateHelper" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_OISRateHelper" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< Quote > * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_OvernightIndexPtr,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_OISRateHelper" "', argument " "4"" of type '" "OvernightIndexPtr const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_OISRateHelper" "', argument " "4"" of type '" "OvernightIndexPtr const &""'"); 
    }
    arg4 = reinterpret_cast< OvernightIndexPtr * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_OISRateHelper" "', argument " "5"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_OISRateHelper" "', argument " "5"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg5 = reinterpret_cast< Handle< YieldTermStructure > * >(argp5);
    ecode6 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_OISRateHelper" "', argument " "6"" of type '" "bool""'");
    } 
    arg6 = static_cast< bool >(val6);
    ecode7 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_OISRateHelper" "', argument " "7"" of type '" "Natural""'");
    } 
    arg7 = static_cast< Natural >(val7);
    ecode8 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_OISRateHelper" "', argument " "8"" of type '" "BusinessDayConvention""'");
    } 
    arg8 = static_cast< BusinessDayConvention >(val8);
    ecode9 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(8), &val9);
    if (!SWIG_IsOK(ecode9)) {
      SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "new_OISRateHelper" "', argument " "9"" of type '" "Frequency""'");
    } 
    arg9 = static_cast< Frequency >(val9);
    res10 = SWIG_ConvertPtr(ST(9), &argp10, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res10)) {
      SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "new_OISRateHelper" "', argument " "10"" of type '" "Calendar const &""'"); 
    }
    if (!argp10) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_OISRateHelper" "', argument " "10"" of type '" "Calendar const &""'"); 
    }
    arg10 = reinterpret_cast< Calendar * >(argp10);
    res11 = SWIG_ConvertPtr(ST(10), &argp11, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res11)) {
      SWIG_exception_fail(SWIG_ArgError(res11), "in method '" "new_OISRateHelper" "', argument " "11"" of type '" "Period const &""'"); 
    }
    if (!argp11) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_OISRateHelper" "', argument " "11"" of type '" "Period const &""'"); 
    }
    arg11 = reinterpret_cast< Period * >(argp11);
    {
      try {
        result = (OISRateHelperPtr *)new_OISRateHelperPtr__SWIG_0(arg1,(Period const &)*arg2,(Handle< Quote > const &)*arg3,(OvernightIndexPtr const &)*arg4,(Handle< YieldTermStructure > const &)*arg5,arg6,arg7,arg8,arg9,(Calendar const &)*arg10,(Period const &)*arg11);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OISRateHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_OISRateHelper__SWIG_2) {
  {
    Natural arg1 ;
    Period *arg2 = 0 ;
    Handle< Quote > *arg3 = 0 ;
    OvernightIndexPtr *arg4 = 0 ;
    Handle< YieldTermStructure > *arg5 = 0 ;
    bool arg6 ;
    Natural arg7 ;
    BusinessDayConvention arg8 ;
    Frequency arg9 ;
    Calendar *arg10 = 0 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    bool val6 ;
    int ecode6 = 0 ;
    unsigned int val7 ;
    int ecode7 = 0 ;
    int val8 ;
    int ecode8 = 0 ;
    int val9 ;
    int ecode9 = 0 ;
    void *argp10 ;
    int res10 = 0 ;
    int argvi = 0;
    OISRateHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 10) || (items > 10)) {
      SWIG_croak("Usage: new_OISRateHelper(settlementDays,tenor,rate,index,discountingCurve,telescopicValueDates,paymentLag,paymentConvention,paymentFrequency,paymentCalendar);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_OISRateHelper" "', argument " "1"" of type '" "Natural""'");
    } 
    arg1 = static_cast< Natural >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_OISRateHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_OISRateHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    arg2 = reinterpret_cast< Period * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_OISRateHelper" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_OISRateHelper" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< Quote > * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_OvernightIndexPtr,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_OISRateHelper" "', argument " "4"" of type '" "OvernightIndexPtr const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_OISRateHelper" "', argument " "4"" of type '" "OvernightIndexPtr const &""'"); 
    }
    arg4 = reinterpret_cast< OvernightIndexPtr * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_OISRateHelper" "', argument " "5"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_OISRateHelper" "', argument " "5"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg5 = reinterpret_cast< Handle< YieldTermStructure > * >(argp5);
    ecode6 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_OISRateHelper" "', argument " "6"" of type '" "bool""'");
    } 
    arg6 = static_cast< bool >(val6);
    ecode7 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_OISRateHelper" "', argument " "7"" of type '" "Natural""'");
    } 
    arg7 = static_cast< Natural >(val7);
    ecode8 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_OISRateHelper" "', argument " "8"" of type '" "BusinessDayConvention""'");
    } 
    arg8 = static_cast< BusinessDayConvention >(val8);
    ecode9 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(8), &val9);
    if (!SWIG_IsOK(ecode9)) {
      SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "new_OISRateHelper" "', argument " "9"" of type '" "Frequency""'");
    } 
    arg9 = static_cast< Frequency >(val9);
    res10 = SWIG_ConvertPtr(ST(9), &argp10, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res10)) {
      SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "new_OISRateHelper" "', argument " "10"" of type '" "Calendar const &""'"); 
    }
    if (!argp10) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_OISRateHelper" "', argument " "10"" of type '" "Calendar const &""'"); 
    }
    arg10 = reinterpret_cast< Calendar * >(argp10);
    {
      try {
        result = (OISRateHelperPtr *)new_OISRateHelperPtr__SWIG_0(arg1,(Period const &)*arg2,(Handle< Quote > const &)*arg3,(OvernightIndexPtr const &)*arg4,(Handle< YieldTermStructure > const &)*arg5,arg6,arg7,arg8,arg9,(Calendar const &)*arg10);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OISRateHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_OISRateHelper__SWIG_3) {
  {
    Natural arg1 ;
    Period *arg2 = 0 ;
    Handle< Quote > *arg3 = 0 ;
    OvernightIndexPtr *arg4 = 0 ;
    Handle< YieldTermStructure > *arg5 = 0 ;
    bool arg6 ;
    Natural arg7 ;
    BusinessDayConvention arg8 ;
    Frequency arg9 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    bool val6 ;
    int ecode6 = 0 ;
    unsigned int val7 ;
    int ecode7 = 0 ;
    int val8 ;
    int ecode8 = 0 ;
    int val9 ;
    int ecode9 = 0 ;
    int argvi = 0;
    OISRateHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 9) || (items > 9)) {
      SWIG_croak("Usage: new_OISRateHelper(settlementDays,tenor,rate,index,discountingCurve,telescopicValueDates,paymentLag,paymentConvention,paymentFrequency);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_OISRateHelper" "', argument " "1"" of type '" "Natural""'");
    } 
    arg1 = static_cast< Natural >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_OISRateHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_OISRateHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    arg2 = reinterpret_cast< Period * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_OISRateHelper" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_OISRateHelper" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< Quote > * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_OvernightIndexPtr,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_OISRateHelper" "', argument " "4"" of type '" "OvernightIndexPtr const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_OISRateHelper" "', argument " "4"" of type '" "OvernightIndexPtr const &""'"); 
    }
    arg4 = reinterpret_cast< OvernightIndexPtr * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_OISRateHelper" "', argument " "5"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_OISRateHelper" "', argument " "5"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg5 = reinterpret_cast< Handle< YieldTermStructure > * >(argp5);
    ecode6 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_OISRateHelper" "', argument " "6"" of type '" "bool""'");
    } 
    arg6 = static_cast< bool >(val6);
    ecode7 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_OISRateHelper" "', argument " "7"" of type '" "Natural""'");
    } 
    arg7 = static_cast< Natural >(val7);
    ecode8 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_OISRateHelper" "', argument " "8"" of type '" "BusinessDayConvention""'");
    } 
    arg8 = static_cast< BusinessDayConvention >(val8);
    ecode9 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(8), &val9);
    if (!SWIG_IsOK(ecode9)) {
      SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "new_OISRateHelper" "', argument " "9"" of type '" "Frequency""'");
    } 
    arg9 = static_cast< Frequency >(val9);
    {
      try {
        result = (OISRateHelperPtr *)new_OISRateHelperPtr__SWIG_0(arg1,(Period const &)*arg2,(Handle< Quote > const &)*arg3,(OvernightIndexPtr const &)*arg4,(Handle< YieldTermStructure > const &)*arg5,arg6,arg7,arg8,arg9);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OISRateHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_OISRateHelper__SWIG_4) {
  {
    Natural arg1 ;
    Period *arg2 = 0 ;
    Handle< Quote > *arg3 = 0 ;
    OvernightIndexPtr *arg4 = 0 ;
    Handle< YieldTermStructure > *arg5 = 0 ;
    bool arg6 ;
    Natural arg7 ;
    BusinessDayConvention arg8 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    bool val6 ;
    int ecode6 = 0 ;
    unsigned int val7 ;
    int ecode7 = 0 ;
    int val8 ;
    int ecode8 = 0 ;
    int argvi = 0;
    OISRateHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 8) || (items > 8)) {
      SWIG_croak("Usage: new_OISRateHelper(settlementDays,tenor,rate,index,discountingCurve,telescopicValueDates,paymentLag,paymentConvention);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_OISRateHelper" "', argument " "1"" of type '" "Natural""'");
    } 
    arg1 = static_cast< Natural >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_OISRateHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_OISRateHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    arg2 = reinterpret_cast< Period * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_OISRateHelper" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_OISRateHelper" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< Quote > * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_OvernightIndexPtr,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_OISRateHelper" "', argument " "4"" of type '" "OvernightIndexPtr const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_OISRateHelper" "', argument " "4"" of type '" "OvernightIndexPtr const &""'"); 
    }
    arg4 = reinterpret_cast< OvernightIndexPtr * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_OISRateHelper" "', argument " "5"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_OISRateHelper" "', argument " "5"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg5 = reinterpret_cast< Handle< YieldTermStructure > * >(argp5);
    ecode6 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_OISRateHelper" "', argument " "6"" of type '" "bool""'");
    } 
    arg6 = static_cast< bool >(val6);
    ecode7 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_OISRateHelper" "', argument " "7"" of type '" "Natural""'");
    } 
    arg7 = static_cast< Natural >(val7);
    ecode8 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_OISRateHelper" "', argument " "8"" of type '" "BusinessDayConvention""'");
    } 
    arg8 = static_cast< BusinessDayConvention >(val8);
    {
      try {
        result = (OISRateHelperPtr *)new_OISRateHelperPtr__SWIG_0(arg1,(Period const &)*arg2,(Handle< Quote > const &)*arg3,(OvernightIndexPtr const &)*arg4,(Handle< YieldTermStructure > const &)*arg5,arg6,arg7,arg8);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OISRateHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_OISRateHelper__SWIG_5) {
  {
    Natural arg1 ;
    Period *arg2 = 0 ;
    Handle< Quote > *arg3 = 0 ;
    OvernightIndexPtr *arg4 = 0 ;
    Handle< YieldTermStructure > *arg5 = 0 ;
    bool arg6 ;
    Natural arg7 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    bool val6 ;
    int ecode6 = 0 ;
    unsigned int val7 ;
    int ecode7 = 0 ;
    int argvi = 0;
    OISRateHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: new_OISRateHelper(settlementDays,tenor,rate,index,discountingCurve,telescopicValueDates,paymentLag);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_OISRateHelper" "', argument " "1"" of type '" "Natural""'");
    } 
    arg1 = static_cast< Natural >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_OISRateHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_OISRateHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    arg2 = reinterpret_cast< Period * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_OISRateHelper" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_OISRateHelper" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< Quote > * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_OvernightIndexPtr,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_OISRateHelper" "', argument " "4"" of type '" "OvernightIndexPtr const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_OISRateHelper" "', argument " "4"" of type '" "OvernightIndexPtr const &""'"); 
    }
    arg4 = reinterpret_cast< OvernightIndexPtr * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_OISRateHelper" "', argument " "5"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_OISRateHelper" "', argument " "5"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg5 = reinterpret_cast< Handle< YieldTermStructure > * >(argp5);
    ecode6 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_OISRateHelper" "', argument " "6"" of type '" "bool""'");
    } 
    arg6 = static_cast< bool >(val6);
    ecode7 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_OISRateHelper" "', argument " "7"" of type '" "Natural""'");
    } 
    arg7 = static_cast< Natural >(val7);
    {
      try {
        result = (OISRateHelperPtr *)new_OISRateHelperPtr__SWIG_0(arg1,(Period const &)*arg2,(Handle< Quote > const &)*arg3,(OvernightIndexPtr const &)*arg4,(Handle< YieldTermStructure > const &)*arg5,arg6,arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OISRateHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_OISRateHelper__SWIG_6) {
  {
    Natural arg1 ;
    Period *arg2 = 0 ;
    Handle< Quote > *arg3 = 0 ;
    OvernightIndexPtr *arg4 = 0 ;
    Handle< YieldTermStructure > *arg5 = 0 ;
    bool arg6 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    bool val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    OISRateHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_OISRateHelper(settlementDays,tenor,rate,index,discountingCurve,telescopicValueDates);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_OISRateHelper" "', argument " "1"" of type '" "Natural""'");
    } 
    arg1 = static_cast< Natural >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_OISRateHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_OISRateHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    arg2 = reinterpret_cast< Period * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_OISRateHelper" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_OISRateHelper" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< Quote > * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_OvernightIndexPtr,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_OISRateHelper" "', argument " "4"" of type '" "OvernightIndexPtr const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_OISRateHelper" "', argument " "4"" of type '" "OvernightIndexPtr const &""'"); 
    }
    arg4 = reinterpret_cast< OvernightIndexPtr * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_OISRateHelper" "', argument " "5"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_OISRateHelper" "', argument " "5"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg5 = reinterpret_cast< Handle< YieldTermStructure > * >(argp5);
    ecode6 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_OISRateHelper" "', argument " "6"" of type '" "bool""'");
    } 
    arg6 = static_cast< bool >(val6);
    {
      try {
        result = (OISRateHelperPtr *)new_OISRateHelperPtr__SWIG_0(arg1,(Period const &)*arg2,(Handle< Quote > const &)*arg3,(OvernightIndexPtr const &)*arg4,(Handle< YieldTermStructure > const &)*arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OISRateHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_OISRateHelper__SWIG_7) {
  {
    Natural arg1 ;
    Period *arg2 = 0 ;
    Handle< Quote > *arg3 = 0 ;
    OvernightIndexPtr *arg4 = 0 ;
    Handle< YieldTermStructure > *arg5 = 0 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int argvi = 0;
    OISRateHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_OISRateHelper(settlementDays,tenor,rate,index,discountingCurve);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_OISRateHelper" "', argument " "1"" of type '" "Natural""'");
    } 
    arg1 = static_cast< Natural >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_OISRateHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_OISRateHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    arg2 = reinterpret_cast< Period * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_OISRateHelper" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_OISRateHelper" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< Quote > * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_OvernightIndexPtr,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_OISRateHelper" "', argument " "4"" of type '" "OvernightIndexPtr const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_OISRateHelper" "', argument " "4"" of type '" "OvernightIndexPtr const &""'"); 
    }
    arg4 = reinterpret_cast< OvernightIndexPtr * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_OISRateHelper" "', argument " "5"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_OISRateHelper" "', argument " "5"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg5 = reinterpret_cast< Handle< YieldTermStructure > * >(argp5);
    {
      try {
        result = (OISRateHelperPtr *)new_OISRateHelperPtr__SWIG_0(arg1,(Period const &)*arg2,(Handle< Quote > const &)*arg3,(OvernightIndexPtr const &)*arg4,(Handle< YieldTermStructure > const &)*arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OISRateHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_OISRateHelper__SWIG_8) {
  {
    Natural arg1 ;
    Period *arg2 = 0 ;
    Handle< Quote > *arg3 = 0 ;
    OvernightIndexPtr *arg4 = 0 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int argvi = 0;
    OISRateHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_OISRateHelper(settlementDays,tenor,rate,index);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_OISRateHelper" "', argument " "1"" of type '" "Natural""'");
    } 
    arg1 = static_cast< Natural >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_OISRateHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_OISRateHelper" "', argument " "2"" of type '" "Period const &""'"); 
    }
    arg2 = reinterpret_cast< Period * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_OISRateHelper" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_OISRateHelper" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< Quote > * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_OvernightIndexPtr,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_OISRateHelper" "', argument " "4"" of type '" "OvernightIndexPtr const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_OISRateHelper" "', argument " "4"" of type '" "OvernightIndexPtr const &""'"); 
    }
    arg4 = reinterpret_cast< OvernightIndexPtr * >(argp4);
    {
      try {
        result = (OISRateHelperPtr *)new_OISRateHelperPtr__SWIG_0(arg1,(Period const &)*arg2,(Handle< Quote > const &)*arg3,(OvernightIndexPtr const &)*arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OISRateHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_OISRateHelper) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_OvernightIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_OvernightIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_OvernightIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_OvernightIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 8) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_OvernightIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 9) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_OvernightIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(8), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
    if (items == 10) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_OvernightIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(8), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(9), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 7;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_7:
    
    if (items == 11) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_OvernightIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(8), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(9), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(10), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 8;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_8:
    
    if (items == 12) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_OvernightIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(8), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(9), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(10), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(11), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 9;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_9:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_OISRateHelper__SWIG_8); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_OISRateHelper__SWIG_7); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_OISRateHelper__SWIG_6); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_OISRateHelper__SWIG_5); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_OISRateHelper__SWIG_4); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_OISRateHelper__SWIG_3); return;
    case 7:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_OISRateHelper__SWIG_2); return;
    case 8:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_OISRateHelper__SWIG_1); return;
    case 9:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_OISRateHelper__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_OISRateHelper'");
  XSRETURN(0);
}


XS(_wrap_delete_OISRateHelper) {
  {
    OISRateHelperPtr *arg1 = (OISRateHelperPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_OISRateHelper(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OISRateHelperPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_OISRateHelper" "', argument " "1"" of type '" "OISRateHelperPtr *""'"); 
    }
    arg1 = reinterpret_cast< OISRateHelperPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DatedOISRateHelper__SWIG_0) {
  {
    Date *arg1 = 0 ;
    Date *arg2 = 0 ;
    Handle< Quote > *arg3 = 0 ;
    OvernightIndexPtr *arg4 = 0 ;
    Handle< YieldTermStructure > *arg5 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int argvi = 0;
    DatedOISRateHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_DatedOISRateHelper(startDate,endDate,rate,index,discountingCurve);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DatedOISRateHelper" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DatedOISRateHelper" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_DatedOISRateHelper" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DatedOISRateHelper" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_DatedOISRateHelper" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DatedOISRateHelper" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< Quote > * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_OvernightIndexPtr,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_DatedOISRateHelper" "', argument " "4"" of type '" "OvernightIndexPtr const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DatedOISRateHelper" "', argument " "4"" of type '" "OvernightIndexPtr const &""'"); 
    }
    arg4 = reinterpret_cast< OvernightIndexPtr * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_DatedOISRateHelper" "', argument " "5"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DatedOISRateHelper" "', argument " "5"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg5 = reinterpret_cast< Handle< YieldTermStructure > * >(argp5);
    {
      try {
        result = (DatedOISRateHelperPtr *)new_DatedOISRateHelperPtr__SWIG_0((Date const &)*arg1,(Date const &)*arg2,(Handle< Quote > const &)*arg3,(OvernightIndexPtr const &)*arg4,(Handle< YieldTermStructure > const &)*arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DatedOISRateHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DatedOISRateHelper__SWIG_1) {
  {
    Date *arg1 = 0 ;
    Date *arg2 = 0 ;
    Handle< Quote > *arg3 = 0 ;
    OvernightIndexPtr *arg4 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int argvi = 0;
    DatedOISRateHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_DatedOISRateHelper(startDate,endDate,rate,index);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DatedOISRateHelper" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DatedOISRateHelper" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_DatedOISRateHelper" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DatedOISRateHelper" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_DatedOISRateHelper" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DatedOISRateHelper" "', argument " "3"" of type '" "Handle< Quote > const &""'"); 
    }
    arg3 = reinterpret_cast< Handle< Quote > * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_OvernightIndexPtr,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_DatedOISRateHelper" "', argument " "4"" of type '" "OvernightIndexPtr const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DatedOISRateHelper" "', argument " "4"" of type '" "OvernightIndexPtr const &""'"); 
    }
    arg4 = reinterpret_cast< OvernightIndexPtr * >(argp4);
    {
      try {
        result = (DatedOISRateHelperPtr *)new_DatedOISRateHelperPtr__SWIG_0((Date const &)*arg1,(Date const &)*arg2,(Handle< Quote > const &)*arg3,(OvernightIndexPtr const &)*arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DatedOISRateHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DatedOISRateHelper) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_OvernightIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_OvernightIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DatedOISRateHelper__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DatedOISRateHelper__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_DatedOISRateHelper'");
  XSRETURN(0);
}


XS(_wrap_delete_DatedOISRateHelper) {
  {
    DatedOISRateHelperPtr *arg1 = (DatedOISRateHelperPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_DatedOISRateHelper(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_DatedOISRateHelperPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DatedOISRateHelper" "', argument " "1"" of type '" "DatedOISRateHelperPtr *""'"); 
    }
    arg1 = reinterpret_cast< DatedOISRateHelperPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FxSwapRateHelper__SWIG_0) {
  {
    Handle< Quote > *arg1 = 0 ;
    Handle< Quote > *arg2 = 0 ;
    Period *arg3 = 0 ;
    Natural arg4 ;
    Calendar *arg5 = 0 ;
    BusinessDayConvention arg6 ;
    bool arg7 ;
    bool arg8 ;
    Handle< YieldTermStructure > *arg9 = 0 ;
    Calendar *arg10 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    unsigned int val4 ;
    int ecode4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    bool val7 ;
    int ecode7 = 0 ;
    bool val8 ;
    int ecode8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    void *argp10 ;
    int res10 = 0 ;
    int argvi = 0;
    FxSwapRateHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 10) || (items > 10)) {
      SWIG_croak("Usage: new_FxSwapRateHelper(fwdPoint,spotFx,tenor,fixingDays,calendar,convention,endOfMonth,isFxBaseCurrencyCollateralCurrency,coll,tradingCalendar);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FxSwapRateHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FxSwapRateHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< Quote > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FxSwapRateHelper" "', argument " "2"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FxSwapRateHelper" "', argument " "2"" of type '" "Handle< Quote > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< Quote > * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FxSwapRateHelper" "', argument " "3"" of type '" "Period const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FxSwapRateHelper" "', argument " "3"" of type '" "Period const &""'"); 
    }
    arg3 = reinterpret_cast< Period * >(argp3);
    ecode4 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_FxSwapRateHelper" "', argument " "4"" of type '" "Natural""'");
    } 
    arg4 = static_cast< Natural >(val4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_FxSwapRateHelper" "', argument " "5"" of type '" "Calendar const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FxSwapRateHelper" "', argument " "5"" of type '" "Calendar const &""'"); 
    }
    arg5 = reinterpret_cast< Calendar * >(argp5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_FxSwapRateHelper" "', argument " "6"" of type '" "BusinessDayConvention""'");
    } 
    arg6 = static_cast< BusinessDayConvention >(val6);
    ecode7 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_FxSwapRateHelper" "', argument " "7"" of type '" "bool""'");
    } 
    arg7 = static_cast< bool >(val7);
    ecode8 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_FxSwapRateHelper" "', argument " "8"" of type '" "bool""'");
    } 
    arg8 = static_cast< bool >(val8);
    res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res9)) {
      SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_FxSwapRateHelper" "', argument " "9"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp9) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FxSwapRateHelper" "', argument " "9"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg9 = reinterpret_cast< Handle< YieldTermStructure > * >(argp9);
    res10 = SWIG_ConvertPtr(ST(9), &argp10, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res10)) {
      SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "new_FxSwapRateHelper" "', argument " "10"" of type '" "Calendar const &""'"); 
    }
    if (!argp10) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FxSwapRateHelper" "', argument " "10"" of type '" "Calendar const &""'"); 
    }
    arg10 = reinterpret_cast< Calendar * >(argp10);
    {
      try {
        result = (FxSwapRateHelperPtr *)new_FxSwapRateHelperPtr__SWIG_0((Handle< Quote > const &)*arg1,(Handle< Quote > const &)*arg2,(Period const &)*arg3,arg4,(Calendar const &)*arg5,arg6,arg7,arg8,(Handle< YieldTermStructure > const &)*arg9,(Calendar const &)*arg10);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FxSwapRateHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FxSwapRateHelper__SWIG_1) {
  {
    Handle< Quote > *arg1 = 0 ;
    Handle< Quote > *arg2 = 0 ;
    Period *arg3 = 0 ;
    Natural arg4 ;
    Calendar *arg5 = 0 ;
    BusinessDayConvention arg6 ;
    bool arg7 ;
    bool arg8 ;
    Handle< YieldTermStructure > *arg9 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    unsigned int val4 ;
    int ecode4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    bool val7 ;
    int ecode7 = 0 ;
    bool val8 ;
    int ecode8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    int argvi = 0;
    FxSwapRateHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 9) || (items > 9)) {
      SWIG_croak("Usage: new_FxSwapRateHelper(fwdPoint,spotFx,tenor,fixingDays,calendar,convention,endOfMonth,isFxBaseCurrencyCollateralCurrency,coll);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FxSwapRateHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FxSwapRateHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< Quote > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FxSwapRateHelper" "', argument " "2"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FxSwapRateHelper" "', argument " "2"" of type '" "Handle< Quote > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< Quote > * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FxSwapRateHelper" "', argument " "3"" of type '" "Period const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FxSwapRateHelper" "', argument " "3"" of type '" "Period const &""'"); 
    }
    arg3 = reinterpret_cast< Period * >(argp3);
    ecode4 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_FxSwapRateHelper" "', argument " "4"" of type '" "Natural""'");
    } 
    arg4 = static_cast< Natural >(val4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_FxSwapRateHelper" "', argument " "5"" of type '" "Calendar const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FxSwapRateHelper" "', argument " "5"" of type '" "Calendar const &""'"); 
    }
    arg5 = reinterpret_cast< Calendar * >(argp5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_FxSwapRateHelper" "', argument " "6"" of type '" "BusinessDayConvention""'");
    } 
    arg6 = static_cast< BusinessDayConvention >(val6);
    ecode7 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_FxSwapRateHelper" "', argument " "7"" of type '" "bool""'");
    } 
    arg7 = static_cast< bool >(val7);
    ecode8 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_FxSwapRateHelper" "', argument " "8"" of type '" "bool""'");
    } 
    arg8 = static_cast< bool >(val8);
    res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res9)) {
      SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_FxSwapRateHelper" "', argument " "9"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp9) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FxSwapRateHelper" "', argument " "9"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg9 = reinterpret_cast< Handle< YieldTermStructure > * >(argp9);
    {
      try {
        result = (FxSwapRateHelperPtr *)new_FxSwapRateHelperPtr__SWIG_0((Handle< Quote > const &)*arg1,(Handle< Quote > const &)*arg2,(Period const &)*arg3,arg4,(Calendar const &)*arg5,arg6,arg7,arg8,(Handle< YieldTermStructure > const &)*arg9);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FxSwapRateHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FxSwapRateHelper__SWIG_2) {
  {
    Handle< Quote > *arg1 = 0 ;
    Handle< Quote > *arg2 = 0 ;
    Period *arg3 = 0 ;
    Natural arg4 ;
    Calendar *arg5 = 0 ;
    BusinessDayConvention arg6 ;
    bool arg7 ;
    bool arg8 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    unsigned int val4 ;
    int ecode4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    bool val7 ;
    int ecode7 = 0 ;
    bool val8 ;
    int ecode8 = 0 ;
    int argvi = 0;
    FxSwapRateHelperPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 8) || (items > 8)) {
      SWIG_croak("Usage: new_FxSwapRateHelper(fwdPoint,spotFx,tenor,fixingDays,calendar,convention,endOfMonth,isFxBaseCurrencyCollateralCurrency);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FxSwapRateHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FxSwapRateHelper" "', argument " "1"" of type '" "Handle< Quote > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< Quote > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FxSwapRateHelper" "', argument " "2"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FxSwapRateHelper" "', argument " "2"" of type '" "Handle< Quote > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< Quote > * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FxSwapRateHelper" "', argument " "3"" of type '" "Period const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FxSwapRateHelper" "', argument " "3"" of type '" "Period const &""'"); 
    }
    arg3 = reinterpret_cast< Period * >(argp3);
    ecode4 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_FxSwapRateHelper" "', argument " "4"" of type '" "Natural""'");
    } 
    arg4 = static_cast< Natural >(val4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_FxSwapRateHelper" "', argument " "5"" of type '" "Calendar const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FxSwapRateHelper" "', argument " "5"" of type '" "Calendar const &""'"); 
    }
    arg5 = reinterpret_cast< Calendar * >(argp5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_FxSwapRateHelper" "', argument " "6"" of type '" "BusinessDayConvention""'");
    } 
    arg6 = static_cast< BusinessDayConvention >(val6);
    ecode7 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_FxSwapRateHelper" "', argument " "7"" of type '" "bool""'");
    } 
    arg7 = static_cast< bool >(val7);
    ecode8 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_FxSwapRateHelper" "', argument " "8"" of type '" "bool""'");
    } 
    arg8 = static_cast< bool >(val8);
    {
      try {
        result = (FxSwapRateHelperPtr *)new_FxSwapRateHelperPtr__SWIG_0((Handle< Quote > const &)*arg1,(Handle< Quote > const &)*arg2,(Period const &)*arg3,arg4,(Calendar const &)*arg5,arg6,arg7,arg8);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FxSwapRateHelperPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FxSwapRateHelper) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 8) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 9) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 10) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(9), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FxSwapRateHelper__SWIG_2); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FxSwapRateHelper__SWIG_1); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FxSwapRateHelper__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_FxSwapRateHelper'");
  XSRETURN(0);
}


XS(_wrap_delete_FxSwapRateHelper) {
  {
    FxSwapRateHelperPtr *arg1 = (FxSwapRateHelperPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_FxSwapRateHelper(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_FxSwapRateHelperPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FxSwapRateHelper" "', argument " "1"" of type '" "FxSwapRateHelperPtr *""'"); 
    }
    arg1 = reinterpret_cast< FxSwapRateHelperPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_RateHelperVector__SWIG_0) {
  {
    unsigned int arg1 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    std::vector< boost::shared_ptr< RateHelper > > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_RateHelperVector(size);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_RateHelperVector" "', argument " "1"" of type '" "unsigned int""'");
    } 
    arg1 = static_cast< unsigned int >(val1);
    {
      try {
        result = (std::vector< boost::shared_ptr< RateHelper > > *)new std::vector< boost::shared_ptr< RateHelper > >(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_RateHelperVector__SWIG_1) {
  {
    int argvi = 0;
    std::vector< boost::shared_ptr< RateHelper > > *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_RateHelperVector();");
    }
    {
      try {
        result = (std::vector< boost::shared_ptr< RateHelper > > *)new std::vector< boost::shared_ptr< RateHelper > >();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_RateHelperVector__SWIG_2) {
  {
    unsigned int arg1 ;
    boost::shared_ptr< RateHelper > *arg2 = 0 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    std::vector< boost::shared_ptr< RateHelper > > *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_RateHelperVector(size,value);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_RateHelperVector" "', argument " "1"" of type '" "unsigned int""'");
    } 
    arg1 = static_cast< unsigned int >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_RateHelperVector" "', argument " "2"" of type '" "boost::shared_ptr< RateHelper > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_RateHelperVector" "', argument " "2"" of type '" "boost::shared_ptr< RateHelper > const &""'"); 
    }
    arg2 = reinterpret_cast< boost::shared_ptr< RateHelper > * >(argp2);
    {
      try {
        result = (std::vector< boost::shared_ptr< RateHelper > > *)new std::vector< boost::shared_ptr< RateHelper > >(arg1,(boost::shared_ptr< RateHelper > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_RateHelperVector__SWIG_3) {
  {
    std::vector< boost::shared_ptr< RateHelper > > *arg1 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > temp1 ;
    std::vector< boost::shared_ptr< RateHelper > > *v1 ;
    int argvi = 0;
    std::vector< boost::shared_ptr< RateHelper > > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_RateHelperVector(std::vector< boost::shared_ptr< RateHelper > > const &);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_RateHelperVector. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< RateHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_RateHelperVector. "
              "Expected an array of " "boost::shared_ptr< RateHelper >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_RateHelperVector. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
      }
    }
    {
      try {
        result = (std::vector< boost::shared_ptr< RateHelper > > *)new std::vector< boost::shared_ptr< RateHelper > >((std::vector< boost::shared_ptr< RateHelper > > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_RateHelperVector) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< RateHelper > >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< RateHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_boost__shared_ptrT_RateHelper_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_RateHelperVector__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_RateHelperVector__SWIG_0); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_RateHelperVector__SWIG_3); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_RateHelperVector__SWIG_2); return;
    }
  }
  
  croak("No matching function for overloaded 'new_RateHelperVector'");
  XSRETURN(0);
}


XS(_wrap_RateHelperVector_size) {
  {
    std::vector< boost::shared_ptr< RateHelper > > *arg1 = (std::vector< boost::shared_ptr< RateHelper > > *) 0 ;
    std::vector< boost::shared_ptr< RateHelper > > temp1 ;
    std::vector< boost::shared_ptr< RateHelper > > *v1 ;
    int argvi = 0;
    unsigned int result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: RateHelperVector_size(self);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of RateHelperVector_size. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< RateHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "RateHelperVector_size. "
              "Expected an array of " "boost::shared_ptr< RateHelper >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of RateHelperVector_size. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
      }
    }
    {
      try {
        result = (unsigned int)((std::vector< boost::shared_ptr< RateHelper > > const *)arg1)->size();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_RateHelperVector_empty) {
  {
    std::vector< boost::shared_ptr< RateHelper > > *arg1 = (std::vector< boost::shared_ptr< RateHelper > > *) 0 ;
    std::vector< boost::shared_ptr< RateHelper > > temp1 ;
    std::vector< boost::shared_ptr< RateHelper > > *v1 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: RateHelperVector_empty(self);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of RateHelperVector_empty. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< RateHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "RateHelperVector_empty. "
              "Expected an array of " "boost::shared_ptr< RateHelper >");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of RateHelperVector_empty. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
      }
    }
    {
      try {
        result = (bool)((std::vector< boost::shared_ptr< RateHelper > > const *)arg1)->empty();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_RateHelperVector_clear) {
  {
    std::vector< boost::shared_ptr< RateHelper > > *arg1 = (std::vector< boost::shared_ptr< RateHelper > > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: RateHelperVector_clear(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RateHelperVector_clear" "', argument " "1"" of type '" "std::vector< boost::shared_ptr< RateHelper > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< boost::shared_ptr< RateHelper > > * >(argp1);
    {
      try {
        (arg1)->clear();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_RateHelperVector_push) {
  {
    std::vector< boost::shared_ptr< RateHelper > > *arg1 = (std::vector< boost::shared_ptr< RateHelper > > *) 0 ;
    boost::shared_ptr< RateHelper > *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: RateHelperVector_push(self,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RateHelperVector_push" "', argument " "1"" of type '" "std::vector< boost::shared_ptr< RateHelper > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< boost::shared_ptr< RateHelper > > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "RateHelperVector_push" "', argument " "2"" of type '" "boost::shared_ptr< RateHelper > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "RateHelperVector_push" "', argument " "2"" of type '" "boost::shared_ptr< RateHelper > const &""'"); 
    }
    arg2 = reinterpret_cast< boost::shared_ptr< RateHelper > * >(argp2);
    {
      try {
        (arg1)->push_back((boost::shared_ptr< RateHelper > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_RateHelperVector_pop) {
  {
    std::vector< boost::shared_ptr< RateHelper > > *arg1 = (std::vector< boost::shared_ptr< RateHelper > > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    boost::shared_ptr< RateHelper > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: RateHelperVector_pop(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RateHelperVector_pop" "', argument " "1"" of type '" "std::vector< boost::shared_ptr< RateHelper > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< boost::shared_ptr< RateHelper > > * >(argp1);
    {
      try {
        try {
          result = std_vector_Sl_boost_shared_ptr_Sl_RateHelper_Sg__Sg__pop(arg1);
        }
        catch(std::out_of_range &_e) {
          sv_setsv(get_sv("@", GV_ADD), SWIG_NewPointerObj((new std::out_of_range(static_cast< const std::out_of_range& >(_e))),SWIGTYPE_p_std__out_of_range,SWIG_POINTER_OWN)); SWIG_fail ;
        }
        
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new boost::shared_ptr< RateHelper >(static_cast< const boost::shared_ptr< RateHelper >& >(result))), SWIGTYPE_p_boost__shared_ptrT_RateHelper_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_RateHelperVector_get) {
  {
    std::vector< boost::shared_ptr< RateHelper > > *arg1 = (std::vector< boost::shared_ptr< RateHelper > > *) 0 ;
    int arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    boost::shared_ptr< RateHelper > *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: RateHelperVector_get(self,i);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RateHelperVector_get" "', argument " "1"" of type '" "std::vector< boost::shared_ptr< RateHelper > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< boost::shared_ptr< RateHelper > > * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RateHelperVector_get" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    {
      try {
        try {
          result = (boost::shared_ptr< RateHelper > *) &std_vector_Sl_boost_shared_ptr_Sl_RateHelper_Sg__Sg__get(arg1,arg2);
        }
        catch(std::out_of_range &_e) {
          sv_setsv(get_sv("@", GV_ADD), SWIG_NewPointerObj((new std::out_of_range(static_cast< const std::out_of_range& >(_e))),SWIGTYPE_p_std__out_of_range,SWIG_POINTER_OWN)); SWIG_fail ;
        }
        
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_boost__shared_ptrT_RateHelper_t, 0 | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_RateHelperVector_set) {
  {
    std::vector< boost::shared_ptr< RateHelper > > *arg1 = (std::vector< boost::shared_ptr< RateHelper > > *) 0 ;
    int arg2 ;
    boost::shared_ptr< RateHelper > *arg3 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: RateHelperVector_set(self,i,x);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RateHelperVector_set" "', argument " "1"" of type '" "std::vector< boost::shared_ptr< RateHelper > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< boost::shared_ptr< RateHelper > > * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RateHelperVector_set" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "RateHelperVector_set" "', argument " "3"" of type '" "boost::shared_ptr< RateHelper > const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "RateHelperVector_set" "', argument " "3"" of type '" "boost::shared_ptr< RateHelper > const &""'"); 
    }
    arg3 = reinterpret_cast< boost::shared_ptr< RateHelper > * >(argp3);
    {
      try {
        try {
          std_vector_Sl_boost_shared_ptr_Sl_RateHelper_Sg__Sg__set(arg1,arg2,(boost::shared_ptr< RateHelper > const &)*arg3);
        }
        catch(std::out_of_range &_e) {
          sv_setsv(get_sv("@", GV_ADD), SWIG_NewPointerObj((new std::out_of_range(static_cast< const std::out_of_range& >(_e))),SWIGTYPE_p_std__out_of_range,SWIG_POINTER_OWN)); SWIG_fail ;
        }
        
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_RateHelperVector) {
  {
    std::vector< boost::shared_ptr< RateHelper > > *arg1 = (std::vector< boost::shared_ptr< RateHelper > > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_RateHelperVector(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_RateHelperVector" "', argument " "1"" of type '" "std::vector< boost::shared_ptr< RateHelper > > *""'"); 
    }
    arg1 = reinterpret_cast< std::vector< boost::shared_ptr< RateHelper > > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_FittingMethod) {
  {
    FittingMethod *arg1 = (FittingMethod *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_FittingMethod(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_FittingMethod, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FittingMethod" "', argument " "1"" of type '" "FittingMethod *""'"); 
    }
    arg1 = reinterpret_cast< FittingMethod * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_FittingMethod_size) {
  {
    FittingMethod *arg1 = (FittingMethod *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Size result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: FittingMethod_size(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_FittingMethod, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FittingMethod_size" "', argument " "1"" of type '" "FittingMethod const *""'"); 
    }
    arg1 = reinterpret_cast< FittingMethod * >(argp1);
    {
      try {
        result = ((FittingMethod const *)arg1)->size();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_size_t  SWIG_PERL_CALL_ARGS_1(static_cast< size_t >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_FittingMethod_solution) {
  {
    FittingMethod *arg1 = (FittingMethod *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Array result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: FittingMethod_solution(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_FittingMethod, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FittingMethod_solution" "', argument " "1"" of type '" "FittingMethod const *""'"); 
    }
    arg1 = reinterpret_cast< FittingMethod * >(argp1);
    {
      try {
        result = ((FittingMethod const *)arg1)->solution();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Array(static_cast< const Array& >(result))), SWIGTYPE_p_Array, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_FittingMethod_numberOfIterations) {
  {
    FittingMethod *arg1 = (FittingMethod *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Integer result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: FittingMethod_numberOfIterations(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_FittingMethod, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FittingMethod_numberOfIterations" "', argument " "1"" of type '" "FittingMethod const *""'"); 
    }
    arg1 = reinterpret_cast< FittingMethod * >(argp1);
    {
      try {
        result = (Integer)((FittingMethod const *)arg1)->numberOfIterations();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_FittingMethod_minimumCostValue) {
  {
    FittingMethod *arg1 = (FittingMethod *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: FittingMethod_minimumCostValue(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_FittingMethod, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FittingMethod_minimumCostValue" "', argument " "1"" of type '" "FittingMethod const *""'"); 
    }
    arg1 = reinterpret_cast< FittingMethod * >(argp1);
    {
      try {
        result = (Real)((FittingMethod const *)arg1)->minimumCostValue();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_FittingMethod_constrainAtZero) {
  {
    FittingMethod *arg1 = (FittingMethod *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: FittingMethod_constrainAtZero(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_FittingMethod, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FittingMethod_constrainAtZero" "', argument " "1"" of type '" "FittingMethod const *""'"); 
    }
    arg1 = reinterpret_cast< FittingMethod * >(argp1);
    {
      try {
        result = (bool)((FittingMethod const *)arg1)->constrainAtZero();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_FittingMethod_weights) {
  {
    FittingMethod *arg1 = (FittingMethod *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Array result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: FittingMethod_weights(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_FittingMethod, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FittingMethod_weights" "', argument " "1"" of type '" "FittingMethod const *""'"); 
    }
    arg1 = reinterpret_cast< FittingMethod * >(argp1);
    {
      try {
        result = ((FittingMethod const *)arg1)->weights();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Array(static_cast< const Array& >(result))), SWIGTYPE_p_Array, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FittedBondDiscountCurve__SWIG_0) {
  {
    Natural arg1 ;
    Calendar *arg2 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    FittingMethod *arg5 = 0 ;
    Real arg6 ;
    Size arg7 ;
    Array *arg8 = 0 ;
    Real arg9 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > temp3 ;
    std::vector< boost::shared_ptr< RateHelper > > *v3 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    double val6 ;
    int ecode6 = 0 ;
    size_t val7 ;
    int ecode7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    double val9 ;
    int ecode9 = 0 ;
    int argvi = 0;
    FittedBondDiscountCurvePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 9) || (items > 9)) {
      SWIG_croak("Usage: new_FittedBondDiscountCurve(settlementDays,calendar,helpers,dayCounter,fittingMethod,accuracy,maxEvaluations,guess,simplexLambda);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FittedBondDiscountCurve" "', argument " "1"" of type '" "Natural""'");
    } 
    arg1 = static_cast< Natural >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FittedBondDiscountCurve" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FittedBondDiscountCurve" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_FittedBondDiscountCurve. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< RateHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1) {
            temp3.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_FittedBondDiscountCurve. "
              "Expected an array of " "boost::shared_ptr< RateHelper >");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_FittedBondDiscountCurve. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
      }
    }
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FittedBondDiscountCurve" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FittedBondDiscountCurve" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_FittingMethod,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_FittedBondDiscountCurve" "', argument " "5"" of type '" "FittingMethod const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FittedBondDiscountCurve" "', argument " "5"" of type '" "FittingMethod const &""'"); 
    }
    arg5 = reinterpret_cast< FittingMethod * >(argp5);
    ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_FittedBondDiscountCurve" "', argument " "6"" of type '" "Real""'");
    } 
    arg6 = static_cast< Real >(val6);
    ecode7 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_FittedBondDiscountCurve" "', argument " "7"" of type '" "Size""'");
    } 
    arg7 = static_cast< Size >(val7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_FittedBondDiscountCurve" "', argument " "8"" of type '" "Array const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FittedBondDiscountCurve" "', argument " "8"" of type '" "Array const &""'"); 
    }
    arg8 = reinterpret_cast< Array * >(argp8);
    ecode9 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(8), &val9);
    if (!SWIG_IsOK(ecode9)) {
      SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "new_FittedBondDiscountCurve" "', argument " "9"" of type '" "Real""'");
    } 
    arg9 = static_cast< Real >(val9);
    {
      try {
        result = (FittedBondDiscountCurvePtr *)new_FittedBondDiscountCurvePtr__SWIG_0(arg1,(Calendar const &)*arg2,(std::vector< boost::shared_ptr< RateHelper > > const &)*arg3,(DayCounter const &)*arg4,(FittingMethod const &)*arg5,arg6,arg7,(Array const &)*arg8,arg9);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FittedBondDiscountCurvePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FittedBondDiscountCurve__SWIG_1) {
  {
    Natural arg1 ;
    Calendar *arg2 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    FittingMethod *arg5 = 0 ;
    Real arg6 ;
    Size arg7 ;
    Array *arg8 = 0 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > temp3 ;
    std::vector< boost::shared_ptr< RateHelper > > *v3 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    double val6 ;
    int ecode6 = 0 ;
    size_t val7 ;
    int ecode7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    int argvi = 0;
    FittedBondDiscountCurvePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 8) || (items > 8)) {
      SWIG_croak("Usage: new_FittedBondDiscountCurve(settlementDays,calendar,helpers,dayCounter,fittingMethod,accuracy,maxEvaluations,guess);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FittedBondDiscountCurve" "', argument " "1"" of type '" "Natural""'");
    } 
    arg1 = static_cast< Natural >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FittedBondDiscountCurve" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FittedBondDiscountCurve" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_FittedBondDiscountCurve. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< RateHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1) {
            temp3.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_FittedBondDiscountCurve. "
              "Expected an array of " "boost::shared_ptr< RateHelper >");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_FittedBondDiscountCurve. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
      }
    }
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FittedBondDiscountCurve" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FittedBondDiscountCurve" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_FittingMethod,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_FittedBondDiscountCurve" "', argument " "5"" of type '" "FittingMethod const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FittedBondDiscountCurve" "', argument " "5"" of type '" "FittingMethod const &""'"); 
    }
    arg5 = reinterpret_cast< FittingMethod * >(argp5);
    ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_FittedBondDiscountCurve" "', argument " "6"" of type '" "Real""'");
    } 
    arg6 = static_cast< Real >(val6);
    ecode7 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_FittedBondDiscountCurve" "', argument " "7"" of type '" "Size""'");
    } 
    arg7 = static_cast< Size >(val7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_FittedBondDiscountCurve" "', argument " "8"" of type '" "Array const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FittedBondDiscountCurve" "', argument " "8"" of type '" "Array const &""'"); 
    }
    arg8 = reinterpret_cast< Array * >(argp8);
    {
      try {
        result = (FittedBondDiscountCurvePtr *)new_FittedBondDiscountCurvePtr__SWIG_0(arg1,(Calendar const &)*arg2,(std::vector< boost::shared_ptr< RateHelper > > const &)*arg3,(DayCounter const &)*arg4,(FittingMethod const &)*arg5,arg6,arg7,(Array const &)*arg8);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FittedBondDiscountCurvePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FittedBondDiscountCurve__SWIG_2) {
  {
    Natural arg1 ;
    Calendar *arg2 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    FittingMethod *arg5 = 0 ;
    Real arg6 ;
    Size arg7 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > temp3 ;
    std::vector< boost::shared_ptr< RateHelper > > *v3 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    double val6 ;
    int ecode6 = 0 ;
    size_t val7 ;
    int ecode7 = 0 ;
    int argvi = 0;
    FittedBondDiscountCurvePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: new_FittedBondDiscountCurve(settlementDays,calendar,helpers,dayCounter,fittingMethod,accuracy,maxEvaluations);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FittedBondDiscountCurve" "', argument " "1"" of type '" "Natural""'");
    } 
    arg1 = static_cast< Natural >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FittedBondDiscountCurve" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FittedBondDiscountCurve" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_FittedBondDiscountCurve. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< RateHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1) {
            temp3.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_FittedBondDiscountCurve. "
              "Expected an array of " "boost::shared_ptr< RateHelper >");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_FittedBondDiscountCurve. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
      }
    }
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FittedBondDiscountCurve" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FittedBondDiscountCurve" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_FittingMethod,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_FittedBondDiscountCurve" "', argument " "5"" of type '" "FittingMethod const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FittedBondDiscountCurve" "', argument " "5"" of type '" "FittingMethod const &""'"); 
    }
    arg5 = reinterpret_cast< FittingMethod * >(argp5);
    ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_FittedBondDiscountCurve" "', argument " "6"" of type '" "Real""'");
    } 
    arg6 = static_cast< Real >(val6);
    ecode7 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_FittedBondDiscountCurve" "', argument " "7"" of type '" "Size""'");
    } 
    arg7 = static_cast< Size >(val7);
    {
      try {
        result = (FittedBondDiscountCurvePtr *)new_FittedBondDiscountCurvePtr__SWIG_0(arg1,(Calendar const &)*arg2,(std::vector< boost::shared_ptr< RateHelper > > const &)*arg3,(DayCounter const &)*arg4,(FittingMethod const &)*arg5,arg6,arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FittedBondDiscountCurvePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FittedBondDiscountCurve__SWIG_3) {
  {
    Natural arg1 ;
    Calendar *arg2 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    FittingMethod *arg5 = 0 ;
    Real arg6 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > temp3 ;
    std::vector< boost::shared_ptr< RateHelper > > *v3 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    double val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    FittedBondDiscountCurvePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_FittedBondDiscountCurve(settlementDays,calendar,helpers,dayCounter,fittingMethod,accuracy);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FittedBondDiscountCurve" "', argument " "1"" of type '" "Natural""'");
    } 
    arg1 = static_cast< Natural >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FittedBondDiscountCurve" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FittedBondDiscountCurve" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_FittedBondDiscountCurve. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< RateHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1) {
            temp3.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_FittedBondDiscountCurve. "
              "Expected an array of " "boost::shared_ptr< RateHelper >");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_FittedBondDiscountCurve. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
      }
    }
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FittedBondDiscountCurve" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FittedBondDiscountCurve" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_FittingMethod,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_FittedBondDiscountCurve" "', argument " "5"" of type '" "FittingMethod const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FittedBondDiscountCurve" "', argument " "5"" of type '" "FittingMethod const &""'"); 
    }
    arg5 = reinterpret_cast< FittingMethod * >(argp5);
    ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_FittedBondDiscountCurve" "', argument " "6"" of type '" "Real""'");
    } 
    arg6 = static_cast< Real >(val6);
    {
      try {
        result = (FittedBondDiscountCurvePtr *)new_FittedBondDiscountCurvePtr__SWIG_0(arg1,(Calendar const &)*arg2,(std::vector< boost::shared_ptr< RateHelper > > const &)*arg3,(DayCounter const &)*arg4,(FittingMethod const &)*arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FittedBondDiscountCurvePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FittedBondDiscountCurve__SWIG_4) {
  {
    Natural arg1 ;
    Calendar *arg2 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    FittingMethod *arg5 = 0 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > temp3 ;
    std::vector< boost::shared_ptr< RateHelper > > *v3 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int argvi = 0;
    FittedBondDiscountCurvePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_FittedBondDiscountCurve(settlementDays,calendar,helpers,dayCounter,fittingMethod);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FittedBondDiscountCurve" "', argument " "1"" of type '" "Natural""'");
    } 
    arg1 = static_cast< Natural >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FittedBondDiscountCurve" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FittedBondDiscountCurve" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_FittedBondDiscountCurve. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< RateHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1) {
            temp3.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_FittedBondDiscountCurve. "
              "Expected an array of " "boost::shared_ptr< RateHelper >");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_FittedBondDiscountCurve. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
      }
    }
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FittedBondDiscountCurve" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FittedBondDiscountCurve" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_FittingMethod,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_FittedBondDiscountCurve" "', argument " "5"" of type '" "FittingMethod const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FittedBondDiscountCurve" "', argument " "5"" of type '" "FittingMethod const &""'"); 
    }
    arg5 = reinterpret_cast< FittingMethod * >(argp5);
    {
      try {
        result = (FittedBondDiscountCurvePtr *)new_FittedBondDiscountCurvePtr__SWIG_0(arg1,(Calendar const &)*arg2,(std::vector< boost::shared_ptr< RateHelper > > const &)*arg3,(DayCounter const &)*arg4,(FittingMethod const &)*arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FittedBondDiscountCurvePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FittedBondDiscountCurve__SWIG_5) {
  {
    Date *arg1 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    FittingMethod *arg4 = 0 ;
    Real arg5 ;
    Size arg6 ;
    Array *arg7 = 0 ;
    Real arg8 ;
    void *argp1 ;
    int res1 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > temp2 ;
    std::vector< boost::shared_ptr< RateHelper > > *v2 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    double val5 ;
    int ecode5 = 0 ;
    size_t val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    double val8 ;
    int ecode8 = 0 ;
    int argvi = 0;
    FittedBondDiscountCurvePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 8) || (items > 8)) {
      SWIG_croak("Usage: new_FittedBondDiscountCurve(referenceDate,helpers,dayCounter,fittingMethod,accuracy,maxEvaluations,guess,simplexLambda);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FittedBondDiscountCurve" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FittedBondDiscountCurve" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_FittedBondDiscountCurve. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< RateHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1) {
            temp2.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_FittedBondDiscountCurve. "
              "Expected an array of " "boost::shared_ptr< RateHelper >");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_FittedBondDiscountCurve. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FittedBondDiscountCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FittedBondDiscountCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_FittingMethod,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FittedBondDiscountCurve" "', argument " "4"" of type '" "FittingMethod const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FittedBondDiscountCurve" "', argument " "4"" of type '" "FittingMethod const &""'"); 
    }
    arg4 = reinterpret_cast< FittingMethod * >(argp4);
    ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_FittedBondDiscountCurve" "', argument " "5"" of type '" "Real""'");
    } 
    arg5 = static_cast< Real >(val5);
    ecode6 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_FittedBondDiscountCurve" "', argument " "6"" of type '" "Size""'");
    } 
    arg6 = static_cast< Size >(val6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_FittedBondDiscountCurve" "', argument " "7"" of type '" "Array const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FittedBondDiscountCurve" "', argument " "7"" of type '" "Array const &""'"); 
    }
    arg7 = reinterpret_cast< Array * >(argp7);
    ecode8 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_FittedBondDiscountCurve" "', argument " "8"" of type '" "Real""'");
    } 
    arg8 = static_cast< Real >(val8);
    {
      try {
        result = (FittedBondDiscountCurvePtr *)new_FittedBondDiscountCurvePtr__SWIG_5((Date const &)*arg1,(std::vector< boost::shared_ptr< RateHelper > > const &)*arg2,(DayCounter const &)*arg3,(FittingMethod const &)*arg4,arg5,arg6,(Array const &)*arg7,arg8);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FittedBondDiscountCurvePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FittedBondDiscountCurve__SWIG_6) {
  {
    Date *arg1 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    FittingMethod *arg4 = 0 ;
    Real arg5 ;
    Size arg6 ;
    Array *arg7 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > temp2 ;
    std::vector< boost::shared_ptr< RateHelper > > *v2 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    double val5 ;
    int ecode5 = 0 ;
    size_t val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    int argvi = 0;
    FittedBondDiscountCurvePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: new_FittedBondDiscountCurve(referenceDate,helpers,dayCounter,fittingMethod,accuracy,maxEvaluations,guess);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FittedBondDiscountCurve" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FittedBondDiscountCurve" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_FittedBondDiscountCurve. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< RateHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1) {
            temp2.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_FittedBondDiscountCurve. "
              "Expected an array of " "boost::shared_ptr< RateHelper >");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_FittedBondDiscountCurve. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FittedBondDiscountCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FittedBondDiscountCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_FittingMethod,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FittedBondDiscountCurve" "', argument " "4"" of type '" "FittingMethod const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FittedBondDiscountCurve" "', argument " "4"" of type '" "FittingMethod const &""'"); 
    }
    arg4 = reinterpret_cast< FittingMethod * >(argp4);
    ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_FittedBondDiscountCurve" "', argument " "5"" of type '" "Real""'");
    } 
    arg5 = static_cast< Real >(val5);
    ecode6 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_FittedBondDiscountCurve" "', argument " "6"" of type '" "Size""'");
    } 
    arg6 = static_cast< Size >(val6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_FittedBondDiscountCurve" "', argument " "7"" of type '" "Array const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FittedBondDiscountCurve" "', argument " "7"" of type '" "Array const &""'"); 
    }
    arg7 = reinterpret_cast< Array * >(argp7);
    {
      try {
        result = (FittedBondDiscountCurvePtr *)new_FittedBondDiscountCurvePtr__SWIG_5((Date const &)*arg1,(std::vector< boost::shared_ptr< RateHelper > > const &)*arg2,(DayCounter const &)*arg3,(FittingMethod const &)*arg4,arg5,arg6,(Array const &)*arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FittedBondDiscountCurvePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FittedBondDiscountCurve__SWIG_7) {
  {
    Date *arg1 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    FittingMethod *arg4 = 0 ;
    Real arg5 ;
    Size arg6 ;
    void *argp1 ;
    int res1 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > temp2 ;
    std::vector< boost::shared_ptr< RateHelper > > *v2 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    double val5 ;
    int ecode5 = 0 ;
    size_t val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    FittedBondDiscountCurvePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_FittedBondDiscountCurve(referenceDate,helpers,dayCounter,fittingMethod,accuracy,maxEvaluations);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FittedBondDiscountCurve" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FittedBondDiscountCurve" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_FittedBondDiscountCurve. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< RateHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1) {
            temp2.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_FittedBondDiscountCurve. "
              "Expected an array of " "boost::shared_ptr< RateHelper >");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_FittedBondDiscountCurve. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FittedBondDiscountCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FittedBondDiscountCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_FittingMethod,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FittedBondDiscountCurve" "', argument " "4"" of type '" "FittingMethod const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FittedBondDiscountCurve" "', argument " "4"" of type '" "FittingMethod const &""'"); 
    }
    arg4 = reinterpret_cast< FittingMethod * >(argp4);
    ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_FittedBondDiscountCurve" "', argument " "5"" of type '" "Real""'");
    } 
    arg5 = static_cast< Real >(val5);
    ecode6 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_FittedBondDiscountCurve" "', argument " "6"" of type '" "Size""'");
    } 
    arg6 = static_cast< Size >(val6);
    {
      try {
        result = (FittedBondDiscountCurvePtr *)new_FittedBondDiscountCurvePtr__SWIG_5((Date const &)*arg1,(std::vector< boost::shared_ptr< RateHelper > > const &)*arg2,(DayCounter const &)*arg3,(FittingMethod const &)*arg4,arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FittedBondDiscountCurvePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FittedBondDiscountCurve__SWIG_8) {
  {
    Date *arg1 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    FittingMethod *arg4 = 0 ;
    Real arg5 ;
    void *argp1 ;
    int res1 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > temp2 ;
    std::vector< boost::shared_ptr< RateHelper > > *v2 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    double val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    FittedBondDiscountCurvePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_FittedBondDiscountCurve(referenceDate,helpers,dayCounter,fittingMethod,accuracy);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FittedBondDiscountCurve" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FittedBondDiscountCurve" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_FittedBondDiscountCurve. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< RateHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1) {
            temp2.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_FittedBondDiscountCurve. "
              "Expected an array of " "boost::shared_ptr< RateHelper >");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_FittedBondDiscountCurve. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FittedBondDiscountCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FittedBondDiscountCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_FittingMethod,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FittedBondDiscountCurve" "', argument " "4"" of type '" "FittingMethod const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FittedBondDiscountCurve" "', argument " "4"" of type '" "FittingMethod const &""'"); 
    }
    arg4 = reinterpret_cast< FittingMethod * >(argp4);
    ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_FittedBondDiscountCurve" "', argument " "5"" of type '" "Real""'");
    } 
    arg5 = static_cast< Real >(val5);
    {
      try {
        result = (FittedBondDiscountCurvePtr *)new_FittedBondDiscountCurvePtr__SWIG_5((Date const &)*arg1,(std::vector< boost::shared_ptr< RateHelper > > const &)*arg2,(DayCounter const &)*arg3,(FittingMethod const &)*arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FittedBondDiscountCurvePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FittedBondDiscountCurve__SWIG_9) {
  {
    Date *arg1 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    FittingMethod *arg4 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > temp2 ;
    std::vector< boost::shared_ptr< RateHelper > > *v2 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int argvi = 0;
    FittedBondDiscountCurvePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_FittedBondDiscountCurve(referenceDate,helpers,dayCounter,fittingMethod);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FittedBondDiscountCurve" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FittedBondDiscountCurve" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_FittedBondDiscountCurve. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< RateHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1) {
            temp2.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_FittedBondDiscountCurve. "
              "Expected an array of " "boost::shared_ptr< RateHelper >");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_FittedBondDiscountCurve. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FittedBondDiscountCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FittedBondDiscountCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_FittingMethod,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_FittedBondDiscountCurve" "', argument " "4"" of type '" "FittingMethod const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FittedBondDiscountCurve" "', argument " "4"" of type '" "FittingMethod const &""'"); 
    }
    arg4 = reinterpret_cast< FittingMethod * >(argp4);
    {
      try {
        result = (FittedBondDiscountCurvePtr *)new_FittedBondDiscountCurvePtr__SWIG_5((Date const &)*arg1,(std::vector< boost::shared_ptr< RateHelper > > const &)*arg2,(DayCounter const &)*arg3,(FittingMethod const &)*arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FittedBondDiscountCurvePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FittedBondDiscountCurve) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< RateHelper > >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< RateHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_FittingMethod, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< RateHelper > >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< RateHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_FittingMethod, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< RateHelper > >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< RateHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_FittingMethod, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< RateHelper > >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< RateHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_FittingMethod, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< RateHelper > >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< RateHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_FittingMethod, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< RateHelper > >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< RateHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_FittingMethod, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Array, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< RateHelper > >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< RateHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_FittingMethod, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 7;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_7:
    
    if (items == 8) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< RateHelper > >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< RateHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_FittingMethod, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Array, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 8;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_8:
    
    if (items == 8) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< RateHelper > >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< RateHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_FittingMethod, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_Array, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 9;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_9:
    
    if (items == 9) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< RateHelper > >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< RateHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_FittingMethod, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_Array, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(8), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 10;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_10:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FittedBondDiscountCurve__SWIG_9); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FittedBondDiscountCurve__SWIG_8); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FittedBondDiscountCurve__SWIG_4); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FittedBondDiscountCurve__SWIG_7); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FittedBondDiscountCurve__SWIG_3); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FittedBondDiscountCurve__SWIG_6); return;
    case 7:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FittedBondDiscountCurve__SWIG_2); return;
    case 8:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FittedBondDiscountCurve__SWIG_5); return;
    case 9:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FittedBondDiscountCurve__SWIG_1); return;
    case 10:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FittedBondDiscountCurve__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_FittedBondDiscountCurve'");
  XSRETURN(0);
}


XS(_wrap_FittedBondDiscountCurve_fitResults) {
  {
    FittedBondDiscountCurvePtr *arg1 = (FittedBondDiscountCurvePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    FittingMethod *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: FittedBondDiscountCurve_fitResults(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_FittedBondDiscountCurvePtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FittedBondDiscountCurve_fitResults" "', argument " "1"" of type '" "FittedBondDiscountCurvePtr const *""'"); 
    }
    arg1 = reinterpret_cast< FittedBondDiscountCurvePtr * >(argp1);
    {
      try {
        result = (FittingMethod *) &FittedBondDiscountCurvePtr_fitResults((FittedBondDiscountCurvePtr const *)arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FittingMethod, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_FittedBondDiscountCurve) {
  {
    FittedBondDiscountCurvePtr *arg1 = (FittedBondDiscountCurvePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_FittedBondDiscountCurve(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_FittedBondDiscountCurvePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FittedBondDiscountCurve" "', argument " "1"" of type '" "FittedBondDiscountCurvePtr *""'"); 
    }
    arg1 = reinterpret_cast< FittedBondDiscountCurvePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ExponentialSplinesFitting__SWIG_0) {
  {
    bool arg1 ;
    Array *arg2 = 0 ;
    bool val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    ExponentialSplinesFitting *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_ExponentialSplinesFitting(constrainAtZero,weights);");
    }
    ecode1 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ExponentialSplinesFitting" "', argument " "1"" of type '" "bool""'");
    } 
    arg1 = static_cast< bool >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ExponentialSplinesFitting" "', argument " "2"" of type '" "Array const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ExponentialSplinesFitting" "', argument " "2"" of type '" "Array const &""'"); 
    }
    arg2 = reinterpret_cast< Array * >(argp2);
    {
      try {
        result = (ExponentialSplinesFitting *)new ExponentialSplinesFitting(arg1,(Array const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ExponentialSplinesFitting, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ExponentialSplinesFitting__SWIG_1) {
  {
    bool arg1 ;
    bool val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    ExponentialSplinesFitting *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_ExponentialSplinesFitting(constrainAtZero);");
    }
    ecode1 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ExponentialSplinesFitting" "', argument " "1"" of type '" "bool""'");
    } 
    arg1 = static_cast< bool >(val1);
    {
      try {
        result = (ExponentialSplinesFitting *)new ExponentialSplinesFitting(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ExponentialSplinesFitting, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ExponentialSplinesFitting__SWIG_2) {
  {
    int argvi = 0;
    ExponentialSplinesFitting *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_ExponentialSplinesFitting();");
    }
    {
      try {
        result = (ExponentialSplinesFitting *)new ExponentialSplinesFitting();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ExponentialSplinesFitting, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_ExponentialSplinesFitting) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Array, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ExponentialSplinesFitting__SWIG_2); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ExponentialSplinesFitting__SWIG_1); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ExponentialSplinesFitting__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_ExponentialSplinesFitting'");
  XSRETURN(0);
}


XS(_wrap_delete_ExponentialSplinesFitting) {
  {
    ExponentialSplinesFitting *arg1 = (ExponentialSplinesFitting *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_ExponentialSplinesFitting(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ExponentialSplinesFitting, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ExponentialSplinesFitting" "', argument " "1"" of type '" "ExponentialSplinesFitting *""'"); 
    }
    arg1 = reinterpret_cast< ExponentialSplinesFitting * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_NelsonSiegelFitting__SWIG_0) {
  {
    Array *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    NelsonSiegelFitting *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_NelsonSiegelFitting(weights);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_NelsonSiegelFitting" "', argument " "1"" of type '" "Array const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NelsonSiegelFitting" "', argument " "1"" of type '" "Array const &""'"); 
    }
    arg1 = reinterpret_cast< Array * >(argp1);
    {
      try {
        result = (NelsonSiegelFitting *)new NelsonSiegelFitting((Array const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_NelsonSiegelFitting, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_NelsonSiegelFitting__SWIG_1) {
  {
    int argvi = 0;
    NelsonSiegelFitting *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_NelsonSiegelFitting();");
    }
    {
      try {
        result = (NelsonSiegelFitting *)new NelsonSiegelFitting();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_NelsonSiegelFitting, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_NelsonSiegelFitting) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Array, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_NelsonSiegelFitting__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_NelsonSiegelFitting__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_NelsonSiegelFitting'");
  XSRETURN(0);
}


XS(_wrap_delete_NelsonSiegelFitting) {
  {
    NelsonSiegelFitting *arg1 = (NelsonSiegelFitting *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_NelsonSiegelFitting(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_NelsonSiegelFitting, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_NelsonSiegelFitting" "', argument " "1"" of type '" "NelsonSiegelFitting *""'"); 
    }
    arg1 = reinterpret_cast< NelsonSiegelFitting * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SvenssonFitting__SWIG_0) {
  {
    Array *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    SvenssonFitting *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_SvenssonFitting(weights);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SvenssonFitting" "', argument " "1"" of type '" "Array const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SvenssonFitting" "', argument " "1"" of type '" "Array const &""'"); 
    }
    arg1 = reinterpret_cast< Array * >(argp1);
    {
      try {
        result = (SvenssonFitting *)new SvenssonFitting((Array const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SvenssonFitting, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SvenssonFitting__SWIG_1) {
  {
    int argvi = 0;
    SvenssonFitting *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_SvenssonFitting();");
    }
    {
      try {
        result = (SvenssonFitting *)new SvenssonFitting();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SvenssonFitting, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_SvenssonFitting) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Array, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SvenssonFitting__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SvenssonFitting__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_SvenssonFitting'");
  XSRETURN(0);
}


XS(_wrap_delete_SvenssonFitting) {
  {
    SvenssonFitting *arg1 = (SvenssonFitting *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_SvenssonFitting(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SvenssonFitting, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SvenssonFitting" "', argument " "1"" of type '" "SvenssonFitting *""'"); 
    }
    arg1 = reinterpret_cast< SvenssonFitting * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CubicBSplinesFitting__SWIG_0) {
  {
    std::vector< Time > *arg1 = 0 ;
    bool arg2 ;
    Array *arg3 = 0 ;
    std::vector< double > temp1 ;
    std::vector< double > *v1 ;
    bool val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    CubicBSplinesFitting *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_CubicBSplinesFitting(knotVector,constrainAtZero,weights);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_CubicBSplinesFitting. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp1.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_CubicBSplinesFitting. "
              "Expected an array of ""double");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_CubicBSplinesFitting. "
          "Expected an array of ""double");
      }
    }
    ecode2 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_CubicBSplinesFitting" "', argument " "2"" of type '" "bool""'");
    } 
    arg2 = static_cast< bool >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CubicBSplinesFitting" "', argument " "3"" of type '" "Array const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CubicBSplinesFitting" "', argument " "3"" of type '" "Array const &""'"); 
    }
    arg3 = reinterpret_cast< Array * >(argp3);
    {
      try {
        result = (CubicBSplinesFitting *)new CubicBSplinesFitting((std::vector< Time > const &)*arg1,arg2,(Array const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CubicBSplinesFitting, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CubicBSplinesFitting__SWIG_1) {
  {
    std::vector< Time > *arg1 = 0 ;
    bool arg2 ;
    std::vector< double > temp1 ;
    std::vector< double > *v1 ;
    bool val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    CubicBSplinesFitting *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_CubicBSplinesFitting(knotVector,constrainAtZero);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_CubicBSplinesFitting. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp1.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_CubicBSplinesFitting. "
              "Expected an array of ""double");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_CubicBSplinesFitting. "
          "Expected an array of ""double");
      }
    }
    ecode2 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_CubicBSplinesFitting" "', argument " "2"" of type '" "bool""'");
    } 
    arg2 = static_cast< bool >(val2);
    {
      try {
        result = (CubicBSplinesFitting *)new CubicBSplinesFitting((std::vector< Time > const &)*arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CubicBSplinesFitting, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CubicBSplinesFitting__SWIG_2) {
  {
    std::vector< Time > *arg1 = 0 ;
    std::vector< double > temp1 ;
    std::vector< double > *v1 ;
    int argvi = 0;
    CubicBSplinesFitting *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_CubicBSplinesFitting(knotVector);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_CubicBSplinesFitting. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp1.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_CubicBSplinesFitting. "
              "Expected an array of ""double");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_CubicBSplinesFitting. "
          "Expected an array of ""double");
      }
    }
    {
      try {
        result = (CubicBSplinesFitting *)new CubicBSplinesFitting((std::vector< Time > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CubicBSplinesFitting, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CubicBSplinesFitting) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Array, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_CubicBSplinesFitting__SWIG_2); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_CubicBSplinesFitting__SWIG_1); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_CubicBSplinesFitting__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_CubicBSplinesFitting'");
  XSRETURN(0);
}


XS(_wrap_CubicBSplinesFitting_basisFunction) {
  {
    CubicBSplinesFitting *arg1 = (CubicBSplinesFitting *) 0 ;
    Integer arg2 ;
    Time arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: CubicBSplinesFitting_basisFunction(self,i,t);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CubicBSplinesFitting, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CubicBSplinesFitting_basisFunction" "', argument " "1"" of type '" "CubicBSplinesFitting *""'"); 
    }
    arg1 = reinterpret_cast< CubicBSplinesFitting * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CubicBSplinesFitting_basisFunction" "', argument " "2"" of type '" "Integer""'");
    } 
    arg2 = static_cast< Integer >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CubicBSplinesFitting_basisFunction" "', argument " "3"" of type '" "Time""'");
    } 
    arg3 = static_cast< Time >(val3);
    {
      try {
        result = (Real)(arg1)->basisFunction(arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_CubicBSplinesFitting) {
  {
    CubicBSplinesFitting *arg1 = (CubicBSplinesFitting *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_CubicBSplinesFitting(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CubicBSplinesFitting, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CubicBSplinesFitting" "', argument " "1"" of type '" "CubicBSplinesFitting *""'"); 
    }
    arg1 = reinterpret_cast< CubicBSplinesFitting * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SimplePolynomialFitting__SWIG_0) {
  {
    Natural arg1 ;
    bool arg2 ;
    Array *arg3 = 0 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    bool val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    SimplePolynomialFitting *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_SimplePolynomialFitting(degree,constrainAtZero,weights);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_SimplePolynomialFitting" "', argument " "1"" of type '" "Natural""'");
    } 
    arg1 = static_cast< Natural >(val1);
    ecode2 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_SimplePolynomialFitting" "', argument " "2"" of type '" "bool""'");
    } 
    arg2 = static_cast< bool >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_SimplePolynomialFitting" "', argument " "3"" of type '" "Array const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SimplePolynomialFitting" "', argument " "3"" of type '" "Array const &""'"); 
    }
    arg3 = reinterpret_cast< Array * >(argp3);
    {
      try {
        result = (SimplePolynomialFitting *)new SimplePolynomialFitting(arg1,arg2,(Array const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SimplePolynomialFitting, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SimplePolynomialFitting__SWIG_1) {
  {
    Natural arg1 ;
    bool arg2 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    bool val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    SimplePolynomialFitting *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_SimplePolynomialFitting(degree,constrainAtZero);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_SimplePolynomialFitting" "', argument " "1"" of type '" "Natural""'");
    } 
    arg1 = static_cast< Natural >(val1);
    ecode2 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_SimplePolynomialFitting" "', argument " "2"" of type '" "bool""'");
    } 
    arg2 = static_cast< bool >(val2);
    {
      try {
        result = (SimplePolynomialFitting *)new SimplePolynomialFitting(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SimplePolynomialFitting, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SimplePolynomialFitting__SWIG_2) {
  {
    Natural arg1 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    SimplePolynomialFitting *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_SimplePolynomialFitting(degree);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_SimplePolynomialFitting" "', argument " "1"" of type '" "Natural""'");
    } 
    arg1 = static_cast< Natural >(val1);
    {
      try {
        result = (SimplePolynomialFitting *)new SimplePolynomialFitting(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SimplePolynomialFitting, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SimplePolynomialFitting) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Array, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SimplePolynomialFitting__SWIG_2); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SimplePolynomialFitting__SWIG_1); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SimplePolynomialFitting__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_SimplePolynomialFitting'");
  XSRETURN(0);
}


XS(_wrap_delete_SimplePolynomialFitting) {
  {
    SimplePolynomialFitting *arg1 = (SimplePolynomialFitting *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_SimplePolynomialFitting(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SimplePolynomialFitting, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SimplePolynomialFitting" "', argument " "1"" of type '" "SimplePolynomialFitting *""'"); 
    }
    arg1 = reinterpret_cast< SimplePolynomialFitting * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ForwardCurve__SWIG_0) {
  {
    std::vector< Date > *arg1 = 0 ;
    std::vector< Rate > *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    Calendar *arg4 = 0 ;
    BackwardFlat *arg5 = 0 ;
    std::vector< Date > temp1 ;
    std::vector< Date > *v1 ;
    std::vector< double > temp2 ;
    std::vector< double > *v2 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int argvi = 0;
    ForwardCurvePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_ForwardCurve(dates,forwards,dayCounter,calendar,i);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_ForwardCurve. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_ForwardCurve. "
              "Expected an array of " "Date");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_ForwardCurve. "
          "Expected an array of " "Date");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_ForwardCurve. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp2.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_ForwardCurve. "
              "Expected an array of ""double");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_ForwardCurve. "
          "Expected an array of ""double");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_ForwardCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ForwardCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_ForwardCurve" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ForwardCurve" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    arg4 = reinterpret_cast< Calendar * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_BackwardFlat,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_ForwardCurve" "', argument " "5"" of type '" "BackwardFlat const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ForwardCurve" "', argument " "5"" of type '" "BackwardFlat const &""'"); 
    }
    arg5 = reinterpret_cast< BackwardFlat * >(argp5);
    {
      try {
        result = (ForwardCurvePtr *)new_ForwardCurvePtr__SWIG_0((std::vector< Date > const &)*arg1,(std::vector< double > const &)*arg2,(DayCounter const &)*arg3,(Calendar const &)*arg4,(BackwardFlat const &)*arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ForwardCurvePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ForwardCurve__SWIG_1) {
  {
    std::vector< Date > *arg1 = 0 ;
    std::vector< Rate > *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    Calendar *arg4 = 0 ;
    std::vector< Date > temp1 ;
    std::vector< Date > *v1 ;
    std::vector< double > temp2 ;
    std::vector< double > *v2 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int argvi = 0;
    ForwardCurvePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_ForwardCurve(dates,forwards,dayCounter,calendar);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_ForwardCurve. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_ForwardCurve. "
              "Expected an array of " "Date");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_ForwardCurve. "
          "Expected an array of " "Date");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_ForwardCurve. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp2.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_ForwardCurve. "
              "Expected an array of ""double");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_ForwardCurve. "
          "Expected an array of ""double");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_ForwardCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ForwardCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_ForwardCurve" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ForwardCurve" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    arg4 = reinterpret_cast< Calendar * >(argp4);
    {
      try {
        result = (ForwardCurvePtr *)new_ForwardCurvePtr__SWIG_0((std::vector< Date > const &)*arg1,(std::vector< double > const &)*arg2,(DayCounter const &)*arg3,(Calendar const &)*arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ForwardCurvePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ForwardCurve__SWIG_2) {
  {
    std::vector< Date > *arg1 = 0 ;
    std::vector< Rate > *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    std::vector< Date > temp1 ;
    std::vector< Date > *v1 ;
    std::vector< double > temp2 ;
    std::vector< double > *v2 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    ForwardCurvePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_ForwardCurve(dates,forwards,dayCounter);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_ForwardCurve. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_ForwardCurve. "
              "Expected an array of " "Date");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_ForwardCurve. "
          "Expected an array of " "Date");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_ForwardCurve. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp2.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_ForwardCurve. "
              "Expected an array of ""double");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_ForwardCurve. "
          "Expected an array of ""double");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_ForwardCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ForwardCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    {
      try {
        result = (ForwardCurvePtr *)new_ForwardCurvePtr__SWIG_0((std::vector< Date > const &)*arg1,(std::vector< double > const &)*arg2,(DayCounter const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ForwardCurvePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ForwardCurve) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_BackwardFlat, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ForwardCurve__SWIG_2); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ForwardCurve__SWIG_1); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ForwardCurve__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_ForwardCurve'");
  XSRETURN(0);
}


XS(_wrap_ForwardCurve_dates) {
  {
    ForwardCurvePtr *arg1 = (ForwardCurvePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Date > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ForwardCurve_dates(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ForwardCurvePtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ForwardCurve_dates" "', argument " "1"" of type '" "ForwardCurvePtr *""'"); 
    }
    arg1 = reinterpret_cast< ForwardCurvePtr * >(argp1);
    {
      try {
        result = (std::vector< Date > *) &ForwardCurvePtr_dates(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_Date_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ForwardCurve_forwards) {
  {
    ForwardCurvePtr *arg1 = (ForwardCurvePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Rate > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ForwardCurve_forwards(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ForwardCurvePtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ForwardCurve_forwards" "', argument " "1"" of type '" "ForwardCurvePtr *""'"); 
    }
    arg1 = reinterpret_cast< ForwardCurvePtr * >(argp1);
    {
      try {
        result = (std::vector< Rate > *) &ForwardCurvePtr_forwards(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ForwardCurve_nodes) {
  {
    ForwardCurvePtr *arg1 = (ForwardCurvePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< std::pair< Date,Rate > > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ForwardCurve_nodes(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ForwardCurvePtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ForwardCurve_nodes" "', argument " "1"" of type '" "ForwardCurvePtr *""'"); 
    }
    arg1 = reinterpret_cast< ForwardCurvePtr * >(argp1);
    {
      try {
        result = ForwardCurvePtr_nodes(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        std::pair< Date,double >* ptr = new std::pair< Date,double >(result[i]);
        svs[i] = sv_newmortal();
        SWIG_MakePtr(svs[i], (void*) ptr, 
          SWIGTYPE_p_std__pairT_Date_double_t, SWIG_SHADOW|0);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_ForwardCurve) {
  {
    ForwardCurvePtr *arg1 = (ForwardCurvePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_ForwardCurve(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ForwardCurvePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ForwardCurve" "', argument " "1"" of type '" "ForwardCurvePtr *""'"); 
    }
    arg1 = reinterpret_cast< ForwardCurvePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Position) {
  {
    int argvi = 0;
    Position *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Position();");
    }
    {
      try {
        result = (Position *)new Position();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Position, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_Position) {
  {
    Position *arg1 = (Position *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Position(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Position, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Position" "', argument " "1"" of type '" "Position *""'"); 
    }
    arg1 = reinterpret_cast< Position * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ForwardRateAgreement__SWIG_0) {
  {
    Date *arg1 = 0 ;
    Date *arg2 = 0 ;
    Position::Type arg3 ;
    Rate arg4 ;
    Real arg5 ;
    IborIndexPtr *arg6 = 0 ;
    Handle< YieldTermStructure > *arg7 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    double val5 ;
    int ecode5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    int argvi = 0;
    ForwardRateAgreementPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: new_ForwardRateAgreement(valueDate,maturityDate,type,strikeForwardRate,notionalAmount,index,discountCurve);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ForwardRateAgreement" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ForwardRateAgreement" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ForwardRateAgreement" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ForwardRateAgreement" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_ForwardRateAgreement" "', argument " "3"" of type '" "Position::Type""'");
    } 
    arg3 = static_cast< Position::Type >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_ForwardRateAgreement" "', argument " "4"" of type '" "Rate""'");
    } 
    arg4 = static_cast< Rate >(val4);
    ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_ForwardRateAgreement" "', argument " "5"" of type '" "Real""'");
    } 
    arg5 = static_cast< Real >(val5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_IborIndexPtr,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_ForwardRateAgreement" "', argument " "6"" of type '" "IborIndexPtr const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ForwardRateAgreement" "', argument " "6"" of type '" "IborIndexPtr const &""'"); 
    }
    arg6 = reinterpret_cast< IborIndexPtr * >(argp6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_ForwardRateAgreement" "', argument " "7"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ForwardRateAgreement" "', argument " "7"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg7 = reinterpret_cast< Handle< YieldTermStructure > * >(argp7);
    {
      try {
        result = (ForwardRateAgreementPtr *)new_ForwardRateAgreementPtr__SWIG_0((Date const &)*arg1,(Date const &)*arg2,arg3,arg4,arg5,(IborIndexPtr const &)*arg6,(Handle< YieldTermStructure > const &)*arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ForwardRateAgreementPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ForwardRateAgreement__SWIG_1) {
  {
    Date *arg1 = 0 ;
    Date *arg2 = 0 ;
    Position::Type arg3 ;
    Rate arg4 ;
    Real arg5 ;
    IborIndexPtr *arg6 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    double val5 ;
    int ecode5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    int argvi = 0;
    ForwardRateAgreementPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_ForwardRateAgreement(valueDate,maturityDate,type,strikeForwardRate,notionalAmount,index);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ForwardRateAgreement" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ForwardRateAgreement" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ForwardRateAgreement" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ForwardRateAgreement" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_ForwardRateAgreement" "', argument " "3"" of type '" "Position::Type""'");
    } 
    arg3 = static_cast< Position::Type >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_ForwardRateAgreement" "', argument " "4"" of type '" "Rate""'");
    } 
    arg4 = static_cast< Rate >(val4);
    ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_ForwardRateAgreement" "', argument " "5"" of type '" "Real""'");
    } 
    arg5 = static_cast< Real >(val5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_IborIndexPtr,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_ForwardRateAgreement" "', argument " "6"" of type '" "IborIndexPtr const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ForwardRateAgreement" "', argument " "6"" of type '" "IborIndexPtr const &""'"); 
    }
    arg6 = reinterpret_cast< IborIndexPtr * >(argp6);
    {
      try {
        result = (ForwardRateAgreementPtr *)new_ForwardRateAgreementPtr__SWIG_0((Date const &)*arg1,(Date const &)*arg2,arg3,arg4,arg5,(IborIndexPtr const &)*arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ForwardRateAgreementPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ForwardRateAgreement) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_IborIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_IborIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ForwardRateAgreement__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ForwardRateAgreement__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_ForwardRateAgreement'");
  XSRETURN(0);
}


XS(_wrap_ForwardRateAgreement_spotIncome) {
  {
    ForwardRateAgreementPtr *arg1 = (ForwardRateAgreementPtr *) 0 ;
    Handle< YieldTermStructure > *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: ForwardRateAgreement_spotIncome(self,discount);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ForwardRateAgreementPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ForwardRateAgreement_spotIncome" "', argument " "1"" of type '" "ForwardRateAgreementPtr const *""'"); 
    }
    arg1 = reinterpret_cast< ForwardRateAgreementPtr * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ForwardRateAgreement_spotIncome" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ForwardRateAgreement_spotIncome" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< YieldTermStructure > * >(argp2);
    {
      try {
        result = (Real)ForwardRateAgreementPtr_spotIncome((ForwardRateAgreementPtr const *)arg1,(Handle< YieldTermStructure > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_ForwardRateAgreement_spotValue) {
  {
    ForwardRateAgreementPtr *arg1 = (ForwardRateAgreementPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ForwardRateAgreement_spotValue(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ForwardRateAgreementPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ForwardRateAgreement_spotValue" "', argument " "1"" of type '" "ForwardRateAgreementPtr const *""'"); 
    }
    arg1 = reinterpret_cast< ForwardRateAgreementPtr * >(argp1);
    {
      try {
        result = (Real)ForwardRateAgreementPtr_spotValue((ForwardRateAgreementPtr const *)arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ForwardRateAgreement_forwardRate) {
  {
    ForwardRateAgreementPtr *arg1 = (ForwardRateAgreementPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    InterestRate result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ForwardRateAgreement_forwardRate(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ForwardRateAgreementPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ForwardRateAgreement_forwardRate" "', argument " "1"" of type '" "ForwardRateAgreementPtr const *""'"); 
    }
    arg1 = reinterpret_cast< ForwardRateAgreementPtr * >(argp1);
    {
      try {
        result = ForwardRateAgreementPtr_forwardRate((ForwardRateAgreementPtr const *)arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new InterestRate(static_cast< const InterestRate& >(result))), SWIGTYPE_p_InterestRate, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_ForwardRateAgreement) {
  {
    ForwardRateAgreementPtr *arg1 = (ForwardRateAgreementPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_ForwardRateAgreement(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ForwardRateAgreementPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ForwardRateAgreement" "', argument " "1"" of type '" "ForwardRateAgreementPtr *""'"); 
    }
    arg1 = reinterpret_cast< ForwardRateAgreementPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Gaussian1dModel___deref__) {
  {
    boost::shared_ptr< Gaussian1dModel > *arg1 = (boost::shared_ptr< Gaussian1dModel > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Gaussian1dModel *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Gaussian1dModel___deref__(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Gaussian1dModel___deref__" "', argument " "1"" of type '" "boost::shared_ptr< Gaussian1dModel > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Gaussian1dModel > * >(argp1);
    {
      try {
        result = (Gaussian1dModel *)(arg1)->operator ->();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Gaussian1dModel, 0 | 0); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Gaussian1dModel_isNull) {
  {
    boost::shared_ptr< Gaussian1dModel > *arg1 = (boost::shared_ptr< Gaussian1dModel > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Gaussian1dModel_isNull(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Gaussian1dModel_isNull" "', argument " "1"" of type '" "boost::shared_ptr< Gaussian1dModel > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Gaussian1dModel > * >(argp1);
    {
      try {
        result = (bool)boost_shared_ptr_Sl_Gaussian1dModel_Sg__isNull(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Gaussian1dModel) {
  {
    int argvi = 0;
    boost::shared_ptr< Gaussian1dModel > *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Gaussian1dModel();");
    }
    {
      try {
        result = (boost::shared_ptr< Gaussian1dModel > *)new boost::shared_ptr< Gaussian1dModel >();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_Gaussian1dModel) {
  {
    boost::shared_ptr< Gaussian1dModel > *arg1 = (boost::shared_ptr< Gaussian1dModel > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Gaussian1dModel(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Gaussian1dModel" "', argument " "1"" of type '" "boost::shared_ptr< Gaussian1dModel > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Gaussian1dModel > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Gaussian1dModel_stateProcess) {
  {
    boost::shared_ptr< Gaussian1dModel > *arg1 = (boost::shared_ptr< Gaussian1dModel > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    SwigValueWrapper< StochasticProcess1DPtr > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Gaussian1dModel_stateProcess(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Gaussian1dModel_stateProcess" "', argument " "1"" of type '" "boost::shared_ptr< Gaussian1dModel > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Gaussian1dModel > * >(argp1);
    {
      try {
        result = (*arg1)->stateProcess();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new StochasticProcess1DPtr(static_cast< const StochasticProcess1DPtr& >(result))), SWIGTYPE_p_StochasticProcess1DPtr, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Gaussian1dModel_numeraire__SWIG_0) {
  {
    boost::shared_ptr< Gaussian1dModel > *arg1 = (boost::shared_ptr< Gaussian1dModel > *) 0 ;
    Time arg2 ;
    Real arg3 ;
    Handle< YieldTermStructure > *arg4 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: Gaussian1dModel_numeraire(self,t,y,yts);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Gaussian1dModel_numeraire" "', argument " "1"" of type '" "boost::shared_ptr< Gaussian1dModel > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Gaussian1dModel > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Gaussian1dModel_numeraire" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Gaussian1dModel_numeraire" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Gaussian1dModel_numeraire" "', argument " "4"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gaussian1dModel_numeraire" "', argument " "4"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg4 = reinterpret_cast< Handle< YieldTermStructure > * >(argp4);
    {
      try {
        result = (Real)(*arg1)->numeraire(arg2,arg3,(Handle< YieldTermStructure > const &)*arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Gaussian1dModel_numeraire__SWIG_1) {
  {
    boost::shared_ptr< Gaussian1dModel > *arg1 = (boost::shared_ptr< Gaussian1dModel > *) 0 ;
    Time arg2 ;
    Real arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: Gaussian1dModel_numeraire(self,t,y);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Gaussian1dModel_numeraire" "', argument " "1"" of type '" "boost::shared_ptr< Gaussian1dModel > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Gaussian1dModel > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Gaussian1dModel_numeraire" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Gaussian1dModel_numeraire" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    {
      try {
        result = (Real)(*arg1)->numeraire(arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Gaussian1dModel_numeraire__SWIG_2) {
  {
    boost::shared_ptr< Gaussian1dModel > *arg1 = (boost::shared_ptr< Gaussian1dModel > *) 0 ;
    Time arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Gaussian1dModel_numeraire(self,t);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Gaussian1dModel_numeraire" "', argument " "1"" of type '" "boost::shared_ptr< Gaussian1dModel > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Gaussian1dModel > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Gaussian1dModel_numeraire" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    {
      try {
        result = (Real)(*arg1)->numeraire(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Gaussian1dModel_numeraire__SWIG_3) {
  {
    boost::shared_ptr< Gaussian1dModel > *arg1 = (boost::shared_ptr< Gaussian1dModel > *) 0 ;
    Date *arg2 = 0 ;
    Real arg3 ;
    Handle< YieldTermStructure > *arg4 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: Gaussian1dModel_numeraire(self,referenceDate,y,yts);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Gaussian1dModel_numeraire" "', argument " "1"" of type '" "boost::shared_ptr< Gaussian1dModel > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Gaussian1dModel > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Gaussian1dModel_numeraire" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gaussian1dModel_numeraire" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Gaussian1dModel_numeraire" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Gaussian1dModel_numeraire" "', argument " "4"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gaussian1dModel_numeraire" "', argument " "4"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg4 = reinterpret_cast< Handle< YieldTermStructure > * >(argp4);
    {
      try {
        result = (Real)(*arg1)->numeraire((Date const &)*arg2,arg3,(Handle< YieldTermStructure > const &)*arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Gaussian1dModel_numeraire__SWIG_4) {
  {
    boost::shared_ptr< Gaussian1dModel > *arg1 = (boost::shared_ptr< Gaussian1dModel > *) 0 ;
    Date *arg2 = 0 ;
    Real arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: Gaussian1dModel_numeraire(self,referenceDate,y);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Gaussian1dModel_numeraire" "', argument " "1"" of type '" "boost::shared_ptr< Gaussian1dModel > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Gaussian1dModel > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Gaussian1dModel_numeraire" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gaussian1dModel_numeraire" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Gaussian1dModel_numeraire" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    {
      try {
        result = (Real)(*arg1)->numeraire((Date const &)*arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Gaussian1dModel_numeraire__SWIG_5) {
  {
    boost::shared_ptr< Gaussian1dModel > *arg1 = (boost::shared_ptr< Gaussian1dModel > *) 0 ;
    Date *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Gaussian1dModel_numeraire(self,referenceDate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Gaussian1dModel_numeraire" "', argument " "1"" of type '" "boost::shared_ptr< Gaussian1dModel > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Gaussian1dModel > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Gaussian1dModel_numeraire" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gaussian1dModel_numeraire" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    {
      try {
        result = (Real)(*arg1)->numeraire((Date const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Gaussian1dModel_numeraire) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Gaussian1dModel_numeraire__SWIG_5); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Gaussian1dModel_numeraire__SWIG_2); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Gaussian1dModel_numeraire__SWIG_4); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Gaussian1dModel_numeraire__SWIG_1); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Gaussian1dModel_numeraire__SWIG_3); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Gaussian1dModel_numeraire__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'Gaussian1dModel_numeraire'");
  XSRETURN(0);
}


XS(_wrap_Gaussian1dModel_zerobond__SWIG_0) {
  {
    boost::shared_ptr< Gaussian1dModel > *arg1 = (boost::shared_ptr< Gaussian1dModel > *) 0 ;
    Time arg2 ;
    Time arg3 ;
    Real arg4 ;
    Handle< YieldTermStructure > *arg5 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: Gaussian1dModel_zerobond(self,T,t,y,yts);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Gaussian1dModel_zerobond" "', argument " "1"" of type '" "boost::shared_ptr< Gaussian1dModel > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Gaussian1dModel > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Gaussian1dModel_zerobond" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Gaussian1dModel_zerobond" "', argument " "3"" of type '" "Time""'");
    } 
    arg3 = static_cast< Time >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Gaussian1dModel_zerobond" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "Gaussian1dModel_zerobond" "', argument " "5"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gaussian1dModel_zerobond" "', argument " "5"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg5 = reinterpret_cast< Handle< YieldTermStructure > * >(argp5);
    {
      try {
        result = (Real)(*arg1)->zerobond(arg2,arg3,arg4,(Handle< YieldTermStructure > const &)*arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Gaussian1dModel_zerobond__SWIG_1) {
  {
    boost::shared_ptr< Gaussian1dModel > *arg1 = (boost::shared_ptr< Gaussian1dModel > *) 0 ;
    Time arg2 ;
    Time arg3 ;
    Real arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: Gaussian1dModel_zerobond(self,T,t,y);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Gaussian1dModel_zerobond" "', argument " "1"" of type '" "boost::shared_ptr< Gaussian1dModel > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Gaussian1dModel > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Gaussian1dModel_zerobond" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Gaussian1dModel_zerobond" "', argument " "3"" of type '" "Time""'");
    } 
    arg3 = static_cast< Time >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Gaussian1dModel_zerobond" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    {
      try {
        result = (Real)(*arg1)->zerobond(arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Gaussian1dModel_zerobond__SWIG_2) {
  {
    boost::shared_ptr< Gaussian1dModel > *arg1 = (boost::shared_ptr< Gaussian1dModel > *) 0 ;
    Time arg2 ;
    Time arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: Gaussian1dModel_zerobond(self,T,t);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Gaussian1dModel_zerobond" "', argument " "1"" of type '" "boost::shared_ptr< Gaussian1dModel > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Gaussian1dModel > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Gaussian1dModel_zerobond" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Gaussian1dModel_zerobond" "', argument " "3"" of type '" "Time""'");
    } 
    arg3 = static_cast< Time >(val3);
    {
      try {
        result = (Real)(*arg1)->zerobond(arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Gaussian1dModel_zerobond__SWIG_3) {
  {
    boost::shared_ptr< Gaussian1dModel > *arg1 = (boost::shared_ptr< Gaussian1dModel > *) 0 ;
    Time arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Gaussian1dModel_zerobond(self,T);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Gaussian1dModel_zerobond" "', argument " "1"" of type '" "boost::shared_ptr< Gaussian1dModel > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Gaussian1dModel > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Gaussian1dModel_zerobond" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    {
      try {
        result = (Real)(*arg1)->zerobond(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Gaussian1dModel_zerobond__SWIG_4) {
  {
    boost::shared_ptr< Gaussian1dModel > *arg1 = (boost::shared_ptr< Gaussian1dModel > *) 0 ;
    Date *arg2 = 0 ;
    Date *arg3 = 0 ;
    Real arg4 ;
    Handle< YieldTermStructure > *arg5 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: Gaussian1dModel_zerobond(self,maturity,referenceDate,y,yts);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Gaussian1dModel_zerobond" "', argument " "1"" of type '" "boost::shared_ptr< Gaussian1dModel > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Gaussian1dModel > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Gaussian1dModel_zerobond" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gaussian1dModel_zerobond" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Gaussian1dModel_zerobond" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gaussian1dModel_zerobond" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Gaussian1dModel_zerobond" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "Gaussian1dModel_zerobond" "', argument " "5"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gaussian1dModel_zerobond" "', argument " "5"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg5 = reinterpret_cast< Handle< YieldTermStructure > * >(argp5);
    {
      try {
        result = (Real)(*arg1)->zerobond((Date const &)*arg2,(Date const &)*arg3,arg4,(Handle< YieldTermStructure > const &)*arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Gaussian1dModel_zerobond__SWIG_5) {
  {
    boost::shared_ptr< Gaussian1dModel > *arg1 = (boost::shared_ptr< Gaussian1dModel > *) 0 ;
    Date *arg2 = 0 ;
    Date *arg3 = 0 ;
    Real arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: Gaussian1dModel_zerobond(self,maturity,referenceDate,y);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Gaussian1dModel_zerobond" "', argument " "1"" of type '" "boost::shared_ptr< Gaussian1dModel > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Gaussian1dModel > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Gaussian1dModel_zerobond" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gaussian1dModel_zerobond" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Gaussian1dModel_zerobond" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gaussian1dModel_zerobond" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Gaussian1dModel_zerobond" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    {
      try {
        result = (Real)(*arg1)->zerobond((Date const &)*arg2,(Date const &)*arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Gaussian1dModel_zerobond__SWIG_6) {
  {
    boost::shared_ptr< Gaussian1dModel > *arg1 = (boost::shared_ptr< Gaussian1dModel > *) 0 ;
    Date *arg2 = 0 ;
    Date *arg3 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: Gaussian1dModel_zerobond(self,maturity,referenceDate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Gaussian1dModel_zerobond" "', argument " "1"" of type '" "boost::shared_ptr< Gaussian1dModel > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Gaussian1dModel > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Gaussian1dModel_zerobond" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gaussian1dModel_zerobond" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Gaussian1dModel_zerobond" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gaussian1dModel_zerobond" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    {
      try {
        result = (Real)(*arg1)->zerobond((Date const &)*arg2,(Date const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Gaussian1dModel_zerobond__SWIG_7) {
  {
    boost::shared_ptr< Gaussian1dModel > *arg1 = (boost::shared_ptr< Gaussian1dModel > *) 0 ;
    Date *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Gaussian1dModel_zerobond(self,maturity);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Gaussian1dModel_zerobond" "', argument " "1"" of type '" "boost::shared_ptr< Gaussian1dModel > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Gaussian1dModel > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Gaussian1dModel_zerobond" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gaussian1dModel_zerobond" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    {
      try {
        result = (Real)(*arg1)->zerobond((Date const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Gaussian1dModel_zerobond) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 7;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_7:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 8;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_8:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Gaussian1dModel_zerobond__SWIG_7); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Gaussian1dModel_zerobond__SWIG_3); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Gaussian1dModel_zerobond__SWIG_6); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Gaussian1dModel_zerobond__SWIG_2); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Gaussian1dModel_zerobond__SWIG_5); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Gaussian1dModel_zerobond__SWIG_1); return;
    case 7:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Gaussian1dModel_zerobond__SWIG_4); return;
    case 8:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Gaussian1dModel_zerobond__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'Gaussian1dModel_zerobond'");
  XSRETURN(0);
}


XS(_wrap_Gaussian1dModel_zerobondOption__SWIG_0) {
  {
    boost::shared_ptr< Gaussian1dModel > *arg1 = (boost::shared_ptr< Gaussian1dModel > *) 0 ;
    Option::Type *arg2 = 0 ;
    Date *arg3 = 0 ;
    Date *arg4 = 0 ;
    Date *arg5 = 0 ;
    Rate arg6 ;
    Date *arg7 = 0 ;
    Real arg8 ;
    Handle< YieldTermStructure > *arg9 = 0 ;
    Real arg10 ;
    Size arg11 ;
    bool arg12 ;
    bool arg13 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 ;
    Option::Type temp2 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    double val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    double val8 ;
    int ecode8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    double val10 ;
    int ecode10 = 0 ;
    size_t val11 ;
    int ecode11 = 0 ;
    bool val12 ;
    int ecode12 = 0 ;
    bool val13 ;
    int ecode13 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 13) || (items > 13)) {
      SWIG_croak("Usage: Gaussian1dModel_zerobondOption(self,type,expiry,valueDate,maturity,strike,referenceDate,y,yts,yStdDevs,yGridPoints,extrapolatePayoff,flatPayoffExtrapolation);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Gaussian1dModel_zerobondOption" "', argument " "1"" of type '" "boost::shared_ptr< Gaussian1dModel > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Gaussian1dModel > * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Gaussian1dModel_zerobondOption" "', argument " "2"" of type '" "Option::Type const &""'");
    } else {
      temp2 = static_cast< Option::Type >(val2);
      arg2 = &temp2;
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Gaussian1dModel_zerobondOption" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gaussian1dModel_zerobondOption" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Gaussian1dModel_zerobondOption" "', argument " "4"" of type '" "Date const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gaussian1dModel_zerobondOption" "', argument " "4"" of type '" "Date const &""'"); 
    }
    arg4 = reinterpret_cast< Date * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "Gaussian1dModel_zerobondOption" "', argument " "5"" of type '" "Date const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gaussian1dModel_zerobondOption" "', argument " "5"" of type '" "Date const &""'"); 
    }
    arg5 = reinterpret_cast< Date * >(argp5);
    ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Gaussian1dModel_zerobondOption" "', argument " "6"" of type '" "Rate""'");
    } 
    arg6 = static_cast< Rate >(val6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "Gaussian1dModel_zerobondOption" "', argument " "7"" of type '" "Date const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gaussian1dModel_zerobondOption" "', argument " "7"" of type '" "Date const &""'"); 
    }
    arg7 = reinterpret_cast< Date * >(argp7);
    ecode8 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "Gaussian1dModel_zerobondOption" "', argument " "8"" of type '" "Real""'");
    } 
    arg8 = static_cast< Real >(val8);
    res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res9)) {
      SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "Gaussian1dModel_zerobondOption" "', argument " "9"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp9) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gaussian1dModel_zerobondOption" "', argument " "9"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg9 = reinterpret_cast< Handle< YieldTermStructure > * >(argp9);
    ecode10 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), &val10);
    if (!SWIG_IsOK(ecode10)) {
      SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "Gaussian1dModel_zerobondOption" "', argument " "10"" of type '" "Real""'");
    } 
    arg10 = static_cast< Real >(val10);
    ecode11 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(10), &val11);
    if (!SWIG_IsOK(ecode11)) {
      SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "Gaussian1dModel_zerobondOption" "', argument " "11"" of type '" "Size""'");
    } 
    arg11 = static_cast< Size >(val11);
    ecode12 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(11), &val12);
    if (!SWIG_IsOK(ecode12)) {
      SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "Gaussian1dModel_zerobondOption" "', argument " "12"" of type '" "bool""'");
    } 
    arg12 = static_cast< bool >(val12);
    ecode13 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(12), &val13);
    if (!SWIG_IsOK(ecode13)) {
      SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "Gaussian1dModel_zerobondOption" "', argument " "13"" of type '" "bool""'");
    } 
    arg13 = static_cast< bool >(val13);
    {
      try {
        result = (Real)(*arg1)->zerobondOption((Option::Type const &)*arg2,(Date const &)*arg3,(Date const &)*arg4,(Date const &)*arg5,arg6,(Date const &)*arg7,arg8,(Handle< YieldTermStructure > const &)*arg9,arg10,arg11,arg12,arg13);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Gaussian1dModel_zerobondOption__SWIG_1) {
  {
    boost::shared_ptr< Gaussian1dModel > *arg1 = (boost::shared_ptr< Gaussian1dModel > *) 0 ;
    Option::Type *arg2 = 0 ;
    Date *arg3 = 0 ;
    Date *arg4 = 0 ;
    Date *arg5 = 0 ;
    Rate arg6 ;
    Date *arg7 = 0 ;
    Real arg8 ;
    Handle< YieldTermStructure > *arg9 = 0 ;
    Real arg10 ;
    Size arg11 ;
    bool arg12 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 ;
    Option::Type temp2 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    double val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    double val8 ;
    int ecode8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    double val10 ;
    int ecode10 = 0 ;
    size_t val11 ;
    int ecode11 = 0 ;
    bool val12 ;
    int ecode12 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 12) || (items > 12)) {
      SWIG_croak("Usage: Gaussian1dModel_zerobondOption(self,type,expiry,valueDate,maturity,strike,referenceDate,y,yts,yStdDevs,yGridPoints,extrapolatePayoff);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Gaussian1dModel_zerobondOption" "', argument " "1"" of type '" "boost::shared_ptr< Gaussian1dModel > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Gaussian1dModel > * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Gaussian1dModel_zerobondOption" "', argument " "2"" of type '" "Option::Type const &""'");
    } else {
      temp2 = static_cast< Option::Type >(val2);
      arg2 = &temp2;
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Gaussian1dModel_zerobondOption" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gaussian1dModel_zerobondOption" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Gaussian1dModel_zerobondOption" "', argument " "4"" of type '" "Date const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gaussian1dModel_zerobondOption" "', argument " "4"" of type '" "Date const &""'"); 
    }
    arg4 = reinterpret_cast< Date * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "Gaussian1dModel_zerobondOption" "', argument " "5"" of type '" "Date const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gaussian1dModel_zerobondOption" "', argument " "5"" of type '" "Date const &""'"); 
    }
    arg5 = reinterpret_cast< Date * >(argp5);
    ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Gaussian1dModel_zerobondOption" "', argument " "6"" of type '" "Rate""'");
    } 
    arg6 = static_cast< Rate >(val6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "Gaussian1dModel_zerobondOption" "', argument " "7"" of type '" "Date const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gaussian1dModel_zerobondOption" "', argument " "7"" of type '" "Date const &""'"); 
    }
    arg7 = reinterpret_cast< Date * >(argp7);
    ecode8 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "Gaussian1dModel_zerobondOption" "', argument " "8"" of type '" "Real""'");
    } 
    arg8 = static_cast< Real >(val8);
    res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res9)) {
      SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "Gaussian1dModel_zerobondOption" "', argument " "9"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp9) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gaussian1dModel_zerobondOption" "', argument " "9"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg9 = reinterpret_cast< Handle< YieldTermStructure > * >(argp9);
    ecode10 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), &val10);
    if (!SWIG_IsOK(ecode10)) {
      SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "Gaussian1dModel_zerobondOption" "', argument " "10"" of type '" "Real""'");
    } 
    arg10 = static_cast< Real >(val10);
    ecode11 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(10), &val11);
    if (!SWIG_IsOK(ecode11)) {
      SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "Gaussian1dModel_zerobondOption" "', argument " "11"" of type '" "Size""'");
    } 
    arg11 = static_cast< Size >(val11);
    ecode12 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(11), &val12);
    if (!SWIG_IsOK(ecode12)) {
      SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "Gaussian1dModel_zerobondOption" "', argument " "12"" of type '" "bool""'");
    } 
    arg12 = static_cast< bool >(val12);
    {
      try {
        result = (Real)(*arg1)->zerobondOption((Option::Type const &)*arg2,(Date const &)*arg3,(Date const &)*arg4,(Date const &)*arg5,arg6,(Date const &)*arg7,arg8,(Handle< YieldTermStructure > const &)*arg9,arg10,arg11,arg12);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Gaussian1dModel_zerobondOption__SWIG_2) {
  {
    boost::shared_ptr< Gaussian1dModel > *arg1 = (boost::shared_ptr< Gaussian1dModel > *) 0 ;
    Option::Type *arg2 = 0 ;
    Date *arg3 = 0 ;
    Date *arg4 = 0 ;
    Date *arg5 = 0 ;
    Rate arg6 ;
    Date *arg7 = 0 ;
    Real arg8 ;
    Handle< YieldTermStructure > *arg9 = 0 ;
    Real arg10 ;
    Size arg11 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 ;
    Option::Type temp2 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    double val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    double val8 ;
    int ecode8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    double val10 ;
    int ecode10 = 0 ;
    size_t val11 ;
    int ecode11 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 11) || (items > 11)) {
      SWIG_croak("Usage: Gaussian1dModel_zerobondOption(self,type,expiry,valueDate,maturity,strike,referenceDate,y,yts,yStdDevs,yGridPoints);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Gaussian1dModel_zerobondOption" "', argument " "1"" of type '" "boost::shared_ptr< Gaussian1dModel > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Gaussian1dModel > * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Gaussian1dModel_zerobondOption" "', argument " "2"" of type '" "Option::Type const &""'");
    } else {
      temp2 = static_cast< Option::Type >(val2);
      arg2 = &temp2;
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Gaussian1dModel_zerobondOption" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gaussian1dModel_zerobondOption" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Gaussian1dModel_zerobondOption" "', argument " "4"" of type '" "Date const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gaussian1dModel_zerobondOption" "', argument " "4"" of type '" "Date const &""'"); 
    }
    arg4 = reinterpret_cast< Date * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "Gaussian1dModel_zerobondOption" "', argument " "5"" of type '" "Date const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gaussian1dModel_zerobondOption" "', argument " "5"" of type '" "Date const &""'"); 
    }
    arg5 = reinterpret_cast< Date * >(argp5);
    ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Gaussian1dModel_zerobondOption" "', argument " "6"" of type '" "Rate""'");
    } 
    arg6 = static_cast< Rate >(val6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "Gaussian1dModel_zerobondOption" "', argument " "7"" of type '" "Date const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gaussian1dModel_zerobondOption" "', argument " "7"" of type '" "Date const &""'"); 
    }
    arg7 = reinterpret_cast< Date * >(argp7);
    ecode8 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "Gaussian1dModel_zerobondOption" "', argument " "8"" of type '" "Real""'");
    } 
    arg8 = static_cast< Real >(val8);
    res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res9)) {
      SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "Gaussian1dModel_zerobondOption" "', argument " "9"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp9) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gaussian1dModel_zerobondOption" "', argument " "9"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg9 = reinterpret_cast< Handle< YieldTermStructure > * >(argp9);
    ecode10 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), &val10);
    if (!SWIG_IsOK(ecode10)) {
      SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "Gaussian1dModel_zerobondOption" "', argument " "10"" of type '" "Real""'");
    } 
    arg10 = static_cast< Real >(val10);
    ecode11 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(10), &val11);
    if (!SWIG_IsOK(ecode11)) {
      SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "Gaussian1dModel_zerobondOption" "', argument " "11"" of type '" "Size""'");
    } 
    arg11 = static_cast< Size >(val11);
    {
      try {
        result = (Real)(*arg1)->zerobondOption((Option::Type const &)*arg2,(Date const &)*arg3,(Date const &)*arg4,(Date const &)*arg5,arg6,(Date const &)*arg7,arg8,(Handle< YieldTermStructure > const &)*arg9,arg10,arg11);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Gaussian1dModel_zerobondOption__SWIG_3) {
  {
    boost::shared_ptr< Gaussian1dModel > *arg1 = (boost::shared_ptr< Gaussian1dModel > *) 0 ;
    Option::Type *arg2 = 0 ;
    Date *arg3 = 0 ;
    Date *arg4 = 0 ;
    Date *arg5 = 0 ;
    Rate arg6 ;
    Date *arg7 = 0 ;
    Real arg8 ;
    Handle< YieldTermStructure > *arg9 = 0 ;
    Real arg10 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 ;
    Option::Type temp2 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    double val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    double val8 ;
    int ecode8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    double val10 ;
    int ecode10 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 10) || (items > 10)) {
      SWIG_croak("Usage: Gaussian1dModel_zerobondOption(self,type,expiry,valueDate,maturity,strike,referenceDate,y,yts,yStdDevs);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Gaussian1dModel_zerobondOption" "', argument " "1"" of type '" "boost::shared_ptr< Gaussian1dModel > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Gaussian1dModel > * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Gaussian1dModel_zerobondOption" "', argument " "2"" of type '" "Option::Type const &""'");
    } else {
      temp2 = static_cast< Option::Type >(val2);
      arg2 = &temp2;
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Gaussian1dModel_zerobondOption" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gaussian1dModel_zerobondOption" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Gaussian1dModel_zerobondOption" "', argument " "4"" of type '" "Date const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gaussian1dModel_zerobondOption" "', argument " "4"" of type '" "Date const &""'"); 
    }
    arg4 = reinterpret_cast< Date * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "Gaussian1dModel_zerobondOption" "', argument " "5"" of type '" "Date const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gaussian1dModel_zerobondOption" "', argument " "5"" of type '" "Date const &""'"); 
    }
    arg5 = reinterpret_cast< Date * >(argp5);
    ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Gaussian1dModel_zerobondOption" "', argument " "6"" of type '" "Rate""'");
    } 
    arg6 = static_cast< Rate >(val6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "Gaussian1dModel_zerobondOption" "', argument " "7"" of type '" "Date const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gaussian1dModel_zerobondOption" "', argument " "7"" of type '" "Date const &""'"); 
    }
    arg7 = reinterpret_cast< Date * >(argp7);
    ecode8 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "Gaussian1dModel_zerobondOption" "', argument " "8"" of type '" "Real""'");
    } 
    arg8 = static_cast< Real >(val8);
    res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res9)) {
      SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "Gaussian1dModel_zerobondOption" "', argument " "9"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp9) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gaussian1dModel_zerobondOption" "', argument " "9"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg9 = reinterpret_cast< Handle< YieldTermStructure > * >(argp9);
    ecode10 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), &val10);
    if (!SWIG_IsOK(ecode10)) {
      SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "Gaussian1dModel_zerobondOption" "', argument " "10"" of type '" "Real""'");
    } 
    arg10 = static_cast< Real >(val10);
    {
      try {
        result = (Real)(*arg1)->zerobondOption((Option::Type const &)*arg2,(Date const &)*arg3,(Date const &)*arg4,(Date const &)*arg5,arg6,(Date const &)*arg7,arg8,(Handle< YieldTermStructure > const &)*arg9,arg10);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Gaussian1dModel_zerobondOption__SWIG_4) {
  {
    boost::shared_ptr< Gaussian1dModel > *arg1 = (boost::shared_ptr< Gaussian1dModel > *) 0 ;
    Option::Type *arg2 = 0 ;
    Date *arg3 = 0 ;
    Date *arg4 = 0 ;
    Date *arg5 = 0 ;
    Rate arg6 ;
    Date *arg7 = 0 ;
    Real arg8 ;
    Handle< YieldTermStructure > *arg9 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 ;
    Option::Type temp2 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    double val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    double val8 ;
    int ecode8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 9) || (items > 9)) {
      SWIG_croak("Usage: Gaussian1dModel_zerobondOption(self,type,expiry,valueDate,maturity,strike,referenceDate,y,yts);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Gaussian1dModel_zerobondOption" "', argument " "1"" of type '" "boost::shared_ptr< Gaussian1dModel > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Gaussian1dModel > * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Gaussian1dModel_zerobondOption" "', argument " "2"" of type '" "Option::Type const &""'");
    } else {
      temp2 = static_cast< Option::Type >(val2);
      arg2 = &temp2;
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Gaussian1dModel_zerobondOption" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gaussian1dModel_zerobondOption" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Gaussian1dModel_zerobondOption" "', argument " "4"" of type '" "Date const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gaussian1dModel_zerobondOption" "', argument " "4"" of type '" "Date const &""'"); 
    }
    arg4 = reinterpret_cast< Date * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "Gaussian1dModel_zerobondOption" "', argument " "5"" of type '" "Date const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gaussian1dModel_zerobondOption" "', argument " "5"" of type '" "Date const &""'"); 
    }
    arg5 = reinterpret_cast< Date * >(argp5);
    ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Gaussian1dModel_zerobondOption" "', argument " "6"" of type '" "Rate""'");
    } 
    arg6 = static_cast< Rate >(val6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "Gaussian1dModel_zerobondOption" "', argument " "7"" of type '" "Date const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gaussian1dModel_zerobondOption" "', argument " "7"" of type '" "Date const &""'"); 
    }
    arg7 = reinterpret_cast< Date * >(argp7);
    ecode8 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "Gaussian1dModel_zerobondOption" "', argument " "8"" of type '" "Real""'");
    } 
    arg8 = static_cast< Real >(val8);
    res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res9)) {
      SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "Gaussian1dModel_zerobondOption" "', argument " "9"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp9) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gaussian1dModel_zerobondOption" "', argument " "9"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg9 = reinterpret_cast< Handle< YieldTermStructure > * >(argp9);
    {
      try {
        result = (Real)(*arg1)->zerobondOption((Option::Type const &)*arg2,(Date const &)*arg3,(Date const &)*arg4,(Date const &)*arg5,arg6,(Date const &)*arg7,arg8,(Handle< YieldTermStructure > const &)*arg9);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Gaussian1dModel_zerobondOption__SWIG_5) {
  {
    boost::shared_ptr< Gaussian1dModel > *arg1 = (boost::shared_ptr< Gaussian1dModel > *) 0 ;
    Option::Type *arg2 = 0 ;
    Date *arg3 = 0 ;
    Date *arg4 = 0 ;
    Date *arg5 = 0 ;
    Rate arg6 ;
    Date *arg7 = 0 ;
    Real arg8 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 ;
    Option::Type temp2 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    double val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    double val8 ;
    int ecode8 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 8) || (items > 8)) {
      SWIG_croak("Usage: Gaussian1dModel_zerobondOption(self,type,expiry,valueDate,maturity,strike,referenceDate,y);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Gaussian1dModel_zerobondOption" "', argument " "1"" of type '" "boost::shared_ptr< Gaussian1dModel > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Gaussian1dModel > * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Gaussian1dModel_zerobondOption" "', argument " "2"" of type '" "Option::Type const &""'");
    } else {
      temp2 = static_cast< Option::Type >(val2);
      arg2 = &temp2;
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Gaussian1dModel_zerobondOption" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gaussian1dModel_zerobondOption" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Gaussian1dModel_zerobondOption" "', argument " "4"" of type '" "Date const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gaussian1dModel_zerobondOption" "', argument " "4"" of type '" "Date const &""'"); 
    }
    arg4 = reinterpret_cast< Date * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "Gaussian1dModel_zerobondOption" "', argument " "5"" of type '" "Date const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gaussian1dModel_zerobondOption" "', argument " "5"" of type '" "Date const &""'"); 
    }
    arg5 = reinterpret_cast< Date * >(argp5);
    ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Gaussian1dModel_zerobondOption" "', argument " "6"" of type '" "Rate""'");
    } 
    arg6 = static_cast< Rate >(val6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "Gaussian1dModel_zerobondOption" "', argument " "7"" of type '" "Date const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gaussian1dModel_zerobondOption" "', argument " "7"" of type '" "Date const &""'"); 
    }
    arg7 = reinterpret_cast< Date * >(argp7);
    ecode8 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "Gaussian1dModel_zerobondOption" "', argument " "8"" of type '" "Real""'");
    } 
    arg8 = static_cast< Real >(val8);
    {
      try {
        result = (Real)(*arg1)->zerobondOption((Option::Type const &)*arg2,(Date const &)*arg3,(Date const &)*arg4,(Date const &)*arg5,arg6,(Date const &)*arg7,arg8);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Gaussian1dModel_zerobondOption__SWIG_6) {
  {
    boost::shared_ptr< Gaussian1dModel > *arg1 = (boost::shared_ptr< Gaussian1dModel > *) 0 ;
    Option::Type *arg2 = 0 ;
    Date *arg3 = 0 ;
    Date *arg4 = 0 ;
    Date *arg5 = 0 ;
    Rate arg6 ;
    Date *arg7 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 ;
    Option::Type temp2 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    double val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: Gaussian1dModel_zerobondOption(self,type,expiry,valueDate,maturity,strike,referenceDate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Gaussian1dModel_zerobondOption" "', argument " "1"" of type '" "boost::shared_ptr< Gaussian1dModel > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Gaussian1dModel > * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Gaussian1dModel_zerobondOption" "', argument " "2"" of type '" "Option::Type const &""'");
    } else {
      temp2 = static_cast< Option::Type >(val2);
      arg2 = &temp2;
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Gaussian1dModel_zerobondOption" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gaussian1dModel_zerobondOption" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Gaussian1dModel_zerobondOption" "', argument " "4"" of type '" "Date const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gaussian1dModel_zerobondOption" "', argument " "4"" of type '" "Date const &""'"); 
    }
    arg4 = reinterpret_cast< Date * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "Gaussian1dModel_zerobondOption" "', argument " "5"" of type '" "Date const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gaussian1dModel_zerobondOption" "', argument " "5"" of type '" "Date const &""'"); 
    }
    arg5 = reinterpret_cast< Date * >(argp5);
    ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Gaussian1dModel_zerobondOption" "', argument " "6"" of type '" "Rate""'");
    } 
    arg6 = static_cast< Rate >(val6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "Gaussian1dModel_zerobondOption" "', argument " "7"" of type '" "Date const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gaussian1dModel_zerobondOption" "', argument " "7"" of type '" "Date const &""'"); 
    }
    arg7 = reinterpret_cast< Date * >(argp7);
    {
      try {
        result = (Real)(*arg1)->zerobondOption((Option::Type const &)*arg2,(Date const &)*arg3,(Date const &)*arg4,(Date const &)*arg5,arg6,(Date const &)*arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Gaussian1dModel_zerobondOption__SWIG_7) {
  {
    boost::shared_ptr< Gaussian1dModel > *arg1 = (boost::shared_ptr< Gaussian1dModel > *) 0 ;
    Option::Type *arg2 = 0 ;
    Date *arg3 = 0 ;
    Date *arg4 = 0 ;
    Date *arg5 = 0 ;
    Rate arg6 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 ;
    Option::Type temp2 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    double val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: Gaussian1dModel_zerobondOption(self,type,expiry,valueDate,maturity,strike);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Gaussian1dModel_zerobondOption" "', argument " "1"" of type '" "boost::shared_ptr< Gaussian1dModel > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Gaussian1dModel > * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Gaussian1dModel_zerobondOption" "', argument " "2"" of type '" "Option::Type const &""'");
    } else {
      temp2 = static_cast< Option::Type >(val2);
      arg2 = &temp2;
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Gaussian1dModel_zerobondOption" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gaussian1dModel_zerobondOption" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Gaussian1dModel_zerobondOption" "', argument " "4"" of type '" "Date const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gaussian1dModel_zerobondOption" "', argument " "4"" of type '" "Date const &""'"); 
    }
    arg4 = reinterpret_cast< Date * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "Gaussian1dModel_zerobondOption" "', argument " "5"" of type '" "Date const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gaussian1dModel_zerobondOption" "', argument " "5"" of type '" "Date const &""'"); 
    }
    arg5 = reinterpret_cast< Date * >(argp5);
    ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Gaussian1dModel_zerobondOption" "', argument " "6"" of type '" "Rate""'");
    } 
    arg6 = static_cast< Rate >(val6);
    {
      try {
        result = (Real)(*arg1)->zerobondOption((Option::Type const &)*arg2,(Date const &)*arg3,(Date const &)*arg4,(Date const &)*arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Gaussian1dModel_zerobondOption) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 8) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 9) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 10) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 11) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(10), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
    if (items == 12) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(10), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(11), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 7;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_7:
    
    if (items == 13) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(10), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(11), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(12), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 8;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_8:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Gaussian1dModel_zerobondOption__SWIG_7); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Gaussian1dModel_zerobondOption__SWIG_6); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Gaussian1dModel_zerobondOption__SWIG_5); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Gaussian1dModel_zerobondOption__SWIG_4); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Gaussian1dModel_zerobondOption__SWIG_3); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Gaussian1dModel_zerobondOption__SWIG_2); return;
    case 7:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Gaussian1dModel_zerobondOption__SWIG_1); return;
    case 8:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Gaussian1dModel_zerobondOption__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'Gaussian1dModel_zerobondOption'");
  XSRETURN(0);
}


XS(_wrap_Gaussian1dModel_forwardRate__SWIG_0) {
  {
    boost::shared_ptr< Gaussian1dModel > *arg1 = (boost::shared_ptr< Gaussian1dModel > *) 0 ;
    Date *arg2 = 0 ;
    Date *arg3 = 0 ;
    Real arg4 ;
    SwigValueWrapper< boost::shared_ptr< IborIndex > > arg5 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: Gaussian1dModel_forwardRate(self,fixing,referenceDate,y,iborIdx);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Gaussian1dModel_forwardRate" "', argument " "1"" of type '" "boost::shared_ptr< Gaussian1dModel > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Gaussian1dModel > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Gaussian1dModel_forwardRate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gaussian1dModel_forwardRate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Gaussian1dModel_forwardRate" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gaussian1dModel_forwardRate" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Gaussian1dModel_forwardRate" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    {
      res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_boost__shared_ptrT_IborIndex_t,  0 );
      if (!SWIG_IsOK(res5)) {
        SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "Gaussian1dModel_forwardRate" "', argument " "5"" of type '" "boost::shared_ptr< IborIndex >""'"); 
      }  
      if (!argp5) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gaussian1dModel_forwardRate" "', argument " "5"" of type '" "boost::shared_ptr< IborIndex >""'");
      } else {
        arg5 = *(reinterpret_cast< boost::shared_ptr< IborIndex > * >(argp5));
      }
    }
    {
      try {
        result = (Real)(*arg1)->forwardRate((Date const &)*arg2,(Date const &)*arg3,arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Gaussian1dModel_forwardRate__SWIG_1) {
  {
    boost::shared_ptr< Gaussian1dModel > *arg1 = (boost::shared_ptr< Gaussian1dModel > *) 0 ;
    Date *arg2 = 0 ;
    Date *arg3 = 0 ;
    Real arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: Gaussian1dModel_forwardRate(self,fixing,referenceDate,y);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Gaussian1dModel_forwardRate" "', argument " "1"" of type '" "boost::shared_ptr< Gaussian1dModel > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Gaussian1dModel > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Gaussian1dModel_forwardRate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gaussian1dModel_forwardRate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Gaussian1dModel_forwardRate" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gaussian1dModel_forwardRate" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Gaussian1dModel_forwardRate" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    {
      try {
        result = (Real)(*arg1)->forwardRate((Date const &)*arg2,(Date const &)*arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Gaussian1dModel_forwardRate__SWIG_2) {
  {
    boost::shared_ptr< Gaussian1dModel > *arg1 = (boost::shared_ptr< Gaussian1dModel > *) 0 ;
    Date *arg2 = 0 ;
    Date *arg3 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: Gaussian1dModel_forwardRate(self,fixing,referenceDate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Gaussian1dModel_forwardRate" "', argument " "1"" of type '" "boost::shared_ptr< Gaussian1dModel > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Gaussian1dModel > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Gaussian1dModel_forwardRate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gaussian1dModel_forwardRate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Gaussian1dModel_forwardRate" "', argument " "3"" of type '" "Date const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gaussian1dModel_forwardRate" "', argument " "3"" of type '" "Date const &""'"); 
    }
    arg3 = reinterpret_cast< Date * >(argp3);
    {
      try {
        result = (Real)(*arg1)->forwardRate((Date const &)*arg2,(Date const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Gaussian1dModel_forwardRate__SWIG_3) {
  {
    boost::shared_ptr< Gaussian1dModel > *arg1 = (boost::shared_ptr< Gaussian1dModel > *) 0 ;
    Date *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Gaussian1dModel_forwardRate(self,fixing);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Gaussian1dModel_forwardRate" "', argument " "1"" of type '" "boost::shared_ptr< Gaussian1dModel > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Gaussian1dModel > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Gaussian1dModel_forwardRate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gaussian1dModel_forwardRate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    {
      try {
        result = (Real)(*arg1)->forwardRate((Date const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Gaussian1dModel_forwardRate) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_boost__shared_ptrT_IborIndex_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Gaussian1dModel_forwardRate__SWIG_3); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Gaussian1dModel_forwardRate__SWIG_2); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Gaussian1dModel_forwardRate__SWIG_1); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Gaussian1dModel_forwardRate__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'Gaussian1dModel_forwardRate'");
  XSRETURN(0);
}


XS(_wrap_Gaussian1dModel_swapRate__SWIG_0) {
  {
    boost::shared_ptr< Gaussian1dModel > *arg1 = (boost::shared_ptr< Gaussian1dModel > *) 0 ;
    Date *arg2 = 0 ;
    Period *arg3 = 0 ;
    Date *arg4 = 0 ;
    Real arg5 ;
    SwigValueWrapper< boost::shared_ptr< SwapIndex > > arg6 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    double val5 ;
    int ecode5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: Gaussian1dModel_swapRate(self,fixing,tenor,referenceDate,y,swapIdx);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Gaussian1dModel_swapRate" "', argument " "1"" of type '" "boost::shared_ptr< Gaussian1dModel > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Gaussian1dModel > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Gaussian1dModel_swapRate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gaussian1dModel_swapRate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Gaussian1dModel_swapRate" "', argument " "3"" of type '" "Period const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gaussian1dModel_swapRate" "', argument " "3"" of type '" "Period const &""'"); 
    }
    arg3 = reinterpret_cast< Period * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Gaussian1dModel_swapRate" "', argument " "4"" of type '" "Date const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gaussian1dModel_swapRate" "', argument " "4"" of type '" "Date const &""'"); 
    }
    arg4 = reinterpret_cast< Date * >(argp4);
    ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Gaussian1dModel_swapRate" "', argument " "5"" of type '" "Real""'");
    } 
    arg5 = static_cast< Real >(val5);
    {
      res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_boost__shared_ptrT_SwapIndex_t,  0 );
      if (!SWIG_IsOK(res6)) {
        SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "Gaussian1dModel_swapRate" "', argument " "6"" of type '" "boost::shared_ptr< SwapIndex >""'"); 
      }  
      if (!argp6) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gaussian1dModel_swapRate" "', argument " "6"" of type '" "boost::shared_ptr< SwapIndex >""'");
      } else {
        arg6 = *(reinterpret_cast< boost::shared_ptr< SwapIndex > * >(argp6));
      }
    }
    {
      try {
        result = (Real)(*arg1)->swapRate((Date const &)*arg2,(Period const &)*arg3,(Date const &)*arg4,arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Gaussian1dModel_swapRate__SWIG_1) {
  {
    boost::shared_ptr< Gaussian1dModel > *arg1 = (boost::shared_ptr< Gaussian1dModel > *) 0 ;
    Date *arg2 = 0 ;
    Period *arg3 = 0 ;
    Date *arg4 = 0 ;
    Real arg5 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    double val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: Gaussian1dModel_swapRate(self,fixing,tenor,referenceDate,y);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Gaussian1dModel_swapRate" "', argument " "1"" of type '" "boost::shared_ptr< Gaussian1dModel > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Gaussian1dModel > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Gaussian1dModel_swapRate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gaussian1dModel_swapRate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Gaussian1dModel_swapRate" "', argument " "3"" of type '" "Period const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gaussian1dModel_swapRate" "', argument " "3"" of type '" "Period const &""'"); 
    }
    arg3 = reinterpret_cast< Period * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Gaussian1dModel_swapRate" "', argument " "4"" of type '" "Date const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gaussian1dModel_swapRate" "', argument " "4"" of type '" "Date const &""'"); 
    }
    arg4 = reinterpret_cast< Date * >(argp4);
    ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Gaussian1dModel_swapRate" "', argument " "5"" of type '" "Real""'");
    } 
    arg5 = static_cast< Real >(val5);
    {
      try {
        result = (Real)(*arg1)->swapRate((Date const &)*arg2,(Period const &)*arg3,(Date const &)*arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Gaussian1dModel_swapRate__SWIG_2) {
  {
    boost::shared_ptr< Gaussian1dModel > *arg1 = (boost::shared_ptr< Gaussian1dModel > *) 0 ;
    Date *arg2 = 0 ;
    Period *arg3 = 0 ;
    Date *arg4 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: Gaussian1dModel_swapRate(self,fixing,tenor,referenceDate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Gaussian1dModel_swapRate" "', argument " "1"" of type '" "boost::shared_ptr< Gaussian1dModel > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Gaussian1dModel > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Gaussian1dModel_swapRate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gaussian1dModel_swapRate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Gaussian1dModel_swapRate" "', argument " "3"" of type '" "Period const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gaussian1dModel_swapRate" "', argument " "3"" of type '" "Period const &""'"); 
    }
    arg3 = reinterpret_cast< Period * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Gaussian1dModel_swapRate" "', argument " "4"" of type '" "Date const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gaussian1dModel_swapRate" "', argument " "4"" of type '" "Date const &""'"); 
    }
    arg4 = reinterpret_cast< Date * >(argp4);
    {
      try {
        result = (Real)(*arg1)->swapRate((Date const &)*arg2,(Period const &)*arg3,(Date const &)*arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Gaussian1dModel_swapRate__SWIG_3) {
  {
    boost::shared_ptr< Gaussian1dModel > *arg1 = (boost::shared_ptr< Gaussian1dModel > *) 0 ;
    Date *arg2 = 0 ;
    Period *arg3 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: Gaussian1dModel_swapRate(self,fixing,tenor);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Gaussian1dModel_swapRate" "', argument " "1"" of type '" "boost::shared_ptr< Gaussian1dModel > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Gaussian1dModel > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Gaussian1dModel_swapRate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gaussian1dModel_swapRate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Gaussian1dModel_swapRate" "', argument " "3"" of type '" "Period const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gaussian1dModel_swapRate" "', argument " "3"" of type '" "Period const &""'"); 
    }
    arg3 = reinterpret_cast< Period * >(argp3);
    {
      try {
        result = (Real)(*arg1)->swapRate((Date const &)*arg2,(Period const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Gaussian1dModel_swapRate) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_boost__shared_ptrT_SwapIndex_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Gaussian1dModel_swapRate__SWIG_3); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Gaussian1dModel_swapRate__SWIG_2); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Gaussian1dModel_swapRate__SWIG_1); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Gaussian1dModel_swapRate__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'Gaussian1dModel_swapRate'");
  XSRETURN(0);
}


XS(_wrap_Gaussian1dModel_swapAnnuity__SWIG_0) {
  {
    boost::shared_ptr< Gaussian1dModel > *arg1 = (boost::shared_ptr< Gaussian1dModel > *) 0 ;
    Date *arg2 = 0 ;
    Period *arg3 = 0 ;
    Date *arg4 = 0 ;
    Real arg5 ;
    SwigValueWrapper< boost::shared_ptr< SwapIndex > > arg6 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    double val5 ;
    int ecode5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: Gaussian1dModel_swapAnnuity(self,fixing,tenor,referenceDate,y,swapIdx);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Gaussian1dModel_swapAnnuity" "', argument " "1"" of type '" "boost::shared_ptr< Gaussian1dModel > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Gaussian1dModel > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Gaussian1dModel_swapAnnuity" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gaussian1dModel_swapAnnuity" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Gaussian1dModel_swapAnnuity" "', argument " "3"" of type '" "Period const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gaussian1dModel_swapAnnuity" "', argument " "3"" of type '" "Period const &""'"); 
    }
    arg3 = reinterpret_cast< Period * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Gaussian1dModel_swapAnnuity" "', argument " "4"" of type '" "Date const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gaussian1dModel_swapAnnuity" "', argument " "4"" of type '" "Date const &""'"); 
    }
    arg4 = reinterpret_cast< Date * >(argp4);
    ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Gaussian1dModel_swapAnnuity" "', argument " "5"" of type '" "Real""'");
    } 
    arg5 = static_cast< Real >(val5);
    {
      res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_boost__shared_ptrT_SwapIndex_t,  0 );
      if (!SWIG_IsOK(res6)) {
        SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "Gaussian1dModel_swapAnnuity" "', argument " "6"" of type '" "boost::shared_ptr< SwapIndex >""'"); 
      }  
      if (!argp6) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gaussian1dModel_swapAnnuity" "', argument " "6"" of type '" "boost::shared_ptr< SwapIndex >""'");
      } else {
        arg6 = *(reinterpret_cast< boost::shared_ptr< SwapIndex > * >(argp6));
      }
    }
    {
      try {
        result = (Real)(*arg1)->swapAnnuity((Date const &)*arg2,(Period const &)*arg3,(Date const &)*arg4,arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Gaussian1dModel_swapAnnuity__SWIG_1) {
  {
    boost::shared_ptr< Gaussian1dModel > *arg1 = (boost::shared_ptr< Gaussian1dModel > *) 0 ;
    Date *arg2 = 0 ;
    Period *arg3 = 0 ;
    Date *arg4 = 0 ;
    Real arg5 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    double val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: Gaussian1dModel_swapAnnuity(self,fixing,tenor,referenceDate,y);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Gaussian1dModel_swapAnnuity" "', argument " "1"" of type '" "boost::shared_ptr< Gaussian1dModel > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Gaussian1dModel > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Gaussian1dModel_swapAnnuity" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gaussian1dModel_swapAnnuity" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Gaussian1dModel_swapAnnuity" "', argument " "3"" of type '" "Period const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gaussian1dModel_swapAnnuity" "', argument " "3"" of type '" "Period const &""'"); 
    }
    arg3 = reinterpret_cast< Period * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Gaussian1dModel_swapAnnuity" "', argument " "4"" of type '" "Date const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gaussian1dModel_swapAnnuity" "', argument " "4"" of type '" "Date const &""'"); 
    }
    arg4 = reinterpret_cast< Date * >(argp4);
    ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Gaussian1dModel_swapAnnuity" "', argument " "5"" of type '" "Real""'");
    } 
    arg5 = static_cast< Real >(val5);
    {
      try {
        result = (Real)(*arg1)->swapAnnuity((Date const &)*arg2,(Period const &)*arg3,(Date const &)*arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Gaussian1dModel_swapAnnuity__SWIG_2) {
  {
    boost::shared_ptr< Gaussian1dModel > *arg1 = (boost::shared_ptr< Gaussian1dModel > *) 0 ;
    Date *arg2 = 0 ;
    Period *arg3 = 0 ;
    Date *arg4 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: Gaussian1dModel_swapAnnuity(self,fixing,tenor,referenceDate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Gaussian1dModel_swapAnnuity" "', argument " "1"" of type '" "boost::shared_ptr< Gaussian1dModel > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Gaussian1dModel > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Gaussian1dModel_swapAnnuity" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gaussian1dModel_swapAnnuity" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Gaussian1dModel_swapAnnuity" "', argument " "3"" of type '" "Period const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gaussian1dModel_swapAnnuity" "', argument " "3"" of type '" "Period const &""'"); 
    }
    arg3 = reinterpret_cast< Period * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Gaussian1dModel_swapAnnuity" "', argument " "4"" of type '" "Date const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gaussian1dModel_swapAnnuity" "', argument " "4"" of type '" "Date const &""'"); 
    }
    arg4 = reinterpret_cast< Date * >(argp4);
    {
      try {
        result = (Real)(*arg1)->swapAnnuity((Date const &)*arg2,(Period const &)*arg3,(Date const &)*arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Gaussian1dModel_swapAnnuity__SWIG_3) {
  {
    boost::shared_ptr< Gaussian1dModel > *arg1 = (boost::shared_ptr< Gaussian1dModel > *) 0 ;
    Date *arg2 = 0 ;
    Period *arg3 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: Gaussian1dModel_swapAnnuity(self,fixing,tenor);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Gaussian1dModel_swapAnnuity" "', argument " "1"" of type '" "boost::shared_ptr< Gaussian1dModel > const *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Gaussian1dModel > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Gaussian1dModel_swapAnnuity" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gaussian1dModel_swapAnnuity" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Gaussian1dModel_swapAnnuity" "', argument " "3"" of type '" "Period const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gaussian1dModel_swapAnnuity" "', argument " "3"" of type '" "Period const &""'"); 
    }
    arg3 = reinterpret_cast< Period * >(argp3);
    {
      try {
        result = (Real)(*arg1)->swapAnnuity((Date const &)*arg2,(Period const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Gaussian1dModel_swapAnnuity) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_boost__shared_ptrT_SwapIndex_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Gaussian1dModel_swapAnnuity__SWIG_3); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Gaussian1dModel_swapAnnuity__SWIG_2); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Gaussian1dModel_swapAnnuity__SWIG_1); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Gaussian1dModel_swapAnnuity__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'Gaussian1dModel_swapAnnuity'");
  XSRETURN(0);
}


XS(_wrap_new_Gsr__SWIG_0) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    std::vector< Date > *arg2 = 0 ;
    std::vector< Handle< Quote > > *arg3 = 0 ;
    std::vector< Handle< Quote > > *arg4 = 0 ;
    Real arg5 ;
    void *argp1 ;
    int res1 = 0 ;
    std::vector< Date > temp2 ;
    std::vector< Date > *v2 ;
    std::vector< Handle< Quote > > temp3 ;
    std::vector< Handle< Quote > > *v3 ;
    std::vector< Handle< Quote > > temp4 ;
    std::vector< Handle< Quote > > *v4 ;
    double val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    GsrPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_Gsr(termStructure,volstepdates,volatilities,reversions,T);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Gsr" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Gsr" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_Gsr. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp2.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_Gsr. "
              "Expected an array of " "Date");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_Gsr. "
          "Expected an array of " "Date");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_Gsr. "
          "Expected an array of " "Handle< Quote >");
        SV **tv;
        I32 len = av_len(av) + 1;
        Handle< Quote >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_HandleT_Quote_t,0) != -1) {
            temp3.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_Gsr. "
              "Expected an array of " "Handle< Quote >");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_Gsr. "
          "Expected an array of " "Handle< Quote >");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of new_Gsr. "
          "Expected an array of " "Handle< Quote >");
        SV **tv;
        I32 len = av_len(av) + 1;
        Handle< Quote >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_HandleT_Quote_t,0) != -1) {
            temp4.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 4 of "
              "new_Gsr. "
              "Expected an array of " "Handle< Quote >");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of new_Gsr. "
          "Expected an array of " "Handle< Quote >");
      }
    }
    ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_Gsr" "', argument " "5"" of type '" "Real""'");
    } 
    arg5 = static_cast< Real >(val5);
    {
      try {
        result = (GsrPtr *)new_GsrPtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1,(std::vector< Date > const &)*arg2,(std::vector< Handle< Quote > > const &)*arg3,(std::vector< Handle< Quote > > const &)*arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GsrPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Gsr__SWIG_1) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    std::vector< Date > *arg2 = 0 ;
    std::vector< Handle< Quote > > *arg3 = 0 ;
    std::vector< Handle< Quote > > *arg4 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    std::vector< Date > temp2 ;
    std::vector< Date > *v2 ;
    std::vector< Handle< Quote > > temp3 ;
    std::vector< Handle< Quote > > *v3 ;
    std::vector< Handle< Quote > > temp4 ;
    std::vector< Handle< Quote > > *v4 ;
    int argvi = 0;
    GsrPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_Gsr(termStructure,volstepdates,volatilities,reversions);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Gsr" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Gsr" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_Gsr. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp2.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_Gsr. "
              "Expected an array of " "Date");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_Gsr. "
          "Expected an array of " "Date");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_Gsr. "
          "Expected an array of " "Handle< Quote >");
        SV **tv;
        I32 len = av_len(av) + 1;
        Handle< Quote >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_HandleT_Quote_t,0) != -1) {
            temp3.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_Gsr. "
              "Expected an array of " "Handle< Quote >");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_Gsr. "
          "Expected an array of " "Handle< Quote >");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of new_Gsr. "
          "Expected an array of " "Handle< Quote >");
        SV **tv;
        I32 len = av_len(av) + 1;
        Handle< Quote >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_HandleT_Quote_t,0) != -1) {
            temp4.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 4 of "
              "new_Gsr. "
              "Expected an array of " "Handle< Quote >");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of new_Gsr. "
          "Expected an array of " "Handle< Quote >");
      }
    }
    {
      try {
        result = (GsrPtr *)new_GsrPtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1,(std::vector< Date > const &)*arg2,(std::vector< Handle< Quote > > const &)*arg3,(std::vector< Handle< Quote > > const &)*arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GsrPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Gsr) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Handle< Quote > >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Handle< Quote >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_HandleT_Quote_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Handle< Quote > >* v;
            if (SWIG_ConvertPtr(ST(3),(void **) &v, 
                SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(3))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(3));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Handle< Quote >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_HandleT_Quote_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Handle< Quote > >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Handle< Quote >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_HandleT_Quote_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Handle< Quote > >* v;
            if (SWIG_ConvertPtr(ST(3),(void **) &v, 
                SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(3))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(3));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Handle< Quote >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_HandleT_Quote_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Gsr__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Gsr__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Gsr'");
  XSRETURN(0);
}


XS(_wrap_Gsr_calibrateVolatilitiesIterative__SWIG_0) {
  {
    GsrPtr *arg1 = (GsrPtr *) 0 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > *arg2 = 0 ;
    OptimizationMethod *arg3 = 0 ;
    EndCriteria *arg4 = 0 ;
    Constraint *arg5 = 0 ;
    std::vector< Real > *arg6 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > temp2 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > *v2 ;
    void *argp3 = 0 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    std::vector< double > temp6 ;
    std::vector< double > *v6 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: Gsr_calibrateVolatilitiesIterative(self,helpers,method,endCriteria,constraint,weights);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GsrPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Gsr_calibrateVolatilitiesIterative" "', argument " "1"" of type '" "GsrPtr *""'"); 
    }
    arg1 = reinterpret_cast< GsrPtr * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CalibrationHelper_t_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of Gsr_calibrateVolatilitiesIterative. "
          "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CalibrationHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CalibrationHelper_t,0) != -1) {
            temp2.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 2 of "
              "Gsr_calibrateVolatilitiesIterative. "
              "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of Gsr_calibrateVolatilitiesIterative. "
          "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_OptimizationMethod,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Gsr_calibrateVolatilitiesIterative" "', argument " "3"" of type '" "OptimizationMethod &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gsr_calibrateVolatilitiesIterative" "', argument " "3"" of type '" "OptimizationMethod &""'"); 
    }
    arg3 = reinterpret_cast< OptimizationMethod * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_EndCriteria,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Gsr_calibrateVolatilitiesIterative" "', argument " "4"" of type '" "EndCriteria const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gsr_calibrateVolatilitiesIterative" "', argument " "4"" of type '" "EndCriteria const &""'"); 
    }
    arg4 = reinterpret_cast< EndCriteria * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Constraint,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "Gsr_calibrateVolatilitiesIterative" "', argument " "5"" of type '" "Constraint const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gsr_calibrateVolatilitiesIterative" "', argument " "5"" of type '" "Constraint const &""'"); 
    }
    arg5 = reinterpret_cast< Constraint * >(argp5);
    {
      if (SWIG_ConvertPtr(ST(5),(void **) &v6, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg6 = v6;
      } else if (SvROK(ST(5))) {
        AV *av = (AV *)SvRV(ST(5));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 6 of Gsr_calibrateVolatilitiesIterative. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp6.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 6 of "
              "Gsr_calibrateVolatilitiesIterative. "
              "Expected an array of ""double");
          }
        }
        arg6 = &temp6;
      } else {
        SWIG_croak("Type error in argument 6 of Gsr_calibrateVolatilitiesIterative. "
          "Expected an array of ""double");
      }
    }
    {
      try {
        GsrPtr_calibrateVolatilitiesIterative__SWIG_0(arg1,(std::vector< boost::shared_ptr< CalibrationHelper > > const &)*arg2,*arg3,(EndCriteria const &)*arg4,(Constraint const &)*arg5,(std::vector< double > const &)*arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Gsr_calibrateVolatilitiesIterative__SWIG_1) {
  {
    GsrPtr *arg1 = (GsrPtr *) 0 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > *arg2 = 0 ;
    OptimizationMethod *arg3 = 0 ;
    EndCriteria *arg4 = 0 ;
    Constraint *arg5 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > temp2 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > *v2 ;
    void *argp3 = 0 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: Gsr_calibrateVolatilitiesIterative(self,helpers,method,endCriteria,constraint);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GsrPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Gsr_calibrateVolatilitiesIterative" "', argument " "1"" of type '" "GsrPtr *""'"); 
    }
    arg1 = reinterpret_cast< GsrPtr * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CalibrationHelper_t_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of Gsr_calibrateVolatilitiesIterative. "
          "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CalibrationHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CalibrationHelper_t,0) != -1) {
            temp2.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 2 of "
              "Gsr_calibrateVolatilitiesIterative. "
              "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of Gsr_calibrateVolatilitiesIterative. "
          "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_OptimizationMethod,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Gsr_calibrateVolatilitiesIterative" "', argument " "3"" of type '" "OptimizationMethod &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gsr_calibrateVolatilitiesIterative" "', argument " "3"" of type '" "OptimizationMethod &""'"); 
    }
    arg3 = reinterpret_cast< OptimizationMethod * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_EndCriteria,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Gsr_calibrateVolatilitiesIterative" "', argument " "4"" of type '" "EndCriteria const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gsr_calibrateVolatilitiesIterative" "', argument " "4"" of type '" "EndCriteria const &""'"); 
    }
    arg4 = reinterpret_cast< EndCriteria * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Constraint,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "Gsr_calibrateVolatilitiesIterative" "', argument " "5"" of type '" "Constraint const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gsr_calibrateVolatilitiesIterative" "', argument " "5"" of type '" "Constraint const &""'"); 
    }
    arg5 = reinterpret_cast< Constraint * >(argp5);
    {
      try {
        GsrPtr_calibrateVolatilitiesIterative__SWIG_0(arg1,(std::vector< boost::shared_ptr< CalibrationHelper > > const &)*arg2,*arg3,(EndCriteria const &)*arg4,(Constraint const &)*arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Gsr_calibrateVolatilitiesIterative__SWIG_2) {
  {
    GsrPtr *arg1 = (GsrPtr *) 0 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > *arg2 = 0 ;
    OptimizationMethod *arg3 = 0 ;
    EndCriteria *arg4 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > temp2 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > *v2 ;
    void *argp3 = 0 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: Gsr_calibrateVolatilitiesIterative(self,helpers,method,endCriteria);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GsrPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Gsr_calibrateVolatilitiesIterative" "', argument " "1"" of type '" "GsrPtr *""'"); 
    }
    arg1 = reinterpret_cast< GsrPtr * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CalibrationHelper_t_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of Gsr_calibrateVolatilitiesIterative. "
          "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CalibrationHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CalibrationHelper_t,0) != -1) {
            temp2.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 2 of "
              "Gsr_calibrateVolatilitiesIterative. "
              "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of Gsr_calibrateVolatilitiesIterative. "
          "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_OptimizationMethod,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Gsr_calibrateVolatilitiesIterative" "', argument " "3"" of type '" "OptimizationMethod &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gsr_calibrateVolatilitiesIterative" "', argument " "3"" of type '" "OptimizationMethod &""'"); 
    }
    arg3 = reinterpret_cast< OptimizationMethod * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_EndCriteria,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Gsr_calibrateVolatilitiesIterative" "', argument " "4"" of type '" "EndCriteria const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gsr_calibrateVolatilitiesIterative" "', argument " "4"" of type '" "EndCriteria const &""'"); 
    }
    arg4 = reinterpret_cast< EndCriteria * >(argp4);
    {
      try {
        GsrPtr_calibrateVolatilitiesIterative__SWIG_0(arg1,(std::vector< boost::shared_ptr< CalibrationHelper > > const &)*arg2,*arg3,(EndCriteria const &)*arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Gsr_calibrateVolatilitiesIterative) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GsrPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< CalibrationHelper > >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CalibrationHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< CalibrationHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_CalibrationHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_OptimizationMethod, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_EndCriteria, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GsrPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< CalibrationHelper > >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CalibrationHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< CalibrationHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_CalibrationHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_OptimizationMethod, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_EndCriteria, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Constraint, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GsrPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< CalibrationHelper > >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CalibrationHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< CalibrationHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_CalibrationHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_OptimizationMethod, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_EndCriteria, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Constraint, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(5),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(5))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(5));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Gsr_calibrateVolatilitiesIterative__SWIG_2); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Gsr_calibrateVolatilitiesIterative__SWIG_1); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Gsr_calibrateVolatilitiesIterative__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'Gsr_calibrateVolatilitiesIterative'");
  XSRETURN(0);
}


XS(_wrap_Gsr_calibrate__SWIG_0) {
  {
    GsrPtr *arg1 = (GsrPtr *) 0 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > *arg2 = 0 ;
    OptimizationMethod *arg3 = 0 ;
    EndCriteria *arg4 = 0 ;
    Constraint *arg5 = 0 ;
    std::vector< Real > *arg6 = 0 ;
    std::vector< bool > *arg7 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > temp2 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > *v2 ;
    void *argp3 = 0 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    std::vector< double > temp6 ;
    std::vector< double > *v6 ;
    std::vector< bool > temp7 ;
    std::vector< bool > *v7 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: Gsr_calibrate(self,helpers,method,endCriteria,constraint,weights,fixParameters);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GsrPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Gsr_calibrate" "', argument " "1"" of type '" "GsrPtr *""'"); 
    }
    arg1 = reinterpret_cast< GsrPtr * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CalibrationHelper_t_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of Gsr_calibrate. "
          "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CalibrationHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CalibrationHelper_t,0) != -1) {
            temp2.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 2 of "
              "Gsr_calibrate. "
              "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of Gsr_calibrate. "
          "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_OptimizationMethod,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Gsr_calibrate" "', argument " "3"" of type '" "OptimizationMethod &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gsr_calibrate" "', argument " "3"" of type '" "OptimizationMethod &""'"); 
    }
    arg3 = reinterpret_cast< OptimizationMethod * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_EndCriteria,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Gsr_calibrate" "', argument " "4"" of type '" "EndCriteria const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gsr_calibrate" "', argument " "4"" of type '" "EndCriteria const &""'"); 
    }
    arg4 = reinterpret_cast< EndCriteria * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Constraint,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "Gsr_calibrate" "', argument " "5"" of type '" "Constraint const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gsr_calibrate" "', argument " "5"" of type '" "Constraint const &""'"); 
    }
    arg5 = reinterpret_cast< Constraint * >(argp5);
    {
      if (SWIG_ConvertPtr(ST(5),(void **) &v6, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg6 = v6;
      } else if (SvROK(ST(5))) {
        AV *av = (AV *)SvRV(ST(5));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 6 of Gsr_calibrate. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp6.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 6 of "
              "Gsr_calibrate. "
              "Expected an array of ""double");
          }
        }
        arg6 = &temp6;
      } else {
        SWIG_croak("Type error in argument 6 of Gsr_calibrate. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(6),(void **) &v7, 
          SWIGTYPE_p_std__vectorT_bool_t,1) != -1) {
        arg7 = v7;
      } else if (SvROK(ST(6))) {
        AV *av = (AV *)SvRV(ST(6));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 7 of Gsr_calibrate. "
          "Expected an array of ""bool");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvIOK(*tv)) {
            temp7.push_back((bool)SvIVX(*tv));
          } else {
            SWIG_croak("Type error in argument 7 of "
              "Gsr_calibrate. "
              "Expected an array of ""bool");
          }
        }
        arg7 = &temp7;
      } else {
        SWIG_croak("Type error in argument 7 of Gsr_calibrate. "
          "Expected an array of ""bool");
      }
    }
    {
      try {
        GsrPtr_calibrate__SWIG_0(arg1,(std::vector< boost::shared_ptr< CalibrationHelper > > const &)*arg2,*arg3,(EndCriteria const &)*arg4,(Constraint const &)*arg5,(std::vector< double > const &)*arg6,(std::vector< bool > const &)*arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Gsr_calibrate__SWIG_1) {
  {
    GsrPtr *arg1 = (GsrPtr *) 0 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > *arg2 = 0 ;
    OptimizationMethod *arg3 = 0 ;
    EndCriteria *arg4 = 0 ;
    Constraint *arg5 = 0 ;
    std::vector< Real > *arg6 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > temp2 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > *v2 ;
    void *argp3 = 0 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    std::vector< double > temp6 ;
    std::vector< double > *v6 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: Gsr_calibrate(self,helpers,method,endCriteria,constraint,weights);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GsrPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Gsr_calibrate" "', argument " "1"" of type '" "GsrPtr *""'"); 
    }
    arg1 = reinterpret_cast< GsrPtr * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CalibrationHelper_t_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of Gsr_calibrate. "
          "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CalibrationHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CalibrationHelper_t,0) != -1) {
            temp2.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 2 of "
              "Gsr_calibrate. "
              "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of Gsr_calibrate. "
          "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_OptimizationMethod,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Gsr_calibrate" "', argument " "3"" of type '" "OptimizationMethod &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gsr_calibrate" "', argument " "3"" of type '" "OptimizationMethod &""'"); 
    }
    arg3 = reinterpret_cast< OptimizationMethod * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_EndCriteria,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Gsr_calibrate" "', argument " "4"" of type '" "EndCriteria const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gsr_calibrate" "', argument " "4"" of type '" "EndCriteria const &""'"); 
    }
    arg4 = reinterpret_cast< EndCriteria * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Constraint,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "Gsr_calibrate" "', argument " "5"" of type '" "Constraint const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gsr_calibrate" "', argument " "5"" of type '" "Constraint const &""'"); 
    }
    arg5 = reinterpret_cast< Constraint * >(argp5);
    {
      if (SWIG_ConvertPtr(ST(5),(void **) &v6, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg6 = v6;
      } else if (SvROK(ST(5))) {
        AV *av = (AV *)SvRV(ST(5));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 6 of Gsr_calibrate. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp6.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 6 of "
              "Gsr_calibrate. "
              "Expected an array of ""double");
          }
        }
        arg6 = &temp6;
      } else {
        SWIG_croak("Type error in argument 6 of Gsr_calibrate. "
          "Expected an array of ""double");
      }
    }
    {
      try {
        GsrPtr_calibrate__SWIG_0(arg1,(std::vector< boost::shared_ptr< CalibrationHelper > > const &)*arg2,*arg3,(EndCriteria const &)*arg4,(Constraint const &)*arg5,(std::vector< double > const &)*arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Gsr_calibrate__SWIG_2) {
  {
    GsrPtr *arg1 = (GsrPtr *) 0 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > *arg2 = 0 ;
    OptimizationMethod *arg3 = 0 ;
    EndCriteria *arg4 = 0 ;
    Constraint *arg5 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > temp2 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > *v2 ;
    void *argp3 = 0 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: Gsr_calibrate(self,helpers,method,endCriteria,constraint);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GsrPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Gsr_calibrate" "', argument " "1"" of type '" "GsrPtr *""'"); 
    }
    arg1 = reinterpret_cast< GsrPtr * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CalibrationHelper_t_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of Gsr_calibrate. "
          "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CalibrationHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CalibrationHelper_t,0) != -1) {
            temp2.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 2 of "
              "Gsr_calibrate. "
              "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of Gsr_calibrate. "
          "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_OptimizationMethod,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Gsr_calibrate" "', argument " "3"" of type '" "OptimizationMethod &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gsr_calibrate" "', argument " "3"" of type '" "OptimizationMethod &""'"); 
    }
    arg3 = reinterpret_cast< OptimizationMethod * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_EndCriteria,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Gsr_calibrate" "', argument " "4"" of type '" "EndCriteria const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gsr_calibrate" "', argument " "4"" of type '" "EndCriteria const &""'"); 
    }
    arg4 = reinterpret_cast< EndCriteria * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Constraint,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "Gsr_calibrate" "', argument " "5"" of type '" "Constraint const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gsr_calibrate" "', argument " "5"" of type '" "Constraint const &""'"); 
    }
    arg5 = reinterpret_cast< Constraint * >(argp5);
    {
      try {
        GsrPtr_calibrate__SWIG_0(arg1,(std::vector< boost::shared_ptr< CalibrationHelper > > const &)*arg2,*arg3,(EndCriteria const &)*arg4,(Constraint const &)*arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Gsr_calibrate__SWIG_3) {
  {
    GsrPtr *arg1 = (GsrPtr *) 0 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > *arg2 = 0 ;
    OptimizationMethod *arg3 = 0 ;
    EndCriteria *arg4 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > temp2 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > *v2 ;
    void *argp3 = 0 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: Gsr_calibrate(self,helpers,method,endCriteria);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GsrPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Gsr_calibrate" "', argument " "1"" of type '" "GsrPtr *""'"); 
    }
    arg1 = reinterpret_cast< GsrPtr * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CalibrationHelper_t_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of Gsr_calibrate. "
          "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CalibrationHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CalibrationHelper_t,0) != -1) {
            temp2.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 2 of "
              "Gsr_calibrate. "
              "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of Gsr_calibrate. "
          "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_OptimizationMethod,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Gsr_calibrate" "', argument " "3"" of type '" "OptimizationMethod &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gsr_calibrate" "', argument " "3"" of type '" "OptimizationMethod &""'"); 
    }
    arg3 = reinterpret_cast< OptimizationMethod * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_EndCriteria,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Gsr_calibrate" "', argument " "4"" of type '" "EndCriteria const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gsr_calibrate" "', argument " "4"" of type '" "EndCriteria const &""'"); 
    }
    arg4 = reinterpret_cast< EndCriteria * >(argp4);
    {
      try {
        GsrPtr_calibrate__SWIG_0(arg1,(std::vector< boost::shared_ptr< CalibrationHelper > > const &)*arg2,*arg3,(EndCriteria const &)*arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Gsr_calibrate) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GsrPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< CalibrationHelper > >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CalibrationHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< CalibrationHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_CalibrationHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_OptimizationMethod, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_EndCriteria, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GsrPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< CalibrationHelper > >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CalibrationHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< CalibrationHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_CalibrationHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_OptimizationMethod, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_EndCriteria, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Constraint, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GsrPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< CalibrationHelper > >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CalibrationHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< CalibrationHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_CalibrationHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_OptimizationMethod, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_EndCriteria, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Constraint, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(5),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(5))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(5));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GsrPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< CalibrationHelper > >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CalibrationHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< CalibrationHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_CalibrationHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_OptimizationMethod, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_EndCriteria, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Constraint, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(5),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(5))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(5));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< bool >* v;
            if (SWIG_ConvertPtr(ST(6),(void **) &v, 
                SWIGTYPE_p_std__vectorT_bool_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(6))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(6));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Gsr_calibrate__SWIG_3); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Gsr_calibrate__SWIG_2); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Gsr_calibrate__SWIG_1); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Gsr_calibrate__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'Gsr_calibrate'");
  XSRETURN(0);
}


XS(_wrap_Gsr_params) {
  {
    GsrPtr *arg1 = (GsrPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Array result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Gsr_params(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GsrPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Gsr_params" "', argument " "1"" of type '" "GsrPtr const *""'"); 
    }
    arg1 = reinterpret_cast< GsrPtr * >(argp1);
    {
      try {
        result = GsrPtr_params((GsrPtr const *)arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Array(static_cast< const Array& >(result))), SWIGTYPE_p_Array, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Gsr_value) {
  {
    GsrPtr *arg1 = (GsrPtr *) 0 ;
    Array *arg2 = 0 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > *arg3 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > temp3 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > *v3 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: Gsr_value(self,params,helpers);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GsrPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Gsr_value" "', argument " "1"" of type '" "GsrPtr *""'"); 
    }
    arg1 = reinterpret_cast< GsrPtr * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Gsr_value" "', argument " "2"" of type '" "Array const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gsr_value" "', argument " "2"" of type '" "Array const &""'"); 
    }
    arg2 = reinterpret_cast< Array * >(argp2);
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CalibrationHelper_t_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of Gsr_value. "
          "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CalibrationHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CalibrationHelper_t,0) != -1) {
            temp3.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 3 of "
              "Gsr_value. "
              "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of Gsr_value. "
          "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
      }
    }
    {
      try {
        result = (Real)GsrPtr_value(arg1,(Array const &)*arg2,(std::vector< boost::shared_ptr< CalibrationHelper > > const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Gsr_endCriteria) {
  {
    GsrPtr *arg1 = (GsrPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    EndCriteria::Type result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Gsr_endCriteria(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GsrPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Gsr_endCriteria" "', argument " "1"" of type '" "GsrPtr const *""'"); 
    }
    arg1 = reinterpret_cast< GsrPtr * >(argp1);
    {
      try {
        result = (EndCriteria::Type)GsrPtr_endCriteria((GsrPtr const *)arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Gsr_setParams) {
  {
    GsrPtr *arg1 = (GsrPtr *) 0 ;
    Array *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Gsr_setParams(self,params);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GsrPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Gsr_setParams" "', argument " "1"" of type '" "GsrPtr *""'"); 
    }
    arg1 = reinterpret_cast< GsrPtr * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Gsr_setParams" "', argument " "2"" of type '" "Array const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Gsr_setParams" "', argument " "2"" of type '" "Array const &""'"); 
    }
    arg2 = reinterpret_cast< Array * >(argp2);
    {
      try {
        GsrPtr_setParams(arg1,(Array const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Gsr_functionEvaluation) {
  {
    GsrPtr *arg1 = (GsrPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Integer result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Gsr_functionEvaluation(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GsrPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Gsr_functionEvaluation" "', argument " "1"" of type '" "GsrPtr const *""'"); 
    }
    arg1 = reinterpret_cast< GsrPtr * >(argp1);
    {
      try {
        result = (Integer)GsrPtr_functionEvaluation((GsrPtr const *)arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Gsr_reversion) {
  {
    GsrPtr *arg1 = (GsrPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Array *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Gsr_reversion(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GsrPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Gsr_reversion" "', argument " "1"" of type '" "GsrPtr const *""'"); 
    }
    arg1 = reinterpret_cast< GsrPtr * >(argp1);
    {
      try {
        result = (Array *) &GsrPtr_reversion((GsrPtr const *)arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Array, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Gsr_volatility) {
  {
    GsrPtr *arg1 = (GsrPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Array *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Gsr_volatility(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GsrPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Gsr_volatility" "', argument " "1"" of type '" "GsrPtr const *""'"); 
    }
    arg1 = reinterpret_cast< GsrPtr * >(argp1);
    {
      try {
        result = (Array *) &GsrPtr_volatility((GsrPtr const *)arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Array, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_Gsr) {
  {
    GsrPtr *arg1 = (GsrPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Gsr(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GsrPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Gsr" "', argument " "1"" of type '" "GsrPtr *""'"); 
    }
    arg1 = reinterpret_cast< GsrPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MarkovFunctionalSettings) {
  {
    int argvi = 0;
    MarkovFunctional::ModelSettings *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_MarkovFunctionalSettings();");
    }
    {
      try {
        result = (MarkovFunctional::ModelSettings *)new MarkovFunctional::ModelSettings();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MarkovFunctional__ModelSettings, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_MarkovFunctionalSettings) {
  {
    MarkovFunctional::ModelSettings *arg1 = (MarkovFunctional::ModelSettings *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_MarkovFunctionalSettings(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_MarkovFunctional__ModelSettings, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MarkovFunctionalSettings" "', argument " "1"" of type '" "MarkovFunctional::ModelSettings *""'"); 
    }
    arg1 = reinterpret_cast< MarkovFunctional::ModelSettings * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MarkovFunctional__SWIG_0) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    Real arg2 ;
    std::vector< Date > *arg3 = 0 ;
    std::vector< Real > *arg4 = 0 ;
    Handle< SwaptionVolatilityStructure > *arg5 = 0 ;
    std::vector< Date > *arg6 = 0 ;
    std::vector< Period > *arg7 = 0 ;
    SwapIndexPtr *arg8 = 0 ;
    Size arg9 ;
    Real arg10 ;
    Size arg11 ;
    Real arg12 ;
    Real arg13 ;
    Real arg14 ;
    Real arg15 ;
    int arg16 ;
    std::vector< Real > *arg17 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    std::vector< Date > temp3 ;
    std::vector< Date > *v3 ;
    std::vector< double > temp4 ;
    std::vector< double > *v4 ;
    void *argp5 ;
    int res5 = 0 ;
    std::vector< Date > temp6 ;
    std::vector< Date > *v6 ;
    std::vector< Period > temp7 ;
    std::vector< Period > *v7 ;
    void *argp8 ;
    int res8 = 0 ;
    size_t val9 ;
    int ecode9 = 0 ;
    double val10 ;
    int ecode10 = 0 ;
    size_t val11 ;
    int ecode11 = 0 ;
    double val12 ;
    int ecode12 = 0 ;
    double val13 ;
    int ecode13 = 0 ;
    double val14 ;
    int ecode14 = 0 ;
    double val15 ;
    int ecode15 = 0 ;
    int val16 ;
    int ecode16 = 0 ;
    std::vector< double > temp17 ;
    std::vector< double > *v17 ;
    int argvi = 0;
    MarkovFunctionalPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 17) || (items > 17)) {
      SWIG_croak("Usage: new_MarkovFunctional(termStructure,reversion,volstepdates,volatilities,swaptionVol,swaptionExpiries,swaptionTenors,swapIndexBase,yGridPoints,yStdDevs,gaussHermitePoints,digitalGap,marketRateAccuracy,lowerRateBound,upperRateBound,adjustments,smileMoneyCheckpoints);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MarkovFunctional" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MarkovFunctional" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_MarkovFunctional" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_MarkovFunctional. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp3.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_MarkovFunctional. "
              "Expected an array of " "Date");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_MarkovFunctional. "
          "Expected an array of " "Date");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of new_MarkovFunctional. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp4.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 4 of "
              "new_MarkovFunctional. "
              "Expected an array of ""double");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of new_MarkovFunctional. "
          "Expected an array of ""double");
      }
    }
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_HandleT_SwaptionVolatilityStructure_t,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_MarkovFunctional" "', argument " "5"" of type '" "Handle< SwaptionVolatilityStructure > const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MarkovFunctional" "', argument " "5"" of type '" "Handle< SwaptionVolatilityStructure > const &""'"); 
    }
    arg5 = reinterpret_cast< Handle< SwaptionVolatilityStructure > * >(argp5);
    {
      if (SWIG_ConvertPtr(ST(5),(void **) &v6, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg6 = v6;
      } else if (SvROK(ST(5))) {
        AV *av = (AV *)SvRV(ST(5));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 6 of new_MarkovFunctional. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp6.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 6 of "
              "new_MarkovFunctional. "
              "Expected an array of " "Date");
          }
        }
        arg6 = &temp6;
      } else {
        SWIG_croak("Type error in argument 6 of new_MarkovFunctional. "
          "Expected an array of " "Date");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(6),(void **) &v7, 
          SWIGTYPE_p_std__vectorT_Period_t,1) != -1) {
        arg7 = v7;
      } else if (SvROK(ST(6))) {
        AV *av = (AV *)SvRV(ST(6));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 7 of new_MarkovFunctional. "
          "Expected an array of " "Period");
        SV **tv;
        I32 len = av_len(av) + 1;
        Period* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Period,0) != -1) {
            temp7.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 7 of "
              "new_MarkovFunctional. "
              "Expected an array of " "Period");
          }
        }
        arg7 = &temp7;
      } else {
        SWIG_croak("Type error in argument 7 of new_MarkovFunctional. "
          "Expected an array of " "Period");
      }
    }
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_SwapIndexPtr,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_MarkovFunctional" "', argument " "8"" of type '" "SwapIndexPtr const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MarkovFunctional" "', argument " "8"" of type '" "SwapIndexPtr const &""'"); 
    }
    arg8 = reinterpret_cast< SwapIndexPtr * >(argp8);
    ecode9 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(8), &val9);
    if (!SWIG_IsOK(ecode9)) {
      SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "new_MarkovFunctional" "', argument " "9"" of type '" "Size""'");
    } 
    arg9 = static_cast< Size >(val9);
    ecode10 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), &val10);
    if (!SWIG_IsOK(ecode10)) {
      SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "new_MarkovFunctional" "', argument " "10"" of type '" "Real""'");
    } 
    arg10 = static_cast< Real >(val10);
    ecode11 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(10), &val11);
    if (!SWIG_IsOK(ecode11)) {
      SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "new_MarkovFunctional" "', argument " "11"" of type '" "Size""'");
    } 
    arg11 = static_cast< Size >(val11);
    ecode12 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(11), &val12);
    if (!SWIG_IsOK(ecode12)) {
      SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "new_MarkovFunctional" "', argument " "12"" of type '" "Real""'");
    } 
    arg12 = static_cast< Real >(val12);
    ecode13 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(12), &val13);
    if (!SWIG_IsOK(ecode13)) {
      SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "new_MarkovFunctional" "', argument " "13"" of type '" "Real""'");
    } 
    arg13 = static_cast< Real >(val13);
    ecode14 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(13), &val14);
    if (!SWIG_IsOK(ecode14)) {
      SWIG_exception_fail(SWIG_ArgError(ecode14), "in method '" "new_MarkovFunctional" "', argument " "14"" of type '" "Real""'");
    } 
    arg14 = static_cast< Real >(val14);
    ecode15 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(14), &val15);
    if (!SWIG_IsOK(ecode15)) {
      SWIG_exception_fail(SWIG_ArgError(ecode15), "in method '" "new_MarkovFunctional" "', argument " "15"" of type '" "Real""'");
    } 
    arg15 = static_cast< Real >(val15);
    ecode16 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(15), &val16);
    if (!SWIG_IsOK(ecode16)) {
      SWIG_exception_fail(SWIG_ArgError(ecode16), "in method '" "new_MarkovFunctional" "', argument " "16"" of type '" "int""'");
    } 
    arg16 = static_cast< int >(val16);
    {
      if (SWIG_ConvertPtr(ST(16),(void **) &v17, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg17 = v17;
      } else if (SvROK(ST(16))) {
        AV *av = (AV *)SvRV(ST(16));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 17 of new_MarkovFunctional. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp17.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 17 of "
              "new_MarkovFunctional. "
              "Expected an array of ""double");
          }
        }
        arg17 = &temp17;
      } else {
        SWIG_croak("Type error in argument 17 of new_MarkovFunctional. "
          "Expected an array of ""double");
      }
    }
    {
      try {
        result = (MarkovFunctionalPtr *)new_MarkovFunctionalPtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1,arg2,(std::vector< Date > const &)*arg3,(std::vector< double > const &)*arg4,(Handle< SwaptionVolatilityStructure > const &)*arg5,(std::vector< Date > const &)*arg6,(std::vector< Period > const &)*arg7,(SwapIndexPtr const &)*arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16,(std::vector< double > const &)*arg17);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MarkovFunctionalPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MarkovFunctional__SWIG_1) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    Real arg2 ;
    std::vector< Date > *arg3 = 0 ;
    std::vector< Real > *arg4 = 0 ;
    Handle< SwaptionVolatilityStructure > *arg5 = 0 ;
    std::vector< Date > *arg6 = 0 ;
    std::vector< Period > *arg7 = 0 ;
    SwapIndexPtr *arg8 = 0 ;
    Size arg9 ;
    Real arg10 ;
    Size arg11 ;
    Real arg12 ;
    Real arg13 ;
    Real arg14 ;
    Real arg15 ;
    int arg16 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    std::vector< Date > temp3 ;
    std::vector< Date > *v3 ;
    std::vector< double > temp4 ;
    std::vector< double > *v4 ;
    void *argp5 ;
    int res5 = 0 ;
    std::vector< Date > temp6 ;
    std::vector< Date > *v6 ;
    std::vector< Period > temp7 ;
    std::vector< Period > *v7 ;
    void *argp8 ;
    int res8 = 0 ;
    size_t val9 ;
    int ecode9 = 0 ;
    double val10 ;
    int ecode10 = 0 ;
    size_t val11 ;
    int ecode11 = 0 ;
    double val12 ;
    int ecode12 = 0 ;
    double val13 ;
    int ecode13 = 0 ;
    double val14 ;
    int ecode14 = 0 ;
    double val15 ;
    int ecode15 = 0 ;
    int val16 ;
    int ecode16 = 0 ;
    int argvi = 0;
    MarkovFunctionalPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 16) || (items > 16)) {
      SWIG_croak("Usage: new_MarkovFunctional(termStructure,reversion,volstepdates,volatilities,swaptionVol,swaptionExpiries,swaptionTenors,swapIndexBase,yGridPoints,yStdDevs,gaussHermitePoints,digitalGap,marketRateAccuracy,lowerRateBound,upperRateBound,adjustments);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MarkovFunctional" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MarkovFunctional" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_MarkovFunctional" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_MarkovFunctional. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp3.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_MarkovFunctional. "
              "Expected an array of " "Date");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_MarkovFunctional. "
          "Expected an array of " "Date");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of new_MarkovFunctional. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp4.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 4 of "
              "new_MarkovFunctional. "
              "Expected an array of ""double");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of new_MarkovFunctional. "
          "Expected an array of ""double");
      }
    }
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_HandleT_SwaptionVolatilityStructure_t,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_MarkovFunctional" "', argument " "5"" of type '" "Handle< SwaptionVolatilityStructure > const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MarkovFunctional" "', argument " "5"" of type '" "Handle< SwaptionVolatilityStructure > const &""'"); 
    }
    arg5 = reinterpret_cast< Handle< SwaptionVolatilityStructure > * >(argp5);
    {
      if (SWIG_ConvertPtr(ST(5),(void **) &v6, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg6 = v6;
      } else if (SvROK(ST(5))) {
        AV *av = (AV *)SvRV(ST(5));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 6 of new_MarkovFunctional. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp6.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 6 of "
              "new_MarkovFunctional. "
              "Expected an array of " "Date");
          }
        }
        arg6 = &temp6;
      } else {
        SWIG_croak("Type error in argument 6 of new_MarkovFunctional. "
          "Expected an array of " "Date");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(6),(void **) &v7, 
          SWIGTYPE_p_std__vectorT_Period_t,1) != -1) {
        arg7 = v7;
      } else if (SvROK(ST(6))) {
        AV *av = (AV *)SvRV(ST(6));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 7 of new_MarkovFunctional. "
          "Expected an array of " "Period");
        SV **tv;
        I32 len = av_len(av) + 1;
        Period* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Period,0) != -1) {
            temp7.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 7 of "
              "new_MarkovFunctional. "
              "Expected an array of " "Period");
          }
        }
        arg7 = &temp7;
      } else {
        SWIG_croak("Type error in argument 7 of new_MarkovFunctional. "
          "Expected an array of " "Period");
      }
    }
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_SwapIndexPtr,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_MarkovFunctional" "', argument " "8"" of type '" "SwapIndexPtr const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MarkovFunctional" "', argument " "8"" of type '" "SwapIndexPtr const &""'"); 
    }
    arg8 = reinterpret_cast< SwapIndexPtr * >(argp8);
    ecode9 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(8), &val9);
    if (!SWIG_IsOK(ecode9)) {
      SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "new_MarkovFunctional" "', argument " "9"" of type '" "Size""'");
    } 
    arg9 = static_cast< Size >(val9);
    ecode10 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), &val10);
    if (!SWIG_IsOK(ecode10)) {
      SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "new_MarkovFunctional" "', argument " "10"" of type '" "Real""'");
    } 
    arg10 = static_cast< Real >(val10);
    ecode11 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(10), &val11);
    if (!SWIG_IsOK(ecode11)) {
      SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "new_MarkovFunctional" "', argument " "11"" of type '" "Size""'");
    } 
    arg11 = static_cast< Size >(val11);
    ecode12 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(11), &val12);
    if (!SWIG_IsOK(ecode12)) {
      SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "new_MarkovFunctional" "', argument " "12"" of type '" "Real""'");
    } 
    arg12 = static_cast< Real >(val12);
    ecode13 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(12), &val13);
    if (!SWIG_IsOK(ecode13)) {
      SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "new_MarkovFunctional" "', argument " "13"" of type '" "Real""'");
    } 
    arg13 = static_cast< Real >(val13);
    ecode14 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(13), &val14);
    if (!SWIG_IsOK(ecode14)) {
      SWIG_exception_fail(SWIG_ArgError(ecode14), "in method '" "new_MarkovFunctional" "', argument " "14"" of type '" "Real""'");
    } 
    arg14 = static_cast< Real >(val14);
    ecode15 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(14), &val15);
    if (!SWIG_IsOK(ecode15)) {
      SWIG_exception_fail(SWIG_ArgError(ecode15), "in method '" "new_MarkovFunctional" "', argument " "15"" of type '" "Real""'");
    } 
    arg15 = static_cast< Real >(val15);
    ecode16 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(15), &val16);
    if (!SWIG_IsOK(ecode16)) {
      SWIG_exception_fail(SWIG_ArgError(ecode16), "in method '" "new_MarkovFunctional" "', argument " "16"" of type '" "int""'");
    } 
    arg16 = static_cast< int >(val16);
    {
      try {
        result = (MarkovFunctionalPtr *)new_MarkovFunctionalPtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1,arg2,(std::vector< Date > const &)*arg3,(std::vector< double > const &)*arg4,(Handle< SwaptionVolatilityStructure > const &)*arg5,(std::vector< Date > const &)*arg6,(std::vector< Period > const &)*arg7,(SwapIndexPtr const &)*arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MarkovFunctionalPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MarkovFunctional__SWIG_2) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    Real arg2 ;
    std::vector< Date > *arg3 = 0 ;
    std::vector< Real > *arg4 = 0 ;
    Handle< SwaptionVolatilityStructure > *arg5 = 0 ;
    std::vector< Date > *arg6 = 0 ;
    std::vector< Period > *arg7 = 0 ;
    SwapIndexPtr *arg8 = 0 ;
    Size arg9 ;
    Real arg10 ;
    Size arg11 ;
    Real arg12 ;
    Real arg13 ;
    Real arg14 ;
    Real arg15 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    std::vector< Date > temp3 ;
    std::vector< Date > *v3 ;
    std::vector< double > temp4 ;
    std::vector< double > *v4 ;
    void *argp5 ;
    int res5 = 0 ;
    std::vector< Date > temp6 ;
    std::vector< Date > *v6 ;
    std::vector< Period > temp7 ;
    std::vector< Period > *v7 ;
    void *argp8 ;
    int res8 = 0 ;
    size_t val9 ;
    int ecode9 = 0 ;
    double val10 ;
    int ecode10 = 0 ;
    size_t val11 ;
    int ecode11 = 0 ;
    double val12 ;
    int ecode12 = 0 ;
    double val13 ;
    int ecode13 = 0 ;
    double val14 ;
    int ecode14 = 0 ;
    double val15 ;
    int ecode15 = 0 ;
    int argvi = 0;
    MarkovFunctionalPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 15) || (items > 15)) {
      SWIG_croak("Usage: new_MarkovFunctional(termStructure,reversion,volstepdates,volatilities,swaptionVol,swaptionExpiries,swaptionTenors,swapIndexBase,yGridPoints,yStdDevs,gaussHermitePoints,digitalGap,marketRateAccuracy,lowerRateBound,upperRateBound);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MarkovFunctional" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MarkovFunctional" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_MarkovFunctional" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_MarkovFunctional. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp3.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_MarkovFunctional. "
              "Expected an array of " "Date");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_MarkovFunctional. "
          "Expected an array of " "Date");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of new_MarkovFunctional. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp4.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 4 of "
              "new_MarkovFunctional. "
              "Expected an array of ""double");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of new_MarkovFunctional. "
          "Expected an array of ""double");
      }
    }
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_HandleT_SwaptionVolatilityStructure_t,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_MarkovFunctional" "', argument " "5"" of type '" "Handle< SwaptionVolatilityStructure > const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MarkovFunctional" "', argument " "5"" of type '" "Handle< SwaptionVolatilityStructure > const &""'"); 
    }
    arg5 = reinterpret_cast< Handle< SwaptionVolatilityStructure > * >(argp5);
    {
      if (SWIG_ConvertPtr(ST(5),(void **) &v6, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg6 = v6;
      } else if (SvROK(ST(5))) {
        AV *av = (AV *)SvRV(ST(5));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 6 of new_MarkovFunctional. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp6.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 6 of "
              "new_MarkovFunctional. "
              "Expected an array of " "Date");
          }
        }
        arg6 = &temp6;
      } else {
        SWIG_croak("Type error in argument 6 of new_MarkovFunctional. "
          "Expected an array of " "Date");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(6),(void **) &v7, 
          SWIGTYPE_p_std__vectorT_Period_t,1) != -1) {
        arg7 = v7;
      } else if (SvROK(ST(6))) {
        AV *av = (AV *)SvRV(ST(6));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 7 of new_MarkovFunctional. "
          "Expected an array of " "Period");
        SV **tv;
        I32 len = av_len(av) + 1;
        Period* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Period,0) != -1) {
            temp7.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 7 of "
              "new_MarkovFunctional. "
              "Expected an array of " "Period");
          }
        }
        arg7 = &temp7;
      } else {
        SWIG_croak("Type error in argument 7 of new_MarkovFunctional. "
          "Expected an array of " "Period");
      }
    }
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_SwapIndexPtr,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_MarkovFunctional" "', argument " "8"" of type '" "SwapIndexPtr const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MarkovFunctional" "', argument " "8"" of type '" "SwapIndexPtr const &""'"); 
    }
    arg8 = reinterpret_cast< SwapIndexPtr * >(argp8);
    ecode9 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(8), &val9);
    if (!SWIG_IsOK(ecode9)) {
      SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "new_MarkovFunctional" "', argument " "9"" of type '" "Size""'");
    } 
    arg9 = static_cast< Size >(val9);
    ecode10 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), &val10);
    if (!SWIG_IsOK(ecode10)) {
      SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "new_MarkovFunctional" "', argument " "10"" of type '" "Real""'");
    } 
    arg10 = static_cast< Real >(val10);
    ecode11 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(10), &val11);
    if (!SWIG_IsOK(ecode11)) {
      SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "new_MarkovFunctional" "', argument " "11"" of type '" "Size""'");
    } 
    arg11 = static_cast< Size >(val11);
    ecode12 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(11), &val12);
    if (!SWIG_IsOK(ecode12)) {
      SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "new_MarkovFunctional" "', argument " "12"" of type '" "Real""'");
    } 
    arg12 = static_cast< Real >(val12);
    ecode13 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(12), &val13);
    if (!SWIG_IsOK(ecode13)) {
      SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "new_MarkovFunctional" "', argument " "13"" of type '" "Real""'");
    } 
    arg13 = static_cast< Real >(val13);
    ecode14 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(13), &val14);
    if (!SWIG_IsOK(ecode14)) {
      SWIG_exception_fail(SWIG_ArgError(ecode14), "in method '" "new_MarkovFunctional" "', argument " "14"" of type '" "Real""'");
    } 
    arg14 = static_cast< Real >(val14);
    ecode15 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(14), &val15);
    if (!SWIG_IsOK(ecode15)) {
      SWIG_exception_fail(SWIG_ArgError(ecode15), "in method '" "new_MarkovFunctional" "', argument " "15"" of type '" "Real""'");
    } 
    arg15 = static_cast< Real >(val15);
    {
      try {
        result = (MarkovFunctionalPtr *)new_MarkovFunctionalPtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1,arg2,(std::vector< Date > const &)*arg3,(std::vector< double > const &)*arg4,(Handle< SwaptionVolatilityStructure > const &)*arg5,(std::vector< Date > const &)*arg6,(std::vector< Period > const &)*arg7,(SwapIndexPtr const &)*arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MarkovFunctionalPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MarkovFunctional__SWIG_3) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    Real arg2 ;
    std::vector< Date > *arg3 = 0 ;
    std::vector< Real > *arg4 = 0 ;
    Handle< SwaptionVolatilityStructure > *arg5 = 0 ;
    std::vector< Date > *arg6 = 0 ;
    std::vector< Period > *arg7 = 0 ;
    SwapIndexPtr *arg8 = 0 ;
    Size arg9 ;
    Real arg10 ;
    Size arg11 ;
    Real arg12 ;
    Real arg13 ;
    Real arg14 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    std::vector< Date > temp3 ;
    std::vector< Date > *v3 ;
    std::vector< double > temp4 ;
    std::vector< double > *v4 ;
    void *argp5 ;
    int res5 = 0 ;
    std::vector< Date > temp6 ;
    std::vector< Date > *v6 ;
    std::vector< Period > temp7 ;
    std::vector< Period > *v7 ;
    void *argp8 ;
    int res8 = 0 ;
    size_t val9 ;
    int ecode9 = 0 ;
    double val10 ;
    int ecode10 = 0 ;
    size_t val11 ;
    int ecode11 = 0 ;
    double val12 ;
    int ecode12 = 0 ;
    double val13 ;
    int ecode13 = 0 ;
    double val14 ;
    int ecode14 = 0 ;
    int argvi = 0;
    MarkovFunctionalPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 14) || (items > 14)) {
      SWIG_croak("Usage: new_MarkovFunctional(termStructure,reversion,volstepdates,volatilities,swaptionVol,swaptionExpiries,swaptionTenors,swapIndexBase,yGridPoints,yStdDevs,gaussHermitePoints,digitalGap,marketRateAccuracy,lowerRateBound);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MarkovFunctional" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MarkovFunctional" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_MarkovFunctional" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_MarkovFunctional. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp3.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_MarkovFunctional. "
              "Expected an array of " "Date");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_MarkovFunctional. "
          "Expected an array of " "Date");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of new_MarkovFunctional. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp4.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 4 of "
              "new_MarkovFunctional. "
              "Expected an array of ""double");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of new_MarkovFunctional. "
          "Expected an array of ""double");
      }
    }
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_HandleT_SwaptionVolatilityStructure_t,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_MarkovFunctional" "', argument " "5"" of type '" "Handle< SwaptionVolatilityStructure > const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MarkovFunctional" "', argument " "5"" of type '" "Handle< SwaptionVolatilityStructure > const &""'"); 
    }
    arg5 = reinterpret_cast< Handle< SwaptionVolatilityStructure > * >(argp5);
    {
      if (SWIG_ConvertPtr(ST(5),(void **) &v6, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg6 = v6;
      } else if (SvROK(ST(5))) {
        AV *av = (AV *)SvRV(ST(5));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 6 of new_MarkovFunctional. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp6.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 6 of "
              "new_MarkovFunctional. "
              "Expected an array of " "Date");
          }
        }
        arg6 = &temp6;
      } else {
        SWIG_croak("Type error in argument 6 of new_MarkovFunctional. "
          "Expected an array of " "Date");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(6),(void **) &v7, 
          SWIGTYPE_p_std__vectorT_Period_t,1) != -1) {
        arg7 = v7;
      } else if (SvROK(ST(6))) {
        AV *av = (AV *)SvRV(ST(6));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 7 of new_MarkovFunctional. "
          "Expected an array of " "Period");
        SV **tv;
        I32 len = av_len(av) + 1;
        Period* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Period,0) != -1) {
            temp7.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 7 of "
              "new_MarkovFunctional. "
              "Expected an array of " "Period");
          }
        }
        arg7 = &temp7;
      } else {
        SWIG_croak("Type error in argument 7 of new_MarkovFunctional. "
          "Expected an array of " "Period");
      }
    }
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_SwapIndexPtr,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_MarkovFunctional" "', argument " "8"" of type '" "SwapIndexPtr const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MarkovFunctional" "', argument " "8"" of type '" "SwapIndexPtr const &""'"); 
    }
    arg8 = reinterpret_cast< SwapIndexPtr * >(argp8);
    ecode9 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(8), &val9);
    if (!SWIG_IsOK(ecode9)) {
      SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "new_MarkovFunctional" "', argument " "9"" of type '" "Size""'");
    } 
    arg9 = static_cast< Size >(val9);
    ecode10 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), &val10);
    if (!SWIG_IsOK(ecode10)) {
      SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "new_MarkovFunctional" "', argument " "10"" of type '" "Real""'");
    } 
    arg10 = static_cast< Real >(val10);
    ecode11 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(10), &val11);
    if (!SWIG_IsOK(ecode11)) {
      SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "new_MarkovFunctional" "', argument " "11"" of type '" "Size""'");
    } 
    arg11 = static_cast< Size >(val11);
    ecode12 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(11), &val12);
    if (!SWIG_IsOK(ecode12)) {
      SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "new_MarkovFunctional" "', argument " "12"" of type '" "Real""'");
    } 
    arg12 = static_cast< Real >(val12);
    ecode13 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(12), &val13);
    if (!SWIG_IsOK(ecode13)) {
      SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "new_MarkovFunctional" "', argument " "13"" of type '" "Real""'");
    } 
    arg13 = static_cast< Real >(val13);
    ecode14 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(13), &val14);
    if (!SWIG_IsOK(ecode14)) {
      SWIG_exception_fail(SWIG_ArgError(ecode14), "in method '" "new_MarkovFunctional" "', argument " "14"" of type '" "Real""'");
    } 
    arg14 = static_cast< Real >(val14);
    {
      try {
        result = (MarkovFunctionalPtr *)new_MarkovFunctionalPtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1,arg2,(std::vector< Date > const &)*arg3,(std::vector< double > const &)*arg4,(Handle< SwaptionVolatilityStructure > const &)*arg5,(std::vector< Date > const &)*arg6,(std::vector< Period > const &)*arg7,(SwapIndexPtr const &)*arg8,arg9,arg10,arg11,arg12,arg13,arg14);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MarkovFunctionalPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MarkovFunctional__SWIG_4) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    Real arg2 ;
    std::vector< Date > *arg3 = 0 ;
    std::vector< Real > *arg4 = 0 ;
    Handle< SwaptionVolatilityStructure > *arg5 = 0 ;
    std::vector< Date > *arg6 = 0 ;
    std::vector< Period > *arg7 = 0 ;
    SwapIndexPtr *arg8 = 0 ;
    Size arg9 ;
    Real arg10 ;
    Size arg11 ;
    Real arg12 ;
    Real arg13 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    std::vector< Date > temp3 ;
    std::vector< Date > *v3 ;
    std::vector< double > temp4 ;
    std::vector< double > *v4 ;
    void *argp5 ;
    int res5 = 0 ;
    std::vector< Date > temp6 ;
    std::vector< Date > *v6 ;
    std::vector< Period > temp7 ;
    std::vector< Period > *v7 ;
    void *argp8 ;
    int res8 = 0 ;
    size_t val9 ;
    int ecode9 = 0 ;
    double val10 ;
    int ecode10 = 0 ;
    size_t val11 ;
    int ecode11 = 0 ;
    double val12 ;
    int ecode12 = 0 ;
    double val13 ;
    int ecode13 = 0 ;
    int argvi = 0;
    MarkovFunctionalPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 13) || (items > 13)) {
      SWIG_croak("Usage: new_MarkovFunctional(termStructure,reversion,volstepdates,volatilities,swaptionVol,swaptionExpiries,swaptionTenors,swapIndexBase,yGridPoints,yStdDevs,gaussHermitePoints,digitalGap,marketRateAccuracy);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MarkovFunctional" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MarkovFunctional" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_MarkovFunctional" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_MarkovFunctional. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp3.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_MarkovFunctional. "
              "Expected an array of " "Date");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_MarkovFunctional. "
          "Expected an array of " "Date");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of new_MarkovFunctional. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp4.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 4 of "
              "new_MarkovFunctional. "
              "Expected an array of ""double");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of new_MarkovFunctional. "
          "Expected an array of ""double");
      }
    }
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_HandleT_SwaptionVolatilityStructure_t,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_MarkovFunctional" "', argument " "5"" of type '" "Handle< SwaptionVolatilityStructure > const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MarkovFunctional" "', argument " "5"" of type '" "Handle< SwaptionVolatilityStructure > const &""'"); 
    }
    arg5 = reinterpret_cast< Handle< SwaptionVolatilityStructure > * >(argp5);
    {
      if (SWIG_ConvertPtr(ST(5),(void **) &v6, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg6 = v6;
      } else if (SvROK(ST(5))) {
        AV *av = (AV *)SvRV(ST(5));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 6 of new_MarkovFunctional. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp6.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 6 of "
              "new_MarkovFunctional. "
              "Expected an array of " "Date");
          }
        }
        arg6 = &temp6;
      } else {
        SWIG_croak("Type error in argument 6 of new_MarkovFunctional. "
          "Expected an array of " "Date");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(6),(void **) &v7, 
          SWIGTYPE_p_std__vectorT_Period_t,1) != -1) {
        arg7 = v7;
      } else if (SvROK(ST(6))) {
        AV *av = (AV *)SvRV(ST(6));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 7 of new_MarkovFunctional. "
          "Expected an array of " "Period");
        SV **tv;
        I32 len = av_len(av) + 1;
        Period* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Period,0) != -1) {
            temp7.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 7 of "
              "new_MarkovFunctional. "
              "Expected an array of " "Period");
          }
        }
        arg7 = &temp7;
      } else {
        SWIG_croak("Type error in argument 7 of new_MarkovFunctional. "
          "Expected an array of " "Period");
      }
    }
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_SwapIndexPtr,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_MarkovFunctional" "', argument " "8"" of type '" "SwapIndexPtr const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MarkovFunctional" "', argument " "8"" of type '" "SwapIndexPtr const &""'"); 
    }
    arg8 = reinterpret_cast< SwapIndexPtr * >(argp8);
    ecode9 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(8), &val9);
    if (!SWIG_IsOK(ecode9)) {
      SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "new_MarkovFunctional" "', argument " "9"" of type '" "Size""'");
    } 
    arg9 = static_cast< Size >(val9);
    ecode10 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), &val10);
    if (!SWIG_IsOK(ecode10)) {
      SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "new_MarkovFunctional" "', argument " "10"" of type '" "Real""'");
    } 
    arg10 = static_cast< Real >(val10);
    ecode11 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(10), &val11);
    if (!SWIG_IsOK(ecode11)) {
      SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "new_MarkovFunctional" "', argument " "11"" of type '" "Size""'");
    } 
    arg11 = static_cast< Size >(val11);
    ecode12 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(11), &val12);
    if (!SWIG_IsOK(ecode12)) {
      SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "new_MarkovFunctional" "', argument " "12"" of type '" "Real""'");
    } 
    arg12 = static_cast< Real >(val12);
    ecode13 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(12), &val13);
    if (!SWIG_IsOK(ecode13)) {
      SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "new_MarkovFunctional" "', argument " "13"" of type '" "Real""'");
    } 
    arg13 = static_cast< Real >(val13);
    {
      try {
        result = (MarkovFunctionalPtr *)new_MarkovFunctionalPtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1,arg2,(std::vector< Date > const &)*arg3,(std::vector< double > const &)*arg4,(Handle< SwaptionVolatilityStructure > const &)*arg5,(std::vector< Date > const &)*arg6,(std::vector< Period > const &)*arg7,(SwapIndexPtr const &)*arg8,arg9,arg10,arg11,arg12,arg13);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MarkovFunctionalPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MarkovFunctional__SWIG_5) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    Real arg2 ;
    std::vector< Date > *arg3 = 0 ;
    std::vector< Real > *arg4 = 0 ;
    Handle< SwaptionVolatilityStructure > *arg5 = 0 ;
    std::vector< Date > *arg6 = 0 ;
    std::vector< Period > *arg7 = 0 ;
    SwapIndexPtr *arg8 = 0 ;
    Size arg9 ;
    Real arg10 ;
    Size arg11 ;
    Real arg12 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    std::vector< Date > temp3 ;
    std::vector< Date > *v3 ;
    std::vector< double > temp4 ;
    std::vector< double > *v4 ;
    void *argp5 ;
    int res5 = 0 ;
    std::vector< Date > temp6 ;
    std::vector< Date > *v6 ;
    std::vector< Period > temp7 ;
    std::vector< Period > *v7 ;
    void *argp8 ;
    int res8 = 0 ;
    size_t val9 ;
    int ecode9 = 0 ;
    double val10 ;
    int ecode10 = 0 ;
    size_t val11 ;
    int ecode11 = 0 ;
    double val12 ;
    int ecode12 = 0 ;
    int argvi = 0;
    MarkovFunctionalPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 12) || (items > 12)) {
      SWIG_croak("Usage: new_MarkovFunctional(termStructure,reversion,volstepdates,volatilities,swaptionVol,swaptionExpiries,swaptionTenors,swapIndexBase,yGridPoints,yStdDevs,gaussHermitePoints,digitalGap);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MarkovFunctional" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MarkovFunctional" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_MarkovFunctional" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_MarkovFunctional. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp3.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_MarkovFunctional. "
              "Expected an array of " "Date");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_MarkovFunctional. "
          "Expected an array of " "Date");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of new_MarkovFunctional. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp4.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 4 of "
              "new_MarkovFunctional. "
              "Expected an array of ""double");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of new_MarkovFunctional. "
          "Expected an array of ""double");
      }
    }
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_HandleT_SwaptionVolatilityStructure_t,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_MarkovFunctional" "', argument " "5"" of type '" "Handle< SwaptionVolatilityStructure > const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MarkovFunctional" "', argument " "5"" of type '" "Handle< SwaptionVolatilityStructure > const &""'"); 
    }
    arg5 = reinterpret_cast< Handle< SwaptionVolatilityStructure > * >(argp5);
    {
      if (SWIG_ConvertPtr(ST(5),(void **) &v6, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg6 = v6;
      } else if (SvROK(ST(5))) {
        AV *av = (AV *)SvRV(ST(5));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 6 of new_MarkovFunctional. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp6.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 6 of "
              "new_MarkovFunctional. "
              "Expected an array of " "Date");
          }
        }
        arg6 = &temp6;
      } else {
        SWIG_croak("Type error in argument 6 of new_MarkovFunctional. "
          "Expected an array of " "Date");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(6),(void **) &v7, 
          SWIGTYPE_p_std__vectorT_Period_t,1) != -1) {
        arg7 = v7;
      } else if (SvROK(ST(6))) {
        AV *av = (AV *)SvRV(ST(6));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 7 of new_MarkovFunctional. "
          "Expected an array of " "Period");
        SV **tv;
        I32 len = av_len(av) + 1;
        Period* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Period,0) != -1) {
            temp7.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 7 of "
              "new_MarkovFunctional. "
              "Expected an array of " "Period");
          }
        }
        arg7 = &temp7;
      } else {
        SWIG_croak("Type error in argument 7 of new_MarkovFunctional. "
          "Expected an array of " "Period");
      }
    }
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_SwapIndexPtr,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_MarkovFunctional" "', argument " "8"" of type '" "SwapIndexPtr const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MarkovFunctional" "', argument " "8"" of type '" "SwapIndexPtr const &""'"); 
    }
    arg8 = reinterpret_cast< SwapIndexPtr * >(argp8);
    ecode9 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(8), &val9);
    if (!SWIG_IsOK(ecode9)) {
      SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "new_MarkovFunctional" "', argument " "9"" of type '" "Size""'");
    } 
    arg9 = static_cast< Size >(val9);
    ecode10 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), &val10);
    if (!SWIG_IsOK(ecode10)) {
      SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "new_MarkovFunctional" "', argument " "10"" of type '" "Real""'");
    } 
    arg10 = static_cast< Real >(val10);
    ecode11 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(10), &val11);
    if (!SWIG_IsOK(ecode11)) {
      SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "new_MarkovFunctional" "', argument " "11"" of type '" "Size""'");
    } 
    arg11 = static_cast< Size >(val11);
    ecode12 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(11), &val12);
    if (!SWIG_IsOK(ecode12)) {
      SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "new_MarkovFunctional" "', argument " "12"" of type '" "Real""'");
    } 
    arg12 = static_cast< Real >(val12);
    {
      try {
        result = (MarkovFunctionalPtr *)new_MarkovFunctionalPtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1,arg2,(std::vector< Date > const &)*arg3,(std::vector< double > const &)*arg4,(Handle< SwaptionVolatilityStructure > const &)*arg5,(std::vector< Date > const &)*arg6,(std::vector< Period > const &)*arg7,(SwapIndexPtr const &)*arg8,arg9,arg10,arg11,arg12);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MarkovFunctionalPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MarkovFunctional__SWIG_6) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    Real arg2 ;
    std::vector< Date > *arg3 = 0 ;
    std::vector< Real > *arg4 = 0 ;
    Handle< SwaptionVolatilityStructure > *arg5 = 0 ;
    std::vector< Date > *arg6 = 0 ;
    std::vector< Period > *arg7 = 0 ;
    SwapIndexPtr *arg8 = 0 ;
    Size arg9 ;
    Real arg10 ;
    Size arg11 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    std::vector< Date > temp3 ;
    std::vector< Date > *v3 ;
    std::vector< double > temp4 ;
    std::vector< double > *v4 ;
    void *argp5 ;
    int res5 = 0 ;
    std::vector< Date > temp6 ;
    std::vector< Date > *v6 ;
    std::vector< Period > temp7 ;
    std::vector< Period > *v7 ;
    void *argp8 ;
    int res8 = 0 ;
    size_t val9 ;
    int ecode9 = 0 ;
    double val10 ;
    int ecode10 = 0 ;
    size_t val11 ;
    int ecode11 = 0 ;
    int argvi = 0;
    MarkovFunctionalPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 11) || (items > 11)) {
      SWIG_croak("Usage: new_MarkovFunctional(termStructure,reversion,volstepdates,volatilities,swaptionVol,swaptionExpiries,swaptionTenors,swapIndexBase,yGridPoints,yStdDevs,gaussHermitePoints);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MarkovFunctional" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MarkovFunctional" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_MarkovFunctional" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_MarkovFunctional. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp3.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_MarkovFunctional. "
              "Expected an array of " "Date");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_MarkovFunctional. "
          "Expected an array of " "Date");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of new_MarkovFunctional. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp4.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 4 of "
              "new_MarkovFunctional. "
              "Expected an array of ""double");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of new_MarkovFunctional. "
          "Expected an array of ""double");
      }
    }
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_HandleT_SwaptionVolatilityStructure_t,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_MarkovFunctional" "', argument " "5"" of type '" "Handle< SwaptionVolatilityStructure > const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MarkovFunctional" "', argument " "5"" of type '" "Handle< SwaptionVolatilityStructure > const &""'"); 
    }
    arg5 = reinterpret_cast< Handle< SwaptionVolatilityStructure > * >(argp5);
    {
      if (SWIG_ConvertPtr(ST(5),(void **) &v6, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg6 = v6;
      } else if (SvROK(ST(5))) {
        AV *av = (AV *)SvRV(ST(5));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 6 of new_MarkovFunctional. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp6.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 6 of "
              "new_MarkovFunctional. "
              "Expected an array of " "Date");
          }
        }
        arg6 = &temp6;
      } else {
        SWIG_croak("Type error in argument 6 of new_MarkovFunctional. "
          "Expected an array of " "Date");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(6),(void **) &v7, 
          SWIGTYPE_p_std__vectorT_Period_t,1) != -1) {
        arg7 = v7;
      } else if (SvROK(ST(6))) {
        AV *av = (AV *)SvRV(ST(6));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 7 of new_MarkovFunctional. "
          "Expected an array of " "Period");
        SV **tv;
        I32 len = av_len(av) + 1;
        Period* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Period,0) != -1) {
            temp7.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 7 of "
              "new_MarkovFunctional. "
              "Expected an array of " "Period");
          }
        }
        arg7 = &temp7;
      } else {
        SWIG_croak("Type error in argument 7 of new_MarkovFunctional. "
          "Expected an array of " "Period");
      }
    }
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_SwapIndexPtr,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_MarkovFunctional" "', argument " "8"" of type '" "SwapIndexPtr const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MarkovFunctional" "', argument " "8"" of type '" "SwapIndexPtr const &""'"); 
    }
    arg8 = reinterpret_cast< SwapIndexPtr * >(argp8);
    ecode9 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(8), &val9);
    if (!SWIG_IsOK(ecode9)) {
      SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "new_MarkovFunctional" "', argument " "9"" of type '" "Size""'");
    } 
    arg9 = static_cast< Size >(val9);
    ecode10 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), &val10);
    if (!SWIG_IsOK(ecode10)) {
      SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "new_MarkovFunctional" "', argument " "10"" of type '" "Real""'");
    } 
    arg10 = static_cast< Real >(val10);
    ecode11 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(10), &val11);
    if (!SWIG_IsOK(ecode11)) {
      SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "new_MarkovFunctional" "', argument " "11"" of type '" "Size""'");
    } 
    arg11 = static_cast< Size >(val11);
    {
      try {
        result = (MarkovFunctionalPtr *)new_MarkovFunctionalPtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1,arg2,(std::vector< Date > const &)*arg3,(std::vector< double > const &)*arg4,(Handle< SwaptionVolatilityStructure > const &)*arg5,(std::vector< Date > const &)*arg6,(std::vector< Period > const &)*arg7,(SwapIndexPtr const &)*arg8,arg9,arg10,arg11);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MarkovFunctionalPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MarkovFunctional__SWIG_7) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    Real arg2 ;
    std::vector< Date > *arg3 = 0 ;
    std::vector< Real > *arg4 = 0 ;
    Handle< SwaptionVolatilityStructure > *arg5 = 0 ;
    std::vector< Date > *arg6 = 0 ;
    std::vector< Period > *arg7 = 0 ;
    SwapIndexPtr *arg8 = 0 ;
    Size arg9 ;
    Real arg10 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    std::vector< Date > temp3 ;
    std::vector< Date > *v3 ;
    std::vector< double > temp4 ;
    std::vector< double > *v4 ;
    void *argp5 ;
    int res5 = 0 ;
    std::vector< Date > temp6 ;
    std::vector< Date > *v6 ;
    std::vector< Period > temp7 ;
    std::vector< Period > *v7 ;
    void *argp8 ;
    int res8 = 0 ;
    size_t val9 ;
    int ecode9 = 0 ;
    double val10 ;
    int ecode10 = 0 ;
    int argvi = 0;
    MarkovFunctionalPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 10) || (items > 10)) {
      SWIG_croak("Usage: new_MarkovFunctional(termStructure,reversion,volstepdates,volatilities,swaptionVol,swaptionExpiries,swaptionTenors,swapIndexBase,yGridPoints,yStdDevs);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MarkovFunctional" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MarkovFunctional" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_MarkovFunctional" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_MarkovFunctional. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp3.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_MarkovFunctional. "
              "Expected an array of " "Date");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_MarkovFunctional. "
          "Expected an array of " "Date");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of new_MarkovFunctional. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp4.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 4 of "
              "new_MarkovFunctional. "
              "Expected an array of ""double");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of new_MarkovFunctional. "
          "Expected an array of ""double");
      }
    }
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_HandleT_SwaptionVolatilityStructure_t,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_MarkovFunctional" "', argument " "5"" of type '" "Handle< SwaptionVolatilityStructure > const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MarkovFunctional" "', argument " "5"" of type '" "Handle< SwaptionVolatilityStructure > const &""'"); 
    }
    arg5 = reinterpret_cast< Handle< SwaptionVolatilityStructure > * >(argp5);
    {
      if (SWIG_ConvertPtr(ST(5),(void **) &v6, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg6 = v6;
      } else if (SvROK(ST(5))) {
        AV *av = (AV *)SvRV(ST(5));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 6 of new_MarkovFunctional. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp6.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 6 of "
              "new_MarkovFunctional. "
              "Expected an array of " "Date");
          }
        }
        arg6 = &temp6;
      } else {
        SWIG_croak("Type error in argument 6 of new_MarkovFunctional. "
          "Expected an array of " "Date");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(6),(void **) &v7, 
          SWIGTYPE_p_std__vectorT_Period_t,1) != -1) {
        arg7 = v7;
      } else if (SvROK(ST(6))) {
        AV *av = (AV *)SvRV(ST(6));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 7 of new_MarkovFunctional. "
          "Expected an array of " "Period");
        SV **tv;
        I32 len = av_len(av) + 1;
        Period* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Period,0) != -1) {
            temp7.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 7 of "
              "new_MarkovFunctional. "
              "Expected an array of " "Period");
          }
        }
        arg7 = &temp7;
      } else {
        SWIG_croak("Type error in argument 7 of new_MarkovFunctional. "
          "Expected an array of " "Period");
      }
    }
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_SwapIndexPtr,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_MarkovFunctional" "', argument " "8"" of type '" "SwapIndexPtr const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MarkovFunctional" "', argument " "8"" of type '" "SwapIndexPtr const &""'"); 
    }
    arg8 = reinterpret_cast< SwapIndexPtr * >(argp8);
    ecode9 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(8), &val9);
    if (!SWIG_IsOK(ecode9)) {
      SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "new_MarkovFunctional" "', argument " "9"" of type '" "Size""'");
    } 
    arg9 = static_cast< Size >(val9);
    ecode10 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), &val10);
    if (!SWIG_IsOK(ecode10)) {
      SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "new_MarkovFunctional" "', argument " "10"" of type '" "Real""'");
    } 
    arg10 = static_cast< Real >(val10);
    {
      try {
        result = (MarkovFunctionalPtr *)new_MarkovFunctionalPtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1,arg2,(std::vector< Date > const &)*arg3,(std::vector< double > const &)*arg4,(Handle< SwaptionVolatilityStructure > const &)*arg5,(std::vector< Date > const &)*arg6,(std::vector< Period > const &)*arg7,(SwapIndexPtr const &)*arg8,arg9,arg10);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MarkovFunctionalPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MarkovFunctional__SWIG_8) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    Real arg2 ;
    std::vector< Date > *arg3 = 0 ;
    std::vector< Real > *arg4 = 0 ;
    Handle< SwaptionVolatilityStructure > *arg5 = 0 ;
    std::vector< Date > *arg6 = 0 ;
    std::vector< Period > *arg7 = 0 ;
    SwapIndexPtr *arg8 = 0 ;
    Size arg9 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    std::vector< Date > temp3 ;
    std::vector< Date > *v3 ;
    std::vector< double > temp4 ;
    std::vector< double > *v4 ;
    void *argp5 ;
    int res5 = 0 ;
    std::vector< Date > temp6 ;
    std::vector< Date > *v6 ;
    std::vector< Period > temp7 ;
    std::vector< Period > *v7 ;
    void *argp8 ;
    int res8 = 0 ;
    size_t val9 ;
    int ecode9 = 0 ;
    int argvi = 0;
    MarkovFunctionalPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 9) || (items > 9)) {
      SWIG_croak("Usage: new_MarkovFunctional(termStructure,reversion,volstepdates,volatilities,swaptionVol,swaptionExpiries,swaptionTenors,swapIndexBase,yGridPoints);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MarkovFunctional" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MarkovFunctional" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_MarkovFunctional" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_MarkovFunctional. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp3.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_MarkovFunctional. "
              "Expected an array of " "Date");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_MarkovFunctional. "
          "Expected an array of " "Date");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of new_MarkovFunctional. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp4.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 4 of "
              "new_MarkovFunctional. "
              "Expected an array of ""double");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of new_MarkovFunctional. "
          "Expected an array of ""double");
      }
    }
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_HandleT_SwaptionVolatilityStructure_t,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_MarkovFunctional" "', argument " "5"" of type '" "Handle< SwaptionVolatilityStructure > const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MarkovFunctional" "', argument " "5"" of type '" "Handle< SwaptionVolatilityStructure > const &""'"); 
    }
    arg5 = reinterpret_cast< Handle< SwaptionVolatilityStructure > * >(argp5);
    {
      if (SWIG_ConvertPtr(ST(5),(void **) &v6, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg6 = v6;
      } else if (SvROK(ST(5))) {
        AV *av = (AV *)SvRV(ST(5));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 6 of new_MarkovFunctional. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp6.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 6 of "
              "new_MarkovFunctional. "
              "Expected an array of " "Date");
          }
        }
        arg6 = &temp6;
      } else {
        SWIG_croak("Type error in argument 6 of new_MarkovFunctional. "
          "Expected an array of " "Date");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(6),(void **) &v7, 
          SWIGTYPE_p_std__vectorT_Period_t,1) != -1) {
        arg7 = v7;
      } else if (SvROK(ST(6))) {
        AV *av = (AV *)SvRV(ST(6));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 7 of new_MarkovFunctional. "
          "Expected an array of " "Period");
        SV **tv;
        I32 len = av_len(av) + 1;
        Period* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Period,0) != -1) {
            temp7.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 7 of "
              "new_MarkovFunctional. "
              "Expected an array of " "Period");
          }
        }
        arg7 = &temp7;
      } else {
        SWIG_croak("Type error in argument 7 of new_MarkovFunctional. "
          "Expected an array of " "Period");
      }
    }
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_SwapIndexPtr,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_MarkovFunctional" "', argument " "8"" of type '" "SwapIndexPtr const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MarkovFunctional" "', argument " "8"" of type '" "SwapIndexPtr const &""'"); 
    }
    arg8 = reinterpret_cast< SwapIndexPtr * >(argp8);
    ecode9 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(8), &val9);
    if (!SWIG_IsOK(ecode9)) {
      SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "new_MarkovFunctional" "', argument " "9"" of type '" "Size""'");
    } 
    arg9 = static_cast< Size >(val9);
    {
      try {
        result = (MarkovFunctionalPtr *)new_MarkovFunctionalPtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1,arg2,(std::vector< Date > const &)*arg3,(std::vector< double > const &)*arg4,(Handle< SwaptionVolatilityStructure > const &)*arg5,(std::vector< Date > const &)*arg6,(std::vector< Period > const &)*arg7,(SwapIndexPtr const &)*arg8,arg9);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MarkovFunctionalPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MarkovFunctional__SWIG_9) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    Real arg2 ;
    std::vector< Date > *arg3 = 0 ;
    std::vector< Real > *arg4 = 0 ;
    Handle< SwaptionVolatilityStructure > *arg5 = 0 ;
    std::vector< Date > *arg6 = 0 ;
    std::vector< Period > *arg7 = 0 ;
    SwapIndexPtr *arg8 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    std::vector< Date > temp3 ;
    std::vector< Date > *v3 ;
    std::vector< double > temp4 ;
    std::vector< double > *v4 ;
    void *argp5 ;
    int res5 = 0 ;
    std::vector< Date > temp6 ;
    std::vector< Date > *v6 ;
    std::vector< Period > temp7 ;
    std::vector< Period > *v7 ;
    void *argp8 ;
    int res8 = 0 ;
    int argvi = 0;
    MarkovFunctionalPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 8) || (items > 8)) {
      SWIG_croak("Usage: new_MarkovFunctional(termStructure,reversion,volstepdates,volatilities,swaptionVol,swaptionExpiries,swaptionTenors,swapIndexBase);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MarkovFunctional" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MarkovFunctional" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_MarkovFunctional" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_MarkovFunctional. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp3.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_MarkovFunctional. "
              "Expected an array of " "Date");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_MarkovFunctional. "
          "Expected an array of " "Date");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of new_MarkovFunctional. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp4.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 4 of "
              "new_MarkovFunctional. "
              "Expected an array of ""double");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of new_MarkovFunctional. "
          "Expected an array of ""double");
      }
    }
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_HandleT_SwaptionVolatilityStructure_t,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_MarkovFunctional" "', argument " "5"" of type '" "Handle< SwaptionVolatilityStructure > const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MarkovFunctional" "', argument " "5"" of type '" "Handle< SwaptionVolatilityStructure > const &""'"); 
    }
    arg5 = reinterpret_cast< Handle< SwaptionVolatilityStructure > * >(argp5);
    {
      if (SWIG_ConvertPtr(ST(5),(void **) &v6, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg6 = v6;
      } else if (SvROK(ST(5))) {
        AV *av = (AV *)SvRV(ST(5));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 6 of new_MarkovFunctional. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp6.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 6 of "
              "new_MarkovFunctional. "
              "Expected an array of " "Date");
          }
        }
        arg6 = &temp6;
      } else {
        SWIG_croak("Type error in argument 6 of new_MarkovFunctional. "
          "Expected an array of " "Date");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(6),(void **) &v7, 
          SWIGTYPE_p_std__vectorT_Period_t,1) != -1) {
        arg7 = v7;
      } else if (SvROK(ST(6))) {
        AV *av = (AV *)SvRV(ST(6));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 7 of new_MarkovFunctional. "
          "Expected an array of " "Period");
        SV **tv;
        I32 len = av_len(av) + 1;
        Period* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Period,0) != -1) {
            temp7.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 7 of "
              "new_MarkovFunctional. "
              "Expected an array of " "Period");
          }
        }
        arg7 = &temp7;
      } else {
        SWIG_croak("Type error in argument 7 of new_MarkovFunctional. "
          "Expected an array of " "Period");
      }
    }
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_SwapIndexPtr,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_MarkovFunctional" "', argument " "8"" of type '" "SwapIndexPtr const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MarkovFunctional" "', argument " "8"" of type '" "SwapIndexPtr const &""'"); 
    }
    arg8 = reinterpret_cast< SwapIndexPtr * >(argp8);
    {
      try {
        result = (MarkovFunctionalPtr *)new_MarkovFunctionalPtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1,arg2,(std::vector< Date > const &)*arg3,(std::vector< double > const &)*arg4,(Handle< SwaptionVolatilityStructure > const &)*arg5,(std::vector< Date > const &)*arg6,(std::vector< Period > const &)*arg7,(SwapIndexPtr const &)*arg8);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MarkovFunctionalPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MarkovFunctional) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 8) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(3),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(3))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(3));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_HandleT_SwaptionVolatilityStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(5),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(5))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(5));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Period >* v;
            if (SWIG_ConvertPtr(ST(6),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Period_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(6))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(6));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Period* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Period,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_SwapIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 9) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(3),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(3))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(3));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_HandleT_SwaptionVolatilityStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(5),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(5))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(5));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Period >* v;
            if (SWIG_ConvertPtr(ST(6),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Period_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(6))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(6));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Period* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Period,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_SwapIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(8), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 10) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(3),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(3))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(3));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_HandleT_SwaptionVolatilityStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(5),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(5))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(5));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Period >* v;
            if (SWIG_ConvertPtr(ST(6),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Period_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(6))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(6));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Period* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Period,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_SwapIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(8), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 11) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(3),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(3))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(3));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_HandleT_SwaptionVolatilityStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(5),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(5))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(5));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Period >* v;
            if (SWIG_ConvertPtr(ST(6),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Period_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(6))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(6));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Period* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Period,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_SwapIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(8), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(10), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 12) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(3),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(3))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(3));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_HandleT_SwaptionVolatilityStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(5),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(5))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(5));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Period >* v;
            if (SWIG_ConvertPtr(ST(6),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Period_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(6))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(6));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Period* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Period,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_SwapIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(8), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(10), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(11), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 13) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(3),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(3))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(3));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_HandleT_SwaptionVolatilityStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(5),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(5))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(5));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Period >* v;
            if (SWIG_ConvertPtr(ST(6),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Period_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(6))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(6));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Period* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Period,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_SwapIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(8), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(10), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(11), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(12), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
    if (items == 14) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(3),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(3))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(3));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_HandleT_SwaptionVolatilityStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(5),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(5))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(5));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Period >* v;
            if (SWIG_ConvertPtr(ST(6),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Period_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(6))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(6));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Period* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Period,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_SwapIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(8), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(10), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(11), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(12), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(13), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 7;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_7:
    
    if (items == 15) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(3),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(3))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(3));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_HandleT_SwaptionVolatilityStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(5),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(5))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(5));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Period >* v;
            if (SWIG_ConvertPtr(ST(6),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Period_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(6))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(6));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Period* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Period,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_SwapIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(8), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(10), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(11), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(12), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(13), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(14), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 8;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_8:
    
    if (items == 16) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(3),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(3))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(3));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_HandleT_SwaptionVolatilityStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(5),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(5))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(5));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Period >* v;
            if (SWIG_ConvertPtr(ST(6),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Period_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(6))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(6));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Period* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Period,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_SwapIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(8), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(10), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(11), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(12), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(13), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(14), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(15), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 9;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_9:
    
    if (items == 17) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(3),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(3))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(3));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_HandleT_SwaptionVolatilityStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(5),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(5))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(5));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Period >* v;
            if (SWIG_ConvertPtr(ST(6),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Period_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(6))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(6));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Period* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Period,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_SwapIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(8), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(10), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(11), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(12), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(13), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(14), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(15), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(16),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(16))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(16));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 10;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_10:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MarkovFunctional__SWIG_9); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MarkovFunctional__SWIG_8); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MarkovFunctional__SWIG_7); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MarkovFunctional__SWIG_6); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MarkovFunctional__SWIG_5); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MarkovFunctional__SWIG_4); return;
    case 7:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MarkovFunctional__SWIG_3); return;
    case 8:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MarkovFunctional__SWIG_2); return;
    case 9:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MarkovFunctional__SWIG_1); return;
    case 10:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MarkovFunctional__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_MarkovFunctional'");
  XSRETURN(0);
}


XS(_wrap_MarkovFunctional_calibrate__SWIG_0) {
  {
    MarkovFunctionalPtr *arg1 = (MarkovFunctionalPtr *) 0 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > *arg2 = 0 ;
    OptimizationMethod *arg3 = 0 ;
    EndCriteria *arg4 = 0 ;
    Constraint *arg5 = 0 ;
    std::vector< Real > *arg6 = 0 ;
    std::vector< bool > *arg7 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > temp2 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > *v2 ;
    void *argp3 = 0 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    std::vector< double > temp6 ;
    std::vector< double > *v6 ;
    std::vector< bool > temp7 ;
    std::vector< bool > *v7 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: MarkovFunctional_calibrate(self,helper,method,endCriteria,constraint,weights,fixParameters);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_MarkovFunctionalPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MarkovFunctional_calibrate" "', argument " "1"" of type '" "MarkovFunctionalPtr *""'"); 
    }
    arg1 = reinterpret_cast< MarkovFunctionalPtr * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CalibrationHelper_t_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of MarkovFunctional_calibrate. "
          "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CalibrationHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CalibrationHelper_t,0) != -1) {
            temp2.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 2 of "
              "MarkovFunctional_calibrate. "
              "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of MarkovFunctional_calibrate. "
          "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_OptimizationMethod,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MarkovFunctional_calibrate" "', argument " "3"" of type '" "OptimizationMethod &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MarkovFunctional_calibrate" "', argument " "3"" of type '" "OptimizationMethod &""'"); 
    }
    arg3 = reinterpret_cast< OptimizationMethod * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_EndCriteria,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "MarkovFunctional_calibrate" "', argument " "4"" of type '" "EndCriteria const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MarkovFunctional_calibrate" "', argument " "4"" of type '" "EndCriteria const &""'"); 
    }
    arg4 = reinterpret_cast< EndCriteria * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Constraint,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "MarkovFunctional_calibrate" "', argument " "5"" of type '" "Constraint const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MarkovFunctional_calibrate" "', argument " "5"" of type '" "Constraint const &""'"); 
    }
    arg5 = reinterpret_cast< Constraint * >(argp5);
    {
      if (SWIG_ConvertPtr(ST(5),(void **) &v6, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg6 = v6;
      } else if (SvROK(ST(5))) {
        AV *av = (AV *)SvRV(ST(5));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 6 of MarkovFunctional_calibrate. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp6.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 6 of "
              "MarkovFunctional_calibrate. "
              "Expected an array of ""double");
          }
        }
        arg6 = &temp6;
      } else {
        SWIG_croak("Type error in argument 6 of MarkovFunctional_calibrate. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(6),(void **) &v7, 
          SWIGTYPE_p_std__vectorT_bool_t,1) != -1) {
        arg7 = v7;
      } else if (SvROK(ST(6))) {
        AV *av = (AV *)SvRV(ST(6));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 7 of MarkovFunctional_calibrate. "
          "Expected an array of ""bool");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvIOK(*tv)) {
            temp7.push_back((bool)SvIVX(*tv));
          } else {
            SWIG_croak("Type error in argument 7 of "
              "MarkovFunctional_calibrate. "
              "Expected an array of ""bool");
          }
        }
        arg7 = &temp7;
      } else {
        SWIG_croak("Type error in argument 7 of MarkovFunctional_calibrate. "
          "Expected an array of ""bool");
      }
    }
    {
      try {
        MarkovFunctionalPtr_calibrate__SWIG_0(arg1,(std::vector< boost::shared_ptr< CalibrationHelper > > const &)*arg2,*arg3,(EndCriteria const &)*arg4,(Constraint const &)*arg5,(std::vector< double > const &)*arg6,(std::vector< bool > const &)*arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_MarkovFunctional_calibrate__SWIG_1) {
  {
    MarkovFunctionalPtr *arg1 = (MarkovFunctionalPtr *) 0 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > *arg2 = 0 ;
    OptimizationMethod *arg3 = 0 ;
    EndCriteria *arg4 = 0 ;
    Constraint *arg5 = 0 ;
    std::vector< Real > *arg6 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > temp2 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > *v2 ;
    void *argp3 = 0 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    std::vector< double > temp6 ;
    std::vector< double > *v6 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: MarkovFunctional_calibrate(self,helper,method,endCriteria,constraint,weights);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_MarkovFunctionalPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MarkovFunctional_calibrate" "', argument " "1"" of type '" "MarkovFunctionalPtr *""'"); 
    }
    arg1 = reinterpret_cast< MarkovFunctionalPtr * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CalibrationHelper_t_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of MarkovFunctional_calibrate. "
          "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CalibrationHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CalibrationHelper_t,0) != -1) {
            temp2.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 2 of "
              "MarkovFunctional_calibrate. "
              "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of MarkovFunctional_calibrate. "
          "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_OptimizationMethod,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MarkovFunctional_calibrate" "', argument " "3"" of type '" "OptimizationMethod &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MarkovFunctional_calibrate" "', argument " "3"" of type '" "OptimizationMethod &""'"); 
    }
    arg3 = reinterpret_cast< OptimizationMethod * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_EndCriteria,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "MarkovFunctional_calibrate" "', argument " "4"" of type '" "EndCriteria const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MarkovFunctional_calibrate" "', argument " "4"" of type '" "EndCriteria const &""'"); 
    }
    arg4 = reinterpret_cast< EndCriteria * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Constraint,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "MarkovFunctional_calibrate" "', argument " "5"" of type '" "Constraint const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MarkovFunctional_calibrate" "', argument " "5"" of type '" "Constraint const &""'"); 
    }
    arg5 = reinterpret_cast< Constraint * >(argp5);
    {
      if (SWIG_ConvertPtr(ST(5),(void **) &v6, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg6 = v6;
      } else if (SvROK(ST(5))) {
        AV *av = (AV *)SvRV(ST(5));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 6 of MarkovFunctional_calibrate. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp6.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 6 of "
              "MarkovFunctional_calibrate. "
              "Expected an array of ""double");
          }
        }
        arg6 = &temp6;
      } else {
        SWIG_croak("Type error in argument 6 of MarkovFunctional_calibrate. "
          "Expected an array of ""double");
      }
    }
    {
      try {
        MarkovFunctionalPtr_calibrate__SWIG_0(arg1,(std::vector< boost::shared_ptr< CalibrationHelper > > const &)*arg2,*arg3,(EndCriteria const &)*arg4,(Constraint const &)*arg5,(std::vector< double > const &)*arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_MarkovFunctional_calibrate__SWIG_2) {
  {
    MarkovFunctionalPtr *arg1 = (MarkovFunctionalPtr *) 0 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > *arg2 = 0 ;
    OptimizationMethod *arg3 = 0 ;
    EndCriteria *arg4 = 0 ;
    Constraint *arg5 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > temp2 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > *v2 ;
    void *argp3 = 0 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: MarkovFunctional_calibrate(self,helper,method,endCriteria,constraint);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_MarkovFunctionalPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MarkovFunctional_calibrate" "', argument " "1"" of type '" "MarkovFunctionalPtr *""'"); 
    }
    arg1 = reinterpret_cast< MarkovFunctionalPtr * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CalibrationHelper_t_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of MarkovFunctional_calibrate. "
          "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CalibrationHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CalibrationHelper_t,0) != -1) {
            temp2.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 2 of "
              "MarkovFunctional_calibrate. "
              "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of MarkovFunctional_calibrate. "
          "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_OptimizationMethod,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MarkovFunctional_calibrate" "', argument " "3"" of type '" "OptimizationMethod &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MarkovFunctional_calibrate" "', argument " "3"" of type '" "OptimizationMethod &""'"); 
    }
    arg3 = reinterpret_cast< OptimizationMethod * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_EndCriteria,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "MarkovFunctional_calibrate" "', argument " "4"" of type '" "EndCriteria const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MarkovFunctional_calibrate" "', argument " "4"" of type '" "EndCriteria const &""'"); 
    }
    arg4 = reinterpret_cast< EndCriteria * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Constraint,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "MarkovFunctional_calibrate" "', argument " "5"" of type '" "Constraint const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MarkovFunctional_calibrate" "', argument " "5"" of type '" "Constraint const &""'"); 
    }
    arg5 = reinterpret_cast< Constraint * >(argp5);
    {
      try {
        MarkovFunctionalPtr_calibrate__SWIG_0(arg1,(std::vector< boost::shared_ptr< CalibrationHelper > > const &)*arg2,*arg3,(EndCriteria const &)*arg4,(Constraint const &)*arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_MarkovFunctional_calibrate__SWIG_3) {
  {
    MarkovFunctionalPtr *arg1 = (MarkovFunctionalPtr *) 0 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > *arg2 = 0 ;
    OptimizationMethod *arg3 = 0 ;
    EndCriteria *arg4 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > temp2 ;
    std::vector< boost::shared_ptr< CalibrationHelper > > *v2 ;
    void *argp3 = 0 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: MarkovFunctional_calibrate(self,helper,method,endCriteria);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_MarkovFunctionalPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MarkovFunctional_calibrate" "', argument " "1"" of type '" "MarkovFunctionalPtr *""'"); 
    }
    arg1 = reinterpret_cast< MarkovFunctionalPtr * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CalibrationHelper_t_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of MarkovFunctional_calibrate. "
          "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< CalibrationHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_CalibrationHelper_t,0) != -1) {
            temp2.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 2 of "
              "MarkovFunctional_calibrate. "
              "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of MarkovFunctional_calibrate. "
          "Expected an array of " "boost::shared_ptr< CalibrationHelper >");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_OptimizationMethod,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MarkovFunctional_calibrate" "', argument " "3"" of type '" "OptimizationMethod &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MarkovFunctional_calibrate" "', argument " "3"" of type '" "OptimizationMethod &""'"); 
    }
    arg3 = reinterpret_cast< OptimizationMethod * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_EndCriteria,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "MarkovFunctional_calibrate" "', argument " "4"" of type '" "EndCriteria const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MarkovFunctional_calibrate" "', argument " "4"" of type '" "EndCriteria const &""'"); 
    }
    arg4 = reinterpret_cast< EndCriteria * >(argp4);
    {
      try {
        MarkovFunctionalPtr_calibrate__SWIG_0(arg1,(std::vector< boost::shared_ptr< CalibrationHelper > > const &)*arg2,*arg3,(EndCriteria const &)*arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_MarkovFunctional_calibrate) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_MarkovFunctionalPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< CalibrationHelper > >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CalibrationHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< CalibrationHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_CalibrationHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_OptimizationMethod, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_EndCriteria, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_MarkovFunctionalPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< CalibrationHelper > >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CalibrationHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< CalibrationHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_CalibrationHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_OptimizationMethod, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_EndCriteria, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Constraint, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_MarkovFunctionalPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< CalibrationHelper > >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CalibrationHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< CalibrationHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_CalibrationHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_OptimizationMethod, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_EndCriteria, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Constraint, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(5),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(5))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(5));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_MarkovFunctionalPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< CalibrationHelper > >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CalibrationHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< CalibrationHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_CalibrationHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_OptimizationMethod, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_EndCriteria, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Constraint, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(5),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(5))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(5));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< bool >* v;
            if (SWIG_ConvertPtr(ST(6),(void **) &v, 
                SWIGTYPE_p_std__vectorT_bool_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(6))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(6));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_MarkovFunctional_calibrate__SWIG_3); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_MarkovFunctional_calibrate__SWIG_2); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_MarkovFunctional_calibrate__SWIG_1); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_MarkovFunctional_calibrate__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'MarkovFunctional_calibrate'");
  XSRETURN(0);
}


XS(_wrap_MarkovFunctional_volatility) {
  {
    MarkovFunctionalPtr *arg1 = (MarkovFunctionalPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Array *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MarkovFunctional_volatility(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_MarkovFunctionalPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MarkovFunctional_volatility" "', argument " "1"" of type '" "MarkovFunctionalPtr const *""'"); 
    }
    arg1 = reinterpret_cast< MarkovFunctionalPtr * >(argp1);
    {
      try {
        result = (Array *) &MarkovFunctionalPtr_volatility((MarkovFunctionalPtr const *)arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Array, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_MarkovFunctional) {
  {
    MarkovFunctionalPtr *arg1 = (MarkovFunctionalPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_MarkovFunctional(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_MarkovFunctionalPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MarkovFunctional" "', argument " "1"" of type '" "MarkovFunctionalPtr *""'"); 
    }
    arg1 = reinterpret_cast< MarkovFunctionalPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Gaussian1dSwaptionEngine__SWIG_0) {
  {
    boost::shared_ptr< Gaussian1dModel > *arg1 = 0 ;
    int arg2 ;
    Real arg3 ;
    bool arg4 ;
    bool arg5 ;
    Handle< YieldTermStructure > *arg6 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    bool val5 ;
    int ecode5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    int argvi = 0;
    Gaussian1dSwaptionEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_Gaussian1dSwaptionEngine(model,integrationPoints,stddevs,extrapolatePayoff,flatPayoffExtrapolation,discountCurve);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Gaussian1dSwaptionEngine" "', argument " "1"" of type '" "boost::shared_ptr< Gaussian1dModel > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Gaussian1dSwaptionEngine" "', argument " "1"" of type '" "boost::shared_ptr< Gaussian1dModel > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Gaussian1dModel > * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Gaussian1dSwaptionEngine" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Gaussian1dSwaptionEngine" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_Gaussian1dSwaptionEngine" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_Gaussian1dSwaptionEngine" "', argument " "5"" of type '" "bool""'");
    } 
    arg5 = static_cast< bool >(val5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_Gaussian1dSwaptionEngine" "', argument " "6"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Gaussian1dSwaptionEngine" "', argument " "6"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg6 = reinterpret_cast< Handle< YieldTermStructure > * >(argp6);
    {
      try {
        result = (Gaussian1dSwaptionEnginePtr *)new_Gaussian1dSwaptionEnginePtr__SWIG_0((boost::shared_ptr< Gaussian1dModel > const &)*arg1,arg2,arg3,arg4,arg5,(Handle< YieldTermStructure > const &)*arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Gaussian1dSwaptionEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Gaussian1dSwaptionEngine__SWIG_1) {
  {
    boost::shared_ptr< Gaussian1dModel > *arg1 = 0 ;
    int arg2 ;
    Real arg3 ;
    bool arg4 ;
    bool arg5 ;
    void *argp1 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    bool val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    Gaussian1dSwaptionEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_Gaussian1dSwaptionEngine(model,integrationPoints,stddevs,extrapolatePayoff,flatPayoffExtrapolation);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Gaussian1dSwaptionEngine" "', argument " "1"" of type '" "boost::shared_ptr< Gaussian1dModel > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Gaussian1dSwaptionEngine" "', argument " "1"" of type '" "boost::shared_ptr< Gaussian1dModel > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Gaussian1dModel > * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Gaussian1dSwaptionEngine" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Gaussian1dSwaptionEngine" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_Gaussian1dSwaptionEngine" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_Gaussian1dSwaptionEngine" "', argument " "5"" of type '" "bool""'");
    } 
    arg5 = static_cast< bool >(val5);
    {
      try {
        result = (Gaussian1dSwaptionEnginePtr *)new_Gaussian1dSwaptionEnginePtr__SWIG_0((boost::shared_ptr< Gaussian1dModel > const &)*arg1,arg2,arg3,arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Gaussian1dSwaptionEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Gaussian1dSwaptionEngine__SWIG_2) {
  {
    boost::shared_ptr< Gaussian1dModel > *arg1 = 0 ;
    int arg2 ;
    Real arg3 ;
    bool arg4 ;
    void *argp1 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Gaussian1dSwaptionEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_Gaussian1dSwaptionEngine(model,integrationPoints,stddevs,extrapolatePayoff);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Gaussian1dSwaptionEngine" "', argument " "1"" of type '" "boost::shared_ptr< Gaussian1dModel > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Gaussian1dSwaptionEngine" "', argument " "1"" of type '" "boost::shared_ptr< Gaussian1dModel > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Gaussian1dModel > * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Gaussian1dSwaptionEngine" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Gaussian1dSwaptionEngine" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_Gaussian1dSwaptionEngine" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    {
      try {
        result = (Gaussian1dSwaptionEnginePtr *)new_Gaussian1dSwaptionEnginePtr__SWIG_0((boost::shared_ptr< Gaussian1dModel > const &)*arg1,arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Gaussian1dSwaptionEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Gaussian1dSwaptionEngine__SWIG_3) {
  {
    boost::shared_ptr< Gaussian1dModel > *arg1 = 0 ;
    int arg2 ;
    Real arg3 ;
    void *argp1 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Gaussian1dSwaptionEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_Gaussian1dSwaptionEngine(model,integrationPoints,stddevs);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Gaussian1dSwaptionEngine" "', argument " "1"" of type '" "boost::shared_ptr< Gaussian1dModel > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Gaussian1dSwaptionEngine" "', argument " "1"" of type '" "boost::shared_ptr< Gaussian1dModel > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Gaussian1dModel > * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Gaussian1dSwaptionEngine" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Gaussian1dSwaptionEngine" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    {
      try {
        result = (Gaussian1dSwaptionEnginePtr *)new_Gaussian1dSwaptionEnginePtr__SWIG_0((boost::shared_ptr< Gaussian1dModel > const &)*arg1,arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Gaussian1dSwaptionEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Gaussian1dSwaptionEngine__SWIG_4) {
  {
    boost::shared_ptr< Gaussian1dModel > *arg1 = 0 ;
    int arg2 ;
    void *argp1 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Gaussian1dSwaptionEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_Gaussian1dSwaptionEngine(model,integrationPoints);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Gaussian1dSwaptionEngine" "', argument " "1"" of type '" "boost::shared_ptr< Gaussian1dModel > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Gaussian1dSwaptionEngine" "', argument " "1"" of type '" "boost::shared_ptr< Gaussian1dModel > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Gaussian1dModel > * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Gaussian1dSwaptionEngine" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    {
      try {
        result = (Gaussian1dSwaptionEnginePtr *)new_Gaussian1dSwaptionEnginePtr__SWIG_0((boost::shared_ptr< Gaussian1dModel > const &)*arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Gaussian1dSwaptionEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Gaussian1dSwaptionEngine__SWIG_5) {
  {
    boost::shared_ptr< Gaussian1dModel > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Gaussian1dSwaptionEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Gaussian1dSwaptionEngine(model);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Gaussian1dSwaptionEngine" "', argument " "1"" of type '" "boost::shared_ptr< Gaussian1dModel > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Gaussian1dSwaptionEngine" "', argument " "1"" of type '" "boost::shared_ptr< Gaussian1dModel > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Gaussian1dModel > * >(argp1);
    {
      try {
        result = (Gaussian1dSwaptionEnginePtr *)new_Gaussian1dSwaptionEnginePtr__SWIG_0((boost::shared_ptr< Gaussian1dModel > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Gaussian1dSwaptionEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Gaussian1dSwaptionEngine) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Gaussian1dSwaptionEngine__SWIG_5); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Gaussian1dSwaptionEngine__SWIG_4); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Gaussian1dSwaptionEngine__SWIG_3); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Gaussian1dSwaptionEngine__SWIG_2); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Gaussian1dSwaptionEngine__SWIG_1); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Gaussian1dSwaptionEngine__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Gaussian1dSwaptionEngine'");
  XSRETURN(0);
}


XS(_wrap_delete_Gaussian1dSwaptionEngine) {
  {
    Gaussian1dSwaptionEnginePtr *arg1 = (Gaussian1dSwaptionEnginePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Gaussian1dSwaptionEngine(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Gaussian1dSwaptionEnginePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Gaussian1dSwaptionEngine" "', argument " "1"" of type '" "Gaussian1dSwaptionEnginePtr *""'"); 
    }
    arg1 = reinterpret_cast< Gaussian1dSwaptionEnginePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Gaussian1dJamshidianSwaptionEngine) {
  {
    boost::shared_ptr< Gaussian1dModel > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Gaussian1dJamshidianSwaptionEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Gaussian1dJamshidianSwaptionEngine(model);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Gaussian1dJamshidianSwaptionEngine" "', argument " "1"" of type '" "boost::shared_ptr< Gaussian1dModel > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Gaussian1dJamshidianSwaptionEngine" "', argument " "1"" of type '" "boost::shared_ptr< Gaussian1dModel > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Gaussian1dModel > * >(argp1);
    {
      try {
        result = (Gaussian1dJamshidianSwaptionEnginePtr *)new_Gaussian1dJamshidianSwaptionEnginePtr((boost::shared_ptr< Gaussian1dModel > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Gaussian1dJamshidianSwaptionEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_Gaussian1dJamshidianSwaptionEngine) {
  {
    Gaussian1dJamshidianSwaptionEnginePtr *arg1 = (Gaussian1dJamshidianSwaptionEnginePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Gaussian1dJamshidianSwaptionEngine(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Gaussian1dJamshidianSwaptionEnginePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Gaussian1dJamshidianSwaptionEngine" "', argument " "1"" of type '" "Gaussian1dJamshidianSwaptionEnginePtr *""'"); 
    }
    arg1 = reinterpret_cast< Gaussian1dJamshidianSwaptionEnginePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Gaussian1dNonstandardSwaptionEngine__SWIG_0) {
  {
    boost::shared_ptr< Gaussian1dModel > *arg1 = 0 ;
    int arg2 ;
    Real arg3 ;
    bool arg4 ;
    bool arg5 ;
    Handle< Quote > *arg6 = 0 ;
    Handle< YieldTermStructure > *arg7 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    bool val5 ;
    int ecode5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    int argvi = 0;
    Gaussian1dNonstandardSwaptionEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: new_Gaussian1dNonstandardSwaptionEngine(model,integrationPoints,stddevs,extrapolatePayoff,flatPayoffExtrapolation,oas,discountCurve);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Gaussian1dNonstandardSwaptionEngine" "', argument " "1"" of type '" "boost::shared_ptr< Gaussian1dModel > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Gaussian1dNonstandardSwaptionEngine" "', argument " "1"" of type '" "boost::shared_ptr< Gaussian1dModel > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Gaussian1dModel > * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Gaussian1dNonstandardSwaptionEngine" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Gaussian1dNonstandardSwaptionEngine" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_Gaussian1dNonstandardSwaptionEngine" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_Gaussian1dNonstandardSwaptionEngine" "', argument " "5"" of type '" "bool""'");
    } 
    arg5 = static_cast< bool >(val5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_Gaussian1dNonstandardSwaptionEngine" "', argument " "6"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Gaussian1dNonstandardSwaptionEngine" "', argument " "6"" of type '" "Handle< Quote > const &""'"); 
    }
    arg6 = reinterpret_cast< Handle< Quote > * >(argp6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_Gaussian1dNonstandardSwaptionEngine" "', argument " "7"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Gaussian1dNonstandardSwaptionEngine" "', argument " "7"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg7 = reinterpret_cast< Handle< YieldTermStructure > * >(argp7);
    {
      try {
        result = (Gaussian1dNonstandardSwaptionEnginePtr *)new_Gaussian1dNonstandardSwaptionEnginePtr__SWIG_0((boost::shared_ptr< Gaussian1dModel > const &)*arg1,arg2,arg3,arg4,arg5,(Handle< Quote > const &)*arg6,(Handle< YieldTermStructure > const &)*arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Gaussian1dNonstandardSwaptionEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Gaussian1dNonstandardSwaptionEngine__SWIG_1) {
  {
    boost::shared_ptr< Gaussian1dModel > *arg1 = 0 ;
    int arg2 ;
    Real arg3 ;
    bool arg4 ;
    bool arg5 ;
    Handle< Quote > *arg6 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    bool val5 ;
    int ecode5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    int argvi = 0;
    Gaussian1dNonstandardSwaptionEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_Gaussian1dNonstandardSwaptionEngine(model,integrationPoints,stddevs,extrapolatePayoff,flatPayoffExtrapolation,oas);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Gaussian1dNonstandardSwaptionEngine" "', argument " "1"" of type '" "boost::shared_ptr< Gaussian1dModel > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Gaussian1dNonstandardSwaptionEngine" "', argument " "1"" of type '" "boost::shared_ptr< Gaussian1dModel > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Gaussian1dModel > * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Gaussian1dNonstandardSwaptionEngine" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Gaussian1dNonstandardSwaptionEngine" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_Gaussian1dNonstandardSwaptionEngine" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_Gaussian1dNonstandardSwaptionEngine" "', argument " "5"" of type '" "bool""'");
    } 
    arg5 = static_cast< bool >(val5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_Gaussian1dNonstandardSwaptionEngine" "', argument " "6"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Gaussian1dNonstandardSwaptionEngine" "', argument " "6"" of type '" "Handle< Quote > const &""'"); 
    }
    arg6 = reinterpret_cast< Handle< Quote > * >(argp6);
    {
      try {
        result = (Gaussian1dNonstandardSwaptionEnginePtr *)new_Gaussian1dNonstandardSwaptionEnginePtr__SWIG_0((boost::shared_ptr< Gaussian1dModel > const &)*arg1,arg2,arg3,arg4,arg5,(Handle< Quote > const &)*arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Gaussian1dNonstandardSwaptionEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Gaussian1dNonstandardSwaptionEngine__SWIG_2) {
  {
    boost::shared_ptr< Gaussian1dModel > *arg1 = 0 ;
    int arg2 ;
    Real arg3 ;
    bool arg4 ;
    bool arg5 ;
    void *argp1 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    bool val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    Gaussian1dNonstandardSwaptionEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_Gaussian1dNonstandardSwaptionEngine(model,integrationPoints,stddevs,extrapolatePayoff,flatPayoffExtrapolation);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Gaussian1dNonstandardSwaptionEngine" "', argument " "1"" of type '" "boost::shared_ptr< Gaussian1dModel > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Gaussian1dNonstandardSwaptionEngine" "', argument " "1"" of type '" "boost::shared_ptr< Gaussian1dModel > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Gaussian1dModel > * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Gaussian1dNonstandardSwaptionEngine" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Gaussian1dNonstandardSwaptionEngine" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_Gaussian1dNonstandardSwaptionEngine" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_Gaussian1dNonstandardSwaptionEngine" "', argument " "5"" of type '" "bool""'");
    } 
    arg5 = static_cast< bool >(val5);
    {
      try {
        result = (Gaussian1dNonstandardSwaptionEnginePtr *)new_Gaussian1dNonstandardSwaptionEnginePtr__SWIG_0((boost::shared_ptr< Gaussian1dModel > const &)*arg1,arg2,arg3,arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Gaussian1dNonstandardSwaptionEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Gaussian1dNonstandardSwaptionEngine__SWIG_3) {
  {
    boost::shared_ptr< Gaussian1dModel > *arg1 = 0 ;
    int arg2 ;
    Real arg3 ;
    bool arg4 ;
    void *argp1 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Gaussian1dNonstandardSwaptionEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_Gaussian1dNonstandardSwaptionEngine(model,integrationPoints,stddevs,extrapolatePayoff);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Gaussian1dNonstandardSwaptionEngine" "', argument " "1"" of type '" "boost::shared_ptr< Gaussian1dModel > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Gaussian1dNonstandardSwaptionEngine" "', argument " "1"" of type '" "boost::shared_ptr< Gaussian1dModel > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Gaussian1dModel > * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Gaussian1dNonstandardSwaptionEngine" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Gaussian1dNonstandardSwaptionEngine" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_Gaussian1dNonstandardSwaptionEngine" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    {
      try {
        result = (Gaussian1dNonstandardSwaptionEnginePtr *)new_Gaussian1dNonstandardSwaptionEnginePtr__SWIG_0((boost::shared_ptr< Gaussian1dModel > const &)*arg1,arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Gaussian1dNonstandardSwaptionEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Gaussian1dNonstandardSwaptionEngine__SWIG_4) {
  {
    boost::shared_ptr< Gaussian1dModel > *arg1 = 0 ;
    int arg2 ;
    Real arg3 ;
    void *argp1 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Gaussian1dNonstandardSwaptionEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_Gaussian1dNonstandardSwaptionEngine(model,integrationPoints,stddevs);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Gaussian1dNonstandardSwaptionEngine" "', argument " "1"" of type '" "boost::shared_ptr< Gaussian1dModel > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Gaussian1dNonstandardSwaptionEngine" "', argument " "1"" of type '" "boost::shared_ptr< Gaussian1dModel > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Gaussian1dModel > * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Gaussian1dNonstandardSwaptionEngine" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Gaussian1dNonstandardSwaptionEngine" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    {
      try {
        result = (Gaussian1dNonstandardSwaptionEnginePtr *)new_Gaussian1dNonstandardSwaptionEnginePtr__SWIG_0((boost::shared_ptr< Gaussian1dModel > const &)*arg1,arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Gaussian1dNonstandardSwaptionEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Gaussian1dNonstandardSwaptionEngine__SWIG_5) {
  {
    boost::shared_ptr< Gaussian1dModel > *arg1 = 0 ;
    int arg2 ;
    void *argp1 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Gaussian1dNonstandardSwaptionEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_Gaussian1dNonstandardSwaptionEngine(model,integrationPoints);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Gaussian1dNonstandardSwaptionEngine" "', argument " "1"" of type '" "boost::shared_ptr< Gaussian1dModel > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Gaussian1dNonstandardSwaptionEngine" "', argument " "1"" of type '" "boost::shared_ptr< Gaussian1dModel > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Gaussian1dModel > * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Gaussian1dNonstandardSwaptionEngine" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    {
      try {
        result = (Gaussian1dNonstandardSwaptionEnginePtr *)new_Gaussian1dNonstandardSwaptionEnginePtr__SWIG_0((boost::shared_ptr< Gaussian1dModel > const &)*arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Gaussian1dNonstandardSwaptionEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Gaussian1dNonstandardSwaptionEngine__SWIG_6) {
  {
    boost::shared_ptr< Gaussian1dModel > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Gaussian1dNonstandardSwaptionEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Gaussian1dNonstandardSwaptionEngine(model);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Gaussian1dNonstandardSwaptionEngine" "', argument " "1"" of type '" "boost::shared_ptr< Gaussian1dModel > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Gaussian1dNonstandardSwaptionEngine" "', argument " "1"" of type '" "boost::shared_ptr< Gaussian1dModel > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Gaussian1dModel > * >(argp1);
    {
      try {
        result = (Gaussian1dNonstandardSwaptionEnginePtr *)new_Gaussian1dNonstandardSwaptionEnginePtr__SWIG_0((boost::shared_ptr< Gaussian1dModel > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Gaussian1dNonstandardSwaptionEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Gaussian1dNonstandardSwaptionEngine) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 7;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_7:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Gaussian1dNonstandardSwaptionEngine__SWIG_6); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Gaussian1dNonstandardSwaptionEngine__SWIG_5); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Gaussian1dNonstandardSwaptionEngine__SWIG_4); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Gaussian1dNonstandardSwaptionEngine__SWIG_3); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Gaussian1dNonstandardSwaptionEngine__SWIG_2); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Gaussian1dNonstandardSwaptionEngine__SWIG_1); return;
    case 7:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Gaussian1dNonstandardSwaptionEngine__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Gaussian1dNonstandardSwaptionEngine'");
  XSRETURN(0);
}


XS(_wrap_delete_Gaussian1dNonstandardSwaptionEngine) {
  {
    Gaussian1dNonstandardSwaptionEnginePtr *arg1 = (Gaussian1dNonstandardSwaptionEnginePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Gaussian1dNonstandardSwaptionEngine(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Gaussian1dNonstandardSwaptionEnginePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Gaussian1dNonstandardSwaptionEngine" "', argument " "1"" of type '" "Gaussian1dNonstandardSwaptionEnginePtr *""'"); 
    }
    arg1 = reinterpret_cast< Gaussian1dNonstandardSwaptionEnginePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Gaussian1dFloatFloatSwaptionEngine__SWIG_0) {
  {
    boost::shared_ptr< Gaussian1dModel > *arg1 = 0 ;
    int arg2 ;
    Real arg3 ;
    bool arg4 ;
    bool arg5 ;
    Handle< Quote > *arg6 = 0 ;
    Handle< YieldTermStructure > *arg7 = 0 ;
    bool arg8 ;
    Gaussian1dFloatFloatSwaptionEngine::Probabilities arg9 ;
    void *argp1 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    bool val5 ;
    int ecode5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    bool val8 ;
    int ecode8 = 0 ;
    int val9 ;
    int ecode9 = 0 ;
    int argvi = 0;
    Gaussian1dFloatFloatSwaptionEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 9) || (items > 9)) {
      SWIG_croak("Usage: new_Gaussian1dFloatFloatSwaptionEngine(model,integrationPoints,stddevs,extrapolatePayoff,flatPayoffExtrapolation,oas,discountCurve,includeTodaysExercise,probabilities);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Gaussian1dFloatFloatSwaptionEngine" "', argument " "1"" of type '" "boost::shared_ptr< Gaussian1dModel > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Gaussian1dFloatFloatSwaptionEngine" "', argument " "1"" of type '" "boost::shared_ptr< Gaussian1dModel > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Gaussian1dModel > * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Gaussian1dFloatFloatSwaptionEngine" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Gaussian1dFloatFloatSwaptionEngine" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_Gaussian1dFloatFloatSwaptionEngine" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_Gaussian1dFloatFloatSwaptionEngine" "', argument " "5"" of type '" "bool""'");
    } 
    arg5 = static_cast< bool >(val5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_Gaussian1dFloatFloatSwaptionEngine" "', argument " "6"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Gaussian1dFloatFloatSwaptionEngine" "', argument " "6"" of type '" "Handle< Quote > const &""'"); 
    }
    arg6 = reinterpret_cast< Handle< Quote > * >(argp6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_Gaussian1dFloatFloatSwaptionEngine" "', argument " "7"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Gaussian1dFloatFloatSwaptionEngine" "', argument " "7"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg7 = reinterpret_cast< Handle< YieldTermStructure > * >(argp7);
    ecode8 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_Gaussian1dFloatFloatSwaptionEngine" "', argument " "8"" of type '" "bool""'");
    } 
    arg8 = static_cast< bool >(val8);
    ecode9 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(8), &val9);
    if (!SWIG_IsOK(ecode9)) {
      SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "new_Gaussian1dFloatFloatSwaptionEngine" "', argument " "9"" of type '" "Gaussian1dFloatFloatSwaptionEngine::Probabilities""'");
    } 
    arg9 = static_cast< Gaussian1dFloatFloatSwaptionEngine::Probabilities >(val9);
    {
      try {
        result = (Gaussian1dFloatFloatSwaptionEnginePtr *)new_Gaussian1dFloatFloatSwaptionEnginePtr__SWIG_0((boost::shared_ptr< Gaussian1dModel > const &)*arg1,arg2,arg3,arg4,arg5,(Handle< Quote > const &)*arg6,(Handle< YieldTermStructure > const &)*arg7,arg8,arg9);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Gaussian1dFloatFloatSwaptionEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Gaussian1dFloatFloatSwaptionEngine__SWIG_1) {
  {
    boost::shared_ptr< Gaussian1dModel > *arg1 = 0 ;
    int arg2 ;
    Real arg3 ;
    bool arg4 ;
    bool arg5 ;
    Handle< Quote > *arg6 = 0 ;
    Handle< YieldTermStructure > *arg7 = 0 ;
    bool arg8 ;
    void *argp1 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    bool val5 ;
    int ecode5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    bool val8 ;
    int ecode8 = 0 ;
    int argvi = 0;
    Gaussian1dFloatFloatSwaptionEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 8) || (items > 8)) {
      SWIG_croak("Usage: new_Gaussian1dFloatFloatSwaptionEngine(model,integrationPoints,stddevs,extrapolatePayoff,flatPayoffExtrapolation,oas,discountCurve,includeTodaysExercise);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Gaussian1dFloatFloatSwaptionEngine" "', argument " "1"" of type '" "boost::shared_ptr< Gaussian1dModel > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Gaussian1dFloatFloatSwaptionEngine" "', argument " "1"" of type '" "boost::shared_ptr< Gaussian1dModel > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Gaussian1dModel > * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Gaussian1dFloatFloatSwaptionEngine" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Gaussian1dFloatFloatSwaptionEngine" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_Gaussian1dFloatFloatSwaptionEngine" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_Gaussian1dFloatFloatSwaptionEngine" "', argument " "5"" of type '" "bool""'");
    } 
    arg5 = static_cast< bool >(val5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_Gaussian1dFloatFloatSwaptionEngine" "', argument " "6"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Gaussian1dFloatFloatSwaptionEngine" "', argument " "6"" of type '" "Handle< Quote > const &""'"); 
    }
    arg6 = reinterpret_cast< Handle< Quote > * >(argp6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_Gaussian1dFloatFloatSwaptionEngine" "', argument " "7"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Gaussian1dFloatFloatSwaptionEngine" "', argument " "7"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg7 = reinterpret_cast< Handle< YieldTermStructure > * >(argp7);
    ecode8 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_Gaussian1dFloatFloatSwaptionEngine" "', argument " "8"" of type '" "bool""'");
    } 
    arg8 = static_cast< bool >(val8);
    {
      try {
        result = (Gaussian1dFloatFloatSwaptionEnginePtr *)new_Gaussian1dFloatFloatSwaptionEnginePtr__SWIG_0((boost::shared_ptr< Gaussian1dModel > const &)*arg1,arg2,arg3,arg4,arg5,(Handle< Quote > const &)*arg6,(Handle< YieldTermStructure > const &)*arg7,arg8);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Gaussian1dFloatFloatSwaptionEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Gaussian1dFloatFloatSwaptionEngine__SWIG_2) {
  {
    boost::shared_ptr< Gaussian1dModel > *arg1 = 0 ;
    int arg2 ;
    Real arg3 ;
    bool arg4 ;
    bool arg5 ;
    Handle< Quote > *arg6 = 0 ;
    Handle< YieldTermStructure > *arg7 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    bool val5 ;
    int ecode5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    int argvi = 0;
    Gaussian1dFloatFloatSwaptionEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: new_Gaussian1dFloatFloatSwaptionEngine(model,integrationPoints,stddevs,extrapolatePayoff,flatPayoffExtrapolation,oas,discountCurve);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Gaussian1dFloatFloatSwaptionEngine" "', argument " "1"" of type '" "boost::shared_ptr< Gaussian1dModel > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Gaussian1dFloatFloatSwaptionEngine" "', argument " "1"" of type '" "boost::shared_ptr< Gaussian1dModel > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Gaussian1dModel > * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Gaussian1dFloatFloatSwaptionEngine" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Gaussian1dFloatFloatSwaptionEngine" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_Gaussian1dFloatFloatSwaptionEngine" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_Gaussian1dFloatFloatSwaptionEngine" "', argument " "5"" of type '" "bool""'");
    } 
    arg5 = static_cast< bool >(val5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_Gaussian1dFloatFloatSwaptionEngine" "', argument " "6"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Gaussian1dFloatFloatSwaptionEngine" "', argument " "6"" of type '" "Handle< Quote > const &""'"); 
    }
    arg6 = reinterpret_cast< Handle< Quote > * >(argp6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_Gaussian1dFloatFloatSwaptionEngine" "', argument " "7"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Gaussian1dFloatFloatSwaptionEngine" "', argument " "7"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg7 = reinterpret_cast< Handle< YieldTermStructure > * >(argp7);
    {
      try {
        result = (Gaussian1dFloatFloatSwaptionEnginePtr *)new_Gaussian1dFloatFloatSwaptionEnginePtr__SWIG_0((boost::shared_ptr< Gaussian1dModel > const &)*arg1,arg2,arg3,arg4,arg5,(Handle< Quote > const &)*arg6,(Handle< YieldTermStructure > const &)*arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Gaussian1dFloatFloatSwaptionEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Gaussian1dFloatFloatSwaptionEngine__SWIG_3) {
  {
    boost::shared_ptr< Gaussian1dModel > *arg1 = 0 ;
    int arg2 ;
    Real arg3 ;
    bool arg4 ;
    bool arg5 ;
    Handle< Quote > *arg6 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    bool val5 ;
    int ecode5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    int argvi = 0;
    Gaussian1dFloatFloatSwaptionEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_Gaussian1dFloatFloatSwaptionEngine(model,integrationPoints,stddevs,extrapolatePayoff,flatPayoffExtrapolation,oas);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Gaussian1dFloatFloatSwaptionEngine" "', argument " "1"" of type '" "boost::shared_ptr< Gaussian1dModel > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Gaussian1dFloatFloatSwaptionEngine" "', argument " "1"" of type '" "boost::shared_ptr< Gaussian1dModel > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Gaussian1dModel > * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Gaussian1dFloatFloatSwaptionEngine" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Gaussian1dFloatFloatSwaptionEngine" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_Gaussian1dFloatFloatSwaptionEngine" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_Gaussian1dFloatFloatSwaptionEngine" "', argument " "5"" of type '" "bool""'");
    } 
    arg5 = static_cast< bool >(val5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_Gaussian1dFloatFloatSwaptionEngine" "', argument " "6"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Gaussian1dFloatFloatSwaptionEngine" "', argument " "6"" of type '" "Handle< Quote > const &""'"); 
    }
    arg6 = reinterpret_cast< Handle< Quote > * >(argp6);
    {
      try {
        result = (Gaussian1dFloatFloatSwaptionEnginePtr *)new_Gaussian1dFloatFloatSwaptionEnginePtr__SWIG_0((boost::shared_ptr< Gaussian1dModel > const &)*arg1,arg2,arg3,arg4,arg5,(Handle< Quote > const &)*arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Gaussian1dFloatFloatSwaptionEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Gaussian1dFloatFloatSwaptionEngine__SWIG_4) {
  {
    boost::shared_ptr< Gaussian1dModel > *arg1 = 0 ;
    int arg2 ;
    Real arg3 ;
    bool arg4 ;
    bool arg5 ;
    void *argp1 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    bool val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    Gaussian1dFloatFloatSwaptionEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_Gaussian1dFloatFloatSwaptionEngine(model,integrationPoints,stddevs,extrapolatePayoff,flatPayoffExtrapolation);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Gaussian1dFloatFloatSwaptionEngine" "', argument " "1"" of type '" "boost::shared_ptr< Gaussian1dModel > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Gaussian1dFloatFloatSwaptionEngine" "', argument " "1"" of type '" "boost::shared_ptr< Gaussian1dModel > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Gaussian1dModel > * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Gaussian1dFloatFloatSwaptionEngine" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Gaussian1dFloatFloatSwaptionEngine" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_Gaussian1dFloatFloatSwaptionEngine" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_Gaussian1dFloatFloatSwaptionEngine" "', argument " "5"" of type '" "bool""'");
    } 
    arg5 = static_cast< bool >(val5);
    {
      try {
        result = (Gaussian1dFloatFloatSwaptionEnginePtr *)new_Gaussian1dFloatFloatSwaptionEnginePtr__SWIG_0((boost::shared_ptr< Gaussian1dModel > const &)*arg1,arg2,arg3,arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Gaussian1dFloatFloatSwaptionEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Gaussian1dFloatFloatSwaptionEngine__SWIG_5) {
  {
    boost::shared_ptr< Gaussian1dModel > *arg1 = 0 ;
    int arg2 ;
    Real arg3 ;
    bool arg4 ;
    void *argp1 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Gaussian1dFloatFloatSwaptionEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_Gaussian1dFloatFloatSwaptionEngine(model,integrationPoints,stddevs,extrapolatePayoff);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Gaussian1dFloatFloatSwaptionEngine" "', argument " "1"" of type '" "boost::shared_ptr< Gaussian1dModel > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Gaussian1dFloatFloatSwaptionEngine" "', argument " "1"" of type '" "boost::shared_ptr< Gaussian1dModel > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Gaussian1dModel > * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Gaussian1dFloatFloatSwaptionEngine" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Gaussian1dFloatFloatSwaptionEngine" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_Gaussian1dFloatFloatSwaptionEngine" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    {
      try {
        result = (Gaussian1dFloatFloatSwaptionEnginePtr *)new_Gaussian1dFloatFloatSwaptionEnginePtr__SWIG_0((boost::shared_ptr< Gaussian1dModel > const &)*arg1,arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Gaussian1dFloatFloatSwaptionEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Gaussian1dFloatFloatSwaptionEngine__SWIG_6) {
  {
    boost::shared_ptr< Gaussian1dModel > *arg1 = 0 ;
    int arg2 ;
    Real arg3 ;
    void *argp1 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Gaussian1dFloatFloatSwaptionEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_Gaussian1dFloatFloatSwaptionEngine(model,integrationPoints,stddevs);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Gaussian1dFloatFloatSwaptionEngine" "', argument " "1"" of type '" "boost::shared_ptr< Gaussian1dModel > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Gaussian1dFloatFloatSwaptionEngine" "', argument " "1"" of type '" "boost::shared_ptr< Gaussian1dModel > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Gaussian1dModel > * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Gaussian1dFloatFloatSwaptionEngine" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Gaussian1dFloatFloatSwaptionEngine" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    {
      try {
        result = (Gaussian1dFloatFloatSwaptionEnginePtr *)new_Gaussian1dFloatFloatSwaptionEnginePtr__SWIG_0((boost::shared_ptr< Gaussian1dModel > const &)*arg1,arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Gaussian1dFloatFloatSwaptionEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Gaussian1dFloatFloatSwaptionEngine__SWIG_7) {
  {
    boost::shared_ptr< Gaussian1dModel > *arg1 = 0 ;
    int arg2 ;
    void *argp1 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Gaussian1dFloatFloatSwaptionEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_Gaussian1dFloatFloatSwaptionEngine(model,integrationPoints);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Gaussian1dFloatFloatSwaptionEngine" "', argument " "1"" of type '" "boost::shared_ptr< Gaussian1dModel > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Gaussian1dFloatFloatSwaptionEngine" "', argument " "1"" of type '" "boost::shared_ptr< Gaussian1dModel > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Gaussian1dModel > * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Gaussian1dFloatFloatSwaptionEngine" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    {
      try {
        result = (Gaussian1dFloatFloatSwaptionEnginePtr *)new_Gaussian1dFloatFloatSwaptionEnginePtr__SWIG_0((boost::shared_ptr< Gaussian1dModel > const &)*arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Gaussian1dFloatFloatSwaptionEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Gaussian1dFloatFloatSwaptionEngine__SWIG_8) {
  {
    boost::shared_ptr< Gaussian1dModel > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Gaussian1dFloatFloatSwaptionEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Gaussian1dFloatFloatSwaptionEngine(model);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Gaussian1dFloatFloatSwaptionEngine" "', argument " "1"" of type '" "boost::shared_ptr< Gaussian1dModel > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Gaussian1dFloatFloatSwaptionEngine" "', argument " "1"" of type '" "boost::shared_ptr< Gaussian1dModel > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< Gaussian1dModel > * >(argp1);
    {
      try {
        result = (Gaussian1dFloatFloatSwaptionEnginePtr *)new_Gaussian1dFloatFloatSwaptionEnginePtr__SWIG_0((boost::shared_ptr< Gaussian1dModel > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Gaussian1dFloatFloatSwaptionEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Gaussian1dFloatFloatSwaptionEngine) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 7;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_7:
    
    if (items == 8) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 8;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_8:
    
    if (items == 9) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(8), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 9;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_9:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Gaussian1dFloatFloatSwaptionEngine__SWIG_8); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Gaussian1dFloatFloatSwaptionEngine__SWIG_7); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Gaussian1dFloatFloatSwaptionEngine__SWIG_6); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Gaussian1dFloatFloatSwaptionEngine__SWIG_5); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Gaussian1dFloatFloatSwaptionEngine__SWIG_4); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Gaussian1dFloatFloatSwaptionEngine__SWIG_3); return;
    case 7:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Gaussian1dFloatFloatSwaptionEngine__SWIG_2); return;
    case 8:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Gaussian1dFloatFloatSwaptionEngine__SWIG_1); return;
    case 9:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Gaussian1dFloatFloatSwaptionEngine__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Gaussian1dFloatFloatSwaptionEngine'");
  XSRETURN(0);
}


XS(_wrap_delete_Gaussian1dFloatFloatSwaptionEngine) {
  {
    Gaussian1dFloatFloatSwaptionEnginePtr *arg1 = (Gaussian1dFloatFloatSwaptionEnginePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Gaussian1dFloatFloatSwaptionEngine(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Gaussian1dFloatFloatSwaptionEnginePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Gaussian1dFloatFloatSwaptionEngine" "', argument " "1"" of type '" "Gaussian1dFloatFloatSwaptionEnginePtr *""'"); 
    }
    arg1 = reinterpret_cast< Gaussian1dFloatFloatSwaptionEnginePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SegmentIntegral) {
  {
    Size arg1 ;
    size_t val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    SegmentIntegral *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_SegmentIntegral(intervals);");
    }
    ecode1 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_SegmentIntegral" "', argument " "1"" of type '" "Size""'");
    } 
    arg1 = static_cast< Size >(val1);
    {
      try {
        result = (SegmentIntegral *)new SegmentIntegral(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SegmentIntegral, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_SegmentIntegral) {
  {
    SegmentIntegral *arg1 = (SegmentIntegral *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_SegmentIntegral(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SegmentIntegral, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SegmentIntegral" "', argument " "1"" of type '" "SegmentIntegral *""'"); 
    }
    arg1 = reinterpret_cast< SegmentIntegral * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_TrapezoidIntegralDefault) {
  {
    Real arg1 ;
    Size arg2 ;
    double val1 ;
    int ecode1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    TrapezoidIntegral< Default > *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_TrapezoidIntegralDefault(accuracy,maxIterations);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_TrapezoidIntegralDefault" "', argument " "1"" of type '" "Real""'");
    } 
    arg1 = static_cast< Real >(val1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_TrapezoidIntegralDefault" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    {
      try {
        result = (TrapezoidIntegral< Default > *)new TrapezoidIntegral< Default >(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TrapezoidIntegralT_Default_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_TrapezoidIntegralDefault) {
  {
    TrapezoidIntegral< Default > *arg1 = (TrapezoidIntegral< Default > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_TrapezoidIntegralDefault(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_TrapezoidIntegralT_Default_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_TrapezoidIntegralDefault" "', argument " "1"" of type '" "TrapezoidIntegral< Default > *""'"); 
    }
    arg1 = reinterpret_cast< TrapezoidIntegral< Default > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_TrapezoidIntegralMidPoint) {
  {
    Real arg1 ;
    Size arg2 ;
    double val1 ;
    int ecode1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    TrapezoidIntegral< MidPoint > *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_TrapezoidIntegralMidPoint(accuracy,maxIterations);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_TrapezoidIntegralMidPoint" "', argument " "1"" of type '" "Real""'");
    } 
    arg1 = static_cast< Real >(val1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_TrapezoidIntegralMidPoint" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    {
      try {
        result = (TrapezoidIntegral< MidPoint > *)new TrapezoidIntegral< MidPoint >(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TrapezoidIntegralT_MidPoint_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_TrapezoidIntegralMidPoint) {
  {
    TrapezoidIntegral< MidPoint > *arg1 = (TrapezoidIntegral< MidPoint > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_TrapezoidIntegralMidPoint(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_TrapezoidIntegralT_MidPoint_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_TrapezoidIntegralMidPoint" "', argument " "1"" of type '" "TrapezoidIntegral< MidPoint > *""'"); 
    }
    arg1 = reinterpret_cast< TrapezoidIntegral< MidPoint > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SimpsonIntegral) {
  {
    Real arg1 ;
    Size arg2 ;
    double val1 ;
    int ecode1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    SimpsonIntegral *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_SimpsonIntegral(accuracy,maxIterations);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_SimpsonIntegral" "', argument " "1"" of type '" "Real""'");
    } 
    arg1 = static_cast< Real >(val1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_SimpsonIntegral" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    {
      try {
        result = (SimpsonIntegral *)new SimpsonIntegral(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SimpsonIntegral, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_SimpsonIntegral) {
  {
    SimpsonIntegral *arg1 = (SimpsonIntegral *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_SimpsonIntegral(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SimpsonIntegral, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SimpsonIntegral" "', argument " "1"" of type '" "SimpsonIntegral *""'"); 
    }
    arg1 = reinterpret_cast< SimpsonIntegral * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_GaussKronrodAdaptive__SWIG_0) {
  {
    Real arg1 ;
    Size arg2 ;
    double val1 ;
    int ecode1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    GaussKronrodAdaptive *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_GaussKronrodAdaptive(tolerance,maxFunctionEvaluations);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_GaussKronrodAdaptive" "', argument " "1"" of type '" "Real""'");
    } 
    arg1 = static_cast< Real >(val1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_GaussKronrodAdaptive" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    {
      try {
        result = (GaussKronrodAdaptive *)new GaussKronrodAdaptive(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GaussKronrodAdaptive, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_GaussKronrodAdaptive__SWIG_1) {
  {
    Real arg1 ;
    double val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    GaussKronrodAdaptive *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_GaussKronrodAdaptive(tolerance);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_GaussKronrodAdaptive" "', argument " "1"" of type '" "Real""'");
    } 
    arg1 = static_cast< Real >(val1);
    {
      try {
        result = (GaussKronrodAdaptive *)new GaussKronrodAdaptive(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GaussKronrodAdaptive, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_GaussKronrodAdaptive) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_GaussKronrodAdaptive__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_GaussKronrodAdaptive__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_GaussKronrodAdaptive'");
  XSRETURN(0);
}


XS(_wrap_delete_GaussKronrodAdaptive) {
  {
    GaussKronrodAdaptive *arg1 = (GaussKronrodAdaptive *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_GaussKronrodAdaptive(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GaussKronrodAdaptive, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GaussKronrodAdaptive" "', argument " "1"" of type '" "GaussKronrodAdaptive *""'"); 
    }
    arg1 = reinterpret_cast< GaussKronrodAdaptive * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_GaussKronrodNonAdaptive) {
  {
    Real arg1 ;
    Size arg2 ;
    Real arg3 ;
    double val1 ;
    int ecode1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    GaussKronrodNonAdaptive *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_GaussKronrodNonAdaptive(absoluteAccuracy,maxEvaluations,relativeAccuracy);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_GaussKronrodNonAdaptive" "', argument " "1"" of type '" "Real""'");
    } 
    arg1 = static_cast< Real >(val1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_GaussKronrodNonAdaptive" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_GaussKronrodNonAdaptive" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    {
      try {
        result = (GaussKronrodNonAdaptive *)new GaussKronrodNonAdaptive(arg1,arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GaussKronrodNonAdaptive, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_GaussKronrodNonAdaptive) {
  {
    GaussKronrodNonAdaptive *arg1 = (GaussKronrodNonAdaptive *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_GaussKronrodNonAdaptive(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GaussKronrodNonAdaptive, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GaussKronrodNonAdaptive" "', argument " "1"" of type '" "GaussKronrodNonAdaptive *""'"); 
    }
    arg1 = reinterpret_cast< GaussKronrodNonAdaptive * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_GaussLobattoIntegral__SWIG_0) {
  {
    Size arg1 ;
    Real arg2 ;
    Real arg3 ;
    bool arg4 ;
    size_t val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    GaussLobattoIntegral *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_GaussLobattoIntegral(maxIterations,absAccuracy,relAccuracy,useConvergenceEstimate);");
    }
    ecode1 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_GaussLobattoIntegral" "', argument " "1"" of type '" "Size""'");
    } 
    arg1 = static_cast< Size >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_GaussLobattoIntegral" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_GaussLobattoIntegral" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_GaussLobattoIntegral" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    {
      try {
        result = (GaussLobattoIntegral *)new GaussLobattoIntegral(arg1,arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GaussLobattoIntegral, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_GaussLobattoIntegral__SWIG_1) {
  {
    Size arg1 ;
    Real arg2 ;
    Real arg3 ;
    size_t val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    GaussLobattoIntegral *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_GaussLobattoIntegral(maxIterations,absAccuracy,relAccuracy);");
    }
    ecode1 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_GaussLobattoIntegral" "', argument " "1"" of type '" "Size""'");
    } 
    arg1 = static_cast< Size >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_GaussLobattoIntegral" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_GaussLobattoIntegral" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    {
      try {
        result = (GaussLobattoIntegral *)new GaussLobattoIntegral(arg1,arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GaussLobattoIntegral, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_GaussLobattoIntegral__SWIG_2) {
  {
    Size arg1 ;
    Real arg2 ;
    size_t val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    GaussLobattoIntegral *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_GaussLobattoIntegral(maxIterations,absAccuracy);");
    }
    ecode1 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_GaussLobattoIntegral" "', argument " "1"" of type '" "Size""'");
    } 
    arg1 = static_cast< Size >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_GaussLobattoIntegral" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (GaussLobattoIntegral *)new GaussLobattoIntegral(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GaussLobattoIntegral, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_GaussLobattoIntegral) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_GaussLobattoIntegral__SWIG_2); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_GaussLobattoIntegral__SWIG_1); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_GaussLobattoIntegral__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_GaussLobattoIntegral'");
  XSRETURN(0);
}


XS(_wrap_delete_GaussLobattoIntegral) {
  {
    GaussLobattoIntegral *arg1 = (GaussLobattoIntegral *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_GaussLobattoIntegral(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GaussLobattoIntegral, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GaussLobattoIntegral" "', argument " "1"" of type '" "GaussLobattoIntegral *""'"); 
    }
    arg1 = reinterpret_cast< GaussLobattoIntegral * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_GaussLaguerreIntegration__SWIG_0) {
  {
    Size arg1 ;
    Real arg2 ;
    size_t val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    GaussLaguerreIntegration *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_GaussLaguerreIntegration(n,s);");
    }
    ecode1 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_GaussLaguerreIntegration" "', argument " "1"" of type '" "Size""'");
    } 
    arg1 = static_cast< Size >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_GaussLaguerreIntegration" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (GaussLaguerreIntegration *)new GaussLaguerreIntegration(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GaussLaguerreIntegration, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_GaussLaguerreIntegration__SWIG_1) {
  {
    Size arg1 ;
    size_t val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    GaussLaguerreIntegration *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_GaussLaguerreIntegration(n);");
    }
    ecode1 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_GaussLaguerreIntegration" "', argument " "1"" of type '" "Size""'");
    } 
    arg1 = static_cast< Size >(val1);
    {
      try {
        result = (GaussLaguerreIntegration *)new GaussLaguerreIntegration(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GaussLaguerreIntegration, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_GaussLaguerreIntegration) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_GaussLaguerreIntegration__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_GaussLaguerreIntegration__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_GaussLaguerreIntegration'");
  XSRETURN(0);
}


XS(_wrap_delete_GaussLaguerreIntegration) {
  {
    GaussLaguerreIntegration *arg1 = (GaussLaguerreIntegration *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_GaussLaguerreIntegration(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GaussLaguerreIntegration, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GaussLaguerreIntegration" "', argument " "1"" of type '" "GaussLaguerreIntegration *""'"); 
    }
    arg1 = reinterpret_cast< GaussLaguerreIntegration * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_GaussHermiteIntegration__SWIG_0) {
  {
    Size arg1 ;
    Real arg2 ;
    size_t val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    GaussHermiteIntegration *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_GaussHermiteIntegration(n,mu);");
    }
    ecode1 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_GaussHermiteIntegration" "', argument " "1"" of type '" "Size""'");
    } 
    arg1 = static_cast< Size >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_GaussHermiteIntegration" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (GaussHermiteIntegration *)new GaussHermiteIntegration(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GaussHermiteIntegration, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_GaussHermiteIntegration__SWIG_1) {
  {
    Size arg1 ;
    size_t val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    GaussHermiteIntegration *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_GaussHermiteIntegration(n);");
    }
    ecode1 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_GaussHermiteIntegration" "', argument " "1"" of type '" "Size""'");
    } 
    arg1 = static_cast< Size >(val1);
    {
      try {
        result = (GaussHermiteIntegration *)new GaussHermiteIntegration(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GaussHermiteIntegration, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_GaussHermiteIntegration) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_GaussHermiteIntegration__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_GaussHermiteIntegration__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_GaussHermiteIntegration'");
  XSRETURN(0);
}


XS(_wrap_delete_GaussHermiteIntegration) {
  {
    GaussHermiteIntegration *arg1 = (GaussHermiteIntegration *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_GaussHermiteIntegration(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GaussHermiteIntegration, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GaussHermiteIntegration" "', argument " "1"" of type '" "GaussHermiteIntegration *""'"); 
    }
    arg1 = reinterpret_cast< GaussHermiteIntegration * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_GaussJacobiIntegration) {
  {
    Size arg1 ;
    Real arg2 ;
    Real arg3 ;
    size_t val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    GaussJacobiIntegration *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_GaussJacobiIntegration(n,alpha,beta);");
    }
    ecode1 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_GaussJacobiIntegration" "', argument " "1"" of type '" "Size""'");
    } 
    arg1 = static_cast< Size >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_GaussJacobiIntegration" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_GaussJacobiIntegration" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    {
      try {
        result = (GaussJacobiIntegration *)new GaussJacobiIntegration(arg1,arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GaussJacobiIntegration, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_GaussJacobiIntegration) {
  {
    GaussJacobiIntegration *arg1 = (GaussJacobiIntegration *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_GaussJacobiIntegration(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GaussJacobiIntegration, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GaussJacobiIntegration" "', argument " "1"" of type '" "GaussJacobiIntegration *""'"); 
    }
    arg1 = reinterpret_cast< GaussJacobiIntegration * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_GaussHyperbolicIntegration) {
  {
    Size arg1 ;
    size_t val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    GaussHyperbolicIntegration *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_GaussHyperbolicIntegration(n);");
    }
    ecode1 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_GaussHyperbolicIntegration" "', argument " "1"" of type '" "Size""'");
    } 
    arg1 = static_cast< Size >(val1);
    {
      try {
        result = (GaussHyperbolicIntegration *)new GaussHyperbolicIntegration(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GaussHyperbolicIntegration, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_GaussHyperbolicIntegration) {
  {
    GaussHyperbolicIntegration *arg1 = (GaussHyperbolicIntegration *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_GaussHyperbolicIntegration(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GaussHyperbolicIntegration, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GaussHyperbolicIntegration" "', argument " "1"" of type '" "GaussHyperbolicIntegration *""'"); 
    }
    arg1 = reinterpret_cast< GaussHyperbolicIntegration * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_GaussLegendreIntegration) {
  {
    Size arg1 ;
    size_t val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    GaussLegendreIntegration *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_GaussLegendreIntegration(n);");
    }
    ecode1 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_GaussLegendreIntegration" "', argument " "1"" of type '" "Size""'");
    } 
    arg1 = static_cast< Size >(val1);
    {
      try {
        result = (GaussLegendreIntegration *)new GaussLegendreIntegration(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GaussLegendreIntegration, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_GaussLegendreIntegration) {
  {
    GaussLegendreIntegration *arg1 = (GaussLegendreIntegration *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_GaussLegendreIntegration(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GaussLegendreIntegration, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GaussLegendreIntegration" "', argument " "1"" of type '" "GaussLegendreIntegration *""'"); 
    }
    arg1 = reinterpret_cast< GaussLegendreIntegration * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_GaussChebyshevIntegration) {
  {
    Size arg1 ;
    size_t val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    GaussChebyshevIntegration *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_GaussChebyshevIntegration(n);");
    }
    ecode1 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_GaussChebyshevIntegration" "', argument " "1"" of type '" "Size""'");
    } 
    arg1 = static_cast< Size >(val1);
    {
      try {
        result = (GaussChebyshevIntegration *)new GaussChebyshevIntegration(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GaussChebyshevIntegration, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_GaussChebyshevIntegration) {
  {
    GaussChebyshevIntegration *arg1 = (GaussChebyshevIntegration *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_GaussChebyshevIntegration(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GaussChebyshevIntegration, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GaussChebyshevIntegration" "', argument " "1"" of type '" "GaussChebyshevIntegration *""'"); 
    }
    arg1 = reinterpret_cast< GaussChebyshevIntegration * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_GaussChebyshev2ndIntegration) {
  {
    Size arg1 ;
    size_t val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    GaussChebyshev2ndIntegration *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_GaussChebyshev2ndIntegration(n);");
    }
    ecode1 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_GaussChebyshev2ndIntegration" "', argument " "1"" of type '" "Size""'");
    } 
    arg1 = static_cast< Size >(val1);
    {
      try {
        result = (GaussChebyshev2ndIntegration *)new GaussChebyshev2ndIntegration(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GaussChebyshev2ndIntegration, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_GaussChebyshev2ndIntegration) {
  {
    GaussChebyshev2ndIntegration *arg1 = (GaussChebyshev2ndIntegration *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_GaussChebyshev2ndIntegration(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GaussChebyshev2ndIntegration, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GaussChebyshev2ndIntegration" "', argument " "1"" of type '" "GaussChebyshev2ndIntegration *""'"); 
    }
    arg1 = reinterpret_cast< GaussChebyshev2ndIntegration * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_GaussGegenbauerIntegration) {
  {
    Size arg1 ;
    Real arg2 ;
    size_t val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    GaussGegenbauerIntegration *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_GaussGegenbauerIntegration(n,lambda);");
    }
    ecode1 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_GaussGegenbauerIntegration" "', argument " "1"" of type '" "Size""'");
    } 
    arg1 = static_cast< Size >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_GaussGegenbauerIntegration" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (GaussGegenbauerIntegration *)new GaussGegenbauerIntegration(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GaussGegenbauerIntegration, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_GaussGegenbauerIntegration) {
  {
    GaussGegenbauerIntegration *arg1 = (GaussGegenbauerIntegration *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_GaussGegenbauerIntegration(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GaussGegenbauerIntegration, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GaussGegenbauerIntegration" "', argument " "1"" of type '" "GaussGegenbauerIntegration *""'"); 
    }
    arg1 = reinterpret_cast< GaussGegenbauerIntegration * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_SampleNumber_value) {
  {
    Sample< Real > *arg1 = (Sample< Real > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    double result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: SampleNumber_value(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SampleT_double_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SampleNumber_value" "', argument " "1"" of type '" "Sample< Real > *""'"); 
    }
    arg1 = reinterpret_cast< Sample< Real > * >(argp1);
    {
      try {
        result = (double)Sample_Sl_Real_Sg__value(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_SampleNumber_weight) {
  {
    Sample< Real > *arg1 = (Sample< Real > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: SampleNumber_weight(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SampleT_double_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SampleNumber_weight" "', argument " "1"" of type '" "Sample< Real > *""'"); 
    }
    arg1 = reinterpret_cast< Sample< Real > * >(argp1);
    {
      try {
        result = (Real)Sample_Sl_Real_Sg__weight(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_SampleNumber) {
  {
    Sample< Real > *arg1 = (Sample< Real > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_SampleNumber(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SampleT_double_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SampleNumber" "', argument " "1"" of type '" "Sample< Real > *""'"); 
    }
    arg1 = reinterpret_cast< Sample< Real > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_SampleArray_value) {
  {
    Sample< Array > *arg1 = (Sample< Array > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Array result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: SampleArray_value(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SampleT_Array_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SampleArray_value" "', argument " "1"" of type '" "Sample< Array > *""'"); 
    }
    arg1 = reinterpret_cast< Sample< Array > * >(argp1);
    {
      try {
        result = Sample_Sl_Array_Sg__value(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Array(static_cast< const Array& >(result))), SWIGTYPE_p_Array, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_SampleArray_weight) {
  {
    Sample< Array > *arg1 = (Sample< Array > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: SampleArray_weight(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SampleT_Array_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SampleArray_weight" "', argument " "1"" of type '" "Sample< Array > *""'"); 
    }
    arg1 = reinterpret_cast< Sample< Array > * >(argp1);
    {
      try {
        result = (Real)Sample_Sl_Array_Sg__weight(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_SampleArray) {
  {
    Sample< Array > *arg1 = (Sample< Array > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_SampleArray(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SampleT_Array_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SampleArray" "', argument " "1"" of type '" "Sample< Array > *""'"); 
    }
    arg1 = reinterpret_cast< Sample< Array > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_SampleRealVector_value) {
  {
    Sample< std::vector< Real > > *arg1 = (Sample< std::vector< Real > > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< double > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: SampleRealVector_value(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SampleT_std__vectorT_double_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SampleRealVector_value" "', argument " "1"" of type '" "Sample< std::vector< Real > > *""'"); 
    }
    arg1 = reinterpret_cast< Sample< std::vector< Real > > * >(argp1);
    {
      try {
        result = Sample_Sl_std_vector_Sl_Real_Sg__Sg__value(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        svs[i] = sv_newmortal();
        sv_setnv(svs[i], result[i]);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_SampleRealVector_weight) {
  {
    Sample< std::vector< Real > > *arg1 = (Sample< std::vector< Real > > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: SampleRealVector_weight(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SampleT_std__vectorT_double_t_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SampleRealVector_weight" "', argument " "1"" of type '" "Sample< std::vector< Real > > *""'"); 
    }
    arg1 = reinterpret_cast< Sample< std::vector< Real > > * >(argp1);
    {
      try {
        result = (Real)Sample_Sl_std_vector_Sl_Real_Sg__Sg__weight(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_SampleRealVector) {
  {
    Sample< std::vector< Real > > *arg1 = (Sample< std::vector< Real > > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_SampleRealVector(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SampleT_std__vectorT_double_t_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SampleRealVector" "', argument " "1"" of type '" "Sample< std::vector< Real > > *""'"); 
    }
    arg1 = reinterpret_cast< Sample< std::vector< Real > > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_LecuyerUniformRng__SWIG_0) {
  {
    BigInteger arg1 ;
    long val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    LecuyerUniformRng *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_LecuyerUniformRng(seed);");
    }
    ecode1 = SWIG_AsVal_long SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_LecuyerUniformRng" "', argument " "1"" of type '" "BigInteger""'");
    } 
    arg1 = static_cast< BigInteger >(val1);
    {
      try {
        result = (LecuyerUniformRng *)new LecuyerUniformRng(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_LecuyerUniformRng, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_LecuyerUniformRng__SWIG_1) {
  {
    int argvi = 0;
    LecuyerUniformRng *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_LecuyerUniformRng();");
    }
    {
      try {
        result = (LecuyerUniformRng *)new LecuyerUniformRng();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_LecuyerUniformRng, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_LecuyerUniformRng) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_long SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_LecuyerUniformRng__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_LecuyerUniformRng__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_LecuyerUniformRng'");
  XSRETURN(0);
}


XS(_wrap_LecuyerUniformRng_next) {
  {
    LecuyerUniformRng *arg1 = (LecuyerUniformRng *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    SwigValueWrapper< Sample< double > > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: LecuyerUniformRng_next(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_LecuyerUniformRng, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LecuyerUniformRng_next" "', argument " "1"" of type '" "LecuyerUniformRng const *""'"); 
    }
    arg1 = reinterpret_cast< LecuyerUniformRng * >(argp1);
    {
      try {
        result = ((LecuyerUniformRng const *)arg1)->next();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Sample< Real >(static_cast< const Sample< Real >& >(result))), SWIGTYPE_p_SampleT_double_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_LecuyerUniformRng) {
  {
    LecuyerUniformRng *arg1 = (LecuyerUniformRng *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_LecuyerUniformRng(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_LecuyerUniformRng, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_LecuyerUniformRng" "', argument " "1"" of type '" "LecuyerUniformRng *""'"); 
    }
    arg1 = reinterpret_cast< LecuyerUniformRng * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_KnuthUniformRng__SWIG_0) {
  {
    BigInteger arg1 ;
    long val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    KnuthUniformRng *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_KnuthUniformRng(seed);");
    }
    ecode1 = SWIG_AsVal_long SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_KnuthUniformRng" "', argument " "1"" of type '" "BigInteger""'");
    } 
    arg1 = static_cast< BigInteger >(val1);
    {
      try {
        result = (KnuthUniformRng *)new KnuthUniformRng(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_KnuthUniformRng, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_KnuthUniformRng__SWIG_1) {
  {
    int argvi = 0;
    KnuthUniformRng *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_KnuthUniformRng();");
    }
    {
      try {
        result = (KnuthUniformRng *)new KnuthUniformRng();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_KnuthUniformRng, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_KnuthUniformRng) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_long SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_KnuthUniformRng__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_KnuthUniformRng__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_KnuthUniformRng'");
  XSRETURN(0);
}


XS(_wrap_KnuthUniformRng_next) {
  {
    KnuthUniformRng *arg1 = (KnuthUniformRng *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    SwigValueWrapper< Sample< double > > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: KnuthUniformRng_next(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_KnuthUniformRng, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "KnuthUniformRng_next" "', argument " "1"" of type '" "KnuthUniformRng const *""'"); 
    }
    arg1 = reinterpret_cast< KnuthUniformRng * >(argp1);
    {
      try {
        result = ((KnuthUniformRng const *)arg1)->next();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Sample< Real >(static_cast< const Sample< Real >& >(result))), SWIGTYPE_p_SampleT_double_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_KnuthUniformRng) {
  {
    KnuthUniformRng *arg1 = (KnuthUniformRng *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_KnuthUniformRng(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_KnuthUniformRng, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_KnuthUniformRng" "', argument " "1"" of type '" "KnuthUniformRng *""'"); 
    }
    arg1 = reinterpret_cast< KnuthUniformRng * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MersenneTwisterUniformRng__SWIG_0) {
  {
    BigInteger arg1 ;
    long val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    MersenneTwisterUniformRng *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_MersenneTwisterUniformRng(seed);");
    }
    ecode1 = SWIG_AsVal_long SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_MersenneTwisterUniformRng" "', argument " "1"" of type '" "BigInteger""'");
    } 
    arg1 = static_cast< BigInteger >(val1);
    {
      try {
        result = (MersenneTwisterUniformRng *)new MersenneTwisterUniformRng(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MersenneTwisterUniformRng, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MersenneTwisterUniformRng__SWIG_1) {
  {
    int argvi = 0;
    MersenneTwisterUniformRng *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_MersenneTwisterUniformRng();");
    }
    {
      try {
        result = (MersenneTwisterUniformRng *)new MersenneTwisterUniformRng();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MersenneTwisterUniformRng, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_MersenneTwisterUniformRng) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_long SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MersenneTwisterUniformRng__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MersenneTwisterUniformRng__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_MersenneTwisterUniformRng'");
  XSRETURN(0);
}


XS(_wrap_MersenneTwisterUniformRng_next) {
  {
    MersenneTwisterUniformRng *arg1 = (MersenneTwisterUniformRng *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    SwigValueWrapper< Sample< double > > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MersenneTwisterUniformRng_next(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_MersenneTwisterUniformRng, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MersenneTwisterUniformRng_next" "', argument " "1"" of type '" "MersenneTwisterUniformRng const *""'"); 
    }
    arg1 = reinterpret_cast< MersenneTwisterUniformRng * >(argp1);
    {
      try {
        result = ((MersenneTwisterUniformRng const *)arg1)->next();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Sample< Real >(static_cast< const Sample< Real >& >(result))), SWIGTYPE_p_SampleT_double_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_MersenneTwisterUniformRng) {
  {
    MersenneTwisterUniformRng *arg1 = (MersenneTwisterUniformRng *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_MersenneTwisterUniformRng(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_MersenneTwisterUniformRng, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MersenneTwisterUniformRng" "', argument " "1"" of type '" "MersenneTwisterUniformRng *""'"); 
    }
    arg1 = reinterpret_cast< MersenneTwisterUniformRng * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_UniformRandomGenerator__SWIG_0) {
  {
    BigInteger arg1 ;
    long val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    UniformRandomGenerator *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_UniformRandomGenerator(seed);");
    }
    ecode1 = SWIG_AsVal_long SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_UniformRandomGenerator" "', argument " "1"" of type '" "BigInteger""'");
    } 
    arg1 = static_cast< BigInteger >(val1);
    {
      try {
        result = (UniformRandomGenerator *)new UniformRandomGenerator(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UniformRandomGenerator, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_UniformRandomGenerator__SWIG_1) {
  {
    int argvi = 0;
    UniformRandomGenerator *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_UniformRandomGenerator();");
    }
    {
      try {
        result = (UniformRandomGenerator *)new UniformRandomGenerator();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UniformRandomGenerator, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_UniformRandomGenerator) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_long SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_UniformRandomGenerator__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_UniformRandomGenerator__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_UniformRandomGenerator'");
  XSRETURN(0);
}


XS(_wrap_UniformRandomGenerator_next) {
  {
    UniformRandomGenerator *arg1 = (UniformRandomGenerator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    SwigValueWrapper< Sample< double > > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: UniformRandomGenerator_next(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_UniformRandomGenerator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UniformRandomGenerator_next" "', argument " "1"" of type '" "UniformRandomGenerator const *""'"); 
    }
    arg1 = reinterpret_cast< UniformRandomGenerator * >(argp1);
    {
      try {
        result = ((UniformRandomGenerator const *)arg1)->next();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Sample< Real >(static_cast< const Sample< Real >& >(result))), SWIGTYPE_p_SampleT_double_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_UniformRandomGenerator_nextValue) {
  {
    UniformRandomGenerator *arg1 = (UniformRandomGenerator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: UniformRandomGenerator_nextValue(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_UniformRandomGenerator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UniformRandomGenerator_nextValue" "', argument " "1"" of type '" "UniformRandomGenerator const *""'"); 
    }
    arg1 = reinterpret_cast< UniformRandomGenerator * >(argp1);
    {
      try {
        result = (Real)UniformRandomGenerator_nextValue((UniformRandomGenerator const *)arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_UniformRandomGenerator) {
  {
    UniformRandomGenerator *arg1 = (UniformRandomGenerator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_UniformRandomGenerator(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_UniformRandomGenerator, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UniformRandomGenerator" "', argument " "1"" of type '" "UniformRandomGenerator *""'"); 
    }
    arg1 = reinterpret_cast< UniformRandomGenerator * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CentralLimitLecuyerGaussianRng) {
  {
    LecuyerUniformRng *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    CLGaussianRng< LecuyerUniformRng > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_CentralLimitLecuyerGaussianRng(rng);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_LecuyerUniformRng,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CentralLimitLecuyerGaussianRng" "', argument " "1"" of type '" "LecuyerUniformRng const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CentralLimitLecuyerGaussianRng" "', argument " "1"" of type '" "LecuyerUniformRng const &""'"); 
    }
    arg1 = reinterpret_cast< LecuyerUniformRng * >(argp1);
    {
      try {
        result = (CLGaussianRng< LecuyerUniformRng > *)new CLGaussianRng< LecuyerUniformRng >((LecuyerUniformRng const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CLGaussianRngT_LecuyerUniformRng_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CentralLimitLecuyerGaussianRng_next) {
  {
    CLGaussianRng< LecuyerUniformRng > *arg1 = (CLGaussianRng< LecuyerUniformRng > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    SwigValueWrapper< Sample< double > > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CentralLimitLecuyerGaussianRng_next(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CLGaussianRngT_LecuyerUniformRng_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CentralLimitLecuyerGaussianRng_next" "', argument " "1"" of type '" "CLGaussianRng< LecuyerUniformRng > const *""'"); 
    }
    arg1 = reinterpret_cast< CLGaussianRng< LecuyerUniformRng > * >(argp1);
    {
      try {
        result = ((CLGaussianRng< LecuyerUniformRng > const *)arg1)->next();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Sample< Real >(static_cast< const Sample< Real >& >(result))), SWIGTYPE_p_SampleT_double_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_CentralLimitLecuyerGaussianRng) {
  {
    CLGaussianRng< LecuyerUniformRng > *arg1 = (CLGaussianRng< LecuyerUniformRng > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_CentralLimitLecuyerGaussianRng(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CLGaussianRngT_LecuyerUniformRng_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CentralLimitLecuyerGaussianRng" "', argument " "1"" of type '" "CLGaussianRng< LecuyerUniformRng > *""'"); 
    }
    arg1 = reinterpret_cast< CLGaussianRng< LecuyerUniformRng > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CentralLimitKnuthGaussianRng) {
  {
    KnuthUniformRng *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    CLGaussianRng< KnuthUniformRng > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_CentralLimitKnuthGaussianRng(rng);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_KnuthUniformRng,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CentralLimitKnuthGaussianRng" "', argument " "1"" of type '" "KnuthUniformRng const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CentralLimitKnuthGaussianRng" "', argument " "1"" of type '" "KnuthUniformRng const &""'"); 
    }
    arg1 = reinterpret_cast< KnuthUniformRng * >(argp1);
    {
      try {
        result = (CLGaussianRng< KnuthUniformRng > *)new CLGaussianRng< KnuthUniformRng >((KnuthUniformRng const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CLGaussianRngT_KnuthUniformRng_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CentralLimitKnuthGaussianRng_next) {
  {
    CLGaussianRng< KnuthUniformRng > *arg1 = (CLGaussianRng< KnuthUniformRng > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    SwigValueWrapper< Sample< double > > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CentralLimitKnuthGaussianRng_next(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CLGaussianRngT_KnuthUniformRng_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CentralLimitKnuthGaussianRng_next" "', argument " "1"" of type '" "CLGaussianRng< KnuthUniformRng > const *""'"); 
    }
    arg1 = reinterpret_cast< CLGaussianRng< KnuthUniformRng > * >(argp1);
    {
      try {
        result = ((CLGaussianRng< KnuthUniformRng > const *)arg1)->next();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Sample< Real >(static_cast< const Sample< Real >& >(result))), SWIGTYPE_p_SampleT_double_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_CentralLimitKnuthGaussianRng) {
  {
    CLGaussianRng< KnuthUniformRng > *arg1 = (CLGaussianRng< KnuthUniformRng > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_CentralLimitKnuthGaussianRng(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CLGaussianRngT_KnuthUniformRng_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CentralLimitKnuthGaussianRng" "', argument " "1"" of type '" "CLGaussianRng< KnuthUniformRng > *""'"); 
    }
    arg1 = reinterpret_cast< CLGaussianRng< KnuthUniformRng > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CentralLimitMersenneTwisterGaussianRng) {
  {
    MersenneTwisterUniformRng *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    CLGaussianRng< MersenneTwisterUniformRng > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_CentralLimitMersenneTwisterGaussianRng(rng);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_MersenneTwisterUniformRng,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CentralLimitMersenneTwisterGaussianRng" "', argument " "1"" of type '" "MersenneTwisterUniformRng const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CentralLimitMersenneTwisterGaussianRng" "', argument " "1"" of type '" "MersenneTwisterUniformRng const &""'"); 
    }
    arg1 = reinterpret_cast< MersenneTwisterUniformRng * >(argp1);
    {
      try {
        result = (CLGaussianRng< MersenneTwisterUniformRng > *)new CLGaussianRng< MersenneTwisterUniformRng >((MersenneTwisterUniformRng const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CLGaussianRngT_MersenneTwisterUniformRng_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CentralLimitMersenneTwisterGaussianRng_next) {
  {
    CLGaussianRng< MersenneTwisterUniformRng > *arg1 = (CLGaussianRng< MersenneTwisterUniformRng > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    SwigValueWrapper< Sample< double > > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CentralLimitMersenneTwisterGaussianRng_next(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CLGaussianRngT_MersenneTwisterUniformRng_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CentralLimitMersenneTwisterGaussianRng_next" "', argument " "1"" of type '" "CLGaussianRng< MersenneTwisterUniformRng > const *""'"); 
    }
    arg1 = reinterpret_cast< CLGaussianRng< MersenneTwisterUniformRng > * >(argp1);
    {
      try {
        result = ((CLGaussianRng< MersenneTwisterUniformRng > const *)arg1)->next();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Sample< Real >(static_cast< const Sample< Real >& >(result))), SWIGTYPE_p_SampleT_double_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_CentralLimitMersenneTwisterGaussianRng) {
  {
    CLGaussianRng< MersenneTwisterUniformRng > *arg1 = (CLGaussianRng< MersenneTwisterUniformRng > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_CentralLimitMersenneTwisterGaussianRng(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CLGaussianRngT_MersenneTwisterUniformRng_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CentralLimitMersenneTwisterGaussianRng" "', argument " "1"" of type '" "CLGaussianRng< MersenneTwisterUniformRng > *""'"); 
    }
    arg1 = reinterpret_cast< CLGaussianRng< MersenneTwisterUniformRng > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BoxMullerLecuyerGaussianRng) {
  {
    LecuyerUniformRng *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    BoxMullerGaussianRng< LecuyerUniformRng > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_BoxMullerLecuyerGaussianRng(rng);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_LecuyerUniformRng,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_BoxMullerLecuyerGaussianRng" "', argument " "1"" of type '" "LecuyerUniformRng const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BoxMullerLecuyerGaussianRng" "', argument " "1"" of type '" "LecuyerUniformRng const &""'"); 
    }
    arg1 = reinterpret_cast< LecuyerUniformRng * >(argp1);
    {
      try {
        result = (BoxMullerGaussianRng< LecuyerUniformRng > *)new BoxMullerGaussianRng< LecuyerUniformRng >((LecuyerUniformRng const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BoxMullerGaussianRngT_LecuyerUniformRng_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BoxMullerLecuyerGaussianRng_next) {
  {
    BoxMullerGaussianRng< LecuyerUniformRng > *arg1 = (BoxMullerGaussianRng< LecuyerUniformRng > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    SwigValueWrapper< Sample< double > > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BoxMullerLecuyerGaussianRng_next(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BoxMullerGaussianRngT_LecuyerUniformRng_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoxMullerLecuyerGaussianRng_next" "', argument " "1"" of type '" "BoxMullerGaussianRng< LecuyerUniformRng > const *""'"); 
    }
    arg1 = reinterpret_cast< BoxMullerGaussianRng< LecuyerUniformRng > * >(argp1);
    {
      try {
        result = ((BoxMullerGaussianRng< LecuyerUniformRng > const *)arg1)->next();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Sample< Real >(static_cast< const Sample< Real >& >(result))), SWIGTYPE_p_SampleT_double_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_BoxMullerLecuyerGaussianRng) {
  {
    BoxMullerGaussianRng< LecuyerUniformRng > *arg1 = (BoxMullerGaussianRng< LecuyerUniformRng > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_BoxMullerLecuyerGaussianRng(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BoxMullerGaussianRngT_LecuyerUniformRng_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_BoxMullerLecuyerGaussianRng" "', argument " "1"" of type '" "BoxMullerGaussianRng< LecuyerUniformRng > *""'"); 
    }
    arg1 = reinterpret_cast< BoxMullerGaussianRng< LecuyerUniformRng > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BoxMullerKnuthGaussianRng) {
  {
    KnuthUniformRng *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    BoxMullerGaussianRng< KnuthUniformRng > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_BoxMullerKnuthGaussianRng(rng);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_KnuthUniformRng,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_BoxMullerKnuthGaussianRng" "', argument " "1"" of type '" "KnuthUniformRng const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BoxMullerKnuthGaussianRng" "', argument " "1"" of type '" "KnuthUniformRng const &""'"); 
    }
    arg1 = reinterpret_cast< KnuthUniformRng * >(argp1);
    {
      try {
        result = (BoxMullerGaussianRng< KnuthUniformRng > *)new BoxMullerGaussianRng< KnuthUniformRng >((KnuthUniformRng const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BoxMullerGaussianRngT_KnuthUniformRng_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BoxMullerKnuthGaussianRng_next) {
  {
    BoxMullerGaussianRng< KnuthUniformRng > *arg1 = (BoxMullerGaussianRng< KnuthUniformRng > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    SwigValueWrapper< Sample< double > > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BoxMullerKnuthGaussianRng_next(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BoxMullerGaussianRngT_KnuthUniformRng_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoxMullerKnuthGaussianRng_next" "', argument " "1"" of type '" "BoxMullerGaussianRng< KnuthUniformRng > const *""'"); 
    }
    arg1 = reinterpret_cast< BoxMullerGaussianRng< KnuthUniformRng > * >(argp1);
    {
      try {
        result = ((BoxMullerGaussianRng< KnuthUniformRng > const *)arg1)->next();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Sample< Real >(static_cast< const Sample< Real >& >(result))), SWIGTYPE_p_SampleT_double_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_BoxMullerKnuthGaussianRng) {
  {
    BoxMullerGaussianRng< KnuthUniformRng > *arg1 = (BoxMullerGaussianRng< KnuthUniformRng > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_BoxMullerKnuthGaussianRng(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BoxMullerGaussianRngT_KnuthUniformRng_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_BoxMullerKnuthGaussianRng" "', argument " "1"" of type '" "BoxMullerGaussianRng< KnuthUniformRng > *""'"); 
    }
    arg1 = reinterpret_cast< BoxMullerGaussianRng< KnuthUniformRng > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BoxMullerMersenneTwisterGaussianRng) {
  {
    MersenneTwisterUniformRng *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    BoxMullerGaussianRng< MersenneTwisterUniformRng > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_BoxMullerMersenneTwisterGaussianRng(rng);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_MersenneTwisterUniformRng,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_BoxMullerMersenneTwisterGaussianRng" "', argument " "1"" of type '" "MersenneTwisterUniformRng const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BoxMullerMersenneTwisterGaussianRng" "', argument " "1"" of type '" "MersenneTwisterUniformRng const &""'"); 
    }
    arg1 = reinterpret_cast< MersenneTwisterUniformRng * >(argp1);
    {
      try {
        result = (BoxMullerGaussianRng< MersenneTwisterUniformRng > *)new BoxMullerGaussianRng< MersenneTwisterUniformRng >((MersenneTwisterUniformRng const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BoxMullerGaussianRngT_MersenneTwisterUniformRng_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BoxMullerMersenneTwisterGaussianRng_next) {
  {
    BoxMullerGaussianRng< MersenneTwisterUniformRng > *arg1 = (BoxMullerGaussianRng< MersenneTwisterUniformRng > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    SwigValueWrapper< Sample< double > > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BoxMullerMersenneTwisterGaussianRng_next(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BoxMullerGaussianRngT_MersenneTwisterUniformRng_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoxMullerMersenneTwisterGaussianRng_next" "', argument " "1"" of type '" "BoxMullerGaussianRng< MersenneTwisterUniformRng > const *""'"); 
    }
    arg1 = reinterpret_cast< BoxMullerGaussianRng< MersenneTwisterUniformRng > * >(argp1);
    {
      try {
        result = ((BoxMullerGaussianRng< MersenneTwisterUniformRng > const *)arg1)->next();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Sample< Real >(static_cast< const Sample< Real >& >(result))), SWIGTYPE_p_SampleT_double_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_BoxMullerMersenneTwisterGaussianRng) {
  {
    BoxMullerGaussianRng< MersenneTwisterUniformRng > *arg1 = (BoxMullerGaussianRng< MersenneTwisterUniformRng > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_BoxMullerMersenneTwisterGaussianRng(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BoxMullerGaussianRngT_MersenneTwisterUniformRng_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_BoxMullerMersenneTwisterGaussianRng" "', argument " "1"" of type '" "BoxMullerGaussianRng< MersenneTwisterUniformRng > *""'"); 
    }
    arg1 = reinterpret_cast< BoxMullerGaussianRng< MersenneTwisterUniformRng > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MoroInvCumulativeLecuyerGaussianRng) {
  {
    LecuyerUniformRng *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    InverseCumulativeRng< LecuyerUniformRng,MoroInverseCumulativeNormal > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_MoroInvCumulativeLecuyerGaussianRng(rng);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_LecuyerUniformRng,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MoroInvCumulativeLecuyerGaussianRng" "', argument " "1"" of type '" "LecuyerUniformRng const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MoroInvCumulativeLecuyerGaussianRng" "', argument " "1"" of type '" "LecuyerUniformRng const &""'"); 
    }
    arg1 = reinterpret_cast< LecuyerUniformRng * >(argp1);
    {
      try {
        result = (InverseCumulativeRng< LecuyerUniformRng,MoroInverseCumulativeNormal > *)new InverseCumulativeRng< LecuyerUniformRng,MoroInverseCumulativeNormal >((LecuyerUniformRng const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_InverseCumulativeRngT_LecuyerUniformRng_MoroInverseCumulativeNormal_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MoroInvCumulativeLecuyerGaussianRng_next) {
  {
    InverseCumulativeRng< LecuyerUniformRng,MoroInverseCumulativeNormal > *arg1 = (InverseCumulativeRng< LecuyerUniformRng,MoroInverseCumulativeNormal > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    SwigValueWrapper< Sample< double > > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MoroInvCumulativeLecuyerGaussianRng_next(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_InverseCumulativeRngT_LecuyerUniformRng_MoroInverseCumulativeNormal_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MoroInvCumulativeLecuyerGaussianRng_next" "', argument " "1"" of type '" "InverseCumulativeRng< LecuyerUniformRng,MoroInverseCumulativeNormal > const *""'"); 
    }
    arg1 = reinterpret_cast< InverseCumulativeRng< LecuyerUniformRng,MoroInverseCumulativeNormal > * >(argp1);
    {
      try {
        result = ((InverseCumulativeRng< LecuyerUniformRng,MoroInverseCumulativeNormal > const *)arg1)->next();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Sample< Real >(static_cast< const Sample< Real >& >(result))), SWIGTYPE_p_SampleT_double_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_MoroInvCumulativeLecuyerGaussianRng) {
  {
    InverseCumulativeRng< LecuyerUniformRng,MoroInverseCumulativeNormal > *arg1 = (InverseCumulativeRng< LecuyerUniformRng,MoroInverseCumulativeNormal > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_MoroInvCumulativeLecuyerGaussianRng(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_InverseCumulativeRngT_LecuyerUniformRng_MoroInverseCumulativeNormal_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MoroInvCumulativeLecuyerGaussianRng" "', argument " "1"" of type '" "InverseCumulativeRng< LecuyerUniformRng,MoroInverseCumulativeNormal > *""'"); 
    }
    arg1 = reinterpret_cast< InverseCumulativeRng< LecuyerUniformRng,MoroInverseCumulativeNormal > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MoroInvCumulativeKnuthGaussianRng) {
  {
    KnuthUniformRng *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    InverseCumulativeRng< KnuthUniformRng,MoroInverseCumulativeNormal > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_MoroInvCumulativeKnuthGaussianRng(rng);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_KnuthUniformRng,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MoroInvCumulativeKnuthGaussianRng" "', argument " "1"" of type '" "KnuthUniformRng const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MoroInvCumulativeKnuthGaussianRng" "', argument " "1"" of type '" "KnuthUniformRng const &""'"); 
    }
    arg1 = reinterpret_cast< KnuthUniformRng * >(argp1);
    {
      try {
        result = (InverseCumulativeRng< KnuthUniformRng,MoroInverseCumulativeNormal > *)new InverseCumulativeRng< KnuthUniformRng,MoroInverseCumulativeNormal >((KnuthUniformRng const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_InverseCumulativeRngT_KnuthUniformRng_MoroInverseCumulativeNormal_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MoroInvCumulativeKnuthGaussianRng_next) {
  {
    InverseCumulativeRng< KnuthUniformRng,MoroInverseCumulativeNormal > *arg1 = (InverseCumulativeRng< KnuthUniformRng,MoroInverseCumulativeNormal > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    SwigValueWrapper< Sample< double > > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MoroInvCumulativeKnuthGaussianRng_next(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_InverseCumulativeRngT_KnuthUniformRng_MoroInverseCumulativeNormal_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MoroInvCumulativeKnuthGaussianRng_next" "', argument " "1"" of type '" "InverseCumulativeRng< KnuthUniformRng,MoroInverseCumulativeNormal > const *""'"); 
    }
    arg1 = reinterpret_cast< InverseCumulativeRng< KnuthUniformRng,MoroInverseCumulativeNormal > * >(argp1);
    {
      try {
        result = ((InverseCumulativeRng< KnuthUniformRng,MoroInverseCumulativeNormal > const *)arg1)->next();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Sample< Real >(static_cast< const Sample< Real >& >(result))), SWIGTYPE_p_SampleT_double_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_MoroInvCumulativeKnuthGaussianRng) {
  {
    InverseCumulativeRng< KnuthUniformRng,MoroInverseCumulativeNormal > *arg1 = (InverseCumulativeRng< KnuthUniformRng,MoroInverseCumulativeNormal > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_MoroInvCumulativeKnuthGaussianRng(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_InverseCumulativeRngT_KnuthUniformRng_MoroInverseCumulativeNormal_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MoroInvCumulativeKnuthGaussianRng" "', argument " "1"" of type '" "InverseCumulativeRng< KnuthUniformRng,MoroInverseCumulativeNormal > *""'"); 
    }
    arg1 = reinterpret_cast< InverseCumulativeRng< KnuthUniformRng,MoroInverseCumulativeNormal > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MoroInvCumulativeMersenneTwisterGaussianRng) {
  {
    MersenneTwisterUniformRng *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    InverseCumulativeRng< MersenneTwisterUniformRng,MoroInverseCumulativeNormal > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_MoroInvCumulativeMersenneTwisterGaussianRng(rng);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_MersenneTwisterUniformRng,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MoroInvCumulativeMersenneTwisterGaussianRng" "', argument " "1"" of type '" "MersenneTwisterUniformRng const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MoroInvCumulativeMersenneTwisterGaussianRng" "', argument " "1"" of type '" "MersenneTwisterUniformRng const &""'"); 
    }
    arg1 = reinterpret_cast< MersenneTwisterUniformRng * >(argp1);
    {
      try {
        result = (InverseCumulativeRng< MersenneTwisterUniformRng,MoroInverseCumulativeNormal > *)new InverseCumulativeRng< MersenneTwisterUniformRng,MoroInverseCumulativeNormal >((MersenneTwisterUniformRng const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_InverseCumulativeRngT_MersenneTwisterUniformRng_MoroInverseCumulativeNormal_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MoroInvCumulativeMersenneTwisterGaussianRng_next) {
  {
    InverseCumulativeRng< MersenneTwisterUniformRng,MoroInverseCumulativeNormal > *arg1 = (InverseCumulativeRng< MersenneTwisterUniformRng,MoroInverseCumulativeNormal > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    SwigValueWrapper< Sample< double > > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MoroInvCumulativeMersenneTwisterGaussianRng_next(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_InverseCumulativeRngT_MersenneTwisterUniformRng_MoroInverseCumulativeNormal_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MoroInvCumulativeMersenneTwisterGaussianRng_next" "', argument " "1"" of type '" "InverseCumulativeRng< MersenneTwisterUniformRng,MoroInverseCumulativeNormal > const *""'"); 
    }
    arg1 = reinterpret_cast< InverseCumulativeRng< MersenneTwisterUniformRng,MoroInverseCumulativeNormal > * >(argp1);
    {
      try {
        result = ((InverseCumulativeRng< MersenneTwisterUniformRng,MoroInverseCumulativeNormal > const *)arg1)->next();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Sample< Real >(static_cast< const Sample< Real >& >(result))), SWIGTYPE_p_SampleT_double_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_MoroInvCumulativeMersenneTwisterGaussianRng) {
  {
    InverseCumulativeRng< MersenneTwisterUniformRng,MoroInverseCumulativeNormal > *arg1 = (InverseCumulativeRng< MersenneTwisterUniformRng,MoroInverseCumulativeNormal > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_MoroInvCumulativeMersenneTwisterGaussianRng(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_InverseCumulativeRngT_MersenneTwisterUniformRng_MoroInverseCumulativeNormal_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MoroInvCumulativeMersenneTwisterGaussianRng" "', argument " "1"" of type '" "InverseCumulativeRng< MersenneTwisterUniformRng,MoroInverseCumulativeNormal > *""'"); 
    }
    arg1 = reinterpret_cast< InverseCumulativeRng< MersenneTwisterUniformRng,MoroInverseCumulativeNormal > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_InvCumulativeLecuyerGaussianRng) {
  {
    LecuyerUniformRng *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    InverseCumulativeRng< LecuyerUniformRng,InverseCumulativeNormal > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_InvCumulativeLecuyerGaussianRng(rng);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_LecuyerUniformRng,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_InvCumulativeLecuyerGaussianRng" "', argument " "1"" of type '" "LecuyerUniformRng const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_InvCumulativeLecuyerGaussianRng" "', argument " "1"" of type '" "LecuyerUniformRng const &""'"); 
    }
    arg1 = reinterpret_cast< LecuyerUniformRng * >(argp1);
    {
      try {
        result = (InverseCumulativeRng< LecuyerUniformRng,InverseCumulativeNormal > *)new InverseCumulativeRng< LecuyerUniformRng,InverseCumulativeNormal >((LecuyerUniformRng const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_InverseCumulativeRngT_LecuyerUniformRng_InverseCumulativeNormal_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_InvCumulativeLecuyerGaussianRng_next) {
  {
    InverseCumulativeRng< LecuyerUniformRng,InverseCumulativeNormal > *arg1 = (InverseCumulativeRng< LecuyerUniformRng,InverseCumulativeNormal > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    SwigValueWrapper< Sample< double > > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: InvCumulativeLecuyerGaussianRng_next(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_InverseCumulativeRngT_LecuyerUniformRng_InverseCumulativeNormal_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InvCumulativeLecuyerGaussianRng_next" "', argument " "1"" of type '" "InverseCumulativeRng< LecuyerUniformRng,InverseCumulativeNormal > const *""'"); 
    }
    arg1 = reinterpret_cast< InverseCumulativeRng< LecuyerUniformRng,InverseCumulativeNormal > * >(argp1);
    {
      try {
        result = ((InverseCumulativeRng< LecuyerUniformRng,InverseCumulativeNormal > const *)arg1)->next();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Sample< Real >(static_cast< const Sample< Real >& >(result))), SWIGTYPE_p_SampleT_double_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_InvCumulativeLecuyerGaussianRng) {
  {
    InverseCumulativeRng< LecuyerUniformRng,InverseCumulativeNormal > *arg1 = (InverseCumulativeRng< LecuyerUniformRng,InverseCumulativeNormal > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_InvCumulativeLecuyerGaussianRng(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_InverseCumulativeRngT_LecuyerUniformRng_InverseCumulativeNormal_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_InvCumulativeLecuyerGaussianRng" "', argument " "1"" of type '" "InverseCumulativeRng< LecuyerUniformRng,InverseCumulativeNormal > *""'"); 
    }
    arg1 = reinterpret_cast< InverseCumulativeRng< LecuyerUniformRng,InverseCumulativeNormal > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_InvCumulativeKnuthGaussianRng) {
  {
    KnuthUniformRng *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    InverseCumulativeRng< KnuthUniformRng,InverseCumulativeNormal > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_InvCumulativeKnuthGaussianRng(rng);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_KnuthUniformRng,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_InvCumulativeKnuthGaussianRng" "', argument " "1"" of type '" "KnuthUniformRng const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_InvCumulativeKnuthGaussianRng" "', argument " "1"" of type '" "KnuthUniformRng const &""'"); 
    }
    arg1 = reinterpret_cast< KnuthUniformRng * >(argp1);
    {
      try {
        result = (InverseCumulativeRng< KnuthUniformRng,InverseCumulativeNormal > *)new InverseCumulativeRng< KnuthUniformRng,InverseCumulativeNormal >((KnuthUniformRng const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_InverseCumulativeRngT_KnuthUniformRng_InverseCumulativeNormal_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_InvCumulativeKnuthGaussianRng_next) {
  {
    InverseCumulativeRng< KnuthUniformRng,InverseCumulativeNormal > *arg1 = (InverseCumulativeRng< KnuthUniformRng,InverseCumulativeNormal > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    SwigValueWrapper< Sample< double > > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: InvCumulativeKnuthGaussianRng_next(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_InverseCumulativeRngT_KnuthUniformRng_InverseCumulativeNormal_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InvCumulativeKnuthGaussianRng_next" "', argument " "1"" of type '" "InverseCumulativeRng< KnuthUniformRng,InverseCumulativeNormal > const *""'"); 
    }
    arg1 = reinterpret_cast< InverseCumulativeRng< KnuthUniformRng,InverseCumulativeNormal > * >(argp1);
    {
      try {
        result = ((InverseCumulativeRng< KnuthUniformRng,InverseCumulativeNormal > const *)arg1)->next();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Sample< Real >(static_cast< const Sample< Real >& >(result))), SWIGTYPE_p_SampleT_double_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_InvCumulativeKnuthGaussianRng) {
  {
    InverseCumulativeRng< KnuthUniformRng,InverseCumulativeNormal > *arg1 = (InverseCumulativeRng< KnuthUniformRng,InverseCumulativeNormal > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_InvCumulativeKnuthGaussianRng(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_InverseCumulativeRngT_KnuthUniformRng_InverseCumulativeNormal_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_InvCumulativeKnuthGaussianRng" "', argument " "1"" of type '" "InverseCumulativeRng< KnuthUniformRng,InverseCumulativeNormal > *""'"); 
    }
    arg1 = reinterpret_cast< InverseCumulativeRng< KnuthUniformRng,InverseCumulativeNormal > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_InvCumulativeMersenneTwisterGaussianRng) {
  {
    MersenneTwisterUniformRng *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    InverseCumulativeRng< MersenneTwisterUniformRng,InverseCumulativeNormal > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_InvCumulativeMersenneTwisterGaussianRng(rng);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_MersenneTwisterUniformRng,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_InvCumulativeMersenneTwisterGaussianRng" "', argument " "1"" of type '" "MersenneTwisterUniformRng const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_InvCumulativeMersenneTwisterGaussianRng" "', argument " "1"" of type '" "MersenneTwisterUniformRng const &""'"); 
    }
    arg1 = reinterpret_cast< MersenneTwisterUniformRng * >(argp1);
    {
      try {
        result = (InverseCumulativeRng< MersenneTwisterUniformRng,InverseCumulativeNormal > *)new InverseCumulativeRng< MersenneTwisterUniformRng,InverseCumulativeNormal >((MersenneTwisterUniformRng const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_InverseCumulativeRngT_MersenneTwisterUniformRng_InverseCumulativeNormal_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_InvCumulativeMersenneTwisterGaussianRng_next) {
  {
    InverseCumulativeRng< MersenneTwisterUniformRng,InverseCumulativeNormal > *arg1 = (InverseCumulativeRng< MersenneTwisterUniformRng,InverseCumulativeNormal > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    SwigValueWrapper< Sample< double > > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: InvCumulativeMersenneTwisterGaussianRng_next(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_InverseCumulativeRngT_MersenneTwisterUniformRng_InverseCumulativeNormal_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InvCumulativeMersenneTwisterGaussianRng_next" "', argument " "1"" of type '" "InverseCumulativeRng< MersenneTwisterUniformRng,InverseCumulativeNormal > const *""'"); 
    }
    arg1 = reinterpret_cast< InverseCumulativeRng< MersenneTwisterUniformRng,InverseCumulativeNormal > * >(argp1);
    {
      try {
        result = ((InverseCumulativeRng< MersenneTwisterUniformRng,InverseCumulativeNormal > const *)arg1)->next();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Sample< Real >(static_cast< const Sample< Real >& >(result))), SWIGTYPE_p_SampleT_double_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_InvCumulativeMersenneTwisterGaussianRng) {
  {
    InverseCumulativeRng< MersenneTwisterUniformRng,InverseCumulativeNormal > *arg1 = (InverseCumulativeRng< MersenneTwisterUniformRng,InverseCumulativeNormal > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_InvCumulativeMersenneTwisterGaussianRng(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_InverseCumulativeRngT_MersenneTwisterUniformRng_InverseCumulativeNormal_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_InvCumulativeMersenneTwisterGaussianRng" "', argument " "1"" of type '" "InverseCumulativeRng< MersenneTwisterUniformRng,InverseCumulativeNormal > *""'"); 
    }
    arg1 = reinterpret_cast< InverseCumulativeRng< MersenneTwisterUniformRng,InverseCumulativeNormal > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_GaussianRandomGenerator) {
  {
    UniformRandomGenerator *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    GaussianRandomGenerator *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_GaussianRandomGenerator(rng);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_UniformRandomGenerator,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_GaussianRandomGenerator" "', argument " "1"" of type '" "UniformRandomGenerator const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GaussianRandomGenerator" "', argument " "1"" of type '" "UniformRandomGenerator const &""'"); 
    }
    arg1 = reinterpret_cast< UniformRandomGenerator * >(argp1);
    {
      try {
        result = (GaussianRandomGenerator *)new GaussianRandomGenerator((UniformRandomGenerator const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GaussianRandomGenerator, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_GaussianRandomGenerator_next) {
  {
    GaussianRandomGenerator *arg1 = (GaussianRandomGenerator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    SwigValueWrapper< Sample< double > > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: GaussianRandomGenerator_next(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GaussianRandomGenerator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GaussianRandomGenerator_next" "', argument " "1"" of type '" "GaussianRandomGenerator const *""'"); 
    }
    arg1 = reinterpret_cast< GaussianRandomGenerator * >(argp1);
    {
      try {
        result = ((GaussianRandomGenerator const *)arg1)->next();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Sample< Real >(static_cast< const Sample< Real >& >(result))), SWIGTYPE_p_SampleT_double_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_GaussianRandomGenerator_nextValue) {
  {
    GaussianRandomGenerator *arg1 = (GaussianRandomGenerator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: GaussianRandomGenerator_nextValue(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GaussianRandomGenerator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GaussianRandomGenerator_nextValue" "', argument " "1"" of type '" "GaussianRandomGenerator const *""'"); 
    }
    arg1 = reinterpret_cast< GaussianRandomGenerator * >(argp1);
    {
      try {
        result = (Real)GaussianRandomGenerator_nextValue((GaussianRandomGenerator const *)arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_GaussianRandomGenerator) {
  {
    GaussianRandomGenerator *arg1 = (GaussianRandomGenerator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_GaussianRandomGenerator(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GaussianRandomGenerator, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GaussianRandomGenerator" "', argument " "1"" of type '" "GaussianRandomGenerator *""'"); 
    }
    arg1 = reinterpret_cast< GaussianRandomGenerator * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_HaltonRsg__SWIG_0) {
  {
    Size arg1 ;
    unsigned long arg2 ;
    bool arg3 ;
    bool arg4 ;
    size_t val1 ;
    int ecode1 = 0 ;
    unsigned long val2 ;
    int ecode2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    HaltonRsg *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_HaltonRsg(dimensionality,seed,randomStart,randomShift);");
    }
    ecode1 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_HaltonRsg" "', argument " "1"" of type '" "Size""'");
    } 
    arg1 = static_cast< Size >(val1);
    ecode2 = SWIG_AsVal_unsigned_SS_long SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_HaltonRsg" "', argument " "2"" of type '" "unsigned long""'");
    } 
    arg2 = static_cast< unsigned long >(val2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_HaltonRsg" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_HaltonRsg" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    {
      try {
        result = (HaltonRsg *)new HaltonRsg(arg1,arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_HaltonRsg, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_HaltonRsg__SWIG_1) {
  {
    Size arg1 ;
    unsigned long arg2 ;
    bool arg3 ;
    size_t val1 ;
    int ecode1 = 0 ;
    unsigned long val2 ;
    int ecode2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    HaltonRsg *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_HaltonRsg(dimensionality,seed,randomStart);");
    }
    ecode1 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_HaltonRsg" "', argument " "1"" of type '" "Size""'");
    } 
    arg1 = static_cast< Size >(val1);
    ecode2 = SWIG_AsVal_unsigned_SS_long SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_HaltonRsg" "', argument " "2"" of type '" "unsigned long""'");
    } 
    arg2 = static_cast< unsigned long >(val2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_HaltonRsg" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (HaltonRsg *)new HaltonRsg(arg1,arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_HaltonRsg, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_HaltonRsg__SWIG_2) {
  {
    Size arg1 ;
    unsigned long arg2 ;
    size_t val1 ;
    int ecode1 = 0 ;
    unsigned long val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    HaltonRsg *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_HaltonRsg(dimensionality,seed);");
    }
    ecode1 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_HaltonRsg" "', argument " "1"" of type '" "Size""'");
    } 
    arg1 = static_cast< Size >(val1);
    ecode2 = SWIG_AsVal_unsigned_SS_long SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_HaltonRsg" "', argument " "2"" of type '" "unsigned long""'");
    } 
    arg2 = static_cast< unsigned long >(val2);
    {
      try {
        result = (HaltonRsg *)new HaltonRsg(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_HaltonRsg, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_HaltonRsg__SWIG_3) {
  {
    Size arg1 ;
    size_t val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    HaltonRsg *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_HaltonRsg(dimensionality);");
    }
    ecode1 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_HaltonRsg" "', argument " "1"" of type '" "Size""'");
    } 
    arg1 = static_cast< Size >(val1);
    {
      try {
        result = (HaltonRsg *)new HaltonRsg(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_HaltonRsg, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_HaltonRsg) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_long SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_long SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_long SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_HaltonRsg__SWIG_3); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_HaltonRsg__SWIG_2); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_HaltonRsg__SWIG_1); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_HaltonRsg__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_HaltonRsg'");
  XSRETURN(0);
}


XS(_wrap_HaltonRsg_nextSequence) {
  {
    HaltonRsg *arg1 = (HaltonRsg *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Sample< std::vector< Real > > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: HaltonRsg_nextSequence(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HaltonRsg, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HaltonRsg_nextSequence" "', argument " "1"" of type '" "HaltonRsg const *""'"); 
    }
    arg1 = reinterpret_cast< HaltonRsg * >(argp1);
    {
      try {
        result = (Sample< std::vector< Real > > *) &((HaltonRsg const *)arg1)->nextSequence();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SampleT_std__vectorT_double_t_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_HaltonRsg_lastSequence) {
  {
    HaltonRsg *arg1 = (HaltonRsg *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Sample< std::vector< Real > > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: HaltonRsg_lastSequence(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HaltonRsg, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HaltonRsg_lastSequence" "', argument " "1"" of type '" "HaltonRsg const *""'"); 
    }
    arg1 = reinterpret_cast< HaltonRsg * >(argp1);
    {
      try {
        result = (Sample< std::vector< Real > > *) &((HaltonRsg const *)arg1)->lastSequence();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SampleT_std__vectorT_double_t_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_HaltonRsg_dimension) {
  {
    HaltonRsg *arg1 = (HaltonRsg *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Size result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: HaltonRsg_dimension(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HaltonRsg, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HaltonRsg_dimension" "', argument " "1"" of type '" "HaltonRsg const *""'"); 
    }
    arg1 = reinterpret_cast< HaltonRsg * >(argp1);
    {
      try {
        result = ((HaltonRsg const *)arg1)->dimension();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_size_t  SWIG_PERL_CALL_ARGS_1(static_cast< size_t >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_HaltonRsg) {
  {
    HaltonRsg *arg1 = (HaltonRsg *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_HaltonRsg(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HaltonRsg, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_HaltonRsg" "', argument " "1"" of type '" "HaltonRsg *""'"); 
    }
    arg1 = reinterpret_cast< HaltonRsg * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SobolRsg__SWIG_0) {
  {
    Size arg1 ;
    BigInteger arg2 ;
    SobolRsg::DirectionIntegers arg3 ;
    size_t val1 ;
    int ecode1 = 0 ;
    long val2 ;
    int ecode2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    SobolRsg *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_SobolRsg(dimensionality,seed,directionIntegers);");
    }
    ecode1 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_SobolRsg" "', argument " "1"" of type '" "Size""'");
    } 
    arg1 = static_cast< Size >(val1);
    ecode2 = SWIG_AsVal_long SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_SobolRsg" "', argument " "2"" of type '" "BigInteger""'");
    } 
    arg2 = static_cast< BigInteger >(val2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_SobolRsg" "', argument " "3"" of type '" "SobolRsg::DirectionIntegers""'");
    } 
    arg3 = static_cast< SobolRsg::DirectionIntegers >(val3);
    {
      try {
        result = (SobolRsg *)new SobolRsg(arg1,arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SobolRsg, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SobolRsg__SWIG_1) {
  {
    Size arg1 ;
    BigInteger arg2 ;
    size_t val1 ;
    int ecode1 = 0 ;
    long val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    SobolRsg *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_SobolRsg(dimensionality,seed);");
    }
    ecode1 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_SobolRsg" "', argument " "1"" of type '" "Size""'");
    } 
    arg1 = static_cast< Size >(val1);
    ecode2 = SWIG_AsVal_long SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_SobolRsg" "', argument " "2"" of type '" "BigInteger""'");
    } 
    arg2 = static_cast< BigInteger >(val2);
    {
      try {
        result = (SobolRsg *)new SobolRsg(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SobolRsg, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SobolRsg__SWIG_2) {
  {
    Size arg1 ;
    size_t val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    SobolRsg *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_SobolRsg(dimensionality);");
    }
    ecode1 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_SobolRsg" "', argument " "1"" of type '" "Size""'");
    } 
    arg1 = static_cast< Size >(val1);
    {
      try {
        result = (SobolRsg *)new SobolRsg(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SobolRsg, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SobolRsg) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_long SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_long SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SobolRsg__SWIG_2); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SobolRsg__SWIG_1); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SobolRsg__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_SobolRsg'");
  XSRETURN(0);
}


XS(_wrap_SobolRsg_nextSequence) {
  {
    SobolRsg *arg1 = (SobolRsg *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Sample< std::vector< Real > > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: SobolRsg_nextSequence(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SobolRsg, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SobolRsg_nextSequence" "', argument " "1"" of type '" "SobolRsg const *""'"); 
    }
    arg1 = reinterpret_cast< SobolRsg * >(argp1);
    {
      try {
        result = (Sample< std::vector< Real > > *) &((SobolRsg const *)arg1)->nextSequence();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SampleT_std__vectorT_double_t_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_SobolRsg_lastSequence) {
  {
    SobolRsg *arg1 = (SobolRsg *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Sample< std::vector< Real > > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: SobolRsg_lastSequence(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SobolRsg, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SobolRsg_lastSequence" "', argument " "1"" of type '" "SobolRsg const *""'"); 
    }
    arg1 = reinterpret_cast< SobolRsg * >(argp1);
    {
      try {
        result = (Sample< std::vector< Real > > *) &((SobolRsg const *)arg1)->lastSequence();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SampleT_std__vectorT_double_t_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_SobolRsg_dimension) {
  {
    SobolRsg *arg1 = (SobolRsg *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Size result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: SobolRsg_dimension(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SobolRsg, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SobolRsg_dimension" "', argument " "1"" of type '" "SobolRsg const *""'"); 
    }
    arg1 = reinterpret_cast< SobolRsg * >(argp1);
    {
      try {
        result = ((SobolRsg const *)arg1)->dimension();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_size_t  SWIG_PERL_CALL_ARGS_1(static_cast< size_t >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_SobolRsg_skipTo) {
  {
    SobolRsg *arg1 = (SobolRsg *) 0 ;
    Size arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: SobolRsg_skipTo(self,n);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SobolRsg, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SobolRsg_skipTo" "', argument " "1"" of type '" "SobolRsg *""'"); 
    }
    arg1 = reinterpret_cast< SobolRsg * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SobolRsg_skipTo" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    {
      try {
        (arg1)->skipTo(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_SobolRsg_nextInt32Sequence) {
  {
    SobolRsg *arg1 = (SobolRsg *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< unsigned int > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: SobolRsg_nextInt32Sequence(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SobolRsg, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SobolRsg_nextInt32Sequence" "', argument " "1"" of type '" "SobolRsg *""'"); 
    }
    arg1 = reinterpret_cast< SobolRsg * >(argp1);
    {
      try {
        result = SobolRsg_nextInt32Sequence(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        svs[i] = sv_newmortal();
        sv_setiv(svs[i], result[i]);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_SobolRsg) {
  {
    SobolRsg *arg1 = (SobolRsg *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_SobolRsg(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SobolRsg, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SobolRsg" "', argument " "1"" of type '" "SobolRsg *""'"); 
    }
    arg1 = reinterpret_cast< SobolRsg * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SobolBrownianBridgeRsg) {
  {
    Size arg1 ;
    Size arg2 ;
    size_t val1 ;
    int ecode1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    SobolBrownianBridgeRsg *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_SobolBrownianBridgeRsg(factors,steps);");
    }
    ecode1 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_SobolBrownianBridgeRsg" "', argument " "1"" of type '" "Size""'");
    } 
    arg1 = static_cast< Size >(val1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_SobolBrownianBridgeRsg" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    {
      try {
        result = (SobolBrownianBridgeRsg *)new SobolBrownianBridgeRsg(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SobolBrownianBridgeRsg, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_SobolBrownianBridgeRsg_nextSequence) {
  {
    SobolBrownianBridgeRsg *arg1 = (SobolBrownianBridgeRsg *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Sample< std::vector< Real > > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: SobolBrownianBridgeRsg_nextSequence(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SobolBrownianBridgeRsg, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SobolBrownianBridgeRsg_nextSequence" "', argument " "1"" of type '" "SobolBrownianBridgeRsg const *""'"); 
    }
    arg1 = reinterpret_cast< SobolBrownianBridgeRsg * >(argp1);
    {
      try {
        result = (Sample< std::vector< Real > > *) &((SobolBrownianBridgeRsg const *)arg1)->nextSequence();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SampleT_std__vectorT_double_t_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_SobolBrownianBridgeRsg_lastSequence) {
  {
    SobolBrownianBridgeRsg *arg1 = (SobolBrownianBridgeRsg *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Sample< std::vector< Real > > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: SobolBrownianBridgeRsg_lastSequence(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SobolBrownianBridgeRsg, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SobolBrownianBridgeRsg_lastSequence" "', argument " "1"" of type '" "SobolBrownianBridgeRsg const *""'"); 
    }
    arg1 = reinterpret_cast< SobolBrownianBridgeRsg * >(argp1);
    {
      try {
        result = (Sample< std::vector< Real > > *) &((SobolBrownianBridgeRsg const *)arg1)->lastSequence();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SampleT_std__vectorT_double_t_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_SobolBrownianBridgeRsg_dimension) {
  {
    SobolBrownianBridgeRsg *arg1 = (SobolBrownianBridgeRsg *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Size result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: SobolBrownianBridgeRsg_dimension(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SobolBrownianBridgeRsg, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SobolBrownianBridgeRsg_dimension" "', argument " "1"" of type '" "SobolBrownianBridgeRsg const *""'"); 
    }
    arg1 = reinterpret_cast< SobolBrownianBridgeRsg * >(argp1);
    {
      try {
        result = ((SobolBrownianBridgeRsg const *)arg1)->dimension();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_size_t  SWIG_PERL_CALL_ARGS_1(static_cast< size_t >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_SobolBrownianBridgeRsg) {
  {
    SobolBrownianBridgeRsg *arg1 = (SobolBrownianBridgeRsg *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_SobolBrownianBridgeRsg(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SobolBrownianBridgeRsg, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SobolBrownianBridgeRsg" "', argument " "1"" of type '" "SobolBrownianBridgeRsg *""'"); 
    }
    arg1 = reinterpret_cast< SobolBrownianBridgeRsg * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_LecuyerUniformRsg) {
  {
    Size arg1 ;
    LecuyerUniformRng *arg2 = 0 ;
    size_t val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    RandomSequenceGenerator< LecuyerUniformRng > *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_LecuyerUniformRsg(dimensionality,rng);");
    }
    ecode1 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_LecuyerUniformRsg" "', argument " "1"" of type '" "Size""'");
    } 
    arg1 = static_cast< Size >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_LecuyerUniformRng,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_LecuyerUniformRsg" "', argument " "2"" of type '" "LecuyerUniformRng const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LecuyerUniformRsg" "', argument " "2"" of type '" "LecuyerUniformRng const &""'"); 
    }
    arg2 = reinterpret_cast< LecuyerUniformRng * >(argp2);
    {
      try {
        result = (RandomSequenceGenerator< LecuyerUniformRng > *)new RandomSequenceGenerator< LecuyerUniformRng >(arg1,(LecuyerUniformRng const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_RandomSequenceGeneratorT_LecuyerUniformRng_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_LecuyerUniformRsg_nextSequence) {
  {
    RandomSequenceGenerator< LecuyerUniformRng > *arg1 = (RandomSequenceGenerator< LecuyerUniformRng > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Sample< std::vector< Real > > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: LecuyerUniformRsg_nextSequence(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_RandomSequenceGeneratorT_LecuyerUniformRng_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LecuyerUniformRsg_nextSequence" "', argument " "1"" of type '" "RandomSequenceGenerator< LecuyerUniformRng > const *""'"); 
    }
    arg1 = reinterpret_cast< RandomSequenceGenerator< LecuyerUniformRng > * >(argp1);
    {
      try {
        result = (Sample< std::vector< Real > > *) &((RandomSequenceGenerator< LecuyerUniformRng > const *)arg1)->nextSequence();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SampleT_std__vectorT_double_t_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_LecuyerUniformRsg_dimension) {
  {
    RandomSequenceGenerator< LecuyerUniformRng > *arg1 = (RandomSequenceGenerator< LecuyerUniformRng > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Size result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: LecuyerUniformRsg_dimension(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_RandomSequenceGeneratorT_LecuyerUniformRng_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LecuyerUniformRsg_dimension" "', argument " "1"" of type '" "RandomSequenceGenerator< LecuyerUniformRng > const *""'"); 
    }
    arg1 = reinterpret_cast< RandomSequenceGenerator< LecuyerUniformRng > * >(argp1);
    {
      try {
        result = ((RandomSequenceGenerator< LecuyerUniformRng > const *)arg1)->dimension();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_size_t  SWIG_PERL_CALL_ARGS_1(static_cast< size_t >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_LecuyerUniformRsg) {
  {
    RandomSequenceGenerator< LecuyerUniformRng > *arg1 = (RandomSequenceGenerator< LecuyerUniformRng > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_LecuyerUniformRsg(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_RandomSequenceGeneratorT_LecuyerUniformRng_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_LecuyerUniformRsg" "', argument " "1"" of type '" "RandomSequenceGenerator< LecuyerUniformRng > *""'"); 
    }
    arg1 = reinterpret_cast< RandomSequenceGenerator< LecuyerUniformRng > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_KnuthUniformRsg) {
  {
    Size arg1 ;
    KnuthUniformRng *arg2 = 0 ;
    size_t val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    RandomSequenceGenerator< KnuthUniformRng > *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_KnuthUniformRsg(dimensionality,rng);");
    }
    ecode1 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_KnuthUniformRsg" "', argument " "1"" of type '" "Size""'");
    } 
    arg1 = static_cast< Size >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_KnuthUniformRng,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_KnuthUniformRsg" "', argument " "2"" of type '" "KnuthUniformRng const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_KnuthUniformRsg" "', argument " "2"" of type '" "KnuthUniformRng const &""'"); 
    }
    arg2 = reinterpret_cast< KnuthUniformRng * >(argp2);
    {
      try {
        result = (RandomSequenceGenerator< KnuthUniformRng > *)new RandomSequenceGenerator< KnuthUniformRng >(arg1,(KnuthUniformRng const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_RandomSequenceGeneratorT_KnuthUniformRng_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_KnuthUniformRsg_nextSequence) {
  {
    RandomSequenceGenerator< KnuthUniformRng > *arg1 = (RandomSequenceGenerator< KnuthUniformRng > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Sample< std::vector< Real > > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: KnuthUniformRsg_nextSequence(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_RandomSequenceGeneratorT_KnuthUniformRng_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "KnuthUniformRsg_nextSequence" "', argument " "1"" of type '" "RandomSequenceGenerator< KnuthUniformRng > const *""'"); 
    }
    arg1 = reinterpret_cast< RandomSequenceGenerator< KnuthUniformRng > * >(argp1);
    {
      try {
        result = (Sample< std::vector< Real > > *) &((RandomSequenceGenerator< KnuthUniformRng > const *)arg1)->nextSequence();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SampleT_std__vectorT_double_t_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_KnuthUniformRsg_dimension) {
  {
    RandomSequenceGenerator< KnuthUniformRng > *arg1 = (RandomSequenceGenerator< KnuthUniformRng > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Size result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: KnuthUniformRsg_dimension(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_RandomSequenceGeneratorT_KnuthUniformRng_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "KnuthUniformRsg_dimension" "', argument " "1"" of type '" "RandomSequenceGenerator< KnuthUniformRng > const *""'"); 
    }
    arg1 = reinterpret_cast< RandomSequenceGenerator< KnuthUniformRng > * >(argp1);
    {
      try {
        result = ((RandomSequenceGenerator< KnuthUniformRng > const *)arg1)->dimension();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_size_t  SWIG_PERL_CALL_ARGS_1(static_cast< size_t >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_KnuthUniformRsg) {
  {
    RandomSequenceGenerator< KnuthUniformRng > *arg1 = (RandomSequenceGenerator< KnuthUniformRng > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_KnuthUniformRsg(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_RandomSequenceGeneratorT_KnuthUniformRng_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_KnuthUniformRsg" "', argument " "1"" of type '" "RandomSequenceGenerator< KnuthUniformRng > *""'"); 
    }
    arg1 = reinterpret_cast< RandomSequenceGenerator< KnuthUniformRng > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MersenneTwisterUniformRsg) {
  {
    Size arg1 ;
    MersenneTwisterUniformRng *arg2 = 0 ;
    size_t val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    RandomSequenceGenerator< MersenneTwisterUniformRng > *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_MersenneTwisterUniformRsg(dimensionality,rng);");
    }
    ecode1 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_MersenneTwisterUniformRsg" "', argument " "1"" of type '" "Size""'");
    } 
    arg1 = static_cast< Size >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_MersenneTwisterUniformRng,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_MersenneTwisterUniformRsg" "', argument " "2"" of type '" "MersenneTwisterUniformRng const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MersenneTwisterUniformRsg" "', argument " "2"" of type '" "MersenneTwisterUniformRng const &""'"); 
    }
    arg2 = reinterpret_cast< MersenneTwisterUniformRng * >(argp2);
    {
      try {
        result = (RandomSequenceGenerator< MersenneTwisterUniformRng > *)new RandomSequenceGenerator< MersenneTwisterUniformRng >(arg1,(MersenneTwisterUniformRng const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_RandomSequenceGeneratorT_MersenneTwisterUniformRng_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_MersenneTwisterUniformRsg_nextSequence) {
  {
    RandomSequenceGenerator< MersenneTwisterUniformRng > *arg1 = (RandomSequenceGenerator< MersenneTwisterUniformRng > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Sample< std::vector< Real > > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MersenneTwisterUniformRsg_nextSequence(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_RandomSequenceGeneratorT_MersenneTwisterUniformRng_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MersenneTwisterUniformRsg_nextSequence" "', argument " "1"" of type '" "RandomSequenceGenerator< MersenneTwisterUniformRng > const *""'"); 
    }
    arg1 = reinterpret_cast< RandomSequenceGenerator< MersenneTwisterUniformRng > * >(argp1);
    {
      try {
        result = (Sample< std::vector< Real > > *) &((RandomSequenceGenerator< MersenneTwisterUniformRng > const *)arg1)->nextSequence();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SampleT_std__vectorT_double_t_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MersenneTwisterUniformRsg_dimension) {
  {
    RandomSequenceGenerator< MersenneTwisterUniformRng > *arg1 = (RandomSequenceGenerator< MersenneTwisterUniformRng > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Size result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MersenneTwisterUniformRsg_dimension(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_RandomSequenceGeneratorT_MersenneTwisterUniformRng_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MersenneTwisterUniformRsg_dimension" "', argument " "1"" of type '" "RandomSequenceGenerator< MersenneTwisterUniformRng > const *""'"); 
    }
    arg1 = reinterpret_cast< RandomSequenceGenerator< MersenneTwisterUniformRng > * >(argp1);
    {
      try {
        result = ((RandomSequenceGenerator< MersenneTwisterUniformRng > const *)arg1)->dimension();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_size_t  SWIG_PERL_CALL_ARGS_1(static_cast< size_t >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_MersenneTwisterUniformRsg) {
  {
    RandomSequenceGenerator< MersenneTwisterUniformRng > *arg1 = (RandomSequenceGenerator< MersenneTwisterUniformRng > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_MersenneTwisterUniformRsg(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_RandomSequenceGeneratorT_MersenneTwisterUniformRng_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MersenneTwisterUniformRsg" "', argument " "1"" of type '" "RandomSequenceGenerator< MersenneTwisterUniformRng > *""'"); 
    }
    arg1 = reinterpret_cast< RandomSequenceGenerator< MersenneTwisterUniformRng > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_UniformRandomSequenceGenerator) {
  {
    Size arg1 ;
    UniformRandomGenerator *arg2 = 0 ;
    size_t val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    UniformRandomSequenceGenerator *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_UniformRandomSequenceGenerator(dimensionality,rng);");
    }
    ecode1 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_UniformRandomSequenceGenerator" "', argument " "1"" of type '" "Size""'");
    } 
    arg1 = static_cast< Size >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_UniformRandomGenerator,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_UniformRandomSequenceGenerator" "', argument " "2"" of type '" "UniformRandomGenerator const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_UniformRandomSequenceGenerator" "', argument " "2"" of type '" "UniformRandomGenerator const &""'"); 
    }
    arg2 = reinterpret_cast< UniformRandomGenerator * >(argp2);
    {
      try {
        result = (UniformRandomSequenceGenerator *)new UniformRandomSequenceGenerator(arg1,(UniformRandomGenerator const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UniformRandomSequenceGenerator, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_UniformRandomSequenceGenerator_nextSequence) {
  {
    UniformRandomSequenceGenerator *arg1 = (UniformRandomSequenceGenerator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Sample< std::vector< Real > > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: UniformRandomSequenceGenerator_nextSequence(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_UniformRandomSequenceGenerator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UniformRandomSequenceGenerator_nextSequence" "', argument " "1"" of type '" "UniformRandomSequenceGenerator const *""'"); 
    }
    arg1 = reinterpret_cast< UniformRandomSequenceGenerator * >(argp1);
    {
      try {
        result = (Sample< std::vector< Real > > *) &((UniformRandomSequenceGenerator const *)arg1)->nextSequence();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SampleT_std__vectorT_double_t_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_UniformRandomSequenceGenerator_dimension) {
  {
    UniformRandomSequenceGenerator *arg1 = (UniformRandomSequenceGenerator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Size result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: UniformRandomSequenceGenerator_dimension(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_UniformRandomSequenceGenerator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UniformRandomSequenceGenerator_dimension" "', argument " "1"" of type '" "UniformRandomSequenceGenerator const *""'"); 
    }
    arg1 = reinterpret_cast< UniformRandomSequenceGenerator * >(argp1);
    {
      try {
        result = ((UniformRandomSequenceGenerator const *)arg1)->dimension();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_size_t  SWIG_PERL_CALL_ARGS_1(static_cast< size_t >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_UniformRandomSequenceGenerator) {
  {
    UniformRandomSequenceGenerator *arg1 = (UniformRandomSequenceGenerator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_UniformRandomSequenceGenerator(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_UniformRandomSequenceGenerator, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UniformRandomSequenceGenerator" "', argument " "1"" of type '" "UniformRandomSequenceGenerator *""'"); 
    }
    arg1 = reinterpret_cast< UniformRandomSequenceGenerator * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_UniformLowDiscrepancySequenceGenerator) {
  {
    Size arg1 ;
    size_t val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    UniformLowDiscrepancySequenceGenerator *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_UniformLowDiscrepancySequenceGenerator(dimensionality);");
    }
    ecode1 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_UniformLowDiscrepancySequenceGenerator" "', argument " "1"" of type '" "Size""'");
    } 
    arg1 = static_cast< Size >(val1);
    {
      try {
        result = (UniformLowDiscrepancySequenceGenerator *)new UniformLowDiscrepancySequenceGenerator(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UniformLowDiscrepancySequenceGenerator, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_UniformLowDiscrepancySequenceGenerator_nextSequence) {
  {
    UniformLowDiscrepancySequenceGenerator *arg1 = (UniformLowDiscrepancySequenceGenerator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Sample< std::vector< Real > > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: UniformLowDiscrepancySequenceGenerator_nextSequence(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_UniformLowDiscrepancySequenceGenerator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UniformLowDiscrepancySequenceGenerator_nextSequence" "', argument " "1"" of type '" "UniformLowDiscrepancySequenceGenerator const *""'"); 
    }
    arg1 = reinterpret_cast< UniformLowDiscrepancySequenceGenerator * >(argp1);
    {
      try {
        result = (Sample< std::vector< Real > > *) &((UniformLowDiscrepancySequenceGenerator const *)arg1)->nextSequence();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SampleT_std__vectorT_double_t_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_UniformLowDiscrepancySequenceGenerator_dimension) {
  {
    UniformLowDiscrepancySequenceGenerator *arg1 = (UniformLowDiscrepancySequenceGenerator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Size result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: UniformLowDiscrepancySequenceGenerator_dimension(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_UniformLowDiscrepancySequenceGenerator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "UniformLowDiscrepancySequenceGenerator_dimension" "', argument " "1"" of type '" "UniformLowDiscrepancySequenceGenerator const *""'"); 
    }
    arg1 = reinterpret_cast< UniformLowDiscrepancySequenceGenerator * >(argp1);
    {
      try {
        result = ((UniformLowDiscrepancySequenceGenerator const *)arg1)->dimension();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_size_t  SWIG_PERL_CALL_ARGS_1(static_cast< size_t >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_UniformLowDiscrepancySequenceGenerator) {
  {
    UniformLowDiscrepancySequenceGenerator *arg1 = (UniformLowDiscrepancySequenceGenerator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_UniformLowDiscrepancySequenceGenerator(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_UniformLowDiscrepancySequenceGenerator, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UniformLowDiscrepancySequenceGenerator" "', argument " "1"" of type '" "UniformLowDiscrepancySequenceGenerator *""'"); 
    }
    arg1 = reinterpret_cast< UniformLowDiscrepancySequenceGenerator * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MoroInvCumulativeLecuyerGaussianRsg) {
  {
    RandomSequenceGenerator< LecuyerUniformRng > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    InverseCumulativeRsg< RandomSequenceGenerator< LecuyerUniformRng >,MoroInverseCumulativeNormal > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_MoroInvCumulativeLecuyerGaussianRsg(uniformSequenceGenerator);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_RandomSequenceGeneratorT_LecuyerUniformRng_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MoroInvCumulativeLecuyerGaussianRsg" "', argument " "1"" of type '" "RandomSequenceGenerator< LecuyerUniformRng > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MoroInvCumulativeLecuyerGaussianRsg" "', argument " "1"" of type '" "RandomSequenceGenerator< LecuyerUniformRng > const &""'"); 
    }
    arg1 = reinterpret_cast< RandomSequenceGenerator< LecuyerUniformRng > * >(argp1);
    {
      try {
        result = (InverseCumulativeRsg< RandomSequenceGenerator< LecuyerUniformRng >,MoroInverseCumulativeNormal > *)new InverseCumulativeRsg< RandomSequenceGenerator< LecuyerUniformRng >,MoroInverseCumulativeNormal >((RandomSequenceGenerator< LecuyerUniformRng > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_InverseCumulativeRsgT_RandomSequenceGeneratorT_LecuyerUniformRng_t_MoroInverseCumulativeNormal_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MoroInvCumulativeLecuyerGaussianRsg_nextSequence) {
  {
    InverseCumulativeRsg< RandomSequenceGenerator< LecuyerUniformRng >,MoroInverseCumulativeNormal > *arg1 = (InverseCumulativeRsg< RandomSequenceGenerator< LecuyerUniformRng >,MoroInverseCumulativeNormal > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Sample< std::vector< Real > > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MoroInvCumulativeLecuyerGaussianRsg_nextSequence(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_InverseCumulativeRsgT_RandomSequenceGeneratorT_LecuyerUniformRng_t_MoroInverseCumulativeNormal_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MoroInvCumulativeLecuyerGaussianRsg_nextSequence" "', argument " "1"" of type '" "InverseCumulativeRsg< RandomSequenceGenerator< LecuyerUniformRng >,MoroInverseCumulativeNormal > const *""'"); 
    }
    arg1 = reinterpret_cast< InverseCumulativeRsg< RandomSequenceGenerator< LecuyerUniformRng >,MoroInverseCumulativeNormal > * >(argp1);
    {
      try {
        result = (Sample< std::vector< Real > > *) &((InverseCumulativeRsg< RandomSequenceGenerator< LecuyerUniformRng >,MoroInverseCumulativeNormal > const *)arg1)->nextSequence();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SampleT_std__vectorT_double_t_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MoroInvCumulativeLecuyerGaussianRsg_dimension) {
  {
    InverseCumulativeRsg< RandomSequenceGenerator< LecuyerUniformRng >,MoroInverseCumulativeNormal > *arg1 = (InverseCumulativeRsg< RandomSequenceGenerator< LecuyerUniformRng >,MoroInverseCumulativeNormal > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Size result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MoroInvCumulativeLecuyerGaussianRsg_dimension(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_InverseCumulativeRsgT_RandomSequenceGeneratorT_LecuyerUniformRng_t_MoroInverseCumulativeNormal_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MoroInvCumulativeLecuyerGaussianRsg_dimension" "', argument " "1"" of type '" "InverseCumulativeRsg< RandomSequenceGenerator< LecuyerUniformRng >,MoroInverseCumulativeNormal > const *""'"); 
    }
    arg1 = reinterpret_cast< InverseCumulativeRsg< RandomSequenceGenerator< LecuyerUniformRng >,MoroInverseCumulativeNormal > * >(argp1);
    {
      try {
        result = ((InverseCumulativeRsg< RandomSequenceGenerator< LecuyerUniformRng >,MoroInverseCumulativeNormal > const *)arg1)->dimension();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_size_t  SWIG_PERL_CALL_ARGS_1(static_cast< size_t >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_MoroInvCumulativeLecuyerGaussianRsg) {
  {
    InverseCumulativeRsg< RandomSequenceGenerator< LecuyerUniformRng >,MoroInverseCumulativeNormal > *arg1 = (InverseCumulativeRsg< RandomSequenceGenerator< LecuyerUniformRng >,MoroInverseCumulativeNormal > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_MoroInvCumulativeLecuyerGaussianRsg(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_InverseCumulativeRsgT_RandomSequenceGeneratorT_LecuyerUniformRng_t_MoroInverseCumulativeNormal_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MoroInvCumulativeLecuyerGaussianRsg" "', argument " "1"" of type '" "InverseCumulativeRsg< RandomSequenceGenerator< LecuyerUniformRng >,MoroInverseCumulativeNormal > *""'"); 
    }
    arg1 = reinterpret_cast< InverseCumulativeRsg< RandomSequenceGenerator< LecuyerUniformRng >,MoroInverseCumulativeNormal > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MoroInvCumulativeKnuthGaussianRsg) {
  {
    RandomSequenceGenerator< KnuthUniformRng > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    InverseCumulativeRsg< RandomSequenceGenerator< KnuthUniformRng >,MoroInverseCumulativeNormal > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_MoroInvCumulativeKnuthGaussianRsg(uniformSequenceGenerator);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_RandomSequenceGeneratorT_KnuthUniformRng_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MoroInvCumulativeKnuthGaussianRsg" "', argument " "1"" of type '" "RandomSequenceGenerator< KnuthUniformRng > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MoroInvCumulativeKnuthGaussianRsg" "', argument " "1"" of type '" "RandomSequenceGenerator< KnuthUniformRng > const &""'"); 
    }
    arg1 = reinterpret_cast< RandomSequenceGenerator< KnuthUniformRng > * >(argp1);
    {
      try {
        result = (InverseCumulativeRsg< RandomSequenceGenerator< KnuthUniformRng >,MoroInverseCumulativeNormal > *)new InverseCumulativeRsg< RandomSequenceGenerator< KnuthUniformRng >,MoroInverseCumulativeNormal >((RandomSequenceGenerator< KnuthUniformRng > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_InverseCumulativeRsgT_RandomSequenceGeneratorT_KnuthUniformRng_t_MoroInverseCumulativeNormal_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MoroInvCumulativeKnuthGaussianRsg_nextSequence) {
  {
    InverseCumulativeRsg< RandomSequenceGenerator< KnuthUniformRng >,MoroInverseCumulativeNormal > *arg1 = (InverseCumulativeRsg< RandomSequenceGenerator< KnuthUniformRng >,MoroInverseCumulativeNormal > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Sample< std::vector< Real > > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MoroInvCumulativeKnuthGaussianRsg_nextSequence(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_InverseCumulativeRsgT_RandomSequenceGeneratorT_KnuthUniformRng_t_MoroInverseCumulativeNormal_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MoroInvCumulativeKnuthGaussianRsg_nextSequence" "', argument " "1"" of type '" "InverseCumulativeRsg< RandomSequenceGenerator< KnuthUniformRng >,MoroInverseCumulativeNormal > const *""'"); 
    }
    arg1 = reinterpret_cast< InverseCumulativeRsg< RandomSequenceGenerator< KnuthUniformRng >,MoroInverseCumulativeNormal > * >(argp1);
    {
      try {
        result = (Sample< std::vector< Real > > *) &((InverseCumulativeRsg< RandomSequenceGenerator< KnuthUniformRng >,MoroInverseCumulativeNormal > const *)arg1)->nextSequence();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SampleT_std__vectorT_double_t_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MoroInvCumulativeKnuthGaussianRsg_dimension) {
  {
    InverseCumulativeRsg< RandomSequenceGenerator< KnuthUniformRng >,MoroInverseCumulativeNormal > *arg1 = (InverseCumulativeRsg< RandomSequenceGenerator< KnuthUniformRng >,MoroInverseCumulativeNormal > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Size result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MoroInvCumulativeKnuthGaussianRsg_dimension(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_InverseCumulativeRsgT_RandomSequenceGeneratorT_KnuthUniformRng_t_MoroInverseCumulativeNormal_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MoroInvCumulativeKnuthGaussianRsg_dimension" "', argument " "1"" of type '" "InverseCumulativeRsg< RandomSequenceGenerator< KnuthUniformRng >,MoroInverseCumulativeNormal > const *""'"); 
    }
    arg1 = reinterpret_cast< InverseCumulativeRsg< RandomSequenceGenerator< KnuthUniformRng >,MoroInverseCumulativeNormal > * >(argp1);
    {
      try {
        result = ((InverseCumulativeRsg< RandomSequenceGenerator< KnuthUniformRng >,MoroInverseCumulativeNormal > const *)arg1)->dimension();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_size_t  SWIG_PERL_CALL_ARGS_1(static_cast< size_t >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_MoroInvCumulativeKnuthGaussianRsg) {
  {
    InverseCumulativeRsg< RandomSequenceGenerator< KnuthUniformRng >,MoroInverseCumulativeNormal > *arg1 = (InverseCumulativeRsg< RandomSequenceGenerator< KnuthUniformRng >,MoroInverseCumulativeNormal > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_MoroInvCumulativeKnuthGaussianRsg(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_InverseCumulativeRsgT_RandomSequenceGeneratorT_KnuthUniformRng_t_MoroInverseCumulativeNormal_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MoroInvCumulativeKnuthGaussianRsg" "', argument " "1"" of type '" "InverseCumulativeRsg< RandomSequenceGenerator< KnuthUniformRng >,MoroInverseCumulativeNormal > *""'"); 
    }
    arg1 = reinterpret_cast< InverseCumulativeRsg< RandomSequenceGenerator< KnuthUniformRng >,MoroInverseCumulativeNormal > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MoroInvCumulativeMersenneTwisterGaussianRsg) {
  {
    RandomSequenceGenerator< MersenneTwisterUniformRng > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    InverseCumulativeRsg< RandomSequenceGenerator< MersenneTwisterUniformRng >,MoroInverseCumulativeNormal > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_MoroInvCumulativeMersenneTwisterGaussianRsg(uniformSequenceGenerator);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_RandomSequenceGeneratorT_MersenneTwisterUniformRng_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MoroInvCumulativeMersenneTwisterGaussianRsg" "', argument " "1"" of type '" "RandomSequenceGenerator< MersenneTwisterUniformRng > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MoroInvCumulativeMersenneTwisterGaussianRsg" "', argument " "1"" of type '" "RandomSequenceGenerator< MersenneTwisterUniformRng > const &""'"); 
    }
    arg1 = reinterpret_cast< RandomSequenceGenerator< MersenneTwisterUniformRng > * >(argp1);
    {
      try {
        result = (InverseCumulativeRsg< RandomSequenceGenerator< MersenneTwisterUniformRng >,MoroInverseCumulativeNormal > *)new InverseCumulativeRsg< RandomSequenceGenerator< MersenneTwisterUniformRng >,MoroInverseCumulativeNormal >((RandomSequenceGenerator< MersenneTwisterUniformRng > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_InverseCumulativeRsgT_RandomSequenceGeneratorT_MersenneTwisterUniformRng_t_MoroInverseCumulativeNormal_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MoroInvCumulativeMersenneTwisterGaussianRsg_nextSequence) {
  {
    InverseCumulativeRsg< RandomSequenceGenerator< MersenneTwisterUniformRng >,MoroInverseCumulativeNormal > *arg1 = (InverseCumulativeRsg< RandomSequenceGenerator< MersenneTwisterUniformRng >,MoroInverseCumulativeNormal > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Sample< std::vector< Real > > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MoroInvCumulativeMersenneTwisterGaussianRsg_nextSequence(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_InverseCumulativeRsgT_RandomSequenceGeneratorT_MersenneTwisterUniformRng_t_MoroInverseCumulativeNormal_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MoroInvCumulativeMersenneTwisterGaussianRsg_nextSequence" "', argument " "1"" of type '" "InverseCumulativeRsg< RandomSequenceGenerator< MersenneTwisterUniformRng >,MoroInverseCumulativeNormal > const *""'"); 
    }
    arg1 = reinterpret_cast< InverseCumulativeRsg< RandomSequenceGenerator< MersenneTwisterUniformRng >,MoroInverseCumulativeNormal > * >(argp1);
    {
      try {
        result = (Sample< std::vector< Real > > *) &((InverseCumulativeRsg< RandomSequenceGenerator< MersenneTwisterUniformRng >,MoroInverseCumulativeNormal > const *)arg1)->nextSequence();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SampleT_std__vectorT_double_t_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MoroInvCumulativeMersenneTwisterGaussianRsg_dimension) {
  {
    InverseCumulativeRsg< RandomSequenceGenerator< MersenneTwisterUniformRng >,MoroInverseCumulativeNormal > *arg1 = (InverseCumulativeRsg< RandomSequenceGenerator< MersenneTwisterUniformRng >,MoroInverseCumulativeNormal > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Size result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MoroInvCumulativeMersenneTwisterGaussianRsg_dimension(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_InverseCumulativeRsgT_RandomSequenceGeneratorT_MersenneTwisterUniformRng_t_MoroInverseCumulativeNormal_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MoroInvCumulativeMersenneTwisterGaussianRsg_dimension" "', argument " "1"" of type '" "InverseCumulativeRsg< RandomSequenceGenerator< MersenneTwisterUniformRng >,MoroInverseCumulativeNormal > const *""'"); 
    }
    arg1 = reinterpret_cast< InverseCumulativeRsg< RandomSequenceGenerator< MersenneTwisterUniformRng >,MoroInverseCumulativeNormal > * >(argp1);
    {
      try {
        result = ((InverseCumulativeRsg< RandomSequenceGenerator< MersenneTwisterUniformRng >,MoroInverseCumulativeNormal > const *)arg1)->dimension();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_size_t  SWIG_PERL_CALL_ARGS_1(static_cast< size_t >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_MoroInvCumulativeMersenneTwisterGaussianRsg) {
  {
    InverseCumulativeRsg< RandomSequenceGenerator< MersenneTwisterUniformRng >,MoroInverseCumulativeNormal > *arg1 = (InverseCumulativeRsg< RandomSequenceGenerator< MersenneTwisterUniformRng >,MoroInverseCumulativeNormal > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_MoroInvCumulativeMersenneTwisterGaussianRsg(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_InverseCumulativeRsgT_RandomSequenceGeneratorT_MersenneTwisterUniformRng_t_MoroInverseCumulativeNormal_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MoroInvCumulativeMersenneTwisterGaussianRsg" "', argument " "1"" of type '" "InverseCumulativeRsg< RandomSequenceGenerator< MersenneTwisterUniformRng >,MoroInverseCumulativeNormal > *""'"); 
    }
    arg1 = reinterpret_cast< InverseCumulativeRsg< RandomSequenceGenerator< MersenneTwisterUniformRng >,MoroInverseCumulativeNormal > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MoroInvCumulativeHaltonGaussianRsg) {
  {
    HaltonRsg *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    InverseCumulativeRsg< HaltonRsg,MoroInverseCumulativeNormal > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_MoroInvCumulativeHaltonGaussianRsg(uniformSequenceGenerator);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HaltonRsg,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MoroInvCumulativeHaltonGaussianRsg" "', argument " "1"" of type '" "HaltonRsg const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MoroInvCumulativeHaltonGaussianRsg" "', argument " "1"" of type '" "HaltonRsg const &""'"); 
    }
    arg1 = reinterpret_cast< HaltonRsg * >(argp1);
    {
      try {
        result = (InverseCumulativeRsg< HaltonRsg,MoroInverseCumulativeNormal > *)new InverseCumulativeRsg< HaltonRsg,MoroInverseCumulativeNormal >((HaltonRsg const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_InverseCumulativeRsgT_HaltonRsg_MoroInverseCumulativeNormal_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MoroInvCumulativeHaltonGaussianRsg_nextSequence) {
  {
    InverseCumulativeRsg< HaltonRsg,MoroInverseCumulativeNormal > *arg1 = (InverseCumulativeRsg< HaltonRsg,MoroInverseCumulativeNormal > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Sample< std::vector< Real > > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MoroInvCumulativeHaltonGaussianRsg_nextSequence(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_InverseCumulativeRsgT_HaltonRsg_MoroInverseCumulativeNormal_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MoroInvCumulativeHaltonGaussianRsg_nextSequence" "', argument " "1"" of type '" "InverseCumulativeRsg< HaltonRsg,MoroInverseCumulativeNormal > const *""'"); 
    }
    arg1 = reinterpret_cast< InverseCumulativeRsg< HaltonRsg,MoroInverseCumulativeNormal > * >(argp1);
    {
      try {
        result = (Sample< std::vector< Real > > *) &((InverseCumulativeRsg< HaltonRsg,MoroInverseCumulativeNormal > const *)arg1)->nextSequence();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SampleT_std__vectorT_double_t_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MoroInvCumulativeHaltonGaussianRsg_dimension) {
  {
    InverseCumulativeRsg< HaltonRsg,MoroInverseCumulativeNormal > *arg1 = (InverseCumulativeRsg< HaltonRsg,MoroInverseCumulativeNormal > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Size result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MoroInvCumulativeHaltonGaussianRsg_dimension(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_InverseCumulativeRsgT_HaltonRsg_MoroInverseCumulativeNormal_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MoroInvCumulativeHaltonGaussianRsg_dimension" "', argument " "1"" of type '" "InverseCumulativeRsg< HaltonRsg,MoroInverseCumulativeNormal > const *""'"); 
    }
    arg1 = reinterpret_cast< InverseCumulativeRsg< HaltonRsg,MoroInverseCumulativeNormal > * >(argp1);
    {
      try {
        result = ((InverseCumulativeRsg< HaltonRsg,MoroInverseCumulativeNormal > const *)arg1)->dimension();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_size_t  SWIG_PERL_CALL_ARGS_1(static_cast< size_t >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_MoroInvCumulativeHaltonGaussianRsg) {
  {
    InverseCumulativeRsg< HaltonRsg,MoroInverseCumulativeNormal > *arg1 = (InverseCumulativeRsg< HaltonRsg,MoroInverseCumulativeNormal > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_MoroInvCumulativeHaltonGaussianRsg(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_InverseCumulativeRsgT_HaltonRsg_MoroInverseCumulativeNormal_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MoroInvCumulativeHaltonGaussianRsg" "', argument " "1"" of type '" "InverseCumulativeRsg< HaltonRsg,MoroInverseCumulativeNormal > *""'"); 
    }
    arg1 = reinterpret_cast< InverseCumulativeRsg< HaltonRsg,MoroInverseCumulativeNormal > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MoroInvCumulativeSobolGaussianRsg) {
  {
    SobolRsg *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    InverseCumulativeRsg< SobolRsg,MoroInverseCumulativeNormal > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_MoroInvCumulativeSobolGaussianRsg(uniformSequenceGenerator);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_SobolRsg,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MoroInvCumulativeSobolGaussianRsg" "', argument " "1"" of type '" "SobolRsg const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MoroInvCumulativeSobolGaussianRsg" "', argument " "1"" of type '" "SobolRsg const &""'"); 
    }
    arg1 = reinterpret_cast< SobolRsg * >(argp1);
    {
      try {
        result = (InverseCumulativeRsg< SobolRsg,MoroInverseCumulativeNormal > *)new InverseCumulativeRsg< SobolRsg,MoroInverseCumulativeNormal >((SobolRsg const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_InverseCumulativeRsgT_SobolRsg_MoroInverseCumulativeNormal_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MoroInvCumulativeSobolGaussianRsg_nextSequence) {
  {
    InverseCumulativeRsg< SobolRsg,MoroInverseCumulativeNormal > *arg1 = (InverseCumulativeRsg< SobolRsg,MoroInverseCumulativeNormal > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Sample< std::vector< Real > > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MoroInvCumulativeSobolGaussianRsg_nextSequence(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_InverseCumulativeRsgT_SobolRsg_MoroInverseCumulativeNormal_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MoroInvCumulativeSobolGaussianRsg_nextSequence" "', argument " "1"" of type '" "InverseCumulativeRsg< SobolRsg,MoroInverseCumulativeNormal > const *""'"); 
    }
    arg1 = reinterpret_cast< InverseCumulativeRsg< SobolRsg,MoroInverseCumulativeNormal > * >(argp1);
    {
      try {
        result = (Sample< std::vector< Real > > *) &((InverseCumulativeRsg< SobolRsg,MoroInverseCumulativeNormal > const *)arg1)->nextSequence();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SampleT_std__vectorT_double_t_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MoroInvCumulativeSobolGaussianRsg_dimension) {
  {
    InverseCumulativeRsg< SobolRsg,MoroInverseCumulativeNormal > *arg1 = (InverseCumulativeRsg< SobolRsg,MoroInverseCumulativeNormal > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Size result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MoroInvCumulativeSobolGaussianRsg_dimension(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_InverseCumulativeRsgT_SobolRsg_MoroInverseCumulativeNormal_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MoroInvCumulativeSobolGaussianRsg_dimension" "', argument " "1"" of type '" "InverseCumulativeRsg< SobolRsg,MoroInverseCumulativeNormal > const *""'"); 
    }
    arg1 = reinterpret_cast< InverseCumulativeRsg< SobolRsg,MoroInverseCumulativeNormal > * >(argp1);
    {
      try {
        result = ((InverseCumulativeRsg< SobolRsg,MoroInverseCumulativeNormal > const *)arg1)->dimension();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_size_t  SWIG_PERL_CALL_ARGS_1(static_cast< size_t >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_MoroInvCumulativeSobolGaussianRsg) {
  {
    InverseCumulativeRsg< SobolRsg,MoroInverseCumulativeNormal > *arg1 = (InverseCumulativeRsg< SobolRsg,MoroInverseCumulativeNormal > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_MoroInvCumulativeSobolGaussianRsg(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_InverseCumulativeRsgT_SobolRsg_MoroInverseCumulativeNormal_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MoroInvCumulativeSobolGaussianRsg" "', argument " "1"" of type '" "InverseCumulativeRsg< SobolRsg,MoroInverseCumulativeNormal > *""'"); 
    }
    arg1 = reinterpret_cast< InverseCumulativeRsg< SobolRsg,MoroInverseCumulativeNormal > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_InvCumulativeLecuyerGaussianRsg) {
  {
    RandomSequenceGenerator< LecuyerUniformRng > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    InverseCumulativeRsg< RandomSequenceGenerator< LecuyerUniformRng >,InverseCumulativeNormal > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_InvCumulativeLecuyerGaussianRsg(uniformSequenceGenerator);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_RandomSequenceGeneratorT_LecuyerUniformRng_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_InvCumulativeLecuyerGaussianRsg" "', argument " "1"" of type '" "RandomSequenceGenerator< LecuyerUniformRng > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_InvCumulativeLecuyerGaussianRsg" "', argument " "1"" of type '" "RandomSequenceGenerator< LecuyerUniformRng > const &""'"); 
    }
    arg1 = reinterpret_cast< RandomSequenceGenerator< LecuyerUniformRng > * >(argp1);
    {
      try {
        result = (InverseCumulativeRsg< RandomSequenceGenerator< LecuyerUniformRng >,InverseCumulativeNormal > *)new InverseCumulativeRsg< RandomSequenceGenerator< LecuyerUniformRng >,InverseCumulativeNormal >((RandomSequenceGenerator< LecuyerUniformRng > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_InverseCumulativeRsgT_RandomSequenceGeneratorT_LecuyerUniformRng_t_InverseCumulativeNormal_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_InvCumulativeLecuyerGaussianRsg_nextSequence) {
  {
    InverseCumulativeRsg< RandomSequenceGenerator< LecuyerUniformRng >,InverseCumulativeNormal > *arg1 = (InverseCumulativeRsg< RandomSequenceGenerator< LecuyerUniformRng >,InverseCumulativeNormal > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Sample< std::vector< Real > > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: InvCumulativeLecuyerGaussianRsg_nextSequence(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_InverseCumulativeRsgT_RandomSequenceGeneratorT_LecuyerUniformRng_t_InverseCumulativeNormal_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InvCumulativeLecuyerGaussianRsg_nextSequence" "', argument " "1"" of type '" "InverseCumulativeRsg< RandomSequenceGenerator< LecuyerUniformRng >,InverseCumulativeNormal > const *""'"); 
    }
    arg1 = reinterpret_cast< InverseCumulativeRsg< RandomSequenceGenerator< LecuyerUniformRng >,InverseCumulativeNormal > * >(argp1);
    {
      try {
        result = (Sample< std::vector< Real > > *) &((InverseCumulativeRsg< RandomSequenceGenerator< LecuyerUniformRng >,InverseCumulativeNormal > const *)arg1)->nextSequence();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SampleT_std__vectorT_double_t_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_InvCumulativeLecuyerGaussianRsg_dimension) {
  {
    InverseCumulativeRsg< RandomSequenceGenerator< LecuyerUniformRng >,InverseCumulativeNormal > *arg1 = (InverseCumulativeRsg< RandomSequenceGenerator< LecuyerUniformRng >,InverseCumulativeNormal > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Size result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: InvCumulativeLecuyerGaussianRsg_dimension(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_InverseCumulativeRsgT_RandomSequenceGeneratorT_LecuyerUniformRng_t_InverseCumulativeNormal_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InvCumulativeLecuyerGaussianRsg_dimension" "', argument " "1"" of type '" "InverseCumulativeRsg< RandomSequenceGenerator< LecuyerUniformRng >,InverseCumulativeNormal > const *""'"); 
    }
    arg1 = reinterpret_cast< InverseCumulativeRsg< RandomSequenceGenerator< LecuyerUniformRng >,InverseCumulativeNormal > * >(argp1);
    {
      try {
        result = ((InverseCumulativeRsg< RandomSequenceGenerator< LecuyerUniformRng >,InverseCumulativeNormal > const *)arg1)->dimension();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_size_t  SWIG_PERL_CALL_ARGS_1(static_cast< size_t >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_InvCumulativeLecuyerGaussianRsg) {
  {
    InverseCumulativeRsg< RandomSequenceGenerator< LecuyerUniformRng >,InverseCumulativeNormal > *arg1 = (InverseCumulativeRsg< RandomSequenceGenerator< LecuyerUniformRng >,InverseCumulativeNormal > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_InvCumulativeLecuyerGaussianRsg(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_InverseCumulativeRsgT_RandomSequenceGeneratorT_LecuyerUniformRng_t_InverseCumulativeNormal_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_InvCumulativeLecuyerGaussianRsg" "', argument " "1"" of type '" "InverseCumulativeRsg< RandomSequenceGenerator< LecuyerUniformRng >,InverseCumulativeNormal > *""'"); 
    }
    arg1 = reinterpret_cast< InverseCumulativeRsg< RandomSequenceGenerator< LecuyerUniformRng >,InverseCumulativeNormal > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_InvCumulativeKnuthGaussianRsg) {
  {
    RandomSequenceGenerator< KnuthUniformRng > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    InverseCumulativeRsg< RandomSequenceGenerator< KnuthUniformRng >,InverseCumulativeNormal > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_InvCumulativeKnuthGaussianRsg(uniformSequenceGenerator);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_RandomSequenceGeneratorT_KnuthUniformRng_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_InvCumulativeKnuthGaussianRsg" "', argument " "1"" of type '" "RandomSequenceGenerator< KnuthUniformRng > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_InvCumulativeKnuthGaussianRsg" "', argument " "1"" of type '" "RandomSequenceGenerator< KnuthUniformRng > const &""'"); 
    }
    arg1 = reinterpret_cast< RandomSequenceGenerator< KnuthUniformRng > * >(argp1);
    {
      try {
        result = (InverseCumulativeRsg< RandomSequenceGenerator< KnuthUniformRng >,InverseCumulativeNormal > *)new InverseCumulativeRsg< RandomSequenceGenerator< KnuthUniformRng >,InverseCumulativeNormal >((RandomSequenceGenerator< KnuthUniformRng > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_InverseCumulativeRsgT_RandomSequenceGeneratorT_KnuthUniformRng_t_InverseCumulativeNormal_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_InvCumulativeKnuthGaussianRsg_nextSequence) {
  {
    InverseCumulativeRsg< RandomSequenceGenerator< KnuthUniformRng >,InverseCumulativeNormal > *arg1 = (InverseCumulativeRsg< RandomSequenceGenerator< KnuthUniformRng >,InverseCumulativeNormal > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Sample< std::vector< Real > > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: InvCumulativeKnuthGaussianRsg_nextSequence(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_InverseCumulativeRsgT_RandomSequenceGeneratorT_KnuthUniformRng_t_InverseCumulativeNormal_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InvCumulativeKnuthGaussianRsg_nextSequence" "', argument " "1"" of type '" "InverseCumulativeRsg< RandomSequenceGenerator< KnuthUniformRng >,InverseCumulativeNormal > const *""'"); 
    }
    arg1 = reinterpret_cast< InverseCumulativeRsg< RandomSequenceGenerator< KnuthUniformRng >,InverseCumulativeNormal > * >(argp1);
    {
      try {
        result = (Sample< std::vector< Real > > *) &((InverseCumulativeRsg< RandomSequenceGenerator< KnuthUniformRng >,InverseCumulativeNormal > const *)arg1)->nextSequence();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SampleT_std__vectorT_double_t_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_InvCumulativeKnuthGaussianRsg_dimension) {
  {
    InverseCumulativeRsg< RandomSequenceGenerator< KnuthUniformRng >,InverseCumulativeNormal > *arg1 = (InverseCumulativeRsg< RandomSequenceGenerator< KnuthUniformRng >,InverseCumulativeNormal > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Size result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: InvCumulativeKnuthGaussianRsg_dimension(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_InverseCumulativeRsgT_RandomSequenceGeneratorT_KnuthUniformRng_t_InverseCumulativeNormal_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InvCumulativeKnuthGaussianRsg_dimension" "', argument " "1"" of type '" "InverseCumulativeRsg< RandomSequenceGenerator< KnuthUniformRng >,InverseCumulativeNormal > const *""'"); 
    }
    arg1 = reinterpret_cast< InverseCumulativeRsg< RandomSequenceGenerator< KnuthUniformRng >,InverseCumulativeNormal > * >(argp1);
    {
      try {
        result = ((InverseCumulativeRsg< RandomSequenceGenerator< KnuthUniformRng >,InverseCumulativeNormal > const *)arg1)->dimension();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_size_t  SWIG_PERL_CALL_ARGS_1(static_cast< size_t >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_InvCumulativeKnuthGaussianRsg) {
  {
    InverseCumulativeRsg< RandomSequenceGenerator< KnuthUniformRng >,InverseCumulativeNormal > *arg1 = (InverseCumulativeRsg< RandomSequenceGenerator< KnuthUniformRng >,InverseCumulativeNormal > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_InvCumulativeKnuthGaussianRsg(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_InverseCumulativeRsgT_RandomSequenceGeneratorT_KnuthUniformRng_t_InverseCumulativeNormal_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_InvCumulativeKnuthGaussianRsg" "', argument " "1"" of type '" "InverseCumulativeRsg< RandomSequenceGenerator< KnuthUniformRng >,InverseCumulativeNormal > *""'"); 
    }
    arg1 = reinterpret_cast< InverseCumulativeRsg< RandomSequenceGenerator< KnuthUniformRng >,InverseCumulativeNormal > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_InvCumulativeMersenneTwisterGaussianRsg) {
  {
    RandomSequenceGenerator< MersenneTwisterUniformRng > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    InverseCumulativeRsg< RandomSequenceGenerator< MersenneTwisterUniformRng >,InverseCumulativeNormal > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_InvCumulativeMersenneTwisterGaussianRsg(uniformSequenceGenerator);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_RandomSequenceGeneratorT_MersenneTwisterUniformRng_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_InvCumulativeMersenneTwisterGaussianRsg" "', argument " "1"" of type '" "RandomSequenceGenerator< MersenneTwisterUniformRng > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_InvCumulativeMersenneTwisterGaussianRsg" "', argument " "1"" of type '" "RandomSequenceGenerator< MersenneTwisterUniformRng > const &""'"); 
    }
    arg1 = reinterpret_cast< RandomSequenceGenerator< MersenneTwisterUniformRng > * >(argp1);
    {
      try {
        result = (InverseCumulativeRsg< RandomSequenceGenerator< MersenneTwisterUniformRng >,InverseCumulativeNormal > *)new InverseCumulativeRsg< RandomSequenceGenerator< MersenneTwisterUniformRng >,InverseCumulativeNormal >((RandomSequenceGenerator< MersenneTwisterUniformRng > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_InverseCumulativeRsgT_RandomSequenceGeneratorT_MersenneTwisterUniformRng_t_InverseCumulativeNormal_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_InvCumulativeMersenneTwisterGaussianRsg_nextSequence) {
  {
    InverseCumulativeRsg< RandomSequenceGenerator< MersenneTwisterUniformRng >,InverseCumulativeNormal > *arg1 = (InverseCumulativeRsg< RandomSequenceGenerator< MersenneTwisterUniformRng >,InverseCumulativeNormal > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Sample< std::vector< Real > > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: InvCumulativeMersenneTwisterGaussianRsg_nextSequence(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_InverseCumulativeRsgT_RandomSequenceGeneratorT_MersenneTwisterUniformRng_t_InverseCumulativeNormal_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InvCumulativeMersenneTwisterGaussianRsg_nextSequence" "', argument " "1"" of type '" "InverseCumulativeRsg< RandomSequenceGenerator< MersenneTwisterUniformRng >,InverseCumulativeNormal > const *""'"); 
    }
    arg1 = reinterpret_cast< InverseCumulativeRsg< RandomSequenceGenerator< MersenneTwisterUniformRng >,InverseCumulativeNormal > * >(argp1);
    {
      try {
        result = (Sample< std::vector< Real > > *) &((InverseCumulativeRsg< RandomSequenceGenerator< MersenneTwisterUniformRng >,InverseCumulativeNormal > const *)arg1)->nextSequence();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SampleT_std__vectorT_double_t_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_InvCumulativeMersenneTwisterGaussianRsg_dimension) {
  {
    InverseCumulativeRsg< RandomSequenceGenerator< MersenneTwisterUniformRng >,InverseCumulativeNormal > *arg1 = (InverseCumulativeRsg< RandomSequenceGenerator< MersenneTwisterUniformRng >,InverseCumulativeNormal > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Size result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: InvCumulativeMersenneTwisterGaussianRsg_dimension(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_InverseCumulativeRsgT_RandomSequenceGeneratorT_MersenneTwisterUniformRng_t_InverseCumulativeNormal_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InvCumulativeMersenneTwisterGaussianRsg_dimension" "', argument " "1"" of type '" "InverseCumulativeRsg< RandomSequenceGenerator< MersenneTwisterUniformRng >,InverseCumulativeNormal > const *""'"); 
    }
    arg1 = reinterpret_cast< InverseCumulativeRsg< RandomSequenceGenerator< MersenneTwisterUniformRng >,InverseCumulativeNormal > * >(argp1);
    {
      try {
        result = ((InverseCumulativeRsg< RandomSequenceGenerator< MersenneTwisterUniformRng >,InverseCumulativeNormal > const *)arg1)->dimension();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_size_t  SWIG_PERL_CALL_ARGS_1(static_cast< size_t >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_InvCumulativeMersenneTwisterGaussianRsg) {
  {
    InverseCumulativeRsg< RandomSequenceGenerator< MersenneTwisterUniformRng >,InverseCumulativeNormal > *arg1 = (InverseCumulativeRsg< RandomSequenceGenerator< MersenneTwisterUniformRng >,InverseCumulativeNormal > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_InvCumulativeMersenneTwisterGaussianRsg(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_InverseCumulativeRsgT_RandomSequenceGeneratorT_MersenneTwisterUniformRng_t_InverseCumulativeNormal_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_InvCumulativeMersenneTwisterGaussianRsg" "', argument " "1"" of type '" "InverseCumulativeRsg< RandomSequenceGenerator< MersenneTwisterUniformRng >,InverseCumulativeNormal > *""'"); 
    }
    arg1 = reinterpret_cast< InverseCumulativeRsg< RandomSequenceGenerator< MersenneTwisterUniformRng >,InverseCumulativeNormal > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_InvCumulativeHaltonGaussianRsg) {
  {
    HaltonRsg *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    InverseCumulativeRsg< HaltonRsg,InverseCumulativeNormal > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_InvCumulativeHaltonGaussianRsg(uniformSequenceGenerator);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HaltonRsg,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_InvCumulativeHaltonGaussianRsg" "', argument " "1"" of type '" "HaltonRsg const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_InvCumulativeHaltonGaussianRsg" "', argument " "1"" of type '" "HaltonRsg const &""'"); 
    }
    arg1 = reinterpret_cast< HaltonRsg * >(argp1);
    {
      try {
        result = (InverseCumulativeRsg< HaltonRsg,InverseCumulativeNormal > *)new InverseCumulativeRsg< HaltonRsg,InverseCumulativeNormal >((HaltonRsg const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_InverseCumulativeRsgT_HaltonRsg_InverseCumulativeNormal_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_InvCumulativeHaltonGaussianRsg_nextSequence) {
  {
    InverseCumulativeRsg< HaltonRsg,InverseCumulativeNormal > *arg1 = (InverseCumulativeRsg< HaltonRsg,InverseCumulativeNormal > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Sample< std::vector< Real > > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: InvCumulativeHaltonGaussianRsg_nextSequence(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_InverseCumulativeRsgT_HaltonRsg_InverseCumulativeNormal_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InvCumulativeHaltonGaussianRsg_nextSequence" "', argument " "1"" of type '" "InverseCumulativeRsg< HaltonRsg,InverseCumulativeNormal > const *""'"); 
    }
    arg1 = reinterpret_cast< InverseCumulativeRsg< HaltonRsg,InverseCumulativeNormal > * >(argp1);
    {
      try {
        result = (Sample< std::vector< Real > > *) &((InverseCumulativeRsg< HaltonRsg,InverseCumulativeNormal > const *)arg1)->nextSequence();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SampleT_std__vectorT_double_t_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_InvCumulativeHaltonGaussianRsg_dimension) {
  {
    InverseCumulativeRsg< HaltonRsg,InverseCumulativeNormal > *arg1 = (InverseCumulativeRsg< HaltonRsg,InverseCumulativeNormal > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Size result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: InvCumulativeHaltonGaussianRsg_dimension(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_InverseCumulativeRsgT_HaltonRsg_InverseCumulativeNormal_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InvCumulativeHaltonGaussianRsg_dimension" "', argument " "1"" of type '" "InverseCumulativeRsg< HaltonRsg,InverseCumulativeNormal > const *""'"); 
    }
    arg1 = reinterpret_cast< InverseCumulativeRsg< HaltonRsg,InverseCumulativeNormal > * >(argp1);
    {
      try {
        result = ((InverseCumulativeRsg< HaltonRsg,InverseCumulativeNormal > const *)arg1)->dimension();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_size_t  SWIG_PERL_CALL_ARGS_1(static_cast< size_t >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_InvCumulativeHaltonGaussianRsg) {
  {
    InverseCumulativeRsg< HaltonRsg,InverseCumulativeNormal > *arg1 = (InverseCumulativeRsg< HaltonRsg,InverseCumulativeNormal > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_InvCumulativeHaltonGaussianRsg(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_InverseCumulativeRsgT_HaltonRsg_InverseCumulativeNormal_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_InvCumulativeHaltonGaussianRsg" "', argument " "1"" of type '" "InverseCumulativeRsg< HaltonRsg,InverseCumulativeNormal > *""'"); 
    }
    arg1 = reinterpret_cast< InverseCumulativeRsg< HaltonRsg,InverseCumulativeNormal > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_InvCumulativeSobolGaussianRsg) {
  {
    SobolRsg *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    InverseCumulativeRsg< SobolRsg,InverseCumulativeNormal > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_InvCumulativeSobolGaussianRsg(uniformSequenceGenerator);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_SobolRsg,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_InvCumulativeSobolGaussianRsg" "', argument " "1"" of type '" "SobolRsg const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_InvCumulativeSobolGaussianRsg" "', argument " "1"" of type '" "SobolRsg const &""'"); 
    }
    arg1 = reinterpret_cast< SobolRsg * >(argp1);
    {
      try {
        result = (InverseCumulativeRsg< SobolRsg,InverseCumulativeNormal > *)new InverseCumulativeRsg< SobolRsg,InverseCumulativeNormal >((SobolRsg const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_InverseCumulativeRsgT_SobolRsg_InverseCumulativeNormal_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_InvCumulativeSobolGaussianRsg_nextSequence) {
  {
    InverseCumulativeRsg< SobolRsg,InverseCumulativeNormal > *arg1 = (InverseCumulativeRsg< SobolRsg,InverseCumulativeNormal > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Sample< std::vector< Real > > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: InvCumulativeSobolGaussianRsg_nextSequence(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_InverseCumulativeRsgT_SobolRsg_InverseCumulativeNormal_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InvCumulativeSobolGaussianRsg_nextSequence" "', argument " "1"" of type '" "InverseCumulativeRsg< SobolRsg,InverseCumulativeNormal > const *""'"); 
    }
    arg1 = reinterpret_cast< InverseCumulativeRsg< SobolRsg,InverseCumulativeNormal > * >(argp1);
    {
      try {
        result = (Sample< std::vector< Real > > *) &((InverseCumulativeRsg< SobolRsg,InverseCumulativeNormal > const *)arg1)->nextSequence();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SampleT_std__vectorT_double_t_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_InvCumulativeSobolGaussianRsg_dimension) {
  {
    InverseCumulativeRsg< SobolRsg,InverseCumulativeNormal > *arg1 = (InverseCumulativeRsg< SobolRsg,InverseCumulativeNormal > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Size result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: InvCumulativeSobolGaussianRsg_dimension(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_InverseCumulativeRsgT_SobolRsg_InverseCumulativeNormal_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InvCumulativeSobolGaussianRsg_dimension" "', argument " "1"" of type '" "InverseCumulativeRsg< SobolRsg,InverseCumulativeNormal > const *""'"); 
    }
    arg1 = reinterpret_cast< InverseCumulativeRsg< SobolRsg,InverseCumulativeNormal > * >(argp1);
    {
      try {
        result = ((InverseCumulativeRsg< SobolRsg,InverseCumulativeNormal > const *)arg1)->dimension();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_size_t  SWIG_PERL_CALL_ARGS_1(static_cast< size_t >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_InvCumulativeSobolGaussianRsg) {
  {
    InverseCumulativeRsg< SobolRsg,InverseCumulativeNormal > *arg1 = (InverseCumulativeRsg< SobolRsg,InverseCumulativeNormal > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_InvCumulativeSobolGaussianRsg(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_InverseCumulativeRsgT_SobolRsg_InverseCumulativeNormal_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_InvCumulativeSobolGaussianRsg" "', argument " "1"" of type '" "InverseCumulativeRsg< SobolRsg,InverseCumulativeNormal > *""'"); 
    }
    arg1 = reinterpret_cast< InverseCumulativeRsg< SobolRsg,InverseCumulativeNormal > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_GaussianRandomSequenceGenerator) {
  {
    UniformRandomSequenceGenerator *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    GaussianRandomSequenceGenerator *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_GaussianRandomSequenceGenerator(uniformSequenceGenerator);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_UniformRandomSequenceGenerator,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_GaussianRandomSequenceGenerator" "', argument " "1"" of type '" "UniformRandomSequenceGenerator const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GaussianRandomSequenceGenerator" "', argument " "1"" of type '" "UniformRandomSequenceGenerator const &""'"); 
    }
    arg1 = reinterpret_cast< UniformRandomSequenceGenerator * >(argp1);
    {
      try {
        result = (GaussianRandomSequenceGenerator *)new GaussianRandomSequenceGenerator((UniformRandomSequenceGenerator const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GaussianRandomSequenceGenerator, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_GaussianRandomSequenceGenerator_nextSequence) {
  {
    GaussianRandomSequenceGenerator *arg1 = (GaussianRandomSequenceGenerator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Sample< std::vector< Real > > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: GaussianRandomSequenceGenerator_nextSequence(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GaussianRandomSequenceGenerator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GaussianRandomSequenceGenerator_nextSequence" "', argument " "1"" of type '" "GaussianRandomSequenceGenerator const *""'"); 
    }
    arg1 = reinterpret_cast< GaussianRandomSequenceGenerator * >(argp1);
    {
      try {
        result = (Sample< std::vector< Real > > *) &((GaussianRandomSequenceGenerator const *)arg1)->nextSequence();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SampleT_std__vectorT_double_t_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_GaussianRandomSequenceGenerator_dimension) {
  {
    GaussianRandomSequenceGenerator *arg1 = (GaussianRandomSequenceGenerator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Size result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: GaussianRandomSequenceGenerator_dimension(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GaussianRandomSequenceGenerator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GaussianRandomSequenceGenerator_dimension" "', argument " "1"" of type '" "GaussianRandomSequenceGenerator const *""'"); 
    }
    arg1 = reinterpret_cast< GaussianRandomSequenceGenerator * >(argp1);
    {
      try {
        result = ((GaussianRandomSequenceGenerator const *)arg1)->dimension();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_size_t  SWIG_PERL_CALL_ARGS_1(static_cast< size_t >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_GaussianRandomSequenceGenerator) {
  {
    GaussianRandomSequenceGenerator *arg1 = (GaussianRandomSequenceGenerator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_GaussianRandomSequenceGenerator(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GaussianRandomSequenceGenerator, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GaussianRandomSequenceGenerator" "', argument " "1"" of type '" "GaussianRandomSequenceGenerator *""'"); 
    }
    arg1 = reinterpret_cast< GaussianRandomSequenceGenerator * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_GaussianLowDiscrepancySequenceGenerator) {
  {
    UniformLowDiscrepancySequenceGenerator *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    GaussianLowDiscrepancySequenceGenerator *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_GaussianLowDiscrepancySequenceGenerator(u);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_UniformLowDiscrepancySequenceGenerator,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_GaussianLowDiscrepancySequenceGenerator" "', argument " "1"" of type '" "UniformLowDiscrepancySequenceGenerator const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GaussianLowDiscrepancySequenceGenerator" "', argument " "1"" of type '" "UniformLowDiscrepancySequenceGenerator const &""'"); 
    }
    arg1 = reinterpret_cast< UniformLowDiscrepancySequenceGenerator * >(argp1);
    {
      try {
        result = (GaussianLowDiscrepancySequenceGenerator *)new GaussianLowDiscrepancySequenceGenerator((UniformLowDiscrepancySequenceGenerator const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GaussianLowDiscrepancySequenceGenerator, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_GaussianLowDiscrepancySequenceGenerator_nextSequence) {
  {
    GaussianLowDiscrepancySequenceGenerator *arg1 = (GaussianLowDiscrepancySequenceGenerator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Sample< std::vector< Real > > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: GaussianLowDiscrepancySequenceGenerator_nextSequence(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GaussianLowDiscrepancySequenceGenerator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GaussianLowDiscrepancySequenceGenerator_nextSequence" "', argument " "1"" of type '" "GaussianLowDiscrepancySequenceGenerator const *""'"); 
    }
    arg1 = reinterpret_cast< GaussianLowDiscrepancySequenceGenerator * >(argp1);
    {
      try {
        result = (Sample< std::vector< Real > > *) &((GaussianLowDiscrepancySequenceGenerator const *)arg1)->nextSequence();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SampleT_std__vectorT_double_t_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_GaussianLowDiscrepancySequenceGenerator_dimension) {
  {
    GaussianLowDiscrepancySequenceGenerator *arg1 = (GaussianLowDiscrepancySequenceGenerator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Size result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: GaussianLowDiscrepancySequenceGenerator_dimension(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GaussianLowDiscrepancySequenceGenerator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GaussianLowDiscrepancySequenceGenerator_dimension" "', argument " "1"" of type '" "GaussianLowDiscrepancySequenceGenerator const *""'"); 
    }
    arg1 = reinterpret_cast< GaussianLowDiscrepancySequenceGenerator * >(argp1);
    {
      try {
        result = ((GaussianLowDiscrepancySequenceGenerator const *)arg1)->dimension();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_size_t  SWIG_PERL_CALL_ARGS_1(static_cast< size_t >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_GaussianLowDiscrepancySequenceGenerator) {
  {
    GaussianLowDiscrepancySequenceGenerator *arg1 = (GaussianLowDiscrepancySequenceGenerator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_GaussianLowDiscrepancySequenceGenerator(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GaussianLowDiscrepancySequenceGenerator, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GaussianLowDiscrepancySequenceGenerator" "', argument " "1"" of type '" "GaussianLowDiscrepancySequenceGenerator *""'"); 
    }
    arg1 = reinterpret_cast< GaussianLowDiscrepancySequenceGenerator * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_getCovariance) {
  {
    Array *arg1 = 0 ;
    Matrix *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    Matrix result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: getCovariance(volatilities,correlations);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "getCovariance" "', argument " "1"" of type '" "Array const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getCovariance" "', argument " "1"" of type '" "Array const &""'"); 
    }
    arg1 = reinterpret_cast< Array * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Matrix,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "getCovariance" "', argument " "2"" of type '" "Matrix const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "getCovariance" "', argument " "2"" of type '" "Matrix const &""'"); 
    }
    arg2 = reinterpret_cast< Matrix * >(argp2);
    {
      try {
        result = getCovariance((Array const &)*arg1,(Matrix const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Matrix(static_cast< const Matrix& >(result))), SWIGTYPE_p_Matrix, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Path_length) {
  {
    Path *arg1 = (Path *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Size result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Path_length(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Path, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Path_length" "', argument " "1"" of type '" "Path const *""'"); 
    }
    arg1 = reinterpret_cast< Path * >(argp1);
    {
      try {
        result = ((Path const *)arg1)->length();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_size_t  SWIG_PERL_CALL_ARGS_1(static_cast< size_t >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Path_value) {
  {
    Path *arg1 = (Path *) 0 ;
    Size arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Path_value(self,i);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Path, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Path_value" "', argument " "1"" of type '" "Path const *""'"); 
    }
    arg1 = reinterpret_cast< Path * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Path_value" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    {
      try {
        result = (Real)((Path const *)arg1)->value(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Path_front) {
  {
    Path *arg1 = (Path *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Path_front(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Path, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Path_front" "', argument " "1"" of type '" "Path const *""'"); 
    }
    arg1 = reinterpret_cast< Path * >(argp1);
    {
      try {
        result = (Real)((Path const *)arg1)->front();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Path_back) {
  {
    Path *arg1 = (Path *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Path_back(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Path, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Path_back" "', argument " "1"" of type '" "Path const *""'"); 
    }
    arg1 = reinterpret_cast< Path * >(argp1);
    {
      try {
        result = (Real)((Path const *)arg1)->back();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Path_time) {
  {
    Path *arg1 = (Path *) 0 ;
    Size arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Time result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Path_time(self,i);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Path, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Path_time" "', argument " "1"" of type '" "Path const *""'"); 
    }
    arg1 = reinterpret_cast< Path * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Path_time" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    {
      try {
        result = (Time)((Path const *)arg1)->time(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_Path) {
  {
    Path *arg1 = (Path *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Path(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Path, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Path" "', argument " "1"" of type '" "Path *""'"); 
    }
    arg1 = reinterpret_cast< Path * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_SamplePath_value) {
  {
    Sample< Path > *arg1 = (Sample< Path > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    SwigValueWrapper< Path > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: SamplePath_value(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SampleT_Path_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SamplePath_value" "', argument " "1"" of type '" "Sample< Path > *""'"); 
    }
    arg1 = reinterpret_cast< Sample< Path > * >(argp1);
    {
      try {
        result = Sample_Sl_Path_Sg__value(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Path(static_cast< const Path& >(result))), SWIGTYPE_p_Path, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_SamplePath_weight) {
  {
    Sample< Path > *arg1 = (Sample< Path > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: SamplePath_weight(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SampleT_Path_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SamplePath_weight" "', argument " "1"" of type '" "Sample< Path > *""'"); 
    }
    arg1 = reinterpret_cast< Sample< Path > * >(argp1);
    {
      try {
        result = (Real)Sample_Sl_Path_Sg__weight(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_SamplePath) {
  {
    Sample< Path > *arg1 = (Sample< Path > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_SamplePath(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SampleT_Path_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SamplePath" "', argument " "1"" of type '" "Sample< Path > *""'"); 
    }
    arg1 = reinterpret_cast< Sample< Path > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_GaussianPathGenerator) {
  {
    StochasticProcess1DPtr *arg1 = 0 ;
    Time arg2 ;
    Size arg3 ;
    GaussianRandomSequenceGenerator *arg4 = 0 ;
    bool arg5 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    size_t val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    bool val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    GaussianPathGenerator *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_GaussianPathGenerator(process,length,steps,rsg,brownianBridge);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_StochasticProcess1DPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_GaussianPathGenerator" "', argument " "1"" of type '" "StochasticProcess1DPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GaussianPathGenerator" "', argument " "1"" of type '" "StochasticProcess1DPtr const &""'"); 
    }
    arg1 = reinterpret_cast< StochasticProcess1DPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_GaussianPathGenerator" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_GaussianPathGenerator" "', argument " "3"" of type '" "Size""'");
    } 
    arg3 = static_cast< Size >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_GaussianRandomSequenceGenerator,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_GaussianPathGenerator" "', argument " "4"" of type '" "GaussianRandomSequenceGenerator const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GaussianPathGenerator" "', argument " "4"" of type '" "GaussianRandomSequenceGenerator const &""'"); 
    }
    arg4 = reinterpret_cast< GaussianRandomSequenceGenerator * >(argp4);
    ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_GaussianPathGenerator" "', argument " "5"" of type '" "bool""'");
    } 
    arg5 = static_cast< bool >(val5);
    {
      try {
        result = (GaussianPathGenerator *)new_GaussianPathGenerator((StochasticProcess1DPtr const &)*arg1,arg2,arg3,(GaussianRandomSequenceGenerator const &)*arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GaussianPathGenerator, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_GaussianPathGenerator_next) {
  {
    GaussianPathGenerator *arg1 = (GaussianPathGenerator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    SwigValueWrapper< Sample< Path > > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: GaussianPathGenerator_next(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GaussianPathGenerator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GaussianPathGenerator_next" "', argument " "1"" of type '" "GaussianPathGenerator const *""'"); 
    }
    arg1 = reinterpret_cast< GaussianPathGenerator * >(argp1);
    {
      try {
        result = ((GaussianPathGenerator const *)arg1)->next();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Sample< Path >(static_cast< const Sample< Path >& >(result))), SWIGTYPE_p_SampleT_Path_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_GaussianPathGenerator_antithetic) {
  {
    GaussianPathGenerator *arg1 = (GaussianPathGenerator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    SwigValueWrapper< Sample< Path > > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: GaussianPathGenerator_antithetic(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GaussianPathGenerator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GaussianPathGenerator_antithetic" "', argument " "1"" of type '" "GaussianPathGenerator const *""'"); 
    }
    arg1 = reinterpret_cast< GaussianPathGenerator * >(argp1);
    {
      try {
        result = ((GaussianPathGenerator const *)arg1)->antithetic();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Sample< Path >(static_cast< const Sample< Path >& >(result))), SWIGTYPE_p_SampleT_Path_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_GaussianPathGenerator) {
  {
    GaussianPathGenerator *arg1 = (GaussianPathGenerator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_GaussianPathGenerator(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GaussianPathGenerator, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GaussianPathGenerator" "', argument " "1"" of type '" "GaussianPathGenerator *""'"); 
    }
    arg1 = reinterpret_cast< GaussianPathGenerator * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_GaussianSobolPathGenerator) {
  {
    StochasticProcess1DPtr *arg1 = 0 ;
    Time arg2 ;
    Size arg3 ;
    GaussianLowDiscrepancySequenceGenerator *arg4 = 0 ;
    bool arg5 ;
    void *argp1 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    size_t val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    bool val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    GaussianSobolPathGenerator *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_GaussianSobolPathGenerator(process,length,steps,rsg,brownianBridge);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_StochasticProcess1DPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_GaussianSobolPathGenerator" "', argument " "1"" of type '" "StochasticProcess1DPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GaussianSobolPathGenerator" "', argument " "1"" of type '" "StochasticProcess1DPtr const &""'"); 
    }
    arg1 = reinterpret_cast< StochasticProcess1DPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_GaussianSobolPathGenerator" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_GaussianSobolPathGenerator" "', argument " "3"" of type '" "Size""'");
    } 
    arg3 = static_cast< Size >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_GaussianLowDiscrepancySequenceGenerator,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_GaussianSobolPathGenerator" "', argument " "4"" of type '" "GaussianLowDiscrepancySequenceGenerator const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GaussianSobolPathGenerator" "', argument " "4"" of type '" "GaussianLowDiscrepancySequenceGenerator const &""'"); 
    }
    arg4 = reinterpret_cast< GaussianLowDiscrepancySequenceGenerator * >(argp4);
    ecode5 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_GaussianSobolPathGenerator" "', argument " "5"" of type '" "bool""'");
    } 
    arg5 = static_cast< bool >(val5);
    {
      try {
        result = (GaussianSobolPathGenerator *)new_GaussianSobolPathGenerator((StochasticProcess1DPtr const &)*arg1,arg2,arg3,(GaussianLowDiscrepancySequenceGenerator const &)*arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GaussianSobolPathGenerator, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_GaussianSobolPathGenerator_next) {
  {
    GaussianSobolPathGenerator *arg1 = (GaussianSobolPathGenerator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    SwigValueWrapper< Sample< Path > > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: GaussianSobolPathGenerator_next(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GaussianSobolPathGenerator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GaussianSobolPathGenerator_next" "', argument " "1"" of type '" "GaussianSobolPathGenerator const *""'"); 
    }
    arg1 = reinterpret_cast< GaussianSobolPathGenerator * >(argp1);
    {
      try {
        result = ((GaussianSobolPathGenerator const *)arg1)->next();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Sample< Path >(static_cast< const Sample< Path >& >(result))), SWIGTYPE_p_SampleT_Path_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_GaussianSobolPathGenerator_antithetic) {
  {
    GaussianSobolPathGenerator *arg1 = (GaussianSobolPathGenerator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    SwigValueWrapper< Sample< Path > > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: GaussianSobolPathGenerator_antithetic(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GaussianSobolPathGenerator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GaussianSobolPathGenerator_antithetic" "', argument " "1"" of type '" "GaussianSobolPathGenerator const *""'"); 
    }
    arg1 = reinterpret_cast< GaussianSobolPathGenerator * >(argp1);
    {
      try {
        result = ((GaussianSobolPathGenerator const *)arg1)->antithetic();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Sample< Path >(static_cast< const Sample< Path >& >(result))), SWIGTYPE_p_SampleT_Path_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_GaussianSobolPathGenerator) {
  {
    GaussianSobolPathGenerator *arg1 = (GaussianSobolPathGenerator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_GaussianSobolPathGenerator(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GaussianSobolPathGenerator, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GaussianSobolPathGenerator" "', argument " "1"" of type '" "GaussianSobolPathGenerator *""'"); 
    }
    arg1 = reinterpret_cast< GaussianSobolPathGenerator * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MultiPath_pathSize) {
  {
    MultiPath *arg1 = (MultiPath *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Size result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MultiPath_pathSize(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_MultiPath, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiPath_pathSize" "', argument " "1"" of type '" "MultiPath const *""'"); 
    }
    arg1 = reinterpret_cast< MultiPath * >(argp1);
    {
      try {
        result = ((MultiPath const *)arg1)->pathSize();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_size_t  SWIG_PERL_CALL_ARGS_1(static_cast< size_t >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MultiPath_assetNumber) {
  {
    MultiPath *arg1 = (MultiPath *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Size result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MultiPath_assetNumber(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_MultiPath, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiPath_assetNumber" "', argument " "1"" of type '" "MultiPath const *""'"); 
    }
    arg1 = reinterpret_cast< MultiPath * >(argp1);
    {
      try {
        result = ((MultiPath const *)arg1)->assetNumber();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_size_t  SWIG_PERL_CALL_ARGS_1(static_cast< size_t >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MultiPath_at) {
  {
    MultiPath *arg1 = (MultiPath *) 0 ;
    Size arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Path *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: MultiPath_at(self,j);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_MultiPath, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiPath_at" "', argument " "1"" of type '" "MultiPath *""'"); 
    }
    arg1 = reinterpret_cast< MultiPath * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MultiPath_at" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    {
      try {
        result = (Path *) &(arg1)->at(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Path, 0 | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_MultiPath) {
  {
    MultiPath *arg1 = (MultiPath *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_MultiPath(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_MultiPath, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MultiPath" "', argument " "1"" of type '" "MultiPath *""'"); 
    }
    arg1 = reinterpret_cast< MultiPath * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_SampleMultiPath_value) {
  {
    Sample< MultiPath > *arg1 = (Sample< MultiPath > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    SwigValueWrapper< MultiPath > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: SampleMultiPath_value(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SampleT_MultiPath_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SampleMultiPath_value" "', argument " "1"" of type '" "Sample< MultiPath > *""'"); 
    }
    arg1 = reinterpret_cast< Sample< MultiPath > * >(argp1);
    {
      try {
        result = Sample_Sl_MultiPath_Sg__value(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new MultiPath(static_cast< const MultiPath& >(result))), SWIGTYPE_p_MultiPath, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_SampleMultiPath_weight) {
  {
    Sample< MultiPath > *arg1 = (Sample< MultiPath > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: SampleMultiPath_weight(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SampleT_MultiPath_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SampleMultiPath_weight" "', argument " "1"" of type '" "Sample< MultiPath > *""'"); 
    }
    arg1 = reinterpret_cast< Sample< MultiPath > * >(argp1);
    {
      try {
        result = (Real)Sample_Sl_MultiPath_Sg__weight(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_SampleMultiPath) {
  {
    Sample< MultiPath > *arg1 = (Sample< MultiPath > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_SampleMultiPath(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SampleT_MultiPath_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SampleMultiPath" "', argument " "1"" of type '" "Sample< MultiPath > *""'"); 
    }
    arg1 = reinterpret_cast< Sample< MultiPath > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_GaussianMultiPathGenerator__SWIG_0) {
  {
    boost::shared_ptr< StochasticProcess > *arg1 = 0 ;
    std::vector< Time > *arg2 = 0 ;
    GaussianRandomSequenceGenerator *arg3 = 0 ;
    bool arg4 ;
    void *argp1 ;
    int res1 = 0 ;
    std::vector< double > temp2 ;
    std::vector< double > *v2 ;
    void *argp3 ;
    int res3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    GaussianMultiPathGenerator *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_GaussianMultiPathGenerator(process,times,generator,brownianBridge);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_StochasticProcess_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_GaussianMultiPathGenerator" "', argument " "1"" of type '" "boost::shared_ptr< StochasticProcess > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GaussianMultiPathGenerator" "', argument " "1"" of type '" "boost::shared_ptr< StochasticProcess > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< StochasticProcess > * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_GaussianMultiPathGenerator. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp2.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_GaussianMultiPathGenerator. "
              "Expected an array of ""double");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_GaussianMultiPathGenerator. "
          "Expected an array of ""double");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_GaussianRandomSequenceGenerator,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_GaussianMultiPathGenerator" "', argument " "3"" of type '" "GaussianRandomSequenceGenerator const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GaussianMultiPathGenerator" "', argument " "3"" of type '" "GaussianRandomSequenceGenerator const &""'"); 
    }
    arg3 = reinterpret_cast< GaussianRandomSequenceGenerator * >(argp3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_GaussianMultiPathGenerator" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    {
      try {
        result = (GaussianMultiPathGenerator *)new_GaussianMultiPathGenerator__SWIG_0((boost::shared_ptr< StochasticProcess > const &)*arg1,(std::vector< double > const &)*arg2,(GaussianRandomSequenceGenerator const &)*arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GaussianMultiPathGenerator, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_GaussianMultiPathGenerator__SWIG_1) {
  {
    boost::shared_ptr< StochasticProcess > *arg1 = 0 ;
    std::vector< Time > *arg2 = 0 ;
    GaussianRandomSequenceGenerator *arg3 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    std::vector< double > temp2 ;
    std::vector< double > *v2 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    GaussianMultiPathGenerator *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_GaussianMultiPathGenerator(process,times,generator);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_StochasticProcess_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_GaussianMultiPathGenerator" "', argument " "1"" of type '" "boost::shared_ptr< StochasticProcess > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GaussianMultiPathGenerator" "', argument " "1"" of type '" "boost::shared_ptr< StochasticProcess > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< StochasticProcess > * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_GaussianMultiPathGenerator. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp2.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_GaussianMultiPathGenerator. "
              "Expected an array of ""double");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_GaussianMultiPathGenerator. "
          "Expected an array of ""double");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_GaussianRandomSequenceGenerator,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_GaussianMultiPathGenerator" "', argument " "3"" of type '" "GaussianRandomSequenceGenerator const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GaussianMultiPathGenerator" "', argument " "3"" of type '" "GaussianRandomSequenceGenerator const &""'"); 
    }
    arg3 = reinterpret_cast< GaussianRandomSequenceGenerator * >(argp3);
    {
      try {
        result = (GaussianMultiPathGenerator *)new_GaussianMultiPathGenerator__SWIG_0((boost::shared_ptr< StochasticProcess > const &)*arg1,(std::vector< double > const &)*arg2,(GaussianRandomSequenceGenerator const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GaussianMultiPathGenerator, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_GaussianMultiPathGenerator) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_StochasticProcess_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_GaussianRandomSequenceGenerator, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_StochasticProcess_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_GaussianRandomSequenceGenerator, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_GaussianMultiPathGenerator__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_GaussianMultiPathGenerator__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_GaussianMultiPathGenerator'");
  XSRETURN(0);
}


XS(_wrap_GaussianMultiPathGenerator_next) {
  {
    GaussianMultiPathGenerator *arg1 = (GaussianMultiPathGenerator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    SwigValueWrapper< Sample< MultiPath > > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: GaussianMultiPathGenerator_next(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GaussianMultiPathGenerator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GaussianMultiPathGenerator_next" "', argument " "1"" of type '" "GaussianMultiPathGenerator const *""'"); 
    }
    arg1 = reinterpret_cast< GaussianMultiPathGenerator * >(argp1);
    {
      try {
        result = ((GaussianMultiPathGenerator const *)arg1)->next();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Sample< MultiPath >(static_cast< const Sample< MultiPath >& >(result))), SWIGTYPE_p_SampleT_MultiPath_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_GaussianMultiPathGenerator_antithetic) {
  {
    GaussianMultiPathGenerator *arg1 = (GaussianMultiPathGenerator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    SwigValueWrapper< Sample< MultiPath > > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: GaussianMultiPathGenerator_antithetic(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GaussianMultiPathGenerator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GaussianMultiPathGenerator_antithetic" "', argument " "1"" of type '" "GaussianMultiPathGenerator const *""'"); 
    }
    arg1 = reinterpret_cast< GaussianMultiPathGenerator * >(argp1);
    {
      try {
        result = ((GaussianMultiPathGenerator const *)arg1)->antithetic();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Sample< MultiPath >(static_cast< const Sample< MultiPath >& >(result))), SWIGTYPE_p_SampleT_MultiPath_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_GaussianMultiPathGenerator) {
  {
    GaussianMultiPathGenerator *arg1 = (GaussianMultiPathGenerator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_GaussianMultiPathGenerator(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GaussianMultiPathGenerator, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GaussianMultiPathGenerator" "', argument " "1"" of type '" "GaussianMultiPathGenerator *""'"); 
    }
    arg1 = reinterpret_cast< GaussianMultiPathGenerator * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BrownianBridge__SWIG_0) {
  {
    Size arg1 ;
    size_t val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    BrownianBridge *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_BrownianBridge(steps);");
    }
    ecode1 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_BrownianBridge" "', argument " "1"" of type '" "Size""'");
    } 
    arg1 = static_cast< Size >(val1);
    {
      try {
        result = (BrownianBridge *)new BrownianBridge(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BrownianBridge, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BrownianBridge__SWIG_1) {
  {
    std::vector< Time > *arg1 = 0 ;
    std::vector< double > temp1 ;
    std::vector< double > *v1 ;
    int argvi = 0;
    BrownianBridge *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_BrownianBridge(times);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_BrownianBridge. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp1.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_BrownianBridge. "
              "Expected an array of ""double");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_BrownianBridge. "
          "Expected an array of ""double");
      }
    }
    {
      try {
        result = (BrownianBridge *)new BrownianBridge((std::vector< Time > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BrownianBridge, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BrownianBridge__SWIG_2) {
  {
    TimeGrid *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    BrownianBridge *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_BrownianBridge(timeGrid);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_TimeGrid,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_BrownianBridge" "', argument " "1"" of type '" "TimeGrid const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BrownianBridge" "', argument " "1"" of type '" "TimeGrid const &""'"); 
    }
    arg1 = reinterpret_cast< TimeGrid * >(argp1);
    {
      try {
        result = (BrownianBridge *)new BrownianBridge((TimeGrid const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BrownianBridge, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BrownianBridge) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_TimeGrid, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_BrownianBridge__SWIG_2); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_BrownianBridge__SWIG_0); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_BrownianBridge__SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded 'new_BrownianBridge'");
  XSRETURN(0);
}


XS(_wrap_BrownianBridge_size) {
  {
    BrownianBridge *arg1 = (BrownianBridge *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Size result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BrownianBridge_size(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BrownianBridge, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BrownianBridge_size" "', argument " "1"" of type '" "BrownianBridge const *""'"); 
    }
    arg1 = reinterpret_cast< BrownianBridge * >(argp1);
    {
      try {
        result = ((BrownianBridge const *)arg1)->size();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_size_t  SWIG_PERL_CALL_ARGS_1(static_cast< size_t >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BrownianBridge_times) {
  {
    BrownianBridge *arg1 = (BrownianBridge *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Time > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BrownianBridge_times(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BrownianBridge, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BrownianBridge_times" "', argument " "1"" of type '" "BrownianBridge const *""'"); 
    }
    arg1 = reinterpret_cast< BrownianBridge * >(argp1);
    {
      try {
        result = ((BrownianBridge const *)arg1)->times();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        svs[i] = sv_newmortal();
        sv_setnv(svs[i], result[i]);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BrownianBridge_leftWeight) {
  {
    BrownianBridge *arg1 = (BrownianBridge *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Real > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BrownianBridge_leftWeight(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BrownianBridge, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BrownianBridge_leftWeight" "', argument " "1"" of type '" "BrownianBridge const *""'"); 
    }
    arg1 = reinterpret_cast< BrownianBridge * >(argp1);
    {
      try {
        result = ((BrownianBridge const *)arg1)->leftWeight();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        svs[i] = sv_newmortal();
        sv_setnv(svs[i], result[i]);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BrownianBridge_rightWeight) {
  {
    BrownianBridge *arg1 = (BrownianBridge *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Real > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BrownianBridge_rightWeight(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BrownianBridge, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BrownianBridge_rightWeight" "', argument " "1"" of type '" "BrownianBridge const *""'"); 
    }
    arg1 = reinterpret_cast< BrownianBridge * >(argp1);
    {
      try {
        result = ((BrownianBridge const *)arg1)->rightWeight();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        svs[i] = sv_newmortal();
        sv_setnv(svs[i], result[i]);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BrownianBridge_stdDeviation) {
  {
    BrownianBridge *arg1 = (BrownianBridge *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Real > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BrownianBridge_stdDeviation(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BrownianBridge, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BrownianBridge_stdDeviation" "', argument " "1"" of type '" "BrownianBridge const *""'"); 
    }
    arg1 = reinterpret_cast< BrownianBridge * >(argp1);
    {
      try {
        result = ((BrownianBridge const *)arg1)->stdDeviation();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        svs[i] = sv_newmortal();
        sv_setnv(svs[i], result[i]);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BrownianBridge_transform) {
  {
    BrownianBridge *arg1 = (BrownianBridge *) 0 ;
    std::vector< Real > *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    std::vector< double > temp2 ;
    std::vector< double > *v2 ;
    int argvi = 0;
    std::vector< Real > result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: BrownianBridge_transform(self,input);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BrownianBridge, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BrownianBridge_transform" "', argument " "1"" of type '" "BrownianBridge *""'"); 
    }
    arg1 = reinterpret_cast< BrownianBridge * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of BrownianBridge_transform. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp2.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "BrownianBridge_transform. "
              "Expected an array of ""double");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of BrownianBridge_transform. "
          "Expected an array of ""double");
      }
    }
    {
      try {
        result = BrownianBridge_transform(arg1,(std::vector< double > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        svs[i] = sv_newmortal();
        sv_setnv(svs[i], result[i]);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BrownianBridge_bridgeIndex) {
  {
    BrownianBridge *arg1 = (BrownianBridge *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< unsigned int > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BrownianBridge_bridgeIndex(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BrownianBridge, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BrownianBridge_bridgeIndex" "', argument " "1"" of type '" "BrownianBridge const *""'"); 
    }
    arg1 = reinterpret_cast< BrownianBridge * >(argp1);
    {
      try {
        result = BrownianBridge_bridgeIndex((BrownianBridge const *)arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        svs[i] = sv_newmortal();
        sv_setiv(svs[i], result[i]);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BrownianBridge_leftIndex) {
  {
    BrownianBridge *arg1 = (BrownianBridge *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< unsigned int > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BrownianBridge_leftIndex(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BrownianBridge, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BrownianBridge_leftIndex" "', argument " "1"" of type '" "BrownianBridge const *""'"); 
    }
    arg1 = reinterpret_cast< BrownianBridge * >(argp1);
    {
      try {
        result = BrownianBridge_leftIndex((BrownianBridge const *)arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        svs[i] = sv_newmortal();
        sv_setiv(svs[i], result[i]);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BrownianBridge_rightIndex) {
  {
    BrownianBridge *arg1 = (BrownianBridge *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< unsigned int > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BrownianBridge_rightIndex(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BrownianBridge, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BrownianBridge_rightIndex" "', argument " "1"" of type '" "BrownianBridge const *""'"); 
    }
    arg1 = reinterpret_cast< BrownianBridge * >(argp1);
    {
      try {
        result = BrownianBridge_rightIndex((BrownianBridge const *)arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        svs[i] = sv_newmortal();
        sv_setiv(svs[i], result[i]);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_BrownianBridge) {
  {
    BrownianBridge *arg1 = (BrownianBridge *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_BrownianBridge(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BrownianBridge, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_BrownianBridge" "', argument " "1"" of type '" "BrownianBridge *""'"); 
    }
    arg1 = reinterpret_cast< BrownianBridge * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BoundaryCondition___deref__) {
  {
    boost::shared_ptr< DefaultBoundaryCondition > *arg1 = (boost::shared_ptr< DefaultBoundaryCondition > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    DefaultBoundaryCondition *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BoundaryCondition___deref__(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_DefaultBoundaryCondition_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoundaryCondition___deref__" "', argument " "1"" of type '" "boost::shared_ptr< DefaultBoundaryCondition > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< DefaultBoundaryCondition > * >(argp1);
    {
      try {
        result = (DefaultBoundaryCondition *)(arg1)->operator ->();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DefaultBoundaryCondition, 0 | 0); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BoundaryCondition_isNull) {
  {
    boost::shared_ptr< DefaultBoundaryCondition > *arg1 = (boost::shared_ptr< DefaultBoundaryCondition > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BoundaryCondition_isNull(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_DefaultBoundaryCondition_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoundaryCondition_isNull" "', argument " "1"" of type '" "boost::shared_ptr< DefaultBoundaryCondition > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< DefaultBoundaryCondition > * >(argp1);
    {
      try {
        result = (bool)boost_shared_ptr_Sl_DefaultBoundaryCondition_Sg__isNull(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BoundaryCondition) {
  {
    int argvi = 0;
    boost::shared_ptr< DefaultBoundaryCondition > *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_BoundaryCondition();");
    }
    {
      try {
        result = (boost::shared_ptr< DefaultBoundaryCondition > *)new boost::shared_ptr< DefaultBoundaryCondition >();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_boost__shared_ptrT_DefaultBoundaryCondition_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_BoundaryCondition) {
  {
    boost::shared_ptr< DefaultBoundaryCondition > *arg1 = (boost::shared_ptr< DefaultBoundaryCondition > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_BoundaryCondition(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_DefaultBoundaryCondition_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_BoundaryCondition" "', argument " "1"" of type '" "boost::shared_ptr< DefaultBoundaryCondition > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< DefaultBoundaryCondition > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_NeumannBC) {
  {
    Real arg1 ;
    DefaultBoundaryCondition::Side arg2 ;
    double val1 ;
    int ecode1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    NeumannBCPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_NeumannBC(value,side);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_NeumannBC" "', argument " "1"" of type '" "Real""'");
    } 
    arg1 = static_cast< Real >(val1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_NeumannBC" "', argument " "2"" of type '" "DefaultBoundaryCondition::Side""'");
    } 
    arg2 = static_cast< DefaultBoundaryCondition::Side >(val2);
    {
      try {
        result = (NeumannBCPtr *)new_NeumannBCPtr(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_NeumannBCPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_NeumannBC) {
  {
    NeumannBCPtr *arg1 = (NeumannBCPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_NeumannBC(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_NeumannBCPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_NeumannBC" "', argument " "1"" of type '" "NeumannBCPtr *""'"); 
    }
    arg1 = reinterpret_cast< NeumannBCPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DirichletBC) {
  {
    Real arg1 ;
    DefaultBoundaryCondition::Side arg2 ;
    double val1 ;
    int ecode1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    DirichletBCPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_DirichletBC(value,side);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_DirichletBC" "', argument " "1"" of type '" "Real""'");
    } 
    arg1 = static_cast< Real >(val1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_DirichletBC" "', argument " "2"" of type '" "DefaultBoundaryCondition::Side""'");
    } 
    arg2 = static_cast< DefaultBoundaryCondition::Side >(val2);
    {
      try {
        result = (DirichletBCPtr *)new_DirichletBCPtr(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DirichletBCPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_DirichletBC) {
  {
    DirichletBCPtr *arg1 = (DirichletBCPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_DirichletBC(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_DirichletBCPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DirichletBC" "', argument " "1"" of type '" "DirichletBCPtr *""'"); 
    }
    arg1 = reinterpret_cast< DirichletBCPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_TridiagonalOperator) {
  {
    Array *arg1 = 0 ;
    Array *arg2 = 0 ;
    Array *arg3 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    TridiagonalOperator *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_TridiagonalOperator(low,mid,high);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_TridiagonalOperator" "', argument " "1"" of type '" "Array const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_TridiagonalOperator" "', argument " "1"" of type '" "Array const &""'"); 
    }
    arg1 = reinterpret_cast< Array * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_TridiagonalOperator" "', argument " "2"" of type '" "Array const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_TridiagonalOperator" "', argument " "2"" of type '" "Array const &""'"); 
    }
    arg2 = reinterpret_cast< Array * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_TridiagonalOperator" "', argument " "3"" of type '" "Array const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_TridiagonalOperator" "', argument " "3"" of type '" "Array const &""'"); 
    }
    arg3 = reinterpret_cast< Array * >(argp3);
    {
      try {
        result = (TridiagonalOperator *)new TridiagonalOperator((Array const &)*arg1,(Array const &)*arg2,(Array const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_TridiagonalOperator, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_TridiagonalOperator_solveFor) {
  {
    TridiagonalOperator *arg1 = (TridiagonalOperator *) 0 ;
    Array *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    Array result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: TridiagonalOperator_solveFor(self,rhs);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_TridiagonalOperator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TridiagonalOperator_solveFor" "', argument " "1"" of type '" "TridiagonalOperator const *""'"); 
    }
    arg1 = reinterpret_cast< TridiagonalOperator * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TridiagonalOperator_solveFor" "', argument " "2"" of type '" "Array const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "TridiagonalOperator_solveFor" "', argument " "2"" of type '" "Array const &""'"); 
    }
    arg2 = reinterpret_cast< Array * >(argp2);
    {
      try {
        result = ((TridiagonalOperator const *)arg1)->solveFor((Array const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Array(static_cast< const Array& >(result))), SWIGTYPE_p_Array, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_TridiagonalOperator_applyTo) {
  {
    TridiagonalOperator *arg1 = (TridiagonalOperator *) 0 ;
    Array *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    Array result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: TridiagonalOperator_applyTo(self,v);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_TridiagonalOperator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TridiagonalOperator_applyTo" "', argument " "1"" of type '" "TridiagonalOperator const *""'"); 
    }
    arg1 = reinterpret_cast< TridiagonalOperator * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TridiagonalOperator_applyTo" "', argument " "2"" of type '" "Array const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "TridiagonalOperator_applyTo" "', argument " "2"" of type '" "Array const &""'"); 
    }
    arg2 = reinterpret_cast< Array * >(argp2);
    {
      try {
        result = ((TridiagonalOperator const *)arg1)->applyTo((Array const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Array(static_cast< const Array& >(result))), SWIGTYPE_p_Array, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_TridiagonalOperator_size) {
  {
    TridiagonalOperator *arg1 = (TridiagonalOperator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Size result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: TridiagonalOperator_size(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_TridiagonalOperator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TridiagonalOperator_size" "', argument " "1"" of type '" "TridiagonalOperator const *""'"); 
    }
    arg1 = reinterpret_cast< TridiagonalOperator * >(argp1);
    {
      try {
        result = ((TridiagonalOperator const *)arg1)->size();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_size_t  SWIG_PERL_CALL_ARGS_1(static_cast< size_t >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_TridiagonalOperator_setFirstRow) {
  {
    TridiagonalOperator *arg1 = (TridiagonalOperator *) 0 ;
    Real arg2 ;
    Real arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: TridiagonalOperator_setFirstRow(self,Real,Real);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_TridiagonalOperator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TridiagonalOperator_setFirstRow" "', argument " "1"" of type '" "TridiagonalOperator *""'"); 
    }
    arg1 = reinterpret_cast< TridiagonalOperator * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "TridiagonalOperator_setFirstRow" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "TridiagonalOperator_setFirstRow" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    {
      try {
        (arg1)->setFirstRow(arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_TridiagonalOperator_setMidRow) {
  {
    TridiagonalOperator *arg1 = (TridiagonalOperator *) 0 ;
    Size arg2 ;
    Real arg3 ;
    Real arg4 ;
    Real arg5 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    double val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: TridiagonalOperator_setMidRow(self,Size,Real,Real,Real);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_TridiagonalOperator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TridiagonalOperator_setMidRow" "', argument " "1"" of type '" "TridiagonalOperator *""'"); 
    }
    arg1 = reinterpret_cast< TridiagonalOperator * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "TridiagonalOperator_setMidRow" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "TridiagonalOperator_setMidRow" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "TridiagonalOperator_setMidRow" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "TridiagonalOperator_setMidRow" "', argument " "5"" of type '" "Real""'");
    } 
    arg5 = static_cast< Real >(val5);
    {
      try {
        (arg1)->setMidRow(arg2,arg3,arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_TridiagonalOperator_setMidRows) {
  {
    TridiagonalOperator *arg1 = (TridiagonalOperator *) 0 ;
    Real arg2 ;
    Real arg3 ;
    Real arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: TridiagonalOperator_setMidRows(self,Real,Real,Real);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_TridiagonalOperator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TridiagonalOperator_setMidRows" "', argument " "1"" of type '" "TridiagonalOperator *""'"); 
    }
    arg1 = reinterpret_cast< TridiagonalOperator * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "TridiagonalOperator_setMidRows" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "TridiagonalOperator_setMidRows" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "TridiagonalOperator_setMidRows" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    {
      try {
        (arg1)->setMidRows(arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_TridiagonalOperator_setLastRow) {
  {
    TridiagonalOperator *arg1 = (TridiagonalOperator *) 0 ;
    Real arg2 ;
    Real arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: TridiagonalOperator_setLastRow(self,Real,Real);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_TridiagonalOperator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TridiagonalOperator_setLastRow" "', argument " "1"" of type '" "TridiagonalOperator *""'"); 
    }
    arg1 = reinterpret_cast< TridiagonalOperator * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "TridiagonalOperator_setLastRow" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "TridiagonalOperator_setLastRow" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    {
      try {
        (arg1)->setLastRow(arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_TridiagonalOperator_identity) {
  {
    Size arg1 ;
    size_t val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    SwigValueWrapper< TridiagonalOperator > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: TridiagonalOperator_identity(size);");
    }
    ecode1 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "TridiagonalOperator_identity" "', argument " "1"" of type '" "Size""'");
    } 
    arg1 = static_cast< Size >(val1);
    {
      try {
        result = TridiagonalOperator::identity(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new TridiagonalOperator(static_cast< const TridiagonalOperator& >(result))), SWIGTYPE_p_TridiagonalOperator, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_TridiagonalOperator) {
  {
    TridiagonalOperator *arg1 = (TridiagonalOperator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_TridiagonalOperator(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_TridiagonalOperator, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_TridiagonalOperator" "', argument " "1"" of type '" "TridiagonalOperator *""'"); 
    }
    arg1 = reinterpret_cast< TridiagonalOperator * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DPlus) {
  {
    Size arg1 ;
    Real arg2 ;
    size_t val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    DPlus *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_DPlus(gridPoints,h);");
    }
    ecode1 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_DPlus" "', argument " "1"" of type '" "Size""'");
    } 
    arg1 = static_cast< Size >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_DPlus" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (DPlus *)new DPlus(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DPlus, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_DPlus) {
  {
    DPlus *arg1 = (DPlus *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_DPlus(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_DPlus, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DPlus" "', argument " "1"" of type '" "DPlus *""'"); 
    }
    arg1 = reinterpret_cast< DPlus * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DMinus) {
  {
    Size arg1 ;
    Real arg2 ;
    size_t val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    DMinus *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_DMinus(gridPoints,h);");
    }
    ecode1 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_DMinus" "', argument " "1"" of type '" "Size""'");
    } 
    arg1 = static_cast< Size >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_DMinus" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (DMinus *)new DMinus(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DMinus, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_DMinus) {
  {
    DMinus *arg1 = (DMinus *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_DMinus(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_DMinus, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DMinus" "', argument " "1"" of type '" "DMinus *""'"); 
    }
    arg1 = reinterpret_cast< DMinus * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DZero) {
  {
    Size arg1 ;
    Real arg2 ;
    size_t val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    DZero *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_DZero(gridPoints,h);");
    }
    ecode1 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_DZero" "', argument " "1"" of type '" "Size""'");
    } 
    arg1 = static_cast< Size >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_DZero" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (DZero *)new DZero(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DZero, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_DZero) {
  {
    DZero *arg1 = (DZero *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_DZero(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_DZero, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DZero" "', argument " "1"" of type '" "DZero *""'"); 
    }
    arg1 = reinterpret_cast< DZero * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DPlusDMinus) {
  {
    Size arg1 ;
    Real arg2 ;
    size_t val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    DPlusDMinus *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_DPlusDMinus(gridPoints,h);");
    }
    ecode1 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_DPlusDMinus" "', argument " "1"" of type '" "Size""'");
    } 
    arg1 = static_cast< Size >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_DPlusDMinus" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (DPlusDMinus *)new DPlusDMinus(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DPlusDMinus, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_DPlusDMinus) {
  {
    DPlusDMinus *arg1 = (DPlusDMinus *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_DPlusDMinus(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_DPlusDMinus, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DPlusDMinus" "', argument " "1"" of type '" "DPlusDMinus *""'"); 
    }
    arg1 = reinterpret_cast< DPlusDMinus * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Discount) {
  {
    int argvi = 0;
    Discount *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Discount();");
    }
    {
      try {
        result = (Discount *)new Discount();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Discount, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_Discount) {
  {
    Discount *arg1 = (Discount *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Discount(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Discount, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Discount" "', argument " "1"" of type '" "Discount *""'"); 
    }
    arg1 = reinterpret_cast< Discount * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ZeroYield) {
  {
    int argvi = 0;
    ZeroYield *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_ZeroYield();");
    }
    {
      try {
        result = (ZeroYield *)new ZeroYield();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ZeroYield, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_ZeroYield) {
  {
    ZeroYield *arg1 = (ZeroYield *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_ZeroYield(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ZeroYield, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ZeroYield" "', argument " "1"" of type '" "ZeroYield *""'"); 
    }
    arg1 = reinterpret_cast< ZeroYield * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ForwardRate) {
  {
    int argvi = 0;
    ForwardRate *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_ForwardRate();");
    }
    {
      try {
        result = (ForwardRate *)new ForwardRate();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ForwardRate, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_ForwardRate) {
  {
    ForwardRate *arg1 = (ForwardRate *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_ForwardRate(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ForwardRate, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ForwardRate" "', argument " "1"" of type '" "ForwardRate *""'"); 
    }
    arg1 = reinterpret_cast< ForwardRate * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PiecewiseFlatForward__SWIG_0) {
  {
    Date *arg1 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    std::vector< Handle< Quote > > *arg4 = 0 ;
    std::vector< Date > *arg5 = 0 ;
    Real arg6 ;
    BackwardFlat *arg7 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > temp2 ;
    std::vector< boost::shared_ptr< RateHelper > > *v2 ;
    void *argp3 ;
    int res3 = 0 ;
    std::vector< Handle< Quote > > temp4 ;
    std::vector< Handle< Quote > > *v4 ;
    std::vector< Date > temp5 ;
    std::vector< Date > *v5 ;
    double val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    int argvi = 0;
    PiecewiseFlatForwardPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: new_PiecewiseFlatForward(referenceDate,instruments,dayCounter,jumps,jumpDates,accuracy,i);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_PiecewiseFlatForward" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseFlatForward" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_PiecewiseFlatForward. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< RateHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1) {
            temp2.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_PiecewiseFlatForward. "
              "Expected an array of " "boost::shared_ptr< RateHelper >");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_PiecewiseFlatForward. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_PiecewiseFlatForward" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseFlatForward" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of new_PiecewiseFlatForward. "
          "Expected an array of " "Handle< Quote >");
        SV **tv;
        I32 len = av_len(av) + 1;
        Handle< Quote >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_HandleT_Quote_t,0) != -1) {
            temp4.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 4 of "
              "new_PiecewiseFlatForward. "
              "Expected an array of " "Handle< Quote >");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of new_PiecewiseFlatForward. "
          "Expected an array of " "Handle< Quote >");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(4),(void **) &v5, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg5 = v5;
      } else if (SvROK(ST(4))) {
        AV *av = (AV *)SvRV(ST(4));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 5 of new_PiecewiseFlatForward. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp5.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 5 of "
              "new_PiecewiseFlatForward. "
              "Expected an array of " "Date");
          }
        }
        arg5 = &temp5;
      } else {
        SWIG_croak("Type error in argument 5 of new_PiecewiseFlatForward. "
          "Expected an array of " "Date");
      }
    }
    ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_PiecewiseFlatForward" "', argument " "6"" of type '" "Real""'");
    } 
    arg6 = static_cast< Real >(val6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_BackwardFlat,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_PiecewiseFlatForward" "', argument " "7"" of type '" "BackwardFlat const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseFlatForward" "', argument " "7"" of type '" "BackwardFlat const &""'"); 
    }
    arg7 = reinterpret_cast< BackwardFlat * >(argp7);
    {
      try {
        result = (PiecewiseFlatForwardPtr *)new_PiecewiseFlatForwardPtr__SWIG_0((Date const &)*arg1,(std::vector< boost::shared_ptr< RateHelper > > const &)*arg2,(DayCounter const &)*arg3,(std::vector< Handle< Quote > > const &)*arg4,(std::vector< Date > const &)*arg5,arg6,(BackwardFlat const &)*arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PiecewiseFlatForwardPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PiecewiseFlatForward__SWIG_1) {
  {
    Date *arg1 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    std::vector< Handle< Quote > > *arg4 = 0 ;
    std::vector< Date > *arg5 = 0 ;
    Real arg6 ;
    void *argp1 ;
    int res1 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > temp2 ;
    std::vector< boost::shared_ptr< RateHelper > > *v2 ;
    void *argp3 ;
    int res3 = 0 ;
    std::vector< Handle< Quote > > temp4 ;
    std::vector< Handle< Quote > > *v4 ;
    std::vector< Date > temp5 ;
    std::vector< Date > *v5 ;
    double val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    PiecewiseFlatForwardPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_PiecewiseFlatForward(referenceDate,instruments,dayCounter,jumps,jumpDates,accuracy);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_PiecewiseFlatForward" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseFlatForward" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_PiecewiseFlatForward. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< RateHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1) {
            temp2.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_PiecewiseFlatForward. "
              "Expected an array of " "boost::shared_ptr< RateHelper >");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_PiecewiseFlatForward. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_PiecewiseFlatForward" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseFlatForward" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of new_PiecewiseFlatForward. "
          "Expected an array of " "Handle< Quote >");
        SV **tv;
        I32 len = av_len(av) + 1;
        Handle< Quote >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_HandleT_Quote_t,0) != -1) {
            temp4.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 4 of "
              "new_PiecewiseFlatForward. "
              "Expected an array of " "Handle< Quote >");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of new_PiecewiseFlatForward. "
          "Expected an array of " "Handle< Quote >");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(4),(void **) &v5, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg5 = v5;
      } else if (SvROK(ST(4))) {
        AV *av = (AV *)SvRV(ST(4));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 5 of new_PiecewiseFlatForward. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp5.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 5 of "
              "new_PiecewiseFlatForward. "
              "Expected an array of " "Date");
          }
        }
        arg5 = &temp5;
      } else {
        SWIG_croak("Type error in argument 5 of new_PiecewiseFlatForward. "
          "Expected an array of " "Date");
      }
    }
    ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_PiecewiseFlatForward" "', argument " "6"" of type '" "Real""'");
    } 
    arg6 = static_cast< Real >(val6);
    {
      try {
        result = (PiecewiseFlatForwardPtr *)new_PiecewiseFlatForwardPtr__SWIG_0((Date const &)*arg1,(std::vector< boost::shared_ptr< RateHelper > > const &)*arg2,(DayCounter const &)*arg3,(std::vector< Handle< Quote > > const &)*arg4,(std::vector< Date > const &)*arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PiecewiseFlatForwardPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PiecewiseFlatForward__SWIG_2) {
  {
    Date *arg1 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    std::vector< Handle< Quote > > *arg4 = 0 ;
    std::vector< Date > *arg5 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > temp2 ;
    std::vector< boost::shared_ptr< RateHelper > > *v2 ;
    void *argp3 ;
    int res3 = 0 ;
    std::vector< Handle< Quote > > temp4 ;
    std::vector< Handle< Quote > > *v4 ;
    std::vector< Date > temp5 ;
    std::vector< Date > *v5 ;
    int argvi = 0;
    PiecewiseFlatForwardPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_PiecewiseFlatForward(referenceDate,instruments,dayCounter,jumps,jumpDates);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_PiecewiseFlatForward" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseFlatForward" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_PiecewiseFlatForward. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< RateHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1) {
            temp2.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_PiecewiseFlatForward. "
              "Expected an array of " "boost::shared_ptr< RateHelper >");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_PiecewiseFlatForward. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_PiecewiseFlatForward" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseFlatForward" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of new_PiecewiseFlatForward. "
          "Expected an array of " "Handle< Quote >");
        SV **tv;
        I32 len = av_len(av) + 1;
        Handle< Quote >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_HandleT_Quote_t,0) != -1) {
            temp4.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 4 of "
              "new_PiecewiseFlatForward. "
              "Expected an array of " "Handle< Quote >");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of new_PiecewiseFlatForward. "
          "Expected an array of " "Handle< Quote >");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(4),(void **) &v5, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg5 = v5;
      } else if (SvROK(ST(4))) {
        AV *av = (AV *)SvRV(ST(4));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 5 of new_PiecewiseFlatForward. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp5.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 5 of "
              "new_PiecewiseFlatForward. "
              "Expected an array of " "Date");
          }
        }
        arg5 = &temp5;
      } else {
        SWIG_croak("Type error in argument 5 of new_PiecewiseFlatForward. "
          "Expected an array of " "Date");
      }
    }
    {
      try {
        result = (PiecewiseFlatForwardPtr *)new_PiecewiseFlatForwardPtr__SWIG_0((Date const &)*arg1,(std::vector< boost::shared_ptr< RateHelper > > const &)*arg2,(DayCounter const &)*arg3,(std::vector< Handle< Quote > > const &)*arg4,(std::vector< Date > const &)*arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PiecewiseFlatForwardPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PiecewiseFlatForward__SWIG_3) {
  {
    Date *arg1 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    std::vector< Handle< Quote > > *arg4 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > temp2 ;
    std::vector< boost::shared_ptr< RateHelper > > *v2 ;
    void *argp3 ;
    int res3 = 0 ;
    std::vector< Handle< Quote > > temp4 ;
    std::vector< Handle< Quote > > *v4 ;
    int argvi = 0;
    PiecewiseFlatForwardPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_PiecewiseFlatForward(referenceDate,instruments,dayCounter,jumps);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_PiecewiseFlatForward" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseFlatForward" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_PiecewiseFlatForward. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< RateHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1) {
            temp2.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_PiecewiseFlatForward. "
              "Expected an array of " "boost::shared_ptr< RateHelper >");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_PiecewiseFlatForward. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_PiecewiseFlatForward" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseFlatForward" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of new_PiecewiseFlatForward. "
          "Expected an array of " "Handle< Quote >");
        SV **tv;
        I32 len = av_len(av) + 1;
        Handle< Quote >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_HandleT_Quote_t,0) != -1) {
            temp4.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 4 of "
              "new_PiecewiseFlatForward. "
              "Expected an array of " "Handle< Quote >");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of new_PiecewiseFlatForward. "
          "Expected an array of " "Handle< Quote >");
      }
    }
    {
      try {
        result = (PiecewiseFlatForwardPtr *)new_PiecewiseFlatForwardPtr__SWIG_0((Date const &)*arg1,(std::vector< boost::shared_ptr< RateHelper > > const &)*arg2,(DayCounter const &)*arg3,(std::vector< Handle< Quote > > const &)*arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PiecewiseFlatForwardPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PiecewiseFlatForward__SWIG_4) {
  {
    Date *arg1 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > temp2 ;
    std::vector< boost::shared_ptr< RateHelper > > *v2 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    PiecewiseFlatForwardPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_PiecewiseFlatForward(referenceDate,instruments,dayCounter);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_PiecewiseFlatForward" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseFlatForward" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_PiecewiseFlatForward. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< RateHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1) {
            temp2.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_PiecewiseFlatForward. "
              "Expected an array of " "boost::shared_ptr< RateHelper >");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_PiecewiseFlatForward. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_PiecewiseFlatForward" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseFlatForward" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    {
      try {
        result = (PiecewiseFlatForwardPtr *)new_PiecewiseFlatForwardPtr__SWIG_0((Date const &)*arg1,(std::vector< boost::shared_ptr< RateHelper > > const &)*arg2,(DayCounter const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PiecewiseFlatForwardPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PiecewiseFlatForward__SWIG_5) {
  {
    Integer arg1 ;
    Calendar *arg2 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    std::vector< Handle< Quote > > *arg5 = 0 ;
    std::vector< Date > *arg6 = 0 ;
    Real arg7 ;
    BackwardFlat *arg8 = 0 ;
    int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > temp3 ;
    std::vector< boost::shared_ptr< RateHelper > > *v3 ;
    void *argp4 ;
    int res4 = 0 ;
    std::vector< Handle< Quote > > temp5 ;
    std::vector< Handle< Quote > > *v5 ;
    std::vector< Date > temp6 ;
    std::vector< Date > *v6 ;
    double val7 ;
    int ecode7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    int argvi = 0;
    PiecewiseFlatForwardPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 8) || (items > 8)) {
      SWIG_croak("Usage: new_PiecewiseFlatForward(settlementDays,calendar,instruments,dayCounter,jumps,jumpDates,accuracy,i);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_PiecewiseFlatForward" "', argument " "1"" of type '" "Integer""'");
    } 
    arg1 = static_cast< Integer >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_PiecewiseFlatForward" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseFlatForward" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_PiecewiseFlatForward. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< RateHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1) {
            temp3.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_PiecewiseFlatForward. "
              "Expected an array of " "boost::shared_ptr< RateHelper >");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_PiecewiseFlatForward. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
      }
    }
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_PiecewiseFlatForward" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseFlatForward" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    {
      if (SWIG_ConvertPtr(ST(4),(void **) &v5, 
          SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,1) != -1) {
        arg5 = v5;
      } else if (SvROK(ST(4))) {
        AV *av = (AV *)SvRV(ST(4));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 5 of new_PiecewiseFlatForward. "
          "Expected an array of " "Handle< Quote >");
        SV **tv;
        I32 len = av_len(av) + 1;
        Handle< Quote >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_HandleT_Quote_t,0) != -1) {
            temp5.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 5 of "
              "new_PiecewiseFlatForward. "
              "Expected an array of " "Handle< Quote >");
          }
        }
        arg5 = &temp5;
      } else {
        SWIG_croak("Type error in argument 5 of new_PiecewiseFlatForward. "
          "Expected an array of " "Handle< Quote >");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(5),(void **) &v6, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg6 = v6;
      } else if (SvROK(ST(5))) {
        AV *av = (AV *)SvRV(ST(5));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 6 of new_PiecewiseFlatForward. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp6.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 6 of "
              "new_PiecewiseFlatForward. "
              "Expected an array of " "Date");
          }
        }
        arg6 = &temp6;
      } else {
        SWIG_croak("Type error in argument 6 of new_PiecewiseFlatForward. "
          "Expected an array of " "Date");
      }
    }
    ecode7 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_PiecewiseFlatForward" "', argument " "7"" of type '" "Real""'");
    } 
    arg7 = static_cast< Real >(val7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_BackwardFlat,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_PiecewiseFlatForward" "', argument " "8"" of type '" "BackwardFlat const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseFlatForward" "', argument " "8"" of type '" "BackwardFlat const &""'"); 
    }
    arg8 = reinterpret_cast< BackwardFlat * >(argp8);
    {
      try {
        result = (PiecewiseFlatForwardPtr *)new_PiecewiseFlatForwardPtr__SWIG_5(arg1,(Calendar const &)*arg2,(std::vector< boost::shared_ptr< RateHelper > > const &)*arg3,(DayCounter const &)*arg4,(std::vector< Handle< Quote > > const &)*arg5,(std::vector< Date > const &)*arg6,arg7,(BackwardFlat const &)*arg8);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PiecewiseFlatForwardPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PiecewiseFlatForward__SWIG_6) {
  {
    Integer arg1 ;
    Calendar *arg2 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    std::vector< Handle< Quote > > *arg5 = 0 ;
    std::vector< Date > *arg6 = 0 ;
    Real arg7 ;
    int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > temp3 ;
    std::vector< boost::shared_ptr< RateHelper > > *v3 ;
    void *argp4 ;
    int res4 = 0 ;
    std::vector< Handle< Quote > > temp5 ;
    std::vector< Handle< Quote > > *v5 ;
    std::vector< Date > temp6 ;
    std::vector< Date > *v6 ;
    double val7 ;
    int ecode7 = 0 ;
    int argvi = 0;
    PiecewiseFlatForwardPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: new_PiecewiseFlatForward(settlementDays,calendar,instruments,dayCounter,jumps,jumpDates,accuracy);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_PiecewiseFlatForward" "', argument " "1"" of type '" "Integer""'");
    } 
    arg1 = static_cast< Integer >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_PiecewiseFlatForward" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseFlatForward" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_PiecewiseFlatForward. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< RateHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1) {
            temp3.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_PiecewiseFlatForward. "
              "Expected an array of " "boost::shared_ptr< RateHelper >");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_PiecewiseFlatForward. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
      }
    }
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_PiecewiseFlatForward" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseFlatForward" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    {
      if (SWIG_ConvertPtr(ST(4),(void **) &v5, 
          SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,1) != -1) {
        arg5 = v5;
      } else if (SvROK(ST(4))) {
        AV *av = (AV *)SvRV(ST(4));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 5 of new_PiecewiseFlatForward. "
          "Expected an array of " "Handle< Quote >");
        SV **tv;
        I32 len = av_len(av) + 1;
        Handle< Quote >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_HandleT_Quote_t,0) != -1) {
            temp5.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 5 of "
              "new_PiecewiseFlatForward. "
              "Expected an array of " "Handle< Quote >");
          }
        }
        arg5 = &temp5;
      } else {
        SWIG_croak("Type error in argument 5 of new_PiecewiseFlatForward. "
          "Expected an array of " "Handle< Quote >");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(5),(void **) &v6, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg6 = v6;
      } else if (SvROK(ST(5))) {
        AV *av = (AV *)SvRV(ST(5));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 6 of new_PiecewiseFlatForward. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp6.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 6 of "
              "new_PiecewiseFlatForward. "
              "Expected an array of " "Date");
          }
        }
        arg6 = &temp6;
      } else {
        SWIG_croak("Type error in argument 6 of new_PiecewiseFlatForward. "
          "Expected an array of " "Date");
      }
    }
    ecode7 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_PiecewiseFlatForward" "', argument " "7"" of type '" "Real""'");
    } 
    arg7 = static_cast< Real >(val7);
    {
      try {
        result = (PiecewiseFlatForwardPtr *)new_PiecewiseFlatForwardPtr__SWIG_5(arg1,(Calendar const &)*arg2,(std::vector< boost::shared_ptr< RateHelper > > const &)*arg3,(DayCounter const &)*arg4,(std::vector< Handle< Quote > > const &)*arg5,(std::vector< Date > const &)*arg6,arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PiecewiseFlatForwardPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PiecewiseFlatForward__SWIG_7) {
  {
    Integer arg1 ;
    Calendar *arg2 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    std::vector< Handle< Quote > > *arg5 = 0 ;
    std::vector< Date > *arg6 = 0 ;
    int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > temp3 ;
    std::vector< boost::shared_ptr< RateHelper > > *v3 ;
    void *argp4 ;
    int res4 = 0 ;
    std::vector< Handle< Quote > > temp5 ;
    std::vector< Handle< Quote > > *v5 ;
    std::vector< Date > temp6 ;
    std::vector< Date > *v6 ;
    int argvi = 0;
    PiecewiseFlatForwardPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_PiecewiseFlatForward(settlementDays,calendar,instruments,dayCounter,jumps,jumpDates);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_PiecewiseFlatForward" "', argument " "1"" of type '" "Integer""'");
    } 
    arg1 = static_cast< Integer >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_PiecewiseFlatForward" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseFlatForward" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_PiecewiseFlatForward. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< RateHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1) {
            temp3.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_PiecewiseFlatForward. "
              "Expected an array of " "boost::shared_ptr< RateHelper >");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_PiecewiseFlatForward. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
      }
    }
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_PiecewiseFlatForward" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseFlatForward" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    {
      if (SWIG_ConvertPtr(ST(4),(void **) &v5, 
          SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,1) != -1) {
        arg5 = v5;
      } else if (SvROK(ST(4))) {
        AV *av = (AV *)SvRV(ST(4));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 5 of new_PiecewiseFlatForward. "
          "Expected an array of " "Handle< Quote >");
        SV **tv;
        I32 len = av_len(av) + 1;
        Handle< Quote >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_HandleT_Quote_t,0) != -1) {
            temp5.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 5 of "
              "new_PiecewiseFlatForward. "
              "Expected an array of " "Handle< Quote >");
          }
        }
        arg5 = &temp5;
      } else {
        SWIG_croak("Type error in argument 5 of new_PiecewiseFlatForward. "
          "Expected an array of " "Handle< Quote >");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(5),(void **) &v6, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg6 = v6;
      } else if (SvROK(ST(5))) {
        AV *av = (AV *)SvRV(ST(5));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 6 of new_PiecewiseFlatForward. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp6.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 6 of "
              "new_PiecewiseFlatForward. "
              "Expected an array of " "Date");
          }
        }
        arg6 = &temp6;
      } else {
        SWIG_croak("Type error in argument 6 of new_PiecewiseFlatForward. "
          "Expected an array of " "Date");
      }
    }
    {
      try {
        result = (PiecewiseFlatForwardPtr *)new_PiecewiseFlatForwardPtr__SWIG_5(arg1,(Calendar const &)*arg2,(std::vector< boost::shared_ptr< RateHelper > > const &)*arg3,(DayCounter const &)*arg4,(std::vector< Handle< Quote > > const &)*arg5,(std::vector< Date > const &)*arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PiecewiseFlatForwardPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PiecewiseFlatForward__SWIG_8) {
  {
    Integer arg1 ;
    Calendar *arg2 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    std::vector< Handle< Quote > > *arg5 = 0 ;
    int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > temp3 ;
    std::vector< boost::shared_ptr< RateHelper > > *v3 ;
    void *argp4 ;
    int res4 = 0 ;
    std::vector< Handle< Quote > > temp5 ;
    std::vector< Handle< Quote > > *v5 ;
    int argvi = 0;
    PiecewiseFlatForwardPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_PiecewiseFlatForward(settlementDays,calendar,instruments,dayCounter,jumps);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_PiecewiseFlatForward" "', argument " "1"" of type '" "Integer""'");
    } 
    arg1 = static_cast< Integer >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_PiecewiseFlatForward" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseFlatForward" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_PiecewiseFlatForward. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< RateHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1) {
            temp3.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_PiecewiseFlatForward. "
              "Expected an array of " "boost::shared_ptr< RateHelper >");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_PiecewiseFlatForward. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
      }
    }
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_PiecewiseFlatForward" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseFlatForward" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    {
      if (SWIG_ConvertPtr(ST(4),(void **) &v5, 
          SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,1) != -1) {
        arg5 = v5;
      } else if (SvROK(ST(4))) {
        AV *av = (AV *)SvRV(ST(4));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 5 of new_PiecewiseFlatForward. "
          "Expected an array of " "Handle< Quote >");
        SV **tv;
        I32 len = av_len(av) + 1;
        Handle< Quote >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_HandleT_Quote_t,0) != -1) {
            temp5.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 5 of "
              "new_PiecewiseFlatForward. "
              "Expected an array of " "Handle< Quote >");
          }
        }
        arg5 = &temp5;
      } else {
        SWIG_croak("Type error in argument 5 of new_PiecewiseFlatForward. "
          "Expected an array of " "Handle< Quote >");
      }
    }
    {
      try {
        result = (PiecewiseFlatForwardPtr *)new_PiecewiseFlatForwardPtr__SWIG_5(arg1,(Calendar const &)*arg2,(std::vector< boost::shared_ptr< RateHelper > > const &)*arg3,(DayCounter const &)*arg4,(std::vector< Handle< Quote > > const &)*arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PiecewiseFlatForwardPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PiecewiseFlatForward__SWIG_9) {
  {
    Integer arg1 ;
    Calendar *arg2 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > temp3 ;
    std::vector< boost::shared_ptr< RateHelper > > *v3 ;
    void *argp4 ;
    int res4 = 0 ;
    int argvi = 0;
    PiecewiseFlatForwardPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_PiecewiseFlatForward(settlementDays,calendar,instruments,dayCounter);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_PiecewiseFlatForward" "', argument " "1"" of type '" "Integer""'");
    } 
    arg1 = static_cast< Integer >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_PiecewiseFlatForward" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseFlatForward" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_PiecewiseFlatForward. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< RateHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1) {
            temp3.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_PiecewiseFlatForward. "
              "Expected an array of " "boost::shared_ptr< RateHelper >");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_PiecewiseFlatForward. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
      }
    }
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_PiecewiseFlatForward" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseFlatForward" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    {
      try {
        result = (PiecewiseFlatForwardPtr *)new_PiecewiseFlatForwardPtr__SWIG_5(arg1,(Calendar const &)*arg2,(std::vector< boost::shared_ptr< RateHelper > > const &)*arg3,(DayCounter const &)*arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PiecewiseFlatForwardPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PiecewiseFlatForward) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< RateHelper > >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< RateHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< RateHelper > >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< RateHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Handle< Quote > >* v;
            if (SWIG_ConvertPtr(ST(3),(void **) &v, 
                SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(3))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(3));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Handle< Quote >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_HandleT_Quote_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< RateHelper > >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< RateHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< RateHelper > >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< RateHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Handle< Quote > >* v;
            if (SWIG_ConvertPtr(ST(3),(void **) &v, 
                SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(3))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(3));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Handle< Quote >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_HandleT_Quote_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(4),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(4))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(4));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< RateHelper > >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< RateHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Handle< Quote > >* v;
            if (SWIG_ConvertPtr(ST(4),(void **) &v, 
                SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(4))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(4));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Handle< Quote >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_HandleT_Quote_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< RateHelper > >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< RateHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Handle< Quote > >* v;
            if (SWIG_ConvertPtr(ST(3),(void **) &v, 
                SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(3))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(3));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Handle< Quote >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_HandleT_Quote_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(4),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(4))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(4));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< RateHelper > >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< RateHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Handle< Quote > >* v;
            if (SWIG_ConvertPtr(ST(4),(void **) &v, 
                SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(4))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(4));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Handle< Quote >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_HandleT_Quote_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(5),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(5))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(5));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 7;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_7:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< RateHelper > >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< RateHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Handle< Quote > >* v;
            if (SWIG_ConvertPtr(ST(3),(void **) &v, 
                SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(3))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(3));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Handle< Quote >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_HandleT_Quote_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(4),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(4))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(4));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_BackwardFlat, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 8;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_8:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< RateHelper > >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< RateHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Handle< Quote > >* v;
            if (SWIG_ConvertPtr(ST(4),(void **) &v, 
                SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(4))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(4));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Handle< Quote >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_HandleT_Quote_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(5),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(5))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(5));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 9;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_9:
    
    if (items == 8) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< RateHelper > >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< RateHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Handle< Quote > >* v;
            if (SWIG_ConvertPtr(ST(4),(void **) &v, 
                SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(4))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(4));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Handle< Quote >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_HandleT_Quote_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(5),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(5))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(5));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_BackwardFlat, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 10;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_10:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_PiecewiseFlatForward__SWIG_4); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_PiecewiseFlatForward__SWIG_3); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_PiecewiseFlatForward__SWIG_9); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_PiecewiseFlatForward__SWIG_2); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_PiecewiseFlatForward__SWIG_8); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_PiecewiseFlatForward__SWIG_1); return;
    case 7:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_PiecewiseFlatForward__SWIG_7); return;
    case 8:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_PiecewiseFlatForward__SWIG_0); return;
    case 9:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_PiecewiseFlatForward__SWIG_6); return;
    case 10:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_PiecewiseFlatForward__SWIG_5); return;
    }
  }
  
  croak("No matching function for overloaded 'new_PiecewiseFlatForward'");
  XSRETURN(0);
}


XS(_wrap_PiecewiseFlatForward_dates) {
  {
    PiecewiseFlatForwardPtr *arg1 = (PiecewiseFlatForwardPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Date > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: PiecewiseFlatForward_dates(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PiecewiseFlatForwardPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PiecewiseFlatForward_dates" "', argument " "1"" of type '" "PiecewiseFlatForwardPtr *""'"); 
    }
    arg1 = reinterpret_cast< PiecewiseFlatForwardPtr * >(argp1);
    {
      try {
        result = (std::vector< Date > *) &PiecewiseFlatForwardPtr_dates(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_Date_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_PiecewiseFlatForward_times) {
  {
    PiecewiseFlatForwardPtr *arg1 = (PiecewiseFlatForwardPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Time > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: PiecewiseFlatForward_times(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PiecewiseFlatForwardPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PiecewiseFlatForward_times" "', argument " "1"" of type '" "PiecewiseFlatForwardPtr *""'"); 
    }
    arg1 = reinterpret_cast< PiecewiseFlatForwardPtr * >(argp1);
    {
      try {
        result = (std::vector< Time > *) &PiecewiseFlatForwardPtr_times(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_PiecewiseFlatForward_nodes) {
  {
    PiecewiseFlatForwardPtr *arg1 = (PiecewiseFlatForwardPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< std::pair< Date,Real > > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: PiecewiseFlatForward_nodes(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PiecewiseFlatForwardPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PiecewiseFlatForward_nodes" "', argument " "1"" of type '" "PiecewiseFlatForwardPtr *""'"); 
    }
    arg1 = reinterpret_cast< PiecewiseFlatForwardPtr * >(argp1);
    {
      try {
        result = PiecewiseFlatForwardPtr_nodes(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        std::pair< Date,double >* ptr = new std::pair< Date,double >(result[i]);
        svs[i] = sv_newmortal();
        SWIG_MakePtr(svs[i], (void*) ptr, 
          SWIGTYPE_p_std__pairT_Date_double_t, SWIG_SHADOW|0);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_PiecewiseFlatForward) {
  {
    PiecewiseFlatForwardPtr *arg1 = (PiecewiseFlatForwardPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_PiecewiseFlatForward(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PiecewiseFlatForwardPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_PiecewiseFlatForward" "', argument " "1"" of type '" "PiecewiseFlatForwardPtr *""'"); 
    }
    arg1 = reinterpret_cast< PiecewiseFlatForwardPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PiecewiseLinearForward__SWIG_0) {
  {
    Date *arg1 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    std::vector< Handle< Quote > > *arg4 = 0 ;
    std::vector< Date > *arg5 = 0 ;
    Real arg6 ;
    Linear *arg7 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > temp2 ;
    std::vector< boost::shared_ptr< RateHelper > > *v2 ;
    void *argp3 ;
    int res3 = 0 ;
    std::vector< Handle< Quote > > temp4 ;
    std::vector< Handle< Quote > > *v4 ;
    std::vector< Date > temp5 ;
    std::vector< Date > *v5 ;
    double val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    int argvi = 0;
    PiecewiseLinearForwardPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: new_PiecewiseLinearForward(referenceDate,instruments,dayCounter,jumps,jumpDates,accuracy,i);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_PiecewiseLinearForward" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseLinearForward" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_PiecewiseLinearForward. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< RateHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1) {
            temp2.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_PiecewiseLinearForward. "
              "Expected an array of " "boost::shared_ptr< RateHelper >");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_PiecewiseLinearForward. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_PiecewiseLinearForward" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseLinearForward" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of new_PiecewiseLinearForward. "
          "Expected an array of " "Handle< Quote >");
        SV **tv;
        I32 len = av_len(av) + 1;
        Handle< Quote >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_HandleT_Quote_t,0) != -1) {
            temp4.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 4 of "
              "new_PiecewiseLinearForward. "
              "Expected an array of " "Handle< Quote >");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of new_PiecewiseLinearForward. "
          "Expected an array of " "Handle< Quote >");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(4),(void **) &v5, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg5 = v5;
      } else if (SvROK(ST(4))) {
        AV *av = (AV *)SvRV(ST(4));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 5 of new_PiecewiseLinearForward. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp5.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 5 of "
              "new_PiecewiseLinearForward. "
              "Expected an array of " "Date");
          }
        }
        arg5 = &temp5;
      } else {
        SWIG_croak("Type error in argument 5 of new_PiecewiseLinearForward. "
          "Expected an array of " "Date");
      }
    }
    ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_PiecewiseLinearForward" "', argument " "6"" of type '" "Real""'");
    } 
    arg6 = static_cast< Real >(val6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Linear,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_PiecewiseLinearForward" "', argument " "7"" of type '" "Linear const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseLinearForward" "', argument " "7"" of type '" "Linear const &""'"); 
    }
    arg7 = reinterpret_cast< Linear * >(argp7);
    {
      try {
        result = (PiecewiseLinearForwardPtr *)new_PiecewiseLinearForwardPtr__SWIG_0((Date const &)*arg1,(std::vector< boost::shared_ptr< RateHelper > > const &)*arg2,(DayCounter const &)*arg3,(std::vector< Handle< Quote > > const &)*arg4,(std::vector< Date > const &)*arg5,arg6,(Linear const &)*arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PiecewiseLinearForwardPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PiecewiseLinearForward__SWIG_1) {
  {
    Date *arg1 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    std::vector< Handle< Quote > > *arg4 = 0 ;
    std::vector< Date > *arg5 = 0 ;
    Real arg6 ;
    void *argp1 ;
    int res1 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > temp2 ;
    std::vector< boost::shared_ptr< RateHelper > > *v2 ;
    void *argp3 ;
    int res3 = 0 ;
    std::vector< Handle< Quote > > temp4 ;
    std::vector< Handle< Quote > > *v4 ;
    std::vector< Date > temp5 ;
    std::vector< Date > *v5 ;
    double val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    PiecewiseLinearForwardPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_PiecewiseLinearForward(referenceDate,instruments,dayCounter,jumps,jumpDates,accuracy);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_PiecewiseLinearForward" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseLinearForward" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_PiecewiseLinearForward. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< RateHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1) {
            temp2.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_PiecewiseLinearForward. "
              "Expected an array of " "boost::shared_ptr< RateHelper >");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_PiecewiseLinearForward. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_PiecewiseLinearForward" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseLinearForward" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of new_PiecewiseLinearForward. "
          "Expected an array of " "Handle< Quote >");
        SV **tv;
        I32 len = av_len(av) + 1;
        Handle< Quote >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_HandleT_Quote_t,0) != -1) {
            temp4.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 4 of "
              "new_PiecewiseLinearForward. "
              "Expected an array of " "Handle< Quote >");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of new_PiecewiseLinearForward. "
          "Expected an array of " "Handle< Quote >");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(4),(void **) &v5, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg5 = v5;
      } else if (SvROK(ST(4))) {
        AV *av = (AV *)SvRV(ST(4));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 5 of new_PiecewiseLinearForward. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp5.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 5 of "
              "new_PiecewiseLinearForward. "
              "Expected an array of " "Date");
          }
        }
        arg5 = &temp5;
      } else {
        SWIG_croak("Type error in argument 5 of new_PiecewiseLinearForward. "
          "Expected an array of " "Date");
      }
    }
    ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_PiecewiseLinearForward" "', argument " "6"" of type '" "Real""'");
    } 
    arg6 = static_cast< Real >(val6);
    {
      try {
        result = (PiecewiseLinearForwardPtr *)new_PiecewiseLinearForwardPtr__SWIG_0((Date const &)*arg1,(std::vector< boost::shared_ptr< RateHelper > > const &)*arg2,(DayCounter const &)*arg3,(std::vector< Handle< Quote > > const &)*arg4,(std::vector< Date > const &)*arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PiecewiseLinearForwardPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PiecewiseLinearForward__SWIG_2) {
  {
    Date *arg1 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    std::vector< Handle< Quote > > *arg4 = 0 ;
    std::vector< Date > *arg5 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > temp2 ;
    std::vector< boost::shared_ptr< RateHelper > > *v2 ;
    void *argp3 ;
    int res3 = 0 ;
    std::vector< Handle< Quote > > temp4 ;
    std::vector< Handle< Quote > > *v4 ;
    std::vector< Date > temp5 ;
    std::vector< Date > *v5 ;
    int argvi = 0;
    PiecewiseLinearForwardPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_PiecewiseLinearForward(referenceDate,instruments,dayCounter,jumps,jumpDates);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_PiecewiseLinearForward" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseLinearForward" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_PiecewiseLinearForward. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< RateHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1) {
            temp2.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_PiecewiseLinearForward. "
              "Expected an array of " "boost::shared_ptr< RateHelper >");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_PiecewiseLinearForward. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_PiecewiseLinearForward" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseLinearForward" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of new_PiecewiseLinearForward. "
          "Expected an array of " "Handle< Quote >");
        SV **tv;
        I32 len = av_len(av) + 1;
        Handle< Quote >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_HandleT_Quote_t,0) != -1) {
            temp4.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 4 of "
              "new_PiecewiseLinearForward. "
              "Expected an array of " "Handle< Quote >");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of new_PiecewiseLinearForward. "
          "Expected an array of " "Handle< Quote >");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(4),(void **) &v5, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg5 = v5;
      } else if (SvROK(ST(4))) {
        AV *av = (AV *)SvRV(ST(4));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 5 of new_PiecewiseLinearForward. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp5.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 5 of "
              "new_PiecewiseLinearForward. "
              "Expected an array of " "Date");
          }
        }
        arg5 = &temp5;
      } else {
        SWIG_croak("Type error in argument 5 of new_PiecewiseLinearForward. "
          "Expected an array of " "Date");
      }
    }
    {
      try {
        result = (PiecewiseLinearForwardPtr *)new_PiecewiseLinearForwardPtr__SWIG_0((Date const &)*arg1,(std::vector< boost::shared_ptr< RateHelper > > const &)*arg2,(DayCounter const &)*arg3,(std::vector< Handle< Quote > > const &)*arg4,(std::vector< Date > const &)*arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PiecewiseLinearForwardPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PiecewiseLinearForward__SWIG_3) {
  {
    Date *arg1 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    std::vector< Handle< Quote > > *arg4 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > temp2 ;
    std::vector< boost::shared_ptr< RateHelper > > *v2 ;
    void *argp3 ;
    int res3 = 0 ;
    std::vector< Handle< Quote > > temp4 ;
    std::vector< Handle< Quote > > *v4 ;
    int argvi = 0;
    PiecewiseLinearForwardPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_PiecewiseLinearForward(referenceDate,instruments,dayCounter,jumps);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_PiecewiseLinearForward" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseLinearForward" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_PiecewiseLinearForward. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< RateHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1) {
            temp2.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_PiecewiseLinearForward. "
              "Expected an array of " "boost::shared_ptr< RateHelper >");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_PiecewiseLinearForward. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_PiecewiseLinearForward" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseLinearForward" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of new_PiecewiseLinearForward. "
          "Expected an array of " "Handle< Quote >");
        SV **tv;
        I32 len = av_len(av) + 1;
        Handle< Quote >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_HandleT_Quote_t,0) != -1) {
            temp4.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 4 of "
              "new_PiecewiseLinearForward. "
              "Expected an array of " "Handle< Quote >");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of new_PiecewiseLinearForward. "
          "Expected an array of " "Handle< Quote >");
      }
    }
    {
      try {
        result = (PiecewiseLinearForwardPtr *)new_PiecewiseLinearForwardPtr__SWIG_0((Date const &)*arg1,(std::vector< boost::shared_ptr< RateHelper > > const &)*arg2,(DayCounter const &)*arg3,(std::vector< Handle< Quote > > const &)*arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PiecewiseLinearForwardPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PiecewiseLinearForward__SWIG_4) {
  {
    Date *arg1 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > temp2 ;
    std::vector< boost::shared_ptr< RateHelper > > *v2 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    PiecewiseLinearForwardPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_PiecewiseLinearForward(referenceDate,instruments,dayCounter);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_PiecewiseLinearForward" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseLinearForward" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_PiecewiseLinearForward. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< RateHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1) {
            temp2.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_PiecewiseLinearForward. "
              "Expected an array of " "boost::shared_ptr< RateHelper >");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_PiecewiseLinearForward. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_PiecewiseLinearForward" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseLinearForward" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    {
      try {
        result = (PiecewiseLinearForwardPtr *)new_PiecewiseLinearForwardPtr__SWIG_0((Date const &)*arg1,(std::vector< boost::shared_ptr< RateHelper > > const &)*arg2,(DayCounter const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PiecewiseLinearForwardPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PiecewiseLinearForward__SWIG_5) {
  {
    Integer arg1 ;
    Calendar *arg2 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    std::vector< Handle< Quote > > *arg5 = 0 ;
    std::vector< Date > *arg6 = 0 ;
    Real arg7 ;
    Linear *arg8 = 0 ;
    int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > temp3 ;
    std::vector< boost::shared_ptr< RateHelper > > *v3 ;
    void *argp4 ;
    int res4 = 0 ;
    std::vector< Handle< Quote > > temp5 ;
    std::vector< Handle< Quote > > *v5 ;
    std::vector< Date > temp6 ;
    std::vector< Date > *v6 ;
    double val7 ;
    int ecode7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    int argvi = 0;
    PiecewiseLinearForwardPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 8) || (items > 8)) {
      SWIG_croak("Usage: new_PiecewiseLinearForward(settlementDays,calendar,instruments,dayCounter,jumps,jumpDates,accuracy,i);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_PiecewiseLinearForward" "', argument " "1"" of type '" "Integer""'");
    } 
    arg1 = static_cast< Integer >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_PiecewiseLinearForward" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseLinearForward" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_PiecewiseLinearForward. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< RateHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1) {
            temp3.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_PiecewiseLinearForward. "
              "Expected an array of " "boost::shared_ptr< RateHelper >");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_PiecewiseLinearForward. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
      }
    }
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_PiecewiseLinearForward" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseLinearForward" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    {
      if (SWIG_ConvertPtr(ST(4),(void **) &v5, 
          SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,1) != -1) {
        arg5 = v5;
      } else if (SvROK(ST(4))) {
        AV *av = (AV *)SvRV(ST(4));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 5 of new_PiecewiseLinearForward. "
          "Expected an array of " "Handle< Quote >");
        SV **tv;
        I32 len = av_len(av) + 1;
        Handle< Quote >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_HandleT_Quote_t,0) != -1) {
            temp5.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 5 of "
              "new_PiecewiseLinearForward. "
              "Expected an array of " "Handle< Quote >");
          }
        }
        arg5 = &temp5;
      } else {
        SWIG_croak("Type error in argument 5 of new_PiecewiseLinearForward. "
          "Expected an array of " "Handle< Quote >");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(5),(void **) &v6, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg6 = v6;
      } else if (SvROK(ST(5))) {
        AV *av = (AV *)SvRV(ST(5));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 6 of new_PiecewiseLinearForward. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp6.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 6 of "
              "new_PiecewiseLinearForward. "
              "Expected an array of " "Date");
          }
        }
        arg6 = &temp6;
      } else {
        SWIG_croak("Type error in argument 6 of new_PiecewiseLinearForward. "
          "Expected an array of " "Date");
      }
    }
    ecode7 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_PiecewiseLinearForward" "', argument " "7"" of type '" "Real""'");
    } 
    arg7 = static_cast< Real >(val7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_Linear,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_PiecewiseLinearForward" "', argument " "8"" of type '" "Linear const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseLinearForward" "', argument " "8"" of type '" "Linear const &""'"); 
    }
    arg8 = reinterpret_cast< Linear * >(argp8);
    {
      try {
        result = (PiecewiseLinearForwardPtr *)new_PiecewiseLinearForwardPtr__SWIG_5(arg1,(Calendar const &)*arg2,(std::vector< boost::shared_ptr< RateHelper > > const &)*arg3,(DayCounter const &)*arg4,(std::vector< Handle< Quote > > const &)*arg5,(std::vector< Date > const &)*arg6,arg7,(Linear const &)*arg8);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PiecewiseLinearForwardPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PiecewiseLinearForward__SWIG_6) {
  {
    Integer arg1 ;
    Calendar *arg2 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    std::vector< Handle< Quote > > *arg5 = 0 ;
    std::vector< Date > *arg6 = 0 ;
    Real arg7 ;
    int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > temp3 ;
    std::vector< boost::shared_ptr< RateHelper > > *v3 ;
    void *argp4 ;
    int res4 = 0 ;
    std::vector< Handle< Quote > > temp5 ;
    std::vector< Handle< Quote > > *v5 ;
    std::vector< Date > temp6 ;
    std::vector< Date > *v6 ;
    double val7 ;
    int ecode7 = 0 ;
    int argvi = 0;
    PiecewiseLinearForwardPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: new_PiecewiseLinearForward(settlementDays,calendar,instruments,dayCounter,jumps,jumpDates,accuracy);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_PiecewiseLinearForward" "', argument " "1"" of type '" "Integer""'");
    } 
    arg1 = static_cast< Integer >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_PiecewiseLinearForward" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseLinearForward" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_PiecewiseLinearForward. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< RateHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1) {
            temp3.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_PiecewiseLinearForward. "
              "Expected an array of " "boost::shared_ptr< RateHelper >");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_PiecewiseLinearForward. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
      }
    }
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_PiecewiseLinearForward" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseLinearForward" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    {
      if (SWIG_ConvertPtr(ST(4),(void **) &v5, 
          SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,1) != -1) {
        arg5 = v5;
      } else if (SvROK(ST(4))) {
        AV *av = (AV *)SvRV(ST(4));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 5 of new_PiecewiseLinearForward. "
          "Expected an array of " "Handle< Quote >");
        SV **tv;
        I32 len = av_len(av) + 1;
        Handle< Quote >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_HandleT_Quote_t,0) != -1) {
            temp5.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 5 of "
              "new_PiecewiseLinearForward. "
              "Expected an array of " "Handle< Quote >");
          }
        }
        arg5 = &temp5;
      } else {
        SWIG_croak("Type error in argument 5 of new_PiecewiseLinearForward. "
          "Expected an array of " "Handle< Quote >");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(5),(void **) &v6, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg6 = v6;
      } else if (SvROK(ST(5))) {
        AV *av = (AV *)SvRV(ST(5));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 6 of new_PiecewiseLinearForward. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp6.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 6 of "
              "new_PiecewiseLinearForward. "
              "Expected an array of " "Date");
          }
        }
        arg6 = &temp6;
      } else {
        SWIG_croak("Type error in argument 6 of new_PiecewiseLinearForward. "
          "Expected an array of " "Date");
      }
    }
    ecode7 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_PiecewiseLinearForward" "', argument " "7"" of type '" "Real""'");
    } 
    arg7 = static_cast< Real >(val7);
    {
      try {
        result = (PiecewiseLinearForwardPtr *)new_PiecewiseLinearForwardPtr__SWIG_5(arg1,(Calendar const &)*arg2,(std::vector< boost::shared_ptr< RateHelper > > const &)*arg3,(DayCounter const &)*arg4,(std::vector< Handle< Quote > > const &)*arg5,(std::vector< Date > const &)*arg6,arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PiecewiseLinearForwardPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PiecewiseLinearForward__SWIG_7) {
  {
    Integer arg1 ;
    Calendar *arg2 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    std::vector< Handle< Quote > > *arg5 = 0 ;
    std::vector< Date > *arg6 = 0 ;
    int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > temp3 ;
    std::vector< boost::shared_ptr< RateHelper > > *v3 ;
    void *argp4 ;
    int res4 = 0 ;
    std::vector< Handle< Quote > > temp5 ;
    std::vector< Handle< Quote > > *v5 ;
    std::vector< Date > temp6 ;
    std::vector< Date > *v6 ;
    int argvi = 0;
    PiecewiseLinearForwardPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_PiecewiseLinearForward(settlementDays,calendar,instruments,dayCounter,jumps,jumpDates);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_PiecewiseLinearForward" "', argument " "1"" of type '" "Integer""'");
    } 
    arg1 = static_cast< Integer >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_PiecewiseLinearForward" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseLinearForward" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_PiecewiseLinearForward. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< RateHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1) {
            temp3.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_PiecewiseLinearForward. "
              "Expected an array of " "boost::shared_ptr< RateHelper >");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_PiecewiseLinearForward. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
      }
    }
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_PiecewiseLinearForward" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseLinearForward" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    {
      if (SWIG_ConvertPtr(ST(4),(void **) &v5, 
          SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,1) != -1) {
        arg5 = v5;
      } else if (SvROK(ST(4))) {
        AV *av = (AV *)SvRV(ST(4));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 5 of new_PiecewiseLinearForward. "
          "Expected an array of " "Handle< Quote >");
        SV **tv;
        I32 len = av_len(av) + 1;
        Handle< Quote >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_HandleT_Quote_t,0) != -1) {
            temp5.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 5 of "
              "new_PiecewiseLinearForward. "
              "Expected an array of " "Handle< Quote >");
          }
        }
        arg5 = &temp5;
      } else {
        SWIG_croak("Type error in argument 5 of new_PiecewiseLinearForward. "
          "Expected an array of " "Handle< Quote >");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(5),(void **) &v6, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg6 = v6;
      } else if (SvROK(ST(5))) {
        AV *av = (AV *)SvRV(ST(5));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 6 of new_PiecewiseLinearForward. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp6.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 6 of "
              "new_PiecewiseLinearForward. "
              "Expected an array of " "Date");
          }
        }
        arg6 = &temp6;
      } else {
        SWIG_croak("Type error in argument 6 of new_PiecewiseLinearForward. "
          "Expected an array of " "Date");
      }
    }
    {
      try {
        result = (PiecewiseLinearForwardPtr *)new_PiecewiseLinearForwardPtr__SWIG_5(arg1,(Calendar const &)*arg2,(std::vector< boost::shared_ptr< RateHelper > > const &)*arg3,(DayCounter const &)*arg4,(std::vector< Handle< Quote > > const &)*arg5,(std::vector< Date > const &)*arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PiecewiseLinearForwardPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PiecewiseLinearForward__SWIG_8) {
  {
    Integer arg1 ;
    Calendar *arg2 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    std::vector< Handle< Quote > > *arg5 = 0 ;
    int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > temp3 ;
    std::vector< boost::shared_ptr< RateHelper > > *v3 ;
    void *argp4 ;
    int res4 = 0 ;
    std::vector< Handle< Quote > > temp5 ;
    std::vector< Handle< Quote > > *v5 ;
    int argvi = 0;
    PiecewiseLinearForwardPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_PiecewiseLinearForward(settlementDays,calendar,instruments,dayCounter,jumps);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_PiecewiseLinearForward" "', argument " "1"" of type '" "Integer""'");
    } 
    arg1 = static_cast< Integer >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_PiecewiseLinearForward" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseLinearForward" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_PiecewiseLinearForward. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< RateHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1) {
            temp3.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_PiecewiseLinearForward. "
              "Expected an array of " "boost::shared_ptr< RateHelper >");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_PiecewiseLinearForward. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
      }
    }
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_PiecewiseLinearForward" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseLinearForward" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    {
      if (SWIG_ConvertPtr(ST(4),(void **) &v5, 
          SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,1) != -1) {
        arg5 = v5;
      } else if (SvROK(ST(4))) {
        AV *av = (AV *)SvRV(ST(4));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 5 of new_PiecewiseLinearForward. "
          "Expected an array of " "Handle< Quote >");
        SV **tv;
        I32 len = av_len(av) + 1;
        Handle< Quote >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_HandleT_Quote_t,0) != -1) {
            temp5.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 5 of "
              "new_PiecewiseLinearForward. "
              "Expected an array of " "Handle< Quote >");
          }
        }
        arg5 = &temp5;
      } else {
        SWIG_croak("Type error in argument 5 of new_PiecewiseLinearForward. "
          "Expected an array of " "Handle< Quote >");
      }
    }
    {
      try {
        result = (PiecewiseLinearForwardPtr *)new_PiecewiseLinearForwardPtr__SWIG_5(arg1,(Calendar const &)*arg2,(std::vector< boost::shared_ptr< RateHelper > > const &)*arg3,(DayCounter const &)*arg4,(std::vector< Handle< Quote > > const &)*arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PiecewiseLinearForwardPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PiecewiseLinearForward__SWIG_9) {
  {
    Integer arg1 ;
    Calendar *arg2 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > temp3 ;
    std::vector< boost::shared_ptr< RateHelper > > *v3 ;
    void *argp4 ;
    int res4 = 0 ;
    int argvi = 0;
    PiecewiseLinearForwardPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_PiecewiseLinearForward(settlementDays,calendar,instruments,dayCounter);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_PiecewiseLinearForward" "', argument " "1"" of type '" "Integer""'");
    } 
    arg1 = static_cast< Integer >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_PiecewiseLinearForward" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseLinearForward" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_PiecewiseLinearForward. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< RateHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1) {
            temp3.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_PiecewiseLinearForward. "
              "Expected an array of " "boost::shared_ptr< RateHelper >");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_PiecewiseLinearForward. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
      }
    }
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_PiecewiseLinearForward" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseLinearForward" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    {
      try {
        result = (PiecewiseLinearForwardPtr *)new_PiecewiseLinearForwardPtr__SWIG_5(arg1,(Calendar const &)*arg2,(std::vector< boost::shared_ptr< RateHelper > > const &)*arg3,(DayCounter const &)*arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PiecewiseLinearForwardPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PiecewiseLinearForward) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< RateHelper > >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< RateHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< RateHelper > >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< RateHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Handle< Quote > >* v;
            if (SWIG_ConvertPtr(ST(3),(void **) &v, 
                SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(3))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(3));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Handle< Quote >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_HandleT_Quote_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< RateHelper > >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< RateHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< RateHelper > >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< RateHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Handle< Quote > >* v;
            if (SWIG_ConvertPtr(ST(3),(void **) &v, 
                SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(3))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(3));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Handle< Quote >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_HandleT_Quote_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(4),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(4))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(4));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< RateHelper > >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< RateHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Handle< Quote > >* v;
            if (SWIG_ConvertPtr(ST(4),(void **) &v, 
                SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(4))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(4));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Handle< Quote >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_HandleT_Quote_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< RateHelper > >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< RateHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Handle< Quote > >* v;
            if (SWIG_ConvertPtr(ST(3),(void **) &v, 
                SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(3))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(3));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Handle< Quote >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_HandleT_Quote_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(4),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(4))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(4));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< RateHelper > >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< RateHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Handle< Quote > >* v;
            if (SWIG_ConvertPtr(ST(4),(void **) &v, 
                SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(4))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(4));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Handle< Quote >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_HandleT_Quote_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(5),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(5))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(5));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 7;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_7:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< RateHelper > >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< RateHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Handle< Quote > >* v;
            if (SWIG_ConvertPtr(ST(3),(void **) &v, 
                SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(3))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(3));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Handle< Quote >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_HandleT_Quote_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(4),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(4))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(4));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Linear, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 8;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_8:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< RateHelper > >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< RateHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Handle< Quote > >* v;
            if (SWIG_ConvertPtr(ST(4),(void **) &v, 
                SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(4))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(4));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Handle< Quote >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_HandleT_Quote_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(5),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(5))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(5));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 9;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_9:
    
    if (items == 8) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< RateHelper > >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< RateHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Handle< Quote > >* v;
            if (SWIG_ConvertPtr(ST(4),(void **) &v, 
                SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(4))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(4));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Handle< Quote >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_HandleT_Quote_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(5),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(5))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(5));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_Linear, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 10;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_10:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_PiecewiseLinearForward__SWIG_4); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_PiecewiseLinearForward__SWIG_3); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_PiecewiseLinearForward__SWIG_9); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_PiecewiseLinearForward__SWIG_2); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_PiecewiseLinearForward__SWIG_8); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_PiecewiseLinearForward__SWIG_1); return;
    case 7:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_PiecewiseLinearForward__SWIG_7); return;
    case 8:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_PiecewiseLinearForward__SWIG_0); return;
    case 9:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_PiecewiseLinearForward__SWIG_6); return;
    case 10:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_PiecewiseLinearForward__SWIG_5); return;
    }
  }
  
  croak("No matching function for overloaded 'new_PiecewiseLinearForward'");
  XSRETURN(0);
}


XS(_wrap_PiecewiseLinearForward_dates) {
  {
    PiecewiseLinearForwardPtr *arg1 = (PiecewiseLinearForwardPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Date > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: PiecewiseLinearForward_dates(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PiecewiseLinearForwardPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PiecewiseLinearForward_dates" "', argument " "1"" of type '" "PiecewiseLinearForwardPtr *""'"); 
    }
    arg1 = reinterpret_cast< PiecewiseLinearForwardPtr * >(argp1);
    {
      try {
        result = (std::vector< Date > *) &PiecewiseLinearForwardPtr_dates(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_Date_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_PiecewiseLinearForward_times) {
  {
    PiecewiseLinearForwardPtr *arg1 = (PiecewiseLinearForwardPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Time > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: PiecewiseLinearForward_times(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PiecewiseLinearForwardPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PiecewiseLinearForward_times" "', argument " "1"" of type '" "PiecewiseLinearForwardPtr *""'"); 
    }
    arg1 = reinterpret_cast< PiecewiseLinearForwardPtr * >(argp1);
    {
      try {
        result = (std::vector< Time > *) &PiecewiseLinearForwardPtr_times(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_PiecewiseLinearForward_nodes) {
  {
    PiecewiseLinearForwardPtr *arg1 = (PiecewiseLinearForwardPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< std::pair< Date,Real > > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: PiecewiseLinearForward_nodes(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PiecewiseLinearForwardPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PiecewiseLinearForward_nodes" "', argument " "1"" of type '" "PiecewiseLinearForwardPtr *""'"); 
    }
    arg1 = reinterpret_cast< PiecewiseLinearForwardPtr * >(argp1);
    {
      try {
        result = PiecewiseLinearForwardPtr_nodes(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        std::pair< Date,double >* ptr = new std::pair< Date,double >(result[i]);
        svs[i] = sv_newmortal();
        SWIG_MakePtr(svs[i], (void*) ptr, 
          SWIGTYPE_p_std__pairT_Date_double_t, SWIG_SHADOW|0);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_PiecewiseLinearForward) {
  {
    PiecewiseLinearForwardPtr *arg1 = (PiecewiseLinearForwardPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_PiecewiseLinearForward(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PiecewiseLinearForwardPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_PiecewiseLinearForward" "', argument " "1"" of type '" "PiecewiseLinearForwardPtr *""'"); 
    }
    arg1 = reinterpret_cast< PiecewiseLinearForwardPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PiecewiseLinearZero__SWIG_0) {
  {
    Date *arg1 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    std::vector< Handle< Quote > > *arg4 = 0 ;
    std::vector< Date > *arg5 = 0 ;
    Real arg6 ;
    Linear *arg7 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > temp2 ;
    std::vector< boost::shared_ptr< RateHelper > > *v2 ;
    void *argp3 ;
    int res3 = 0 ;
    std::vector< Handle< Quote > > temp4 ;
    std::vector< Handle< Quote > > *v4 ;
    std::vector< Date > temp5 ;
    std::vector< Date > *v5 ;
    double val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    int argvi = 0;
    PiecewiseLinearZeroPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: new_PiecewiseLinearZero(referenceDate,instruments,dayCounter,jumps,jumpDates,accuracy,i);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_PiecewiseLinearZero" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseLinearZero" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_PiecewiseLinearZero. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< RateHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1) {
            temp2.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_PiecewiseLinearZero. "
              "Expected an array of " "boost::shared_ptr< RateHelper >");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_PiecewiseLinearZero. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_PiecewiseLinearZero" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseLinearZero" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of new_PiecewiseLinearZero. "
          "Expected an array of " "Handle< Quote >");
        SV **tv;
        I32 len = av_len(av) + 1;
        Handle< Quote >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_HandleT_Quote_t,0) != -1) {
            temp4.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 4 of "
              "new_PiecewiseLinearZero. "
              "Expected an array of " "Handle< Quote >");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of new_PiecewiseLinearZero. "
          "Expected an array of " "Handle< Quote >");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(4),(void **) &v5, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg5 = v5;
      } else if (SvROK(ST(4))) {
        AV *av = (AV *)SvRV(ST(4));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 5 of new_PiecewiseLinearZero. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp5.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 5 of "
              "new_PiecewiseLinearZero. "
              "Expected an array of " "Date");
          }
        }
        arg5 = &temp5;
      } else {
        SWIG_croak("Type error in argument 5 of new_PiecewiseLinearZero. "
          "Expected an array of " "Date");
      }
    }
    ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_PiecewiseLinearZero" "', argument " "6"" of type '" "Real""'");
    } 
    arg6 = static_cast< Real >(val6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Linear,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_PiecewiseLinearZero" "', argument " "7"" of type '" "Linear const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseLinearZero" "', argument " "7"" of type '" "Linear const &""'"); 
    }
    arg7 = reinterpret_cast< Linear * >(argp7);
    {
      try {
        result = (PiecewiseLinearZeroPtr *)new_PiecewiseLinearZeroPtr__SWIG_0((Date const &)*arg1,(std::vector< boost::shared_ptr< RateHelper > > const &)*arg2,(DayCounter const &)*arg3,(std::vector< Handle< Quote > > const &)*arg4,(std::vector< Date > const &)*arg5,arg6,(Linear const &)*arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PiecewiseLinearZeroPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PiecewiseLinearZero__SWIG_1) {
  {
    Date *arg1 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    std::vector< Handle< Quote > > *arg4 = 0 ;
    std::vector< Date > *arg5 = 0 ;
    Real arg6 ;
    void *argp1 ;
    int res1 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > temp2 ;
    std::vector< boost::shared_ptr< RateHelper > > *v2 ;
    void *argp3 ;
    int res3 = 0 ;
    std::vector< Handle< Quote > > temp4 ;
    std::vector< Handle< Quote > > *v4 ;
    std::vector< Date > temp5 ;
    std::vector< Date > *v5 ;
    double val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    PiecewiseLinearZeroPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_PiecewiseLinearZero(referenceDate,instruments,dayCounter,jumps,jumpDates,accuracy);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_PiecewiseLinearZero" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseLinearZero" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_PiecewiseLinearZero. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< RateHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1) {
            temp2.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_PiecewiseLinearZero. "
              "Expected an array of " "boost::shared_ptr< RateHelper >");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_PiecewiseLinearZero. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_PiecewiseLinearZero" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseLinearZero" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of new_PiecewiseLinearZero. "
          "Expected an array of " "Handle< Quote >");
        SV **tv;
        I32 len = av_len(av) + 1;
        Handle< Quote >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_HandleT_Quote_t,0) != -1) {
            temp4.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 4 of "
              "new_PiecewiseLinearZero. "
              "Expected an array of " "Handle< Quote >");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of new_PiecewiseLinearZero. "
          "Expected an array of " "Handle< Quote >");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(4),(void **) &v5, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg5 = v5;
      } else if (SvROK(ST(4))) {
        AV *av = (AV *)SvRV(ST(4));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 5 of new_PiecewiseLinearZero. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp5.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 5 of "
              "new_PiecewiseLinearZero. "
              "Expected an array of " "Date");
          }
        }
        arg5 = &temp5;
      } else {
        SWIG_croak("Type error in argument 5 of new_PiecewiseLinearZero. "
          "Expected an array of " "Date");
      }
    }
    ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_PiecewiseLinearZero" "', argument " "6"" of type '" "Real""'");
    } 
    arg6 = static_cast< Real >(val6);
    {
      try {
        result = (PiecewiseLinearZeroPtr *)new_PiecewiseLinearZeroPtr__SWIG_0((Date const &)*arg1,(std::vector< boost::shared_ptr< RateHelper > > const &)*arg2,(DayCounter const &)*arg3,(std::vector< Handle< Quote > > const &)*arg4,(std::vector< Date > const &)*arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PiecewiseLinearZeroPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PiecewiseLinearZero__SWIG_2) {
  {
    Date *arg1 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    std::vector< Handle< Quote > > *arg4 = 0 ;
    std::vector< Date > *arg5 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > temp2 ;
    std::vector< boost::shared_ptr< RateHelper > > *v2 ;
    void *argp3 ;
    int res3 = 0 ;
    std::vector< Handle< Quote > > temp4 ;
    std::vector< Handle< Quote > > *v4 ;
    std::vector< Date > temp5 ;
    std::vector< Date > *v5 ;
    int argvi = 0;
    PiecewiseLinearZeroPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_PiecewiseLinearZero(referenceDate,instruments,dayCounter,jumps,jumpDates);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_PiecewiseLinearZero" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseLinearZero" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_PiecewiseLinearZero. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< RateHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1) {
            temp2.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_PiecewiseLinearZero. "
              "Expected an array of " "boost::shared_ptr< RateHelper >");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_PiecewiseLinearZero. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_PiecewiseLinearZero" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseLinearZero" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of new_PiecewiseLinearZero. "
          "Expected an array of " "Handle< Quote >");
        SV **tv;
        I32 len = av_len(av) + 1;
        Handle< Quote >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_HandleT_Quote_t,0) != -1) {
            temp4.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 4 of "
              "new_PiecewiseLinearZero. "
              "Expected an array of " "Handle< Quote >");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of new_PiecewiseLinearZero. "
          "Expected an array of " "Handle< Quote >");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(4),(void **) &v5, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg5 = v5;
      } else if (SvROK(ST(4))) {
        AV *av = (AV *)SvRV(ST(4));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 5 of new_PiecewiseLinearZero. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp5.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 5 of "
              "new_PiecewiseLinearZero. "
              "Expected an array of " "Date");
          }
        }
        arg5 = &temp5;
      } else {
        SWIG_croak("Type error in argument 5 of new_PiecewiseLinearZero. "
          "Expected an array of " "Date");
      }
    }
    {
      try {
        result = (PiecewiseLinearZeroPtr *)new_PiecewiseLinearZeroPtr__SWIG_0((Date const &)*arg1,(std::vector< boost::shared_ptr< RateHelper > > const &)*arg2,(DayCounter const &)*arg3,(std::vector< Handle< Quote > > const &)*arg4,(std::vector< Date > const &)*arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PiecewiseLinearZeroPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PiecewiseLinearZero__SWIG_3) {
  {
    Date *arg1 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    std::vector< Handle< Quote > > *arg4 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > temp2 ;
    std::vector< boost::shared_ptr< RateHelper > > *v2 ;
    void *argp3 ;
    int res3 = 0 ;
    std::vector< Handle< Quote > > temp4 ;
    std::vector< Handle< Quote > > *v4 ;
    int argvi = 0;
    PiecewiseLinearZeroPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_PiecewiseLinearZero(referenceDate,instruments,dayCounter,jumps);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_PiecewiseLinearZero" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseLinearZero" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_PiecewiseLinearZero. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< RateHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1) {
            temp2.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_PiecewiseLinearZero. "
              "Expected an array of " "boost::shared_ptr< RateHelper >");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_PiecewiseLinearZero. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_PiecewiseLinearZero" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseLinearZero" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of new_PiecewiseLinearZero. "
          "Expected an array of " "Handle< Quote >");
        SV **tv;
        I32 len = av_len(av) + 1;
        Handle< Quote >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_HandleT_Quote_t,0) != -1) {
            temp4.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 4 of "
              "new_PiecewiseLinearZero. "
              "Expected an array of " "Handle< Quote >");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of new_PiecewiseLinearZero. "
          "Expected an array of " "Handle< Quote >");
      }
    }
    {
      try {
        result = (PiecewiseLinearZeroPtr *)new_PiecewiseLinearZeroPtr__SWIG_0((Date const &)*arg1,(std::vector< boost::shared_ptr< RateHelper > > const &)*arg2,(DayCounter const &)*arg3,(std::vector< Handle< Quote > > const &)*arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PiecewiseLinearZeroPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PiecewiseLinearZero__SWIG_4) {
  {
    Date *arg1 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > temp2 ;
    std::vector< boost::shared_ptr< RateHelper > > *v2 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    PiecewiseLinearZeroPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_PiecewiseLinearZero(referenceDate,instruments,dayCounter);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_PiecewiseLinearZero" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseLinearZero" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_PiecewiseLinearZero. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< RateHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1) {
            temp2.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_PiecewiseLinearZero. "
              "Expected an array of " "boost::shared_ptr< RateHelper >");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_PiecewiseLinearZero. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_PiecewiseLinearZero" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseLinearZero" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    {
      try {
        result = (PiecewiseLinearZeroPtr *)new_PiecewiseLinearZeroPtr__SWIG_0((Date const &)*arg1,(std::vector< boost::shared_ptr< RateHelper > > const &)*arg2,(DayCounter const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PiecewiseLinearZeroPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PiecewiseLinearZero__SWIG_5) {
  {
    Integer arg1 ;
    Calendar *arg2 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    std::vector< Handle< Quote > > *arg5 = 0 ;
    std::vector< Date > *arg6 = 0 ;
    Real arg7 ;
    Linear *arg8 = 0 ;
    int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > temp3 ;
    std::vector< boost::shared_ptr< RateHelper > > *v3 ;
    void *argp4 ;
    int res4 = 0 ;
    std::vector< Handle< Quote > > temp5 ;
    std::vector< Handle< Quote > > *v5 ;
    std::vector< Date > temp6 ;
    std::vector< Date > *v6 ;
    double val7 ;
    int ecode7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    int argvi = 0;
    PiecewiseLinearZeroPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 8) || (items > 8)) {
      SWIG_croak("Usage: new_PiecewiseLinearZero(settlementDays,calendar,instruments,dayCounter,jumps,jumpDates,accuracy,i);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_PiecewiseLinearZero" "', argument " "1"" of type '" "Integer""'");
    } 
    arg1 = static_cast< Integer >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_PiecewiseLinearZero" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseLinearZero" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_PiecewiseLinearZero. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< RateHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1) {
            temp3.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_PiecewiseLinearZero. "
              "Expected an array of " "boost::shared_ptr< RateHelper >");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_PiecewiseLinearZero. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
      }
    }
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_PiecewiseLinearZero" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseLinearZero" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    {
      if (SWIG_ConvertPtr(ST(4),(void **) &v5, 
          SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,1) != -1) {
        arg5 = v5;
      } else if (SvROK(ST(4))) {
        AV *av = (AV *)SvRV(ST(4));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 5 of new_PiecewiseLinearZero. "
          "Expected an array of " "Handle< Quote >");
        SV **tv;
        I32 len = av_len(av) + 1;
        Handle< Quote >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_HandleT_Quote_t,0) != -1) {
            temp5.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 5 of "
              "new_PiecewiseLinearZero. "
              "Expected an array of " "Handle< Quote >");
          }
        }
        arg5 = &temp5;
      } else {
        SWIG_croak("Type error in argument 5 of new_PiecewiseLinearZero. "
          "Expected an array of " "Handle< Quote >");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(5),(void **) &v6, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg6 = v6;
      } else if (SvROK(ST(5))) {
        AV *av = (AV *)SvRV(ST(5));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 6 of new_PiecewiseLinearZero. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp6.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 6 of "
              "new_PiecewiseLinearZero. "
              "Expected an array of " "Date");
          }
        }
        arg6 = &temp6;
      } else {
        SWIG_croak("Type error in argument 6 of new_PiecewiseLinearZero. "
          "Expected an array of " "Date");
      }
    }
    ecode7 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_PiecewiseLinearZero" "', argument " "7"" of type '" "Real""'");
    } 
    arg7 = static_cast< Real >(val7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_Linear,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_PiecewiseLinearZero" "', argument " "8"" of type '" "Linear const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseLinearZero" "', argument " "8"" of type '" "Linear const &""'"); 
    }
    arg8 = reinterpret_cast< Linear * >(argp8);
    {
      try {
        result = (PiecewiseLinearZeroPtr *)new_PiecewiseLinearZeroPtr__SWIG_5(arg1,(Calendar const &)*arg2,(std::vector< boost::shared_ptr< RateHelper > > const &)*arg3,(DayCounter const &)*arg4,(std::vector< Handle< Quote > > const &)*arg5,(std::vector< Date > const &)*arg6,arg7,(Linear const &)*arg8);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PiecewiseLinearZeroPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PiecewiseLinearZero__SWIG_6) {
  {
    Integer arg1 ;
    Calendar *arg2 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    std::vector< Handle< Quote > > *arg5 = 0 ;
    std::vector< Date > *arg6 = 0 ;
    Real arg7 ;
    int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > temp3 ;
    std::vector< boost::shared_ptr< RateHelper > > *v3 ;
    void *argp4 ;
    int res4 = 0 ;
    std::vector< Handle< Quote > > temp5 ;
    std::vector< Handle< Quote > > *v5 ;
    std::vector< Date > temp6 ;
    std::vector< Date > *v6 ;
    double val7 ;
    int ecode7 = 0 ;
    int argvi = 0;
    PiecewiseLinearZeroPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: new_PiecewiseLinearZero(settlementDays,calendar,instruments,dayCounter,jumps,jumpDates,accuracy);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_PiecewiseLinearZero" "', argument " "1"" of type '" "Integer""'");
    } 
    arg1 = static_cast< Integer >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_PiecewiseLinearZero" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseLinearZero" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_PiecewiseLinearZero. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< RateHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1) {
            temp3.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_PiecewiseLinearZero. "
              "Expected an array of " "boost::shared_ptr< RateHelper >");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_PiecewiseLinearZero. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
      }
    }
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_PiecewiseLinearZero" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseLinearZero" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    {
      if (SWIG_ConvertPtr(ST(4),(void **) &v5, 
          SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,1) != -1) {
        arg5 = v5;
      } else if (SvROK(ST(4))) {
        AV *av = (AV *)SvRV(ST(4));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 5 of new_PiecewiseLinearZero. "
          "Expected an array of " "Handle< Quote >");
        SV **tv;
        I32 len = av_len(av) + 1;
        Handle< Quote >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_HandleT_Quote_t,0) != -1) {
            temp5.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 5 of "
              "new_PiecewiseLinearZero. "
              "Expected an array of " "Handle< Quote >");
          }
        }
        arg5 = &temp5;
      } else {
        SWIG_croak("Type error in argument 5 of new_PiecewiseLinearZero. "
          "Expected an array of " "Handle< Quote >");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(5),(void **) &v6, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg6 = v6;
      } else if (SvROK(ST(5))) {
        AV *av = (AV *)SvRV(ST(5));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 6 of new_PiecewiseLinearZero. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp6.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 6 of "
              "new_PiecewiseLinearZero. "
              "Expected an array of " "Date");
          }
        }
        arg6 = &temp6;
      } else {
        SWIG_croak("Type error in argument 6 of new_PiecewiseLinearZero. "
          "Expected an array of " "Date");
      }
    }
    ecode7 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_PiecewiseLinearZero" "', argument " "7"" of type '" "Real""'");
    } 
    arg7 = static_cast< Real >(val7);
    {
      try {
        result = (PiecewiseLinearZeroPtr *)new_PiecewiseLinearZeroPtr__SWIG_5(arg1,(Calendar const &)*arg2,(std::vector< boost::shared_ptr< RateHelper > > const &)*arg3,(DayCounter const &)*arg4,(std::vector< Handle< Quote > > const &)*arg5,(std::vector< Date > const &)*arg6,arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PiecewiseLinearZeroPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PiecewiseLinearZero__SWIG_7) {
  {
    Integer arg1 ;
    Calendar *arg2 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    std::vector< Handle< Quote > > *arg5 = 0 ;
    std::vector< Date > *arg6 = 0 ;
    int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > temp3 ;
    std::vector< boost::shared_ptr< RateHelper > > *v3 ;
    void *argp4 ;
    int res4 = 0 ;
    std::vector< Handle< Quote > > temp5 ;
    std::vector< Handle< Quote > > *v5 ;
    std::vector< Date > temp6 ;
    std::vector< Date > *v6 ;
    int argvi = 0;
    PiecewiseLinearZeroPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_PiecewiseLinearZero(settlementDays,calendar,instruments,dayCounter,jumps,jumpDates);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_PiecewiseLinearZero" "', argument " "1"" of type '" "Integer""'");
    } 
    arg1 = static_cast< Integer >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_PiecewiseLinearZero" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseLinearZero" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_PiecewiseLinearZero. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< RateHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1) {
            temp3.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_PiecewiseLinearZero. "
              "Expected an array of " "boost::shared_ptr< RateHelper >");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_PiecewiseLinearZero. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
      }
    }
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_PiecewiseLinearZero" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseLinearZero" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    {
      if (SWIG_ConvertPtr(ST(4),(void **) &v5, 
          SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,1) != -1) {
        arg5 = v5;
      } else if (SvROK(ST(4))) {
        AV *av = (AV *)SvRV(ST(4));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 5 of new_PiecewiseLinearZero. "
          "Expected an array of " "Handle< Quote >");
        SV **tv;
        I32 len = av_len(av) + 1;
        Handle< Quote >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_HandleT_Quote_t,0) != -1) {
            temp5.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 5 of "
              "new_PiecewiseLinearZero. "
              "Expected an array of " "Handle< Quote >");
          }
        }
        arg5 = &temp5;
      } else {
        SWIG_croak("Type error in argument 5 of new_PiecewiseLinearZero. "
          "Expected an array of " "Handle< Quote >");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(5),(void **) &v6, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg6 = v6;
      } else if (SvROK(ST(5))) {
        AV *av = (AV *)SvRV(ST(5));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 6 of new_PiecewiseLinearZero. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp6.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 6 of "
              "new_PiecewiseLinearZero. "
              "Expected an array of " "Date");
          }
        }
        arg6 = &temp6;
      } else {
        SWIG_croak("Type error in argument 6 of new_PiecewiseLinearZero. "
          "Expected an array of " "Date");
      }
    }
    {
      try {
        result = (PiecewiseLinearZeroPtr *)new_PiecewiseLinearZeroPtr__SWIG_5(arg1,(Calendar const &)*arg2,(std::vector< boost::shared_ptr< RateHelper > > const &)*arg3,(DayCounter const &)*arg4,(std::vector< Handle< Quote > > const &)*arg5,(std::vector< Date > const &)*arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PiecewiseLinearZeroPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PiecewiseLinearZero__SWIG_8) {
  {
    Integer arg1 ;
    Calendar *arg2 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    std::vector< Handle< Quote > > *arg5 = 0 ;
    int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > temp3 ;
    std::vector< boost::shared_ptr< RateHelper > > *v3 ;
    void *argp4 ;
    int res4 = 0 ;
    std::vector< Handle< Quote > > temp5 ;
    std::vector< Handle< Quote > > *v5 ;
    int argvi = 0;
    PiecewiseLinearZeroPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_PiecewiseLinearZero(settlementDays,calendar,instruments,dayCounter,jumps);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_PiecewiseLinearZero" "', argument " "1"" of type '" "Integer""'");
    } 
    arg1 = static_cast< Integer >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_PiecewiseLinearZero" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseLinearZero" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_PiecewiseLinearZero. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< RateHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1) {
            temp3.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_PiecewiseLinearZero. "
              "Expected an array of " "boost::shared_ptr< RateHelper >");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_PiecewiseLinearZero. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
      }
    }
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_PiecewiseLinearZero" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseLinearZero" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    {
      if (SWIG_ConvertPtr(ST(4),(void **) &v5, 
          SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,1) != -1) {
        arg5 = v5;
      } else if (SvROK(ST(4))) {
        AV *av = (AV *)SvRV(ST(4));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 5 of new_PiecewiseLinearZero. "
          "Expected an array of " "Handle< Quote >");
        SV **tv;
        I32 len = av_len(av) + 1;
        Handle< Quote >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_HandleT_Quote_t,0) != -1) {
            temp5.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 5 of "
              "new_PiecewiseLinearZero. "
              "Expected an array of " "Handle< Quote >");
          }
        }
        arg5 = &temp5;
      } else {
        SWIG_croak("Type error in argument 5 of new_PiecewiseLinearZero. "
          "Expected an array of " "Handle< Quote >");
      }
    }
    {
      try {
        result = (PiecewiseLinearZeroPtr *)new_PiecewiseLinearZeroPtr__SWIG_5(arg1,(Calendar const &)*arg2,(std::vector< boost::shared_ptr< RateHelper > > const &)*arg3,(DayCounter const &)*arg4,(std::vector< Handle< Quote > > const &)*arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PiecewiseLinearZeroPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PiecewiseLinearZero__SWIG_9) {
  {
    Integer arg1 ;
    Calendar *arg2 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > temp3 ;
    std::vector< boost::shared_ptr< RateHelper > > *v3 ;
    void *argp4 ;
    int res4 = 0 ;
    int argvi = 0;
    PiecewiseLinearZeroPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_PiecewiseLinearZero(settlementDays,calendar,instruments,dayCounter);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_PiecewiseLinearZero" "', argument " "1"" of type '" "Integer""'");
    } 
    arg1 = static_cast< Integer >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_PiecewiseLinearZero" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseLinearZero" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_PiecewiseLinearZero. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< RateHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1) {
            temp3.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_PiecewiseLinearZero. "
              "Expected an array of " "boost::shared_ptr< RateHelper >");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_PiecewiseLinearZero. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
      }
    }
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_PiecewiseLinearZero" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseLinearZero" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    {
      try {
        result = (PiecewiseLinearZeroPtr *)new_PiecewiseLinearZeroPtr__SWIG_5(arg1,(Calendar const &)*arg2,(std::vector< boost::shared_ptr< RateHelper > > const &)*arg3,(DayCounter const &)*arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PiecewiseLinearZeroPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PiecewiseLinearZero) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< RateHelper > >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< RateHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< RateHelper > >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< RateHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Handle< Quote > >* v;
            if (SWIG_ConvertPtr(ST(3),(void **) &v, 
                SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(3))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(3));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Handle< Quote >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_HandleT_Quote_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< RateHelper > >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< RateHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< RateHelper > >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< RateHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Handle< Quote > >* v;
            if (SWIG_ConvertPtr(ST(3),(void **) &v, 
                SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(3))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(3));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Handle< Quote >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_HandleT_Quote_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(4),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(4))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(4));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< RateHelper > >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< RateHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Handle< Quote > >* v;
            if (SWIG_ConvertPtr(ST(4),(void **) &v, 
                SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(4))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(4));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Handle< Quote >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_HandleT_Quote_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< RateHelper > >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< RateHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Handle< Quote > >* v;
            if (SWIG_ConvertPtr(ST(3),(void **) &v, 
                SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(3))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(3));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Handle< Quote >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_HandleT_Quote_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(4),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(4))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(4));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< RateHelper > >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< RateHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Handle< Quote > >* v;
            if (SWIG_ConvertPtr(ST(4),(void **) &v, 
                SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(4))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(4));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Handle< Quote >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_HandleT_Quote_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(5),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(5))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(5));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 7;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_7:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< RateHelper > >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< RateHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Handle< Quote > >* v;
            if (SWIG_ConvertPtr(ST(3),(void **) &v, 
                SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(3))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(3));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Handle< Quote >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_HandleT_Quote_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(4),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(4))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(4));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Linear, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 8;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_8:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< RateHelper > >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< RateHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Handle< Quote > >* v;
            if (SWIG_ConvertPtr(ST(4),(void **) &v, 
                SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(4))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(4));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Handle< Quote >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_HandleT_Quote_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(5),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(5))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(5));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 9;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_9:
    
    if (items == 8) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< RateHelper > >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< RateHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Handle< Quote > >* v;
            if (SWIG_ConvertPtr(ST(4),(void **) &v, 
                SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(4))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(4));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Handle< Quote >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_HandleT_Quote_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(5),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(5))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(5));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_Linear, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 10;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_10:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_PiecewiseLinearZero__SWIG_4); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_PiecewiseLinearZero__SWIG_3); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_PiecewiseLinearZero__SWIG_9); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_PiecewiseLinearZero__SWIG_2); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_PiecewiseLinearZero__SWIG_8); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_PiecewiseLinearZero__SWIG_1); return;
    case 7:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_PiecewiseLinearZero__SWIG_7); return;
    case 8:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_PiecewiseLinearZero__SWIG_0); return;
    case 9:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_PiecewiseLinearZero__SWIG_6); return;
    case 10:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_PiecewiseLinearZero__SWIG_5); return;
    }
  }
  
  croak("No matching function for overloaded 'new_PiecewiseLinearZero'");
  XSRETURN(0);
}


XS(_wrap_PiecewiseLinearZero_dates) {
  {
    PiecewiseLinearZeroPtr *arg1 = (PiecewiseLinearZeroPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Date > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: PiecewiseLinearZero_dates(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PiecewiseLinearZeroPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PiecewiseLinearZero_dates" "', argument " "1"" of type '" "PiecewiseLinearZeroPtr *""'"); 
    }
    arg1 = reinterpret_cast< PiecewiseLinearZeroPtr * >(argp1);
    {
      try {
        result = (std::vector< Date > *) &PiecewiseLinearZeroPtr_dates(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_Date_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_PiecewiseLinearZero_times) {
  {
    PiecewiseLinearZeroPtr *arg1 = (PiecewiseLinearZeroPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Time > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: PiecewiseLinearZero_times(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PiecewiseLinearZeroPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PiecewiseLinearZero_times" "', argument " "1"" of type '" "PiecewiseLinearZeroPtr *""'"); 
    }
    arg1 = reinterpret_cast< PiecewiseLinearZeroPtr * >(argp1);
    {
      try {
        result = (std::vector< Time > *) &PiecewiseLinearZeroPtr_times(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_PiecewiseLinearZero_nodes) {
  {
    PiecewiseLinearZeroPtr *arg1 = (PiecewiseLinearZeroPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< std::pair< Date,Real > > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: PiecewiseLinearZero_nodes(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PiecewiseLinearZeroPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PiecewiseLinearZero_nodes" "', argument " "1"" of type '" "PiecewiseLinearZeroPtr *""'"); 
    }
    arg1 = reinterpret_cast< PiecewiseLinearZeroPtr * >(argp1);
    {
      try {
        result = PiecewiseLinearZeroPtr_nodes(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        std::pair< Date,double >* ptr = new std::pair< Date,double >(result[i]);
        svs[i] = sv_newmortal();
        SWIG_MakePtr(svs[i], (void*) ptr, 
          SWIGTYPE_p_std__pairT_Date_double_t, SWIG_SHADOW|0);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_PiecewiseLinearZero) {
  {
    PiecewiseLinearZeroPtr *arg1 = (PiecewiseLinearZeroPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_PiecewiseLinearZero(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PiecewiseLinearZeroPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_PiecewiseLinearZero" "', argument " "1"" of type '" "PiecewiseLinearZeroPtr *""'"); 
    }
    arg1 = reinterpret_cast< PiecewiseLinearZeroPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PiecewiseCubicZero__SWIG_0) {
  {
    Date *arg1 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    std::vector< Handle< Quote > > *arg4 = 0 ;
    std::vector< Date > *arg5 = 0 ;
    Real arg6 ;
    Cubic *arg7 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > temp2 ;
    std::vector< boost::shared_ptr< RateHelper > > *v2 ;
    void *argp3 ;
    int res3 = 0 ;
    std::vector< Handle< Quote > > temp4 ;
    std::vector< Handle< Quote > > *v4 ;
    std::vector< Date > temp5 ;
    std::vector< Date > *v5 ;
    double val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    int argvi = 0;
    PiecewiseCubicZeroPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: new_PiecewiseCubicZero(referenceDate,instruments,dayCounter,jumps,jumpDates,accuracy,i);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_PiecewiseCubicZero" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseCubicZero" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_PiecewiseCubicZero. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< RateHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1) {
            temp2.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_PiecewiseCubicZero. "
              "Expected an array of " "boost::shared_ptr< RateHelper >");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_PiecewiseCubicZero. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_PiecewiseCubicZero" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseCubicZero" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of new_PiecewiseCubicZero. "
          "Expected an array of " "Handle< Quote >");
        SV **tv;
        I32 len = av_len(av) + 1;
        Handle< Quote >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_HandleT_Quote_t,0) != -1) {
            temp4.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 4 of "
              "new_PiecewiseCubicZero. "
              "Expected an array of " "Handle< Quote >");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of new_PiecewiseCubicZero. "
          "Expected an array of " "Handle< Quote >");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(4),(void **) &v5, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg5 = v5;
      } else if (SvROK(ST(4))) {
        AV *av = (AV *)SvRV(ST(4));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 5 of new_PiecewiseCubicZero. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp5.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 5 of "
              "new_PiecewiseCubicZero. "
              "Expected an array of " "Date");
          }
        }
        arg5 = &temp5;
      } else {
        SWIG_croak("Type error in argument 5 of new_PiecewiseCubicZero. "
          "Expected an array of " "Date");
      }
    }
    ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_PiecewiseCubicZero" "', argument " "6"" of type '" "Real""'");
    } 
    arg6 = static_cast< Real >(val6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Cubic,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_PiecewiseCubicZero" "', argument " "7"" of type '" "Cubic const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseCubicZero" "', argument " "7"" of type '" "Cubic const &""'"); 
    }
    arg7 = reinterpret_cast< Cubic * >(argp7);
    {
      try {
        result = (PiecewiseCubicZeroPtr *)new_PiecewiseCubicZeroPtr__SWIG_0((Date const &)*arg1,(std::vector< boost::shared_ptr< RateHelper > > const &)*arg2,(DayCounter const &)*arg3,(std::vector< Handle< Quote > > const &)*arg4,(std::vector< Date > const &)*arg5,arg6,(Cubic const &)*arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PiecewiseCubicZeroPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PiecewiseCubicZero__SWIG_1) {
  {
    Date *arg1 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    std::vector< Handle< Quote > > *arg4 = 0 ;
    std::vector< Date > *arg5 = 0 ;
    Real arg6 ;
    void *argp1 ;
    int res1 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > temp2 ;
    std::vector< boost::shared_ptr< RateHelper > > *v2 ;
    void *argp3 ;
    int res3 = 0 ;
    std::vector< Handle< Quote > > temp4 ;
    std::vector< Handle< Quote > > *v4 ;
    std::vector< Date > temp5 ;
    std::vector< Date > *v5 ;
    double val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    PiecewiseCubicZeroPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_PiecewiseCubicZero(referenceDate,instruments,dayCounter,jumps,jumpDates,accuracy);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_PiecewiseCubicZero" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseCubicZero" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_PiecewiseCubicZero. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< RateHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1) {
            temp2.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_PiecewiseCubicZero. "
              "Expected an array of " "boost::shared_ptr< RateHelper >");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_PiecewiseCubicZero. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_PiecewiseCubicZero" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseCubicZero" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of new_PiecewiseCubicZero. "
          "Expected an array of " "Handle< Quote >");
        SV **tv;
        I32 len = av_len(av) + 1;
        Handle< Quote >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_HandleT_Quote_t,0) != -1) {
            temp4.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 4 of "
              "new_PiecewiseCubicZero. "
              "Expected an array of " "Handle< Quote >");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of new_PiecewiseCubicZero. "
          "Expected an array of " "Handle< Quote >");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(4),(void **) &v5, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg5 = v5;
      } else if (SvROK(ST(4))) {
        AV *av = (AV *)SvRV(ST(4));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 5 of new_PiecewiseCubicZero. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp5.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 5 of "
              "new_PiecewiseCubicZero. "
              "Expected an array of " "Date");
          }
        }
        arg5 = &temp5;
      } else {
        SWIG_croak("Type error in argument 5 of new_PiecewiseCubicZero. "
          "Expected an array of " "Date");
      }
    }
    ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_PiecewiseCubicZero" "', argument " "6"" of type '" "Real""'");
    } 
    arg6 = static_cast< Real >(val6);
    {
      try {
        result = (PiecewiseCubicZeroPtr *)new_PiecewiseCubicZeroPtr__SWIG_0((Date const &)*arg1,(std::vector< boost::shared_ptr< RateHelper > > const &)*arg2,(DayCounter const &)*arg3,(std::vector< Handle< Quote > > const &)*arg4,(std::vector< Date > const &)*arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PiecewiseCubicZeroPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PiecewiseCubicZero__SWIG_2) {
  {
    Date *arg1 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    std::vector< Handle< Quote > > *arg4 = 0 ;
    std::vector< Date > *arg5 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > temp2 ;
    std::vector< boost::shared_ptr< RateHelper > > *v2 ;
    void *argp3 ;
    int res3 = 0 ;
    std::vector< Handle< Quote > > temp4 ;
    std::vector< Handle< Quote > > *v4 ;
    std::vector< Date > temp5 ;
    std::vector< Date > *v5 ;
    int argvi = 0;
    PiecewiseCubicZeroPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_PiecewiseCubicZero(referenceDate,instruments,dayCounter,jumps,jumpDates);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_PiecewiseCubicZero" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseCubicZero" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_PiecewiseCubicZero. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< RateHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1) {
            temp2.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_PiecewiseCubicZero. "
              "Expected an array of " "boost::shared_ptr< RateHelper >");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_PiecewiseCubicZero. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_PiecewiseCubicZero" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseCubicZero" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of new_PiecewiseCubicZero. "
          "Expected an array of " "Handle< Quote >");
        SV **tv;
        I32 len = av_len(av) + 1;
        Handle< Quote >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_HandleT_Quote_t,0) != -1) {
            temp4.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 4 of "
              "new_PiecewiseCubicZero. "
              "Expected an array of " "Handle< Quote >");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of new_PiecewiseCubicZero. "
          "Expected an array of " "Handle< Quote >");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(4),(void **) &v5, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg5 = v5;
      } else if (SvROK(ST(4))) {
        AV *av = (AV *)SvRV(ST(4));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 5 of new_PiecewiseCubicZero. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp5.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 5 of "
              "new_PiecewiseCubicZero. "
              "Expected an array of " "Date");
          }
        }
        arg5 = &temp5;
      } else {
        SWIG_croak("Type error in argument 5 of new_PiecewiseCubicZero. "
          "Expected an array of " "Date");
      }
    }
    {
      try {
        result = (PiecewiseCubicZeroPtr *)new_PiecewiseCubicZeroPtr__SWIG_0((Date const &)*arg1,(std::vector< boost::shared_ptr< RateHelper > > const &)*arg2,(DayCounter const &)*arg3,(std::vector< Handle< Quote > > const &)*arg4,(std::vector< Date > const &)*arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PiecewiseCubicZeroPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PiecewiseCubicZero__SWIG_3) {
  {
    Date *arg1 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    std::vector< Handle< Quote > > *arg4 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > temp2 ;
    std::vector< boost::shared_ptr< RateHelper > > *v2 ;
    void *argp3 ;
    int res3 = 0 ;
    std::vector< Handle< Quote > > temp4 ;
    std::vector< Handle< Quote > > *v4 ;
    int argvi = 0;
    PiecewiseCubicZeroPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_PiecewiseCubicZero(referenceDate,instruments,dayCounter,jumps);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_PiecewiseCubicZero" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseCubicZero" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_PiecewiseCubicZero. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< RateHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1) {
            temp2.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_PiecewiseCubicZero. "
              "Expected an array of " "boost::shared_ptr< RateHelper >");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_PiecewiseCubicZero. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_PiecewiseCubicZero" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseCubicZero" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of new_PiecewiseCubicZero. "
          "Expected an array of " "Handle< Quote >");
        SV **tv;
        I32 len = av_len(av) + 1;
        Handle< Quote >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_HandleT_Quote_t,0) != -1) {
            temp4.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 4 of "
              "new_PiecewiseCubicZero. "
              "Expected an array of " "Handle< Quote >");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of new_PiecewiseCubicZero. "
          "Expected an array of " "Handle< Quote >");
      }
    }
    {
      try {
        result = (PiecewiseCubicZeroPtr *)new_PiecewiseCubicZeroPtr__SWIG_0((Date const &)*arg1,(std::vector< boost::shared_ptr< RateHelper > > const &)*arg2,(DayCounter const &)*arg3,(std::vector< Handle< Quote > > const &)*arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PiecewiseCubicZeroPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PiecewiseCubicZero__SWIG_4) {
  {
    Date *arg1 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > temp2 ;
    std::vector< boost::shared_ptr< RateHelper > > *v2 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    PiecewiseCubicZeroPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_PiecewiseCubicZero(referenceDate,instruments,dayCounter);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_PiecewiseCubicZero" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseCubicZero" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_PiecewiseCubicZero. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< RateHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1) {
            temp2.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_PiecewiseCubicZero. "
              "Expected an array of " "boost::shared_ptr< RateHelper >");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_PiecewiseCubicZero. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_PiecewiseCubicZero" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseCubicZero" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    {
      try {
        result = (PiecewiseCubicZeroPtr *)new_PiecewiseCubicZeroPtr__SWIG_0((Date const &)*arg1,(std::vector< boost::shared_ptr< RateHelper > > const &)*arg2,(DayCounter const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PiecewiseCubicZeroPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PiecewiseCubicZero__SWIG_5) {
  {
    Integer arg1 ;
    Calendar *arg2 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    std::vector< Handle< Quote > > *arg5 = 0 ;
    std::vector< Date > *arg6 = 0 ;
    Real arg7 ;
    Cubic *arg8 = 0 ;
    int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > temp3 ;
    std::vector< boost::shared_ptr< RateHelper > > *v3 ;
    void *argp4 ;
    int res4 = 0 ;
    std::vector< Handle< Quote > > temp5 ;
    std::vector< Handle< Quote > > *v5 ;
    std::vector< Date > temp6 ;
    std::vector< Date > *v6 ;
    double val7 ;
    int ecode7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    int argvi = 0;
    PiecewiseCubicZeroPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 8) || (items > 8)) {
      SWIG_croak("Usage: new_PiecewiseCubicZero(settlementDays,calendar,instruments,dayCounter,jumps,jumpDates,accuracy,i);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_PiecewiseCubicZero" "', argument " "1"" of type '" "Integer""'");
    } 
    arg1 = static_cast< Integer >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_PiecewiseCubicZero" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseCubicZero" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_PiecewiseCubicZero. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< RateHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1) {
            temp3.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_PiecewiseCubicZero. "
              "Expected an array of " "boost::shared_ptr< RateHelper >");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_PiecewiseCubicZero. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
      }
    }
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_PiecewiseCubicZero" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseCubicZero" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    {
      if (SWIG_ConvertPtr(ST(4),(void **) &v5, 
          SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,1) != -1) {
        arg5 = v5;
      } else if (SvROK(ST(4))) {
        AV *av = (AV *)SvRV(ST(4));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 5 of new_PiecewiseCubicZero. "
          "Expected an array of " "Handle< Quote >");
        SV **tv;
        I32 len = av_len(av) + 1;
        Handle< Quote >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_HandleT_Quote_t,0) != -1) {
            temp5.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 5 of "
              "new_PiecewiseCubicZero. "
              "Expected an array of " "Handle< Quote >");
          }
        }
        arg5 = &temp5;
      } else {
        SWIG_croak("Type error in argument 5 of new_PiecewiseCubicZero. "
          "Expected an array of " "Handle< Quote >");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(5),(void **) &v6, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg6 = v6;
      } else if (SvROK(ST(5))) {
        AV *av = (AV *)SvRV(ST(5));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 6 of new_PiecewiseCubicZero. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp6.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 6 of "
              "new_PiecewiseCubicZero. "
              "Expected an array of " "Date");
          }
        }
        arg6 = &temp6;
      } else {
        SWIG_croak("Type error in argument 6 of new_PiecewiseCubicZero. "
          "Expected an array of " "Date");
      }
    }
    ecode7 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_PiecewiseCubicZero" "', argument " "7"" of type '" "Real""'");
    } 
    arg7 = static_cast< Real >(val7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_Cubic,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_PiecewiseCubicZero" "', argument " "8"" of type '" "Cubic const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseCubicZero" "', argument " "8"" of type '" "Cubic const &""'"); 
    }
    arg8 = reinterpret_cast< Cubic * >(argp8);
    {
      try {
        result = (PiecewiseCubicZeroPtr *)new_PiecewiseCubicZeroPtr__SWIG_5(arg1,(Calendar const &)*arg2,(std::vector< boost::shared_ptr< RateHelper > > const &)*arg3,(DayCounter const &)*arg4,(std::vector< Handle< Quote > > const &)*arg5,(std::vector< Date > const &)*arg6,arg7,(Cubic const &)*arg8);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PiecewiseCubicZeroPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PiecewiseCubicZero__SWIG_6) {
  {
    Integer arg1 ;
    Calendar *arg2 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    std::vector< Handle< Quote > > *arg5 = 0 ;
    std::vector< Date > *arg6 = 0 ;
    Real arg7 ;
    int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > temp3 ;
    std::vector< boost::shared_ptr< RateHelper > > *v3 ;
    void *argp4 ;
    int res4 = 0 ;
    std::vector< Handle< Quote > > temp5 ;
    std::vector< Handle< Quote > > *v5 ;
    std::vector< Date > temp6 ;
    std::vector< Date > *v6 ;
    double val7 ;
    int ecode7 = 0 ;
    int argvi = 0;
    PiecewiseCubicZeroPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: new_PiecewiseCubicZero(settlementDays,calendar,instruments,dayCounter,jumps,jumpDates,accuracy);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_PiecewiseCubicZero" "', argument " "1"" of type '" "Integer""'");
    } 
    arg1 = static_cast< Integer >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_PiecewiseCubicZero" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseCubicZero" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_PiecewiseCubicZero. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< RateHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1) {
            temp3.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_PiecewiseCubicZero. "
              "Expected an array of " "boost::shared_ptr< RateHelper >");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_PiecewiseCubicZero. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
      }
    }
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_PiecewiseCubicZero" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseCubicZero" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    {
      if (SWIG_ConvertPtr(ST(4),(void **) &v5, 
          SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,1) != -1) {
        arg5 = v5;
      } else if (SvROK(ST(4))) {
        AV *av = (AV *)SvRV(ST(4));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 5 of new_PiecewiseCubicZero. "
          "Expected an array of " "Handle< Quote >");
        SV **tv;
        I32 len = av_len(av) + 1;
        Handle< Quote >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_HandleT_Quote_t,0) != -1) {
            temp5.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 5 of "
              "new_PiecewiseCubicZero. "
              "Expected an array of " "Handle< Quote >");
          }
        }
        arg5 = &temp5;
      } else {
        SWIG_croak("Type error in argument 5 of new_PiecewiseCubicZero. "
          "Expected an array of " "Handle< Quote >");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(5),(void **) &v6, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg6 = v6;
      } else if (SvROK(ST(5))) {
        AV *av = (AV *)SvRV(ST(5));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 6 of new_PiecewiseCubicZero. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp6.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 6 of "
              "new_PiecewiseCubicZero. "
              "Expected an array of " "Date");
          }
        }
        arg6 = &temp6;
      } else {
        SWIG_croak("Type error in argument 6 of new_PiecewiseCubicZero. "
          "Expected an array of " "Date");
      }
    }
    ecode7 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_PiecewiseCubicZero" "', argument " "7"" of type '" "Real""'");
    } 
    arg7 = static_cast< Real >(val7);
    {
      try {
        result = (PiecewiseCubicZeroPtr *)new_PiecewiseCubicZeroPtr__SWIG_5(arg1,(Calendar const &)*arg2,(std::vector< boost::shared_ptr< RateHelper > > const &)*arg3,(DayCounter const &)*arg4,(std::vector< Handle< Quote > > const &)*arg5,(std::vector< Date > const &)*arg6,arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PiecewiseCubicZeroPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PiecewiseCubicZero__SWIG_7) {
  {
    Integer arg1 ;
    Calendar *arg2 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    std::vector< Handle< Quote > > *arg5 = 0 ;
    std::vector< Date > *arg6 = 0 ;
    int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > temp3 ;
    std::vector< boost::shared_ptr< RateHelper > > *v3 ;
    void *argp4 ;
    int res4 = 0 ;
    std::vector< Handle< Quote > > temp5 ;
    std::vector< Handle< Quote > > *v5 ;
    std::vector< Date > temp6 ;
    std::vector< Date > *v6 ;
    int argvi = 0;
    PiecewiseCubicZeroPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_PiecewiseCubicZero(settlementDays,calendar,instruments,dayCounter,jumps,jumpDates);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_PiecewiseCubicZero" "', argument " "1"" of type '" "Integer""'");
    } 
    arg1 = static_cast< Integer >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_PiecewiseCubicZero" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseCubicZero" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_PiecewiseCubicZero. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< RateHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1) {
            temp3.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_PiecewiseCubicZero. "
              "Expected an array of " "boost::shared_ptr< RateHelper >");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_PiecewiseCubicZero. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
      }
    }
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_PiecewiseCubicZero" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseCubicZero" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    {
      if (SWIG_ConvertPtr(ST(4),(void **) &v5, 
          SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,1) != -1) {
        arg5 = v5;
      } else if (SvROK(ST(4))) {
        AV *av = (AV *)SvRV(ST(4));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 5 of new_PiecewiseCubicZero. "
          "Expected an array of " "Handle< Quote >");
        SV **tv;
        I32 len = av_len(av) + 1;
        Handle< Quote >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_HandleT_Quote_t,0) != -1) {
            temp5.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 5 of "
              "new_PiecewiseCubicZero. "
              "Expected an array of " "Handle< Quote >");
          }
        }
        arg5 = &temp5;
      } else {
        SWIG_croak("Type error in argument 5 of new_PiecewiseCubicZero. "
          "Expected an array of " "Handle< Quote >");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(5),(void **) &v6, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg6 = v6;
      } else if (SvROK(ST(5))) {
        AV *av = (AV *)SvRV(ST(5));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 6 of new_PiecewiseCubicZero. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp6.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 6 of "
              "new_PiecewiseCubicZero. "
              "Expected an array of " "Date");
          }
        }
        arg6 = &temp6;
      } else {
        SWIG_croak("Type error in argument 6 of new_PiecewiseCubicZero. "
          "Expected an array of " "Date");
      }
    }
    {
      try {
        result = (PiecewiseCubicZeroPtr *)new_PiecewiseCubicZeroPtr__SWIG_5(arg1,(Calendar const &)*arg2,(std::vector< boost::shared_ptr< RateHelper > > const &)*arg3,(DayCounter const &)*arg4,(std::vector< Handle< Quote > > const &)*arg5,(std::vector< Date > const &)*arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PiecewiseCubicZeroPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PiecewiseCubicZero__SWIG_8) {
  {
    Integer arg1 ;
    Calendar *arg2 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    std::vector< Handle< Quote > > *arg5 = 0 ;
    int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > temp3 ;
    std::vector< boost::shared_ptr< RateHelper > > *v3 ;
    void *argp4 ;
    int res4 = 0 ;
    std::vector< Handle< Quote > > temp5 ;
    std::vector< Handle< Quote > > *v5 ;
    int argvi = 0;
    PiecewiseCubicZeroPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_PiecewiseCubicZero(settlementDays,calendar,instruments,dayCounter,jumps);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_PiecewiseCubicZero" "', argument " "1"" of type '" "Integer""'");
    } 
    arg1 = static_cast< Integer >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_PiecewiseCubicZero" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseCubicZero" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_PiecewiseCubicZero. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< RateHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1) {
            temp3.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_PiecewiseCubicZero. "
              "Expected an array of " "boost::shared_ptr< RateHelper >");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_PiecewiseCubicZero. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
      }
    }
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_PiecewiseCubicZero" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseCubicZero" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    {
      if (SWIG_ConvertPtr(ST(4),(void **) &v5, 
          SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,1) != -1) {
        arg5 = v5;
      } else if (SvROK(ST(4))) {
        AV *av = (AV *)SvRV(ST(4));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 5 of new_PiecewiseCubicZero. "
          "Expected an array of " "Handle< Quote >");
        SV **tv;
        I32 len = av_len(av) + 1;
        Handle< Quote >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_HandleT_Quote_t,0) != -1) {
            temp5.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 5 of "
              "new_PiecewiseCubicZero. "
              "Expected an array of " "Handle< Quote >");
          }
        }
        arg5 = &temp5;
      } else {
        SWIG_croak("Type error in argument 5 of new_PiecewiseCubicZero. "
          "Expected an array of " "Handle< Quote >");
      }
    }
    {
      try {
        result = (PiecewiseCubicZeroPtr *)new_PiecewiseCubicZeroPtr__SWIG_5(arg1,(Calendar const &)*arg2,(std::vector< boost::shared_ptr< RateHelper > > const &)*arg3,(DayCounter const &)*arg4,(std::vector< Handle< Quote > > const &)*arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PiecewiseCubicZeroPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PiecewiseCubicZero__SWIG_9) {
  {
    Integer arg1 ;
    Calendar *arg2 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > temp3 ;
    std::vector< boost::shared_ptr< RateHelper > > *v3 ;
    void *argp4 ;
    int res4 = 0 ;
    int argvi = 0;
    PiecewiseCubicZeroPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_PiecewiseCubicZero(settlementDays,calendar,instruments,dayCounter);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_PiecewiseCubicZero" "', argument " "1"" of type '" "Integer""'");
    } 
    arg1 = static_cast< Integer >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_PiecewiseCubicZero" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseCubicZero" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_PiecewiseCubicZero. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< RateHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1) {
            temp3.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_PiecewiseCubicZero. "
              "Expected an array of " "boost::shared_ptr< RateHelper >");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_PiecewiseCubicZero. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
      }
    }
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_PiecewiseCubicZero" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseCubicZero" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    {
      try {
        result = (PiecewiseCubicZeroPtr *)new_PiecewiseCubicZeroPtr__SWIG_5(arg1,(Calendar const &)*arg2,(std::vector< boost::shared_ptr< RateHelper > > const &)*arg3,(DayCounter const &)*arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PiecewiseCubicZeroPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PiecewiseCubicZero) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< RateHelper > >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< RateHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< RateHelper > >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< RateHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Handle< Quote > >* v;
            if (SWIG_ConvertPtr(ST(3),(void **) &v, 
                SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(3))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(3));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Handle< Quote >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_HandleT_Quote_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< RateHelper > >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< RateHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< RateHelper > >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< RateHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Handle< Quote > >* v;
            if (SWIG_ConvertPtr(ST(3),(void **) &v, 
                SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(3))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(3));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Handle< Quote >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_HandleT_Quote_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(4),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(4))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(4));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< RateHelper > >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< RateHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Handle< Quote > >* v;
            if (SWIG_ConvertPtr(ST(4),(void **) &v, 
                SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(4))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(4));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Handle< Quote >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_HandleT_Quote_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< RateHelper > >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< RateHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Handle< Quote > >* v;
            if (SWIG_ConvertPtr(ST(3),(void **) &v, 
                SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(3))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(3));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Handle< Quote >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_HandleT_Quote_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(4),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(4))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(4));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< RateHelper > >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< RateHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Handle< Quote > >* v;
            if (SWIG_ConvertPtr(ST(4),(void **) &v, 
                SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(4))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(4));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Handle< Quote >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_HandleT_Quote_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(5),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(5))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(5));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 7;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_7:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< RateHelper > >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< RateHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Handle< Quote > >* v;
            if (SWIG_ConvertPtr(ST(3),(void **) &v, 
                SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(3))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(3));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Handle< Quote >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_HandleT_Quote_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(4),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(4))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(4));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Cubic, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 8;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_8:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< RateHelper > >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< RateHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Handle< Quote > >* v;
            if (SWIG_ConvertPtr(ST(4),(void **) &v, 
                SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(4))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(4));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Handle< Quote >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_HandleT_Quote_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(5),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(5))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(5));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 9;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_9:
    
    if (items == 8) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< RateHelper > >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< RateHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Handle< Quote > >* v;
            if (SWIG_ConvertPtr(ST(4),(void **) &v, 
                SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(4))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(4));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Handle< Quote >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_HandleT_Quote_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(5),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(5))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(5));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_Cubic, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 10;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_10:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_PiecewiseCubicZero__SWIG_4); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_PiecewiseCubicZero__SWIG_3); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_PiecewiseCubicZero__SWIG_9); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_PiecewiseCubicZero__SWIG_2); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_PiecewiseCubicZero__SWIG_8); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_PiecewiseCubicZero__SWIG_1); return;
    case 7:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_PiecewiseCubicZero__SWIG_7); return;
    case 8:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_PiecewiseCubicZero__SWIG_0); return;
    case 9:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_PiecewiseCubicZero__SWIG_6); return;
    case 10:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_PiecewiseCubicZero__SWIG_5); return;
    }
  }
  
  croak("No matching function for overloaded 'new_PiecewiseCubicZero'");
  XSRETURN(0);
}


XS(_wrap_PiecewiseCubicZero_dates) {
  {
    PiecewiseCubicZeroPtr *arg1 = (PiecewiseCubicZeroPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Date > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: PiecewiseCubicZero_dates(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PiecewiseCubicZeroPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PiecewiseCubicZero_dates" "', argument " "1"" of type '" "PiecewiseCubicZeroPtr *""'"); 
    }
    arg1 = reinterpret_cast< PiecewiseCubicZeroPtr * >(argp1);
    {
      try {
        result = (std::vector< Date > *) &PiecewiseCubicZeroPtr_dates(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_Date_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_PiecewiseCubicZero_times) {
  {
    PiecewiseCubicZeroPtr *arg1 = (PiecewiseCubicZeroPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Time > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: PiecewiseCubicZero_times(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PiecewiseCubicZeroPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PiecewiseCubicZero_times" "', argument " "1"" of type '" "PiecewiseCubicZeroPtr *""'"); 
    }
    arg1 = reinterpret_cast< PiecewiseCubicZeroPtr * >(argp1);
    {
      try {
        result = (std::vector< Time > *) &PiecewiseCubicZeroPtr_times(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_PiecewiseCubicZero_nodes) {
  {
    PiecewiseCubicZeroPtr *arg1 = (PiecewiseCubicZeroPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< std::pair< Date,Real > > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: PiecewiseCubicZero_nodes(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PiecewiseCubicZeroPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PiecewiseCubicZero_nodes" "', argument " "1"" of type '" "PiecewiseCubicZeroPtr *""'"); 
    }
    arg1 = reinterpret_cast< PiecewiseCubicZeroPtr * >(argp1);
    {
      try {
        result = PiecewiseCubicZeroPtr_nodes(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        std::pair< Date,double >* ptr = new std::pair< Date,double >(result[i]);
        svs[i] = sv_newmortal();
        SWIG_MakePtr(svs[i], (void*) ptr, 
          SWIGTYPE_p_std__pairT_Date_double_t, SWIG_SHADOW|0);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_PiecewiseCubicZero) {
  {
    PiecewiseCubicZeroPtr *arg1 = (PiecewiseCubicZeroPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_PiecewiseCubicZero(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PiecewiseCubicZeroPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_PiecewiseCubicZero" "', argument " "1"" of type '" "PiecewiseCubicZeroPtr *""'"); 
    }
    arg1 = reinterpret_cast< PiecewiseCubicZeroPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PiecewiseLogCubicDiscount__SWIG_0) {
  {
    Date *arg1 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    std::vector< Handle< Quote > > *arg4 = 0 ;
    std::vector< Date > *arg5 = 0 ;
    Real arg6 ;
    MonotonicLogCubic *arg7 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > temp2 ;
    std::vector< boost::shared_ptr< RateHelper > > *v2 ;
    void *argp3 ;
    int res3 = 0 ;
    std::vector< Handle< Quote > > temp4 ;
    std::vector< Handle< Quote > > *v4 ;
    std::vector< Date > temp5 ;
    std::vector< Date > *v5 ;
    double val6 ;
    int ecode6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    int argvi = 0;
    PiecewiseLogCubicDiscountPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: new_PiecewiseLogCubicDiscount(referenceDate,instruments,dayCounter,jumps,jumpDates,accuracy,i);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_PiecewiseLogCubicDiscount" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseLogCubicDiscount" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_PiecewiseLogCubicDiscount. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< RateHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1) {
            temp2.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_PiecewiseLogCubicDiscount. "
              "Expected an array of " "boost::shared_ptr< RateHelper >");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_PiecewiseLogCubicDiscount. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_PiecewiseLogCubicDiscount" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseLogCubicDiscount" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of new_PiecewiseLogCubicDiscount. "
          "Expected an array of " "Handle< Quote >");
        SV **tv;
        I32 len = av_len(av) + 1;
        Handle< Quote >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_HandleT_Quote_t,0) != -1) {
            temp4.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 4 of "
              "new_PiecewiseLogCubicDiscount. "
              "Expected an array of " "Handle< Quote >");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of new_PiecewiseLogCubicDiscount. "
          "Expected an array of " "Handle< Quote >");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(4),(void **) &v5, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg5 = v5;
      } else if (SvROK(ST(4))) {
        AV *av = (AV *)SvRV(ST(4));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 5 of new_PiecewiseLogCubicDiscount. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp5.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 5 of "
              "new_PiecewiseLogCubicDiscount. "
              "Expected an array of " "Date");
          }
        }
        arg5 = &temp5;
      } else {
        SWIG_croak("Type error in argument 5 of new_PiecewiseLogCubicDiscount. "
          "Expected an array of " "Date");
      }
    }
    ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_PiecewiseLogCubicDiscount" "', argument " "6"" of type '" "Real""'");
    } 
    arg6 = static_cast< Real >(val6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_MonotonicLogCubic,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_PiecewiseLogCubicDiscount" "', argument " "7"" of type '" "MonotonicLogCubic const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseLogCubicDiscount" "', argument " "7"" of type '" "MonotonicLogCubic const &""'"); 
    }
    arg7 = reinterpret_cast< MonotonicLogCubic * >(argp7);
    {
      try {
        result = (PiecewiseLogCubicDiscountPtr *)new_PiecewiseLogCubicDiscountPtr__SWIG_0((Date const &)*arg1,(std::vector< boost::shared_ptr< RateHelper > > const &)*arg2,(DayCounter const &)*arg3,(std::vector< Handle< Quote > > const &)*arg4,(std::vector< Date > const &)*arg5,arg6,(MonotonicLogCubic const &)*arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PiecewiseLogCubicDiscountPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PiecewiseLogCubicDiscount__SWIG_1) {
  {
    Date *arg1 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    std::vector< Handle< Quote > > *arg4 = 0 ;
    std::vector< Date > *arg5 = 0 ;
    Real arg6 ;
    void *argp1 ;
    int res1 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > temp2 ;
    std::vector< boost::shared_ptr< RateHelper > > *v2 ;
    void *argp3 ;
    int res3 = 0 ;
    std::vector< Handle< Quote > > temp4 ;
    std::vector< Handle< Quote > > *v4 ;
    std::vector< Date > temp5 ;
    std::vector< Date > *v5 ;
    double val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    PiecewiseLogCubicDiscountPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_PiecewiseLogCubicDiscount(referenceDate,instruments,dayCounter,jumps,jumpDates,accuracy);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_PiecewiseLogCubicDiscount" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseLogCubicDiscount" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_PiecewiseLogCubicDiscount. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< RateHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1) {
            temp2.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_PiecewiseLogCubicDiscount. "
              "Expected an array of " "boost::shared_ptr< RateHelper >");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_PiecewiseLogCubicDiscount. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_PiecewiseLogCubicDiscount" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseLogCubicDiscount" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of new_PiecewiseLogCubicDiscount. "
          "Expected an array of " "Handle< Quote >");
        SV **tv;
        I32 len = av_len(av) + 1;
        Handle< Quote >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_HandleT_Quote_t,0) != -1) {
            temp4.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 4 of "
              "new_PiecewiseLogCubicDiscount. "
              "Expected an array of " "Handle< Quote >");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of new_PiecewiseLogCubicDiscount. "
          "Expected an array of " "Handle< Quote >");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(4),(void **) &v5, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg5 = v5;
      } else if (SvROK(ST(4))) {
        AV *av = (AV *)SvRV(ST(4));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 5 of new_PiecewiseLogCubicDiscount. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp5.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 5 of "
              "new_PiecewiseLogCubicDiscount. "
              "Expected an array of " "Date");
          }
        }
        arg5 = &temp5;
      } else {
        SWIG_croak("Type error in argument 5 of new_PiecewiseLogCubicDiscount. "
          "Expected an array of " "Date");
      }
    }
    ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_PiecewiseLogCubicDiscount" "', argument " "6"" of type '" "Real""'");
    } 
    arg6 = static_cast< Real >(val6);
    {
      try {
        result = (PiecewiseLogCubicDiscountPtr *)new_PiecewiseLogCubicDiscountPtr__SWIG_0((Date const &)*arg1,(std::vector< boost::shared_ptr< RateHelper > > const &)*arg2,(DayCounter const &)*arg3,(std::vector< Handle< Quote > > const &)*arg4,(std::vector< Date > const &)*arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PiecewiseLogCubicDiscountPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PiecewiseLogCubicDiscount__SWIG_2) {
  {
    Date *arg1 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    std::vector< Handle< Quote > > *arg4 = 0 ;
    std::vector< Date > *arg5 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > temp2 ;
    std::vector< boost::shared_ptr< RateHelper > > *v2 ;
    void *argp3 ;
    int res3 = 0 ;
    std::vector< Handle< Quote > > temp4 ;
    std::vector< Handle< Quote > > *v4 ;
    std::vector< Date > temp5 ;
    std::vector< Date > *v5 ;
    int argvi = 0;
    PiecewiseLogCubicDiscountPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_PiecewiseLogCubicDiscount(referenceDate,instruments,dayCounter,jumps,jumpDates);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_PiecewiseLogCubicDiscount" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseLogCubicDiscount" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_PiecewiseLogCubicDiscount. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< RateHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1) {
            temp2.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_PiecewiseLogCubicDiscount. "
              "Expected an array of " "boost::shared_ptr< RateHelper >");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_PiecewiseLogCubicDiscount. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_PiecewiseLogCubicDiscount" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseLogCubicDiscount" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of new_PiecewiseLogCubicDiscount. "
          "Expected an array of " "Handle< Quote >");
        SV **tv;
        I32 len = av_len(av) + 1;
        Handle< Quote >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_HandleT_Quote_t,0) != -1) {
            temp4.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 4 of "
              "new_PiecewiseLogCubicDiscount. "
              "Expected an array of " "Handle< Quote >");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of new_PiecewiseLogCubicDiscount. "
          "Expected an array of " "Handle< Quote >");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(4),(void **) &v5, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg5 = v5;
      } else if (SvROK(ST(4))) {
        AV *av = (AV *)SvRV(ST(4));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 5 of new_PiecewiseLogCubicDiscount. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp5.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 5 of "
              "new_PiecewiseLogCubicDiscount. "
              "Expected an array of " "Date");
          }
        }
        arg5 = &temp5;
      } else {
        SWIG_croak("Type error in argument 5 of new_PiecewiseLogCubicDiscount. "
          "Expected an array of " "Date");
      }
    }
    {
      try {
        result = (PiecewiseLogCubicDiscountPtr *)new_PiecewiseLogCubicDiscountPtr__SWIG_0((Date const &)*arg1,(std::vector< boost::shared_ptr< RateHelper > > const &)*arg2,(DayCounter const &)*arg3,(std::vector< Handle< Quote > > const &)*arg4,(std::vector< Date > const &)*arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PiecewiseLogCubicDiscountPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PiecewiseLogCubicDiscount__SWIG_3) {
  {
    Date *arg1 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    std::vector< Handle< Quote > > *arg4 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > temp2 ;
    std::vector< boost::shared_ptr< RateHelper > > *v2 ;
    void *argp3 ;
    int res3 = 0 ;
    std::vector< Handle< Quote > > temp4 ;
    std::vector< Handle< Quote > > *v4 ;
    int argvi = 0;
    PiecewiseLogCubicDiscountPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_PiecewiseLogCubicDiscount(referenceDate,instruments,dayCounter,jumps);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_PiecewiseLogCubicDiscount" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseLogCubicDiscount" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_PiecewiseLogCubicDiscount. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< RateHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1) {
            temp2.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_PiecewiseLogCubicDiscount. "
              "Expected an array of " "boost::shared_ptr< RateHelper >");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_PiecewiseLogCubicDiscount. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_PiecewiseLogCubicDiscount" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseLogCubicDiscount" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of new_PiecewiseLogCubicDiscount. "
          "Expected an array of " "Handle< Quote >");
        SV **tv;
        I32 len = av_len(av) + 1;
        Handle< Quote >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_HandleT_Quote_t,0) != -1) {
            temp4.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 4 of "
              "new_PiecewiseLogCubicDiscount. "
              "Expected an array of " "Handle< Quote >");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of new_PiecewiseLogCubicDiscount. "
          "Expected an array of " "Handle< Quote >");
      }
    }
    {
      try {
        result = (PiecewiseLogCubicDiscountPtr *)new_PiecewiseLogCubicDiscountPtr__SWIG_0((Date const &)*arg1,(std::vector< boost::shared_ptr< RateHelper > > const &)*arg2,(DayCounter const &)*arg3,(std::vector< Handle< Quote > > const &)*arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PiecewiseLogCubicDiscountPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PiecewiseLogCubicDiscount__SWIG_4) {
  {
    Date *arg1 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > temp2 ;
    std::vector< boost::shared_ptr< RateHelper > > *v2 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    PiecewiseLogCubicDiscountPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_PiecewiseLogCubicDiscount(referenceDate,instruments,dayCounter);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_PiecewiseLogCubicDiscount" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseLogCubicDiscount" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_PiecewiseLogCubicDiscount. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< RateHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1) {
            temp2.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_PiecewiseLogCubicDiscount. "
              "Expected an array of " "boost::shared_ptr< RateHelper >");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_PiecewiseLogCubicDiscount. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_PiecewiseLogCubicDiscount" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseLogCubicDiscount" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    {
      try {
        result = (PiecewiseLogCubicDiscountPtr *)new_PiecewiseLogCubicDiscountPtr__SWIG_0((Date const &)*arg1,(std::vector< boost::shared_ptr< RateHelper > > const &)*arg2,(DayCounter const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PiecewiseLogCubicDiscountPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PiecewiseLogCubicDiscount__SWIG_5) {
  {
    Integer arg1 ;
    Calendar *arg2 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    std::vector< Handle< Quote > > *arg5 = 0 ;
    std::vector< Date > *arg6 = 0 ;
    Real arg7 ;
    MonotonicLogCubic *arg8 = 0 ;
    int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > temp3 ;
    std::vector< boost::shared_ptr< RateHelper > > *v3 ;
    void *argp4 ;
    int res4 = 0 ;
    std::vector< Handle< Quote > > temp5 ;
    std::vector< Handle< Quote > > *v5 ;
    std::vector< Date > temp6 ;
    std::vector< Date > *v6 ;
    double val7 ;
    int ecode7 = 0 ;
    void *argp8 ;
    int res8 = 0 ;
    int argvi = 0;
    PiecewiseLogCubicDiscountPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 8) || (items > 8)) {
      SWIG_croak("Usage: new_PiecewiseLogCubicDiscount(settlementDays,calendar,instruments,dayCounter,jumps,jumpDates,accuracy,i);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_PiecewiseLogCubicDiscount" "', argument " "1"" of type '" "Integer""'");
    } 
    arg1 = static_cast< Integer >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_PiecewiseLogCubicDiscount" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseLogCubicDiscount" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_PiecewiseLogCubicDiscount. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< RateHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1) {
            temp3.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_PiecewiseLogCubicDiscount. "
              "Expected an array of " "boost::shared_ptr< RateHelper >");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_PiecewiseLogCubicDiscount. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
      }
    }
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_PiecewiseLogCubicDiscount" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseLogCubicDiscount" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    {
      if (SWIG_ConvertPtr(ST(4),(void **) &v5, 
          SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,1) != -1) {
        arg5 = v5;
      } else if (SvROK(ST(4))) {
        AV *av = (AV *)SvRV(ST(4));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 5 of new_PiecewiseLogCubicDiscount. "
          "Expected an array of " "Handle< Quote >");
        SV **tv;
        I32 len = av_len(av) + 1;
        Handle< Quote >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_HandleT_Quote_t,0) != -1) {
            temp5.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 5 of "
              "new_PiecewiseLogCubicDiscount. "
              "Expected an array of " "Handle< Quote >");
          }
        }
        arg5 = &temp5;
      } else {
        SWIG_croak("Type error in argument 5 of new_PiecewiseLogCubicDiscount. "
          "Expected an array of " "Handle< Quote >");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(5),(void **) &v6, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg6 = v6;
      } else if (SvROK(ST(5))) {
        AV *av = (AV *)SvRV(ST(5));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 6 of new_PiecewiseLogCubicDiscount. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp6.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 6 of "
              "new_PiecewiseLogCubicDiscount. "
              "Expected an array of " "Date");
          }
        }
        arg6 = &temp6;
      } else {
        SWIG_croak("Type error in argument 6 of new_PiecewiseLogCubicDiscount. "
          "Expected an array of " "Date");
      }
    }
    ecode7 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_PiecewiseLogCubicDiscount" "', argument " "7"" of type '" "Real""'");
    } 
    arg7 = static_cast< Real >(val7);
    res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_MonotonicLogCubic,  0 );
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_PiecewiseLogCubicDiscount" "', argument " "8"" of type '" "MonotonicLogCubic const &""'"); 
    }
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseLogCubicDiscount" "', argument " "8"" of type '" "MonotonicLogCubic const &""'"); 
    }
    arg8 = reinterpret_cast< MonotonicLogCubic * >(argp8);
    {
      try {
        result = (PiecewiseLogCubicDiscountPtr *)new_PiecewiseLogCubicDiscountPtr__SWIG_5(arg1,(Calendar const &)*arg2,(std::vector< boost::shared_ptr< RateHelper > > const &)*arg3,(DayCounter const &)*arg4,(std::vector< Handle< Quote > > const &)*arg5,(std::vector< Date > const &)*arg6,arg7,(MonotonicLogCubic const &)*arg8);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PiecewiseLogCubicDiscountPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PiecewiseLogCubicDiscount__SWIG_6) {
  {
    Integer arg1 ;
    Calendar *arg2 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    std::vector< Handle< Quote > > *arg5 = 0 ;
    std::vector< Date > *arg6 = 0 ;
    Real arg7 ;
    int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > temp3 ;
    std::vector< boost::shared_ptr< RateHelper > > *v3 ;
    void *argp4 ;
    int res4 = 0 ;
    std::vector< Handle< Quote > > temp5 ;
    std::vector< Handle< Quote > > *v5 ;
    std::vector< Date > temp6 ;
    std::vector< Date > *v6 ;
    double val7 ;
    int ecode7 = 0 ;
    int argvi = 0;
    PiecewiseLogCubicDiscountPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: new_PiecewiseLogCubicDiscount(settlementDays,calendar,instruments,dayCounter,jumps,jumpDates,accuracy);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_PiecewiseLogCubicDiscount" "', argument " "1"" of type '" "Integer""'");
    } 
    arg1 = static_cast< Integer >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_PiecewiseLogCubicDiscount" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseLogCubicDiscount" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_PiecewiseLogCubicDiscount. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< RateHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1) {
            temp3.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_PiecewiseLogCubicDiscount. "
              "Expected an array of " "boost::shared_ptr< RateHelper >");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_PiecewiseLogCubicDiscount. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
      }
    }
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_PiecewiseLogCubicDiscount" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseLogCubicDiscount" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    {
      if (SWIG_ConvertPtr(ST(4),(void **) &v5, 
          SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,1) != -1) {
        arg5 = v5;
      } else if (SvROK(ST(4))) {
        AV *av = (AV *)SvRV(ST(4));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 5 of new_PiecewiseLogCubicDiscount. "
          "Expected an array of " "Handle< Quote >");
        SV **tv;
        I32 len = av_len(av) + 1;
        Handle< Quote >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_HandleT_Quote_t,0) != -1) {
            temp5.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 5 of "
              "new_PiecewiseLogCubicDiscount. "
              "Expected an array of " "Handle< Quote >");
          }
        }
        arg5 = &temp5;
      } else {
        SWIG_croak("Type error in argument 5 of new_PiecewiseLogCubicDiscount. "
          "Expected an array of " "Handle< Quote >");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(5),(void **) &v6, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg6 = v6;
      } else if (SvROK(ST(5))) {
        AV *av = (AV *)SvRV(ST(5));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 6 of new_PiecewiseLogCubicDiscount. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp6.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 6 of "
              "new_PiecewiseLogCubicDiscount. "
              "Expected an array of " "Date");
          }
        }
        arg6 = &temp6;
      } else {
        SWIG_croak("Type error in argument 6 of new_PiecewiseLogCubicDiscount. "
          "Expected an array of " "Date");
      }
    }
    ecode7 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_PiecewiseLogCubicDiscount" "', argument " "7"" of type '" "Real""'");
    } 
    arg7 = static_cast< Real >(val7);
    {
      try {
        result = (PiecewiseLogCubicDiscountPtr *)new_PiecewiseLogCubicDiscountPtr__SWIG_5(arg1,(Calendar const &)*arg2,(std::vector< boost::shared_ptr< RateHelper > > const &)*arg3,(DayCounter const &)*arg4,(std::vector< Handle< Quote > > const &)*arg5,(std::vector< Date > const &)*arg6,arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PiecewiseLogCubicDiscountPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PiecewiseLogCubicDiscount__SWIG_7) {
  {
    Integer arg1 ;
    Calendar *arg2 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    std::vector< Handle< Quote > > *arg5 = 0 ;
    std::vector< Date > *arg6 = 0 ;
    int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > temp3 ;
    std::vector< boost::shared_ptr< RateHelper > > *v3 ;
    void *argp4 ;
    int res4 = 0 ;
    std::vector< Handle< Quote > > temp5 ;
    std::vector< Handle< Quote > > *v5 ;
    std::vector< Date > temp6 ;
    std::vector< Date > *v6 ;
    int argvi = 0;
    PiecewiseLogCubicDiscountPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_PiecewiseLogCubicDiscount(settlementDays,calendar,instruments,dayCounter,jumps,jumpDates);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_PiecewiseLogCubicDiscount" "', argument " "1"" of type '" "Integer""'");
    } 
    arg1 = static_cast< Integer >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_PiecewiseLogCubicDiscount" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseLogCubicDiscount" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_PiecewiseLogCubicDiscount. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< RateHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1) {
            temp3.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_PiecewiseLogCubicDiscount. "
              "Expected an array of " "boost::shared_ptr< RateHelper >");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_PiecewiseLogCubicDiscount. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
      }
    }
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_PiecewiseLogCubicDiscount" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseLogCubicDiscount" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    {
      if (SWIG_ConvertPtr(ST(4),(void **) &v5, 
          SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,1) != -1) {
        arg5 = v5;
      } else if (SvROK(ST(4))) {
        AV *av = (AV *)SvRV(ST(4));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 5 of new_PiecewiseLogCubicDiscount. "
          "Expected an array of " "Handle< Quote >");
        SV **tv;
        I32 len = av_len(av) + 1;
        Handle< Quote >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_HandleT_Quote_t,0) != -1) {
            temp5.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 5 of "
              "new_PiecewiseLogCubicDiscount. "
              "Expected an array of " "Handle< Quote >");
          }
        }
        arg5 = &temp5;
      } else {
        SWIG_croak("Type error in argument 5 of new_PiecewiseLogCubicDiscount. "
          "Expected an array of " "Handle< Quote >");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(5),(void **) &v6, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg6 = v6;
      } else if (SvROK(ST(5))) {
        AV *av = (AV *)SvRV(ST(5));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 6 of new_PiecewiseLogCubicDiscount. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp6.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 6 of "
              "new_PiecewiseLogCubicDiscount. "
              "Expected an array of " "Date");
          }
        }
        arg6 = &temp6;
      } else {
        SWIG_croak("Type error in argument 6 of new_PiecewiseLogCubicDiscount. "
          "Expected an array of " "Date");
      }
    }
    {
      try {
        result = (PiecewiseLogCubicDiscountPtr *)new_PiecewiseLogCubicDiscountPtr__SWIG_5(arg1,(Calendar const &)*arg2,(std::vector< boost::shared_ptr< RateHelper > > const &)*arg3,(DayCounter const &)*arg4,(std::vector< Handle< Quote > > const &)*arg5,(std::vector< Date > const &)*arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PiecewiseLogCubicDiscountPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PiecewiseLogCubicDiscount__SWIG_8) {
  {
    Integer arg1 ;
    Calendar *arg2 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    std::vector< Handle< Quote > > *arg5 = 0 ;
    int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > temp3 ;
    std::vector< boost::shared_ptr< RateHelper > > *v3 ;
    void *argp4 ;
    int res4 = 0 ;
    std::vector< Handle< Quote > > temp5 ;
    std::vector< Handle< Quote > > *v5 ;
    int argvi = 0;
    PiecewiseLogCubicDiscountPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_PiecewiseLogCubicDiscount(settlementDays,calendar,instruments,dayCounter,jumps);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_PiecewiseLogCubicDiscount" "', argument " "1"" of type '" "Integer""'");
    } 
    arg1 = static_cast< Integer >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_PiecewiseLogCubicDiscount" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseLogCubicDiscount" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_PiecewiseLogCubicDiscount. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< RateHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1) {
            temp3.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_PiecewiseLogCubicDiscount. "
              "Expected an array of " "boost::shared_ptr< RateHelper >");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_PiecewiseLogCubicDiscount. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
      }
    }
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_PiecewiseLogCubicDiscount" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseLogCubicDiscount" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    {
      if (SWIG_ConvertPtr(ST(4),(void **) &v5, 
          SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,1) != -1) {
        arg5 = v5;
      } else if (SvROK(ST(4))) {
        AV *av = (AV *)SvRV(ST(4));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 5 of new_PiecewiseLogCubicDiscount. "
          "Expected an array of " "Handle< Quote >");
        SV **tv;
        I32 len = av_len(av) + 1;
        Handle< Quote >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_HandleT_Quote_t,0) != -1) {
            temp5.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 5 of "
              "new_PiecewiseLogCubicDiscount. "
              "Expected an array of " "Handle< Quote >");
          }
        }
        arg5 = &temp5;
      } else {
        SWIG_croak("Type error in argument 5 of new_PiecewiseLogCubicDiscount. "
          "Expected an array of " "Handle< Quote >");
      }
    }
    {
      try {
        result = (PiecewiseLogCubicDiscountPtr *)new_PiecewiseLogCubicDiscountPtr__SWIG_5(arg1,(Calendar const &)*arg2,(std::vector< boost::shared_ptr< RateHelper > > const &)*arg3,(DayCounter const &)*arg4,(std::vector< Handle< Quote > > const &)*arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PiecewiseLogCubicDiscountPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PiecewiseLogCubicDiscount__SWIG_9) {
  {
    Integer arg1 ;
    Calendar *arg2 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > *arg3 = 0 ;
    DayCounter *arg4 = 0 ;
    int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    std::vector< boost::shared_ptr< RateHelper > > temp3 ;
    std::vector< boost::shared_ptr< RateHelper > > *v3 ;
    void *argp4 ;
    int res4 = 0 ;
    int argvi = 0;
    PiecewiseLogCubicDiscountPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_PiecewiseLogCubicDiscount(settlementDays,calendar,instruments,dayCounter);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_PiecewiseLogCubicDiscount" "', argument " "1"" of type '" "Integer""'");
    } 
    arg1 = static_cast< Integer >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_PiecewiseLogCubicDiscount" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseLogCubicDiscount" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of new_PiecewiseLogCubicDiscount. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
        SV **tv;
        I32 len = av_len(av) + 1;
        boost::shared_ptr< RateHelper >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1) {
            temp3.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 3 of "
              "new_PiecewiseLogCubicDiscount. "
              "Expected an array of " "boost::shared_ptr< RateHelper >");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of new_PiecewiseLogCubicDiscount. "
          "Expected an array of " "boost::shared_ptr< RateHelper >");
      }
    }
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_PiecewiseLogCubicDiscount" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PiecewiseLogCubicDiscount" "', argument " "4"" of type '" "DayCounter const &""'"); 
    }
    arg4 = reinterpret_cast< DayCounter * >(argp4);
    {
      try {
        result = (PiecewiseLogCubicDiscountPtr *)new_PiecewiseLogCubicDiscountPtr__SWIG_5(arg1,(Calendar const &)*arg2,(std::vector< boost::shared_ptr< RateHelper > > const &)*arg3,(DayCounter const &)*arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PiecewiseLogCubicDiscountPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PiecewiseLogCubicDiscount) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< RateHelper > >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< RateHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< RateHelper > >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< RateHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Handle< Quote > >* v;
            if (SWIG_ConvertPtr(ST(3),(void **) &v, 
                SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(3))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(3));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Handle< Quote >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_HandleT_Quote_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< RateHelper > >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< RateHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< RateHelper > >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< RateHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Handle< Quote > >* v;
            if (SWIG_ConvertPtr(ST(3),(void **) &v, 
                SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(3))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(3));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Handle< Quote >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_HandleT_Quote_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(4),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(4))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(4));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< RateHelper > >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< RateHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Handle< Quote > >* v;
            if (SWIG_ConvertPtr(ST(4),(void **) &v, 
                SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(4))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(4));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Handle< Quote >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_HandleT_Quote_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< RateHelper > >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< RateHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Handle< Quote > >* v;
            if (SWIG_ConvertPtr(ST(3),(void **) &v, 
                SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(3))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(3));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Handle< Quote >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_HandleT_Quote_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(4),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(4))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(4));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< RateHelper > >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< RateHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Handle< Quote > >* v;
            if (SWIG_ConvertPtr(ST(4),(void **) &v, 
                SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(4))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(4));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Handle< Quote >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_HandleT_Quote_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(5),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(5))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(5));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 7;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_7:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< RateHelper > >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< RateHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Handle< Quote > >* v;
            if (SWIG_ConvertPtr(ST(3),(void **) &v, 
                SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(3))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(3));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Handle< Quote >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_HandleT_Quote_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(4),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(4))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(4));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_MonotonicLogCubic, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 8;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_8:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< RateHelper > >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< RateHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Handle< Quote > >* v;
            if (SWIG_ConvertPtr(ST(4),(void **) &v, 
                SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(4))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(4));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Handle< Quote >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_HandleT_Quote_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(5),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(5))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(5));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 9;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_9:
    
    if (items == 8) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< boost::shared_ptr< RateHelper > >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  boost::shared_ptr< RateHelper >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_boost__shared_ptrT_RateHelper_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Handle< Quote > >* v;
            if (SWIG_ConvertPtr(ST(4),(void **) &v, 
                SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(4))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(4));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Handle< Quote >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_HandleT_Quote_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(5),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(5))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(5));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(7), &vptr, SWIGTYPE_p_MonotonicLogCubic, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 10;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_10:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_PiecewiseLogCubicDiscount__SWIG_4); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_PiecewiseLogCubicDiscount__SWIG_3); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_PiecewiseLogCubicDiscount__SWIG_9); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_PiecewiseLogCubicDiscount__SWIG_2); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_PiecewiseLogCubicDiscount__SWIG_8); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_PiecewiseLogCubicDiscount__SWIG_1); return;
    case 7:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_PiecewiseLogCubicDiscount__SWIG_7); return;
    case 8:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_PiecewiseLogCubicDiscount__SWIG_0); return;
    case 9:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_PiecewiseLogCubicDiscount__SWIG_6); return;
    case 10:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_PiecewiseLogCubicDiscount__SWIG_5); return;
    }
  }
  
  croak("No matching function for overloaded 'new_PiecewiseLogCubicDiscount'");
  XSRETURN(0);
}


XS(_wrap_PiecewiseLogCubicDiscount_dates) {
  {
    PiecewiseLogCubicDiscountPtr *arg1 = (PiecewiseLogCubicDiscountPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Date > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: PiecewiseLogCubicDiscount_dates(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PiecewiseLogCubicDiscountPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PiecewiseLogCubicDiscount_dates" "', argument " "1"" of type '" "PiecewiseLogCubicDiscountPtr *""'"); 
    }
    arg1 = reinterpret_cast< PiecewiseLogCubicDiscountPtr * >(argp1);
    {
      try {
        result = (std::vector< Date > *) &PiecewiseLogCubicDiscountPtr_dates(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_Date_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_PiecewiseLogCubicDiscount_times) {
  {
    PiecewiseLogCubicDiscountPtr *arg1 = (PiecewiseLogCubicDiscountPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Time > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: PiecewiseLogCubicDiscount_times(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PiecewiseLogCubicDiscountPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PiecewiseLogCubicDiscount_times" "', argument " "1"" of type '" "PiecewiseLogCubicDiscountPtr *""'"); 
    }
    arg1 = reinterpret_cast< PiecewiseLogCubicDiscountPtr * >(argp1);
    {
      try {
        result = (std::vector< Time > *) &PiecewiseLogCubicDiscountPtr_times(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_PiecewiseLogCubicDiscount_nodes) {
  {
    PiecewiseLogCubicDiscountPtr *arg1 = (PiecewiseLogCubicDiscountPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< std::pair< Date,Real > > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: PiecewiseLogCubicDiscount_nodes(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PiecewiseLogCubicDiscountPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PiecewiseLogCubicDiscount_nodes" "', argument " "1"" of type '" "PiecewiseLogCubicDiscountPtr *""'"); 
    }
    arg1 = reinterpret_cast< PiecewiseLogCubicDiscountPtr * >(argp1);
    {
      try {
        result = PiecewiseLogCubicDiscountPtr_nodes(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        std::pair< Date,double >* ptr = new std::pair< Date,double >(result[i]);
        svs[i] = sv_newmortal();
        SWIG_MakePtr(svs[i], (void*) ptr, 
          SWIGTYPE_p_std__pairT_Date_double_t, SWIG_SHADOW|0);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_PiecewiseLogCubicDiscount) {
  {
    PiecewiseLogCubicDiscountPtr *arg1 = (PiecewiseLogCubicDiscountPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_PiecewiseLogCubicDiscount(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PiecewiseLogCubicDiscountPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_PiecewiseLogCubicDiscount" "', argument " "1"" of type '" "PiecewiseLogCubicDiscountPtr *""'"); 
    }
    arg1 = reinterpret_cast< PiecewiseLogCubicDiscountPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SampledCurve__SWIG_0) {
  {
    int argvi = 0;
    SampledCurve *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_SampledCurve();");
    }
    {
      try {
        result = (SampledCurve *)new SampledCurve();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SampledCurve, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_SampledCurve__SWIG_1) {
  {
    Array *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    SampledCurve *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_SampledCurve(Array const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SampledCurve" "', argument " "1"" of type '" "Array const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SampledCurve" "', argument " "1"" of type '" "Array const &""'"); 
    }
    arg1 = reinterpret_cast< Array * >(argp1);
    {
      try {
        result = (SampledCurve *)new SampledCurve((Array const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SampledCurve, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SampledCurve) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Array, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SampledCurve__SWIG_0); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SampledCurve__SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded 'new_SampledCurve'");
  XSRETURN(0);
}


XS(_wrap_SampledCurve_grid) {
  {
    SampledCurve *arg1 = (SampledCurve *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Array *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: SampledCurve_grid(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SampledCurve, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SampledCurve_grid" "', argument " "1"" of type '" "SampledCurve *""'"); 
    }
    arg1 = reinterpret_cast< SampledCurve * >(argp1);
    {
      try {
        result = (Array *) &(arg1)->grid();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Array, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_SampledCurve_values) {
  {
    SampledCurve *arg1 = (SampledCurve *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Array *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: SampledCurve_values(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SampledCurve, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SampledCurve_values" "', argument " "1"" of type '" "SampledCurve *""'"); 
    }
    arg1 = reinterpret_cast< SampledCurve * >(argp1);
    {
      try {
        result = (Array *) &(arg1)->values();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Array, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_SampledCurve_gridValue) {
  {
    SampledCurve *arg1 = (SampledCurve *) 0 ;
    Size arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: SampledCurve_gridValue(self,i);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SampledCurve, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SampledCurve_gridValue" "', argument " "1"" of type '" "SampledCurve *""'"); 
    }
    arg1 = reinterpret_cast< SampledCurve * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SampledCurve_gridValue" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    {
      try {
        result = (Real)(arg1)->gridValue(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_SampledCurve_value) {
  {
    SampledCurve *arg1 = (SampledCurve *) 0 ;
    Size arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: SampledCurve_value(self,i);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SampledCurve, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SampledCurve_value" "', argument " "1"" of type '" "SampledCurve *""'"); 
    }
    arg1 = reinterpret_cast< SampledCurve * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SampledCurve_value" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    {
      try {
        result = (Real)(arg1)->value(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_SampledCurve_size) {
  {
    SampledCurve *arg1 = (SampledCurve *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Size result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: SampledCurve_size(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SampledCurve, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SampledCurve_size" "', argument " "1"" of type '" "SampledCurve const *""'"); 
    }
    arg1 = reinterpret_cast< SampledCurve * >(argp1);
    {
      try {
        result = ((SampledCurve const *)arg1)->size();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_size_t  SWIG_PERL_CALL_ARGS_1(static_cast< size_t >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_SampledCurve_empty) {
  {
    SampledCurve *arg1 = (SampledCurve *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: SampledCurve_empty(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SampledCurve, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SampledCurve_empty" "', argument " "1"" of type '" "SampledCurve const *""'"); 
    }
    arg1 = reinterpret_cast< SampledCurve * >(argp1);
    {
      try {
        result = (bool)((SampledCurve const *)arg1)->empty();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_SampledCurve_setGrid) {
  {
    SampledCurve *arg1 = (SampledCurve *) 0 ;
    Array *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: SampledCurve_setGrid(self,Array const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SampledCurve, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SampledCurve_setGrid" "', argument " "1"" of type '" "SampledCurve *""'"); 
    }
    arg1 = reinterpret_cast< SampledCurve * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SampledCurve_setGrid" "', argument " "2"" of type '" "Array const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SampledCurve_setGrid" "', argument " "2"" of type '" "Array const &""'"); 
    }
    arg2 = reinterpret_cast< Array * >(argp2);
    {
      try {
        (arg1)->setGrid((Array const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_SampledCurve_setValues) {
  {
    SampledCurve *arg1 = (SampledCurve *) 0 ;
    Array *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: SampledCurve_setValues(self,Array const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SampledCurve, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SampledCurve_setValues" "', argument " "1"" of type '" "SampledCurve *""'"); 
    }
    arg1 = reinterpret_cast< SampledCurve * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SampledCurve_setValues" "', argument " "2"" of type '" "Array const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SampledCurve_setValues" "', argument " "2"" of type '" "Array const &""'"); 
    }
    arg2 = reinterpret_cast< Array * >(argp2);
    {
      try {
        (arg1)->setValues((Array const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_SampledCurve_swap) {
  {
    SampledCurve *arg1 = (SampledCurve *) 0 ;
    SampledCurve *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: SampledCurve_swap(self,SampledCurve &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SampledCurve, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SampledCurve_swap" "', argument " "1"" of type '" "SampledCurve *""'"); 
    }
    arg1 = reinterpret_cast< SampledCurve * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_SampledCurve,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SampledCurve_swap" "', argument " "2"" of type '" "SampledCurve &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SampledCurve_swap" "', argument " "2"" of type '" "SampledCurve &""'"); 
    }
    arg2 = reinterpret_cast< SampledCurve * >(argp2);
    {
      try {
        (arg1)->swap(*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_SampledCurve_setLogGrid) {
  {
    SampledCurve *arg1 = (SampledCurve *) 0 ;
    Real arg2 ;
    Real arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: SampledCurve_setLogGrid(self,min,max);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SampledCurve, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SampledCurve_setLogGrid" "', argument " "1"" of type '" "SampledCurve *""'"); 
    }
    arg1 = reinterpret_cast< SampledCurve * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SampledCurve_setLogGrid" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SampledCurve_setLogGrid" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    {
      try {
        (arg1)->setLogGrid(arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_SampledCurve_regridLogGrid) {
  {
    SampledCurve *arg1 = (SampledCurve *) 0 ;
    Real arg2 ;
    Real arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: SampledCurve_regridLogGrid(self,min,max);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SampledCurve, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SampledCurve_regridLogGrid" "', argument " "1"" of type '" "SampledCurve *""'"); 
    }
    arg1 = reinterpret_cast< SampledCurve * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SampledCurve_regridLogGrid" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SampledCurve_regridLogGrid" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    {
      try {
        (arg1)->regridLogGrid(arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_SampledCurve_shiftGrid) {
  {
    SampledCurve *arg1 = (SampledCurve *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: SampledCurve_shiftGrid(self,s);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SampledCurve, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SampledCurve_shiftGrid" "', argument " "1"" of type '" "SampledCurve *""'"); 
    }
    arg1 = reinterpret_cast< SampledCurve * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SampledCurve_shiftGrid" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        (arg1)->shiftGrid(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_SampledCurve_scaleGrid) {
  {
    SampledCurve *arg1 = (SampledCurve *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: SampledCurve_scaleGrid(self,s);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SampledCurve, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SampledCurve_scaleGrid" "', argument " "1"" of type '" "SampledCurve *""'"); 
    }
    arg1 = reinterpret_cast< SampledCurve * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SampledCurve_scaleGrid" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        (arg1)->scaleGrid(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_SampledCurve_regrid) {
  {
    SampledCurve *arg1 = (SampledCurve *) 0 ;
    Array *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: SampledCurve_regrid(self,Array const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SampledCurve, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SampledCurve_regrid" "', argument " "1"" of type '" "SampledCurve *""'"); 
    }
    arg1 = reinterpret_cast< SampledCurve * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SampledCurve_regrid" "', argument " "2"" of type '" "Array const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SampledCurve_regrid" "', argument " "2"" of type '" "Array const &""'"); 
    }
    arg2 = reinterpret_cast< Array * >(argp2);
    {
      try {
        (arg1)->regrid((Array const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_SampledCurve) {
  {
    SampledCurve *arg1 = (SampledCurve *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_SampledCurve(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SampledCurve, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SampledCurve" "', argument " "1"" of type '" "SampledCurve *""'"); 
    }
    arg1 = reinterpret_cast< SampledCurve * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Settings_instance) {
  {
    int argvi = 0;
    Settings *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: Settings_instance();");
    }
    {
      try {
        result = (Settings *) &Settings::instance();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Settings, 0 | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_Settings_getEvaluationDate) {
  {
    Settings *arg1 = (Settings *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Date result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Settings_getEvaluationDate(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Settings, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Settings_getEvaluationDate" "', argument " "1"" of type '" "Settings *""'"); 
    }
    arg1 = reinterpret_cast< Settings * >(argp1);
    {
      try {
        result = Settings_getEvaluationDate(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Date(static_cast< const Date& >(result))), SWIGTYPE_p_Date, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Settings_setEvaluationDate) {
  {
    Settings *arg1 = (Settings *) 0 ;
    Date *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Settings_setEvaluationDate(self,d);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Settings, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Settings_setEvaluationDate" "', argument " "1"" of type '" "Settings *""'"); 
    }
    arg1 = reinterpret_cast< Settings * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Settings_setEvaluationDate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Settings_setEvaluationDate" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    {
      try {
        Settings_setEvaluationDate(arg1,(Date const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Settings_includeReferenceDateEvents) {
  {
    Settings *arg1 = (Settings *) 0 ;
    bool arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    bool val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Settings_includeReferenceDateEvents(self,b);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Settings, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Settings_includeReferenceDateEvents" "', argument " "1"" of type '" "Settings *""'"); 
    }
    arg1 = reinterpret_cast< Settings * >(argp1);
    ecode2 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Settings_includeReferenceDateEvents" "', argument " "2"" of type '" "bool""'");
    } 
    arg2 = static_cast< bool >(val2);
    {
      try {
        Settings_includeReferenceDateEvents(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Settings_includeTodaysCashFlows) {
  {
    Settings *arg1 = (Settings *) 0 ;
    bool arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    bool val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Settings_includeTodaysCashFlows(self,b);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Settings, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Settings_includeTodaysCashFlows" "', argument " "1"" of type '" "Settings *""'"); 
    }
    arg1 = reinterpret_cast< Settings * >(argp1);
    ecode2 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Settings_includeTodaysCashFlows" "', argument " "2"" of type '" "bool""'");
    } 
    arg2 = static_cast< bool >(val2);
    {
      try {
        Settings_includeTodaysCashFlows(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_Settings) {
  {
    Settings *arg1 = (Settings *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Settings(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Settings, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Settings" "', argument " "1"" of type '" "Settings *""'"); 
    }
    arg1 = reinterpret_cast< Settings * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Statistics_samples) {
  {
    Statistics *arg1 = (Statistics *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Size result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Statistics_samples(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Statistics, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Statistics_samples" "', argument " "1"" of type '" "Statistics const *""'"); 
    }
    arg1 = reinterpret_cast< Statistics * >(argp1);
    {
      try {
        result = ((Statistics const *)arg1)->samples();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_size_t  SWIG_PERL_CALL_ARGS_1(static_cast< size_t >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Statistics_weightSum) {
  {
    Statistics *arg1 = (Statistics *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Statistics_weightSum(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Statistics, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Statistics_weightSum" "', argument " "1"" of type '" "Statistics const *""'"); 
    }
    arg1 = reinterpret_cast< Statistics * >(argp1);
    {
      try {
        result = (Real)((Statistics const *)arg1)->weightSum();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Statistics_mean) {
  {
    Statistics *arg1 = (Statistics *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Statistics_mean(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Statistics, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Statistics_mean" "', argument " "1"" of type '" "Statistics const *""'"); 
    }
    arg1 = reinterpret_cast< Statistics * >(argp1);
    {
      try {
        result = (Real)((Statistics const *)arg1)->mean();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Statistics_variance) {
  {
    Statistics *arg1 = (Statistics *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Statistics_variance(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Statistics, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Statistics_variance" "', argument " "1"" of type '" "Statistics const *""'"); 
    }
    arg1 = reinterpret_cast< Statistics * >(argp1);
    {
      try {
        result = (Real)((Statistics const *)arg1)->variance();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Statistics_standardDeviation) {
  {
    Statistics *arg1 = (Statistics *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Statistics_standardDeviation(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Statistics, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Statistics_standardDeviation" "', argument " "1"" of type '" "Statistics const *""'"); 
    }
    arg1 = reinterpret_cast< Statistics * >(argp1);
    {
      try {
        result = (Real)((Statistics const *)arg1)->standardDeviation();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Statistics_errorEstimate) {
  {
    Statistics *arg1 = (Statistics *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Statistics_errorEstimate(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Statistics, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Statistics_errorEstimate" "', argument " "1"" of type '" "Statistics const *""'"); 
    }
    arg1 = reinterpret_cast< Statistics * >(argp1);
    {
      try {
        result = (Real)((Statistics const *)arg1)->errorEstimate();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Statistics_skewness) {
  {
    Statistics *arg1 = (Statistics *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Statistics_skewness(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Statistics, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Statistics_skewness" "', argument " "1"" of type '" "Statistics const *""'"); 
    }
    arg1 = reinterpret_cast< Statistics * >(argp1);
    {
      try {
        result = (Real)((Statistics const *)arg1)->skewness();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Statistics_kurtosis) {
  {
    Statistics *arg1 = (Statistics *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Statistics_kurtosis(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Statistics, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Statistics_kurtosis" "', argument " "1"" of type '" "Statistics const *""'"); 
    }
    arg1 = reinterpret_cast< Statistics * >(argp1);
    {
      try {
        result = (Real)((Statistics const *)arg1)->kurtosis();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Statistics_min) {
  {
    Statistics *arg1 = (Statistics *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Statistics_min(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Statistics, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Statistics_min" "', argument " "1"" of type '" "Statistics const *""'"); 
    }
    arg1 = reinterpret_cast< Statistics * >(argp1);
    {
      try {
        result = (Real)((Statistics const *)arg1)->min();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Statistics_max) {
  {
    Statistics *arg1 = (Statistics *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Statistics_max(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Statistics, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Statistics_max" "', argument " "1"" of type '" "Statistics const *""'"); 
    }
    arg1 = reinterpret_cast< Statistics * >(argp1);
    {
      try {
        result = (Real)((Statistics const *)arg1)->max();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Statistics_reset) {
  {
    Statistics *arg1 = (Statistics *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Statistics_reset(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Statistics, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Statistics_reset" "', argument " "1"" of type '" "Statistics *""'"); 
    }
    arg1 = reinterpret_cast< Statistics * >(argp1);
    {
      try {
        (arg1)->reset();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Statistics_add__SWIG_0) {
  {
    Statistics *arg1 = (Statistics *) 0 ;
    Real arg2 ;
    Real arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: Statistics_add(self,value,weight);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Statistics, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Statistics_add" "', argument " "1"" of type '" "Statistics *""'"); 
    }
    arg1 = reinterpret_cast< Statistics * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Statistics_add" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Statistics_add" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    {
      try {
        (arg1)->add(arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Statistics_add__SWIG_1) {
  {
    Statistics *arg1 = (Statistics *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Statistics_add(self,value);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Statistics, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Statistics_add" "', argument " "1"" of type '" "Statistics *""'"); 
    }
    arg1 = reinterpret_cast< Statistics * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Statistics_add" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        (arg1)->add(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Statistics_add__SWIG_2) {
  {
    Statistics *arg1 = (Statistics *) 0 ;
    std::vector< Real > *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    std::vector< double > temp2 ;
    std::vector< double > *v2 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Statistics_add(self,values);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Statistics, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Statistics_add" "', argument " "1"" of type '" "Statistics *""'"); 
    }
    arg1 = reinterpret_cast< Statistics * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of Statistics_add. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp2.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "Statistics_add. "
              "Expected an array of ""double");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of Statistics_add. "
          "Expected an array of ""double");
      }
    }
    {
      try {
        Statistics_add__SWIG_2(arg1,(std::vector< double > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Statistics_add__SWIG_3) {
  {
    Statistics *arg1 = (Statistics *) 0 ;
    std::vector< Real > *arg2 = 0 ;
    std::vector< Real > *arg3 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    std::vector< double > temp2 ;
    std::vector< double > *v2 ;
    std::vector< double > temp3 ;
    std::vector< double > *v3 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: Statistics_add(self,values,weights);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Statistics, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Statistics_add" "', argument " "1"" of type '" "Statistics *""'"); 
    }
    arg1 = reinterpret_cast< Statistics * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of Statistics_add. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp2.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "Statistics_add. "
              "Expected an array of ""double");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of Statistics_add. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of Statistics_add. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp3.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 3 of "
              "Statistics_add. "
              "Expected an array of ""double");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of Statistics_add. "
          "Expected an array of ""double");
      }
    }
    {
      try {
        Statistics_add__SWIG_3(arg1,(std::vector< double > const &)*arg2,(std::vector< double > const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Statistics_add) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Statistics, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Statistics, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Statistics, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Statistics, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Statistics_add__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Statistics_add__SWIG_2); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Statistics_add__SWIG_0); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Statistics_add__SWIG_3); return;
    }
  }
  
  croak("No matching function for overloaded 'Statistics_add'");
  XSRETURN(0);
}


XS(_wrap_new_Statistics) {
  {
    int argvi = 0;
    Statistics *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Statistics();");
    }
    {
      try {
        result = (Statistics *)new Statistics();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Statistics, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_Statistics) {
  {
    Statistics *arg1 = (Statistics *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Statistics(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Statistics, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Statistics" "', argument " "1"" of type '" "Statistics *""'"); 
    }
    arg1 = reinterpret_cast< Statistics * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_IncrementalStatistics_samples) {
  {
    IncrementalStatistics *arg1 = (IncrementalStatistics *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Size result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: IncrementalStatistics_samples(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_IncrementalStatistics, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IncrementalStatistics_samples" "', argument " "1"" of type '" "IncrementalStatistics const *""'"); 
    }
    arg1 = reinterpret_cast< IncrementalStatistics * >(argp1);
    {
      try {
        result = ((IncrementalStatistics const *)arg1)->samples();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_size_t  SWIG_PERL_CALL_ARGS_1(static_cast< size_t >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_IncrementalStatistics_weightSum) {
  {
    IncrementalStatistics *arg1 = (IncrementalStatistics *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: IncrementalStatistics_weightSum(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_IncrementalStatistics, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IncrementalStatistics_weightSum" "', argument " "1"" of type '" "IncrementalStatistics const *""'"); 
    }
    arg1 = reinterpret_cast< IncrementalStatistics * >(argp1);
    {
      try {
        result = (Real)((IncrementalStatistics const *)arg1)->weightSum();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_IncrementalStatistics_mean) {
  {
    IncrementalStatistics *arg1 = (IncrementalStatistics *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: IncrementalStatistics_mean(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_IncrementalStatistics, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IncrementalStatistics_mean" "', argument " "1"" of type '" "IncrementalStatistics const *""'"); 
    }
    arg1 = reinterpret_cast< IncrementalStatistics * >(argp1);
    {
      try {
        result = (Real)((IncrementalStatistics const *)arg1)->mean();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_IncrementalStatistics_variance) {
  {
    IncrementalStatistics *arg1 = (IncrementalStatistics *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: IncrementalStatistics_variance(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_IncrementalStatistics, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IncrementalStatistics_variance" "', argument " "1"" of type '" "IncrementalStatistics const *""'"); 
    }
    arg1 = reinterpret_cast< IncrementalStatistics * >(argp1);
    {
      try {
        result = (Real)((IncrementalStatistics const *)arg1)->variance();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_IncrementalStatistics_standardDeviation) {
  {
    IncrementalStatistics *arg1 = (IncrementalStatistics *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: IncrementalStatistics_standardDeviation(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_IncrementalStatistics, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IncrementalStatistics_standardDeviation" "', argument " "1"" of type '" "IncrementalStatistics const *""'"); 
    }
    arg1 = reinterpret_cast< IncrementalStatistics * >(argp1);
    {
      try {
        result = (Real)((IncrementalStatistics const *)arg1)->standardDeviation();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_IncrementalStatistics_errorEstimate) {
  {
    IncrementalStatistics *arg1 = (IncrementalStatistics *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: IncrementalStatistics_errorEstimate(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_IncrementalStatistics, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IncrementalStatistics_errorEstimate" "', argument " "1"" of type '" "IncrementalStatistics const *""'"); 
    }
    arg1 = reinterpret_cast< IncrementalStatistics * >(argp1);
    {
      try {
        result = (Real)((IncrementalStatistics const *)arg1)->errorEstimate();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_IncrementalStatistics_skewness) {
  {
    IncrementalStatistics *arg1 = (IncrementalStatistics *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: IncrementalStatistics_skewness(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_IncrementalStatistics, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IncrementalStatistics_skewness" "', argument " "1"" of type '" "IncrementalStatistics const *""'"); 
    }
    arg1 = reinterpret_cast< IncrementalStatistics * >(argp1);
    {
      try {
        result = (Real)((IncrementalStatistics const *)arg1)->skewness();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_IncrementalStatistics_kurtosis) {
  {
    IncrementalStatistics *arg1 = (IncrementalStatistics *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: IncrementalStatistics_kurtosis(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_IncrementalStatistics, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IncrementalStatistics_kurtosis" "', argument " "1"" of type '" "IncrementalStatistics const *""'"); 
    }
    arg1 = reinterpret_cast< IncrementalStatistics * >(argp1);
    {
      try {
        result = (Real)((IncrementalStatistics const *)arg1)->kurtosis();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_IncrementalStatistics_min) {
  {
    IncrementalStatistics *arg1 = (IncrementalStatistics *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: IncrementalStatistics_min(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_IncrementalStatistics, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IncrementalStatistics_min" "', argument " "1"" of type '" "IncrementalStatistics const *""'"); 
    }
    arg1 = reinterpret_cast< IncrementalStatistics * >(argp1);
    {
      try {
        result = (Real)((IncrementalStatistics const *)arg1)->min();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_IncrementalStatistics_max) {
  {
    IncrementalStatistics *arg1 = (IncrementalStatistics *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: IncrementalStatistics_max(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_IncrementalStatistics, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IncrementalStatistics_max" "', argument " "1"" of type '" "IncrementalStatistics const *""'"); 
    }
    arg1 = reinterpret_cast< IncrementalStatistics * >(argp1);
    {
      try {
        result = (Real)((IncrementalStatistics const *)arg1)->max();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_IncrementalStatistics_reset) {
  {
    IncrementalStatistics *arg1 = (IncrementalStatistics *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: IncrementalStatistics_reset(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_IncrementalStatistics, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IncrementalStatistics_reset" "', argument " "1"" of type '" "IncrementalStatistics *""'"); 
    }
    arg1 = reinterpret_cast< IncrementalStatistics * >(argp1);
    {
      try {
        (arg1)->reset();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_IncrementalStatistics_add__SWIG_0) {
  {
    IncrementalStatistics *arg1 = (IncrementalStatistics *) 0 ;
    Real arg2 ;
    Real arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: IncrementalStatistics_add(self,value,weight);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_IncrementalStatistics, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IncrementalStatistics_add" "', argument " "1"" of type '" "IncrementalStatistics *""'"); 
    }
    arg1 = reinterpret_cast< IncrementalStatistics * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IncrementalStatistics_add" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IncrementalStatistics_add" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    {
      try {
        (arg1)->add(arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_IncrementalStatistics_add__SWIG_1) {
  {
    IncrementalStatistics *arg1 = (IncrementalStatistics *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: IncrementalStatistics_add(self,value);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_IncrementalStatistics, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IncrementalStatistics_add" "', argument " "1"" of type '" "IncrementalStatistics *""'"); 
    }
    arg1 = reinterpret_cast< IncrementalStatistics * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IncrementalStatistics_add" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        (arg1)->add(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_IncrementalStatistics_add__SWIG_2) {
  {
    IncrementalStatistics *arg1 = (IncrementalStatistics *) 0 ;
    std::vector< Real > *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    std::vector< double > temp2 ;
    std::vector< double > *v2 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: IncrementalStatistics_add(self,values);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_IncrementalStatistics, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IncrementalStatistics_add" "', argument " "1"" of type '" "IncrementalStatistics *""'"); 
    }
    arg1 = reinterpret_cast< IncrementalStatistics * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of IncrementalStatistics_add. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp2.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "IncrementalStatistics_add. "
              "Expected an array of ""double");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of IncrementalStatistics_add. "
          "Expected an array of ""double");
      }
    }
    {
      try {
        IncrementalStatistics_add__SWIG_2(arg1,(std::vector< double > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_IncrementalStatistics_add__SWIG_3) {
  {
    IncrementalStatistics *arg1 = (IncrementalStatistics *) 0 ;
    std::vector< Real > *arg2 = 0 ;
    std::vector< Real > *arg3 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    std::vector< double > temp2 ;
    std::vector< double > *v2 ;
    std::vector< double > temp3 ;
    std::vector< double > *v3 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: IncrementalStatistics_add(self,values,weights);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_IncrementalStatistics, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IncrementalStatistics_add" "', argument " "1"" of type '" "IncrementalStatistics *""'"); 
    }
    arg1 = reinterpret_cast< IncrementalStatistics * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of IncrementalStatistics_add. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp2.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "IncrementalStatistics_add. "
              "Expected an array of ""double");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of IncrementalStatistics_add. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(2),(void **) &v3, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg3 = v3;
      } else if (SvROK(ST(2))) {
        AV *av = (AV *)SvRV(ST(2));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 3 of IncrementalStatistics_add. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp3.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 3 of "
              "IncrementalStatistics_add. "
              "Expected an array of ""double");
          }
        }
        arg3 = &temp3;
      } else {
        SWIG_croak("Type error in argument 3 of IncrementalStatistics_add. "
          "Expected an array of ""double");
      }
    }
    {
      try {
        IncrementalStatistics_add__SWIG_3(arg1,(std::vector< double > const &)*arg2,(std::vector< double > const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_IncrementalStatistics_add) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_IncrementalStatistics, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_IncrementalStatistics, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_IncrementalStatistics, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_IncrementalStatistics, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(2),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(2))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(2));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_IncrementalStatistics_add__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_IncrementalStatistics_add__SWIG_2); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_IncrementalStatistics_add__SWIG_0); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_IncrementalStatistics_add__SWIG_3); return;
    }
  }
  
  croak("No matching function for overloaded 'IncrementalStatistics_add'");
  XSRETURN(0);
}


XS(_wrap_new_IncrementalStatistics) {
  {
    int argvi = 0;
    IncrementalStatistics *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_IncrementalStatistics();");
    }
    {
      try {
        result = (IncrementalStatistics *)new IncrementalStatistics();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IncrementalStatistics, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_IncrementalStatistics) {
  {
    IncrementalStatistics *arg1 = (IncrementalStatistics *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_IncrementalStatistics(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_IncrementalStatistics, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IncrementalStatistics" "', argument " "1"" of type '" "IncrementalStatistics *""'"); 
    }
    arg1 = reinterpret_cast< IncrementalStatistics * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_RiskStatistics_semiVariance) {
  {
    RiskStatistics *arg1 = (RiskStatistics *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: RiskStatistics_semiVariance(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_RiskStatistics, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RiskStatistics_semiVariance" "', argument " "1"" of type '" "RiskStatistics const *""'"); 
    }
    arg1 = reinterpret_cast< RiskStatistics * >(argp1);
    {
      try {
        result = (Real)((RiskStatistics const *)arg1)->semiVariance();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_RiskStatistics_semiDeviation) {
  {
    RiskStatistics *arg1 = (RiskStatistics *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: RiskStatistics_semiDeviation(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_RiskStatistics, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RiskStatistics_semiDeviation" "', argument " "1"" of type '" "RiskStatistics const *""'"); 
    }
    arg1 = reinterpret_cast< RiskStatistics * >(argp1);
    {
      try {
        result = (Real)((RiskStatistics const *)arg1)->semiDeviation();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_RiskStatistics_downsideVariance) {
  {
    RiskStatistics *arg1 = (RiskStatistics *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: RiskStatistics_downsideVariance(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_RiskStatistics, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RiskStatistics_downsideVariance" "', argument " "1"" of type '" "RiskStatistics const *""'"); 
    }
    arg1 = reinterpret_cast< RiskStatistics * >(argp1);
    {
      try {
        result = (Real)((RiskStatistics const *)arg1)->downsideVariance();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_RiskStatistics_downsideDeviation) {
  {
    RiskStatistics *arg1 = (RiskStatistics *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: RiskStatistics_downsideDeviation(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_RiskStatistics, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RiskStatistics_downsideDeviation" "', argument " "1"" of type '" "RiskStatistics const *""'"); 
    }
    arg1 = reinterpret_cast< RiskStatistics * >(argp1);
    {
      try {
        result = (Real)((RiskStatistics const *)arg1)->downsideDeviation();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_RiskStatistics_regret) {
  {
    RiskStatistics *arg1 = (RiskStatistics *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: RiskStatistics_regret(self,target);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_RiskStatistics, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RiskStatistics_regret" "', argument " "1"" of type '" "RiskStatistics const *""'"); 
    }
    arg1 = reinterpret_cast< RiskStatistics * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RiskStatistics_regret" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (Real)((RiskStatistics const *)arg1)->regret(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_RiskStatistics_potentialUpside) {
  {
    RiskStatistics *arg1 = (RiskStatistics *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: RiskStatistics_potentialUpside(self,percentile);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_RiskStatistics, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RiskStatistics_potentialUpside" "', argument " "1"" of type '" "RiskStatistics const *""'"); 
    }
    arg1 = reinterpret_cast< RiskStatistics * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RiskStatistics_potentialUpside" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (Real)((RiskStatistics const *)arg1)->potentialUpside(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_RiskStatistics_valueAtRisk) {
  {
    RiskStatistics *arg1 = (RiskStatistics *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: RiskStatistics_valueAtRisk(self,percentile);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_RiskStatistics, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RiskStatistics_valueAtRisk" "', argument " "1"" of type '" "RiskStatistics const *""'"); 
    }
    arg1 = reinterpret_cast< RiskStatistics * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RiskStatistics_valueAtRisk" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (Real)((RiskStatistics const *)arg1)->valueAtRisk(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_RiskStatistics_expectedShortfall) {
  {
    RiskStatistics *arg1 = (RiskStatistics *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: RiskStatistics_expectedShortfall(self,percentile);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_RiskStatistics, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RiskStatistics_expectedShortfall" "', argument " "1"" of type '" "RiskStatistics const *""'"); 
    }
    arg1 = reinterpret_cast< RiskStatistics * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RiskStatistics_expectedShortfall" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (Real)((RiskStatistics const *)arg1)->expectedShortfall(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_RiskStatistics_shortfall) {
  {
    RiskStatistics *arg1 = (RiskStatistics *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: RiskStatistics_shortfall(self,target);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_RiskStatistics, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RiskStatistics_shortfall" "', argument " "1"" of type '" "RiskStatistics const *""'"); 
    }
    arg1 = reinterpret_cast< RiskStatistics * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RiskStatistics_shortfall" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (Real)((RiskStatistics const *)arg1)->shortfall(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_RiskStatistics_averageShortfall) {
  {
    RiskStatistics *arg1 = (RiskStatistics *) 0 ;
    Real arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: RiskStatistics_averageShortfall(self,target);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_RiskStatistics, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RiskStatistics_averageShortfall" "', argument " "1"" of type '" "RiskStatistics const *""'"); 
    }
    arg1 = reinterpret_cast< RiskStatistics * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RiskStatistics_averageShortfall" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (Real)((RiskStatistics const *)arg1)->averageShortfall(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_RiskStatistics) {
  {
    int argvi = 0;
    RiskStatistics *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_RiskStatistics();");
    }
    {
      try {
        result = (RiskStatistics *)new RiskStatistics();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_RiskStatistics, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_RiskStatistics) {
  {
    RiskStatistics *arg1 = (RiskStatistics *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_RiskStatistics(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_RiskStatistics, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_RiskStatistics" "', argument " "1"" of type '" "RiskStatistics *""'"); 
    }
    arg1 = reinterpret_cast< RiskStatistics * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MultipleStatistics) {
  {
    Size arg1 ;
    size_t val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    GenericSequenceStatistics< Statistics > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_MultipleStatistics(dimension);");
    }
    ecode1 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_MultipleStatistics" "', argument " "1"" of type '" "Size""'");
    } 
    arg1 = static_cast< Size >(val1);
    {
      try {
        result = (GenericSequenceStatistics< Statistics > *)new GenericSequenceStatistics< Statistics >(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GenericSequenceStatisticsT_Statistics_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MultipleStatistics_size) {
  {
    GenericSequenceStatistics< Statistics > *arg1 = (GenericSequenceStatistics< Statistics > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Size result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MultipleStatistics_size(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GenericSequenceStatisticsT_Statistics_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultipleStatistics_size" "', argument " "1"" of type '" "GenericSequenceStatistics< Statistics > const *""'"); 
    }
    arg1 = reinterpret_cast< GenericSequenceStatistics< Statistics > * >(argp1);
    {
      try {
        result = ((GenericSequenceStatistics< Statistics > const *)arg1)->size();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_size_t  SWIG_PERL_CALL_ARGS_1(static_cast< size_t >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MultipleStatistics_samples) {
  {
    GenericSequenceStatistics< Statistics > *arg1 = (GenericSequenceStatistics< Statistics > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Size result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MultipleStatistics_samples(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GenericSequenceStatisticsT_Statistics_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultipleStatistics_samples" "', argument " "1"" of type '" "GenericSequenceStatistics< Statistics > const *""'"); 
    }
    arg1 = reinterpret_cast< GenericSequenceStatistics< Statistics > * >(argp1);
    {
      try {
        result = ((GenericSequenceStatistics< Statistics > const *)arg1)->samples();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_size_t  SWIG_PERL_CALL_ARGS_1(static_cast< size_t >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MultipleStatistics_weightSum) {
  {
    GenericSequenceStatistics< Statistics > *arg1 = (GenericSequenceStatistics< Statistics > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MultipleStatistics_weightSum(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GenericSequenceStatisticsT_Statistics_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultipleStatistics_weightSum" "', argument " "1"" of type '" "GenericSequenceStatistics< Statistics > const *""'"); 
    }
    arg1 = reinterpret_cast< GenericSequenceStatistics< Statistics > * >(argp1);
    {
      try {
        result = (Real)((GenericSequenceStatistics< Statistics > const *)arg1)->weightSum();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MultipleStatistics_mean) {
  {
    GenericSequenceStatistics< Statistics > *arg1 = (GenericSequenceStatistics< Statistics > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Real > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MultipleStatistics_mean(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GenericSequenceStatisticsT_Statistics_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultipleStatistics_mean" "', argument " "1"" of type '" "GenericSequenceStatistics< Statistics > const *""'"); 
    }
    arg1 = reinterpret_cast< GenericSequenceStatistics< Statistics > * >(argp1);
    {
      try {
        result = ((GenericSequenceStatistics< Statistics > const *)arg1)->mean();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        svs[i] = sv_newmortal();
        sv_setnv(svs[i], result[i]);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MultipleStatistics_variance) {
  {
    GenericSequenceStatistics< Statistics > *arg1 = (GenericSequenceStatistics< Statistics > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Real > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MultipleStatistics_variance(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GenericSequenceStatisticsT_Statistics_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultipleStatistics_variance" "', argument " "1"" of type '" "GenericSequenceStatistics< Statistics > const *""'"); 
    }
    arg1 = reinterpret_cast< GenericSequenceStatistics< Statistics > * >(argp1);
    {
      try {
        result = ((GenericSequenceStatistics< Statistics > const *)arg1)->variance();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        svs[i] = sv_newmortal();
        sv_setnv(svs[i], result[i]);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MultipleStatistics_standardDeviation) {
  {
    GenericSequenceStatistics< Statistics > *arg1 = (GenericSequenceStatistics< Statistics > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Real > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MultipleStatistics_standardDeviation(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GenericSequenceStatisticsT_Statistics_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultipleStatistics_standardDeviation" "', argument " "1"" of type '" "GenericSequenceStatistics< Statistics > const *""'"); 
    }
    arg1 = reinterpret_cast< GenericSequenceStatistics< Statistics > * >(argp1);
    {
      try {
        result = ((GenericSequenceStatistics< Statistics > const *)arg1)->standardDeviation();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        svs[i] = sv_newmortal();
        sv_setnv(svs[i], result[i]);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MultipleStatistics_errorEstimate) {
  {
    GenericSequenceStatistics< Statistics > *arg1 = (GenericSequenceStatistics< Statistics > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Real > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MultipleStatistics_errorEstimate(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GenericSequenceStatisticsT_Statistics_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultipleStatistics_errorEstimate" "', argument " "1"" of type '" "GenericSequenceStatistics< Statistics > const *""'"); 
    }
    arg1 = reinterpret_cast< GenericSequenceStatistics< Statistics > * >(argp1);
    {
      try {
        result = ((GenericSequenceStatistics< Statistics > const *)arg1)->errorEstimate();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        svs[i] = sv_newmortal();
        sv_setnv(svs[i], result[i]);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MultipleStatistics_skewness) {
  {
    GenericSequenceStatistics< Statistics > *arg1 = (GenericSequenceStatistics< Statistics > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Real > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MultipleStatistics_skewness(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GenericSequenceStatisticsT_Statistics_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultipleStatistics_skewness" "', argument " "1"" of type '" "GenericSequenceStatistics< Statistics > const *""'"); 
    }
    arg1 = reinterpret_cast< GenericSequenceStatistics< Statistics > * >(argp1);
    {
      try {
        result = ((GenericSequenceStatistics< Statistics > const *)arg1)->skewness();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        svs[i] = sv_newmortal();
        sv_setnv(svs[i], result[i]);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MultipleStatistics_kurtosis) {
  {
    GenericSequenceStatistics< Statistics > *arg1 = (GenericSequenceStatistics< Statistics > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Real > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MultipleStatistics_kurtosis(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GenericSequenceStatisticsT_Statistics_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultipleStatistics_kurtosis" "', argument " "1"" of type '" "GenericSequenceStatistics< Statistics > const *""'"); 
    }
    arg1 = reinterpret_cast< GenericSequenceStatistics< Statistics > * >(argp1);
    {
      try {
        result = ((GenericSequenceStatistics< Statistics > const *)arg1)->kurtosis();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        svs[i] = sv_newmortal();
        sv_setnv(svs[i], result[i]);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MultipleStatistics_min) {
  {
    GenericSequenceStatistics< Statistics > *arg1 = (GenericSequenceStatistics< Statistics > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Real > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MultipleStatistics_min(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GenericSequenceStatisticsT_Statistics_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultipleStatistics_min" "', argument " "1"" of type '" "GenericSequenceStatistics< Statistics > const *""'"); 
    }
    arg1 = reinterpret_cast< GenericSequenceStatistics< Statistics > * >(argp1);
    {
      try {
        result = ((GenericSequenceStatistics< Statistics > const *)arg1)->min();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        svs[i] = sv_newmortal();
        sv_setnv(svs[i], result[i]);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MultipleStatistics_max) {
  {
    GenericSequenceStatistics< Statistics > *arg1 = (GenericSequenceStatistics< Statistics > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Real > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MultipleStatistics_max(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GenericSequenceStatisticsT_Statistics_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultipleStatistics_max" "', argument " "1"" of type '" "GenericSequenceStatistics< Statistics > const *""'"); 
    }
    arg1 = reinterpret_cast< GenericSequenceStatistics< Statistics > * >(argp1);
    {
      try {
        result = ((GenericSequenceStatistics< Statistics > const *)arg1)->max();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        svs[i] = sv_newmortal();
        sv_setnv(svs[i], result[i]);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MultipleStatistics_covariance) {
  {
    GenericSequenceStatistics< Statistics > *arg1 = (GenericSequenceStatistics< Statistics > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Matrix result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MultipleStatistics_covariance(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GenericSequenceStatisticsT_Statistics_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultipleStatistics_covariance" "', argument " "1"" of type '" "GenericSequenceStatistics< Statistics > const *""'"); 
    }
    arg1 = reinterpret_cast< GenericSequenceStatistics< Statistics > * >(argp1);
    {
      try {
        result = ((GenericSequenceStatistics< Statistics > const *)arg1)->covariance();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Matrix(static_cast< const Matrix& >(result))), SWIGTYPE_p_Matrix, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MultipleStatistics_correlation) {
  {
    GenericSequenceStatistics< Statistics > *arg1 = (GenericSequenceStatistics< Statistics > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Matrix result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MultipleStatistics_correlation(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GenericSequenceStatisticsT_Statistics_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultipleStatistics_correlation" "', argument " "1"" of type '" "GenericSequenceStatistics< Statistics > const *""'"); 
    }
    arg1 = reinterpret_cast< GenericSequenceStatistics< Statistics > * >(argp1);
    {
      try {
        result = ((GenericSequenceStatistics< Statistics > const *)arg1)->correlation();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Matrix(static_cast< const Matrix& >(result))), SWIGTYPE_p_Matrix, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MultipleStatistics_reset) {
  {
    GenericSequenceStatistics< Statistics > *arg1 = (GenericSequenceStatistics< Statistics > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MultipleStatistics_reset(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GenericSequenceStatisticsT_Statistics_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultipleStatistics_reset" "', argument " "1"" of type '" "GenericSequenceStatistics< Statistics > *""'"); 
    }
    arg1 = reinterpret_cast< GenericSequenceStatistics< Statistics > * >(argp1);
    {
      try {
        (arg1)->reset();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MultipleStatistics_add__SWIG_0) {
  {
    GenericSequenceStatistics< Statistics > *arg1 = (GenericSequenceStatistics< Statistics > *) 0 ;
    std::vector< Real > *arg2 = 0 ;
    Real arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    std::vector< double > temp2 ;
    std::vector< double > *v2 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: MultipleStatistics_add(self,value,weight);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GenericSequenceStatisticsT_Statistics_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultipleStatistics_add" "', argument " "1"" of type '" "GenericSequenceStatistics< Statistics > *""'"); 
    }
    arg1 = reinterpret_cast< GenericSequenceStatistics< Statistics > * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of MultipleStatistics_add. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp2.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "MultipleStatistics_add. "
              "Expected an array of ""double");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of MultipleStatistics_add. "
          "Expected an array of ""double");
      }
    }
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MultipleStatistics_add" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    {
      try {
        (arg1)->add((std::vector< Real > const &)*arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_MultipleStatistics_add__SWIG_1) {
  {
    GenericSequenceStatistics< Statistics > *arg1 = (GenericSequenceStatistics< Statistics > *) 0 ;
    std::vector< Real > *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    std::vector< double > temp2 ;
    std::vector< double > *v2 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: MultipleStatistics_add(self,value);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GenericSequenceStatisticsT_Statistics_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultipleStatistics_add" "', argument " "1"" of type '" "GenericSequenceStatistics< Statistics > *""'"); 
    }
    arg1 = reinterpret_cast< GenericSequenceStatistics< Statistics > * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of MultipleStatistics_add. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp2.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "MultipleStatistics_add. "
              "Expected an array of ""double");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of MultipleStatistics_add. "
          "Expected an array of ""double");
      }
    }
    {
      try {
        (arg1)->add((std::vector< Real > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_MultipleStatistics_add__SWIG_2) {
  {
    GenericSequenceStatistics< Statistics > *arg1 = (GenericSequenceStatistics< Statistics > *) 0 ;
    Array *arg2 = 0 ;
    Real arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: MultipleStatistics_add(self,value,weight);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GenericSequenceStatisticsT_Statistics_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultipleStatistics_add" "', argument " "1"" of type '" "GenericSequenceStatistics< Statistics > *""'"); 
    }
    arg1 = reinterpret_cast< GenericSequenceStatistics< Statistics > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MultipleStatistics_add" "', argument " "2"" of type '" "Array const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MultipleStatistics_add" "', argument " "2"" of type '" "Array const &""'"); 
    }
    arg2 = reinterpret_cast< Array * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MultipleStatistics_add" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    {
      try {
        (arg1)->add((Array const &)*arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_MultipleStatistics_add__SWIG_3) {
  {
    GenericSequenceStatistics< Statistics > *arg1 = (GenericSequenceStatistics< Statistics > *) 0 ;
    Array *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: MultipleStatistics_add(self,value);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GenericSequenceStatisticsT_Statistics_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultipleStatistics_add" "', argument " "1"" of type '" "GenericSequenceStatistics< Statistics > *""'"); 
    }
    arg1 = reinterpret_cast< GenericSequenceStatistics< Statistics > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MultipleStatistics_add" "', argument " "2"" of type '" "Array const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MultipleStatistics_add" "', argument " "2"" of type '" "Array const &""'"); 
    }
    arg2 = reinterpret_cast< Array * >(argp2);
    {
      try {
        (arg1)->add((Array const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_MultipleStatistics_add) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GenericSequenceStatisticsT_Statistics_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Array, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GenericSequenceStatisticsT_Statistics_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GenericSequenceStatisticsT_Statistics_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Array, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GenericSequenceStatisticsT_Statistics_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_MultipleStatistics_add__SWIG_3); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_MultipleStatistics_add__SWIG_1); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_MultipleStatistics_add__SWIG_2); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_MultipleStatistics_add__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'MultipleStatistics_add'");
  XSRETURN(0);
}


XS(_wrap_delete_MultipleStatistics) {
  {
    GenericSequenceStatistics< Statistics > *arg1 = (GenericSequenceStatistics< Statistics > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_MultipleStatistics(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GenericSequenceStatisticsT_Statistics_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MultipleStatistics" "', argument " "1"" of type '" "GenericSequenceStatistics< Statistics > *""'"); 
    }
    arg1 = reinterpret_cast< GenericSequenceStatistics< Statistics > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SequenceStatistics) {
  {
    Size arg1 ;
    size_t val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    GenericSequenceStatistics< RiskStatistics > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_SequenceStatistics(dimension);");
    }
    ecode1 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_SequenceStatistics" "', argument " "1"" of type '" "Size""'");
    } 
    arg1 = static_cast< Size >(val1);
    {
      try {
        result = (GenericSequenceStatistics< RiskStatistics > *)new GenericSequenceStatistics< RiskStatistics >(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GenericSequenceStatisticsT_RiskStatistics_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_SequenceStatistics_size) {
  {
    GenericSequenceStatistics< RiskStatistics > *arg1 = (GenericSequenceStatistics< RiskStatistics > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Size result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: SequenceStatistics_size(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GenericSequenceStatisticsT_RiskStatistics_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SequenceStatistics_size" "', argument " "1"" of type '" "GenericSequenceStatistics< RiskStatistics > const *""'"); 
    }
    arg1 = reinterpret_cast< GenericSequenceStatistics< RiskStatistics > * >(argp1);
    {
      try {
        result = ((GenericSequenceStatistics< RiskStatistics > const *)arg1)->size();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_size_t  SWIG_PERL_CALL_ARGS_1(static_cast< size_t >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_SequenceStatistics_samples) {
  {
    GenericSequenceStatistics< RiskStatistics > *arg1 = (GenericSequenceStatistics< RiskStatistics > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Size result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: SequenceStatistics_samples(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GenericSequenceStatisticsT_RiskStatistics_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SequenceStatistics_samples" "', argument " "1"" of type '" "GenericSequenceStatistics< RiskStatistics > const *""'"); 
    }
    arg1 = reinterpret_cast< GenericSequenceStatistics< RiskStatistics > * >(argp1);
    {
      try {
        result = ((GenericSequenceStatistics< RiskStatistics > const *)arg1)->samples();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_size_t  SWIG_PERL_CALL_ARGS_1(static_cast< size_t >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_SequenceStatistics_weightSum) {
  {
    GenericSequenceStatistics< RiskStatistics > *arg1 = (GenericSequenceStatistics< RiskStatistics > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: SequenceStatistics_weightSum(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GenericSequenceStatisticsT_RiskStatistics_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SequenceStatistics_weightSum" "', argument " "1"" of type '" "GenericSequenceStatistics< RiskStatistics > const *""'"); 
    }
    arg1 = reinterpret_cast< GenericSequenceStatistics< RiskStatistics > * >(argp1);
    {
      try {
        result = (Real)((GenericSequenceStatistics< RiskStatistics > const *)arg1)->weightSum();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_SequenceStatistics_mean) {
  {
    GenericSequenceStatistics< RiskStatistics > *arg1 = (GenericSequenceStatistics< RiskStatistics > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Real > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: SequenceStatistics_mean(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GenericSequenceStatisticsT_RiskStatistics_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SequenceStatistics_mean" "', argument " "1"" of type '" "GenericSequenceStatistics< RiskStatistics > const *""'"); 
    }
    arg1 = reinterpret_cast< GenericSequenceStatistics< RiskStatistics > * >(argp1);
    {
      try {
        result = ((GenericSequenceStatistics< RiskStatistics > const *)arg1)->mean();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        svs[i] = sv_newmortal();
        sv_setnv(svs[i], result[i]);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_SequenceStatistics_variance) {
  {
    GenericSequenceStatistics< RiskStatistics > *arg1 = (GenericSequenceStatistics< RiskStatistics > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Real > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: SequenceStatistics_variance(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GenericSequenceStatisticsT_RiskStatistics_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SequenceStatistics_variance" "', argument " "1"" of type '" "GenericSequenceStatistics< RiskStatistics > const *""'"); 
    }
    arg1 = reinterpret_cast< GenericSequenceStatistics< RiskStatistics > * >(argp1);
    {
      try {
        result = ((GenericSequenceStatistics< RiskStatistics > const *)arg1)->variance();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        svs[i] = sv_newmortal();
        sv_setnv(svs[i], result[i]);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_SequenceStatistics_standardDeviation) {
  {
    GenericSequenceStatistics< RiskStatistics > *arg1 = (GenericSequenceStatistics< RiskStatistics > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Real > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: SequenceStatistics_standardDeviation(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GenericSequenceStatisticsT_RiskStatistics_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SequenceStatistics_standardDeviation" "', argument " "1"" of type '" "GenericSequenceStatistics< RiskStatistics > const *""'"); 
    }
    arg1 = reinterpret_cast< GenericSequenceStatistics< RiskStatistics > * >(argp1);
    {
      try {
        result = ((GenericSequenceStatistics< RiskStatistics > const *)arg1)->standardDeviation();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        svs[i] = sv_newmortal();
        sv_setnv(svs[i], result[i]);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_SequenceStatistics_errorEstimate) {
  {
    GenericSequenceStatistics< RiskStatistics > *arg1 = (GenericSequenceStatistics< RiskStatistics > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Real > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: SequenceStatistics_errorEstimate(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GenericSequenceStatisticsT_RiskStatistics_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SequenceStatistics_errorEstimate" "', argument " "1"" of type '" "GenericSequenceStatistics< RiskStatistics > const *""'"); 
    }
    arg1 = reinterpret_cast< GenericSequenceStatistics< RiskStatistics > * >(argp1);
    {
      try {
        result = ((GenericSequenceStatistics< RiskStatistics > const *)arg1)->errorEstimate();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        svs[i] = sv_newmortal();
        sv_setnv(svs[i], result[i]);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_SequenceStatistics_skewness) {
  {
    GenericSequenceStatistics< RiskStatistics > *arg1 = (GenericSequenceStatistics< RiskStatistics > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Real > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: SequenceStatistics_skewness(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GenericSequenceStatisticsT_RiskStatistics_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SequenceStatistics_skewness" "', argument " "1"" of type '" "GenericSequenceStatistics< RiskStatistics > const *""'"); 
    }
    arg1 = reinterpret_cast< GenericSequenceStatistics< RiskStatistics > * >(argp1);
    {
      try {
        result = ((GenericSequenceStatistics< RiskStatistics > const *)arg1)->skewness();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        svs[i] = sv_newmortal();
        sv_setnv(svs[i], result[i]);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_SequenceStatistics_kurtosis) {
  {
    GenericSequenceStatistics< RiskStatistics > *arg1 = (GenericSequenceStatistics< RiskStatistics > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Real > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: SequenceStatistics_kurtosis(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GenericSequenceStatisticsT_RiskStatistics_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SequenceStatistics_kurtosis" "', argument " "1"" of type '" "GenericSequenceStatistics< RiskStatistics > const *""'"); 
    }
    arg1 = reinterpret_cast< GenericSequenceStatistics< RiskStatistics > * >(argp1);
    {
      try {
        result = ((GenericSequenceStatistics< RiskStatistics > const *)arg1)->kurtosis();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        svs[i] = sv_newmortal();
        sv_setnv(svs[i], result[i]);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_SequenceStatistics_min) {
  {
    GenericSequenceStatistics< RiskStatistics > *arg1 = (GenericSequenceStatistics< RiskStatistics > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Real > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: SequenceStatistics_min(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GenericSequenceStatisticsT_RiskStatistics_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SequenceStatistics_min" "', argument " "1"" of type '" "GenericSequenceStatistics< RiskStatistics > const *""'"); 
    }
    arg1 = reinterpret_cast< GenericSequenceStatistics< RiskStatistics > * >(argp1);
    {
      try {
        result = ((GenericSequenceStatistics< RiskStatistics > const *)arg1)->min();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        svs[i] = sv_newmortal();
        sv_setnv(svs[i], result[i]);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_SequenceStatistics_max) {
  {
    GenericSequenceStatistics< RiskStatistics > *arg1 = (GenericSequenceStatistics< RiskStatistics > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Real > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: SequenceStatistics_max(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GenericSequenceStatisticsT_RiskStatistics_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SequenceStatistics_max" "', argument " "1"" of type '" "GenericSequenceStatistics< RiskStatistics > const *""'"); 
    }
    arg1 = reinterpret_cast< GenericSequenceStatistics< RiskStatistics > * >(argp1);
    {
      try {
        result = ((GenericSequenceStatistics< RiskStatistics > const *)arg1)->max();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        svs[i] = sv_newmortal();
        sv_setnv(svs[i], result[i]);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_SequenceStatistics_covariance) {
  {
    GenericSequenceStatistics< RiskStatistics > *arg1 = (GenericSequenceStatistics< RiskStatistics > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Matrix result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: SequenceStatistics_covariance(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GenericSequenceStatisticsT_RiskStatistics_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SequenceStatistics_covariance" "', argument " "1"" of type '" "GenericSequenceStatistics< RiskStatistics > const *""'"); 
    }
    arg1 = reinterpret_cast< GenericSequenceStatistics< RiskStatistics > * >(argp1);
    {
      try {
        result = ((GenericSequenceStatistics< RiskStatistics > const *)arg1)->covariance();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Matrix(static_cast< const Matrix& >(result))), SWIGTYPE_p_Matrix, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_SequenceStatistics_correlation) {
  {
    GenericSequenceStatistics< RiskStatistics > *arg1 = (GenericSequenceStatistics< RiskStatistics > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Matrix result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: SequenceStatistics_correlation(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GenericSequenceStatisticsT_RiskStatistics_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SequenceStatistics_correlation" "', argument " "1"" of type '" "GenericSequenceStatistics< RiskStatistics > const *""'"); 
    }
    arg1 = reinterpret_cast< GenericSequenceStatistics< RiskStatistics > * >(argp1);
    {
      try {
        result = ((GenericSequenceStatistics< RiskStatistics > const *)arg1)->correlation();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Matrix(static_cast< const Matrix& >(result))), SWIGTYPE_p_Matrix, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_SequenceStatistics_reset) {
  {
    GenericSequenceStatistics< RiskStatistics > *arg1 = (GenericSequenceStatistics< RiskStatistics > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: SequenceStatistics_reset(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GenericSequenceStatisticsT_RiskStatistics_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SequenceStatistics_reset" "', argument " "1"" of type '" "GenericSequenceStatistics< RiskStatistics > *""'"); 
    }
    arg1 = reinterpret_cast< GenericSequenceStatistics< RiskStatistics > * >(argp1);
    {
      try {
        (arg1)->reset();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_SequenceStatistics_add__SWIG_0) {
  {
    GenericSequenceStatistics< RiskStatistics > *arg1 = (GenericSequenceStatistics< RiskStatistics > *) 0 ;
    std::vector< Real > *arg2 = 0 ;
    Real arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    std::vector< double > temp2 ;
    std::vector< double > *v2 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: SequenceStatistics_add(self,value,weight);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GenericSequenceStatisticsT_RiskStatistics_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SequenceStatistics_add" "', argument " "1"" of type '" "GenericSequenceStatistics< RiskStatistics > *""'"); 
    }
    arg1 = reinterpret_cast< GenericSequenceStatistics< RiskStatistics > * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of SequenceStatistics_add. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp2.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "SequenceStatistics_add. "
              "Expected an array of ""double");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of SequenceStatistics_add. "
          "Expected an array of ""double");
      }
    }
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SequenceStatistics_add" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    {
      try {
        (arg1)->add((std::vector< Real > const &)*arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_SequenceStatistics_add__SWIG_1) {
  {
    GenericSequenceStatistics< RiskStatistics > *arg1 = (GenericSequenceStatistics< RiskStatistics > *) 0 ;
    std::vector< Real > *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    std::vector< double > temp2 ;
    std::vector< double > *v2 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: SequenceStatistics_add(self,value);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GenericSequenceStatisticsT_RiskStatistics_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SequenceStatistics_add" "', argument " "1"" of type '" "GenericSequenceStatistics< RiskStatistics > *""'"); 
    }
    arg1 = reinterpret_cast< GenericSequenceStatistics< RiskStatistics > * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of SequenceStatistics_add. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp2.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "SequenceStatistics_add. "
              "Expected an array of ""double");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of SequenceStatistics_add. "
          "Expected an array of ""double");
      }
    }
    {
      try {
        (arg1)->add((std::vector< Real > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_SequenceStatistics_add__SWIG_2) {
  {
    GenericSequenceStatistics< RiskStatistics > *arg1 = (GenericSequenceStatistics< RiskStatistics > *) 0 ;
    Array *arg2 = 0 ;
    Real arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: SequenceStatistics_add(self,value,weight);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GenericSequenceStatisticsT_RiskStatistics_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SequenceStatistics_add" "', argument " "1"" of type '" "GenericSequenceStatistics< RiskStatistics > *""'"); 
    }
    arg1 = reinterpret_cast< GenericSequenceStatistics< RiskStatistics > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SequenceStatistics_add" "', argument " "2"" of type '" "Array const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SequenceStatistics_add" "', argument " "2"" of type '" "Array const &""'"); 
    }
    arg2 = reinterpret_cast< Array * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SequenceStatistics_add" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    {
      try {
        (arg1)->add((Array const &)*arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_SequenceStatistics_add__SWIG_3) {
  {
    GenericSequenceStatistics< RiskStatistics > *arg1 = (GenericSequenceStatistics< RiskStatistics > *) 0 ;
    Array *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: SequenceStatistics_add(self,value);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GenericSequenceStatisticsT_RiskStatistics_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SequenceStatistics_add" "', argument " "1"" of type '" "GenericSequenceStatistics< RiskStatistics > *""'"); 
    }
    arg1 = reinterpret_cast< GenericSequenceStatistics< RiskStatistics > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SequenceStatistics_add" "', argument " "2"" of type '" "Array const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SequenceStatistics_add" "', argument " "2"" of type '" "Array const &""'"); 
    }
    arg2 = reinterpret_cast< Array * >(argp2);
    {
      try {
        (arg1)->add((Array const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_SequenceStatistics_add) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GenericSequenceStatisticsT_RiskStatistics_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Array, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GenericSequenceStatisticsT_RiskStatistics_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GenericSequenceStatisticsT_RiskStatistics_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Array, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GenericSequenceStatisticsT_RiskStatistics_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_SequenceStatistics_add__SWIG_3); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_SequenceStatistics_add__SWIG_1); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_SequenceStatistics_add__SWIG_2); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_SequenceStatistics_add__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'SequenceStatistics_add'");
  XSRETURN(0);
}


XS(_wrap_delete_SequenceStatistics) {
  {
    GenericSequenceStatistics< RiskStatistics > *arg1 = (GenericSequenceStatistics< RiskStatistics > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_SequenceStatistics(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GenericSequenceStatisticsT_RiskStatistics_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SequenceStatistics" "', argument " "1"" of type '" "GenericSequenceStatistics< RiskStatistics > *""'"); 
    }
    arg1 = reinterpret_cast< GenericSequenceStatistics< RiskStatistics > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MultipleIncrementalStatistics) {
  {
    Size arg1 ;
    size_t val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    GenericSequenceStatistics< IncrementalStatistics > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_MultipleIncrementalStatistics(dimension);");
    }
    ecode1 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_MultipleIncrementalStatistics" "', argument " "1"" of type '" "Size""'");
    } 
    arg1 = static_cast< Size >(val1);
    {
      try {
        result = (GenericSequenceStatistics< IncrementalStatistics > *)new GenericSequenceStatistics< IncrementalStatistics >(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GenericSequenceStatisticsT_IncrementalStatistics_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MultipleIncrementalStatistics_size) {
  {
    GenericSequenceStatistics< IncrementalStatistics > *arg1 = (GenericSequenceStatistics< IncrementalStatistics > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Size result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MultipleIncrementalStatistics_size(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GenericSequenceStatisticsT_IncrementalStatistics_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultipleIncrementalStatistics_size" "', argument " "1"" of type '" "GenericSequenceStatistics< IncrementalStatistics > const *""'"); 
    }
    arg1 = reinterpret_cast< GenericSequenceStatistics< IncrementalStatistics > * >(argp1);
    {
      try {
        result = ((GenericSequenceStatistics< IncrementalStatistics > const *)arg1)->size();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_size_t  SWIG_PERL_CALL_ARGS_1(static_cast< size_t >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MultipleIncrementalStatistics_samples) {
  {
    GenericSequenceStatistics< IncrementalStatistics > *arg1 = (GenericSequenceStatistics< IncrementalStatistics > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Size result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MultipleIncrementalStatistics_samples(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GenericSequenceStatisticsT_IncrementalStatistics_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultipleIncrementalStatistics_samples" "', argument " "1"" of type '" "GenericSequenceStatistics< IncrementalStatistics > const *""'"); 
    }
    arg1 = reinterpret_cast< GenericSequenceStatistics< IncrementalStatistics > * >(argp1);
    {
      try {
        result = ((GenericSequenceStatistics< IncrementalStatistics > const *)arg1)->samples();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_size_t  SWIG_PERL_CALL_ARGS_1(static_cast< size_t >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MultipleIncrementalStatistics_weightSum) {
  {
    GenericSequenceStatistics< IncrementalStatistics > *arg1 = (GenericSequenceStatistics< IncrementalStatistics > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MultipleIncrementalStatistics_weightSum(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GenericSequenceStatisticsT_IncrementalStatistics_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultipleIncrementalStatistics_weightSum" "', argument " "1"" of type '" "GenericSequenceStatistics< IncrementalStatistics > const *""'"); 
    }
    arg1 = reinterpret_cast< GenericSequenceStatistics< IncrementalStatistics > * >(argp1);
    {
      try {
        result = (Real)((GenericSequenceStatistics< IncrementalStatistics > const *)arg1)->weightSum();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MultipleIncrementalStatistics_mean) {
  {
    GenericSequenceStatistics< IncrementalStatistics > *arg1 = (GenericSequenceStatistics< IncrementalStatistics > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Real > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MultipleIncrementalStatistics_mean(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GenericSequenceStatisticsT_IncrementalStatistics_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultipleIncrementalStatistics_mean" "', argument " "1"" of type '" "GenericSequenceStatistics< IncrementalStatistics > const *""'"); 
    }
    arg1 = reinterpret_cast< GenericSequenceStatistics< IncrementalStatistics > * >(argp1);
    {
      try {
        result = ((GenericSequenceStatistics< IncrementalStatistics > const *)arg1)->mean();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        svs[i] = sv_newmortal();
        sv_setnv(svs[i], result[i]);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MultipleIncrementalStatistics_variance) {
  {
    GenericSequenceStatistics< IncrementalStatistics > *arg1 = (GenericSequenceStatistics< IncrementalStatistics > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Real > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MultipleIncrementalStatistics_variance(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GenericSequenceStatisticsT_IncrementalStatistics_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultipleIncrementalStatistics_variance" "', argument " "1"" of type '" "GenericSequenceStatistics< IncrementalStatistics > const *""'"); 
    }
    arg1 = reinterpret_cast< GenericSequenceStatistics< IncrementalStatistics > * >(argp1);
    {
      try {
        result = ((GenericSequenceStatistics< IncrementalStatistics > const *)arg1)->variance();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        svs[i] = sv_newmortal();
        sv_setnv(svs[i], result[i]);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MultipleIncrementalStatistics_standardDeviation) {
  {
    GenericSequenceStatistics< IncrementalStatistics > *arg1 = (GenericSequenceStatistics< IncrementalStatistics > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Real > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MultipleIncrementalStatistics_standardDeviation(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GenericSequenceStatisticsT_IncrementalStatistics_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultipleIncrementalStatistics_standardDeviation" "', argument " "1"" of type '" "GenericSequenceStatistics< IncrementalStatistics > const *""'"); 
    }
    arg1 = reinterpret_cast< GenericSequenceStatistics< IncrementalStatistics > * >(argp1);
    {
      try {
        result = ((GenericSequenceStatistics< IncrementalStatistics > const *)arg1)->standardDeviation();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        svs[i] = sv_newmortal();
        sv_setnv(svs[i], result[i]);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MultipleIncrementalStatistics_errorEstimate) {
  {
    GenericSequenceStatistics< IncrementalStatistics > *arg1 = (GenericSequenceStatistics< IncrementalStatistics > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Real > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MultipleIncrementalStatistics_errorEstimate(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GenericSequenceStatisticsT_IncrementalStatistics_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultipleIncrementalStatistics_errorEstimate" "', argument " "1"" of type '" "GenericSequenceStatistics< IncrementalStatistics > const *""'"); 
    }
    arg1 = reinterpret_cast< GenericSequenceStatistics< IncrementalStatistics > * >(argp1);
    {
      try {
        result = ((GenericSequenceStatistics< IncrementalStatistics > const *)arg1)->errorEstimate();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        svs[i] = sv_newmortal();
        sv_setnv(svs[i], result[i]);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MultipleIncrementalStatistics_skewness) {
  {
    GenericSequenceStatistics< IncrementalStatistics > *arg1 = (GenericSequenceStatistics< IncrementalStatistics > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Real > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MultipleIncrementalStatistics_skewness(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GenericSequenceStatisticsT_IncrementalStatistics_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultipleIncrementalStatistics_skewness" "', argument " "1"" of type '" "GenericSequenceStatistics< IncrementalStatistics > const *""'"); 
    }
    arg1 = reinterpret_cast< GenericSequenceStatistics< IncrementalStatistics > * >(argp1);
    {
      try {
        result = ((GenericSequenceStatistics< IncrementalStatistics > const *)arg1)->skewness();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        svs[i] = sv_newmortal();
        sv_setnv(svs[i], result[i]);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MultipleIncrementalStatistics_kurtosis) {
  {
    GenericSequenceStatistics< IncrementalStatistics > *arg1 = (GenericSequenceStatistics< IncrementalStatistics > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Real > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MultipleIncrementalStatistics_kurtosis(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GenericSequenceStatisticsT_IncrementalStatistics_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultipleIncrementalStatistics_kurtosis" "', argument " "1"" of type '" "GenericSequenceStatistics< IncrementalStatistics > const *""'"); 
    }
    arg1 = reinterpret_cast< GenericSequenceStatistics< IncrementalStatistics > * >(argp1);
    {
      try {
        result = ((GenericSequenceStatistics< IncrementalStatistics > const *)arg1)->kurtosis();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        svs[i] = sv_newmortal();
        sv_setnv(svs[i], result[i]);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MultipleIncrementalStatistics_min) {
  {
    GenericSequenceStatistics< IncrementalStatistics > *arg1 = (GenericSequenceStatistics< IncrementalStatistics > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Real > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MultipleIncrementalStatistics_min(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GenericSequenceStatisticsT_IncrementalStatistics_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultipleIncrementalStatistics_min" "', argument " "1"" of type '" "GenericSequenceStatistics< IncrementalStatistics > const *""'"); 
    }
    arg1 = reinterpret_cast< GenericSequenceStatistics< IncrementalStatistics > * >(argp1);
    {
      try {
        result = ((GenericSequenceStatistics< IncrementalStatistics > const *)arg1)->min();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        svs[i] = sv_newmortal();
        sv_setnv(svs[i], result[i]);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MultipleIncrementalStatistics_max) {
  {
    GenericSequenceStatistics< IncrementalStatistics > *arg1 = (GenericSequenceStatistics< IncrementalStatistics > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Real > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MultipleIncrementalStatistics_max(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GenericSequenceStatisticsT_IncrementalStatistics_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultipleIncrementalStatistics_max" "', argument " "1"" of type '" "GenericSequenceStatistics< IncrementalStatistics > const *""'"); 
    }
    arg1 = reinterpret_cast< GenericSequenceStatistics< IncrementalStatistics > * >(argp1);
    {
      try {
        result = ((GenericSequenceStatistics< IncrementalStatistics > const *)arg1)->max();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        svs[i] = sv_newmortal();
        sv_setnv(svs[i], result[i]);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MultipleIncrementalStatistics_covariance) {
  {
    GenericSequenceStatistics< IncrementalStatistics > *arg1 = (GenericSequenceStatistics< IncrementalStatistics > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Matrix result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MultipleIncrementalStatistics_covariance(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GenericSequenceStatisticsT_IncrementalStatistics_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultipleIncrementalStatistics_covariance" "', argument " "1"" of type '" "GenericSequenceStatistics< IncrementalStatistics > const *""'"); 
    }
    arg1 = reinterpret_cast< GenericSequenceStatistics< IncrementalStatistics > * >(argp1);
    {
      try {
        result = ((GenericSequenceStatistics< IncrementalStatistics > const *)arg1)->covariance();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Matrix(static_cast< const Matrix& >(result))), SWIGTYPE_p_Matrix, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MultipleIncrementalStatistics_correlation) {
  {
    GenericSequenceStatistics< IncrementalStatistics > *arg1 = (GenericSequenceStatistics< IncrementalStatistics > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Matrix result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MultipleIncrementalStatistics_correlation(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GenericSequenceStatisticsT_IncrementalStatistics_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultipleIncrementalStatistics_correlation" "', argument " "1"" of type '" "GenericSequenceStatistics< IncrementalStatistics > const *""'"); 
    }
    arg1 = reinterpret_cast< GenericSequenceStatistics< IncrementalStatistics > * >(argp1);
    {
      try {
        result = ((GenericSequenceStatistics< IncrementalStatistics > const *)arg1)->correlation();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Matrix(static_cast< const Matrix& >(result))), SWIGTYPE_p_Matrix, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MultipleIncrementalStatistics_reset) {
  {
    GenericSequenceStatistics< IncrementalStatistics > *arg1 = (GenericSequenceStatistics< IncrementalStatistics > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MultipleIncrementalStatistics_reset(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GenericSequenceStatisticsT_IncrementalStatistics_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultipleIncrementalStatistics_reset" "', argument " "1"" of type '" "GenericSequenceStatistics< IncrementalStatistics > *""'"); 
    }
    arg1 = reinterpret_cast< GenericSequenceStatistics< IncrementalStatistics > * >(argp1);
    {
      try {
        (arg1)->reset();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MultipleIncrementalStatistics_add__SWIG_0) {
  {
    GenericSequenceStatistics< IncrementalStatistics > *arg1 = (GenericSequenceStatistics< IncrementalStatistics > *) 0 ;
    std::vector< Real > *arg2 = 0 ;
    Real arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    std::vector< double > temp2 ;
    std::vector< double > *v2 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: MultipleIncrementalStatistics_add(self,value,weight);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GenericSequenceStatisticsT_IncrementalStatistics_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultipleIncrementalStatistics_add" "', argument " "1"" of type '" "GenericSequenceStatistics< IncrementalStatistics > *""'"); 
    }
    arg1 = reinterpret_cast< GenericSequenceStatistics< IncrementalStatistics > * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of MultipleIncrementalStatistics_add. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp2.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "MultipleIncrementalStatistics_add. "
              "Expected an array of ""double");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of MultipleIncrementalStatistics_add. "
          "Expected an array of ""double");
      }
    }
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MultipleIncrementalStatistics_add" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    {
      try {
        (arg1)->add((std::vector< Real > const &)*arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_MultipleIncrementalStatistics_add__SWIG_1) {
  {
    GenericSequenceStatistics< IncrementalStatistics > *arg1 = (GenericSequenceStatistics< IncrementalStatistics > *) 0 ;
    std::vector< Real > *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    std::vector< double > temp2 ;
    std::vector< double > *v2 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: MultipleIncrementalStatistics_add(self,value);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GenericSequenceStatisticsT_IncrementalStatistics_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultipleIncrementalStatistics_add" "', argument " "1"" of type '" "GenericSequenceStatistics< IncrementalStatistics > *""'"); 
    }
    arg1 = reinterpret_cast< GenericSequenceStatistics< IncrementalStatistics > * >(argp1);
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of MultipleIncrementalStatistics_add. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp2.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "MultipleIncrementalStatistics_add. "
              "Expected an array of ""double");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of MultipleIncrementalStatistics_add. "
          "Expected an array of ""double");
      }
    }
    {
      try {
        (arg1)->add((std::vector< Real > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_MultipleIncrementalStatistics_add__SWIG_2) {
  {
    GenericSequenceStatistics< IncrementalStatistics > *arg1 = (GenericSequenceStatistics< IncrementalStatistics > *) 0 ;
    Array *arg2 = 0 ;
    Real arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: MultipleIncrementalStatistics_add(self,value,weight);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GenericSequenceStatisticsT_IncrementalStatistics_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultipleIncrementalStatistics_add" "', argument " "1"" of type '" "GenericSequenceStatistics< IncrementalStatistics > *""'"); 
    }
    arg1 = reinterpret_cast< GenericSequenceStatistics< IncrementalStatistics > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MultipleIncrementalStatistics_add" "', argument " "2"" of type '" "Array const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MultipleIncrementalStatistics_add" "', argument " "2"" of type '" "Array const &""'"); 
    }
    arg2 = reinterpret_cast< Array * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MultipleIncrementalStatistics_add" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    {
      try {
        (arg1)->add((Array const &)*arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_MultipleIncrementalStatistics_add__SWIG_3) {
  {
    GenericSequenceStatistics< IncrementalStatistics > *arg1 = (GenericSequenceStatistics< IncrementalStatistics > *) 0 ;
    Array *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: MultipleIncrementalStatistics_add(self,value);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GenericSequenceStatisticsT_IncrementalStatistics_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultipleIncrementalStatistics_add" "', argument " "1"" of type '" "GenericSequenceStatistics< IncrementalStatistics > *""'"); 
    }
    arg1 = reinterpret_cast< GenericSequenceStatistics< IncrementalStatistics > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Array,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MultipleIncrementalStatistics_add" "', argument " "2"" of type '" "Array const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MultipleIncrementalStatistics_add" "', argument " "2"" of type '" "Array const &""'"); 
    }
    arg2 = reinterpret_cast< Array * >(argp2);
    {
      try {
        (arg1)->add((Array const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_MultipleIncrementalStatistics_add) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GenericSequenceStatisticsT_IncrementalStatistics_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Array, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GenericSequenceStatisticsT_IncrementalStatistics_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GenericSequenceStatisticsT_IncrementalStatistics_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Array, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_GenericSequenceStatisticsT_IncrementalStatistics_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_MultipleIncrementalStatistics_add__SWIG_3); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_MultipleIncrementalStatistics_add__SWIG_1); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_MultipleIncrementalStatistics_add__SWIG_2); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_MultipleIncrementalStatistics_add__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'MultipleIncrementalStatistics_add'");
  XSRETURN(0);
}


XS(_wrap_delete_MultipleIncrementalStatistics) {
  {
    GenericSequenceStatistics< IncrementalStatistics > *arg1 = (GenericSequenceStatistics< IncrementalStatistics > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_MultipleIncrementalStatistics(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GenericSequenceStatisticsT_IncrementalStatistics_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MultipleIncrementalStatistics" "', argument " "1"" of type '" "GenericSequenceStatistics< IncrementalStatistics > *""'"); 
    }
    arg1 = reinterpret_cast< GenericSequenceStatistics< IncrementalStatistics > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CapFloorTermVolatilityStructure___deref__) {
  {
    boost::shared_ptr< CapFloorTermVolatilityStructure > *arg1 = (boost::shared_ptr< CapFloorTermVolatilityStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    CapFloorTermVolatilityStructure *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CapFloorTermVolatilityStructure___deref__(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_CapFloorTermVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CapFloorTermVolatilityStructure___deref__" "', argument " "1"" of type '" "boost::shared_ptr< CapFloorTermVolatilityStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< CapFloorTermVolatilityStructure > * >(argp1);
    {
      try {
        result = (CapFloorTermVolatilityStructure *)(arg1)->operator ->();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CapFloorTermVolatilityStructure, 0 | 0); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CapFloorTermVolatilityStructure_isNull) {
  {
    boost::shared_ptr< CapFloorTermVolatilityStructure > *arg1 = (boost::shared_ptr< CapFloorTermVolatilityStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CapFloorTermVolatilityStructure_isNull(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_CapFloorTermVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CapFloorTermVolatilityStructure_isNull" "', argument " "1"" of type '" "boost::shared_ptr< CapFloorTermVolatilityStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< CapFloorTermVolatilityStructure > * >(argp1);
    {
      try {
        result = (bool)boost_shared_ptr_Sl_CapFloorTermVolatilityStructure_Sg__isNull(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CapFloorTermVolatilityStructure_asObservable) {
  {
    boost::shared_ptr< CapFloorTermVolatilityStructure > *arg1 = (boost::shared_ptr< CapFloorTermVolatilityStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    boost::shared_ptr< Observable > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CapFloorTermVolatilityStructure_asObservable(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_CapFloorTermVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CapFloorTermVolatilityStructure_asObservable" "', argument " "1"" of type '" "boost::shared_ptr< CapFloorTermVolatilityStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< CapFloorTermVolatilityStructure > * >(argp1);
    {
      try {
        result = boost_shared_ptr_Sl_CapFloorTermVolatilityStructure_Sg__asObservable(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new boost::shared_ptr< Observable >(static_cast< const boost::shared_ptr< Observable >& >(result))), SWIGTYPE_p_boost__shared_ptrT_Observable_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CapFloorTermVolatilityStructure) {
  {
    int argvi = 0;
    boost::shared_ptr< CapFloorTermVolatilityStructure > *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_CapFloorTermVolatilityStructure();");
    }
    {
      try {
        result = (boost::shared_ptr< CapFloorTermVolatilityStructure > *)new boost::shared_ptr< CapFloorTermVolatilityStructure >();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_boost__shared_ptrT_CapFloorTermVolatilityStructure_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_CapFloorTermVolatilityStructure) {
  {
    boost::shared_ptr< CapFloorTermVolatilityStructure > *arg1 = (boost::shared_ptr< CapFloorTermVolatilityStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_CapFloorTermVolatilityStructure(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_CapFloorTermVolatilityStructure_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CapFloorTermVolatilityStructure" "', argument " "1"" of type '" "boost::shared_ptr< CapFloorTermVolatilityStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< CapFloorTermVolatilityStructure > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CapFloorTermVolatilityStructure_volatility__SWIG_0) {
  {
    boost::shared_ptr< CapFloorTermVolatilityStructure > *arg1 = (boost::shared_ptr< CapFloorTermVolatilityStructure > *) 0 ;
    Period *arg2 = 0 ;
    Rate arg3 ;
    bool arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Volatility result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: CapFloorTermVolatilityStructure_volatility(self,length,strike,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_CapFloorTermVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CapFloorTermVolatilityStructure_volatility" "', argument " "1"" of type '" "boost::shared_ptr< CapFloorTermVolatilityStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< CapFloorTermVolatilityStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CapFloorTermVolatilityStructure_volatility" "', argument " "2"" of type '" "Period const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CapFloorTermVolatilityStructure_volatility" "', argument " "2"" of type '" "Period const &""'"); 
    }
    arg2 = reinterpret_cast< Period * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CapFloorTermVolatilityStructure_volatility" "', argument " "3"" of type '" "Rate""'");
    } 
    arg3 = static_cast< Rate >(val3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CapFloorTermVolatilityStructure_volatility" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    {
      try {
        result = (Volatility)(*arg1)->volatility((Period const &)*arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CapFloorTermVolatilityStructure_volatility__SWIG_1) {
  {
    boost::shared_ptr< CapFloorTermVolatilityStructure > *arg1 = (boost::shared_ptr< CapFloorTermVolatilityStructure > *) 0 ;
    Period *arg2 = 0 ;
    Rate arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Volatility result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: CapFloorTermVolatilityStructure_volatility(self,length,strike);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_CapFloorTermVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CapFloorTermVolatilityStructure_volatility" "', argument " "1"" of type '" "boost::shared_ptr< CapFloorTermVolatilityStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< CapFloorTermVolatilityStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CapFloorTermVolatilityStructure_volatility" "', argument " "2"" of type '" "Period const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CapFloorTermVolatilityStructure_volatility" "', argument " "2"" of type '" "Period const &""'"); 
    }
    arg2 = reinterpret_cast< Period * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CapFloorTermVolatilityStructure_volatility" "', argument " "3"" of type '" "Rate""'");
    } 
    arg3 = static_cast< Rate >(val3);
    {
      try {
        result = (Volatility)(*arg1)->volatility((Period const &)*arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CapFloorTermVolatilityStructure_volatility__SWIG_2) {
  {
    boost::shared_ptr< CapFloorTermVolatilityStructure > *arg1 = (boost::shared_ptr< CapFloorTermVolatilityStructure > *) 0 ;
    Date *arg2 = 0 ;
    Rate arg3 ;
    bool arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Volatility result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: CapFloorTermVolatilityStructure_volatility(self,end,strike,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_CapFloorTermVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CapFloorTermVolatilityStructure_volatility" "', argument " "1"" of type '" "boost::shared_ptr< CapFloorTermVolatilityStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< CapFloorTermVolatilityStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CapFloorTermVolatilityStructure_volatility" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CapFloorTermVolatilityStructure_volatility" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CapFloorTermVolatilityStructure_volatility" "', argument " "3"" of type '" "Rate""'");
    } 
    arg3 = static_cast< Rate >(val3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CapFloorTermVolatilityStructure_volatility" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    {
      try {
        result = (Volatility)(*arg1)->volatility((Date const &)*arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CapFloorTermVolatilityStructure_volatility__SWIG_3) {
  {
    boost::shared_ptr< CapFloorTermVolatilityStructure > *arg1 = (boost::shared_ptr< CapFloorTermVolatilityStructure > *) 0 ;
    Date *arg2 = 0 ;
    Rate arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Volatility result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: CapFloorTermVolatilityStructure_volatility(self,end,strike);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_CapFloorTermVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CapFloorTermVolatilityStructure_volatility" "', argument " "1"" of type '" "boost::shared_ptr< CapFloorTermVolatilityStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< CapFloorTermVolatilityStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CapFloorTermVolatilityStructure_volatility" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CapFloorTermVolatilityStructure_volatility" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CapFloorTermVolatilityStructure_volatility" "', argument " "3"" of type '" "Rate""'");
    } 
    arg3 = static_cast< Rate >(val3);
    {
      try {
        result = (Volatility)(*arg1)->volatility((Date const &)*arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CapFloorTermVolatilityStructure_volatility__SWIG_4) {
  {
    boost::shared_ptr< CapFloorTermVolatilityStructure > *arg1 = (boost::shared_ptr< CapFloorTermVolatilityStructure > *) 0 ;
    Time arg2 ;
    Rate arg3 ;
    bool arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Volatility result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: CapFloorTermVolatilityStructure_volatility(self,end,strike,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_CapFloorTermVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CapFloorTermVolatilityStructure_volatility" "', argument " "1"" of type '" "boost::shared_ptr< CapFloorTermVolatilityStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< CapFloorTermVolatilityStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CapFloorTermVolatilityStructure_volatility" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CapFloorTermVolatilityStructure_volatility" "', argument " "3"" of type '" "Rate""'");
    } 
    arg3 = static_cast< Rate >(val3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CapFloorTermVolatilityStructure_volatility" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    {
      try {
        result = (Volatility)(*arg1)->volatility(arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CapFloorTermVolatilityStructure_volatility__SWIG_5) {
  {
    boost::shared_ptr< CapFloorTermVolatilityStructure > *arg1 = (boost::shared_ptr< CapFloorTermVolatilityStructure > *) 0 ;
    Time arg2 ;
    Rate arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Volatility result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: CapFloorTermVolatilityStructure_volatility(self,end,strike);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_CapFloorTermVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CapFloorTermVolatilityStructure_volatility" "', argument " "1"" of type '" "boost::shared_ptr< CapFloorTermVolatilityStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< CapFloorTermVolatilityStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CapFloorTermVolatilityStructure_volatility" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CapFloorTermVolatilityStructure_volatility" "', argument " "3"" of type '" "Rate""'");
    } 
    arg3 = static_cast< Rate >(val3);
    {
      try {
        result = (Volatility)(*arg1)->volatility(arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CapFloorTermVolatilityStructure_volatility) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_CapFloorTermVolatilityStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_CapFloorTermVolatilityStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_CapFloorTermVolatilityStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_CapFloorTermVolatilityStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_CapFloorTermVolatilityStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_CapFloorTermVolatilityStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CapFloorTermVolatilityStructure_volatility__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CapFloorTermVolatilityStructure_volatility__SWIG_3); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CapFloorTermVolatilityStructure_volatility__SWIG_5); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CapFloorTermVolatilityStructure_volatility__SWIG_0); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CapFloorTermVolatilityStructure_volatility__SWIG_2); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CapFloorTermVolatilityStructure_volatility__SWIG_4); return;
    }
  }
  
  croak("No matching function for overloaded 'CapFloorTermVolatilityStructure_volatility'");
  XSRETURN(0);
}


XS(_wrap_CapFloorTermVolatilityStructure_enableExtrapolation) {
  {
    boost::shared_ptr< CapFloorTermVolatilityStructure > *arg1 = (boost::shared_ptr< CapFloorTermVolatilityStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CapFloorTermVolatilityStructure_enableExtrapolation(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_CapFloorTermVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CapFloorTermVolatilityStructure_enableExtrapolation" "', argument " "1"" of type '" "boost::shared_ptr< CapFloorTermVolatilityStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< CapFloorTermVolatilityStructure > * >(argp1);
    {
      try {
        (*arg1)->enableExtrapolation();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CapFloorTermVolatilityStructure_disableExtrapolation) {
  {
    boost::shared_ptr< CapFloorTermVolatilityStructure > *arg1 = (boost::shared_ptr< CapFloorTermVolatilityStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CapFloorTermVolatilityStructure_disableExtrapolation(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_CapFloorTermVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CapFloorTermVolatilityStructure_disableExtrapolation" "', argument " "1"" of type '" "boost::shared_ptr< CapFloorTermVolatilityStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< CapFloorTermVolatilityStructure > * >(argp1);
    {
      try {
        (*arg1)->disableExtrapolation();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CapFloorTermVolatilityStructure_allowsExtrapolation) {
  {
    boost::shared_ptr< CapFloorTermVolatilityStructure > *arg1 = (boost::shared_ptr< CapFloorTermVolatilityStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CapFloorTermVolatilityStructure_allowsExtrapolation(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_CapFloorTermVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CapFloorTermVolatilityStructure_allowsExtrapolation" "', argument " "1"" of type '" "boost::shared_ptr< CapFloorTermVolatilityStructure > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< CapFloorTermVolatilityStructure > * >(argp1);
    {
      try {
        result = (bool)(*arg1)->allowsExtrapolation();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CapFloorTermVolatilityStructureHandle__SWIG_0) {
  {
    boost::shared_ptr< CapFloorTermVolatilityStructure > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Handle< CapFloorTermVolatilityStructure > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_CapFloorTermVolatilityStructureHandle(boost::shared_ptr< CapFloorTermVolatilityStructure > const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_CapFloorTermVolatilityStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CapFloorTermVolatilityStructureHandle" "', argument " "1"" of type '" "boost::shared_ptr< CapFloorTermVolatilityStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CapFloorTermVolatilityStructureHandle" "', argument " "1"" of type '" "boost::shared_ptr< CapFloorTermVolatilityStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< CapFloorTermVolatilityStructure > * >(argp1);
    {
      try {
        result = (Handle< CapFloorTermVolatilityStructure > *)new Handle< CapFloorTermVolatilityStructure >((boost::shared_ptr< CapFloorTermVolatilityStructure > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_HandleT_CapFloorTermVolatilityStructure_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CapFloorTermVolatilityStructureHandle__SWIG_1) {
  {
    int argvi = 0;
    Handle< CapFloorTermVolatilityStructure > *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_CapFloorTermVolatilityStructureHandle();");
    }
    {
      try {
        result = (Handle< CapFloorTermVolatilityStructure > *)new Handle< CapFloorTermVolatilityStructure >();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_HandleT_CapFloorTermVolatilityStructure_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_CapFloorTermVolatilityStructureHandle) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_CapFloorTermVolatilityStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_CapFloorTermVolatilityStructureHandle__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_CapFloorTermVolatilityStructureHandle__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_CapFloorTermVolatilityStructureHandle'");
  XSRETURN(0);
}


XS(_wrap_CapFloorTermVolatilityStructureHandle___deref__) {
  {
    Handle< CapFloorTermVolatilityStructure > *arg1 = (Handle< CapFloorTermVolatilityStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    boost::shared_ptr< CapFloorTermVolatilityStructure > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CapFloorTermVolatilityStructureHandle___deref__(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_CapFloorTermVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CapFloorTermVolatilityStructureHandle___deref__" "', argument " "1"" of type '" "Handle< CapFloorTermVolatilityStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< CapFloorTermVolatilityStructure > * >(argp1);
    {
      try {
        result = (arg1)->operator ->();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new boost::shared_ptr< CapFloorTermVolatilityStructure >(static_cast< const boost::shared_ptr< CapFloorTermVolatilityStructure >& >(result))), SWIGTYPE_p_boost__shared_ptrT_CapFloorTermVolatilityStructure_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CapFloorTermVolatilityStructureHandle_empty) {
  {
    Handle< CapFloorTermVolatilityStructure > *arg1 = (Handle< CapFloorTermVolatilityStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CapFloorTermVolatilityStructureHandle_empty(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_CapFloorTermVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CapFloorTermVolatilityStructureHandle_empty" "', argument " "1"" of type '" "Handle< CapFloorTermVolatilityStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< CapFloorTermVolatilityStructure > * >(argp1);
    {
      try {
        result = (bool)(arg1)->empty();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CapFloorTermVolatilityStructureHandle_asObservable) {
  {
    Handle< CapFloorTermVolatilityStructure > *arg1 = (Handle< CapFloorTermVolatilityStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    boost::shared_ptr< Observable > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CapFloorTermVolatilityStructureHandle_asObservable(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_CapFloorTermVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CapFloorTermVolatilityStructureHandle_asObservable" "', argument " "1"" of type '" "Handle< CapFloorTermVolatilityStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< CapFloorTermVolatilityStructure > * >(argp1);
    {
      try {
        result = Handle_Sl_CapFloorTermVolatilityStructure_Sg__asObservable(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new boost::shared_ptr< Observable >(static_cast< const boost::shared_ptr< Observable >& >(result))), SWIGTYPE_p_boost__shared_ptrT_Observable_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_CapFloorTermVolatilityStructureHandle) {
  {
    Handle< CapFloorTermVolatilityStructure > *arg1 = (Handle< CapFloorTermVolatilityStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_CapFloorTermVolatilityStructureHandle(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_CapFloorTermVolatilityStructure_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CapFloorTermVolatilityStructureHandle" "', argument " "1"" of type '" "Handle< CapFloorTermVolatilityStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< CapFloorTermVolatilityStructure > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CapFloorTermVolatilityStructureHandle_volatility__SWIG_0) {
  {
    Handle< CapFloorTermVolatilityStructure > *arg1 = (Handle< CapFloorTermVolatilityStructure > *) 0 ;
    Period *arg2 = 0 ;
    Rate arg3 ;
    bool arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Volatility result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: CapFloorTermVolatilityStructureHandle_volatility(self,length,strike,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_CapFloorTermVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CapFloorTermVolatilityStructureHandle_volatility" "', argument " "1"" of type '" "Handle< CapFloorTermVolatilityStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< CapFloorTermVolatilityStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CapFloorTermVolatilityStructureHandle_volatility" "', argument " "2"" of type '" "Period const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CapFloorTermVolatilityStructureHandle_volatility" "', argument " "2"" of type '" "Period const &""'"); 
    }
    arg2 = reinterpret_cast< Period * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CapFloorTermVolatilityStructureHandle_volatility" "', argument " "3"" of type '" "Rate""'");
    } 
    arg3 = static_cast< Rate >(val3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CapFloorTermVolatilityStructureHandle_volatility" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    {
      try {
        result = (Volatility)(*arg1)->volatility((Period const &)*arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CapFloorTermVolatilityStructureHandle_volatility__SWIG_1) {
  {
    Handle< CapFloorTermVolatilityStructure > *arg1 = (Handle< CapFloorTermVolatilityStructure > *) 0 ;
    Period *arg2 = 0 ;
    Rate arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Volatility result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: CapFloorTermVolatilityStructureHandle_volatility(self,length,strike);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_CapFloorTermVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CapFloorTermVolatilityStructureHandle_volatility" "', argument " "1"" of type '" "Handle< CapFloorTermVolatilityStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< CapFloorTermVolatilityStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Period,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CapFloorTermVolatilityStructureHandle_volatility" "', argument " "2"" of type '" "Period const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CapFloorTermVolatilityStructureHandle_volatility" "', argument " "2"" of type '" "Period const &""'"); 
    }
    arg2 = reinterpret_cast< Period * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CapFloorTermVolatilityStructureHandle_volatility" "', argument " "3"" of type '" "Rate""'");
    } 
    arg3 = static_cast< Rate >(val3);
    {
      try {
        result = (Volatility)(*arg1)->volatility((Period const &)*arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CapFloorTermVolatilityStructureHandle_volatility__SWIG_2) {
  {
    Handle< CapFloorTermVolatilityStructure > *arg1 = (Handle< CapFloorTermVolatilityStructure > *) 0 ;
    Date *arg2 = 0 ;
    Rate arg3 ;
    bool arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Volatility result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: CapFloorTermVolatilityStructureHandle_volatility(self,end,strike,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_CapFloorTermVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CapFloorTermVolatilityStructureHandle_volatility" "', argument " "1"" of type '" "Handle< CapFloorTermVolatilityStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< CapFloorTermVolatilityStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CapFloorTermVolatilityStructureHandle_volatility" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CapFloorTermVolatilityStructureHandle_volatility" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CapFloorTermVolatilityStructureHandle_volatility" "', argument " "3"" of type '" "Rate""'");
    } 
    arg3 = static_cast< Rate >(val3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CapFloorTermVolatilityStructureHandle_volatility" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    {
      try {
        result = (Volatility)(*arg1)->volatility((Date const &)*arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CapFloorTermVolatilityStructureHandle_volatility__SWIG_3) {
  {
    Handle< CapFloorTermVolatilityStructure > *arg1 = (Handle< CapFloorTermVolatilityStructure > *) 0 ;
    Date *arg2 = 0 ;
    Rate arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Volatility result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: CapFloorTermVolatilityStructureHandle_volatility(self,end,strike);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_CapFloorTermVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CapFloorTermVolatilityStructureHandle_volatility" "', argument " "1"" of type '" "Handle< CapFloorTermVolatilityStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< CapFloorTermVolatilityStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CapFloorTermVolatilityStructureHandle_volatility" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CapFloorTermVolatilityStructureHandle_volatility" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CapFloorTermVolatilityStructureHandle_volatility" "', argument " "3"" of type '" "Rate""'");
    } 
    arg3 = static_cast< Rate >(val3);
    {
      try {
        result = (Volatility)(*arg1)->volatility((Date const &)*arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CapFloorTermVolatilityStructureHandle_volatility__SWIG_4) {
  {
    Handle< CapFloorTermVolatilityStructure > *arg1 = (Handle< CapFloorTermVolatilityStructure > *) 0 ;
    Time arg2 ;
    Rate arg3 ;
    bool arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Volatility result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: CapFloorTermVolatilityStructureHandle_volatility(self,end,strike,extrapolate);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_CapFloorTermVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CapFloorTermVolatilityStructureHandle_volatility" "', argument " "1"" of type '" "Handle< CapFloorTermVolatilityStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< CapFloorTermVolatilityStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CapFloorTermVolatilityStructureHandle_volatility" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CapFloorTermVolatilityStructureHandle_volatility" "', argument " "3"" of type '" "Rate""'");
    } 
    arg3 = static_cast< Rate >(val3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CapFloorTermVolatilityStructureHandle_volatility" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    {
      try {
        result = (Volatility)(*arg1)->volatility(arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CapFloorTermVolatilityStructureHandle_volatility__SWIG_5) {
  {
    Handle< CapFloorTermVolatilityStructure > *arg1 = (Handle< CapFloorTermVolatilityStructure > *) 0 ;
    Time arg2 ;
    Rate arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Volatility result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: CapFloorTermVolatilityStructureHandle_volatility(self,end,strike);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_CapFloorTermVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CapFloorTermVolatilityStructureHandle_volatility" "', argument " "1"" of type '" "Handle< CapFloorTermVolatilityStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< CapFloorTermVolatilityStructure > * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CapFloorTermVolatilityStructureHandle_volatility" "', argument " "2"" of type '" "Time""'");
    } 
    arg2 = static_cast< Time >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CapFloorTermVolatilityStructureHandle_volatility" "', argument " "3"" of type '" "Rate""'");
    } 
    arg3 = static_cast< Rate >(val3);
    {
      try {
        result = (Volatility)(*arg1)->volatility(arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CapFloorTermVolatilityStructureHandle_volatility) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_CapFloorTermVolatilityStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_CapFloorTermVolatilityStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_CapFloorTermVolatilityStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_CapFloorTermVolatilityStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Period, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_CapFloorTermVolatilityStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_CapFloorTermVolatilityStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CapFloorTermVolatilityStructureHandle_volatility__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CapFloorTermVolatilityStructureHandle_volatility__SWIG_3); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CapFloorTermVolatilityStructureHandle_volatility__SWIG_5); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CapFloorTermVolatilityStructureHandle_volatility__SWIG_0); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CapFloorTermVolatilityStructureHandle_volatility__SWIG_2); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_CapFloorTermVolatilityStructureHandle_volatility__SWIG_4); return;
    }
  }
  
  croak("No matching function for overloaded 'CapFloorTermVolatilityStructureHandle_volatility'");
  XSRETURN(0);
}


XS(_wrap_CapFloorTermVolatilityStructureHandle_enableExtrapolation) {
  {
    Handle< CapFloorTermVolatilityStructure > *arg1 = (Handle< CapFloorTermVolatilityStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CapFloorTermVolatilityStructureHandle_enableExtrapolation(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_CapFloorTermVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CapFloorTermVolatilityStructureHandle_enableExtrapolation" "', argument " "1"" of type '" "Handle< CapFloorTermVolatilityStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< CapFloorTermVolatilityStructure > * >(argp1);
    {
      try {
        (*arg1)->enableExtrapolation();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CapFloorTermVolatilityStructureHandle_disableExtrapolation) {
  {
    Handle< CapFloorTermVolatilityStructure > *arg1 = (Handle< CapFloorTermVolatilityStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CapFloorTermVolatilityStructureHandle_disableExtrapolation(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_CapFloorTermVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CapFloorTermVolatilityStructureHandle_disableExtrapolation" "', argument " "1"" of type '" "Handle< CapFloorTermVolatilityStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< CapFloorTermVolatilityStructure > * >(argp1);
    {
      try {
        (*arg1)->disableExtrapolation();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CapFloorTermVolatilityStructureHandle_allowsExtrapolation) {
  {
    Handle< CapFloorTermVolatilityStructure > *arg1 = (Handle< CapFloorTermVolatilityStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CapFloorTermVolatilityStructureHandle_allowsExtrapolation(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_HandleT_CapFloorTermVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CapFloorTermVolatilityStructureHandle_allowsExtrapolation" "', argument " "1"" of type '" "Handle< CapFloorTermVolatilityStructure > *""'"); 
    }
    arg1 = reinterpret_cast< Handle< CapFloorTermVolatilityStructure > * >(argp1);
    {
      try {
        result = (bool)(*arg1)->allowsExtrapolation();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_RelinkableCapFloorTermVolatilityStructureHandle__SWIG_0) {
  {
    boost::shared_ptr< CapFloorTermVolatilityStructure > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    RelinkableHandle< CapFloorTermVolatilityStructure > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_RelinkableCapFloorTermVolatilityStructureHandle(boost::shared_ptr< CapFloorTermVolatilityStructure > const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_CapFloorTermVolatilityStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_RelinkableCapFloorTermVolatilityStructureHandle" "', argument " "1"" of type '" "boost::shared_ptr< CapFloorTermVolatilityStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_RelinkableCapFloorTermVolatilityStructureHandle" "', argument " "1"" of type '" "boost::shared_ptr< CapFloorTermVolatilityStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< CapFloorTermVolatilityStructure > * >(argp1);
    {
      try {
        result = (RelinkableHandle< CapFloorTermVolatilityStructure > *)new RelinkableHandle< CapFloorTermVolatilityStructure >((boost::shared_ptr< CapFloorTermVolatilityStructure > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_RelinkableHandleT_CapFloorTermVolatilityStructure_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_RelinkableCapFloorTermVolatilityStructureHandle__SWIG_1) {
  {
    int argvi = 0;
    RelinkableHandle< CapFloorTermVolatilityStructure > *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_RelinkableCapFloorTermVolatilityStructureHandle();");
    }
    {
      try {
        result = (RelinkableHandle< CapFloorTermVolatilityStructure > *)new RelinkableHandle< CapFloorTermVolatilityStructure >();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_RelinkableHandleT_CapFloorTermVolatilityStructure_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_RelinkableCapFloorTermVolatilityStructureHandle) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_boost__shared_ptrT_CapFloorTermVolatilityStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_RelinkableCapFloorTermVolatilityStructureHandle__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_RelinkableCapFloorTermVolatilityStructureHandle__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_RelinkableCapFloorTermVolatilityStructureHandle'");
  XSRETURN(0);
}


XS(_wrap_RelinkableCapFloorTermVolatilityStructureHandle_linkTo) {
  {
    RelinkableHandle< CapFloorTermVolatilityStructure > *arg1 = (RelinkableHandle< CapFloorTermVolatilityStructure > *) 0 ;
    boost::shared_ptr< CapFloorTermVolatilityStructure > *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: RelinkableCapFloorTermVolatilityStructureHandle_linkTo(self,boost::shared_ptr< CapFloorTermVolatilityStructure > const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_RelinkableHandleT_CapFloorTermVolatilityStructure_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RelinkableCapFloorTermVolatilityStructureHandle_linkTo" "', argument " "1"" of type '" "RelinkableHandle< CapFloorTermVolatilityStructure > *""'"); 
    }
    arg1 = reinterpret_cast< RelinkableHandle< CapFloorTermVolatilityStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_boost__shared_ptrT_CapFloorTermVolatilityStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "RelinkableCapFloorTermVolatilityStructureHandle_linkTo" "', argument " "2"" of type '" "boost::shared_ptr< CapFloorTermVolatilityStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "RelinkableCapFloorTermVolatilityStructureHandle_linkTo" "', argument " "2"" of type '" "boost::shared_ptr< CapFloorTermVolatilityStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< boost::shared_ptr< CapFloorTermVolatilityStructure > * >(argp2);
    {
      try {
        (arg1)->linkTo((boost::shared_ptr< CapFloorTermVolatilityStructure > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_RelinkableCapFloorTermVolatilityStructureHandle) {
  {
    RelinkableHandle< CapFloorTermVolatilityStructure > *arg1 = (RelinkableHandle< CapFloorTermVolatilityStructure > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_RelinkableCapFloorTermVolatilityStructureHandle(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_RelinkableHandleT_CapFloorTermVolatilityStructure_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_RelinkableCapFloorTermVolatilityStructureHandle" "', argument " "1"" of type '" "RelinkableHandle< CapFloorTermVolatilityStructure > *""'"); 
    }
    arg1 = reinterpret_cast< RelinkableHandle< CapFloorTermVolatilityStructure > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CapFloorTermVolCurve__SWIG_0) {
  {
    Date *arg1 = 0 ;
    Calendar *arg2 = 0 ;
    BusinessDayConvention arg3 ;
    std::vector< Period > *arg4 = 0 ;
    std::vector< Volatility > *arg5 = 0 ;
    DayCounter *arg6 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    std::vector< Period > temp4 ;
    std::vector< Period > *v4 ;
    std::vector< double > temp5 ;
    std::vector< double > *v5 ;
    void *argp6 ;
    int res6 = 0 ;
    int argvi = 0;
    CapFloorTermVolCurvePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_CapFloorTermVolCurve(referenceDate,calendar,bdc,lengths,vols,dc);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CapFloorTermVolCurve" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CapFloorTermVolCurve" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CapFloorTermVolCurve" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CapFloorTermVolCurve" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_CapFloorTermVolCurve" "', argument " "3"" of type '" "BusinessDayConvention""'");
    } 
    arg3 = static_cast< BusinessDayConvention >(val3);
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_Period_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of new_CapFloorTermVolCurve. "
          "Expected an array of " "Period");
        SV **tv;
        I32 len = av_len(av) + 1;
        Period* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Period,0) != -1) {
            temp4.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 4 of "
              "new_CapFloorTermVolCurve. "
              "Expected an array of " "Period");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of new_CapFloorTermVolCurve. "
          "Expected an array of " "Period");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(4),(void **) &v5, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg5 = v5;
      } else if (SvROK(ST(4))) {
        AV *av = (AV *)SvRV(ST(4));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 5 of new_CapFloorTermVolCurve. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp5.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 5 of "
              "new_CapFloorTermVolCurve. "
              "Expected an array of ""double");
          }
        }
        arg5 = &temp5;
      } else {
        SWIG_croak("Type error in argument 5 of new_CapFloorTermVolCurve. "
          "Expected an array of ""double");
      }
    }
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_CapFloorTermVolCurve" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CapFloorTermVolCurve" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    arg6 = reinterpret_cast< DayCounter * >(argp6);
    {
      try {
        result = (CapFloorTermVolCurvePtr *)new_CapFloorTermVolCurvePtr__SWIG_0((Date const &)*arg1,(Calendar const &)*arg2,arg3,(std::vector< Period > const &)*arg4,(std::vector< double > const &)*arg5,(DayCounter const &)*arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CapFloorTermVolCurvePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CapFloorTermVolCurve__SWIG_1) {
  {
    Date *arg1 = 0 ;
    Calendar *arg2 = 0 ;
    BusinessDayConvention arg3 ;
    std::vector< Period > *arg4 = 0 ;
    std::vector< Volatility > *arg5 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    std::vector< Period > temp4 ;
    std::vector< Period > *v4 ;
    std::vector< double > temp5 ;
    std::vector< double > *v5 ;
    int argvi = 0;
    CapFloorTermVolCurvePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_CapFloorTermVolCurve(referenceDate,calendar,bdc,lengths,vols);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CapFloorTermVolCurve" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CapFloorTermVolCurve" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CapFloorTermVolCurve" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CapFloorTermVolCurve" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_CapFloorTermVolCurve" "', argument " "3"" of type '" "BusinessDayConvention""'");
    } 
    arg3 = static_cast< BusinessDayConvention >(val3);
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_Period_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of new_CapFloorTermVolCurve. "
          "Expected an array of " "Period");
        SV **tv;
        I32 len = av_len(av) + 1;
        Period* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Period,0) != -1) {
            temp4.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 4 of "
              "new_CapFloorTermVolCurve. "
              "Expected an array of " "Period");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of new_CapFloorTermVolCurve. "
          "Expected an array of " "Period");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(4),(void **) &v5, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg5 = v5;
      } else if (SvROK(ST(4))) {
        AV *av = (AV *)SvRV(ST(4));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 5 of new_CapFloorTermVolCurve. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp5.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 5 of "
              "new_CapFloorTermVolCurve. "
              "Expected an array of ""double");
          }
        }
        arg5 = &temp5;
      } else {
        SWIG_croak("Type error in argument 5 of new_CapFloorTermVolCurve. "
          "Expected an array of ""double");
      }
    }
    {
      try {
        result = (CapFloorTermVolCurvePtr *)new_CapFloorTermVolCurvePtr__SWIG_0((Date const &)*arg1,(Calendar const &)*arg2,arg3,(std::vector< Period > const &)*arg4,(std::vector< double > const &)*arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CapFloorTermVolCurvePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CapFloorTermVolCurve__SWIG_2) {
  {
    Natural arg1 ;
    Calendar *arg2 = 0 ;
    BusinessDayConvention arg3 ;
    std::vector< Period > *arg4 = 0 ;
    std::vector< Volatility > *arg5 = 0 ;
    DayCounter *arg6 = 0 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    std::vector< Period > temp4 ;
    std::vector< Period > *v4 ;
    std::vector< double > temp5 ;
    std::vector< double > *v5 ;
    void *argp6 ;
    int res6 = 0 ;
    int argvi = 0;
    CapFloorTermVolCurvePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_CapFloorTermVolCurve(settlementDays,calendar,bdc,lengths,vols,dc);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_CapFloorTermVolCurve" "', argument " "1"" of type '" "Natural""'");
    } 
    arg1 = static_cast< Natural >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CapFloorTermVolCurve" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CapFloorTermVolCurve" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_CapFloorTermVolCurve" "', argument " "3"" of type '" "BusinessDayConvention""'");
    } 
    arg3 = static_cast< BusinessDayConvention >(val3);
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_Period_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of new_CapFloorTermVolCurve. "
          "Expected an array of " "Period");
        SV **tv;
        I32 len = av_len(av) + 1;
        Period* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Period,0) != -1) {
            temp4.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 4 of "
              "new_CapFloorTermVolCurve. "
              "Expected an array of " "Period");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of new_CapFloorTermVolCurve. "
          "Expected an array of " "Period");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(4),(void **) &v5, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg5 = v5;
      } else if (SvROK(ST(4))) {
        AV *av = (AV *)SvRV(ST(4));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 5 of new_CapFloorTermVolCurve. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp5.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 5 of "
              "new_CapFloorTermVolCurve. "
              "Expected an array of ""double");
          }
        }
        arg5 = &temp5;
      } else {
        SWIG_croak("Type error in argument 5 of new_CapFloorTermVolCurve. "
          "Expected an array of ""double");
      }
    }
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_CapFloorTermVolCurve" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CapFloorTermVolCurve" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    arg6 = reinterpret_cast< DayCounter * >(argp6);
    {
      try {
        result = (CapFloorTermVolCurvePtr *)new_CapFloorTermVolCurvePtr__SWIG_2(arg1,(Calendar const &)*arg2,arg3,(std::vector< Period > const &)*arg4,(std::vector< double > const &)*arg5,(DayCounter const &)*arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CapFloorTermVolCurvePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CapFloorTermVolCurve__SWIG_3) {
  {
    Natural arg1 ;
    Calendar *arg2 = 0 ;
    BusinessDayConvention arg3 ;
    std::vector< Period > *arg4 = 0 ;
    std::vector< Volatility > *arg5 = 0 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    std::vector< Period > temp4 ;
    std::vector< Period > *v4 ;
    std::vector< double > temp5 ;
    std::vector< double > *v5 ;
    int argvi = 0;
    CapFloorTermVolCurvePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_CapFloorTermVolCurve(settlementDays,calendar,bdc,lengths,vols);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_CapFloorTermVolCurve" "', argument " "1"" of type '" "Natural""'");
    } 
    arg1 = static_cast< Natural >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CapFloorTermVolCurve" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CapFloorTermVolCurve" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_CapFloorTermVolCurve" "', argument " "3"" of type '" "BusinessDayConvention""'");
    } 
    arg3 = static_cast< BusinessDayConvention >(val3);
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_Period_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of new_CapFloorTermVolCurve. "
          "Expected an array of " "Period");
        SV **tv;
        I32 len = av_len(av) + 1;
        Period* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Period,0) != -1) {
            temp4.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 4 of "
              "new_CapFloorTermVolCurve. "
              "Expected an array of " "Period");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of new_CapFloorTermVolCurve. "
          "Expected an array of " "Period");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(4),(void **) &v5, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg5 = v5;
      } else if (SvROK(ST(4))) {
        AV *av = (AV *)SvRV(ST(4));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 5 of new_CapFloorTermVolCurve. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp5.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 5 of "
              "new_CapFloorTermVolCurve. "
              "Expected an array of ""double");
          }
        }
        arg5 = &temp5;
      } else {
        SWIG_croak("Type error in argument 5 of new_CapFloorTermVolCurve. "
          "Expected an array of ""double");
      }
    }
    {
      try {
        result = (CapFloorTermVolCurvePtr *)new_CapFloorTermVolCurvePtr__SWIG_2(arg1,(Calendar const &)*arg2,arg3,(std::vector< Period > const &)*arg4,(std::vector< double > const &)*arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CapFloorTermVolCurvePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CapFloorTermVolCurve) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Period >* v;
            if (SWIG_ConvertPtr(ST(3),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Period_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(3))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(3));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Period* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Period,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(4),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(4))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(4));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Period >* v;
            if (SWIG_ConvertPtr(ST(3),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Period_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(3))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(3));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Period* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Period,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(4),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(4))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(4));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Period >* v;
            if (SWIG_ConvertPtr(ST(3),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Period_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(3))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(3));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Period* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Period,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(4),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(4))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(4));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Period >* v;
            if (SWIG_ConvertPtr(ST(3),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Period_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(3))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(3));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Period* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Period,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(4),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(4))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(4));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_CapFloorTermVolCurve__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_CapFloorTermVolCurve__SWIG_3); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_CapFloorTermVolCurve__SWIG_0); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_CapFloorTermVolCurve__SWIG_2); return;
    }
  }
  
  croak("No matching function for overloaded 'new_CapFloorTermVolCurve'");
  XSRETURN(0);
}


XS(_wrap_delete_CapFloorTermVolCurve) {
  {
    CapFloorTermVolCurvePtr *arg1 = (CapFloorTermVolCurvePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_CapFloorTermVolCurve(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CapFloorTermVolCurvePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CapFloorTermVolCurve" "', argument " "1"" of type '" "CapFloorTermVolCurvePtr *""'"); 
    }
    arg1 = reinterpret_cast< CapFloorTermVolCurvePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CapFloorTermVolSurface__SWIG_0) {
  {
    Natural arg1 ;
    Calendar *arg2 = 0 ;
    BusinessDayConvention arg3 ;
    std::vector< Period > *arg4 = 0 ;
    std::vector< Rate > *arg5 = 0 ;
    std::vector< std::vector< Handle< Quote > > > *arg6 = 0 ;
    DayCounter *arg7 = 0 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    std::vector< Period > temp4 ;
    std::vector< Period > *v4 ;
    std::vector< double > temp5 ;
    std::vector< double > *v5 ;
    std::vector< std::vector< Handle< Quote > > > temp6 ;
    std::vector< std::vector< Handle< Quote > > > *v6 ;
    void *argp7 ;
    int res7 = 0 ;
    int argvi = 0;
    CapFloorTermVolSurfacePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: new_CapFloorTermVolSurface(settlementDays,calendar,bdc,optionTenors,strikes,quotes,dc);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_CapFloorTermVolSurface" "', argument " "1"" of type '" "Natural""'");
    } 
    arg1 = static_cast< Natural >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CapFloorTermVolSurface" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CapFloorTermVolSurface" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_CapFloorTermVolSurface" "', argument " "3"" of type '" "BusinessDayConvention""'");
    } 
    arg3 = static_cast< BusinessDayConvention >(val3);
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_Period_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of new_CapFloorTermVolSurface. "
          "Expected an array of " "Period");
        SV **tv;
        I32 len = av_len(av) + 1;
        Period* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Period,0) != -1) {
            temp4.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 4 of "
              "new_CapFloorTermVolSurface. "
              "Expected an array of " "Period");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of new_CapFloorTermVolSurface. "
          "Expected an array of " "Period");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(4),(void **) &v5, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg5 = v5;
      } else if (SvROK(ST(4))) {
        AV *av = (AV *)SvRV(ST(4));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 5 of new_CapFloorTermVolSurface. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp5.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 5 of "
              "new_CapFloorTermVolSurface. "
              "Expected an array of ""double");
          }
        }
        arg5 = &temp5;
      } else {
        SWIG_croak("Type error in argument 5 of new_CapFloorTermVolSurface. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(5),(void **) &v6, 
          SWIGTYPE_p_std__vectorT_std__vectorT_HandleT_Quote_t_t_t,1) != -1) {
        arg6 = v6;
      } else if (SvROK(ST(5))) {
        AV *av = (AV *)SvRV(ST(5));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 6 of new_CapFloorTermVolSurface. "
          "Expected an array of " "std::vector< Handle< Quote > >");
        SV **tv;
        I32 len = av_len(av) + 1;
        std::vector< Handle< Quote > >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,0) != -1) {
            temp6.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 6 of "
              "new_CapFloorTermVolSurface. "
              "Expected an array of " "std::vector< Handle< Quote > >");
          }
        }
        arg6 = &temp6;
      } else {
        SWIG_croak("Type error in argument 6 of new_CapFloorTermVolSurface. "
          "Expected an array of " "std::vector< Handle< Quote > >");
      }
    }
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_CapFloorTermVolSurface" "', argument " "7"" of type '" "DayCounter const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CapFloorTermVolSurface" "', argument " "7"" of type '" "DayCounter const &""'"); 
    }
    arg7 = reinterpret_cast< DayCounter * >(argp7);
    {
      try {
        result = (CapFloorTermVolSurfacePtr *)new_CapFloorTermVolSurfacePtr__SWIG_0(arg1,(Calendar const &)*arg2,arg3,(std::vector< Period > const &)*arg4,(std::vector< double > const &)*arg5,(std::vector< std::vector< Handle< Quote > > > const &)*arg6,(DayCounter const &)*arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CapFloorTermVolSurfacePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CapFloorTermVolSurface__SWIG_1) {
  {
    Natural arg1 ;
    Calendar *arg2 = 0 ;
    BusinessDayConvention arg3 ;
    std::vector< Period > *arg4 = 0 ;
    std::vector< Rate > *arg5 = 0 ;
    std::vector< std::vector< Handle< Quote > > > *arg6 = 0 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    std::vector< Period > temp4 ;
    std::vector< Period > *v4 ;
    std::vector< double > temp5 ;
    std::vector< double > *v5 ;
    std::vector< std::vector< Handle< Quote > > > temp6 ;
    std::vector< std::vector< Handle< Quote > > > *v6 ;
    int argvi = 0;
    CapFloorTermVolSurfacePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_CapFloorTermVolSurface(settlementDays,calendar,bdc,optionTenors,strikes,quotes);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_CapFloorTermVolSurface" "', argument " "1"" of type '" "Natural""'");
    } 
    arg1 = static_cast< Natural >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CapFloorTermVolSurface" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CapFloorTermVolSurface" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_CapFloorTermVolSurface" "', argument " "3"" of type '" "BusinessDayConvention""'");
    } 
    arg3 = static_cast< BusinessDayConvention >(val3);
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_Period_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of new_CapFloorTermVolSurface. "
          "Expected an array of " "Period");
        SV **tv;
        I32 len = av_len(av) + 1;
        Period* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Period,0) != -1) {
            temp4.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 4 of "
              "new_CapFloorTermVolSurface. "
              "Expected an array of " "Period");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of new_CapFloorTermVolSurface. "
          "Expected an array of " "Period");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(4),(void **) &v5, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg5 = v5;
      } else if (SvROK(ST(4))) {
        AV *av = (AV *)SvRV(ST(4));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 5 of new_CapFloorTermVolSurface. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp5.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 5 of "
              "new_CapFloorTermVolSurface. "
              "Expected an array of ""double");
          }
        }
        arg5 = &temp5;
      } else {
        SWIG_croak("Type error in argument 5 of new_CapFloorTermVolSurface. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(5),(void **) &v6, 
          SWIGTYPE_p_std__vectorT_std__vectorT_HandleT_Quote_t_t_t,1) != -1) {
        arg6 = v6;
      } else if (SvROK(ST(5))) {
        AV *av = (AV *)SvRV(ST(5));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 6 of new_CapFloorTermVolSurface. "
          "Expected an array of " "std::vector< Handle< Quote > >");
        SV **tv;
        I32 len = av_len(av) + 1;
        std::vector< Handle< Quote > >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,0) != -1) {
            temp6.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 6 of "
              "new_CapFloorTermVolSurface. "
              "Expected an array of " "std::vector< Handle< Quote > >");
          }
        }
        arg6 = &temp6;
      } else {
        SWIG_croak("Type error in argument 6 of new_CapFloorTermVolSurface. "
          "Expected an array of " "std::vector< Handle< Quote > >");
      }
    }
    {
      try {
        result = (CapFloorTermVolSurfacePtr *)new_CapFloorTermVolSurfacePtr__SWIG_0(arg1,(Calendar const &)*arg2,arg3,(std::vector< Period > const &)*arg4,(std::vector< double > const &)*arg5,(std::vector< std::vector< Handle< Quote > > > const &)*arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CapFloorTermVolSurfacePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CapFloorTermVolSurface__SWIG_2) {
  {
    Date *arg1 = 0 ;
    Calendar *arg2 = 0 ;
    BusinessDayConvention arg3 ;
    std::vector< Period > *arg4 = 0 ;
    std::vector< Rate > *arg5 = 0 ;
    std::vector< std::vector< Handle< Quote > > > *arg6 = 0 ;
    DayCounter *arg7 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    std::vector< Period > temp4 ;
    std::vector< Period > *v4 ;
    std::vector< double > temp5 ;
    std::vector< double > *v5 ;
    std::vector< std::vector< Handle< Quote > > > temp6 ;
    std::vector< std::vector< Handle< Quote > > > *v6 ;
    void *argp7 ;
    int res7 = 0 ;
    int argvi = 0;
    CapFloorTermVolSurfacePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: new_CapFloorTermVolSurface(settlementDate,calendar,bdc,optionTenors,strikes,quotes,dc);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CapFloorTermVolSurface" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CapFloorTermVolSurface" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CapFloorTermVolSurface" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CapFloorTermVolSurface" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_CapFloorTermVolSurface" "', argument " "3"" of type '" "BusinessDayConvention""'");
    } 
    arg3 = static_cast< BusinessDayConvention >(val3);
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_Period_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of new_CapFloorTermVolSurface. "
          "Expected an array of " "Period");
        SV **tv;
        I32 len = av_len(av) + 1;
        Period* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Period,0) != -1) {
            temp4.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 4 of "
              "new_CapFloorTermVolSurface. "
              "Expected an array of " "Period");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of new_CapFloorTermVolSurface. "
          "Expected an array of " "Period");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(4),(void **) &v5, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg5 = v5;
      } else if (SvROK(ST(4))) {
        AV *av = (AV *)SvRV(ST(4));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 5 of new_CapFloorTermVolSurface. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp5.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 5 of "
              "new_CapFloorTermVolSurface. "
              "Expected an array of ""double");
          }
        }
        arg5 = &temp5;
      } else {
        SWIG_croak("Type error in argument 5 of new_CapFloorTermVolSurface. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(5),(void **) &v6, 
          SWIGTYPE_p_std__vectorT_std__vectorT_HandleT_Quote_t_t_t,1) != -1) {
        arg6 = v6;
      } else if (SvROK(ST(5))) {
        AV *av = (AV *)SvRV(ST(5));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 6 of new_CapFloorTermVolSurface. "
          "Expected an array of " "std::vector< Handle< Quote > >");
        SV **tv;
        I32 len = av_len(av) + 1;
        std::vector< Handle< Quote > >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,0) != -1) {
            temp6.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 6 of "
              "new_CapFloorTermVolSurface. "
              "Expected an array of " "std::vector< Handle< Quote > >");
          }
        }
        arg6 = &temp6;
      } else {
        SWIG_croak("Type error in argument 6 of new_CapFloorTermVolSurface. "
          "Expected an array of " "std::vector< Handle< Quote > >");
      }
    }
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_CapFloorTermVolSurface" "', argument " "7"" of type '" "DayCounter const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CapFloorTermVolSurface" "', argument " "7"" of type '" "DayCounter const &""'"); 
    }
    arg7 = reinterpret_cast< DayCounter * >(argp7);
    {
      try {
        result = (CapFloorTermVolSurfacePtr *)new_CapFloorTermVolSurfacePtr__SWIG_2((Date const &)*arg1,(Calendar const &)*arg2,arg3,(std::vector< Period > const &)*arg4,(std::vector< double > const &)*arg5,(std::vector< std::vector< Handle< Quote > > > const &)*arg6,(DayCounter const &)*arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CapFloorTermVolSurfacePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CapFloorTermVolSurface__SWIG_3) {
  {
    Date *arg1 = 0 ;
    Calendar *arg2 = 0 ;
    BusinessDayConvention arg3 ;
    std::vector< Period > *arg4 = 0 ;
    std::vector< Rate > *arg5 = 0 ;
    std::vector< std::vector< Handle< Quote > > > *arg6 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    std::vector< Period > temp4 ;
    std::vector< Period > *v4 ;
    std::vector< double > temp5 ;
    std::vector< double > *v5 ;
    std::vector< std::vector< Handle< Quote > > > temp6 ;
    std::vector< std::vector< Handle< Quote > > > *v6 ;
    int argvi = 0;
    CapFloorTermVolSurfacePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_CapFloorTermVolSurface(settlementDate,calendar,bdc,optionTenors,strikes,quotes);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CapFloorTermVolSurface" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CapFloorTermVolSurface" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CapFloorTermVolSurface" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CapFloorTermVolSurface" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_CapFloorTermVolSurface" "', argument " "3"" of type '" "BusinessDayConvention""'");
    } 
    arg3 = static_cast< BusinessDayConvention >(val3);
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_Period_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of new_CapFloorTermVolSurface. "
          "Expected an array of " "Period");
        SV **tv;
        I32 len = av_len(av) + 1;
        Period* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Period,0) != -1) {
            temp4.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 4 of "
              "new_CapFloorTermVolSurface. "
              "Expected an array of " "Period");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of new_CapFloorTermVolSurface. "
          "Expected an array of " "Period");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(4),(void **) &v5, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg5 = v5;
      } else if (SvROK(ST(4))) {
        AV *av = (AV *)SvRV(ST(4));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 5 of new_CapFloorTermVolSurface. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp5.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 5 of "
              "new_CapFloorTermVolSurface. "
              "Expected an array of ""double");
          }
        }
        arg5 = &temp5;
      } else {
        SWIG_croak("Type error in argument 5 of new_CapFloorTermVolSurface. "
          "Expected an array of ""double");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(5),(void **) &v6, 
          SWIGTYPE_p_std__vectorT_std__vectorT_HandleT_Quote_t_t_t,1) != -1) {
        arg6 = v6;
      } else if (SvROK(ST(5))) {
        AV *av = (AV *)SvRV(ST(5));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 6 of new_CapFloorTermVolSurface. "
          "Expected an array of " "std::vector< Handle< Quote > >");
        SV **tv;
        I32 len = av_len(av) + 1;
        std::vector< Handle< Quote > >* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,0) != -1) {
            temp6.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 6 of "
              "new_CapFloorTermVolSurface. "
              "Expected an array of " "std::vector< Handle< Quote > >");
          }
        }
        arg6 = &temp6;
      } else {
        SWIG_croak("Type error in argument 6 of new_CapFloorTermVolSurface. "
          "Expected an array of " "std::vector< Handle< Quote > >");
      }
    }
    {
      try {
        result = (CapFloorTermVolSurfacePtr *)new_CapFloorTermVolSurfacePtr__SWIG_2((Date const &)*arg1,(Calendar const &)*arg2,arg3,(std::vector< Period > const &)*arg4,(std::vector< double > const &)*arg5,(std::vector< std::vector< Handle< Quote > > > const &)*arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CapFloorTermVolSurfacePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CapFloorTermVolSurface__SWIG_4) {
  {
    Date *arg1 = 0 ;
    Calendar *arg2 = 0 ;
    BusinessDayConvention arg3 ;
    std::vector< Period > *arg4 = 0 ;
    std::vector< Rate > *arg5 = 0 ;
    Matrix *arg6 = 0 ;
    DayCounter *arg7 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    std::vector< Period > temp4 ;
    std::vector< Period > *v4 ;
    std::vector< double > temp5 ;
    std::vector< double > *v5 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    int argvi = 0;
    CapFloorTermVolSurfacePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: new_CapFloorTermVolSurface(settlementDate,calendar,bdc,optionTenors,strikes,volatilities,dc);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CapFloorTermVolSurface" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CapFloorTermVolSurface" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CapFloorTermVolSurface" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CapFloorTermVolSurface" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_CapFloorTermVolSurface" "', argument " "3"" of type '" "BusinessDayConvention""'");
    } 
    arg3 = static_cast< BusinessDayConvention >(val3);
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_Period_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of new_CapFloorTermVolSurface. "
          "Expected an array of " "Period");
        SV **tv;
        I32 len = av_len(av) + 1;
        Period* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Period,0) != -1) {
            temp4.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 4 of "
              "new_CapFloorTermVolSurface. "
              "Expected an array of " "Period");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of new_CapFloorTermVolSurface. "
          "Expected an array of " "Period");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(4),(void **) &v5, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg5 = v5;
      } else if (SvROK(ST(4))) {
        AV *av = (AV *)SvRV(ST(4));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 5 of new_CapFloorTermVolSurface. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp5.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 5 of "
              "new_CapFloorTermVolSurface. "
              "Expected an array of ""double");
          }
        }
        arg5 = &temp5;
      } else {
        SWIG_croak("Type error in argument 5 of new_CapFloorTermVolSurface. "
          "Expected an array of ""double");
      }
    }
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_Matrix,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_CapFloorTermVolSurface" "', argument " "6"" of type '" "Matrix const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CapFloorTermVolSurface" "', argument " "6"" of type '" "Matrix const &""'"); 
    }
    arg6 = reinterpret_cast< Matrix * >(argp6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_CapFloorTermVolSurface" "', argument " "7"" of type '" "DayCounter const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CapFloorTermVolSurface" "', argument " "7"" of type '" "DayCounter const &""'"); 
    }
    arg7 = reinterpret_cast< DayCounter * >(argp7);
    {
      try {
        result = (CapFloorTermVolSurfacePtr *)new_CapFloorTermVolSurfacePtr__SWIG_4((Date const &)*arg1,(Calendar const &)*arg2,arg3,(std::vector< Period > const &)*arg4,(std::vector< double > const &)*arg5,(Matrix const &)*arg6,(DayCounter const &)*arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CapFloorTermVolSurfacePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CapFloorTermVolSurface__SWIG_5) {
  {
    Date *arg1 = 0 ;
    Calendar *arg2 = 0 ;
    BusinessDayConvention arg3 ;
    std::vector< Period > *arg4 = 0 ;
    std::vector< Rate > *arg5 = 0 ;
    Matrix *arg6 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    std::vector< Period > temp4 ;
    std::vector< Period > *v4 ;
    std::vector< double > temp5 ;
    std::vector< double > *v5 ;
    void *argp6 ;
    int res6 = 0 ;
    int argvi = 0;
    CapFloorTermVolSurfacePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_CapFloorTermVolSurface(settlementDate,calendar,bdc,optionTenors,strikes,volatilities);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CapFloorTermVolSurface" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CapFloorTermVolSurface" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CapFloorTermVolSurface" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CapFloorTermVolSurface" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_CapFloorTermVolSurface" "', argument " "3"" of type '" "BusinessDayConvention""'");
    } 
    arg3 = static_cast< BusinessDayConvention >(val3);
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_Period_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of new_CapFloorTermVolSurface. "
          "Expected an array of " "Period");
        SV **tv;
        I32 len = av_len(av) + 1;
        Period* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Period,0) != -1) {
            temp4.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 4 of "
              "new_CapFloorTermVolSurface. "
              "Expected an array of " "Period");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of new_CapFloorTermVolSurface. "
          "Expected an array of " "Period");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(4),(void **) &v5, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg5 = v5;
      } else if (SvROK(ST(4))) {
        AV *av = (AV *)SvRV(ST(4));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 5 of new_CapFloorTermVolSurface. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp5.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 5 of "
              "new_CapFloorTermVolSurface. "
              "Expected an array of ""double");
          }
        }
        arg5 = &temp5;
      } else {
        SWIG_croak("Type error in argument 5 of new_CapFloorTermVolSurface. "
          "Expected an array of ""double");
      }
    }
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_Matrix,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_CapFloorTermVolSurface" "', argument " "6"" of type '" "Matrix const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CapFloorTermVolSurface" "', argument " "6"" of type '" "Matrix const &""'"); 
    }
    arg6 = reinterpret_cast< Matrix * >(argp6);
    {
      try {
        result = (CapFloorTermVolSurfacePtr *)new_CapFloorTermVolSurfacePtr__SWIG_4((Date const &)*arg1,(Calendar const &)*arg2,arg3,(std::vector< Period > const &)*arg4,(std::vector< double > const &)*arg5,(Matrix const &)*arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CapFloorTermVolSurfacePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CapFloorTermVolSurface__SWIG_6) {
  {
    Natural arg1 ;
    Calendar *arg2 = 0 ;
    BusinessDayConvention arg3 ;
    std::vector< Period > *arg4 = 0 ;
    std::vector< Rate > *arg5 = 0 ;
    Matrix *arg6 = 0 ;
    DayCounter *arg7 = 0 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    std::vector< Period > temp4 ;
    std::vector< Period > *v4 ;
    std::vector< double > temp5 ;
    std::vector< double > *v5 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    int argvi = 0;
    CapFloorTermVolSurfacePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: new_CapFloorTermVolSurface(settlementDays,calendar,bdc,optionTenors,strikes,volatilities,dc);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_CapFloorTermVolSurface" "', argument " "1"" of type '" "Natural""'");
    } 
    arg1 = static_cast< Natural >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CapFloorTermVolSurface" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CapFloorTermVolSurface" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_CapFloorTermVolSurface" "', argument " "3"" of type '" "BusinessDayConvention""'");
    } 
    arg3 = static_cast< BusinessDayConvention >(val3);
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_Period_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of new_CapFloorTermVolSurface. "
          "Expected an array of " "Period");
        SV **tv;
        I32 len = av_len(av) + 1;
        Period* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Period,0) != -1) {
            temp4.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 4 of "
              "new_CapFloorTermVolSurface. "
              "Expected an array of " "Period");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of new_CapFloorTermVolSurface. "
          "Expected an array of " "Period");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(4),(void **) &v5, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg5 = v5;
      } else if (SvROK(ST(4))) {
        AV *av = (AV *)SvRV(ST(4));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 5 of new_CapFloorTermVolSurface. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp5.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 5 of "
              "new_CapFloorTermVolSurface. "
              "Expected an array of ""double");
          }
        }
        arg5 = &temp5;
      } else {
        SWIG_croak("Type error in argument 5 of new_CapFloorTermVolSurface. "
          "Expected an array of ""double");
      }
    }
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_Matrix,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_CapFloorTermVolSurface" "', argument " "6"" of type '" "Matrix const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CapFloorTermVolSurface" "', argument " "6"" of type '" "Matrix const &""'"); 
    }
    arg6 = reinterpret_cast< Matrix * >(argp6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_CapFloorTermVolSurface" "', argument " "7"" of type '" "DayCounter const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CapFloorTermVolSurface" "', argument " "7"" of type '" "DayCounter const &""'"); 
    }
    arg7 = reinterpret_cast< DayCounter * >(argp7);
    {
      try {
        result = (CapFloorTermVolSurfacePtr *)new_CapFloorTermVolSurfacePtr__SWIG_6(arg1,(Calendar const &)*arg2,arg3,(std::vector< Period > const &)*arg4,(std::vector< double > const &)*arg5,(Matrix const &)*arg6,(DayCounter const &)*arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CapFloorTermVolSurfacePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CapFloorTermVolSurface__SWIG_7) {
  {
    Natural arg1 ;
    Calendar *arg2 = 0 ;
    BusinessDayConvention arg3 ;
    std::vector< Period > *arg4 = 0 ;
    std::vector< Rate > *arg5 = 0 ;
    Matrix *arg6 = 0 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    std::vector< Period > temp4 ;
    std::vector< Period > *v4 ;
    std::vector< double > temp5 ;
    std::vector< double > *v5 ;
    void *argp6 ;
    int res6 = 0 ;
    int argvi = 0;
    CapFloorTermVolSurfacePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_CapFloorTermVolSurface(settlementDays,calendar,bdc,optionTenors,strikes,volatilities);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_CapFloorTermVolSurface" "', argument " "1"" of type '" "Natural""'");
    } 
    arg1 = static_cast< Natural >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CapFloorTermVolSurface" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CapFloorTermVolSurface" "', argument " "2"" of type '" "Calendar const &""'"); 
    }
    arg2 = reinterpret_cast< Calendar * >(argp2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_CapFloorTermVolSurface" "', argument " "3"" of type '" "BusinessDayConvention""'");
    } 
    arg3 = static_cast< BusinessDayConvention >(val3);
    {
      if (SWIG_ConvertPtr(ST(3),(void **) &v4, 
          SWIGTYPE_p_std__vectorT_Period_t,1) != -1) {
        arg4 = v4;
      } else if (SvROK(ST(3))) {
        AV *av = (AV *)SvRV(ST(3));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 4 of new_CapFloorTermVolSurface. "
          "Expected an array of " "Period");
        SV **tv;
        I32 len = av_len(av) + 1;
        Period* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Period,0) != -1) {
            temp4.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 4 of "
              "new_CapFloorTermVolSurface. "
              "Expected an array of " "Period");
          }
        }
        arg4 = &temp4;
      } else {
        SWIG_croak("Type error in argument 4 of new_CapFloorTermVolSurface. "
          "Expected an array of " "Period");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(4),(void **) &v5, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg5 = v5;
      } else if (SvROK(ST(4))) {
        AV *av = (AV *)SvRV(ST(4));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 5 of new_CapFloorTermVolSurface. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp5.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 5 of "
              "new_CapFloorTermVolSurface. "
              "Expected an array of ""double");
          }
        }
        arg5 = &temp5;
      } else {
        SWIG_croak("Type error in argument 5 of new_CapFloorTermVolSurface. "
          "Expected an array of ""double");
      }
    }
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_Matrix,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_CapFloorTermVolSurface" "', argument " "6"" of type '" "Matrix const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CapFloorTermVolSurface" "', argument " "6"" of type '" "Matrix const &""'"); 
    }
    arg6 = reinterpret_cast< Matrix * >(argp6);
    {
      try {
        result = (CapFloorTermVolSurfacePtr *)new_CapFloorTermVolSurfacePtr__SWIG_6(arg1,(Calendar const &)*arg2,arg3,(std::vector< Period > const &)*arg4,(std::vector< double > const &)*arg5,(Matrix const &)*arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CapFloorTermVolSurfacePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CapFloorTermVolSurface) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Period >* v;
            if (SWIG_ConvertPtr(ST(3),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Period_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(3))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(3));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Period* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Period,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(4),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(4))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(4));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_Matrix, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Period >* v;
            if (SWIG_ConvertPtr(ST(3),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Period_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(3))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(3));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Period* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Period,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(4),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(4))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(4));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< std::vector< Handle< Quote > > >* v;
            if (SWIG_ConvertPtr(ST(5),(void **) &v, 
                SWIGTYPE_p_std__vectorT_std__vectorT_HandleT_Quote_t_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(5))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(5));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  std::vector< Handle< Quote > >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Period >* v;
            if (SWIG_ConvertPtr(ST(3),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Period_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(3))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(3));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Period* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Period,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(4),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(4))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(4));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_Matrix, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Period >* v;
            if (SWIG_ConvertPtr(ST(3),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Period_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(3))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(3));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Period* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Period,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(4),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(4))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(4));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< std::vector< Handle< Quote > > >* v;
            if (SWIG_ConvertPtr(ST(5),(void **) &v, 
                SWIGTYPE_p_std__vectorT_std__vectorT_HandleT_Quote_t_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(5))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(5));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  std::vector< Handle< Quote > >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Period >* v;
            if (SWIG_ConvertPtr(ST(3),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Period_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(3))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(3));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Period* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Period,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(4),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(4))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(4));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_Matrix, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Period >* v;
            if (SWIG_ConvertPtr(ST(3),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Period_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(3))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(3));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Period* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Period,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(4),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(4))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(4));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< std::vector< Handle< Quote > > >* v;
            if (SWIG_ConvertPtr(ST(5),(void **) &v, 
                SWIGTYPE_p_std__vectorT_std__vectorT_HandleT_Quote_t_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(5))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(5));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  std::vector< Handle< Quote > >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Period >* v;
            if (SWIG_ConvertPtr(ST(3),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Period_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(3))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(3));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Period* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Period,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(4),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(4))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(4));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_Matrix, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 7;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_7:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Period >* v;
            if (SWIG_ConvertPtr(ST(3),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Period_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(3))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(3));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Period* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Period,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(4),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(4))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(4));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< std::vector< Handle< Quote > > >* v;
            if (SWIG_ConvertPtr(ST(5),(void **) &v, 
                SWIGTYPE_p_std__vectorT_std__vectorT_HandleT_Quote_t_t_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(5))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(5));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  std::vector< Handle< Quote > >* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 8;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_8:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_CapFloorTermVolSurface__SWIG_5); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_CapFloorTermVolSurface__SWIG_3); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_CapFloorTermVolSurface__SWIG_7); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_CapFloorTermVolSurface__SWIG_1); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_CapFloorTermVolSurface__SWIG_4); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_CapFloorTermVolSurface__SWIG_2); return;
    case 7:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_CapFloorTermVolSurface__SWIG_6); return;
    case 8:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_CapFloorTermVolSurface__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_CapFloorTermVolSurface'");
  XSRETURN(0);
}


XS(_wrap_delete_CapFloorTermVolSurface) {
  {
    CapFloorTermVolSurfacePtr *arg1 = (CapFloorTermVolSurfacePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_CapFloorTermVolSurface(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CapFloorTermVolSurfacePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CapFloorTermVolSurface" "', argument " "1"" of type '" "CapFloorTermVolSurfacePtr *""'"); 
    }
    arg1 = reinterpret_cast< CapFloorTermVolSurfacePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_StrippedOptionletBase___deref__) {
  {
    boost::shared_ptr< StrippedOptionletBase > *arg1 = (boost::shared_ptr< StrippedOptionletBase > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    StrippedOptionletBase *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: StrippedOptionletBase___deref__(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_StrippedOptionletBase_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrippedOptionletBase___deref__" "', argument " "1"" of type '" "boost::shared_ptr< StrippedOptionletBase > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< StrippedOptionletBase > * >(argp1);
    {
      try {
        result = (StrippedOptionletBase *)(arg1)->operator ->();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_StrippedOptionletBase, 0 | 0); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_StrippedOptionletBase_isNull) {
  {
    boost::shared_ptr< StrippedOptionletBase > *arg1 = (boost::shared_ptr< StrippedOptionletBase > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: StrippedOptionletBase_isNull(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_StrippedOptionletBase_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrippedOptionletBase_isNull" "', argument " "1"" of type '" "boost::shared_ptr< StrippedOptionletBase > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< StrippedOptionletBase > * >(argp1);
    {
      try {
        result = (bool)boost_shared_ptr_Sl_StrippedOptionletBase_Sg__isNull(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_StrippedOptionletBase) {
  {
    int argvi = 0;
    boost::shared_ptr< StrippedOptionletBase > *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_StrippedOptionletBase();");
    }
    {
      try {
        result = (boost::shared_ptr< StrippedOptionletBase > *)new boost::shared_ptr< StrippedOptionletBase >();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_boost__shared_ptrT_StrippedOptionletBase_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_StrippedOptionletBase) {
  {
    boost::shared_ptr< StrippedOptionletBase > *arg1 = (boost::shared_ptr< StrippedOptionletBase > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_StrippedOptionletBase(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_StrippedOptionletBase_t, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_StrippedOptionletBase" "', argument " "1"" of type '" "boost::shared_ptr< StrippedOptionletBase > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< StrippedOptionletBase > * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_StrippedOptionletBase_optionletStrikes) {
  {
    boost::shared_ptr< StrippedOptionletBase > *arg1 = (boost::shared_ptr< StrippedOptionletBase > *) 0 ;
    Size arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    std::vector< Rate > *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: StrippedOptionletBase_optionletStrikes(self,i);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_StrippedOptionletBase_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrippedOptionletBase_optionletStrikes" "', argument " "1"" of type '" "boost::shared_ptr< StrippedOptionletBase > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< StrippedOptionletBase > * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StrippedOptionletBase_optionletStrikes" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    {
      try {
        result = (std::vector< Rate > *) &(*arg1)->optionletStrikes(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_t, 0 | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_StrippedOptionletBase_optionletVolatilities) {
  {
    boost::shared_ptr< StrippedOptionletBase > *arg1 = (boost::shared_ptr< StrippedOptionletBase > *) 0 ;
    Size arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    std::vector< Volatility > *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: StrippedOptionletBase_optionletVolatilities(self,i);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_StrippedOptionletBase_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrippedOptionletBase_optionletVolatilities" "', argument " "1"" of type '" "boost::shared_ptr< StrippedOptionletBase > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< StrippedOptionletBase > * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StrippedOptionletBase_optionletVolatilities" "', argument " "2"" of type '" "Size""'");
    } 
    arg2 = static_cast< Size >(val2);
    {
      try {
        result = (std::vector< Volatility > *) &(*arg1)->optionletVolatilities(arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_t, 0 | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_StrippedOptionletBase_optionletFixingDates) {
  {
    boost::shared_ptr< StrippedOptionletBase > *arg1 = (boost::shared_ptr< StrippedOptionletBase > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Date > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: StrippedOptionletBase_optionletFixingDates(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_StrippedOptionletBase_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrippedOptionletBase_optionletFixingDates" "', argument " "1"" of type '" "boost::shared_ptr< StrippedOptionletBase > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< StrippedOptionletBase > * >(argp1);
    {
      try {
        result = (std::vector< Date > *) &(*arg1)->optionletFixingDates();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_Date_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_StrippedOptionletBase_optionletFixingTimes) {
  {
    boost::shared_ptr< StrippedOptionletBase > *arg1 = (boost::shared_ptr< StrippedOptionletBase > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Time > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: StrippedOptionletBase_optionletFixingTimes(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_StrippedOptionletBase_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrippedOptionletBase_optionletFixingTimes" "', argument " "1"" of type '" "boost::shared_ptr< StrippedOptionletBase > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< StrippedOptionletBase > * >(argp1);
    {
      try {
        result = (std::vector< Time > *) &(*arg1)->optionletFixingTimes();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_StrippedOptionletBase_optionletMaturities) {
  {
    boost::shared_ptr< StrippedOptionletBase > *arg1 = (boost::shared_ptr< StrippedOptionletBase > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Size result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: StrippedOptionletBase_optionletMaturities(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_StrippedOptionletBase_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrippedOptionletBase_optionletMaturities" "', argument " "1"" of type '" "boost::shared_ptr< StrippedOptionletBase > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< StrippedOptionletBase > * >(argp1);
    {
      try {
        result = (*arg1)->optionletMaturities();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_size_t  SWIG_PERL_CALL_ARGS_1(static_cast< size_t >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_StrippedOptionletBase_atmOptionletRates) {
  {
    boost::shared_ptr< StrippedOptionletBase > *arg1 = (boost::shared_ptr< StrippedOptionletBase > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Rate > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: StrippedOptionletBase_atmOptionletRates(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_StrippedOptionletBase_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrippedOptionletBase_atmOptionletRates" "', argument " "1"" of type '" "boost::shared_ptr< StrippedOptionletBase > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< StrippedOptionletBase > * >(argp1);
    {
      try {
        result = (std::vector< Rate > *) &(*arg1)->atmOptionletRates();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_StrippedOptionletBase_dayCounter) {
  {
    boost::shared_ptr< StrippedOptionletBase > *arg1 = (boost::shared_ptr< StrippedOptionletBase > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    SwigValueWrapper< DayCounter > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: StrippedOptionletBase_dayCounter(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_StrippedOptionletBase_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrippedOptionletBase_dayCounter" "', argument " "1"" of type '" "boost::shared_ptr< StrippedOptionletBase > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< StrippedOptionletBase > * >(argp1);
    {
      try {
        result = (*arg1)->dayCounter();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new DayCounter(static_cast< const DayCounter& >(result))), SWIGTYPE_p_DayCounter, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_StrippedOptionletBase_calendar) {
  {
    boost::shared_ptr< StrippedOptionletBase > *arg1 = (boost::shared_ptr< StrippedOptionletBase > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    SwigValueWrapper< Calendar > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: StrippedOptionletBase_calendar(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_StrippedOptionletBase_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrippedOptionletBase_calendar" "', argument " "1"" of type '" "boost::shared_ptr< StrippedOptionletBase > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< StrippedOptionletBase > * >(argp1);
    {
      try {
        result = (*arg1)->calendar();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Calendar(static_cast< const Calendar& >(result))), SWIGTYPE_p_Calendar, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_StrippedOptionletBase_settlementDays) {
  {
    boost::shared_ptr< StrippedOptionletBase > *arg1 = (boost::shared_ptr< StrippedOptionletBase > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Natural result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: StrippedOptionletBase_settlementDays(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_StrippedOptionletBase_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrippedOptionletBase_settlementDays" "', argument " "1"" of type '" "boost::shared_ptr< StrippedOptionletBase > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< StrippedOptionletBase > * >(argp1);
    {
      try {
        result = (Natural)(*arg1)->settlementDays();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_StrippedOptionletBase_businessDayConvention) {
  {
    boost::shared_ptr< StrippedOptionletBase > *arg1 = (boost::shared_ptr< StrippedOptionletBase > *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    BusinessDayConvention result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: StrippedOptionletBase_businessDayConvention(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_boost__shared_ptrT_StrippedOptionletBase_t, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StrippedOptionletBase_businessDayConvention" "', argument " "1"" of type '" "boost::shared_ptr< StrippedOptionletBase > *""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< StrippedOptionletBase > * >(argp1);
    {
      try {
        result = (BusinessDayConvention)(*arg1)->businessDayConvention();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_OptionletStripper1__SWIG_0) {
  {
    CapFloorTermVolSurfacePtr *arg1 = 0 ;
    IborIndexPtr *arg2 = 0 ;
    Rate arg3 ;
    Real arg4 ;
    Natural arg5 ;
    Handle< YieldTermStructure > *arg6 = 0 ;
    VolatilityType arg7 ;
    Real arg8 ;
    bool arg9 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    unsigned int val5 ;
    int ecode5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    int val7 ;
    int ecode7 = 0 ;
    double val8 ;
    int ecode8 = 0 ;
    bool val9 ;
    int ecode9 = 0 ;
    int argvi = 0;
    OptionletStripper1Ptr *result = 0 ;
    dXSARGS;
    
    if ((items < 9) || (items > 9)) {
      SWIG_croak("Usage: new_OptionletStripper1(parVolSurface,index,switchStrikes,accuracy,maxIter,discount,type,displacement,dontThrow);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_CapFloorTermVolSurfacePtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_OptionletStripper1" "', argument " "1"" of type '" "CapFloorTermVolSurfacePtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_OptionletStripper1" "', argument " "1"" of type '" "CapFloorTermVolSurfacePtr const &""'"); 
    }
    arg1 = reinterpret_cast< CapFloorTermVolSurfacePtr * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_IborIndexPtr,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_OptionletStripper1" "', argument " "2"" of type '" "IborIndexPtr const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_OptionletStripper1" "', argument " "2"" of type '" "IborIndexPtr const &""'"); 
    }
    arg2 = reinterpret_cast< IborIndexPtr * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_OptionletStripper1" "', argument " "3"" of type '" "Rate""'");
    } 
    arg3 = static_cast< Rate >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_OptionletStripper1" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    ecode5 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_OptionletStripper1" "', argument " "5"" of type '" "Natural""'");
    } 
    arg5 = static_cast< Natural >(val5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_OptionletStripper1" "', argument " "6"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_OptionletStripper1" "', argument " "6"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg6 = reinterpret_cast< Handle< YieldTermStructure > * >(argp6);
    ecode7 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_OptionletStripper1" "', argument " "7"" of type '" "VolatilityType""'");
    } 
    arg7 = static_cast< VolatilityType >(val7);
    ecode8 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_OptionletStripper1" "', argument " "8"" of type '" "Real""'");
    } 
    arg8 = static_cast< Real >(val8);
    ecode9 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(8), &val9);
    if (!SWIG_IsOK(ecode9)) {
      SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "new_OptionletStripper1" "', argument " "9"" of type '" "bool""'");
    } 
    arg9 = static_cast< bool >(val9);
    {
      try {
        result = (OptionletStripper1Ptr *)new_OptionletStripper1Ptr__SWIG_0((CapFloorTermVolSurfacePtr const &)*arg1,(IborIndexPtr const &)*arg2,arg3,arg4,arg5,(Handle< YieldTermStructure > const &)*arg6,arg7,arg8,arg9);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OptionletStripper1Ptr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_OptionletStripper1__SWIG_1) {
  {
    CapFloorTermVolSurfacePtr *arg1 = 0 ;
    IborIndexPtr *arg2 = 0 ;
    Rate arg3 ;
    Real arg4 ;
    Natural arg5 ;
    Handle< YieldTermStructure > *arg6 = 0 ;
    VolatilityType arg7 ;
    Real arg8 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    unsigned int val5 ;
    int ecode5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    int val7 ;
    int ecode7 = 0 ;
    double val8 ;
    int ecode8 = 0 ;
    int argvi = 0;
    OptionletStripper1Ptr *result = 0 ;
    dXSARGS;
    
    if ((items < 8) || (items > 8)) {
      SWIG_croak("Usage: new_OptionletStripper1(parVolSurface,index,switchStrikes,accuracy,maxIter,discount,type,displacement);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_CapFloorTermVolSurfacePtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_OptionletStripper1" "', argument " "1"" of type '" "CapFloorTermVolSurfacePtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_OptionletStripper1" "', argument " "1"" of type '" "CapFloorTermVolSurfacePtr const &""'"); 
    }
    arg1 = reinterpret_cast< CapFloorTermVolSurfacePtr * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_IborIndexPtr,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_OptionletStripper1" "', argument " "2"" of type '" "IborIndexPtr const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_OptionletStripper1" "', argument " "2"" of type '" "IborIndexPtr const &""'"); 
    }
    arg2 = reinterpret_cast< IborIndexPtr * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_OptionletStripper1" "', argument " "3"" of type '" "Rate""'");
    } 
    arg3 = static_cast< Rate >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_OptionletStripper1" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    ecode5 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_OptionletStripper1" "', argument " "5"" of type '" "Natural""'");
    } 
    arg5 = static_cast< Natural >(val5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_OptionletStripper1" "', argument " "6"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_OptionletStripper1" "', argument " "6"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg6 = reinterpret_cast< Handle< YieldTermStructure > * >(argp6);
    ecode7 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_OptionletStripper1" "', argument " "7"" of type '" "VolatilityType""'");
    } 
    arg7 = static_cast< VolatilityType >(val7);
    ecode8 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_OptionletStripper1" "', argument " "8"" of type '" "Real""'");
    } 
    arg8 = static_cast< Real >(val8);
    {
      try {
        result = (OptionletStripper1Ptr *)new_OptionletStripper1Ptr__SWIG_0((CapFloorTermVolSurfacePtr const &)*arg1,(IborIndexPtr const &)*arg2,arg3,arg4,arg5,(Handle< YieldTermStructure > const &)*arg6,arg7,arg8);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OptionletStripper1Ptr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_OptionletStripper1__SWIG_2) {
  {
    CapFloorTermVolSurfacePtr *arg1 = 0 ;
    IborIndexPtr *arg2 = 0 ;
    Rate arg3 ;
    Real arg4 ;
    Natural arg5 ;
    Handle< YieldTermStructure > *arg6 = 0 ;
    VolatilityType arg7 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    unsigned int val5 ;
    int ecode5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    int val7 ;
    int ecode7 = 0 ;
    int argvi = 0;
    OptionletStripper1Ptr *result = 0 ;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: new_OptionletStripper1(parVolSurface,index,switchStrikes,accuracy,maxIter,discount,type);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_CapFloorTermVolSurfacePtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_OptionletStripper1" "', argument " "1"" of type '" "CapFloorTermVolSurfacePtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_OptionletStripper1" "', argument " "1"" of type '" "CapFloorTermVolSurfacePtr const &""'"); 
    }
    arg1 = reinterpret_cast< CapFloorTermVolSurfacePtr * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_IborIndexPtr,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_OptionletStripper1" "', argument " "2"" of type '" "IborIndexPtr const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_OptionletStripper1" "', argument " "2"" of type '" "IborIndexPtr const &""'"); 
    }
    arg2 = reinterpret_cast< IborIndexPtr * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_OptionletStripper1" "', argument " "3"" of type '" "Rate""'");
    } 
    arg3 = static_cast< Rate >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_OptionletStripper1" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    ecode5 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_OptionletStripper1" "', argument " "5"" of type '" "Natural""'");
    } 
    arg5 = static_cast< Natural >(val5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_OptionletStripper1" "', argument " "6"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_OptionletStripper1" "', argument " "6"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg6 = reinterpret_cast< Handle< YieldTermStructure > * >(argp6);
    ecode7 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_OptionletStripper1" "', argument " "7"" of type '" "VolatilityType""'");
    } 
    arg7 = static_cast< VolatilityType >(val7);
    {
      try {
        result = (OptionletStripper1Ptr *)new_OptionletStripper1Ptr__SWIG_0((CapFloorTermVolSurfacePtr const &)*arg1,(IborIndexPtr const &)*arg2,arg3,arg4,arg5,(Handle< YieldTermStructure > const &)*arg6,arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OptionletStripper1Ptr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_OptionletStripper1__SWIG_3) {
  {
    CapFloorTermVolSurfacePtr *arg1 = 0 ;
    IborIndexPtr *arg2 = 0 ;
    Rate arg3 ;
    Real arg4 ;
    Natural arg5 ;
    Handle< YieldTermStructure > *arg6 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    unsigned int val5 ;
    int ecode5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    int argvi = 0;
    OptionletStripper1Ptr *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_OptionletStripper1(parVolSurface,index,switchStrikes,accuracy,maxIter,discount);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_CapFloorTermVolSurfacePtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_OptionletStripper1" "', argument " "1"" of type '" "CapFloorTermVolSurfacePtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_OptionletStripper1" "', argument " "1"" of type '" "CapFloorTermVolSurfacePtr const &""'"); 
    }
    arg1 = reinterpret_cast< CapFloorTermVolSurfacePtr * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_IborIndexPtr,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_OptionletStripper1" "', argument " "2"" of type '" "IborIndexPtr const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_OptionletStripper1" "', argument " "2"" of type '" "IborIndexPtr const &""'"); 
    }
    arg2 = reinterpret_cast< IborIndexPtr * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_OptionletStripper1" "', argument " "3"" of type '" "Rate""'");
    } 
    arg3 = static_cast< Rate >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_OptionletStripper1" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    ecode5 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_OptionletStripper1" "', argument " "5"" of type '" "Natural""'");
    } 
    arg5 = static_cast< Natural >(val5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_OptionletStripper1" "', argument " "6"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_OptionletStripper1" "', argument " "6"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg6 = reinterpret_cast< Handle< YieldTermStructure > * >(argp6);
    {
      try {
        result = (OptionletStripper1Ptr *)new_OptionletStripper1Ptr__SWIG_0((CapFloorTermVolSurfacePtr const &)*arg1,(IborIndexPtr const &)*arg2,arg3,arg4,arg5,(Handle< YieldTermStructure > const &)*arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OptionletStripper1Ptr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_OptionletStripper1__SWIG_4) {
  {
    CapFloorTermVolSurfacePtr *arg1 = 0 ;
    IborIndexPtr *arg2 = 0 ;
    Rate arg3 ;
    Real arg4 ;
    Natural arg5 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    unsigned int val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    OptionletStripper1Ptr *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_OptionletStripper1(parVolSurface,index,switchStrikes,accuracy,maxIter);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_CapFloorTermVolSurfacePtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_OptionletStripper1" "', argument " "1"" of type '" "CapFloorTermVolSurfacePtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_OptionletStripper1" "', argument " "1"" of type '" "CapFloorTermVolSurfacePtr const &""'"); 
    }
    arg1 = reinterpret_cast< CapFloorTermVolSurfacePtr * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_IborIndexPtr,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_OptionletStripper1" "', argument " "2"" of type '" "IborIndexPtr const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_OptionletStripper1" "', argument " "2"" of type '" "IborIndexPtr const &""'"); 
    }
    arg2 = reinterpret_cast< IborIndexPtr * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_OptionletStripper1" "', argument " "3"" of type '" "Rate""'");
    } 
    arg3 = static_cast< Rate >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_OptionletStripper1" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    ecode5 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_OptionletStripper1" "', argument " "5"" of type '" "Natural""'");
    } 
    arg5 = static_cast< Natural >(val5);
    {
      try {
        result = (OptionletStripper1Ptr *)new_OptionletStripper1Ptr__SWIG_0((CapFloorTermVolSurfacePtr const &)*arg1,(IborIndexPtr const &)*arg2,arg3,arg4,arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OptionletStripper1Ptr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_OptionletStripper1__SWIG_5) {
  {
    CapFloorTermVolSurfacePtr *arg1 = 0 ;
    IborIndexPtr *arg2 = 0 ;
    Rate arg3 ;
    Real arg4 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    OptionletStripper1Ptr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_OptionletStripper1(parVolSurface,index,switchStrikes,accuracy);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_CapFloorTermVolSurfacePtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_OptionletStripper1" "', argument " "1"" of type '" "CapFloorTermVolSurfacePtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_OptionletStripper1" "', argument " "1"" of type '" "CapFloorTermVolSurfacePtr const &""'"); 
    }
    arg1 = reinterpret_cast< CapFloorTermVolSurfacePtr * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_IborIndexPtr,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_OptionletStripper1" "', argument " "2"" of type '" "IborIndexPtr const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_OptionletStripper1" "', argument " "2"" of type '" "IborIndexPtr const &""'"); 
    }
    arg2 = reinterpret_cast< IborIndexPtr * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_OptionletStripper1" "', argument " "3"" of type '" "Rate""'");
    } 
    arg3 = static_cast< Rate >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_OptionletStripper1" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    {
      try {
        result = (OptionletStripper1Ptr *)new_OptionletStripper1Ptr__SWIG_0((CapFloorTermVolSurfacePtr const &)*arg1,(IborIndexPtr const &)*arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OptionletStripper1Ptr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_OptionletStripper1__SWIG_6) {
  {
    CapFloorTermVolSurfacePtr *arg1 = 0 ;
    IborIndexPtr *arg2 = 0 ;
    Rate arg3 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    OptionletStripper1Ptr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_OptionletStripper1(parVolSurface,index,switchStrikes);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_CapFloorTermVolSurfacePtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_OptionletStripper1" "', argument " "1"" of type '" "CapFloorTermVolSurfacePtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_OptionletStripper1" "', argument " "1"" of type '" "CapFloorTermVolSurfacePtr const &""'"); 
    }
    arg1 = reinterpret_cast< CapFloorTermVolSurfacePtr * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_IborIndexPtr,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_OptionletStripper1" "', argument " "2"" of type '" "IborIndexPtr const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_OptionletStripper1" "', argument " "2"" of type '" "IborIndexPtr const &""'"); 
    }
    arg2 = reinterpret_cast< IborIndexPtr * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_OptionletStripper1" "', argument " "3"" of type '" "Rate""'");
    } 
    arg3 = static_cast< Rate >(val3);
    {
      try {
        result = (OptionletStripper1Ptr *)new_OptionletStripper1Ptr__SWIG_0((CapFloorTermVolSurfacePtr const &)*arg1,(IborIndexPtr const &)*arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OptionletStripper1Ptr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_OptionletStripper1__SWIG_7) {
  {
    CapFloorTermVolSurfacePtr *arg1 = 0 ;
    IborIndexPtr *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    OptionletStripper1Ptr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_OptionletStripper1(parVolSurface,index);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_CapFloorTermVolSurfacePtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_OptionletStripper1" "', argument " "1"" of type '" "CapFloorTermVolSurfacePtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_OptionletStripper1" "', argument " "1"" of type '" "CapFloorTermVolSurfacePtr const &""'"); 
    }
    arg1 = reinterpret_cast< CapFloorTermVolSurfacePtr * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_IborIndexPtr,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_OptionletStripper1" "', argument " "2"" of type '" "IborIndexPtr const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_OptionletStripper1" "', argument " "2"" of type '" "IborIndexPtr const &""'"); 
    }
    arg2 = reinterpret_cast< IborIndexPtr * >(argp2);
    {
      try {
        result = (OptionletStripper1Ptr *)new_OptionletStripper1Ptr__SWIG_0((CapFloorTermVolSurfacePtr const &)*arg1,(IborIndexPtr const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OptionletStripper1Ptr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_OptionletStripper1) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_CapFloorTermVolSurfacePtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_IborIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_CapFloorTermVolSurfacePtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_IborIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_CapFloorTermVolSurfacePtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_IborIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_CapFloorTermVolSurfacePtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_IborIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_CapFloorTermVolSurfacePtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_IborIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_CapFloorTermVolSurfacePtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_IborIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
    if (items == 8) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_CapFloorTermVolSurfacePtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_IborIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 7;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_7:
    
    if (items == 9) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_CapFloorTermVolSurfacePtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_IborIndexPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(8), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 8;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_8:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_OptionletStripper1__SWIG_7); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_OptionletStripper1__SWIG_6); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_OptionletStripper1__SWIG_5); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_OptionletStripper1__SWIG_4); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_OptionletStripper1__SWIG_3); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_OptionletStripper1__SWIG_2); return;
    case 7:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_OptionletStripper1__SWIG_1); return;
    case 8:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_OptionletStripper1__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_OptionletStripper1'");
  XSRETURN(0);
}


XS(_wrap_OptionletStripper1_capFloorPrices) {
  {
    OptionletStripper1Ptr *arg1 = (OptionletStripper1Ptr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Matrix *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: OptionletStripper1_capFloorPrices(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OptionletStripper1Ptr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OptionletStripper1_capFloorPrices" "', argument " "1"" of type '" "OptionletStripper1Ptr const *""'"); 
    }
    arg1 = reinterpret_cast< OptionletStripper1Ptr * >(argp1);
    {
      try {
        result = (Matrix *) &OptionletStripper1Ptr_capFloorPrices((OptionletStripper1Ptr const *)arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Matrix, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_OptionletStripper1_capFloorVolatilities) {
  {
    OptionletStripper1Ptr *arg1 = (OptionletStripper1Ptr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Matrix *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: OptionletStripper1_capFloorVolatilities(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OptionletStripper1Ptr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OptionletStripper1_capFloorVolatilities" "', argument " "1"" of type '" "OptionletStripper1Ptr const *""'"); 
    }
    arg1 = reinterpret_cast< OptionletStripper1Ptr * >(argp1);
    {
      try {
        result = (Matrix *) &OptionletStripper1Ptr_capFloorVolatilities((OptionletStripper1Ptr const *)arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Matrix, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_OptionletStripper1_optionletPrices) {
  {
    OptionletStripper1Ptr *arg1 = (OptionletStripper1Ptr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Matrix *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: OptionletStripper1_optionletPrices(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OptionletStripper1Ptr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OptionletStripper1_optionletPrices" "', argument " "1"" of type '" "OptionletStripper1Ptr const *""'"); 
    }
    arg1 = reinterpret_cast< OptionletStripper1Ptr * >(argp1);
    {
      try {
        result = (Matrix *) &OptionletStripper1Ptr_optionletPrices((OptionletStripper1Ptr const *)arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Matrix, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_OptionletStripper1_switchStrike) {
  {
    OptionletStripper1Ptr *arg1 = (OptionletStripper1Ptr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Rate result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: OptionletStripper1_switchStrike(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OptionletStripper1Ptr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OptionletStripper1_switchStrike" "', argument " "1"" of type '" "OptionletStripper1Ptr const *""'"); 
    }
    arg1 = reinterpret_cast< OptionletStripper1Ptr * >(argp1);
    {
      try {
        result = (Rate)OptionletStripper1Ptr_switchStrike((OptionletStripper1Ptr const *)arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_OptionletStripper1) {
  {
    OptionletStripper1Ptr *arg1 = (OptionletStripper1Ptr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_OptionletStripper1(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OptionletStripper1Ptr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_OptionletStripper1" "', argument " "1"" of type '" "OptionletStripper1Ptr *""'"); 
    }
    arg1 = reinterpret_cast< OptionletStripper1Ptr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_StrippedOptionletAdapter) {
  {
    boost::shared_ptr< StrippedOptionletBase > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    StrippedOptionletAdapterPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_StrippedOptionletAdapter(stripper);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_StrippedOptionletBase_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_StrippedOptionletAdapter" "', argument " "1"" of type '" "boost::shared_ptr< StrippedOptionletBase > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_StrippedOptionletAdapter" "', argument " "1"" of type '" "boost::shared_ptr< StrippedOptionletBase > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< StrippedOptionletBase > * >(argp1);
    {
      try {
        result = (StrippedOptionletAdapterPtr *)new_StrippedOptionletAdapterPtr((boost::shared_ptr< StrippedOptionletBase > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_StrippedOptionletAdapterPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_StrippedOptionletAdapter) {
  {
    StrippedOptionletAdapterPtr *arg1 = (StrippedOptionletAdapterPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_StrippedOptionletAdapter(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_StrippedOptionletAdapterPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_StrippedOptionletAdapter" "', argument " "1"" of type '" "StrippedOptionletAdapterPtr *""'"); 
    }
    arg1 = reinterpret_cast< StrippedOptionletAdapterPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Settlement) {
  {
    int argvi = 0;
    Settlement *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Settlement();");
    }
    {
      try {
        result = (Settlement *)new Settlement();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Settlement, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_Settlement) {
  {
    Settlement *arg1 = (Settlement *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Settlement(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Settlement, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Settlement" "', argument " "1"" of type '" "Settlement *""'"); 
    }
    arg1 = reinterpret_cast< Settlement * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Swaption__SWIG_0) {
  {
    VanillaSwapPtr *arg1 = 0 ;
    boost::shared_ptr< Exercise > *arg2 = 0 ;
    Settlement::Type arg3 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    SwaptionPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_Swaption(simpleSwap,exercise,type);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_VanillaSwapPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Swaption" "', argument " "1"" of type '" "VanillaSwapPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Swaption" "', argument " "1"" of type '" "VanillaSwapPtr const &""'"); 
    }
    arg1 = reinterpret_cast< VanillaSwapPtr * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_boost__shared_ptrT_Exercise_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Swaption" "', argument " "2"" of type '" "boost::shared_ptr< Exercise > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Swaption" "', argument " "2"" of type '" "boost::shared_ptr< Exercise > const &""'"); 
    }
    arg2 = reinterpret_cast< boost::shared_ptr< Exercise > * >(argp2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Swaption" "', argument " "3"" of type '" "Settlement::Type""'");
    } 
    arg3 = static_cast< Settlement::Type >(val3);
    {
      try {
        result = (SwaptionPtr *)new_SwaptionPtr__SWIG_0((VanillaSwapPtr const &)*arg1,(boost::shared_ptr< Exercise > const &)*arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SwaptionPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Swaption__SWIG_1) {
  {
    VanillaSwapPtr *arg1 = 0 ;
    boost::shared_ptr< Exercise > *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    SwaptionPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_Swaption(simpleSwap,exercise);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_VanillaSwapPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Swaption" "', argument " "1"" of type '" "VanillaSwapPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Swaption" "', argument " "1"" of type '" "VanillaSwapPtr const &""'"); 
    }
    arg1 = reinterpret_cast< VanillaSwapPtr * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_boost__shared_ptrT_Exercise_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Swaption" "', argument " "2"" of type '" "boost::shared_ptr< Exercise > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Swaption" "', argument " "2"" of type '" "boost::shared_ptr< Exercise > const &""'"); 
    }
    arg2 = reinterpret_cast< boost::shared_ptr< Exercise > * >(argp2);
    {
      try {
        result = (SwaptionPtr *)new_SwaptionPtr__SWIG_0((VanillaSwapPtr const &)*arg1,(boost::shared_ptr< Exercise > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SwaptionPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Swaption) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_VanillaSwapPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_boost__shared_ptrT_Exercise_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_VanillaSwapPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_boost__shared_ptrT_Exercise_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Swaption__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Swaption__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Swaption'");
  XSRETURN(0);
}


XS(_wrap_delete_Swaption) {
  {
    SwaptionPtr *arg1 = (SwaptionPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Swaption(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_SwaptionPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Swaption" "', argument " "1"" of type '" "SwaptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< SwaptionPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_NonstandardSwaption__SWIG_0) {
  {
    NonstandardSwapPtr *arg1 = 0 ;
    boost::shared_ptr< Exercise > *arg2 = 0 ;
    Settlement::Type arg3 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    NonstandardSwaptionPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_NonstandardSwaption(nonstandardSwap,exercise,type);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_NonstandardSwapPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_NonstandardSwaption" "', argument " "1"" of type '" "NonstandardSwapPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NonstandardSwaption" "', argument " "1"" of type '" "NonstandardSwapPtr const &""'"); 
    }
    arg1 = reinterpret_cast< NonstandardSwapPtr * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_boost__shared_ptrT_Exercise_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_NonstandardSwaption" "', argument " "2"" of type '" "boost::shared_ptr< Exercise > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NonstandardSwaption" "', argument " "2"" of type '" "boost::shared_ptr< Exercise > const &""'"); 
    }
    arg2 = reinterpret_cast< boost::shared_ptr< Exercise > * >(argp2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_NonstandardSwaption" "', argument " "3"" of type '" "Settlement::Type""'");
    } 
    arg3 = static_cast< Settlement::Type >(val3);
    {
      try {
        result = (NonstandardSwaptionPtr *)new_NonstandardSwaptionPtr__SWIG_0((NonstandardSwapPtr const &)*arg1,(boost::shared_ptr< Exercise > const &)*arg2,arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_NonstandardSwaptionPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_NonstandardSwaption__SWIG_1) {
  {
    NonstandardSwapPtr *arg1 = 0 ;
    boost::shared_ptr< Exercise > *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    NonstandardSwaptionPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_NonstandardSwaption(nonstandardSwap,exercise);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_NonstandardSwapPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_NonstandardSwaption" "', argument " "1"" of type '" "NonstandardSwapPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NonstandardSwaption" "', argument " "1"" of type '" "NonstandardSwapPtr const &""'"); 
    }
    arg1 = reinterpret_cast< NonstandardSwapPtr * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_boost__shared_ptrT_Exercise_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_NonstandardSwaption" "', argument " "2"" of type '" "boost::shared_ptr< Exercise > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NonstandardSwaption" "', argument " "2"" of type '" "boost::shared_ptr< Exercise > const &""'"); 
    }
    arg2 = reinterpret_cast< boost::shared_ptr< Exercise > * >(argp2);
    {
      try {
        result = (NonstandardSwaptionPtr *)new_NonstandardSwaptionPtr__SWIG_0((NonstandardSwapPtr const &)*arg1,(boost::shared_ptr< Exercise > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_NonstandardSwaptionPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_NonstandardSwaption) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_NonstandardSwapPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_boost__shared_ptrT_Exercise_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_NonstandardSwapPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_boost__shared_ptrT_Exercise_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_NonstandardSwaption__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_NonstandardSwaption__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_NonstandardSwaption'");
  XSRETURN(0);
}


XS(_wrap_NonstandardSwaption_calibrationBasket) {
  {
    NonstandardSwaptionPtr *arg1 = (NonstandardSwaptionPtr *) 0 ;
    boost::shared_ptr< Index > arg2 ;
    boost::shared_ptr< SwaptionVolatilityStructure > arg3 ;
    std::string arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    std::vector< boost::shared_ptr< CalibrationHelper > > result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: NonstandardSwaption_calibrationBasket(self,standardSwapBase,swaptionVolatility,typeStr);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_NonstandardSwaptionPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NonstandardSwaption_calibrationBasket" "', argument " "1"" of type '" "NonstandardSwaptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< NonstandardSwaptionPtr * >(argp1);
    {
      res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_boost__shared_ptrT_Index_t,  0 );
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "NonstandardSwaption_calibrationBasket" "', argument " "2"" of type '" "boost::shared_ptr< Index >""'"); 
      }  
      if (!argp2) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "NonstandardSwaption_calibrationBasket" "', argument " "2"" of type '" "boost::shared_ptr< Index >""'");
      } else {
        arg2 = *(reinterpret_cast< boost::shared_ptr< Index > * >(argp2));
      }
    }
    {
      res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_boost__shared_ptrT_SwaptionVolatilityStructure_t,  0 );
      if (!SWIG_IsOK(res3)) {
        SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "NonstandardSwaption_calibrationBasket" "', argument " "3"" of type '" "boost::shared_ptr< SwaptionVolatilityStructure >""'"); 
      }  
      if (!argp3) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "NonstandardSwaption_calibrationBasket" "', argument " "3"" of type '" "boost::shared_ptr< SwaptionVolatilityStructure >""'");
      } else {
        arg3 = *(reinterpret_cast< boost::shared_ptr< SwaptionVolatilityStructure > * >(argp3));
      }
    }
    {
      std::string *ptr = (std::string *)0;
      int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(3), &ptr);
      if (!SWIG_IsOK(res) || !ptr) {
        SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "NonstandardSwaption_calibrationBasket" "', argument " "4"" of type '" "std::string""'"); 
      }
      arg4 = *ptr;
      if (SWIG_IsNewObj(res)) delete ptr;
    }
    {
      try {
        result = NonstandardSwaptionPtr_calibrationBasket(arg1,arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        boost::shared_ptr< CalibrationHelper >* ptr = new boost::shared_ptr< CalibrationHelper >(result[i]);
        svs[i] = sv_newmortal();
        SWIG_MakePtr(svs[i], (void*) ptr, 
          SWIGTYPE_p_boost__shared_ptrT_CalibrationHelper_t, SWIG_SHADOW|0);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_NonstandardSwaption) {
  {
    NonstandardSwaptionPtr *arg1 = (NonstandardSwaptionPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_NonstandardSwaption(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_NonstandardSwaptionPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_NonstandardSwaption" "', argument " "1"" of type '" "NonstandardSwaptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< NonstandardSwaptionPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FloatFloatSwaption) {
  {
    FloatFloatSwapPtr *arg1 = 0 ;
    boost::shared_ptr< Exercise > *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    FloatFloatSwaptionPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_FloatFloatSwaption(simpleSwap,exercise);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_FloatFloatSwapPtr,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FloatFloatSwaption" "', argument " "1"" of type '" "FloatFloatSwapPtr const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatFloatSwaption" "', argument " "1"" of type '" "FloatFloatSwapPtr const &""'"); 
    }
    arg1 = reinterpret_cast< FloatFloatSwapPtr * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_boost__shared_ptrT_Exercise_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FloatFloatSwaption" "', argument " "2"" of type '" "boost::shared_ptr< Exercise > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FloatFloatSwaption" "', argument " "2"" of type '" "boost::shared_ptr< Exercise > const &""'"); 
    }
    arg2 = reinterpret_cast< boost::shared_ptr< Exercise > * >(argp2);
    {
      try {
        result = (FloatFloatSwaptionPtr *)new_FloatFloatSwaptionPtr((FloatFloatSwapPtr const &)*arg1,(boost::shared_ptr< Exercise > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FloatFloatSwaptionPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_FloatFloatSwaption_calibrationBasket) {
  {
    FloatFloatSwaptionPtr *arg1 = (FloatFloatSwaptionPtr *) 0 ;
    boost::shared_ptr< Index > arg2 ;
    boost::shared_ptr< SwaptionVolatilityStructure > arg3 ;
    std::string arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    std::vector< boost::shared_ptr< CalibrationHelper > > result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: FloatFloatSwaption_calibrationBasket(self,standardSwapBase,swaptionVolatility,typeStr);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_FloatFloatSwaptionPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FloatFloatSwaption_calibrationBasket" "', argument " "1"" of type '" "FloatFloatSwaptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< FloatFloatSwaptionPtr * >(argp1);
    {
      res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_boost__shared_ptrT_Index_t,  0 );
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FloatFloatSwaption_calibrationBasket" "', argument " "2"" of type '" "boost::shared_ptr< Index >""'"); 
      }  
      if (!argp2) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FloatFloatSwaption_calibrationBasket" "', argument " "2"" of type '" "boost::shared_ptr< Index >""'");
      } else {
        arg2 = *(reinterpret_cast< boost::shared_ptr< Index > * >(argp2));
      }
    }
    {
      res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_boost__shared_ptrT_SwaptionVolatilityStructure_t,  0 );
      if (!SWIG_IsOK(res3)) {
        SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "FloatFloatSwaption_calibrationBasket" "', argument " "3"" of type '" "boost::shared_ptr< SwaptionVolatilityStructure >""'"); 
      }  
      if (!argp3) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FloatFloatSwaption_calibrationBasket" "', argument " "3"" of type '" "boost::shared_ptr< SwaptionVolatilityStructure >""'");
      } else {
        arg3 = *(reinterpret_cast< boost::shared_ptr< SwaptionVolatilityStructure > * >(argp3));
      }
    }
    {
      std::string *ptr = (std::string *)0;
      int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(3), &ptr);
      if (!SWIG_IsOK(res) || !ptr) {
        SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "FloatFloatSwaption_calibrationBasket" "', argument " "4"" of type '" "std::string""'"); 
      }
      arg4 = *ptr;
      if (SWIG_IsNewObj(res)) delete ptr;
    }
    {
      try {
        result = FloatFloatSwaptionPtr_calibrationBasket(arg1,arg2,arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        boost::shared_ptr< CalibrationHelper >* ptr = new boost::shared_ptr< CalibrationHelper >(result[i]);
        svs[i] = sv_newmortal();
        SWIG_MakePtr(svs[i], (void*) ptr, 
          SWIGTYPE_p_boost__shared_ptrT_CalibrationHelper_t, SWIG_SHADOW|0);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_FloatFloatSwaption_underlyingValue) {
  {
    FloatFloatSwaptionPtr *arg1 = (FloatFloatSwaptionPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: FloatFloatSwaption_underlyingValue(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_FloatFloatSwaptionPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FloatFloatSwaption_underlyingValue" "', argument " "1"" of type '" "FloatFloatSwaptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< FloatFloatSwaptionPtr * >(argp1);
    {
      try {
        result = (Real)FloatFloatSwaptionPtr_underlyingValue(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_FloatFloatSwaption) {
  {
    FloatFloatSwaptionPtr *arg1 = (FloatFloatSwaptionPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_FloatFloatSwaption(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_FloatFloatSwaptionPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FloatFloatSwaption" "', argument " "1"" of type '" "FloatFloatSwaptionPtr *""'"); 
    }
    arg1 = reinterpret_cast< FloatFloatSwaptionPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BlackSwaptionEngine__SWIG_0) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    Handle< Quote > *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    Real arg4 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    BlackSwaptionEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_BlackSwaptionEngine(discountCurve,vol,dc,displacement);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_BlackSwaptionEngine" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BlackSwaptionEngine" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_BlackSwaptionEngine" "', argument " "2"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BlackSwaptionEngine" "', argument " "2"" of type '" "Handle< Quote > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< Quote > * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_BlackSwaptionEngine" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BlackSwaptionEngine" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_BlackSwaptionEngine" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    {
      try {
        result = (BlackSwaptionEnginePtr *)new_BlackSwaptionEnginePtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1,(Handle< Quote > const &)*arg2,(DayCounter const &)*arg3,arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BlackSwaptionEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BlackSwaptionEngine__SWIG_1) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    Handle< Quote > *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    BlackSwaptionEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_BlackSwaptionEngine(discountCurve,vol,dc);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_BlackSwaptionEngine" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BlackSwaptionEngine" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_BlackSwaptionEngine" "', argument " "2"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BlackSwaptionEngine" "', argument " "2"" of type '" "Handle< Quote > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< Quote > * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_BlackSwaptionEngine" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BlackSwaptionEngine" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    {
      try {
        result = (BlackSwaptionEnginePtr *)new_BlackSwaptionEnginePtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1,(Handle< Quote > const &)*arg2,(DayCounter const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BlackSwaptionEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BlackSwaptionEngine__SWIG_2) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    Handle< Quote > *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    BlackSwaptionEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_BlackSwaptionEngine(discountCurve,vol);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_BlackSwaptionEngine" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BlackSwaptionEngine" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_BlackSwaptionEngine" "', argument " "2"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BlackSwaptionEngine" "', argument " "2"" of type '" "Handle< Quote > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< Quote > * >(argp2);
    {
      try {
        result = (BlackSwaptionEnginePtr *)new_BlackSwaptionEnginePtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1,(Handle< Quote > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BlackSwaptionEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BlackSwaptionEngine__SWIG_3) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    Handle< SwaptionVolatilityStructure > *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    BlackSwaptionEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_BlackSwaptionEngine(discountCurve,v);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_BlackSwaptionEngine" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BlackSwaptionEngine" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_SwaptionVolatilityStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_BlackSwaptionEngine" "', argument " "2"" of type '" "Handle< SwaptionVolatilityStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BlackSwaptionEngine" "', argument " "2"" of type '" "Handle< SwaptionVolatilityStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< SwaptionVolatilityStructure > * >(argp2);
    {
      try {
        result = (BlackSwaptionEnginePtr *)new_BlackSwaptionEnginePtr__SWIG_3((Handle< YieldTermStructure > const &)*arg1,(Handle< SwaptionVolatilityStructure > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BlackSwaptionEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BlackSwaptionEngine) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_SwaptionVolatilityStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_BlackSwaptionEngine__SWIG_2); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_BlackSwaptionEngine__SWIG_3); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_BlackSwaptionEngine__SWIG_1); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_BlackSwaptionEngine__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_BlackSwaptionEngine'");
  XSRETURN(0);
}


XS(_wrap_BlackSwaptionEngine_vega) {
  {
    BlackSwaptionEnginePtr *arg1 = (BlackSwaptionEnginePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BlackSwaptionEngine_vega(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BlackSwaptionEnginePtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BlackSwaptionEngine_vega" "', argument " "1"" of type '" "BlackSwaptionEnginePtr *""'"); 
    }
    arg1 = reinterpret_cast< BlackSwaptionEnginePtr * >(argp1);
    {
      try {
        result = (Real)BlackSwaptionEnginePtr_vega(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_BlackSwaptionEngine) {
  {
    BlackSwaptionEnginePtr *arg1 = (BlackSwaptionEnginePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_BlackSwaptionEngine(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BlackSwaptionEnginePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_BlackSwaptionEngine" "', argument " "1"" of type '" "BlackSwaptionEnginePtr *""'"); 
    }
    arg1 = reinterpret_cast< BlackSwaptionEnginePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BachelierSwaptionEngine__SWIG_0) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    Handle< Quote > *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    BachelierSwaptionEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_BachelierSwaptionEngine(discountCurve,vol,dc);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_BachelierSwaptionEngine" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BachelierSwaptionEngine" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_BachelierSwaptionEngine" "', argument " "2"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BachelierSwaptionEngine" "', argument " "2"" of type '" "Handle< Quote > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< Quote > * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_BachelierSwaptionEngine" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BachelierSwaptionEngine" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    {
      try {
        result = (BachelierSwaptionEnginePtr *)new_BachelierSwaptionEnginePtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1,(Handle< Quote > const &)*arg2,(DayCounter const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BachelierSwaptionEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BachelierSwaptionEngine__SWIG_1) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    Handle< Quote > *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    BachelierSwaptionEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_BachelierSwaptionEngine(discountCurve,vol);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_BachelierSwaptionEngine" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BachelierSwaptionEngine" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_Quote_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_BachelierSwaptionEngine" "', argument " "2"" of type '" "Handle< Quote > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BachelierSwaptionEngine" "', argument " "2"" of type '" "Handle< Quote > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< Quote > * >(argp2);
    {
      try {
        result = (BachelierSwaptionEnginePtr *)new_BachelierSwaptionEnginePtr__SWIG_0((Handle< YieldTermStructure > const &)*arg1,(Handle< Quote > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BachelierSwaptionEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BachelierSwaptionEngine__SWIG_2) {
  {
    Handle< YieldTermStructure > *arg1 = 0 ;
    Handle< SwaptionVolatilityStructure > *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    BachelierSwaptionEnginePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_BachelierSwaptionEngine(discountCurve,v);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_BachelierSwaptionEngine" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BachelierSwaptionEngine" "', argument " "1"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< Handle< YieldTermStructure > * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_SwaptionVolatilityStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_BachelierSwaptionEngine" "', argument " "2"" of type '" "Handle< SwaptionVolatilityStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BachelierSwaptionEngine" "', argument " "2"" of type '" "Handle< SwaptionVolatilityStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< SwaptionVolatilityStructure > * >(argp2);
    {
      try {
        result = (BachelierSwaptionEnginePtr *)new_BachelierSwaptionEnginePtr__SWIG_2((Handle< YieldTermStructure > const &)*arg1,(Handle< SwaptionVolatilityStructure > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BachelierSwaptionEnginePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BachelierSwaptionEngine) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_SwaptionVolatilityStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_HandleT_Quote_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_BachelierSwaptionEngine__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_BachelierSwaptionEngine__SWIG_2); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_BachelierSwaptionEngine__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_BachelierSwaptionEngine'");
  XSRETURN(0);
}


XS(_wrap_delete_BachelierSwaptionEngine) {
  {
    BachelierSwaptionEnginePtr *arg1 = (BachelierSwaptionEnginePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_BachelierSwaptionEngine(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BachelierSwaptionEnginePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_BachelierSwaptionEngine" "', argument " "1"" of type '" "BachelierSwaptionEnginePtr *""'"); 
    }
    arg1 = reinterpret_cast< BachelierSwaptionEnginePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_enableTracing) {
  {
    int argvi = 0;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: enableTracing();");
    }
    {
      try {
        enableTracing();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_disableTracing) {
  {
    int argvi = 0;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: disableTracing();");
    }
    {
      try {
        disableTracing();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_ConstantEstimator) {
  {
    Size arg1 ;
    size_t val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    ConstantEstimator *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_ConstantEstimator(size);");
    }
    ecode1 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ConstantEstimator" "', argument " "1"" of type '" "Size""'");
    } 
    arg1 = static_cast< Size >(val1);
    {
      try {
        result = (ConstantEstimator *)new ConstantEstimator(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ConstantEstimator, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ConstantEstimator_calculate) {
  {
    ConstantEstimator *arg1 = (ConstantEstimator *) 0 ;
    TimeSeries< Volatility > *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    TimeSeries< Volatility > result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: ConstantEstimator_calculate(self,TimeSeries< Volatility > const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ConstantEstimator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConstantEstimator_calculate" "', argument " "1"" of type '" "ConstantEstimator *""'"); 
    }
    arg1 = reinterpret_cast< ConstantEstimator * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_TimeSeriesT_double_std__mapT_Date_double_t_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ConstantEstimator_calculate" "', argument " "2"" of type '" "TimeSeries< Volatility > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ConstantEstimator_calculate" "', argument " "2"" of type '" "TimeSeries< Volatility > const &""'"); 
    }
    arg2 = reinterpret_cast< TimeSeries< Volatility > * >(argp2);
    {
      try {
        result = (arg1)->calculate((TimeSeries< Volatility > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new TimeSeries< Volatility >(static_cast< const TimeSeries< Volatility >& >(result))), SWIGTYPE_p_TimeSeriesT_double_std__mapT_Date_double_t_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_ConstantEstimator) {
  {
    ConstantEstimator *arg1 = (ConstantEstimator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_ConstantEstimator(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ConstantEstimator, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ConstantEstimator" "', argument " "1"" of type '" "ConstantEstimator *""'"); 
    }
    arg1 = reinterpret_cast< ConstantEstimator * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ParkinsonSigma) {
  {
    Real arg1 ;
    double val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    ParkinsonSigma *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_ParkinsonSigma(yearFraction);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ParkinsonSigma" "', argument " "1"" of type '" "Real""'");
    } 
    arg1 = static_cast< Real >(val1);
    {
      try {
        result = (ParkinsonSigma *)new ParkinsonSigma(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ParkinsonSigma, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ParkinsonSigma_calculate) {
  {
    ParkinsonSigma *arg1 = (ParkinsonSigma *) 0 ;
    TimeSeries< IntervalPrice > *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    TimeSeries< Volatility > result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: ParkinsonSigma_calculate(self,TimeSeries< IntervalPrice > const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ParkinsonSigma, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ParkinsonSigma_calculate" "', argument " "1"" of type '" "ParkinsonSigma *""'"); 
    }
    arg1 = reinterpret_cast< ParkinsonSigma * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_TimeSeriesT_IntervalPrice_std__mapT_Date_IntervalPrice_t_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ParkinsonSigma_calculate" "', argument " "2"" of type '" "TimeSeries< IntervalPrice > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ParkinsonSigma_calculate" "', argument " "2"" of type '" "TimeSeries< IntervalPrice > const &""'"); 
    }
    arg2 = reinterpret_cast< TimeSeries< IntervalPrice > * >(argp2);
    {
      try {
        result = (arg1)->calculate((TimeSeries< IntervalPrice > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new TimeSeries< Volatility >(static_cast< const TimeSeries< Volatility >& >(result))), SWIGTYPE_p_TimeSeriesT_double_std__mapT_Date_double_t_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_ParkinsonSigma) {
  {
    ParkinsonSigma *arg1 = (ParkinsonSigma *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_ParkinsonSigma(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ParkinsonSigma, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ParkinsonSigma" "', argument " "1"" of type '" "ParkinsonSigma *""'"); 
    }
    arg1 = reinterpret_cast< ParkinsonSigma * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_GarmanKlassSigma1) {
  {
    Real arg1 ;
    Real arg2 ;
    double val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    GarmanKlassSigma1 *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_GarmanKlassSigma1(yearFraction,marketOpenFraction);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_GarmanKlassSigma1" "', argument " "1"" of type '" "Real""'");
    } 
    arg1 = static_cast< Real >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_GarmanKlassSigma1" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (GarmanKlassSigma1 *)new GarmanKlassSigma1(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GarmanKlassSigma1, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_GarmanKlassSigma1_calculate) {
  {
    GarmanKlassSigma1 *arg1 = (GarmanKlassSigma1 *) 0 ;
    TimeSeries< IntervalPrice > *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    TimeSeries< Volatility > result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: GarmanKlassSigma1_calculate(self,TimeSeries< IntervalPrice > const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GarmanKlassSigma1, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GarmanKlassSigma1_calculate" "', argument " "1"" of type '" "GarmanKlassSigma1 *""'"); 
    }
    arg1 = reinterpret_cast< GarmanKlassSigma1 * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_TimeSeriesT_IntervalPrice_std__mapT_Date_IntervalPrice_t_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GarmanKlassSigma1_calculate" "', argument " "2"" of type '" "TimeSeries< IntervalPrice > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "GarmanKlassSigma1_calculate" "', argument " "2"" of type '" "TimeSeries< IntervalPrice > const &""'"); 
    }
    arg2 = reinterpret_cast< TimeSeries< IntervalPrice > * >(argp2);
    {
      try {
        result = (arg1)->calculate((TimeSeries< IntervalPrice > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new TimeSeries< Volatility >(static_cast< const TimeSeries< Volatility >& >(result))), SWIGTYPE_p_TimeSeriesT_double_std__mapT_Date_double_t_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_GarmanKlassSigma1) {
  {
    GarmanKlassSigma1 *arg1 = (GarmanKlassSigma1 *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_GarmanKlassSigma1(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GarmanKlassSigma1, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GarmanKlassSigma1" "', argument " "1"" of type '" "GarmanKlassSigma1 *""'"); 
    }
    arg1 = reinterpret_cast< GarmanKlassSigma1 * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_GarmanKlassSigma3) {
  {
    Real arg1 ;
    Real arg2 ;
    double val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    GarmanKlassSigma3 *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_GarmanKlassSigma3(yearFraction,marketOpenFraction);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_GarmanKlassSigma3" "', argument " "1"" of type '" "Real""'");
    } 
    arg1 = static_cast< Real >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_GarmanKlassSigma3" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (GarmanKlassSigma3 *)new GarmanKlassSigma3(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GarmanKlassSigma3, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_GarmanKlassSigma3_calculate) {
  {
    GarmanKlassSigma3 *arg1 = (GarmanKlassSigma3 *) 0 ;
    TimeSeries< IntervalPrice > *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    TimeSeries< Volatility > result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: GarmanKlassSigma3_calculate(self,TimeSeries< IntervalPrice > const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GarmanKlassSigma3, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GarmanKlassSigma3_calculate" "', argument " "1"" of type '" "GarmanKlassSigma3 *""'"); 
    }
    arg1 = reinterpret_cast< GarmanKlassSigma3 * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_TimeSeriesT_IntervalPrice_std__mapT_Date_IntervalPrice_t_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GarmanKlassSigma3_calculate" "', argument " "2"" of type '" "TimeSeries< IntervalPrice > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "GarmanKlassSigma3_calculate" "', argument " "2"" of type '" "TimeSeries< IntervalPrice > const &""'"); 
    }
    arg2 = reinterpret_cast< TimeSeries< IntervalPrice > * >(argp2);
    {
      try {
        result = (arg1)->calculate((TimeSeries< IntervalPrice > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new TimeSeries< Volatility >(static_cast< const TimeSeries< Volatility >& >(result))), SWIGTYPE_p_TimeSeriesT_double_std__mapT_Date_double_t_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_GarmanKlassSigma3) {
  {
    GarmanKlassSigma3 *arg1 = (GarmanKlassSigma3 *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_GarmanKlassSigma3(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GarmanKlassSigma3, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GarmanKlassSigma3" "', argument " "1"" of type '" "GarmanKlassSigma3 *""'"); 
    }
    arg1 = reinterpret_cast< GarmanKlassSigma3 * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_GarmanKlassSigma4) {
  {
    Real arg1 ;
    double val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    GarmanKlassSigma4 *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_GarmanKlassSigma4(yearFraction);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_GarmanKlassSigma4" "', argument " "1"" of type '" "Real""'");
    } 
    arg1 = static_cast< Real >(val1);
    {
      try {
        result = (GarmanKlassSigma4 *)new GarmanKlassSigma4(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GarmanKlassSigma4, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_GarmanKlassSigma4_calculate) {
  {
    GarmanKlassSigma4 *arg1 = (GarmanKlassSigma4 *) 0 ;
    TimeSeries< IntervalPrice > *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    TimeSeries< Volatility > result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: GarmanKlassSigma4_calculate(self,TimeSeries< IntervalPrice > const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GarmanKlassSigma4, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GarmanKlassSigma4_calculate" "', argument " "1"" of type '" "GarmanKlassSigma4 *""'"); 
    }
    arg1 = reinterpret_cast< GarmanKlassSigma4 * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_TimeSeriesT_IntervalPrice_std__mapT_Date_IntervalPrice_t_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GarmanKlassSigma4_calculate" "', argument " "2"" of type '" "TimeSeries< IntervalPrice > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "GarmanKlassSigma4_calculate" "', argument " "2"" of type '" "TimeSeries< IntervalPrice > const &""'"); 
    }
    arg2 = reinterpret_cast< TimeSeries< IntervalPrice > * >(argp2);
    {
      try {
        result = (arg1)->calculate((TimeSeries< IntervalPrice > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new TimeSeries< Volatility >(static_cast< const TimeSeries< Volatility >& >(result))), SWIGTYPE_p_TimeSeriesT_double_std__mapT_Date_double_t_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_GarmanKlassSigma4) {
  {
    GarmanKlassSigma4 *arg1 = (GarmanKlassSigma4 *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_GarmanKlassSigma4(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GarmanKlassSigma4, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GarmanKlassSigma4" "', argument " "1"" of type '" "GarmanKlassSigma4 *""'"); 
    }
    arg1 = reinterpret_cast< GarmanKlassSigma4 * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_GarmanKlassSigma5) {
  {
    Real arg1 ;
    double val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    GarmanKlassSigma5 *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_GarmanKlassSigma5(yearFraction);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_GarmanKlassSigma5" "', argument " "1"" of type '" "Real""'");
    } 
    arg1 = static_cast< Real >(val1);
    {
      try {
        result = (GarmanKlassSigma5 *)new GarmanKlassSigma5(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GarmanKlassSigma5, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_GarmanKlassSigma5_calculate) {
  {
    GarmanKlassSigma5 *arg1 = (GarmanKlassSigma5 *) 0 ;
    TimeSeries< IntervalPrice > *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    TimeSeries< Volatility > result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: GarmanKlassSigma5_calculate(self,TimeSeries< IntervalPrice > const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GarmanKlassSigma5, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GarmanKlassSigma5_calculate" "', argument " "1"" of type '" "GarmanKlassSigma5 *""'"); 
    }
    arg1 = reinterpret_cast< GarmanKlassSigma5 * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_TimeSeriesT_IntervalPrice_std__mapT_Date_IntervalPrice_t_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GarmanKlassSigma5_calculate" "', argument " "2"" of type '" "TimeSeries< IntervalPrice > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "GarmanKlassSigma5_calculate" "', argument " "2"" of type '" "TimeSeries< IntervalPrice > const &""'"); 
    }
    arg2 = reinterpret_cast< TimeSeries< IntervalPrice > * >(argp2);
    {
      try {
        result = (arg1)->calculate((TimeSeries< IntervalPrice > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new TimeSeries< Volatility >(static_cast< const TimeSeries< Volatility >& >(result))), SWIGTYPE_p_TimeSeriesT_double_std__mapT_Date_double_t_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_GarmanKlassSigma5) {
  {
    GarmanKlassSigma5 *arg1 = (GarmanKlassSigma5 *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_GarmanKlassSigma5(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GarmanKlassSigma5, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GarmanKlassSigma5" "', argument " "1"" of type '" "GarmanKlassSigma5 *""'"); 
    }
    arg1 = reinterpret_cast< GarmanKlassSigma5 * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_GarmanKlassSigma6) {
  {
    Real arg1 ;
    Real arg2 ;
    double val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    GarmanKlassSigma6 *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_GarmanKlassSigma6(yearFraction,marketOpenFraction);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_GarmanKlassSigma6" "', argument " "1"" of type '" "Real""'");
    } 
    arg1 = static_cast< Real >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_GarmanKlassSigma6" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    {
      try {
        result = (GarmanKlassSigma6 *)new GarmanKlassSigma6(arg1,arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GarmanKlassSigma6, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_GarmanKlassSigma6_calculate) {
  {
    GarmanKlassSigma6 *arg1 = (GarmanKlassSigma6 *) 0 ;
    TimeSeries< IntervalPrice > *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    TimeSeries< Volatility > result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: GarmanKlassSigma6_calculate(self,TimeSeries< IntervalPrice > const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GarmanKlassSigma6, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GarmanKlassSigma6_calculate" "', argument " "1"" of type '" "GarmanKlassSigma6 *""'"); 
    }
    arg1 = reinterpret_cast< GarmanKlassSigma6 * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_TimeSeriesT_IntervalPrice_std__mapT_Date_IntervalPrice_t_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GarmanKlassSigma6_calculate" "', argument " "2"" of type '" "TimeSeries< IntervalPrice > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "GarmanKlassSigma6_calculate" "', argument " "2"" of type '" "TimeSeries< IntervalPrice > const &""'"); 
    }
    arg2 = reinterpret_cast< TimeSeries< IntervalPrice > * >(argp2);
    {
      try {
        result = (arg1)->calculate((TimeSeries< IntervalPrice > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new TimeSeries< Volatility >(static_cast< const TimeSeries< Volatility >& >(result))), SWIGTYPE_p_TimeSeriesT_double_std__mapT_Date_double_t_t, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_GarmanKlassSigma6) {
  {
    GarmanKlassSigma6 *arg1 = (GarmanKlassSigma6 *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_GarmanKlassSigma6(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_GarmanKlassSigma6, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GarmanKlassSigma6" "', argument " "1"" of type '" "GarmanKlassSigma6 *""'"); 
    }
    arg1 = reinterpret_cast< GarmanKlassSigma6 * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ZeroCurve__SWIG_0) {
  {
    std::vector< Date > *arg1 = 0 ;
    std::vector< Rate > *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    Calendar *arg4 = 0 ;
    Linear *arg5 = 0 ;
    Compounding arg6 ;
    Frequency arg7 ;
    std::vector< Date > temp1 ;
    std::vector< Date > *v1 ;
    std::vector< double > temp2 ;
    std::vector< double > *v2 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    int val7 ;
    int ecode7 = 0 ;
    int argvi = 0;
    ZeroCurvePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: new_ZeroCurve(dates,yields,dayCounter,calendar,i,compounding,frequency);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_ZeroCurve. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_ZeroCurve. "
              "Expected an array of " "Date");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_ZeroCurve. "
          "Expected an array of " "Date");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_ZeroCurve. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp2.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_ZeroCurve. "
              "Expected an array of ""double");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_ZeroCurve. "
          "Expected an array of ""double");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_ZeroCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ZeroCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_ZeroCurve" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ZeroCurve" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    arg4 = reinterpret_cast< Calendar * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Linear,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_ZeroCurve" "', argument " "5"" of type '" "Linear const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ZeroCurve" "', argument " "5"" of type '" "Linear const &""'"); 
    }
    arg5 = reinterpret_cast< Linear * >(argp5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_ZeroCurve" "', argument " "6"" of type '" "Compounding""'");
    } 
    arg6 = static_cast< Compounding >(val6);
    ecode7 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_ZeroCurve" "', argument " "7"" of type '" "Frequency""'");
    } 
    arg7 = static_cast< Frequency >(val7);
    {
      try {
        result = (ZeroCurvePtr *)new_ZeroCurvePtr__SWIG_0((std::vector< Date > const &)*arg1,(std::vector< double > const &)*arg2,(DayCounter const &)*arg3,(Calendar const &)*arg4,(Linear const &)*arg5,arg6,arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ZeroCurvePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ZeroCurve__SWIG_1) {
  {
    std::vector< Date > *arg1 = 0 ;
    std::vector< Rate > *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    Calendar *arg4 = 0 ;
    Linear *arg5 = 0 ;
    Compounding arg6 ;
    std::vector< Date > temp1 ;
    std::vector< Date > *v1 ;
    std::vector< double > temp2 ;
    std::vector< double > *v2 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    ZeroCurvePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_ZeroCurve(dates,yields,dayCounter,calendar,i,compounding);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_ZeroCurve. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_ZeroCurve. "
              "Expected an array of " "Date");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_ZeroCurve. "
          "Expected an array of " "Date");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_ZeroCurve. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp2.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_ZeroCurve. "
              "Expected an array of ""double");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_ZeroCurve. "
          "Expected an array of ""double");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_ZeroCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ZeroCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_ZeroCurve" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ZeroCurve" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    arg4 = reinterpret_cast< Calendar * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Linear,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_ZeroCurve" "', argument " "5"" of type '" "Linear const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ZeroCurve" "', argument " "5"" of type '" "Linear const &""'"); 
    }
    arg5 = reinterpret_cast< Linear * >(argp5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_ZeroCurve" "', argument " "6"" of type '" "Compounding""'");
    } 
    arg6 = static_cast< Compounding >(val6);
    {
      try {
        result = (ZeroCurvePtr *)new_ZeroCurvePtr__SWIG_0((std::vector< Date > const &)*arg1,(std::vector< double > const &)*arg2,(DayCounter const &)*arg3,(Calendar const &)*arg4,(Linear const &)*arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ZeroCurvePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ZeroCurve__SWIG_2) {
  {
    std::vector< Date > *arg1 = 0 ;
    std::vector< Rate > *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    Calendar *arg4 = 0 ;
    Linear *arg5 = 0 ;
    std::vector< Date > temp1 ;
    std::vector< Date > *v1 ;
    std::vector< double > temp2 ;
    std::vector< double > *v2 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int argvi = 0;
    ZeroCurvePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_ZeroCurve(dates,yields,dayCounter,calendar,i);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_ZeroCurve. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_ZeroCurve. "
              "Expected an array of " "Date");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_ZeroCurve. "
          "Expected an array of " "Date");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_ZeroCurve. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp2.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_ZeroCurve. "
              "Expected an array of ""double");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_ZeroCurve. "
          "Expected an array of ""double");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_ZeroCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ZeroCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_ZeroCurve" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ZeroCurve" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    arg4 = reinterpret_cast< Calendar * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Linear,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_ZeroCurve" "', argument " "5"" of type '" "Linear const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ZeroCurve" "', argument " "5"" of type '" "Linear const &""'"); 
    }
    arg5 = reinterpret_cast< Linear * >(argp5);
    {
      try {
        result = (ZeroCurvePtr *)new_ZeroCurvePtr__SWIG_0((std::vector< Date > const &)*arg1,(std::vector< double > const &)*arg2,(DayCounter const &)*arg3,(Calendar const &)*arg4,(Linear const &)*arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ZeroCurvePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ZeroCurve__SWIG_3) {
  {
    std::vector< Date > *arg1 = 0 ;
    std::vector< Rate > *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    Calendar *arg4 = 0 ;
    std::vector< Date > temp1 ;
    std::vector< Date > *v1 ;
    std::vector< double > temp2 ;
    std::vector< double > *v2 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int argvi = 0;
    ZeroCurvePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_ZeroCurve(dates,yields,dayCounter,calendar);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_ZeroCurve. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_ZeroCurve. "
              "Expected an array of " "Date");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_ZeroCurve. "
          "Expected an array of " "Date");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_ZeroCurve. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp2.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_ZeroCurve. "
              "Expected an array of ""double");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_ZeroCurve. "
          "Expected an array of ""double");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_ZeroCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ZeroCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_ZeroCurve" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ZeroCurve" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    arg4 = reinterpret_cast< Calendar * >(argp4);
    {
      try {
        result = (ZeroCurvePtr *)new_ZeroCurvePtr__SWIG_0((std::vector< Date > const &)*arg1,(std::vector< double > const &)*arg2,(DayCounter const &)*arg3,(Calendar const &)*arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ZeroCurvePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ZeroCurve__SWIG_4) {
  {
    std::vector< Date > *arg1 = 0 ;
    std::vector< Rate > *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    std::vector< Date > temp1 ;
    std::vector< Date > *v1 ;
    std::vector< double > temp2 ;
    std::vector< double > *v2 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    ZeroCurvePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_ZeroCurve(dates,yields,dayCounter);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_ZeroCurve. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_ZeroCurve. "
              "Expected an array of " "Date");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_ZeroCurve. "
          "Expected an array of " "Date");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_ZeroCurve. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp2.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_ZeroCurve. "
              "Expected an array of ""double");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_ZeroCurve. "
          "Expected an array of ""double");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_ZeroCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ZeroCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    {
      try {
        result = (ZeroCurvePtr *)new_ZeroCurvePtr__SWIG_0((std::vector< Date > const &)*arg1,(std::vector< double > const &)*arg2,(DayCounter const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ZeroCurvePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ZeroCurve) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Linear, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Linear, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Linear, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ZeroCurve__SWIG_4); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ZeroCurve__SWIG_3); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ZeroCurve__SWIG_2); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ZeroCurve__SWIG_1); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ZeroCurve__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_ZeroCurve'");
  XSRETURN(0);
}


XS(_wrap_ZeroCurve_times) {
  {
    ZeroCurvePtr *arg1 = (ZeroCurvePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Time > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ZeroCurve_times(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ZeroCurvePtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZeroCurve_times" "', argument " "1"" of type '" "ZeroCurvePtr *""'"); 
    }
    arg1 = reinterpret_cast< ZeroCurvePtr * >(argp1);
    {
      try {
        result = (std::vector< Time > *) &ZeroCurvePtr_times(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ZeroCurve_data) {
  {
    ZeroCurvePtr *arg1 = (ZeroCurvePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Real > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ZeroCurve_data(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ZeroCurvePtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZeroCurve_data" "', argument " "1"" of type '" "ZeroCurvePtr *""'"); 
    }
    arg1 = reinterpret_cast< ZeroCurvePtr * >(argp1);
    {
      try {
        result = (std::vector< Real > *) &ZeroCurvePtr_data(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ZeroCurve_dates) {
  {
    ZeroCurvePtr *arg1 = (ZeroCurvePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Date > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ZeroCurve_dates(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ZeroCurvePtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZeroCurve_dates" "', argument " "1"" of type '" "ZeroCurvePtr *""'"); 
    }
    arg1 = reinterpret_cast< ZeroCurvePtr * >(argp1);
    {
      try {
        result = (std::vector< Date > *) &ZeroCurvePtr_dates(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_Date_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ZeroCurve_zeroRates) {
  {
    ZeroCurvePtr *arg1 = (ZeroCurvePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Rate > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ZeroCurve_zeroRates(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ZeroCurvePtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZeroCurve_zeroRates" "', argument " "1"" of type '" "ZeroCurvePtr *""'"); 
    }
    arg1 = reinterpret_cast< ZeroCurvePtr * >(argp1);
    {
      try {
        result = (std::vector< Rate > *) &ZeroCurvePtr_zeroRates(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ZeroCurve_nodes) {
  {
    ZeroCurvePtr *arg1 = (ZeroCurvePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< std::pair< Date,Rate > > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ZeroCurve_nodes(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ZeroCurvePtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ZeroCurve_nodes" "', argument " "1"" of type '" "ZeroCurvePtr *""'"); 
    }
    arg1 = reinterpret_cast< ZeroCurvePtr * >(argp1);
    {
      try {
        result = ZeroCurvePtr_nodes(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        std::pair< Date,double >* ptr = new std::pair< Date,double >(result[i]);
        svs[i] = sv_newmortal();
        SWIG_MakePtr(svs[i], (void*) ptr, 
          SWIGTYPE_p_std__pairT_Date_double_t, SWIG_SHADOW|0);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_ZeroCurve) {
  {
    ZeroCurvePtr *arg1 = (ZeroCurvePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_ZeroCurve(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ZeroCurvePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ZeroCurve" "', argument " "1"" of type '" "ZeroCurvePtr *""'"); 
    }
    arg1 = reinterpret_cast< ZeroCurvePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_LogLinearZeroCurve__SWIG_0) {
  {
    std::vector< Date > *arg1 = 0 ;
    std::vector< Rate > *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    Calendar *arg4 = 0 ;
    LogLinear *arg5 = 0 ;
    Compounding arg6 ;
    Frequency arg7 ;
    std::vector< Date > temp1 ;
    std::vector< Date > *v1 ;
    std::vector< double > temp2 ;
    std::vector< double > *v2 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    int val7 ;
    int ecode7 = 0 ;
    int argvi = 0;
    LogLinearZeroCurvePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: new_LogLinearZeroCurve(dates,yields,dayCounter,calendar,i,compounding,frequency);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_LogLinearZeroCurve. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_LogLinearZeroCurve. "
              "Expected an array of " "Date");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_LogLinearZeroCurve. "
          "Expected an array of " "Date");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_LogLinearZeroCurve. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp2.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_LogLinearZeroCurve. "
              "Expected an array of ""double");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_LogLinearZeroCurve. "
          "Expected an array of ""double");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_LogLinearZeroCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LogLinearZeroCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_LogLinearZeroCurve" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LogLinearZeroCurve" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    arg4 = reinterpret_cast< Calendar * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_LogLinear,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_LogLinearZeroCurve" "', argument " "5"" of type '" "LogLinear const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LogLinearZeroCurve" "', argument " "5"" of type '" "LogLinear const &""'"); 
    }
    arg5 = reinterpret_cast< LogLinear * >(argp5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_LogLinearZeroCurve" "', argument " "6"" of type '" "Compounding""'");
    } 
    arg6 = static_cast< Compounding >(val6);
    ecode7 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_LogLinearZeroCurve" "', argument " "7"" of type '" "Frequency""'");
    } 
    arg7 = static_cast< Frequency >(val7);
    {
      try {
        result = (LogLinearZeroCurvePtr *)new_LogLinearZeroCurvePtr__SWIG_0((std::vector< Date > const &)*arg1,(std::vector< double > const &)*arg2,(DayCounter const &)*arg3,(Calendar const &)*arg4,(LogLinear const &)*arg5,arg6,arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_LogLinearZeroCurvePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_LogLinearZeroCurve__SWIG_1) {
  {
    std::vector< Date > *arg1 = 0 ;
    std::vector< Rate > *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    Calendar *arg4 = 0 ;
    LogLinear *arg5 = 0 ;
    Compounding arg6 ;
    std::vector< Date > temp1 ;
    std::vector< Date > *v1 ;
    std::vector< double > temp2 ;
    std::vector< double > *v2 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    LogLinearZeroCurvePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_LogLinearZeroCurve(dates,yields,dayCounter,calendar,i,compounding);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_LogLinearZeroCurve. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_LogLinearZeroCurve. "
              "Expected an array of " "Date");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_LogLinearZeroCurve. "
          "Expected an array of " "Date");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_LogLinearZeroCurve. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp2.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_LogLinearZeroCurve. "
              "Expected an array of ""double");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_LogLinearZeroCurve. "
          "Expected an array of ""double");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_LogLinearZeroCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LogLinearZeroCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_LogLinearZeroCurve" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LogLinearZeroCurve" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    arg4 = reinterpret_cast< Calendar * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_LogLinear,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_LogLinearZeroCurve" "', argument " "5"" of type '" "LogLinear const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LogLinearZeroCurve" "', argument " "5"" of type '" "LogLinear const &""'"); 
    }
    arg5 = reinterpret_cast< LogLinear * >(argp5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_LogLinearZeroCurve" "', argument " "6"" of type '" "Compounding""'");
    } 
    arg6 = static_cast< Compounding >(val6);
    {
      try {
        result = (LogLinearZeroCurvePtr *)new_LogLinearZeroCurvePtr__SWIG_0((std::vector< Date > const &)*arg1,(std::vector< double > const &)*arg2,(DayCounter const &)*arg3,(Calendar const &)*arg4,(LogLinear const &)*arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_LogLinearZeroCurvePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_LogLinearZeroCurve__SWIG_2) {
  {
    std::vector< Date > *arg1 = 0 ;
    std::vector< Rate > *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    Calendar *arg4 = 0 ;
    LogLinear *arg5 = 0 ;
    std::vector< Date > temp1 ;
    std::vector< Date > *v1 ;
    std::vector< double > temp2 ;
    std::vector< double > *v2 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int argvi = 0;
    LogLinearZeroCurvePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_LogLinearZeroCurve(dates,yields,dayCounter,calendar,i);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_LogLinearZeroCurve. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_LogLinearZeroCurve. "
              "Expected an array of " "Date");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_LogLinearZeroCurve. "
          "Expected an array of " "Date");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_LogLinearZeroCurve. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp2.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_LogLinearZeroCurve. "
              "Expected an array of ""double");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_LogLinearZeroCurve. "
          "Expected an array of ""double");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_LogLinearZeroCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LogLinearZeroCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_LogLinearZeroCurve" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LogLinearZeroCurve" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    arg4 = reinterpret_cast< Calendar * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_LogLinear,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_LogLinearZeroCurve" "', argument " "5"" of type '" "LogLinear const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LogLinearZeroCurve" "', argument " "5"" of type '" "LogLinear const &""'"); 
    }
    arg5 = reinterpret_cast< LogLinear * >(argp5);
    {
      try {
        result = (LogLinearZeroCurvePtr *)new_LogLinearZeroCurvePtr__SWIG_0((std::vector< Date > const &)*arg1,(std::vector< double > const &)*arg2,(DayCounter const &)*arg3,(Calendar const &)*arg4,(LogLinear const &)*arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_LogLinearZeroCurvePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_LogLinearZeroCurve__SWIG_3) {
  {
    std::vector< Date > *arg1 = 0 ;
    std::vector< Rate > *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    Calendar *arg4 = 0 ;
    std::vector< Date > temp1 ;
    std::vector< Date > *v1 ;
    std::vector< double > temp2 ;
    std::vector< double > *v2 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int argvi = 0;
    LogLinearZeroCurvePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_LogLinearZeroCurve(dates,yields,dayCounter,calendar);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_LogLinearZeroCurve. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_LogLinearZeroCurve. "
              "Expected an array of " "Date");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_LogLinearZeroCurve. "
          "Expected an array of " "Date");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_LogLinearZeroCurve. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp2.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_LogLinearZeroCurve. "
              "Expected an array of ""double");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_LogLinearZeroCurve. "
          "Expected an array of ""double");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_LogLinearZeroCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LogLinearZeroCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_LogLinearZeroCurve" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LogLinearZeroCurve" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    arg4 = reinterpret_cast< Calendar * >(argp4);
    {
      try {
        result = (LogLinearZeroCurvePtr *)new_LogLinearZeroCurvePtr__SWIG_0((std::vector< Date > const &)*arg1,(std::vector< double > const &)*arg2,(DayCounter const &)*arg3,(Calendar const &)*arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_LogLinearZeroCurvePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_LogLinearZeroCurve__SWIG_4) {
  {
    std::vector< Date > *arg1 = 0 ;
    std::vector< Rate > *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    std::vector< Date > temp1 ;
    std::vector< Date > *v1 ;
    std::vector< double > temp2 ;
    std::vector< double > *v2 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    LogLinearZeroCurvePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_LogLinearZeroCurve(dates,yields,dayCounter);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_LogLinearZeroCurve. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_LogLinearZeroCurve. "
              "Expected an array of " "Date");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_LogLinearZeroCurve. "
          "Expected an array of " "Date");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_LogLinearZeroCurve. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp2.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_LogLinearZeroCurve. "
              "Expected an array of ""double");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_LogLinearZeroCurve. "
          "Expected an array of ""double");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_LogLinearZeroCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LogLinearZeroCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    {
      try {
        result = (LogLinearZeroCurvePtr *)new_LogLinearZeroCurvePtr__SWIG_0((std::vector< Date > const &)*arg1,(std::vector< double > const &)*arg2,(DayCounter const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_LogLinearZeroCurvePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_LogLinearZeroCurve) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_LogLinear, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_LogLinear, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_LogLinear, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_LogLinearZeroCurve__SWIG_4); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_LogLinearZeroCurve__SWIG_3); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_LogLinearZeroCurve__SWIG_2); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_LogLinearZeroCurve__SWIG_1); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_LogLinearZeroCurve__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_LogLinearZeroCurve'");
  XSRETURN(0);
}


XS(_wrap_LogLinearZeroCurve_times) {
  {
    LogLinearZeroCurvePtr *arg1 = (LogLinearZeroCurvePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Time > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: LogLinearZeroCurve_times(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_LogLinearZeroCurvePtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LogLinearZeroCurve_times" "', argument " "1"" of type '" "LogLinearZeroCurvePtr *""'"); 
    }
    arg1 = reinterpret_cast< LogLinearZeroCurvePtr * >(argp1);
    {
      try {
        result = (std::vector< Time > *) &LogLinearZeroCurvePtr_times(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_LogLinearZeroCurve_data) {
  {
    LogLinearZeroCurvePtr *arg1 = (LogLinearZeroCurvePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Real > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: LogLinearZeroCurve_data(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_LogLinearZeroCurvePtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LogLinearZeroCurve_data" "', argument " "1"" of type '" "LogLinearZeroCurvePtr *""'"); 
    }
    arg1 = reinterpret_cast< LogLinearZeroCurvePtr * >(argp1);
    {
      try {
        result = (std::vector< Real > *) &LogLinearZeroCurvePtr_data(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_LogLinearZeroCurve_dates) {
  {
    LogLinearZeroCurvePtr *arg1 = (LogLinearZeroCurvePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Date > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: LogLinearZeroCurve_dates(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_LogLinearZeroCurvePtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LogLinearZeroCurve_dates" "', argument " "1"" of type '" "LogLinearZeroCurvePtr *""'"); 
    }
    arg1 = reinterpret_cast< LogLinearZeroCurvePtr * >(argp1);
    {
      try {
        result = (std::vector< Date > *) &LogLinearZeroCurvePtr_dates(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_Date_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_LogLinearZeroCurve_zeroRates) {
  {
    LogLinearZeroCurvePtr *arg1 = (LogLinearZeroCurvePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Rate > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: LogLinearZeroCurve_zeroRates(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_LogLinearZeroCurvePtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LogLinearZeroCurve_zeroRates" "', argument " "1"" of type '" "LogLinearZeroCurvePtr *""'"); 
    }
    arg1 = reinterpret_cast< LogLinearZeroCurvePtr * >(argp1);
    {
      try {
        result = (std::vector< Rate > *) &LogLinearZeroCurvePtr_zeroRates(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_LogLinearZeroCurve_nodes) {
  {
    LogLinearZeroCurvePtr *arg1 = (LogLinearZeroCurvePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< std::pair< Date,Rate > > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: LogLinearZeroCurve_nodes(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_LogLinearZeroCurvePtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LogLinearZeroCurve_nodes" "', argument " "1"" of type '" "LogLinearZeroCurvePtr *""'"); 
    }
    arg1 = reinterpret_cast< LogLinearZeroCurvePtr * >(argp1);
    {
      try {
        result = LogLinearZeroCurvePtr_nodes(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        std::pair< Date,double >* ptr = new std::pair< Date,double >(result[i]);
        svs[i] = sv_newmortal();
        SWIG_MakePtr(svs[i], (void*) ptr, 
          SWIGTYPE_p_std__pairT_Date_double_t, SWIG_SHADOW|0);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_LogLinearZeroCurve) {
  {
    LogLinearZeroCurvePtr *arg1 = (LogLinearZeroCurvePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_LogLinearZeroCurve(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_LogLinearZeroCurvePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_LogLinearZeroCurve" "', argument " "1"" of type '" "LogLinearZeroCurvePtr *""'"); 
    }
    arg1 = reinterpret_cast< LogLinearZeroCurvePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CubicZeroCurve__SWIG_0) {
  {
    std::vector< Date > *arg1 = 0 ;
    std::vector< Rate > *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    Calendar *arg4 = 0 ;
    Cubic *arg5 = 0 ;
    Compounding arg6 ;
    Frequency arg7 ;
    std::vector< Date > temp1 ;
    std::vector< Date > *v1 ;
    std::vector< double > temp2 ;
    std::vector< double > *v2 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    int val7 ;
    int ecode7 = 0 ;
    int argvi = 0;
    CubicZeroCurvePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: new_CubicZeroCurve(dates,yields,dayCounter,calendar,i,compounding,frequency);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_CubicZeroCurve. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_CubicZeroCurve. "
              "Expected an array of " "Date");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_CubicZeroCurve. "
          "Expected an array of " "Date");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_CubicZeroCurve. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp2.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_CubicZeroCurve. "
              "Expected an array of ""double");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_CubicZeroCurve. "
          "Expected an array of ""double");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CubicZeroCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CubicZeroCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_CubicZeroCurve" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CubicZeroCurve" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    arg4 = reinterpret_cast< Calendar * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Cubic,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_CubicZeroCurve" "', argument " "5"" of type '" "Cubic const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CubicZeroCurve" "', argument " "5"" of type '" "Cubic const &""'"); 
    }
    arg5 = reinterpret_cast< Cubic * >(argp5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_CubicZeroCurve" "', argument " "6"" of type '" "Compounding""'");
    } 
    arg6 = static_cast< Compounding >(val6);
    ecode7 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_CubicZeroCurve" "', argument " "7"" of type '" "Frequency""'");
    } 
    arg7 = static_cast< Frequency >(val7);
    {
      try {
        result = (CubicZeroCurvePtr *)new_CubicZeroCurvePtr__SWIG_0((std::vector< Date > const &)*arg1,(std::vector< double > const &)*arg2,(DayCounter const &)*arg3,(Calendar const &)*arg4,(Cubic const &)*arg5,arg6,arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CubicZeroCurvePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CubicZeroCurve__SWIG_1) {
  {
    std::vector< Date > *arg1 = 0 ;
    std::vector< Rate > *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    Calendar *arg4 = 0 ;
    Cubic *arg5 = 0 ;
    Compounding arg6 ;
    std::vector< Date > temp1 ;
    std::vector< Date > *v1 ;
    std::vector< double > temp2 ;
    std::vector< double > *v2 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    CubicZeroCurvePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_CubicZeroCurve(dates,yields,dayCounter,calendar,i,compounding);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_CubicZeroCurve. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_CubicZeroCurve. "
              "Expected an array of " "Date");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_CubicZeroCurve. "
          "Expected an array of " "Date");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_CubicZeroCurve. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp2.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_CubicZeroCurve. "
              "Expected an array of ""double");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_CubicZeroCurve. "
          "Expected an array of ""double");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CubicZeroCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CubicZeroCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_CubicZeroCurve" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CubicZeroCurve" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    arg4 = reinterpret_cast< Calendar * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Cubic,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_CubicZeroCurve" "', argument " "5"" of type '" "Cubic const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CubicZeroCurve" "', argument " "5"" of type '" "Cubic const &""'"); 
    }
    arg5 = reinterpret_cast< Cubic * >(argp5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_CubicZeroCurve" "', argument " "6"" of type '" "Compounding""'");
    } 
    arg6 = static_cast< Compounding >(val6);
    {
      try {
        result = (CubicZeroCurvePtr *)new_CubicZeroCurvePtr__SWIG_0((std::vector< Date > const &)*arg1,(std::vector< double > const &)*arg2,(DayCounter const &)*arg3,(Calendar const &)*arg4,(Cubic const &)*arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CubicZeroCurvePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CubicZeroCurve__SWIG_2) {
  {
    std::vector< Date > *arg1 = 0 ;
    std::vector< Rate > *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    Calendar *arg4 = 0 ;
    Cubic *arg5 = 0 ;
    std::vector< Date > temp1 ;
    std::vector< Date > *v1 ;
    std::vector< double > temp2 ;
    std::vector< double > *v2 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int argvi = 0;
    CubicZeroCurvePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_CubicZeroCurve(dates,yields,dayCounter,calendar,i);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_CubicZeroCurve. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_CubicZeroCurve. "
              "Expected an array of " "Date");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_CubicZeroCurve. "
          "Expected an array of " "Date");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_CubicZeroCurve. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp2.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_CubicZeroCurve. "
              "Expected an array of ""double");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_CubicZeroCurve. "
          "Expected an array of ""double");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CubicZeroCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CubicZeroCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_CubicZeroCurve" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CubicZeroCurve" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    arg4 = reinterpret_cast< Calendar * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Cubic,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_CubicZeroCurve" "', argument " "5"" of type '" "Cubic const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CubicZeroCurve" "', argument " "5"" of type '" "Cubic const &""'"); 
    }
    arg5 = reinterpret_cast< Cubic * >(argp5);
    {
      try {
        result = (CubicZeroCurvePtr *)new_CubicZeroCurvePtr__SWIG_0((std::vector< Date > const &)*arg1,(std::vector< double > const &)*arg2,(DayCounter const &)*arg3,(Calendar const &)*arg4,(Cubic const &)*arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CubicZeroCurvePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CubicZeroCurve__SWIG_3) {
  {
    std::vector< Date > *arg1 = 0 ;
    std::vector< Rate > *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    Calendar *arg4 = 0 ;
    std::vector< Date > temp1 ;
    std::vector< Date > *v1 ;
    std::vector< double > temp2 ;
    std::vector< double > *v2 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int argvi = 0;
    CubicZeroCurvePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_CubicZeroCurve(dates,yields,dayCounter,calendar);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_CubicZeroCurve. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_CubicZeroCurve. "
              "Expected an array of " "Date");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_CubicZeroCurve. "
          "Expected an array of " "Date");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_CubicZeroCurve. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp2.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_CubicZeroCurve. "
              "Expected an array of ""double");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_CubicZeroCurve. "
          "Expected an array of ""double");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CubicZeroCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CubicZeroCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_CubicZeroCurve" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CubicZeroCurve" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    arg4 = reinterpret_cast< Calendar * >(argp4);
    {
      try {
        result = (CubicZeroCurvePtr *)new_CubicZeroCurvePtr__SWIG_0((std::vector< Date > const &)*arg1,(std::vector< double > const &)*arg2,(DayCounter const &)*arg3,(Calendar const &)*arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CubicZeroCurvePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CubicZeroCurve__SWIG_4) {
  {
    std::vector< Date > *arg1 = 0 ;
    std::vector< Rate > *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    std::vector< Date > temp1 ;
    std::vector< Date > *v1 ;
    std::vector< double > temp2 ;
    std::vector< double > *v2 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    CubicZeroCurvePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_CubicZeroCurve(dates,yields,dayCounter);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_CubicZeroCurve. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_CubicZeroCurve. "
              "Expected an array of " "Date");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_CubicZeroCurve. "
          "Expected an array of " "Date");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_CubicZeroCurve. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp2.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_CubicZeroCurve. "
              "Expected an array of ""double");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_CubicZeroCurve. "
          "Expected an array of ""double");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CubicZeroCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_CubicZeroCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    {
      try {
        result = (CubicZeroCurvePtr *)new_CubicZeroCurvePtr__SWIG_0((std::vector< Date > const &)*arg1,(std::vector< double > const &)*arg2,(DayCounter const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_CubicZeroCurvePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_CubicZeroCurve) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Cubic, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Cubic, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Cubic, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_CubicZeroCurve__SWIG_4); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_CubicZeroCurve__SWIG_3); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_CubicZeroCurve__SWIG_2); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_CubicZeroCurve__SWIG_1); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_CubicZeroCurve__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_CubicZeroCurve'");
  XSRETURN(0);
}


XS(_wrap_CubicZeroCurve_times) {
  {
    CubicZeroCurvePtr *arg1 = (CubicZeroCurvePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Time > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CubicZeroCurve_times(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CubicZeroCurvePtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CubicZeroCurve_times" "', argument " "1"" of type '" "CubicZeroCurvePtr *""'"); 
    }
    arg1 = reinterpret_cast< CubicZeroCurvePtr * >(argp1);
    {
      try {
        result = (std::vector< Time > *) &CubicZeroCurvePtr_times(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CubicZeroCurve_data) {
  {
    CubicZeroCurvePtr *arg1 = (CubicZeroCurvePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Real > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CubicZeroCurve_data(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CubicZeroCurvePtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CubicZeroCurve_data" "', argument " "1"" of type '" "CubicZeroCurvePtr *""'"); 
    }
    arg1 = reinterpret_cast< CubicZeroCurvePtr * >(argp1);
    {
      try {
        result = (std::vector< Real > *) &CubicZeroCurvePtr_data(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CubicZeroCurve_dates) {
  {
    CubicZeroCurvePtr *arg1 = (CubicZeroCurvePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Date > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CubicZeroCurve_dates(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CubicZeroCurvePtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CubicZeroCurve_dates" "', argument " "1"" of type '" "CubicZeroCurvePtr *""'"); 
    }
    arg1 = reinterpret_cast< CubicZeroCurvePtr * >(argp1);
    {
      try {
        result = (std::vector< Date > *) &CubicZeroCurvePtr_dates(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_Date_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CubicZeroCurve_zeroRates) {
  {
    CubicZeroCurvePtr *arg1 = (CubicZeroCurvePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Rate > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CubicZeroCurve_zeroRates(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CubicZeroCurvePtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CubicZeroCurve_zeroRates" "', argument " "1"" of type '" "CubicZeroCurvePtr *""'"); 
    }
    arg1 = reinterpret_cast< CubicZeroCurvePtr * >(argp1);
    {
      try {
        result = (std::vector< Rate > *) &CubicZeroCurvePtr_zeroRates(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CubicZeroCurve_nodes) {
  {
    CubicZeroCurvePtr *arg1 = (CubicZeroCurvePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< std::pair< Date,Rate > > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CubicZeroCurve_nodes(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CubicZeroCurvePtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CubicZeroCurve_nodes" "', argument " "1"" of type '" "CubicZeroCurvePtr *""'"); 
    }
    arg1 = reinterpret_cast< CubicZeroCurvePtr * >(argp1);
    {
      try {
        result = CubicZeroCurvePtr_nodes(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        std::pair< Date,double >* ptr = new std::pair< Date,double >(result[i]);
        svs[i] = sv_newmortal();
        SWIG_MakePtr(svs[i], (void*) ptr, 
          SWIGTYPE_p_std__pairT_Date_double_t, SWIG_SHADOW|0);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_CubicZeroCurve) {
  {
    CubicZeroCurvePtr *arg1 = (CubicZeroCurvePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_CubicZeroCurve(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CubicZeroCurvePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CubicZeroCurve" "', argument " "1"" of type '" "CubicZeroCurvePtr *""'"); 
    }
    arg1 = reinterpret_cast< CubicZeroCurvePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_LogCubicZeroCurve__SWIG_0) {
  {
    std::vector< Date > *arg1 = 0 ;
    std::vector< Rate > *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    Calendar *arg4 = 0 ;
    DefaultLogCubic *arg5 = 0 ;
    Compounding arg6 ;
    Frequency arg7 ;
    std::vector< Date > temp1 ;
    std::vector< Date > *v1 ;
    std::vector< double > temp2 ;
    std::vector< double > *v2 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    int val7 ;
    int ecode7 = 0 ;
    int argvi = 0;
    LogCubicZeroCurvePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: new_LogCubicZeroCurve(dates,yields,dayCounter,calendar,i,compounding,frequency);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_LogCubicZeroCurve. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_LogCubicZeroCurve. "
              "Expected an array of " "Date");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_LogCubicZeroCurve. "
          "Expected an array of " "Date");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_LogCubicZeroCurve. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp2.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_LogCubicZeroCurve. "
              "Expected an array of ""double");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_LogCubicZeroCurve. "
          "Expected an array of ""double");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_LogCubicZeroCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LogCubicZeroCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_LogCubicZeroCurve" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LogCubicZeroCurve" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    arg4 = reinterpret_cast< Calendar * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_DefaultLogCubic,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_LogCubicZeroCurve" "', argument " "5"" of type '" "DefaultLogCubic const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LogCubicZeroCurve" "', argument " "5"" of type '" "DefaultLogCubic const &""'"); 
    }
    arg5 = reinterpret_cast< DefaultLogCubic * >(argp5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_LogCubicZeroCurve" "', argument " "6"" of type '" "Compounding""'");
    } 
    arg6 = static_cast< Compounding >(val6);
    ecode7 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_LogCubicZeroCurve" "', argument " "7"" of type '" "Frequency""'");
    } 
    arg7 = static_cast< Frequency >(val7);
    {
      try {
        result = (LogCubicZeroCurvePtr *)new_LogCubicZeroCurvePtr__SWIG_0((std::vector< Date > const &)*arg1,(std::vector< double > const &)*arg2,(DayCounter const &)*arg3,(Calendar const &)*arg4,(DefaultLogCubic const &)*arg5,arg6,arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_LogCubicZeroCurvePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_LogCubicZeroCurve__SWIG_1) {
  {
    std::vector< Date > *arg1 = 0 ;
    std::vector< Rate > *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    Calendar *arg4 = 0 ;
    DefaultLogCubic *arg5 = 0 ;
    Compounding arg6 ;
    std::vector< Date > temp1 ;
    std::vector< Date > *v1 ;
    std::vector< double > temp2 ;
    std::vector< double > *v2 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    LogCubicZeroCurvePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_LogCubicZeroCurve(dates,yields,dayCounter,calendar,i,compounding);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_LogCubicZeroCurve. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_LogCubicZeroCurve. "
              "Expected an array of " "Date");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_LogCubicZeroCurve. "
          "Expected an array of " "Date");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_LogCubicZeroCurve. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp2.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_LogCubicZeroCurve. "
              "Expected an array of ""double");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_LogCubicZeroCurve. "
          "Expected an array of ""double");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_LogCubicZeroCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LogCubicZeroCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_LogCubicZeroCurve" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LogCubicZeroCurve" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    arg4 = reinterpret_cast< Calendar * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_DefaultLogCubic,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_LogCubicZeroCurve" "', argument " "5"" of type '" "DefaultLogCubic const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LogCubicZeroCurve" "', argument " "5"" of type '" "DefaultLogCubic const &""'"); 
    }
    arg5 = reinterpret_cast< DefaultLogCubic * >(argp5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_LogCubicZeroCurve" "', argument " "6"" of type '" "Compounding""'");
    } 
    arg6 = static_cast< Compounding >(val6);
    {
      try {
        result = (LogCubicZeroCurvePtr *)new_LogCubicZeroCurvePtr__SWIG_0((std::vector< Date > const &)*arg1,(std::vector< double > const &)*arg2,(DayCounter const &)*arg3,(Calendar const &)*arg4,(DefaultLogCubic const &)*arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_LogCubicZeroCurvePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_LogCubicZeroCurve__SWIG_2) {
  {
    std::vector< Date > *arg1 = 0 ;
    std::vector< Rate > *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    Calendar *arg4 = 0 ;
    DefaultLogCubic *arg5 = 0 ;
    std::vector< Date > temp1 ;
    std::vector< Date > *v1 ;
    std::vector< double > temp2 ;
    std::vector< double > *v2 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int argvi = 0;
    LogCubicZeroCurvePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_LogCubicZeroCurve(dates,yields,dayCounter,calendar,i);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_LogCubicZeroCurve. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_LogCubicZeroCurve. "
              "Expected an array of " "Date");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_LogCubicZeroCurve. "
          "Expected an array of " "Date");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_LogCubicZeroCurve. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp2.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_LogCubicZeroCurve. "
              "Expected an array of ""double");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_LogCubicZeroCurve. "
          "Expected an array of ""double");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_LogCubicZeroCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LogCubicZeroCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_LogCubicZeroCurve" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LogCubicZeroCurve" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    arg4 = reinterpret_cast< Calendar * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_DefaultLogCubic,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_LogCubicZeroCurve" "', argument " "5"" of type '" "DefaultLogCubic const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LogCubicZeroCurve" "', argument " "5"" of type '" "DefaultLogCubic const &""'"); 
    }
    arg5 = reinterpret_cast< DefaultLogCubic * >(argp5);
    {
      try {
        result = (LogCubicZeroCurvePtr *)new_LogCubicZeroCurvePtr__SWIG_0((std::vector< Date > const &)*arg1,(std::vector< double > const &)*arg2,(DayCounter const &)*arg3,(Calendar const &)*arg4,(DefaultLogCubic const &)*arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_LogCubicZeroCurvePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_LogCubicZeroCurve__SWIG_3) {
  {
    std::vector< Date > *arg1 = 0 ;
    std::vector< Rate > *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    Calendar *arg4 = 0 ;
    std::vector< Date > temp1 ;
    std::vector< Date > *v1 ;
    std::vector< double > temp2 ;
    std::vector< double > *v2 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int argvi = 0;
    LogCubicZeroCurvePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_LogCubicZeroCurve(dates,yields,dayCounter,calendar);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_LogCubicZeroCurve. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_LogCubicZeroCurve. "
              "Expected an array of " "Date");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_LogCubicZeroCurve. "
          "Expected an array of " "Date");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_LogCubicZeroCurve. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp2.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_LogCubicZeroCurve. "
              "Expected an array of ""double");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_LogCubicZeroCurve. "
          "Expected an array of ""double");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_LogCubicZeroCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LogCubicZeroCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_LogCubicZeroCurve" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LogCubicZeroCurve" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    arg4 = reinterpret_cast< Calendar * >(argp4);
    {
      try {
        result = (LogCubicZeroCurvePtr *)new_LogCubicZeroCurvePtr__SWIG_0((std::vector< Date > const &)*arg1,(std::vector< double > const &)*arg2,(DayCounter const &)*arg3,(Calendar const &)*arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_LogCubicZeroCurvePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_LogCubicZeroCurve__SWIG_4) {
  {
    std::vector< Date > *arg1 = 0 ;
    std::vector< Rate > *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    std::vector< Date > temp1 ;
    std::vector< Date > *v1 ;
    std::vector< double > temp2 ;
    std::vector< double > *v2 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    LogCubicZeroCurvePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_LogCubicZeroCurve(dates,yields,dayCounter);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_LogCubicZeroCurve. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_LogCubicZeroCurve. "
              "Expected an array of " "Date");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_LogCubicZeroCurve. "
          "Expected an array of " "Date");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_LogCubicZeroCurve. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp2.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_LogCubicZeroCurve. "
              "Expected an array of ""double");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_LogCubicZeroCurve. "
          "Expected an array of ""double");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_LogCubicZeroCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LogCubicZeroCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    {
      try {
        result = (LogCubicZeroCurvePtr *)new_LogCubicZeroCurvePtr__SWIG_0((std::vector< Date > const &)*arg1,(std::vector< double > const &)*arg2,(DayCounter const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_LogCubicZeroCurvePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_LogCubicZeroCurve) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_DefaultLogCubic, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_DefaultLogCubic, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_DefaultLogCubic, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_LogCubicZeroCurve__SWIG_4); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_LogCubicZeroCurve__SWIG_3); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_LogCubicZeroCurve__SWIG_2); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_LogCubicZeroCurve__SWIG_1); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_LogCubicZeroCurve__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_LogCubicZeroCurve'");
  XSRETURN(0);
}


XS(_wrap_LogCubicZeroCurve_times) {
  {
    LogCubicZeroCurvePtr *arg1 = (LogCubicZeroCurvePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Time > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: LogCubicZeroCurve_times(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_LogCubicZeroCurvePtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LogCubicZeroCurve_times" "', argument " "1"" of type '" "LogCubicZeroCurvePtr *""'"); 
    }
    arg1 = reinterpret_cast< LogCubicZeroCurvePtr * >(argp1);
    {
      try {
        result = (std::vector< Time > *) &LogCubicZeroCurvePtr_times(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_LogCubicZeroCurve_data) {
  {
    LogCubicZeroCurvePtr *arg1 = (LogCubicZeroCurvePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Real > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: LogCubicZeroCurve_data(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_LogCubicZeroCurvePtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LogCubicZeroCurve_data" "', argument " "1"" of type '" "LogCubicZeroCurvePtr *""'"); 
    }
    arg1 = reinterpret_cast< LogCubicZeroCurvePtr * >(argp1);
    {
      try {
        result = (std::vector< Real > *) &LogCubicZeroCurvePtr_data(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_LogCubicZeroCurve_dates) {
  {
    LogCubicZeroCurvePtr *arg1 = (LogCubicZeroCurvePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Date > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: LogCubicZeroCurve_dates(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_LogCubicZeroCurvePtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LogCubicZeroCurve_dates" "', argument " "1"" of type '" "LogCubicZeroCurvePtr *""'"); 
    }
    arg1 = reinterpret_cast< LogCubicZeroCurvePtr * >(argp1);
    {
      try {
        result = (std::vector< Date > *) &LogCubicZeroCurvePtr_dates(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_Date_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_LogCubicZeroCurve_zeroRates) {
  {
    LogCubicZeroCurvePtr *arg1 = (LogCubicZeroCurvePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Rate > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: LogCubicZeroCurve_zeroRates(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_LogCubicZeroCurvePtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LogCubicZeroCurve_zeroRates" "', argument " "1"" of type '" "LogCubicZeroCurvePtr *""'"); 
    }
    arg1 = reinterpret_cast< LogCubicZeroCurvePtr * >(argp1);
    {
      try {
        result = (std::vector< Rate > *) &LogCubicZeroCurvePtr_zeroRates(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_LogCubicZeroCurve_nodes) {
  {
    LogCubicZeroCurvePtr *arg1 = (LogCubicZeroCurvePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< std::pair< Date,Rate > > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: LogCubicZeroCurve_nodes(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_LogCubicZeroCurvePtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LogCubicZeroCurve_nodes" "', argument " "1"" of type '" "LogCubicZeroCurvePtr *""'"); 
    }
    arg1 = reinterpret_cast< LogCubicZeroCurvePtr * >(argp1);
    {
      try {
        result = LogCubicZeroCurvePtr_nodes(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        std::pair< Date,double >* ptr = new std::pair< Date,double >(result[i]);
        svs[i] = sv_newmortal();
        SWIG_MakePtr(svs[i], (void*) ptr, 
          SWIGTYPE_p_std__pairT_Date_double_t, SWIG_SHADOW|0);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_LogCubicZeroCurve) {
  {
    LogCubicZeroCurvePtr *arg1 = (LogCubicZeroCurvePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_LogCubicZeroCurve(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_LogCubicZeroCurvePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_LogCubicZeroCurve" "', argument " "1"" of type '" "LogCubicZeroCurvePtr *""'"); 
    }
    arg1 = reinterpret_cast< LogCubicZeroCurvePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ForwardFlatZeroCurve__SWIG_0) {
  {
    std::vector< Date > *arg1 = 0 ;
    std::vector< Rate > *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    Calendar *arg4 = 0 ;
    ForwardFlat *arg5 = 0 ;
    Compounding arg6 ;
    Frequency arg7 ;
    std::vector< Date > temp1 ;
    std::vector< Date > *v1 ;
    std::vector< double > temp2 ;
    std::vector< double > *v2 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    int val7 ;
    int ecode7 = 0 ;
    int argvi = 0;
    ForwardFlatZeroCurvePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: new_ForwardFlatZeroCurve(dates,yields,dayCounter,calendar,i,compounding,frequency);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_ForwardFlatZeroCurve. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_ForwardFlatZeroCurve. "
              "Expected an array of " "Date");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_ForwardFlatZeroCurve. "
          "Expected an array of " "Date");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_ForwardFlatZeroCurve. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp2.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_ForwardFlatZeroCurve. "
              "Expected an array of ""double");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_ForwardFlatZeroCurve. "
          "Expected an array of ""double");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_ForwardFlatZeroCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ForwardFlatZeroCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_ForwardFlatZeroCurve" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ForwardFlatZeroCurve" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    arg4 = reinterpret_cast< Calendar * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_ForwardFlat,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_ForwardFlatZeroCurve" "', argument " "5"" of type '" "ForwardFlat const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ForwardFlatZeroCurve" "', argument " "5"" of type '" "ForwardFlat const &""'"); 
    }
    arg5 = reinterpret_cast< ForwardFlat * >(argp5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_ForwardFlatZeroCurve" "', argument " "6"" of type '" "Compounding""'");
    } 
    arg6 = static_cast< Compounding >(val6);
    ecode7 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_ForwardFlatZeroCurve" "', argument " "7"" of type '" "Frequency""'");
    } 
    arg7 = static_cast< Frequency >(val7);
    {
      try {
        result = (ForwardFlatZeroCurvePtr *)new_ForwardFlatZeroCurvePtr__SWIG_0((std::vector< Date > const &)*arg1,(std::vector< double > const &)*arg2,(DayCounter const &)*arg3,(Calendar const &)*arg4,(ForwardFlat const &)*arg5,arg6,arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ForwardFlatZeroCurvePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ForwardFlatZeroCurve__SWIG_1) {
  {
    std::vector< Date > *arg1 = 0 ;
    std::vector< Rate > *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    Calendar *arg4 = 0 ;
    ForwardFlat *arg5 = 0 ;
    Compounding arg6 ;
    std::vector< Date > temp1 ;
    std::vector< Date > *v1 ;
    std::vector< double > temp2 ;
    std::vector< double > *v2 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    ForwardFlatZeroCurvePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_ForwardFlatZeroCurve(dates,yields,dayCounter,calendar,i,compounding);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_ForwardFlatZeroCurve. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_ForwardFlatZeroCurve. "
              "Expected an array of " "Date");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_ForwardFlatZeroCurve. "
          "Expected an array of " "Date");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_ForwardFlatZeroCurve. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp2.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_ForwardFlatZeroCurve. "
              "Expected an array of ""double");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_ForwardFlatZeroCurve. "
          "Expected an array of ""double");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_ForwardFlatZeroCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ForwardFlatZeroCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_ForwardFlatZeroCurve" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ForwardFlatZeroCurve" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    arg4 = reinterpret_cast< Calendar * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_ForwardFlat,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_ForwardFlatZeroCurve" "', argument " "5"" of type '" "ForwardFlat const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ForwardFlatZeroCurve" "', argument " "5"" of type '" "ForwardFlat const &""'"); 
    }
    arg5 = reinterpret_cast< ForwardFlat * >(argp5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_ForwardFlatZeroCurve" "', argument " "6"" of type '" "Compounding""'");
    } 
    arg6 = static_cast< Compounding >(val6);
    {
      try {
        result = (ForwardFlatZeroCurvePtr *)new_ForwardFlatZeroCurvePtr__SWIG_0((std::vector< Date > const &)*arg1,(std::vector< double > const &)*arg2,(DayCounter const &)*arg3,(Calendar const &)*arg4,(ForwardFlat const &)*arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ForwardFlatZeroCurvePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ForwardFlatZeroCurve__SWIG_2) {
  {
    std::vector< Date > *arg1 = 0 ;
    std::vector< Rate > *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    Calendar *arg4 = 0 ;
    ForwardFlat *arg5 = 0 ;
    std::vector< Date > temp1 ;
    std::vector< Date > *v1 ;
    std::vector< double > temp2 ;
    std::vector< double > *v2 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int argvi = 0;
    ForwardFlatZeroCurvePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_ForwardFlatZeroCurve(dates,yields,dayCounter,calendar,i);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_ForwardFlatZeroCurve. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_ForwardFlatZeroCurve. "
              "Expected an array of " "Date");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_ForwardFlatZeroCurve. "
          "Expected an array of " "Date");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_ForwardFlatZeroCurve. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp2.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_ForwardFlatZeroCurve. "
              "Expected an array of ""double");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_ForwardFlatZeroCurve. "
          "Expected an array of ""double");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_ForwardFlatZeroCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ForwardFlatZeroCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_ForwardFlatZeroCurve" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ForwardFlatZeroCurve" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    arg4 = reinterpret_cast< Calendar * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_ForwardFlat,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_ForwardFlatZeroCurve" "', argument " "5"" of type '" "ForwardFlat const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ForwardFlatZeroCurve" "', argument " "5"" of type '" "ForwardFlat const &""'"); 
    }
    arg5 = reinterpret_cast< ForwardFlat * >(argp5);
    {
      try {
        result = (ForwardFlatZeroCurvePtr *)new_ForwardFlatZeroCurvePtr__SWIG_0((std::vector< Date > const &)*arg1,(std::vector< double > const &)*arg2,(DayCounter const &)*arg3,(Calendar const &)*arg4,(ForwardFlat const &)*arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ForwardFlatZeroCurvePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ForwardFlatZeroCurve__SWIG_3) {
  {
    std::vector< Date > *arg1 = 0 ;
    std::vector< Rate > *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    Calendar *arg4 = 0 ;
    std::vector< Date > temp1 ;
    std::vector< Date > *v1 ;
    std::vector< double > temp2 ;
    std::vector< double > *v2 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int argvi = 0;
    ForwardFlatZeroCurvePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_ForwardFlatZeroCurve(dates,yields,dayCounter,calendar);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_ForwardFlatZeroCurve. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_ForwardFlatZeroCurve. "
              "Expected an array of " "Date");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_ForwardFlatZeroCurve. "
          "Expected an array of " "Date");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_ForwardFlatZeroCurve. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp2.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_ForwardFlatZeroCurve. "
              "Expected an array of ""double");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_ForwardFlatZeroCurve. "
          "Expected an array of ""double");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_ForwardFlatZeroCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ForwardFlatZeroCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_ForwardFlatZeroCurve" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ForwardFlatZeroCurve" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    arg4 = reinterpret_cast< Calendar * >(argp4);
    {
      try {
        result = (ForwardFlatZeroCurvePtr *)new_ForwardFlatZeroCurvePtr__SWIG_0((std::vector< Date > const &)*arg1,(std::vector< double > const &)*arg2,(DayCounter const &)*arg3,(Calendar const &)*arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ForwardFlatZeroCurvePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ForwardFlatZeroCurve__SWIG_4) {
  {
    std::vector< Date > *arg1 = 0 ;
    std::vector< Rate > *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    std::vector< Date > temp1 ;
    std::vector< Date > *v1 ;
    std::vector< double > temp2 ;
    std::vector< double > *v2 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    ForwardFlatZeroCurvePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_ForwardFlatZeroCurve(dates,yields,dayCounter);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_ForwardFlatZeroCurve. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_ForwardFlatZeroCurve. "
              "Expected an array of " "Date");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_ForwardFlatZeroCurve. "
          "Expected an array of " "Date");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_ForwardFlatZeroCurve. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp2.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_ForwardFlatZeroCurve. "
              "Expected an array of ""double");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_ForwardFlatZeroCurve. "
          "Expected an array of ""double");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_ForwardFlatZeroCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ForwardFlatZeroCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    {
      try {
        result = (ForwardFlatZeroCurvePtr *)new_ForwardFlatZeroCurvePtr__SWIG_0((std::vector< Date > const &)*arg1,(std::vector< double > const &)*arg2,(DayCounter const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ForwardFlatZeroCurvePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ForwardFlatZeroCurve) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_ForwardFlat, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_ForwardFlat, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_ForwardFlat, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ForwardFlatZeroCurve__SWIG_4); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ForwardFlatZeroCurve__SWIG_3); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ForwardFlatZeroCurve__SWIG_2); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ForwardFlatZeroCurve__SWIG_1); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ForwardFlatZeroCurve__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_ForwardFlatZeroCurve'");
  XSRETURN(0);
}


XS(_wrap_ForwardFlatZeroCurve_times) {
  {
    ForwardFlatZeroCurvePtr *arg1 = (ForwardFlatZeroCurvePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Time > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ForwardFlatZeroCurve_times(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ForwardFlatZeroCurvePtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ForwardFlatZeroCurve_times" "', argument " "1"" of type '" "ForwardFlatZeroCurvePtr *""'"); 
    }
    arg1 = reinterpret_cast< ForwardFlatZeroCurvePtr * >(argp1);
    {
      try {
        result = (std::vector< Time > *) &ForwardFlatZeroCurvePtr_times(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ForwardFlatZeroCurve_data) {
  {
    ForwardFlatZeroCurvePtr *arg1 = (ForwardFlatZeroCurvePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Real > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ForwardFlatZeroCurve_data(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ForwardFlatZeroCurvePtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ForwardFlatZeroCurve_data" "', argument " "1"" of type '" "ForwardFlatZeroCurvePtr *""'"); 
    }
    arg1 = reinterpret_cast< ForwardFlatZeroCurvePtr * >(argp1);
    {
      try {
        result = (std::vector< Real > *) &ForwardFlatZeroCurvePtr_data(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ForwardFlatZeroCurve_dates) {
  {
    ForwardFlatZeroCurvePtr *arg1 = (ForwardFlatZeroCurvePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Date > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ForwardFlatZeroCurve_dates(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ForwardFlatZeroCurvePtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ForwardFlatZeroCurve_dates" "', argument " "1"" of type '" "ForwardFlatZeroCurvePtr *""'"); 
    }
    arg1 = reinterpret_cast< ForwardFlatZeroCurvePtr * >(argp1);
    {
      try {
        result = (std::vector< Date > *) &ForwardFlatZeroCurvePtr_dates(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_Date_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ForwardFlatZeroCurve_zeroRates) {
  {
    ForwardFlatZeroCurvePtr *arg1 = (ForwardFlatZeroCurvePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Rate > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ForwardFlatZeroCurve_zeroRates(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ForwardFlatZeroCurvePtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ForwardFlatZeroCurve_zeroRates" "', argument " "1"" of type '" "ForwardFlatZeroCurvePtr *""'"); 
    }
    arg1 = reinterpret_cast< ForwardFlatZeroCurvePtr * >(argp1);
    {
      try {
        result = (std::vector< Rate > *) &ForwardFlatZeroCurvePtr_zeroRates(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ForwardFlatZeroCurve_nodes) {
  {
    ForwardFlatZeroCurvePtr *arg1 = (ForwardFlatZeroCurvePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< std::pair< Date,Rate > > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ForwardFlatZeroCurve_nodes(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ForwardFlatZeroCurvePtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ForwardFlatZeroCurve_nodes" "', argument " "1"" of type '" "ForwardFlatZeroCurvePtr *""'"); 
    }
    arg1 = reinterpret_cast< ForwardFlatZeroCurvePtr * >(argp1);
    {
      try {
        result = ForwardFlatZeroCurvePtr_nodes(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        std::pair< Date,double >* ptr = new std::pair< Date,double >(result[i]);
        svs[i] = sv_newmortal();
        SWIG_MakePtr(svs[i], (void*) ptr, 
          SWIGTYPE_p_std__pairT_Date_double_t, SWIG_SHADOW|0);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_ForwardFlatZeroCurve) {
  {
    ForwardFlatZeroCurvePtr *arg1 = (ForwardFlatZeroCurvePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_ForwardFlatZeroCurve(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ForwardFlatZeroCurvePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ForwardFlatZeroCurve" "', argument " "1"" of type '" "ForwardFlatZeroCurvePtr *""'"); 
    }
    arg1 = reinterpret_cast< ForwardFlatZeroCurvePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BackwardFlatZeroCurve__SWIG_0) {
  {
    std::vector< Date > *arg1 = 0 ;
    std::vector< Rate > *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    Calendar *arg4 = 0 ;
    BackwardFlat *arg5 = 0 ;
    Compounding arg6 ;
    Frequency arg7 ;
    std::vector< Date > temp1 ;
    std::vector< Date > *v1 ;
    std::vector< double > temp2 ;
    std::vector< double > *v2 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    int val7 ;
    int ecode7 = 0 ;
    int argvi = 0;
    BackwardFlatZeroCurvePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: new_BackwardFlatZeroCurve(dates,yields,dayCounter,calendar,i,compounding,frequency);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_BackwardFlatZeroCurve. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_BackwardFlatZeroCurve. "
              "Expected an array of " "Date");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_BackwardFlatZeroCurve. "
          "Expected an array of " "Date");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_BackwardFlatZeroCurve. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp2.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_BackwardFlatZeroCurve. "
              "Expected an array of ""double");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_BackwardFlatZeroCurve. "
          "Expected an array of ""double");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_BackwardFlatZeroCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BackwardFlatZeroCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_BackwardFlatZeroCurve" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BackwardFlatZeroCurve" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    arg4 = reinterpret_cast< Calendar * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_BackwardFlat,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_BackwardFlatZeroCurve" "', argument " "5"" of type '" "BackwardFlat const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BackwardFlatZeroCurve" "', argument " "5"" of type '" "BackwardFlat const &""'"); 
    }
    arg5 = reinterpret_cast< BackwardFlat * >(argp5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_BackwardFlatZeroCurve" "', argument " "6"" of type '" "Compounding""'");
    } 
    arg6 = static_cast< Compounding >(val6);
    ecode7 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_BackwardFlatZeroCurve" "', argument " "7"" of type '" "Frequency""'");
    } 
    arg7 = static_cast< Frequency >(val7);
    {
      try {
        result = (BackwardFlatZeroCurvePtr *)new_BackwardFlatZeroCurvePtr__SWIG_0((std::vector< Date > const &)*arg1,(std::vector< double > const &)*arg2,(DayCounter const &)*arg3,(Calendar const &)*arg4,(BackwardFlat const &)*arg5,arg6,arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BackwardFlatZeroCurvePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BackwardFlatZeroCurve__SWIG_1) {
  {
    std::vector< Date > *arg1 = 0 ;
    std::vector< Rate > *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    Calendar *arg4 = 0 ;
    BackwardFlat *arg5 = 0 ;
    Compounding arg6 ;
    std::vector< Date > temp1 ;
    std::vector< Date > *v1 ;
    std::vector< double > temp2 ;
    std::vector< double > *v2 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    BackwardFlatZeroCurvePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_BackwardFlatZeroCurve(dates,yields,dayCounter,calendar,i,compounding);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_BackwardFlatZeroCurve. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_BackwardFlatZeroCurve. "
              "Expected an array of " "Date");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_BackwardFlatZeroCurve. "
          "Expected an array of " "Date");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_BackwardFlatZeroCurve. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp2.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_BackwardFlatZeroCurve. "
              "Expected an array of ""double");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_BackwardFlatZeroCurve. "
          "Expected an array of ""double");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_BackwardFlatZeroCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BackwardFlatZeroCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_BackwardFlatZeroCurve" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BackwardFlatZeroCurve" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    arg4 = reinterpret_cast< Calendar * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_BackwardFlat,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_BackwardFlatZeroCurve" "', argument " "5"" of type '" "BackwardFlat const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BackwardFlatZeroCurve" "', argument " "5"" of type '" "BackwardFlat const &""'"); 
    }
    arg5 = reinterpret_cast< BackwardFlat * >(argp5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_BackwardFlatZeroCurve" "', argument " "6"" of type '" "Compounding""'");
    } 
    arg6 = static_cast< Compounding >(val6);
    {
      try {
        result = (BackwardFlatZeroCurvePtr *)new_BackwardFlatZeroCurvePtr__SWIG_0((std::vector< Date > const &)*arg1,(std::vector< double > const &)*arg2,(DayCounter const &)*arg3,(Calendar const &)*arg4,(BackwardFlat const &)*arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BackwardFlatZeroCurvePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BackwardFlatZeroCurve__SWIG_2) {
  {
    std::vector< Date > *arg1 = 0 ;
    std::vector< Rate > *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    Calendar *arg4 = 0 ;
    BackwardFlat *arg5 = 0 ;
    std::vector< Date > temp1 ;
    std::vector< Date > *v1 ;
    std::vector< double > temp2 ;
    std::vector< double > *v2 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int argvi = 0;
    BackwardFlatZeroCurvePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_BackwardFlatZeroCurve(dates,yields,dayCounter,calendar,i);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_BackwardFlatZeroCurve. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_BackwardFlatZeroCurve. "
              "Expected an array of " "Date");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_BackwardFlatZeroCurve. "
          "Expected an array of " "Date");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_BackwardFlatZeroCurve. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp2.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_BackwardFlatZeroCurve. "
              "Expected an array of ""double");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_BackwardFlatZeroCurve. "
          "Expected an array of ""double");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_BackwardFlatZeroCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BackwardFlatZeroCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_BackwardFlatZeroCurve" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BackwardFlatZeroCurve" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    arg4 = reinterpret_cast< Calendar * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_BackwardFlat,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_BackwardFlatZeroCurve" "', argument " "5"" of type '" "BackwardFlat const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BackwardFlatZeroCurve" "', argument " "5"" of type '" "BackwardFlat const &""'"); 
    }
    arg5 = reinterpret_cast< BackwardFlat * >(argp5);
    {
      try {
        result = (BackwardFlatZeroCurvePtr *)new_BackwardFlatZeroCurvePtr__SWIG_0((std::vector< Date > const &)*arg1,(std::vector< double > const &)*arg2,(DayCounter const &)*arg3,(Calendar const &)*arg4,(BackwardFlat const &)*arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BackwardFlatZeroCurvePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BackwardFlatZeroCurve__SWIG_3) {
  {
    std::vector< Date > *arg1 = 0 ;
    std::vector< Rate > *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    Calendar *arg4 = 0 ;
    std::vector< Date > temp1 ;
    std::vector< Date > *v1 ;
    std::vector< double > temp2 ;
    std::vector< double > *v2 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int argvi = 0;
    BackwardFlatZeroCurvePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_BackwardFlatZeroCurve(dates,yields,dayCounter,calendar);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_BackwardFlatZeroCurve. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_BackwardFlatZeroCurve. "
              "Expected an array of " "Date");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_BackwardFlatZeroCurve. "
          "Expected an array of " "Date");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_BackwardFlatZeroCurve. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp2.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_BackwardFlatZeroCurve. "
              "Expected an array of ""double");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_BackwardFlatZeroCurve. "
          "Expected an array of ""double");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_BackwardFlatZeroCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BackwardFlatZeroCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_BackwardFlatZeroCurve" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BackwardFlatZeroCurve" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    arg4 = reinterpret_cast< Calendar * >(argp4);
    {
      try {
        result = (BackwardFlatZeroCurvePtr *)new_BackwardFlatZeroCurvePtr__SWIG_0((std::vector< Date > const &)*arg1,(std::vector< double > const &)*arg2,(DayCounter const &)*arg3,(Calendar const &)*arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BackwardFlatZeroCurvePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BackwardFlatZeroCurve__SWIG_4) {
  {
    std::vector< Date > *arg1 = 0 ;
    std::vector< Rate > *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    std::vector< Date > temp1 ;
    std::vector< Date > *v1 ;
    std::vector< double > temp2 ;
    std::vector< double > *v2 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    BackwardFlatZeroCurvePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_BackwardFlatZeroCurve(dates,yields,dayCounter);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_BackwardFlatZeroCurve. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_BackwardFlatZeroCurve. "
              "Expected an array of " "Date");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_BackwardFlatZeroCurve. "
          "Expected an array of " "Date");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_BackwardFlatZeroCurve. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp2.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_BackwardFlatZeroCurve. "
              "Expected an array of ""double");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_BackwardFlatZeroCurve. "
          "Expected an array of ""double");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_BackwardFlatZeroCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_BackwardFlatZeroCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    {
      try {
        result = (BackwardFlatZeroCurvePtr *)new_BackwardFlatZeroCurvePtr__SWIG_0((std::vector< Date > const &)*arg1,(std::vector< double > const &)*arg2,(DayCounter const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_BackwardFlatZeroCurvePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BackwardFlatZeroCurve) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_BackwardFlat, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_BackwardFlat, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_BackwardFlat, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_BackwardFlatZeroCurve__SWIG_4); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_BackwardFlatZeroCurve__SWIG_3); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_BackwardFlatZeroCurve__SWIG_2); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_BackwardFlatZeroCurve__SWIG_1); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_BackwardFlatZeroCurve__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_BackwardFlatZeroCurve'");
  XSRETURN(0);
}


XS(_wrap_BackwardFlatZeroCurve_times) {
  {
    BackwardFlatZeroCurvePtr *arg1 = (BackwardFlatZeroCurvePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Time > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BackwardFlatZeroCurve_times(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BackwardFlatZeroCurvePtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BackwardFlatZeroCurve_times" "', argument " "1"" of type '" "BackwardFlatZeroCurvePtr *""'"); 
    }
    arg1 = reinterpret_cast< BackwardFlatZeroCurvePtr * >(argp1);
    {
      try {
        result = (std::vector< Time > *) &BackwardFlatZeroCurvePtr_times(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BackwardFlatZeroCurve_data) {
  {
    BackwardFlatZeroCurvePtr *arg1 = (BackwardFlatZeroCurvePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Real > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BackwardFlatZeroCurve_data(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BackwardFlatZeroCurvePtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BackwardFlatZeroCurve_data" "', argument " "1"" of type '" "BackwardFlatZeroCurvePtr *""'"); 
    }
    arg1 = reinterpret_cast< BackwardFlatZeroCurvePtr * >(argp1);
    {
      try {
        result = (std::vector< Real > *) &BackwardFlatZeroCurvePtr_data(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BackwardFlatZeroCurve_dates) {
  {
    BackwardFlatZeroCurvePtr *arg1 = (BackwardFlatZeroCurvePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Date > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BackwardFlatZeroCurve_dates(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BackwardFlatZeroCurvePtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BackwardFlatZeroCurve_dates" "', argument " "1"" of type '" "BackwardFlatZeroCurvePtr *""'"); 
    }
    arg1 = reinterpret_cast< BackwardFlatZeroCurvePtr * >(argp1);
    {
      try {
        result = (std::vector< Date > *) &BackwardFlatZeroCurvePtr_dates(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_Date_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BackwardFlatZeroCurve_zeroRates) {
  {
    BackwardFlatZeroCurvePtr *arg1 = (BackwardFlatZeroCurvePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Rate > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BackwardFlatZeroCurve_zeroRates(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BackwardFlatZeroCurvePtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BackwardFlatZeroCurve_zeroRates" "', argument " "1"" of type '" "BackwardFlatZeroCurvePtr *""'"); 
    }
    arg1 = reinterpret_cast< BackwardFlatZeroCurvePtr * >(argp1);
    {
      try {
        result = (std::vector< Rate > *) &BackwardFlatZeroCurvePtr_zeroRates(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BackwardFlatZeroCurve_nodes) {
  {
    BackwardFlatZeroCurvePtr *arg1 = (BackwardFlatZeroCurvePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< std::pair< Date,Rate > > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BackwardFlatZeroCurve_nodes(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BackwardFlatZeroCurvePtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BackwardFlatZeroCurve_nodes" "', argument " "1"" of type '" "BackwardFlatZeroCurvePtr *""'"); 
    }
    arg1 = reinterpret_cast< BackwardFlatZeroCurvePtr * >(argp1);
    {
      try {
        result = BackwardFlatZeroCurvePtr_nodes(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        std::pair< Date,double >* ptr = new std::pair< Date,double >(result[i]);
        svs[i] = sv_newmortal();
        SWIG_MakePtr(svs[i], (void*) ptr, 
          SWIGTYPE_p_std__pairT_Date_double_t, SWIG_SHADOW|0);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_BackwardFlatZeroCurve) {
  {
    BackwardFlatZeroCurvePtr *arg1 = (BackwardFlatZeroCurvePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_BackwardFlatZeroCurve(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_BackwardFlatZeroCurvePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_BackwardFlatZeroCurve" "', argument " "1"" of type '" "BackwardFlatZeroCurvePtr *""'"); 
    }
    arg1 = reinterpret_cast< BackwardFlatZeroCurvePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MonotonicCubicZeroCurve__SWIG_0) {
  {
    std::vector< Date > *arg1 = 0 ;
    std::vector< Rate > *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    Calendar *arg4 = 0 ;
    MonotonicCubic *arg5 = 0 ;
    Compounding arg6 ;
    Frequency arg7 ;
    std::vector< Date > temp1 ;
    std::vector< Date > *v1 ;
    std::vector< double > temp2 ;
    std::vector< double > *v2 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    int val7 ;
    int ecode7 = 0 ;
    int argvi = 0;
    MonotonicCubicZeroCurvePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: new_MonotonicCubicZeroCurve(dates,yields,dayCounter,calendar,i,compounding,frequency);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_MonotonicCubicZeroCurve. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_MonotonicCubicZeroCurve. "
              "Expected an array of " "Date");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_MonotonicCubicZeroCurve. "
          "Expected an array of " "Date");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_MonotonicCubicZeroCurve. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp2.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_MonotonicCubicZeroCurve. "
              "Expected an array of ""double");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_MonotonicCubicZeroCurve. "
          "Expected an array of ""double");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_MonotonicCubicZeroCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MonotonicCubicZeroCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_MonotonicCubicZeroCurve" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MonotonicCubicZeroCurve" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    arg4 = reinterpret_cast< Calendar * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_MonotonicCubic,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_MonotonicCubicZeroCurve" "', argument " "5"" of type '" "MonotonicCubic const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MonotonicCubicZeroCurve" "', argument " "5"" of type '" "MonotonicCubic const &""'"); 
    }
    arg5 = reinterpret_cast< MonotonicCubic * >(argp5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_MonotonicCubicZeroCurve" "', argument " "6"" of type '" "Compounding""'");
    } 
    arg6 = static_cast< Compounding >(val6);
    ecode7 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_MonotonicCubicZeroCurve" "', argument " "7"" of type '" "Frequency""'");
    } 
    arg7 = static_cast< Frequency >(val7);
    {
      try {
        result = (MonotonicCubicZeroCurvePtr *)new_MonotonicCubicZeroCurvePtr__SWIG_0((std::vector< Date > const &)*arg1,(std::vector< double > const &)*arg2,(DayCounter const &)*arg3,(Calendar const &)*arg4,(MonotonicCubic const &)*arg5,arg6,arg7);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MonotonicCubicZeroCurvePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MonotonicCubicZeroCurve__SWIG_1) {
  {
    std::vector< Date > *arg1 = 0 ;
    std::vector< Rate > *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    Calendar *arg4 = 0 ;
    MonotonicCubic *arg5 = 0 ;
    Compounding arg6 ;
    std::vector< Date > temp1 ;
    std::vector< Date > *v1 ;
    std::vector< double > temp2 ;
    std::vector< double > *v2 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    MonotonicCubicZeroCurvePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_MonotonicCubicZeroCurve(dates,yields,dayCounter,calendar,i,compounding);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_MonotonicCubicZeroCurve. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_MonotonicCubicZeroCurve. "
              "Expected an array of " "Date");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_MonotonicCubicZeroCurve. "
          "Expected an array of " "Date");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_MonotonicCubicZeroCurve. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp2.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_MonotonicCubicZeroCurve. "
              "Expected an array of ""double");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_MonotonicCubicZeroCurve. "
          "Expected an array of ""double");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_MonotonicCubicZeroCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MonotonicCubicZeroCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_MonotonicCubicZeroCurve" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MonotonicCubicZeroCurve" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    arg4 = reinterpret_cast< Calendar * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_MonotonicCubic,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_MonotonicCubicZeroCurve" "', argument " "5"" of type '" "MonotonicCubic const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MonotonicCubicZeroCurve" "', argument " "5"" of type '" "MonotonicCubic const &""'"); 
    }
    arg5 = reinterpret_cast< MonotonicCubic * >(argp5);
    ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_MonotonicCubicZeroCurve" "', argument " "6"" of type '" "Compounding""'");
    } 
    arg6 = static_cast< Compounding >(val6);
    {
      try {
        result = (MonotonicCubicZeroCurvePtr *)new_MonotonicCubicZeroCurvePtr__SWIG_0((std::vector< Date > const &)*arg1,(std::vector< double > const &)*arg2,(DayCounter const &)*arg3,(Calendar const &)*arg4,(MonotonicCubic const &)*arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MonotonicCubicZeroCurvePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MonotonicCubicZeroCurve__SWIG_2) {
  {
    std::vector< Date > *arg1 = 0 ;
    std::vector< Rate > *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    Calendar *arg4 = 0 ;
    MonotonicCubic *arg5 = 0 ;
    std::vector< Date > temp1 ;
    std::vector< Date > *v1 ;
    std::vector< double > temp2 ;
    std::vector< double > *v2 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    void *argp5 ;
    int res5 = 0 ;
    int argvi = 0;
    MonotonicCubicZeroCurvePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_MonotonicCubicZeroCurve(dates,yields,dayCounter,calendar,i);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_MonotonicCubicZeroCurve. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_MonotonicCubicZeroCurve. "
              "Expected an array of " "Date");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_MonotonicCubicZeroCurve. "
          "Expected an array of " "Date");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_MonotonicCubicZeroCurve. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp2.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_MonotonicCubicZeroCurve. "
              "Expected an array of ""double");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_MonotonicCubicZeroCurve. "
          "Expected an array of ""double");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_MonotonicCubicZeroCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MonotonicCubicZeroCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_MonotonicCubicZeroCurve" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MonotonicCubicZeroCurve" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    arg4 = reinterpret_cast< Calendar * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_MonotonicCubic,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_MonotonicCubicZeroCurve" "', argument " "5"" of type '" "MonotonicCubic const &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MonotonicCubicZeroCurve" "', argument " "5"" of type '" "MonotonicCubic const &""'"); 
    }
    arg5 = reinterpret_cast< MonotonicCubic * >(argp5);
    {
      try {
        result = (MonotonicCubicZeroCurvePtr *)new_MonotonicCubicZeroCurvePtr__SWIG_0((std::vector< Date > const &)*arg1,(std::vector< double > const &)*arg2,(DayCounter const &)*arg3,(Calendar const &)*arg4,(MonotonicCubic const &)*arg5);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MonotonicCubicZeroCurvePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MonotonicCubicZeroCurve__SWIG_3) {
  {
    std::vector< Date > *arg1 = 0 ;
    std::vector< Rate > *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    Calendar *arg4 = 0 ;
    std::vector< Date > temp1 ;
    std::vector< Date > *v1 ;
    std::vector< double > temp2 ;
    std::vector< double > *v2 ;
    void *argp3 ;
    int res3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int argvi = 0;
    MonotonicCubicZeroCurvePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_MonotonicCubicZeroCurve(dates,yields,dayCounter,calendar);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_MonotonicCubicZeroCurve. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_MonotonicCubicZeroCurve. "
              "Expected an array of " "Date");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_MonotonicCubicZeroCurve. "
          "Expected an array of " "Date");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_MonotonicCubicZeroCurve. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp2.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_MonotonicCubicZeroCurve. "
              "Expected an array of ""double");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_MonotonicCubicZeroCurve. "
          "Expected an array of ""double");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_MonotonicCubicZeroCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MonotonicCubicZeroCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_MonotonicCubicZeroCurve" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MonotonicCubicZeroCurve" "', argument " "4"" of type '" "Calendar const &""'"); 
    }
    arg4 = reinterpret_cast< Calendar * >(argp4);
    {
      try {
        result = (MonotonicCubicZeroCurvePtr *)new_MonotonicCubicZeroCurvePtr__SWIG_0((std::vector< Date > const &)*arg1,(std::vector< double > const &)*arg2,(DayCounter const &)*arg3,(Calendar const &)*arg4);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MonotonicCubicZeroCurvePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MonotonicCubicZeroCurve__SWIG_4) {
  {
    std::vector< Date > *arg1 = 0 ;
    std::vector< Rate > *arg2 = 0 ;
    DayCounter *arg3 = 0 ;
    std::vector< Date > temp1 ;
    std::vector< Date > *v1 ;
    std::vector< double > temp2 ;
    std::vector< double > *v2 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    MonotonicCubicZeroCurvePtr *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_MonotonicCubicZeroCurve(dates,yields,dayCounter);");
    }
    {
      if (SWIG_ConvertPtr(ST(0),(void **) &v1, 
          SWIGTYPE_p_std__vectorT_Date_t,1) != -1) {
        arg1 = v1;
      } else if (SvROK(ST(0))) {
        AV *av = (AV *)SvRV(ST(0));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 1 of new_MonotonicCubicZeroCurve. "
          "Expected an array of " "Date");
        SV **tv;
        I32 len = av_len(av) + 1;
        Date* obj;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SWIG_ConvertPtr(*tv, (void **)&obj, 
              SWIGTYPE_p_Date,0) != -1) {
            temp1.push_back(*obj);
          } else {
            SWIG_croak("Type error in argument 1 of "
              "new_MonotonicCubicZeroCurve. "
              "Expected an array of " "Date");
          }
        }
        arg1 = &temp1;
      } else {
        SWIG_croak("Type error in argument 1 of new_MonotonicCubicZeroCurve. "
          "Expected an array of " "Date");
      }
    }
    {
      if (SWIG_ConvertPtr(ST(1),(void **) &v2, 
          SWIGTYPE_p_std__vectorT_double_t,1) != -1) {
        arg2 = v2;
      } else if (SvROK(ST(1))) {
        AV *av = (AV *)SvRV(ST(1));
        if (SvTYPE(av) != SVt_PVAV)
        SWIG_croak("Type error in argument 2 of new_MonotonicCubicZeroCurve. "
          "Expected an array of ""double");
        SV **tv;
        I32 len = av_len(av) + 1;
        for (int i=0; i<len; i++) {
          tv = av_fetch(av, i, 0);
          if (SvNIOK(*tv)) {
            temp2.push_back((double)SwigSvToNumber(*tv));
          } else {
            SWIG_croak("Type error in argument 2 of "
              "new_MonotonicCubicZeroCurve. "
              "Expected an array of ""double");
          }
        }
        arg2 = &temp2;
      } else {
        SWIG_croak("Type error in argument 2 of new_MonotonicCubicZeroCurve. "
          "Expected an array of ""double");
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_MonotonicCubicZeroCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MonotonicCubicZeroCurve" "', argument " "3"" of type '" "DayCounter const &""'"); 
    }
    arg3 = reinterpret_cast< DayCounter * >(argp3);
    {
      try {
        result = (MonotonicCubicZeroCurvePtr *)new_MonotonicCubicZeroCurvePtr__SWIG_0((std::vector< Date > const &)*arg1,(std::vector< double > const &)*arg2,(DayCounter const &)*arg3);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MonotonicCubicZeroCurvePtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MonotonicCubicZeroCurve) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_MonotonicCubic, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_MonotonicCubic, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          {
            /* wrapped vector? */
            std::vector< Date >* v;
            if (SWIG_ConvertPtr(ST(0),(void **) &v, 
                SWIGTYPE_p_std__vectorT_Date_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(0))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(0));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  Date* obj;
                  SV **tv = av_fetch(av, 0, 0);
                  if (SWIG_ConvertPtr(*tv, (void **)&obj, 
                      SWIGTYPE_p_Date,0) != -1)
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          {
            /* wrapped vector? */
            std::vector< double >* v;
            if (SWIG_ConvertPtr(ST(1),(void **) &v, 
                SWIGTYPE_p_std__vectorT_double_t,0) != -1) {
              _v = 1;
            } else if (SvROK(ST(1))) {
              /* native sequence? */
              AV *av = (AV *)SvRV(ST(1));
              if (SvTYPE(av) == SVt_PVAV) {
                I32 len = av_len(av) + 1;
                if (len == 0) {
                  /* an empty sequence can be of any type */
                  _v = 1;
                } else {
                  /* check the first element only */
                  SV **tv = av_fetch(av, 0, 0);
                  if (SvNIOK(*tv))
                  _v = 1;
                  else
                  _v = 0;
                }
              }
            } else {
              _v = 0;
            }
          }
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_MonotonicCubic, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MonotonicCubicZeroCurve__SWIG_4); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MonotonicCubicZeroCurve__SWIG_3); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MonotonicCubicZeroCurve__SWIG_2); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MonotonicCubicZeroCurve__SWIG_1); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_MonotonicCubicZeroCurve__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_MonotonicCubicZeroCurve'");
  XSRETURN(0);
}


XS(_wrap_MonotonicCubicZeroCurve_times) {
  {
    MonotonicCubicZeroCurvePtr *arg1 = (MonotonicCubicZeroCurvePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Time > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MonotonicCubicZeroCurve_times(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_MonotonicCubicZeroCurvePtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MonotonicCubicZeroCurve_times" "', argument " "1"" of type '" "MonotonicCubicZeroCurvePtr *""'"); 
    }
    arg1 = reinterpret_cast< MonotonicCubicZeroCurvePtr * >(argp1);
    {
      try {
        result = (std::vector< Time > *) &MonotonicCubicZeroCurvePtr_times(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MonotonicCubicZeroCurve_data) {
  {
    MonotonicCubicZeroCurvePtr *arg1 = (MonotonicCubicZeroCurvePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Real > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MonotonicCubicZeroCurve_data(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_MonotonicCubicZeroCurvePtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MonotonicCubicZeroCurve_data" "', argument " "1"" of type '" "MonotonicCubicZeroCurvePtr *""'"); 
    }
    arg1 = reinterpret_cast< MonotonicCubicZeroCurvePtr * >(argp1);
    {
      try {
        result = (std::vector< Real > *) &MonotonicCubicZeroCurvePtr_data(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MonotonicCubicZeroCurve_dates) {
  {
    MonotonicCubicZeroCurvePtr *arg1 = (MonotonicCubicZeroCurvePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Date > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MonotonicCubicZeroCurve_dates(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_MonotonicCubicZeroCurvePtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MonotonicCubicZeroCurve_dates" "', argument " "1"" of type '" "MonotonicCubicZeroCurvePtr *""'"); 
    }
    arg1 = reinterpret_cast< MonotonicCubicZeroCurvePtr * >(argp1);
    {
      try {
        result = (std::vector< Date > *) &MonotonicCubicZeroCurvePtr_dates(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_Date_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MonotonicCubicZeroCurve_zeroRates) {
  {
    MonotonicCubicZeroCurvePtr *arg1 = (MonotonicCubicZeroCurvePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< Rate > *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MonotonicCubicZeroCurve_zeroRates(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_MonotonicCubicZeroCurvePtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MonotonicCubicZeroCurve_zeroRates" "', argument " "1"" of type '" "MonotonicCubicZeroCurvePtr *""'"); 
    }
    arg1 = reinterpret_cast< MonotonicCubicZeroCurvePtr * >(argp1);
    {
      try {
        result = (std::vector< Rate > *) &MonotonicCubicZeroCurvePtr_zeroRates(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_t, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MonotonicCubicZeroCurve_nodes) {
  {
    MonotonicCubicZeroCurvePtr *arg1 = (MonotonicCubicZeroCurvePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::vector< std::pair< Date,Rate > > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MonotonicCubicZeroCurve_nodes(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_MonotonicCubicZeroCurvePtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MonotonicCubicZeroCurve_nodes" "', argument " "1"" of type '" "MonotonicCubicZeroCurvePtr *""'"); 
    }
    arg1 = reinterpret_cast< MonotonicCubicZeroCurvePtr * >(argp1);
    {
      try {
        result = MonotonicCubicZeroCurvePtr_nodes(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    {
      size_t len = (&result)->size();
      SV **svs = new SV*[len];
      for (size_t i=0; i<len; i++) {
        std::pair< Date,double >* ptr = new std::pair< Date,double >(result[i]);
        svs[i] = sv_newmortal();
        SWIG_MakePtr(svs[i], (void*) ptr, 
          SWIGTYPE_p_std__pairT_Date_double_t, SWIG_SHADOW|0);
      }
      AV *myav = av_make(len, svs);
      delete[] svs;
      ST(argvi) = newRV_noinc((SV*) myav);
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_MonotonicCubicZeroCurve) {
  {
    MonotonicCubicZeroCurvePtr *arg1 = (MonotonicCubicZeroCurvePtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_MonotonicCubicZeroCurve(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_MonotonicCubicZeroCurvePtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MonotonicCubicZeroCurve" "', argument " "1"" of type '" "MonotonicCubicZeroCurvePtr *""'"); 
    }
    arg1 = reinterpret_cast< MonotonicCubicZeroCurvePtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_as_zerocurve) {
  {
    boost::shared_ptr< YieldTermStructure > *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    SwigValueWrapper< ZeroCurvePtr > result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: as_zerocurve(curve);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "as_zerocurve" "', argument " "1"" of type '" "boost::shared_ptr< YieldTermStructure > const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "as_zerocurve" "', argument " "1"" of type '" "boost::shared_ptr< YieldTermStructure > const &""'"); 
    }
    arg1 = reinterpret_cast< boost::shared_ptr< YieldTermStructure > * >(argp1);
    {
      try {
        result = as_zerocurve((boost::shared_ptr< YieldTermStructure > const &)*arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new ZeroCurvePtr(static_cast< const ZeroCurvePtr& >(result))), SWIGTYPE_p_ZeroCurvePtr, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Forward_forwardValue) {
  {
    ForwardPtr *arg1 = (ForwardPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Forward_forwardValue(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ForwardPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Forward_forwardValue" "', argument " "1"" of type '" "ForwardPtr *""'"); 
    }
    arg1 = reinterpret_cast< ForwardPtr * >(argp1);
    {
      try {
        result = (Real)ForwardPtr_forwardValue(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Forward_impliedYield) {
  {
    ForwardPtr *arg1 = (ForwardPtr *) 0 ;
    Real arg2 ;
    Real arg3 ;
    Date arg4 ;
    Compounding arg5 ;
    SwigValueWrapper< DayCounter > arg6 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    void *argp4 ;
    int res4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    int argvi = 0;
    InterestRate result;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: Forward_impliedYield(self,underlyingSpotValue,forwardValue,settlementDate,compoundingConvention,dayCounter);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ForwardPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Forward_impliedYield" "', argument " "1"" of type '" "ForwardPtr *""'"); 
    }
    arg1 = reinterpret_cast< ForwardPtr * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Forward_impliedYield" "', argument " "2"" of type '" "Real""'");
    } 
    arg2 = static_cast< Real >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Forward_impliedYield" "', argument " "3"" of type '" "Real""'");
    } 
    arg3 = static_cast< Real >(val3);
    {
      res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Date,  0 );
      if (!SWIG_IsOK(res4)) {
        SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Forward_impliedYield" "', argument " "4"" of type '" "Date""'"); 
      }  
      if (!argp4) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Forward_impliedYield" "', argument " "4"" of type '" "Date""'");
      } else {
        arg4 = *(reinterpret_cast< Date * >(argp4));
      }
    }
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Forward_impliedYield" "', argument " "5"" of type '" "Compounding""'");
    } 
    arg5 = static_cast< Compounding >(val5);
    {
      res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_DayCounter,  0 );
      if (!SWIG_IsOK(res6)) {
        SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "Forward_impliedYield" "', argument " "6"" of type '" "DayCounter""'"); 
      }  
      if (!argp6) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Forward_impliedYield" "', argument " "6"" of type '" "DayCounter""'");
      } else {
        arg6 = *(reinterpret_cast< DayCounter * >(argp6));
      }
    }
    {
      try {
        result = ForwardPtr_impliedYield(arg1,arg2,arg3,arg4,arg5,arg6);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new InterestRate(static_cast< const InterestRate& >(result))), SWIGTYPE_p_InterestRate, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Forward) {
  {
    int argvi = 0;
    ForwardPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Forward();");
    }
    {
      try {
        result = (ForwardPtr *)new ForwardPtr();
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ForwardPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_Forward) {
  {
    ForwardPtr *arg1 = (ForwardPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Forward(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ForwardPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Forward" "', argument " "1"" of type '" "ForwardPtr *""'"); 
    }
    arg1 = reinterpret_cast< ForwardPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FixedRateBondForward__SWIG_0) {
  {
    Date *arg1 = 0 ;
    Date *arg2 = 0 ;
    Position::Type arg3 ;
    Real arg4 ;
    Natural arg5 ;
    DayCounter *arg6 = 0 ;
    Calendar *arg7 = 0 ;
    BusinessDayConvention arg8 ;
    FixedRateBondPtr *arg9 = 0 ;
    Handle< YieldTermStructure > *arg10 = 0 ;
    Handle< YieldTermStructure > *arg11 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    unsigned int val5 ;
    int ecode5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    int val8 ;
    int ecode8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    void *argp10 ;
    int res10 = 0 ;
    void *argp11 ;
    int res11 = 0 ;
    int argvi = 0;
    FixedRateBondForwardPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 11) || (items > 11)) {
      SWIG_croak("Usage: new_FixedRateBondForward(valueDate,maturityDate,type,strike,settlementDays,dayCounter,calendar,businessDayConvention,fixedBond,discountCurve,incomeDiscountCurve);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FixedRateBondForward" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBondForward" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FixedRateBondForward" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBondForward" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_FixedRateBondForward" "', argument " "3"" of type '" "Position::Type""'");
    } 
    arg3 = static_cast< Position::Type >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_FixedRateBondForward" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    ecode5 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_FixedRateBondForward" "', argument " "5"" of type '" "Natural""'");
    } 
    arg5 = static_cast< Natural >(val5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_FixedRateBondForward" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBondForward" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    arg6 = reinterpret_cast< DayCounter * >(argp6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_FixedRateBondForward" "', argument " "7"" of type '" "Calendar const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBondForward" "', argument " "7"" of type '" "Calendar const &""'"); 
    }
    arg7 = reinterpret_cast< Calendar * >(argp7);
    ecode8 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_FixedRateBondForward" "', argument " "8"" of type '" "BusinessDayConvention""'");
    } 
    arg8 = static_cast< BusinessDayConvention >(val8);
    res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_FixedRateBondPtr,  0 );
    if (!SWIG_IsOK(res9)) {
      SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_FixedRateBondForward" "', argument " "9"" of type '" "FixedRateBondPtr const &""'"); 
    }
    if (!argp9) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBondForward" "', argument " "9"" of type '" "FixedRateBondPtr const &""'"); 
    }
    arg9 = reinterpret_cast< FixedRateBondPtr * >(argp9);
    res10 = SWIG_ConvertPtr(ST(9), &argp10, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res10)) {
      SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "new_FixedRateBondForward" "', argument " "10"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp10) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBondForward" "', argument " "10"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg10 = reinterpret_cast< Handle< YieldTermStructure > * >(argp10);
    res11 = SWIG_ConvertPtr(ST(10), &argp11, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res11)) {
      SWIG_exception_fail(SWIG_ArgError(res11), "in method '" "new_FixedRateBondForward" "', argument " "11"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp11) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBondForward" "', argument " "11"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg11 = reinterpret_cast< Handle< YieldTermStructure > * >(argp11);
    {
      try {
        result = (FixedRateBondForwardPtr *)new_FixedRateBondForwardPtr__SWIG_0((Date const &)*arg1,(Date const &)*arg2,arg3,arg4,arg5,(DayCounter const &)*arg6,(Calendar const &)*arg7,arg8,(FixedRateBondPtr const &)*arg9,(Handle< YieldTermStructure > const &)*arg10,(Handle< YieldTermStructure > const &)*arg11);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FixedRateBondForwardPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FixedRateBondForward__SWIG_1) {
  {
    Date *arg1 = 0 ;
    Date *arg2 = 0 ;
    Position::Type arg3 ;
    Real arg4 ;
    Natural arg5 ;
    DayCounter *arg6 = 0 ;
    Calendar *arg7 = 0 ;
    BusinessDayConvention arg8 ;
    FixedRateBondPtr *arg9 = 0 ;
    Handle< YieldTermStructure > *arg10 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    unsigned int val5 ;
    int ecode5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    int val8 ;
    int ecode8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    void *argp10 ;
    int res10 = 0 ;
    int argvi = 0;
    FixedRateBondForwardPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 10) || (items > 10)) {
      SWIG_croak("Usage: new_FixedRateBondForward(valueDate,maturityDate,type,strike,settlementDays,dayCounter,calendar,businessDayConvention,fixedBond,discountCurve);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FixedRateBondForward" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBondForward" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FixedRateBondForward" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBondForward" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_FixedRateBondForward" "', argument " "3"" of type '" "Position::Type""'");
    } 
    arg3 = static_cast< Position::Type >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_FixedRateBondForward" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    ecode5 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_FixedRateBondForward" "', argument " "5"" of type '" "Natural""'");
    } 
    arg5 = static_cast< Natural >(val5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_FixedRateBondForward" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBondForward" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    arg6 = reinterpret_cast< DayCounter * >(argp6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_FixedRateBondForward" "', argument " "7"" of type '" "Calendar const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBondForward" "', argument " "7"" of type '" "Calendar const &""'"); 
    }
    arg7 = reinterpret_cast< Calendar * >(argp7);
    ecode8 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_FixedRateBondForward" "', argument " "8"" of type '" "BusinessDayConvention""'");
    } 
    arg8 = static_cast< BusinessDayConvention >(val8);
    res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_FixedRateBondPtr,  0 );
    if (!SWIG_IsOK(res9)) {
      SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_FixedRateBondForward" "', argument " "9"" of type '" "FixedRateBondPtr const &""'"); 
    }
    if (!argp9) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBondForward" "', argument " "9"" of type '" "FixedRateBondPtr const &""'"); 
    }
    arg9 = reinterpret_cast< FixedRateBondPtr * >(argp9);
    res10 = SWIG_ConvertPtr(ST(9), &argp10, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res10)) {
      SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "new_FixedRateBondForward" "', argument " "10"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp10) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBondForward" "', argument " "10"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg10 = reinterpret_cast< Handle< YieldTermStructure > * >(argp10);
    {
      try {
        result = (FixedRateBondForwardPtr *)new_FixedRateBondForwardPtr__SWIG_0((Date const &)*arg1,(Date const &)*arg2,arg3,arg4,arg5,(DayCounter const &)*arg6,(Calendar const &)*arg7,arg8,(FixedRateBondPtr const &)*arg9,(Handle< YieldTermStructure > const &)*arg10);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FixedRateBondForwardPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FixedRateBondForward__SWIG_2) {
  {
    Date *arg1 = 0 ;
    Date *arg2 = 0 ;
    Position::Type arg3 ;
    Real arg4 ;
    Natural arg5 ;
    DayCounter *arg6 = 0 ;
    Calendar *arg7 = 0 ;
    BusinessDayConvention arg8 ;
    FixedRateBondPtr *arg9 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    unsigned int val5 ;
    int ecode5 = 0 ;
    void *argp6 ;
    int res6 = 0 ;
    void *argp7 ;
    int res7 = 0 ;
    int val8 ;
    int ecode8 = 0 ;
    void *argp9 ;
    int res9 = 0 ;
    int argvi = 0;
    FixedRateBondForwardPtr *result = 0 ;
    dXSARGS;
    
    if ((items < 9) || (items > 9)) {
      SWIG_croak("Usage: new_FixedRateBondForward(valueDate,maturityDate,type,strike,settlementDays,dayCounter,calendar,businessDayConvention,fixedBond);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FixedRateBondForward" "', argument " "1"" of type '" "Date const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBondForward" "', argument " "1"" of type '" "Date const &""'"); 
    }
    arg1 = reinterpret_cast< Date * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Date,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FixedRateBondForward" "', argument " "2"" of type '" "Date const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBondForward" "', argument " "2"" of type '" "Date const &""'"); 
    }
    arg2 = reinterpret_cast< Date * >(argp2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_FixedRateBondForward" "', argument " "3"" of type '" "Position::Type""'");
    } 
    arg3 = static_cast< Position::Type >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_FixedRateBondForward" "', argument " "4"" of type '" "Real""'");
    } 
    arg4 = static_cast< Real >(val4);
    ecode5 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_FixedRateBondForward" "', argument " "5"" of type '" "Natural""'");
    } 
    arg5 = static_cast< Natural >(val5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6, SWIGTYPE_p_DayCounter,  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_FixedRateBondForward" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBondForward" "', argument " "6"" of type '" "DayCounter const &""'"); 
    }
    arg6 = reinterpret_cast< DayCounter * >(argp6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7, SWIGTYPE_p_Calendar,  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_FixedRateBondForward" "', argument " "7"" of type '" "Calendar const &""'"); 
    }
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBondForward" "', argument " "7"" of type '" "Calendar const &""'"); 
    }
    arg7 = reinterpret_cast< Calendar * >(argp7);
    ecode8 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
    if (!SWIG_IsOK(ecode8)) {
      SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_FixedRateBondForward" "', argument " "8"" of type '" "BusinessDayConvention""'");
    } 
    arg8 = static_cast< BusinessDayConvention >(val8);
    res9 = SWIG_ConvertPtr(ST(8), &argp9, SWIGTYPE_p_FixedRateBondPtr,  0 );
    if (!SWIG_IsOK(res9)) {
      SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_FixedRateBondForward" "', argument " "9"" of type '" "FixedRateBondPtr const &""'"); 
    }
    if (!argp9) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FixedRateBondForward" "', argument " "9"" of type '" "FixedRateBondPtr const &""'"); 
    }
    arg9 = reinterpret_cast< FixedRateBondPtr * >(argp9);
    {
      try {
        result = (FixedRateBondForwardPtr *)new_FixedRateBondForwardPtr__SWIG_0((Date const &)*arg1,(Date const &)*arg2,arg3,arg4,arg5,(DayCounter const &)*arg6,(Calendar const &)*arg7,arg8,(FixedRateBondPtr const &)*arg9);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FixedRateBondForwardPtr, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FixedRateBondForward) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 9) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_FixedRateBondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 10) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_FixedRateBondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(9), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 11) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Date, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_DayCounter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Calendar, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(8), &vptr, SWIGTYPE_p_FixedRateBondPtr, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(9), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(10), &vptr, SWIGTYPE_p_HandleT_YieldTermStructure_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FixedRateBondForward__SWIG_2); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FixedRateBondForward__SWIG_1); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FixedRateBondForward__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_FixedRateBondForward'");
  XSRETURN(0);
}


XS(_wrap_FixedRateBondForward_forwardPrice) {
  {
    FixedRateBondForwardPtr *arg1 = (FixedRateBondForwardPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: FixedRateBondForward_forwardPrice(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_FixedRateBondForwardPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FixedRateBondForward_forwardPrice" "', argument " "1"" of type '" "FixedRateBondForwardPtr *""'"); 
    }
    arg1 = reinterpret_cast< FixedRateBondForwardPtr * >(argp1);
    {
      try {
        result = (Real)FixedRateBondForwardPtr_forwardPrice(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_FixedRateBondForward_cleanForwardPrice) {
  {
    FixedRateBondForwardPtr *arg1 = (FixedRateBondForwardPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: FixedRateBondForward_cleanForwardPrice(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_FixedRateBondForwardPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FixedRateBondForward_cleanForwardPrice" "', argument " "1"" of type '" "FixedRateBondForwardPtr *""'"); 
    }
    arg1 = reinterpret_cast< FixedRateBondForwardPtr * >(argp1);
    {
      try {
        result = (Real)FixedRateBondForwardPtr_cleanForwardPrice(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_FixedRateBondForward_spotIncome) {
  {
    FixedRateBondForwardPtr *arg1 = (FixedRateBondForwardPtr *) 0 ;
    Handle< YieldTermStructure > *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: FixedRateBondForward_spotIncome(self,incomeDiscountCurve);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_FixedRateBondForwardPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FixedRateBondForward_spotIncome" "', argument " "1"" of type '" "FixedRateBondForwardPtr *""'"); 
    }
    arg1 = reinterpret_cast< FixedRateBondForwardPtr * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_HandleT_YieldTermStructure_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FixedRateBondForward_spotIncome" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FixedRateBondForward_spotIncome" "', argument " "2"" of type '" "Handle< YieldTermStructure > const &""'"); 
    }
    arg2 = reinterpret_cast< Handle< YieldTermStructure > * >(argp2);
    {
      try {
        result = (Real)FixedRateBondForwardPtr_spotIncome(arg1,(Handle< YieldTermStructure > const &)*arg2);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_FixedRateBondForward_spotValue) {
  {
    FixedRateBondForwardPtr *arg1 = (FixedRateBondForwardPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Real result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: FixedRateBondForward_spotValue(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_FixedRateBondForwardPtr, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FixedRateBondForward_spotValue" "', argument " "1"" of type '" "FixedRateBondForwardPtr *""'"); 
    }
    arg1 = reinterpret_cast< FixedRateBondForwardPtr * >(argp1);
    {
      try {
        result = (Real)FixedRateBondForwardPtr_spotValue(arg1);
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_FixedRateBondForward) {
  {
    FixedRateBondForwardPtr *arg1 = (FixedRateBondForwardPtr *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_FixedRateBondForward(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_FixedRateBondForwardPtr, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FixedRateBondForward" "', argument " "1"" of type '" "FixedRateBondForwardPtr *""'"); 
    }
    arg1 = reinterpret_cast< FixedRateBondForwardPtr * >(argp1);
    {
      try {
        delete arg1;
      } catch (std::out_of_range& e) {
        SWIG_exception(SWIG_IndexError,const_cast<char*>(e.what()));
      } catch (std::exception& e) {
        SWIG_exception(SWIG_RuntimeError,const_cast<char*>(e.what()));
      } catch (...) {
        SWIG_exception(SWIG_UnknownError,"unknown error");
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}



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

static void *_p_QuantLib__NorwayTo_p_Calendar(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Calendar *)  ((QuantLib::Norway *) x));
}
static void *_p_QuantLib__NewZealandTo_p_Calendar(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Calendar *)  ((QuantLib::NewZealand *) x));
}
static void *_p_QuantLib__SwedenTo_p_Calendar(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Calendar *)  ((QuantLib::Sweden *) x));
}
static void *_p_QuantLib__GermanyTo_p_Calendar(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Calendar *)  ((QuantLib::Germany *) x));
}
static void *_p_QuantLib__IsraelTo_p_Calendar(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Calendar *)  ((QuantLib::Israel *) x));
}
static void *_p_QuantLib__WeekendsOnlyTo_p_Calendar(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Calendar *)  ((QuantLib::WeekendsOnly *) x));
}
static void *_p_QuantLib__CanadaTo_p_Calendar(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Calendar *)  ((QuantLib::Canada *) x));
}
static void *_p_QuantLib__PolandTo_p_Calendar(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Calendar *)  ((QuantLib::Poland *) x));
}
static void *_p_QuantLib__HungaryTo_p_Calendar(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Calendar *)  ((QuantLib::Hungary *) x));
}
static void *_p_QuantLib__AustraliaTo_p_Calendar(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Calendar *)  ((QuantLib::Australia *) x));
}
static void *_p_QuantLib__SwitzerlandTo_p_Calendar(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Calendar *)  ((QuantLib::Switzerland *) x));
}
static void *_p_QuantLib__JapanTo_p_Calendar(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Calendar *)  ((QuantLib::Japan *) x));
}
static void *_p_QuantLib__BrazilTo_p_Calendar(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Calendar *)  ((QuantLib::Brazil *) x));
}
static void *_p_QuantLib__IcelandTo_p_Calendar(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Calendar *)  ((QuantLib::Iceland *) x));
}
static void *_p_QuantLib__MexicoTo_p_Calendar(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Calendar *)  ((QuantLib::Mexico *) x));
}
static void *_p_QuantLib__CzechRepublicTo_p_Calendar(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Calendar *)  ((QuantLib::CzechRepublic *) x));
}
static void *_p_QuantLib__IndonesiaTo_p_Calendar(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Calendar *)  ((QuantLib::Indonesia *) x));
}
static void *_p_QuantLib__SaudiArabiaTo_p_Calendar(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Calendar *)  ((QuantLib::SaudiArabia *) x));
}
static void *_p_QuantLib__ChinaTo_p_Calendar(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Calendar *)  ((QuantLib::China *) x));
}
static void *_p_QuantLib__NullCalendarTo_p_Calendar(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Calendar *)  ((QuantLib::NullCalendar *) x));
}
static void *_p_QuantLib__JointCalendarTo_p_Calendar(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Calendar *)  ((QuantLib::JointCalendar *) x));
}
static void *_p_QuantLib__BespokeCalendarTo_p_Calendar(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Calendar *)  ((QuantLib::BespokeCalendar *) x));
}
static void *_p_QuantLib__SouthKoreaTo_p_Calendar(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Calendar *)  ((QuantLib::SouthKorea *) x));
}
static void *_p_QuantLib__UnitedKingdomTo_p_Calendar(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Calendar *)  ((QuantLib::UnitedKingdom *) x));
}
static void *_p_QuantLib__SingaporeTo_p_Calendar(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Calendar *)  ((QuantLib::Singapore *) x));
}
static void *_p_QuantLib__SouthAfricaTo_p_Calendar(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Calendar *)  ((QuantLib::SouthAfrica *) x));
}
static void *_p_QuantLib__ArgentinaTo_p_Calendar(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Calendar *)  ((QuantLib::Argentina *) x));
}
static void *_p_QuantLib__RomaniaTo_p_Calendar(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Calendar *)  ((QuantLib::Romania *) x));
}
static void *_p_QuantLib__TARGETTo_p_Calendar(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Calendar *)  ((QuantLib::TARGET *) x));
}
static void *_p_QuantLib__SlovakiaTo_p_Calendar(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Calendar *)  ((QuantLib::Slovakia *) x));
}
static void *_p_QuantLib__RussiaTo_p_Calendar(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Calendar *)  ((QuantLib::Russia *) x));
}
static void *_p_QuantLib__UkraineTo_p_Calendar(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Calendar *)  ((QuantLib::Ukraine *) x));
}
static void *_p_QuantLib__FinlandTo_p_Calendar(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Calendar *)  ((QuantLib::Finland *) x));
}
static void *_p_QuantLib__ItalyTo_p_Calendar(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Calendar *)  ((QuantLib::Italy *) x));
}
static void *_p_QuantLib__IndiaTo_p_Calendar(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Calendar *)  ((QuantLib::India *) x));
}
static void *_p_QuantLib__TaiwanTo_p_Calendar(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Calendar *)  ((QuantLib::Taiwan *) x));
}
static void *_p_QuantLib__UnitedStatesTo_p_Calendar(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Calendar *)  ((QuantLib::UnitedStates *) x));
}
static void *_p_QuantLib__DenmarkTo_p_Calendar(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Calendar *)  ((QuantLib::Denmark *) x));
}
static void *_p_QuantLib__TurkeyTo_p_Calendar(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Calendar *)  ((QuantLib::Turkey *) x));
}
static void *_p_QuantLib__HongKongTo_p_Calendar(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Calendar *)  ((QuantLib::HongKong *) x));
}
static void *_p_CapFloorTermVolCurvePtrTo_p_boost__shared_ptrT_CapFloorTermVolatilityStructure_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< CapFloorTermVolatilityStructure > *)  ((CapFloorTermVolCurvePtr *) x));
}
static void *_p_CapFloorTermVolSurfacePtrTo_p_boost__shared_ptrT_CapFloorTermVolatilityStructure_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< CapFloorTermVolatilityStructure > *)  ((CapFloorTermVolSurfacePtr *) x));
}
static void *_p_HazardRateCurvePtrTo_p_boost__shared_ptrT_DefaultProbabilityTermStructure_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< DefaultProbabilityTermStructure > *)  ((HazardRateCurvePtr *) x));
}
static void *_p_DefaultDensityCurvePtrTo_p_boost__shared_ptrT_DefaultProbabilityTermStructure_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< DefaultProbabilityTermStructure > *)  ((DefaultDensityCurvePtr *) x));
}
static void *_p_FlatHazardRatePtrTo_p_boost__shared_ptrT_DefaultProbabilityTermStructure_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< DefaultProbabilityTermStructure > *)  ((FlatHazardRatePtr *) x));
}
static void *_p_PiecewiseFlatHazardRatePtrTo_p_boost__shared_ptrT_DefaultProbabilityTermStructure_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< DefaultProbabilityTermStructure > *)  ((PiecewiseFlatHazardRatePtr *) x));
}
static void *_p_OptionletStripper1PtrTo_p_boost__shared_ptrT_StrippedOptionletBase_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< StrippedOptionletBase > *)  ((OptionletStripper1Ptr *) x));
}
static void *_p_MinBasketPayoffPtrTo_p_BasketPayoffPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((BasketPayoffPtr *)  ((MinBasketPayoffPtr *) x));
}
static void *_p_MaxBasketPayoffPtrTo_p_BasketPayoffPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((BasketPayoffPtr *)  ((MaxBasketPayoffPtr *) x));
}
static void *_p_AverageBasketPayoffPtrTo_p_BasketPayoffPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((BasketPayoffPtr *)  ((AverageBasketPayoffPtr *) x));
}
static void *_p_EuropeanOptionPtrTo_p_VanillaOptionPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((VanillaOptionPtr *)  ((EuropeanOptionPtr *) x));
}
static void *_p_ForwardVanillaOptionPtrTo_p_VanillaOptionPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((VanillaOptionPtr *)  ((ForwardVanillaOptionPtr *) x));
}
static void *_p_QuantoVanillaOptionPtrTo_p_VanillaOptionPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((VanillaOptionPtr *)  ((QuantoVanillaOptionPtr *) x));
}
static void *_p_QuantoForwardVanillaOptionPtrTo_p_VanillaOptionPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((VanillaOptionPtr *) (QuantoVanillaOptionPtr *) ((QuantoForwardVanillaOptionPtr *) x));
}
static void *_p_QuantoForwardVanillaOptionPtrTo_p_QuantoVanillaOptionPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((QuantoVanillaOptionPtr *)  ((QuantoForwardVanillaOptionPtr *) x));
}
static void *_p_QuantoDoubleBarrierOptionPtrTo_p_DoubleBarrierOptionPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((DoubleBarrierOptionPtr *)  ((QuantoDoubleBarrierOptionPtr *) x));
}
static void *_p_BasketOptionPtrTo_p_MultiAssetOptionPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((MultiAssetOptionPtr *)  ((BasketOptionPtr *) x));
}
static void *_p_EverestOptionPtrTo_p_MultiAssetOptionPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((MultiAssetOptionPtr *)  ((EverestOptionPtr *) x));
}
static void *_p_HimalayaOptionPtrTo_p_MultiAssetOptionPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((MultiAssetOptionPtr *)  ((HimalayaOptionPtr *) x));
}
static void *_p_ZeroCouponBondPtrTo_p_BondPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((BondPtr *)  ((ZeroCouponBondPtr *) x));
}
static void *_p_FixedRateBondPtrTo_p_BondPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((BondPtr *)  ((FixedRateBondPtr *) x));
}
static void *_p_FloatingRateBondPtrTo_p_BondPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((BondPtr *)  ((FloatingRateBondPtr *) x));
}
static void *_p_CmsRateBondPtrTo_p_BondPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((BondPtr *)  ((CmsRateBondPtr *) x));
}
static void *_p_CallableFixedRateBondPtrTo_p_BondPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((BondPtr *)  ((CallableFixedRateBondPtr *) x));
}
static void *_p_CPIBondPtrTo_p_BondPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((BondPtr *)  ((CPIBondPtr *) x));
}
static void *_p_ConvertibleZeroCouponBondPtrTo_p_BondPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((BondPtr *)  ((ConvertibleZeroCouponBondPtr *) x));
}
static void *_p_ConvertibleFixedCouponBondPtrTo_p_BondPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((BondPtr *)  ((ConvertibleFixedCouponBondPtr *) x));
}
static void *_p_ConvertibleFloatingRateBondPtrTo_p_BondPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((BondPtr *)  ((ConvertibleFloatingRateBondPtr *) x));
}
static void *_p_SwaptionHelperPtrTo_p_boost__shared_ptrT_CalibrationHelper_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< CalibrationHelper > *)  ((SwaptionHelperPtr *) x));
}
static void *_p_CapHelperPtrTo_p_boost__shared_ptrT_CalibrationHelper_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< CalibrationHelper > *)  ((CapHelperPtr *) x));
}
static void *_p_HestonModelHelperPtrTo_p_boost__shared_ptrT_CalibrationHelper_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< CalibrationHelper > *)  ((HestonModelHelperPtr *) x));
}
static void *_p_DepositRateHelperPtrTo_p_boost__shared_ptrT_RateHelper_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< RateHelper > *)  ((DepositRateHelperPtr *) x));
}
static void *_p_FraRateHelperPtrTo_p_boost__shared_ptrT_RateHelper_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< RateHelper > *)  ((FraRateHelperPtr *) x));
}
static void *_p_FuturesRateHelperPtrTo_p_boost__shared_ptrT_RateHelper_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< RateHelper > *)  ((FuturesRateHelperPtr *) x));
}
static void *_p_SwapRateHelperPtrTo_p_boost__shared_ptrT_RateHelper_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< RateHelper > *)  ((SwapRateHelperPtr *) x));
}
static void *_p_BondHelperPtrTo_p_boost__shared_ptrT_RateHelper_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< RateHelper > *)  ((BondHelperPtr *) x));
}
static void *_p_FixedRateBondHelperPtrTo_p_boost__shared_ptrT_RateHelper_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< RateHelper > *) (BondHelperPtr *) ((FixedRateBondHelperPtr *) x));
}
static void *_p_OISRateHelperPtrTo_p_boost__shared_ptrT_RateHelper_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< RateHelper > *)  ((OISRateHelperPtr *) x));
}
static void *_p_DatedOISRateHelperPtrTo_p_boost__shared_ptrT_RateHelper_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< RateHelper > *)  ((DatedOISRateHelperPtr *) x));
}
static void *_p_FxSwapRateHelperPtrTo_p_boost__shared_ptrT_RateHelper_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< RateHelper > *)  ((FxSwapRateHelperPtr *) x));
}
static void *_p_SpreadCdsHelperPtrTo_p_boost__shared_ptrT_DefaultProbabilityHelper_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< DefaultProbabilityHelper > *)  ((SpreadCdsHelperPtr *) x));
}
static void *_p_UpfrontCdsHelperPtrTo_p_boost__shared_ptrT_DefaultProbabilityHelper_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< DefaultProbabilityHelper > *)  ((UpfrontCdsHelperPtr *) x));
}
static void *_p_ZeroCouponInflationSwapHelperPtrTo_p_boost__shared_ptrT_ZeroHelper_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< ZeroHelper > *)  ((ZeroCouponInflationSwapHelperPtr *) x));
}
static void *_p_YearOnYearInflationSwapHelperPtrTo_p_boost__shared_ptrT_YoYHelper_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< YoYHelper > *)  ((YearOnYearInflationSwapHelperPtr *) x));
}
static void *_p_BoundaryConstraintTo_p_Constraint(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Constraint *)  ((BoundaryConstraint *) x));
}
static void *_p_NoConstraintTo_p_Constraint(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Constraint *)  ((NoConstraint *) x));
}
static void *_p_PositiveConstraintTo_p_Constraint(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Constraint *)  ((PositiveConstraint *) x));
}
static void *_p_CompositeConstraintTo_p_Constraint(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Constraint *)  ((CompositeConstraint *) x));
}
static void *_p_NonhomogeneousBoundaryConstraintTo_p_Constraint(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Constraint *)  ((NonhomogeneousBoundaryConstraint *) x));
}
static void *_p_CappedFlooredCouponPtrTo_p_FloatingRateCouponPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((FloatingRateCouponPtr *)  ((CappedFlooredCouponPtr *) x));
}
static void *_p_IborCouponPtrTo_p_FloatingRateCouponPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((FloatingRateCouponPtr *)  ((IborCouponPtr *) x));
}
static void *_p_CmsCouponPtrTo_p_FloatingRateCouponPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((FloatingRateCouponPtr *)  ((CmsCouponPtr *) x));
}
static void *_p_CappedFlooredCmsCouponPtrTo_p_FloatingRateCouponPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((FloatingRateCouponPtr *) (CappedFlooredCouponPtr *) ((CappedFlooredCmsCouponPtr *) x));
}
static void *_p_FixedRateCouponPtrTo_p_CouponPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((CouponPtr *)  ((FixedRateCouponPtr *) x));
}
static void *_p_FloatingRateCouponPtrTo_p_CouponPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((CouponPtr *)  ((FloatingRateCouponPtr *) x));
}
static void *_p_CappedFlooredCouponPtrTo_p_CouponPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((CouponPtr *) (FloatingRateCouponPtr *) ((CappedFlooredCouponPtr *) x));
}
static void *_p_IborCouponPtrTo_p_CouponPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((CouponPtr *) (FloatingRateCouponPtr *) ((IborCouponPtr *) x));
}
static void *_p_CmsCouponPtrTo_p_CouponPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((CouponPtr *) (FloatingRateCouponPtr *) ((CmsCouponPtr *) x));
}
static void *_p_CappedFlooredCmsCouponPtrTo_p_CouponPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((CouponPtr *) (FloatingRateCouponPtr *)(CappedFlooredCouponPtr *) ((CappedFlooredCmsCouponPtr *) x));
}
static void *_p_CappedFlooredCmsCouponPtrTo_p_CappedFlooredCouponPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((CappedFlooredCouponPtr *)  ((CappedFlooredCmsCouponPtr *) x));
}
static void *_p_DeltaVolQuoteTo_p_Quote(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Quote *)  ((DeltaVolQuote *) x));
}
static void *_p_BatesModelPtrTo_p_HestonModelPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((HestonModelPtr *)  ((BatesModelPtr *) x));
}
static void *_p_FixedRateBondHelperPtrTo_p_BondHelperPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((BondHelperPtr *)  ((FixedRateBondHelperPtr *) x));
}
static void *_p_Euribor365_1YPtrTo_p_Euribor365Ptr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Euribor365Ptr *)  ((Euribor365_1YPtr *) x));
}
static void *_p_Euribor365_9MPtrTo_p_Euribor365Ptr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Euribor365Ptr *)  ((Euribor365_9MPtr *) x));
}
static void *_p_Euribor365_8MPtrTo_p_Euribor365Ptr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Euribor365Ptr *)  ((Euribor365_8MPtr *) x));
}
static void *_p_Euribor365_7MPtrTo_p_Euribor365Ptr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Euribor365Ptr *)  ((Euribor365_7MPtr *) x));
}
static void *_p_Euribor365_6MPtrTo_p_Euribor365Ptr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Euribor365Ptr *)  ((Euribor365_6MPtr *) x));
}
static void *_p_Euribor365_5MPtrTo_p_Euribor365Ptr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Euribor365Ptr *)  ((Euribor365_5MPtr *) x));
}
static void *_p_Euribor365_4MPtrTo_p_Euribor365Ptr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Euribor365Ptr *)  ((Euribor365_4MPtr *) x));
}
static void *_p_Euribor365_3MPtrTo_p_Euribor365Ptr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Euribor365Ptr *)  ((Euribor365_3MPtr *) x));
}
static void *_p_Euribor365_2MPtrTo_p_Euribor365Ptr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Euribor365Ptr *)  ((Euribor365_2MPtr *) x));
}
static void *_p_Euribor365_1MPtrTo_p_Euribor365Ptr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Euribor365Ptr *)  ((Euribor365_1MPtr *) x));
}
static void *_p_Euribor365_11MPtrTo_p_Euribor365Ptr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Euribor365Ptr *)  ((Euribor365_11MPtr *) x));
}
static void *_p_Euribor365_10MPtrTo_p_Euribor365Ptr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Euribor365Ptr *)  ((Euribor365_10MPtr *) x));
}
static void *_p_Euribor365_3WPtrTo_p_Euribor365Ptr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Euribor365Ptr *)  ((Euribor365_3WPtr *) x));
}
static void *_p_Euribor365_2WPtrTo_p_Euribor365Ptr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Euribor365Ptr *)  ((Euribor365_2WPtr *) x));
}
static void *_p_Euribor365_SWPtrTo_p_Euribor365Ptr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Euribor365Ptr *)  ((Euribor365_SWPtr *) x));
}
static void *_p_IborCouponPricerPtrTo_p_boost__shared_ptrT_FloatingRateCouponPricer_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< FloatingRateCouponPricer > *)  ((IborCouponPricerPtr *) x));
}
static void *_p_BlackIborCouponPricerPtrTo_p_boost__shared_ptrT_FloatingRateCouponPricer_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< FloatingRateCouponPricer > *) (IborCouponPricerPtr *) ((BlackIborCouponPricerPtr *) x));
}
static void *_p_CmsCouponPricerPtrTo_p_boost__shared_ptrT_FloatingRateCouponPricer_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< FloatingRateCouponPricer > *)  ((CmsCouponPricerPtr *) x));
}
static void *_p_AnalyticHaganPricerPtrTo_p_boost__shared_ptrT_FloatingRateCouponPricer_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< FloatingRateCouponPricer > *) (CmsCouponPricerPtr *) ((AnalyticHaganPricerPtr *) x));
}
static void *_p_NumericHaganPricerPtrTo_p_boost__shared_ptrT_FloatingRateCouponPricer_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< FloatingRateCouponPricer > *) (CmsCouponPricerPtr *) ((NumericHaganPricerPtr *) x));
}
static void *_p_LinearTsrPricerPtrTo_p_boost__shared_ptrT_FloatingRateCouponPricer_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< FloatingRateCouponPricer > *) (CmsCouponPricerPtr *) ((LinearTsrPricerPtr *) x));
}
static void *_p_HestonModelPtrTo_p_boost__shared_ptrT_CalibratedModel_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< CalibratedModel > *)  ((HestonModelPtr *) x));
}
static void *_p_PiecewiseTimeDependentHestonModelPtrTo_p_boost__shared_ptrT_CalibratedModel_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< CalibratedModel > *)  ((PiecewiseTimeDependentHestonModelPtr *) x));
}
static void *_p_BatesModelPtrTo_p_boost__shared_ptrT_CalibratedModel_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< CalibratedModel > *) (HestonModelPtr *) ((BatesModelPtr *) x));
}
static void *_p_MarkovFunctionalPtrTo_p_boost__shared_ptrT_Gaussian1dModel_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Gaussian1dModel > *)  ((MarkovFunctionalPtr *) x));
}
static void *_p_GsrPtrTo_p_boost__shared_ptrT_Gaussian1dModel_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Gaussian1dModel > *)  ((GsrPtr *) x));
}
static void *_p_RelinkableHandleT_CalibratedModel_tTo_p_HandleT_CalibratedModel_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Handle< CalibratedModel > *)  ((RelinkableHandle< CalibratedModel > *) x));
}
static void *_p_RelinkableHandleT_ShortRateModel_tTo_p_HandleT_ShortRateModel_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Handle< ShortRateModel > *)  ((RelinkableHandle< ShortRateModel > *) x));
}
static void *_p_BlackKarasinskiPtrTo_p_boost__shared_ptrT_ShortRateModel_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< ShortRateModel > *)  ((BlackKarasinskiPtr *) x));
}
static void *_p_G2PtrTo_p_boost__shared_ptrT_ShortRateModel_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< ShortRateModel > *)  ((G2Ptr *) x));
}
static void *_p_VasicekPtrTo_p_boost__shared_ptrT_ShortRateModel_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< ShortRateModel > *)  ((VasicekPtr *) x));
}
static void *_p_HullWhitePtrTo_p_boost__shared_ptrT_ShortRateModel_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< ShortRateModel > *)  ((HullWhitePtr *) x));
}
static void *_p_StrippedOptionletAdapterPtrTo_p_boost__shared_ptrT_OptionletVolatilityStructure_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< OptionletVolatilityStructure > *)  ((StrippedOptionletAdapterPtr *) x));
}
static void *_p_ConstantOptionletVolatilityPtrTo_p_boost__shared_ptrT_OptionletVolatilityStructure_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< OptionletVolatilityStructure > *)  ((ConstantOptionletVolatilityPtr *) x));
}
static void *_p_GeneralizedBlackScholesProcessPtrTo_p_StochasticProcess1DPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((StochasticProcess1DPtr *)  ((GeneralizedBlackScholesProcessPtr *) x));
}
static void *_p_BlackScholesProcessPtrTo_p_StochasticProcess1DPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((StochasticProcess1DPtr *) (GeneralizedBlackScholesProcessPtr *) ((BlackScholesProcessPtr *) x));
}
static void *_p_BlackScholesMertonProcessPtrTo_p_StochasticProcess1DPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((StochasticProcess1DPtr *) (GeneralizedBlackScholesProcessPtr *) ((BlackScholesMertonProcessPtr *) x));
}
static void *_p_BlackProcessPtrTo_p_StochasticProcess1DPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((StochasticProcess1DPtr *) (GeneralizedBlackScholesProcessPtr *) ((BlackProcessPtr *) x));
}
static void *_p_GarmanKohlagenProcessPtrTo_p_StochasticProcess1DPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((StochasticProcess1DPtr *) (GeneralizedBlackScholesProcessPtr *) ((GarmanKohlagenProcessPtr *) x));
}
static void *_p_Merton76ProcessPtrTo_p_StochasticProcess1DPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((StochasticProcess1DPtr *)  ((Merton76ProcessPtr *) x));
}
static void *_p_GeometricBrownianMotionProcessPtrTo_p_StochasticProcess1DPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((StochasticProcess1DPtr *)  ((GeometricBrownianMotionProcessPtr *) x));
}
static void *_p_VarianceGammaProcessPtrTo_p_StochasticProcess1DPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((StochasticProcess1DPtr *)  ((VarianceGammaProcessPtr *) x));
}
static void *_p_HullWhiteProcessPtrTo_p_StochasticProcess1DPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((StochasticProcess1DPtr *)  ((HullWhiteProcessPtr *) x));
}
static void *_p_HullWhiteForwardProcessPtrTo_p_StochasticProcess1DPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((StochasticProcess1DPtr *)  ((HullWhiteForwardProcessPtr *) x));
}
static void *_p_GsrProcessPtrTo_p_StochasticProcess1DPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((StochasticProcess1DPtr *)  ((GsrProcessPtr *) x));
}
static void *_p_BlackIborCouponPricerPtrTo_p_IborCouponPricerPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((IborCouponPricerPtr *)  ((BlackIborCouponPricerPtr *) x));
}
static void *_p_AnalyticHaganPricerPtrTo_p_CmsCouponPricerPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((CmsCouponPricerPtr *)  ((AnalyticHaganPricerPtr *) x));
}
static void *_p_NumericHaganPricerPtrTo_p_CmsCouponPricerPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((CmsCouponPricerPtr *)  ((NumericHaganPricerPtr *) x));
}
static void *_p_LinearTsrPricerPtrTo_p_CmsCouponPricerPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((CmsCouponPricerPtr *)  ((LinearTsrPricerPtr *) x));
}
static void *_p_FixedDividendPtrTo_p_boost__shared_ptrT_Dividend_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Dividend > *)  ((FixedDividendPtr *) x));
}
static void *_p_FractionalDividendPtrTo_p_boost__shared_ptrT_Dividend_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Dividend > *)  ((FractionalDividendPtr *) x));
}
static void *_p_EuriborSwapIsdaFixAPtrTo_p_SwapIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((SwapIndexPtr *)  ((EuriborSwapIsdaFixAPtr *) x));
}
static void *_p_EurLiborSwapIsdaFixAPtrTo_p_SwapIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((SwapIndexPtr *)  ((EurLiborSwapIsdaFixAPtr *) x));
}
static void *_p_EuriborSwapIsdaFixBPtrTo_p_SwapIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((SwapIndexPtr *)  ((EuriborSwapIsdaFixBPtr *) x));
}
static void *_p_EurLiborSwapIsdaFixBPtrTo_p_SwapIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((SwapIndexPtr *)  ((EurLiborSwapIsdaFixBPtr *) x));
}
static void *_p_EuriborSwapIfrFixPtrTo_p_SwapIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((SwapIndexPtr *)  ((EuriborSwapIfrFixPtr *) x));
}
static void *_p_EurLiborSwapIfrFixPtrTo_p_SwapIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((SwapIndexPtr *)  ((EurLiborSwapIfrFixPtr *) x));
}
static void *_p_Bkbm6MPtrTo_p_IborIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((IborIndexPtr *) (BkbmPtr *) ((Bkbm6MPtr *) x));
}
static void *_p_EURLibor1MPtrTo_p_IborIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((IborIndexPtr *) (EURLiborPtr *) ((EURLibor1MPtr *) x));
}
static void *_p_Euribor1MPtrTo_p_IborIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((IborIndexPtr *) (EuriborPtr *) ((Euribor1MPtr *) x));
}
static void *_p_EURLibor11MPtrTo_p_IborIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((IborIndexPtr *) (EURLiborPtr *) ((EURLibor11MPtr *) x));
}
static void *_p_Euribor11MPtrTo_p_IborIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((IborIndexPtr *) (EuriborPtr *) ((Euribor11MPtr *) x));
}
static void *_p_Euribor365PtrTo_p_IborIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((IborIndexPtr *)  ((Euribor365Ptr *) x));
}
static void *_p_FedFundsPtrTo_p_IborIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((IborIndexPtr *) (OvernightIndexPtr *) ((FedFundsPtr *) x));
}
static void *_p_CdorPtrTo_p_IborIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((IborIndexPtr *)  ((CdorPtr *) x));
}
static void *_p_Euribor3WPtrTo_p_IborIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((IborIndexPtr *) (EuriborPtr *) ((Euribor3WPtr *) x));
}
static void *_p_Euribor365_4MPtrTo_p_IborIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((IborIndexPtr *) (Euribor365Ptr *) ((Euribor365_4MPtr *) x));
}
static void *_p_EURLibor2MPtrTo_p_IborIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((IborIndexPtr *) (EURLiborPtr *) ((EURLibor2MPtr *) x));
}
static void *_p_Euribor2MPtrTo_p_IborIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((IborIndexPtr *) (EuriborPtr *) ((Euribor2MPtr *) x));
}
static void *_p_Euribor365_1YPtrTo_p_IborIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((IborIndexPtr *) (Euribor365Ptr *) ((Euribor365_1YPtr *) x));
}
static void *_p_JibarPtrTo_p_IborIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((IborIndexPtr *)  ((JibarPtr *) x));
}
static void *_p_Euribor365_5MPtrTo_p_IborIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((IborIndexPtr *) (Euribor365Ptr *) ((Euribor365_5MPtr *) x));
}
static void *_p_EURLibor3MPtrTo_p_IborIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((IborIndexPtr *) (EURLiborPtr *) ((EURLibor3MPtr *) x));
}
static void *_p_Euribor3MPtrTo_p_IborIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((IborIndexPtr *) (EuriborPtr *) ((Euribor3MPtr *) x));
}
static void *_p_Bbsw1MPtrTo_p_IborIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((IborIndexPtr *) (BbswPtr *) ((Bbsw1MPtr *) x));
}
static void *_p_Euribor365_10MPtrTo_p_IborIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((IborIndexPtr *) (Euribor365Ptr *) ((Euribor365_10MPtr *) x));
}
static void *_p_OvernightIndexPtrTo_p_IborIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((IborIndexPtr *)  ((OvernightIndexPtr *) x));
}
static void *_p_Euribor365_6MPtrTo_p_IborIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((IborIndexPtr *) (Euribor365Ptr *) ((Euribor365_6MPtr *) x));
}
static void *_p_EURLibor4MPtrTo_p_IborIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((IborIndexPtr *) (EURLiborPtr *) ((EURLibor4MPtr *) x));
}
static void *_p_Euribor4MPtrTo_p_IborIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((IborIndexPtr *) (EuriborPtr *) ((Euribor4MPtr *) x));
}
static void *_p_Bbsw2MPtrTo_p_IborIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((IborIndexPtr *) (BbswPtr *) ((Bbsw2MPtr *) x));
}
static void *_p_Euribor365_11MPtrTo_p_IborIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((IborIndexPtr *) (Euribor365Ptr *) ((Euribor365_11MPtr *) x));
}
static void *_p_Euribor365_7MPtrTo_p_IborIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((IborIndexPtr *) (Euribor365Ptr *) ((Euribor365_7MPtr *) x));
}
static void *_p_EURLibor1YPtrTo_p_IborIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((IborIndexPtr *) (EURLiborPtr *) ((EURLibor1YPtr *) x));
}
static void *_p_Euribor1YPtrTo_p_IborIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((IborIndexPtr *) (EuriborPtr *) ((Euribor1YPtr *) x));
}
static void *_p_Bkbm1MPtrTo_p_IborIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((IborIndexPtr *) (BkbmPtr *) ((Bkbm1MPtr *) x));
}
static void *_p_EURLibor5MPtrTo_p_IborIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((IborIndexPtr *) (EURLiborPtr *) ((EURLibor5MPtr *) x));
}
static void *_p_Euribor5MPtrTo_p_IborIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((IborIndexPtr *) (EuriborPtr *) ((Euribor5MPtr *) x));
}
static void *_p_Bbsw3MPtrTo_p_IborIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((IborIndexPtr *) (BbswPtr *) ((Bbsw3MPtr *) x));
}
static void *_p_Euribor365_SWPtrTo_p_IborIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((IborIndexPtr *) (Euribor365Ptr *) ((Euribor365_SWPtr *) x));
}
static void *_p_NzocrPtrTo_p_IborIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((IborIndexPtr *) (OvernightIndexPtr *) ((NzocrPtr *) x));
}
static void *_p_AoniaPtrTo_p_IborIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((IborIndexPtr *) (OvernightIndexPtr *) ((AoniaPtr *) x));
}
static void *_p_EoniaPtrTo_p_IborIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((IborIndexPtr *) (OvernightIndexPtr *) ((EoniaPtr *) x));
}
static void *_p_SoniaPtrTo_p_IborIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((IborIndexPtr *) (OvernightIndexPtr *) ((SoniaPtr *) x));
}
static void *_p_Euribor365_8MPtrTo_p_IborIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((IborIndexPtr *) (Euribor365Ptr *) ((Euribor365_8MPtr *) x));
}
static void *_p_Bkbm2MPtrTo_p_IborIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((IborIndexPtr *) (BkbmPtr *) ((Bkbm2MPtr *) x));
}
static void *_p_EURLibor6MPtrTo_p_IborIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((IborIndexPtr *) (EURLiborPtr *) ((EURLibor6MPtr *) x));
}
static void *_p_Euribor6MPtrTo_p_IborIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((IborIndexPtr *) (EuriborPtr *) ((Euribor6MPtr *) x));
}
static void *_p_Bbsw4MPtrTo_p_IborIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((IborIndexPtr *) (BbswPtr *) ((Bbsw4MPtr *) x));
}
static void *_p_Euribor365_9MPtrTo_p_IborIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((IborIndexPtr *) (Euribor365Ptr *) ((Euribor365_9MPtr *) x));
}
static void *_p_Bkbm3MPtrTo_p_IborIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((IborIndexPtr *) (BkbmPtr *) ((Bkbm3MPtr *) x));
}
static void *_p_EURLibor7MPtrTo_p_IborIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((IborIndexPtr *) (EURLiborPtr *) ((EURLibor7MPtr *) x));
}
static void *_p_Euribor7MPtrTo_p_IborIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((IborIndexPtr *) (EuriborPtr *) ((Euribor7MPtr *) x));
}
static void *_p_Bbsw5MPtrTo_p_IborIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((IborIndexPtr *) (BbswPtr *) ((Bbsw5MPtr *) x));
}
static void *_p_Euribor365_2WPtrTo_p_IborIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((IborIndexPtr *) (Euribor365Ptr *) ((Euribor365_2WPtr *) x));
}
static void *_p_EURLiborSWPtrTo_p_IborIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((IborIndexPtr *) (EURLiborPtr *) ((EURLiborSWPtr *) x));
}
static void *_p_EuriborSWPtrTo_p_IborIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((IborIndexPtr *) (EuriborPtr *) ((EuriborSWPtr *) x));
}
static void *_p_Euribor365_1MPtrTo_p_IborIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((IborIndexPtr *) (Euribor365Ptr *) ((Euribor365_1MPtr *) x));
}
static void *_p_TiborPtrTo_p_IborIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((IborIndexPtr *)  ((TiborPtr *) x));
}
static void *_p_SEKLiborPtrTo_p_IborIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((IborIndexPtr *)  ((SEKLiborPtr *) x));
}
static void *_p_NZDLiborPtrTo_p_IborIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((IborIndexPtr *)  ((NZDLiborPtr *) x));
}
static void *_p_JPYLiborPtrTo_p_IborIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((IborIndexPtr *)  ((JPYLiborPtr *) x));
}
static void *_p_GBPLiborPtrTo_p_IborIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((IborIndexPtr *)  ((GBPLiborPtr *) x));
}
static void *_p_EURLiborPtrTo_p_IborIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((IborIndexPtr *)  ((EURLiborPtr *) x));
}
static void *_p_DKKLiborPtrTo_p_IborIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((IborIndexPtr *)  ((DKKLiborPtr *) x));
}
static void *_p_CHFLiborPtrTo_p_IborIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((IborIndexPtr *)  ((CHFLiborPtr *) x));
}
static void *_p_CADLiborPtrTo_p_IborIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((IborIndexPtr *)  ((CADLiborPtr *) x));
}
static void *_p_AUDLiborPtrTo_p_IborIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((IborIndexPtr *)  ((AUDLiborPtr *) x));
}
static void *_p_LiborPtrTo_p_IborIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((IborIndexPtr *)  ((LiborPtr *) x));
}
static void *_p_EuriborPtrTo_p_IborIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((IborIndexPtr *)  ((EuriborPtr *) x));
}
static void *_p_Bkbm4MPtrTo_p_IborIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((IborIndexPtr *) (BkbmPtr *) ((Bkbm4MPtr *) x));
}
static void *_p_TRLiborPtrTo_p_IborIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((IborIndexPtr *)  ((TRLiborPtr *) x));
}
static void *_p_USDLiborPtrTo_p_IborIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((IborIndexPtr *)  ((USDLiborPtr *) x));
}
static void *_p_ZiborPtrTo_p_IborIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((IborIndexPtr *)  ((ZiborPtr *) x));
}
static void *_p_Bbsw6MPtrTo_p_IborIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((IborIndexPtr *) (BbswPtr *) ((Bbsw6MPtr *) x));
}
static void *_p_EURLibor8MPtrTo_p_IborIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((IborIndexPtr *) (EURLiborPtr *) ((EURLibor8MPtr *) x));
}
static void *_p_Euribor8MPtrTo_p_IborIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((IborIndexPtr *) (EuriborPtr *) ((Euribor8MPtr *) x));
}
static void *_p_Euribor365_3WPtrTo_p_IborIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((IborIndexPtr *) (Euribor365Ptr *) ((Euribor365_3WPtr *) x));
}
static void *_p_BbswPtrTo_p_IborIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((IborIndexPtr *)  ((BbswPtr *) x));
}
static void *_p_BkbmPtrTo_p_IborIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((IborIndexPtr *)  ((BkbmPtr *) x));
}
static void *_p_Euribor365_2MPtrTo_p_IborIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((IborIndexPtr *) (Euribor365Ptr *) ((Euribor365_2MPtr *) x));
}
static void *_p_Bkbm5MPtrTo_p_IborIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((IborIndexPtr *) (BkbmPtr *) ((Bkbm5MPtr *) x));
}
static void *_p_EURLibor10MPtrTo_p_IborIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((IborIndexPtr *) (EURLiborPtr *) ((EURLibor10MPtr *) x));
}
static void *_p_Euribor10MPtrTo_p_IborIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((IborIndexPtr *) (EuriborPtr *) ((Euribor10MPtr *) x));
}
static void *_p_EURLibor9MPtrTo_p_IborIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((IborIndexPtr *) (EURLiborPtr *) ((EURLibor9MPtr *) x));
}
static void *_p_Euribor9MPtrTo_p_IborIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((IborIndexPtr *) (EuriborPtr *) ((Euribor9MPtr *) x));
}
static void *_p_EURLibor2WPtrTo_p_IborIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((IborIndexPtr *) (EURLiborPtr *) ((EURLibor2WPtr *) x));
}
static void *_p_Euribor2WPtrTo_p_IborIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((IborIndexPtr *) (EuriborPtr *) ((Euribor2WPtr *) x));
}
static void *_p_Euribor365_3MPtrTo_p_IborIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((IborIndexPtr *) (Euribor365Ptr *) ((Euribor365_3MPtr *) x));
}
static void *_p_Bkbm6MPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *) (IborIndexPtr *)(BkbmPtr *) ((Bkbm6MPtr *) x));
}
static void *_p_EURLibor1MPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *) (IborIndexPtr *)(EURLiborPtr *) ((EURLibor1MPtr *) x));
}
static void *_p_Euribor1MPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *) (IborIndexPtr *)(EuriborPtr *) ((Euribor1MPtr *) x));
}
static void *_p_EURLibor11MPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *) (IborIndexPtr *)(EURLiborPtr *) ((EURLibor11MPtr *) x));
}
static void *_p_Euribor11MPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *) (IborIndexPtr *)(EuriborPtr *) ((Euribor11MPtr *) x));
}
static void *_p_Euribor365PtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *) (IborIndexPtr *) ((Euribor365Ptr *) x));
}
static void *_p_FedFundsPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *) (IborIndexPtr *)(OvernightIndexPtr *) ((FedFundsPtr *) x));
}
static void *_p_CdorPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *) (IborIndexPtr *) ((CdorPtr *) x));
}
static void *_p_Euribor3WPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *) (IborIndexPtr *)(EuriborPtr *) ((Euribor3WPtr *) x));
}
static void *_p_Euribor365_4MPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *) (IborIndexPtr *)(Euribor365Ptr *) ((Euribor365_4MPtr *) x));
}
static void *_p_EURLibor2MPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *) (IborIndexPtr *)(EURLiborPtr *) ((EURLibor2MPtr *) x));
}
static void *_p_Euribor2MPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *) (IborIndexPtr *)(EuriborPtr *) ((Euribor2MPtr *) x));
}
static void *_p_Euribor365_1YPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *) (IborIndexPtr *)(Euribor365Ptr *) ((Euribor365_1YPtr *) x));
}
static void *_p_JibarPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *) (IborIndexPtr *) ((JibarPtr *) x));
}
static void *_p_Euribor365_5MPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *) (IborIndexPtr *)(Euribor365Ptr *) ((Euribor365_5MPtr *) x));
}
static void *_p_EURLibor3MPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *) (IborIndexPtr *)(EURLiborPtr *) ((EURLibor3MPtr *) x));
}
static void *_p_Euribor3MPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *) (IborIndexPtr *)(EuriborPtr *) ((Euribor3MPtr *) x));
}
static void *_p_Bbsw1MPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *) (IborIndexPtr *)(BbswPtr *) ((Bbsw1MPtr *) x));
}
static void *_p_Euribor365_10MPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *) (IborIndexPtr *)(Euribor365Ptr *) ((Euribor365_10MPtr *) x));
}
static void *_p_SwapIndexPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *)  ((SwapIndexPtr *) x));
}
static void *_p_OvernightIndexPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *) (IborIndexPtr *) ((OvernightIndexPtr *) x));
}
static void *_p_IborIndexPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *)  ((IborIndexPtr *) x));
}
static void *_p_Euribor365_6MPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *) (IborIndexPtr *)(Euribor365Ptr *) ((Euribor365_6MPtr *) x));
}
static void *_p_EuriborSwapIsdaFixBPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *) (SwapIndexPtr *) ((EuriborSwapIsdaFixBPtr *) x));
}
static void *_p_EurLiborSwapIsdaFixBPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *) (SwapIndexPtr *) ((EurLiborSwapIsdaFixBPtr *) x));
}
static void *_p_EURLibor4MPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *) (IborIndexPtr *)(EURLiborPtr *) ((EURLibor4MPtr *) x));
}
static void *_p_Euribor4MPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *) (IborIndexPtr *)(EuriborPtr *) ((Euribor4MPtr *) x));
}
static void *_p_Bbsw2MPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *) (IborIndexPtr *)(BbswPtr *) ((Bbsw2MPtr *) x));
}
static void *_p_Euribor365_11MPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *) (IborIndexPtr *)(Euribor365Ptr *) ((Euribor365_11MPtr *) x));
}
static void *_p_EuriborSwapIfrFixPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *) (SwapIndexPtr *) ((EuriborSwapIfrFixPtr *) x));
}
static void *_p_EurLiborSwapIfrFixPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *) (SwapIndexPtr *) ((EurLiborSwapIfrFixPtr *) x));
}
static void *_p_Euribor365_7MPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *) (IborIndexPtr *)(Euribor365Ptr *) ((Euribor365_7MPtr *) x));
}
static void *_p_EURLibor1YPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *) (IborIndexPtr *)(EURLiborPtr *) ((EURLibor1YPtr *) x));
}
static void *_p_Euribor1YPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *) (IborIndexPtr *)(EuriborPtr *) ((Euribor1YPtr *) x));
}
static void *_p_Bkbm1MPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *) (IborIndexPtr *)(BkbmPtr *) ((Bkbm1MPtr *) x));
}
static void *_p_EURLibor5MPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *) (IborIndexPtr *)(EURLiborPtr *) ((EURLibor5MPtr *) x));
}
static void *_p_Euribor5MPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *) (IborIndexPtr *)(EuriborPtr *) ((Euribor5MPtr *) x));
}
static void *_p_Bbsw3MPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *) (IborIndexPtr *)(BbswPtr *) ((Bbsw3MPtr *) x));
}
static void *_p_Euribor365_SWPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *) (IborIndexPtr *)(Euribor365Ptr *) ((Euribor365_SWPtr *) x));
}
static void *_p_NzocrPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *) (IborIndexPtr *)(OvernightIndexPtr *) ((NzocrPtr *) x));
}
static void *_p_AoniaPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *) (IborIndexPtr *)(OvernightIndexPtr *) ((AoniaPtr *) x));
}
static void *_p_EoniaPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *) (IborIndexPtr *)(OvernightIndexPtr *) ((EoniaPtr *) x));
}
static void *_p_SoniaPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *) (IborIndexPtr *)(OvernightIndexPtr *) ((SoniaPtr *) x));
}
static void *_p_EuriborSwapIsdaFixAPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *) (SwapIndexPtr *) ((EuriborSwapIsdaFixAPtr *) x));
}
static void *_p_EurLiborSwapIsdaFixAPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *) (SwapIndexPtr *) ((EurLiborSwapIsdaFixAPtr *) x));
}
static void *_p_Euribor365_8MPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *) (IborIndexPtr *)(Euribor365Ptr *) ((Euribor365_8MPtr *) x));
}
static void *_p_Bkbm2MPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *) (IborIndexPtr *)(BkbmPtr *) ((Bkbm2MPtr *) x));
}
static void *_p_EURLibor6MPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *) (IborIndexPtr *)(EURLiborPtr *) ((EURLibor6MPtr *) x));
}
static void *_p_Euribor6MPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *) (IborIndexPtr *)(EuriborPtr *) ((Euribor6MPtr *) x));
}
static void *_p_Bbsw4MPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *) (IborIndexPtr *)(BbswPtr *) ((Bbsw4MPtr *) x));
}
static void *_p_Euribor365_9MPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *) (IborIndexPtr *)(Euribor365Ptr *) ((Euribor365_9MPtr *) x));
}
static void *_p_Bkbm3MPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *) (IborIndexPtr *)(BkbmPtr *) ((Bkbm3MPtr *) x));
}
static void *_p_EURLibor7MPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *) (IborIndexPtr *)(EURLiborPtr *) ((EURLibor7MPtr *) x));
}
static void *_p_Euribor7MPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *) (IborIndexPtr *)(EuriborPtr *) ((Euribor7MPtr *) x));
}
static void *_p_Bbsw5MPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *) (IborIndexPtr *)(BbswPtr *) ((Bbsw5MPtr *) x));
}
static void *_p_Euribor365_2WPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *) (IborIndexPtr *)(Euribor365Ptr *) ((Euribor365_2WPtr *) x));
}
static void *_p_EURLiborSWPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *) (IborIndexPtr *)(EURLiborPtr *) ((EURLiborSWPtr *) x));
}
static void *_p_EuriborSWPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *) (IborIndexPtr *)(EuriborPtr *) ((EuriborSWPtr *) x));
}
static void *_p_Euribor365_1MPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *) (IborIndexPtr *)(Euribor365Ptr *) ((Euribor365_1MPtr *) x));
}
static void *_p_NZDLiborPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *) (IborIndexPtr *) ((NZDLiborPtr *) x));
}
static void *_p_JPYLiborPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *) (IborIndexPtr *) ((JPYLiborPtr *) x));
}
static void *_p_GBPLiborPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *) (IborIndexPtr *) ((GBPLiborPtr *) x));
}
static void *_p_EURLiborPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *) (IborIndexPtr *) ((EURLiborPtr *) x));
}
static void *_p_DKKLiborPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *) (IborIndexPtr *) ((DKKLiborPtr *) x));
}
static void *_p_CHFLiborPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *) (IborIndexPtr *) ((CHFLiborPtr *) x));
}
static void *_p_CADLiborPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *) (IborIndexPtr *) ((CADLiborPtr *) x));
}
static void *_p_AUDLiborPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *) (IborIndexPtr *) ((AUDLiborPtr *) x));
}
static void *_p_LiborPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *) (IborIndexPtr *) ((LiborPtr *) x));
}
static void *_p_EuriborPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *) (IborIndexPtr *) ((EuriborPtr *) x));
}
static void *_p_Bkbm4MPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *) (IborIndexPtr *)(BkbmPtr *) ((Bkbm4MPtr *) x));
}
static void *_p_SEKLiborPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *) (IborIndexPtr *) ((SEKLiborPtr *) x));
}
static void *_p_TiborPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *) (IborIndexPtr *) ((TiborPtr *) x));
}
static void *_p_TRLiborPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *) (IborIndexPtr *) ((TRLiborPtr *) x));
}
static void *_p_USDLiborPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *) (IborIndexPtr *) ((USDLiborPtr *) x));
}
static void *_p_ZiborPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *) (IborIndexPtr *) ((ZiborPtr *) x));
}
static void *_p_Bbsw6MPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *) (IborIndexPtr *)(BbswPtr *) ((Bbsw6MPtr *) x));
}
static void *_p_EURLibor8MPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *) (IborIndexPtr *)(EURLiborPtr *) ((EURLibor8MPtr *) x));
}
static void *_p_Euribor8MPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *) (IborIndexPtr *)(EuriborPtr *) ((Euribor8MPtr *) x));
}
static void *_p_Euribor365_3WPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *) (IborIndexPtr *)(Euribor365Ptr *) ((Euribor365_3WPtr *) x));
}
static void *_p_BbswPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *) (IborIndexPtr *) ((BbswPtr *) x));
}
static void *_p_BkbmPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *) (IborIndexPtr *) ((BkbmPtr *) x));
}
static void *_p_Euribor365_2MPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *) (IborIndexPtr *)(Euribor365Ptr *) ((Euribor365_2MPtr *) x));
}
static void *_p_Bkbm5MPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *) (IborIndexPtr *)(BkbmPtr *) ((Bkbm5MPtr *) x));
}
static void *_p_EURLibor10MPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *) (IborIndexPtr *)(EURLiborPtr *) ((EURLibor10MPtr *) x));
}
static void *_p_Euribor10MPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *) (IborIndexPtr *)(EuriborPtr *) ((Euribor10MPtr *) x));
}
static void *_p_EURLibor9MPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *) (IborIndexPtr *)(EURLiborPtr *) ((EURLibor9MPtr *) x));
}
static void *_p_Euribor9MPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *) (IborIndexPtr *)(EuriborPtr *) ((Euribor9MPtr *) x));
}
static void *_p_EURLibor2WPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *) (IborIndexPtr *)(EURLiborPtr *) ((EURLibor2WPtr *) x));
}
static void *_p_Euribor2WPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *) (IborIndexPtr *)(EuriborPtr *) ((Euribor2WPtr *) x));
}
static void *_p_Euribor365_3MPtrTo_p_InterestRateIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InterestRateIndexPtr *) (IborIndexPtr *)(Euribor365Ptr *) ((Euribor365_3MPtr *) x));
}
static void *_p_FedFundsPtrTo_p_OvernightIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((OvernightIndexPtr *)  ((FedFundsPtr *) x));
}
static void *_p_AoniaPtrTo_p_OvernightIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((OvernightIndexPtr *)  ((AoniaPtr *) x));
}
static void *_p_EoniaPtrTo_p_OvernightIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((OvernightIndexPtr *)  ((EoniaPtr *) x));
}
static void *_p_SoniaPtrTo_p_OvernightIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((OvernightIndexPtr *)  ((SoniaPtr *) x));
}
static void *_p_NzocrPtrTo_p_OvernightIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((OvernightIndexPtr *)  ((NzocrPtr *) x));
}
static void *_p_YYFRHICPPtrTo_p_InflationIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InflationIndexPtr *) (YoYInflationIndexPtr *) ((YYFRHICPPtr *) x));
}
static void *_p_YYEUHICPPtrTo_p_InflationIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InflationIndexPtr *) (YoYInflationIndexPtr *) ((YYEUHICPPtr *) x));
}
static void *_p_FRHICPPtrTo_p_InflationIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InflationIndexPtr *) (ZeroInflationIndexPtr *) ((FRHICPPtr *) x));
}
static void *_p_EUHICPPtrTo_p_InflationIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InflationIndexPtr *) (ZeroInflationIndexPtr *) ((EUHICPPtr *) x));
}
static void *_p_YYUKRPIPtrTo_p_InflationIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InflationIndexPtr *) (YoYInflationIndexPtr *) ((YYUKRPIPtr *) x));
}
static void *_p_UKRPIPtrTo_p_InflationIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InflationIndexPtr *) (ZeroInflationIndexPtr *) ((UKRPIPtr *) x));
}
static void *_p_YoYInflationIndexPtrTo_p_InflationIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InflationIndexPtr *)  ((YoYInflationIndexPtr *) x));
}
static void *_p_ZeroInflationIndexPtrTo_p_InflationIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InflationIndexPtr *)  ((ZeroInflationIndexPtr *) x));
}
static void *_p_YYEUHICPXTPtrTo_p_InflationIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InflationIndexPtr *) (YoYInflationIndexPtr *) ((YYEUHICPXTPtr *) x));
}
static void *_p_EUHICPXTPtrTo_p_InflationIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InflationIndexPtr *) (ZeroInflationIndexPtr *) ((EUHICPXTPtr *) x));
}
static void *_p_YYZACPIPtrTo_p_InflationIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InflationIndexPtr *) (YoYInflationIndexPtr *) ((YYZACPIPtr *) x));
}
static void *_p_YYUSCPIPtrTo_p_InflationIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InflationIndexPtr *) (YoYInflationIndexPtr *) ((YYUSCPIPtr *) x));
}
static void *_p_ZACPIPtrTo_p_InflationIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InflationIndexPtr *) (ZeroInflationIndexPtr *) ((ZACPIPtr *) x));
}
static void *_p_USCPIPtrTo_p_InflationIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InflationIndexPtr *) (ZeroInflationIndexPtr *) ((USCPIPtr *) x));
}
static void *_p_EUHICPXTPtrTo_p_ZeroInflationIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((ZeroInflationIndexPtr *)  ((EUHICPXTPtr *) x));
}
static void *_p_USCPIPtrTo_p_ZeroInflationIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((ZeroInflationIndexPtr *)  ((USCPIPtr *) x));
}
static void *_p_ZACPIPtrTo_p_ZeroInflationIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((ZeroInflationIndexPtr *)  ((ZACPIPtr *) x));
}
static void *_p_EUHICPPtrTo_p_ZeroInflationIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((ZeroInflationIndexPtr *)  ((EUHICPPtr *) x));
}
static void *_p_FRHICPPtrTo_p_ZeroInflationIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((ZeroInflationIndexPtr *)  ((FRHICPPtr *) x));
}
static void *_p_UKRPIPtrTo_p_ZeroInflationIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((ZeroInflationIndexPtr *)  ((UKRPIPtr *) x));
}
static void *_p_YYEUHICPXTPtrTo_p_YoYInflationIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((YoYInflationIndexPtr *)  ((YYEUHICPXTPtr *) x));
}
static void *_p_YYUSCPIPtrTo_p_YoYInflationIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((YoYInflationIndexPtr *)  ((YYUSCPIPtr *) x));
}
static void *_p_YYZACPIPtrTo_p_YoYInflationIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((YoYInflationIndexPtr *)  ((YYZACPIPtr *) x));
}
static void *_p_YYEUHICPPtrTo_p_YoYInflationIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((YoYInflationIndexPtr *)  ((YYEUHICPPtr *) x));
}
static void *_p_YYFRHICPPtrTo_p_YoYInflationIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((YoYInflationIndexPtr *)  ((YYFRHICPPtr *) x));
}
static void *_p_YYUKRPIPtrTo_p_YoYInflationIndexPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((YoYInflationIndexPtr *)  ((YYUKRPIPtr *) x));
}
static void *_p_CouponPtrTo_p_boost__shared_ptrT_CashFlow_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< CashFlow > *)  ((CouponPtr *) x));
}
static void *_p_FixedRateCouponPtrTo_p_boost__shared_ptrT_CashFlow_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< CashFlow > *) (CouponPtr *) ((FixedRateCouponPtr *) x));
}
static void *_p_FloatingRateCouponPtrTo_p_boost__shared_ptrT_CashFlow_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< CashFlow > *) (CouponPtr *) ((FloatingRateCouponPtr *) x));
}
static void *_p_CappedFlooredCouponPtrTo_p_boost__shared_ptrT_CashFlow_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< CashFlow > *) (CouponPtr *)(FloatingRateCouponPtr *) ((CappedFlooredCouponPtr *) x));
}
static void *_p_IborCouponPtrTo_p_boost__shared_ptrT_CashFlow_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< CashFlow > *) (CouponPtr *)(FloatingRateCouponPtr *) ((IborCouponPtr *) x));
}
static void *_p_CmsCouponPtrTo_p_boost__shared_ptrT_CashFlow_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< CashFlow > *) (CouponPtr *)(FloatingRateCouponPtr *) ((CmsCouponPtr *) x));
}
static void *_p_CappedFlooredCmsCouponPtrTo_p_boost__shared_ptrT_CashFlow_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< CashFlow > *) (CouponPtr *)(FloatingRateCouponPtr *)(CappedFlooredCouponPtr *) ((CappedFlooredCmsCouponPtr *) x));
}
static void *_p_RedemptionPtrTo_p_boost__shared_ptrT_CashFlow_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< CashFlow > *)  ((RedemptionPtr *) x));
}
static void *_p_AmortizingPaymentPtrTo_p_boost__shared_ptrT_CashFlow_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< CashFlow > *)  ((AmortizingPaymentPtr *) x));
}
static void *_p_SimpleCashFlowPtrTo_p_boost__shared_ptrT_CashFlow_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< CashFlow > *)  ((SimpleCashFlowPtr *) x));
}
static void *_p_PlainVanillaPayoffPtrTo_p_boost__shared_ptrT_Payoff_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Payoff > *)  ((PlainVanillaPayoffPtr *) x));
}
static void *_p_PercentageStrikePayoffPtrTo_p_boost__shared_ptrT_Payoff_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Payoff > *)  ((PercentageStrikePayoffPtr *) x));
}
static void *_p_CashOrNothingPayoffPtrTo_p_boost__shared_ptrT_Payoff_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Payoff > *)  ((CashOrNothingPayoffPtr *) x));
}
static void *_p_AssetOrNothingPayoffPtrTo_p_boost__shared_ptrT_Payoff_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Payoff > *)  ((AssetOrNothingPayoffPtr *) x));
}
static void *_p_SuperSharePayoffPtrTo_p_boost__shared_ptrT_Payoff_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Payoff > *)  ((SuperSharePayoffPtr *) x));
}
static void *_p_GapPayoffPtrTo_p_boost__shared_ptrT_Payoff_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Payoff > *)  ((GapPayoffPtr *) x));
}
static void *_p_BasketPayoffPtrTo_p_boost__shared_ptrT_Payoff_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Payoff > *)  ((BasketPayoffPtr *) x));
}
static void *_p_MinBasketPayoffPtrTo_p_boost__shared_ptrT_Payoff_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Payoff > *) (BasketPayoffPtr *) ((MinBasketPayoffPtr *) x));
}
static void *_p_MaxBasketPayoffPtrTo_p_boost__shared_ptrT_Payoff_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Payoff > *) (BasketPayoffPtr *) ((MaxBasketPayoffPtr *) x));
}
static void *_p_AverageBasketPayoffPtrTo_p_boost__shared_ptrT_Payoff_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Payoff > *) (BasketPayoffPtr *) ((AverageBasketPayoffPtr *) x));
}
static void *_p_YieldTermStructureTo_p_Extrapolator(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Extrapolator *)  ((YieldTermStructure *) x));
}
static void *_p_BlackVolTermStructureTo_p_Extrapolator(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Extrapolator *)  ((BlackVolTermStructure *) x));
}
static void *_p_LocalVolTermStructureTo_p_Extrapolator(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Extrapolator *)  ((LocalVolTermStructure *) x));
}
static void *_p_OptionletVolatilityStructureTo_p_Extrapolator(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Extrapolator *)  ((OptionletVolatilityStructure *) x));
}
static void *_p_SwaptionVolatilityStructureTo_p_Extrapolator(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Extrapolator *)  ((SwaptionVolatilityStructure *) x));
}
static void *_p_InflationTermStructureTo_p_Extrapolator(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Extrapolator *)  ((InflationTermStructure *) x));
}
static void *_p_YoYInflationTermStructureTo_p_Extrapolator(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Extrapolator *) (InflationTermStructure *) ((YoYInflationTermStructure *) x));
}
static void *_p_ZeroInflationTermStructureTo_p_Extrapolator(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Extrapolator *) (InflationTermStructure *) ((ZeroInflationTermStructure *) x));
}
static void *_p_DefaultProbabilityTermStructureTo_p_Extrapolator(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Extrapolator *)  ((DefaultProbabilityTermStructure *) x));
}
static void *_p_CapFloorTermVolatilityStructureTo_p_Extrapolator(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Extrapolator *)  ((CapFloorTermVolatilityStructure *) x));
}
static void *_p_DirichletBCPtrTo_p_boost__shared_ptrT_DefaultBoundaryCondition_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< DefaultBoundaryCondition > *)  ((DirichletBCPtr *) x));
}
static void *_p_NeumannBCPtrTo_p_boost__shared_ptrT_DefaultBoundaryCondition_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< DefaultBoundaryCondition > *)  ((NeumannBCPtr *) x));
}
static void *_p_EuropeanExercisePtrTo_p_boost__shared_ptrT_Exercise_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Exercise > *)  ((EuropeanExercisePtr *) x));
}
static void *_p_AmericanExercisePtrTo_p_boost__shared_ptrT_Exercise_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Exercise > *)  ((AmericanExercisePtr *) x));
}
static void *_p_BermudanExercisePtrTo_p_boost__shared_ptrT_Exercise_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Exercise > *)  ((BermudanExercisePtr *) x));
}
static void *_p_RebatedExercisePtrTo_p_boost__shared_ptrT_Exercise_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Exercise > *)  ((RebatedExercisePtr *) x));
}
static void *_p_Bkbm6MPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *)(IborIndexPtr *)(BkbmPtr *) ((Bkbm6MPtr *) x));
}
static void *_p_EURLibor1MPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *)(IborIndexPtr *)(EURLiborPtr *) ((EURLibor1MPtr *) x));
}
static void *_p_Euribor1MPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *)(IborIndexPtr *)(EuriborPtr *) ((Euribor1MPtr *) x));
}
static void *_p_EURLibor11MPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *)(IborIndexPtr *)(EURLiborPtr *) ((EURLibor11MPtr *) x));
}
static void *_p_Euribor11MPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *)(IborIndexPtr *)(EuriborPtr *) ((Euribor11MPtr *) x));
}
static void *_p_Euribor365PtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *)(IborIndexPtr *) ((Euribor365Ptr *) x));
}
static void *_p_FedFundsPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *)(IborIndexPtr *)(OvernightIndexPtr *) ((FedFundsPtr *) x));
}
static void *_p_UKRPIPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InflationIndexPtr *)(ZeroInflationIndexPtr *) ((UKRPIPtr *) x));
}
static void *_p_YYUKRPIPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InflationIndexPtr *)(YoYInflationIndexPtr *) ((YYUKRPIPtr *) x));
}
static void *_p_CdorPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *)(IborIndexPtr *) ((CdorPtr *) x));
}
static void *_p_Euribor3WPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *)(IborIndexPtr *)(EuriborPtr *) ((Euribor3WPtr *) x));
}
static void *_p_Euribor365_4MPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *)(IborIndexPtr *)(Euribor365Ptr *) ((Euribor365_4MPtr *) x));
}
static void *_p_EURLibor2MPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *)(IborIndexPtr *)(EURLiborPtr *) ((EURLibor2MPtr *) x));
}
static void *_p_Euribor2MPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *)(IborIndexPtr *)(EuriborPtr *) ((Euribor2MPtr *) x));
}
static void *_p_Euribor365_1YPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *)(IborIndexPtr *)(Euribor365Ptr *) ((Euribor365_1YPtr *) x));
}
static void *_p_JibarPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *)(IborIndexPtr *) ((JibarPtr *) x));
}
static void *_p_Euribor365_5MPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *)(IborIndexPtr *)(Euribor365Ptr *) ((Euribor365_5MPtr *) x));
}
static void *_p_EURLibor3MPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *)(IborIndexPtr *)(EURLiborPtr *) ((EURLibor3MPtr *) x));
}
static void *_p_Euribor3MPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *)(IborIndexPtr *)(EuriborPtr *) ((Euribor3MPtr *) x));
}
static void *_p_Bbsw1MPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *)(IborIndexPtr *)(BbswPtr *) ((Bbsw1MPtr *) x));
}
static void *_p_Euribor365_10MPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *)(IborIndexPtr *)(Euribor365Ptr *) ((Euribor365_10MPtr *) x));
}
static void *_p_SwapIndexPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *) ((SwapIndexPtr *) x));
}
static void *_p_OvernightIndexPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *)(IborIndexPtr *) ((OvernightIndexPtr *) x));
}
static void *_p_IborIndexPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *) ((IborIndexPtr *) x));
}
static void *_p_InterestRateIndexPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *)  ((InterestRateIndexPtr *) x));
}
static void *_p_InflationIndexPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *)  ((InflationIndexPtr *) x));
}
static void *_p_ZeroInflationIndexPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InflationIndexPtr *) ((ZeroInflationIndexPtr *) x));
}
static void *_p_YoYInflationIndexPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InflationIndexPtr *) ((YoYInflationIndexPtr *) x));
}
static void *_p_Euribor365_6MPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *)(IborIndexPtr *)(Euribor365Ptr *) ((Euribor365_6MPtr *) x));
}
static void *_p_EuriborSwapIsdaFixBPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *)(SwapIndexPtr *) ((EuriborSwapIsdaFixBPtr *) x));
}
static void *_p_EurLiborSwapIsdaFixBPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *)(SwapIndexPtr *) ((EurLiborSwapIsdaFixBPtr *) x));
}
static void *_p_EUHICPXTPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InflationIndexPtr *)(ZeroInflationIndexPtr *) ((EUHICPXTPtr *) x));
}
static void *_p_YYEUHICPXTPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InflationIndexPtr *)(YoYInflationIndexPtr *) ((YYEUHICPXTPtr *) x));
}
static void *_p_EURLibor4MPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *)(IborIndexPtr *)(EURLiborPtr *) ((EURLibor4MPtr *) x));
}
static void *_p_Euribor4MPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *)(IborIndexPtr *)(EuriborPtr *) ((Euribor4MPtr *) x));
}
static void *_p_Bbsw2MPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *)(IborIndexPtr *)(BbswPtr *) ((Bbsw2MPtr *) x));
}
static void *_p_Euribor365_11MPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *)(IborIndexPtr *)(Euribor365Ptr *) ((Euribor365_11MPtr *) x));
}
static void *_p_USCPIPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InflationIndexPtr *)(ZeroInflationIndexPtr *) ((USCPIPtr *) x));
}
static void *_p_ZACPIPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InflationIndexPtr *)(ZeroInflationIndexPtr *) ((ZACPIPtr *) x));
}
static void *_p_YYUSCPIPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InflationIndexPtr *)(YoYInflationIndexPtr *) ((YYUSCPIPtr *) x));
}
static void *_p_YYZACPIPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InflationIndexPtr *)(YoYInflationIndexPtr *) ((YYZACPIPtr *) x));
}
static void *_p_EuriborSwapIfrFixPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *)(SwapIndexPtr *) ((EuriborSwapIfrFixPtr *) x));
}
static void *_p_EurLiborSwapIfrFixPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *)(SwapIndexPtr *) ((EurLiborSwapIfrFixPtr *) x));
}
static void *_p_Euribor365_7MPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *)(IborIndexPtr *)(Euribor365Ptr *) ((Euribor365_7MPtr *) x));
}
static void *_p_EURLibor1YPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *)(IborIndexPtr *)(EURLiborPtr *) ((EURLibor1YPtr *) x));
}
static void *_p_Euribor1YPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *)(IborIndexPtr *)(EuriborPtr *) ((Euribor1YPtr *) x));
}
static void *_p_Bkbm1MPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *)(IborIndexPtr *)(BkbmPtr *) ((Bkbm1MPtr *) x));
}
static void *_p_EURLibor5MPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *)(IborIndexPtr *)(EURLiborPtr *) ((EURLibor5MPtr *) x));
}
static void *_p_Euribor5MPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *)(IborIndexPtr *)(EuriborPtr *) ((Euribor5MPtr *) x));
}
static void *_p_Bbsw3MPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *)(IborIndexPtr *)(BbswPtr *) ((Bbsw3MPtr *) x));
}
static void *_p_Euribor365_SWPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *)(IborIndexPtr *)(Euribor365Ptr *) ((Euribor365_SWPtr *) x));
}
static void *_p_NzocrPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *)(IborIndexPtr *)(OvernightIndexPtr *) ((NzocrPtr *) x));
}
static void *_p_AoniaPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *)(IborIndexPtr *)(OvernightIndexPtr *) ((AoniaPtr *) x));
}
static void *_p_EoniaPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *)(IborIndexPtr *)(OvernightIndexPtr *) ((EoniaPtr *) x));
}
static void *_p_SoniaPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *)(IborIndexPtr *)(OvernightIndexPtr *) ((SoniaPtr *) x));
}
static void *_p_EuriborSwapIsdaFixAPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *)(SwapIndexPtr *) ((EuriborSwapIsdaFixAPtr *) x));
}
static void *_p_EurLiborSwapIsdaFixAPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *)(SwapIndexPtr *) ((EurLiborSwapIsdaFixAPtr *) x));
}
static void *_p_Euribor365_8MPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *)(IborIndexPtr *)(Euribor365Ptr *) ((Euribor365_8MPtr *) x));
}
static void *_p_Bkbm2MPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *)(IborIndexPtr *)(BkbmPtr *) ((Bkbm2MPtr *) x));
}
static void *_p_EURLibor6MPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *)(IborIndexPtr *)(EURLiborPtr *) ((EURLibor6MPtr *) x));
}
static void *_p_Euribor6MPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *)(IborIndexPtr *)(EuriborPtr *) ((Euribor6MPtr *) x));
}
static void *_p_Bbsw4MPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *)(IborIndexPtr *)(BbswPtr *) ((Bbsw4MPtr *) x));
}
static void *_p_EUHICPPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InflationIndexPtr *)(ZeroInflationIndexPtr *) ((EUHICPPtr *) x));
}
static void *_p_FRHICPPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InflationIndexPtr *)(ZeroInflationIndexPtr *) ((FRHICPPtr *) x));
}
static void *_p_YYEUHICPPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InflationIndexPtr *)(YoYInflationIndexPtr *) ((YYEUHICPPtr *) x));
}
static void *_p_YYFRHICPPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InflationIndexPtr *)(YoYInflationIndexPtr *) ((YYFRHICPPtr *) x));
}
static void *_p_Euribor365_9MPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *)(IborIndexPtr *)(Euribor365Ptr *) ((Euribor365_9MPtr *) x));
}
static void *_p_Bkbm3MPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *)(IborIndexPtr *)(BkbmPtr *) ((Bkbm3MPtr *) x));
}
static void *_p_EURLibor7MPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *)(IborIndexPtr *)(EURLiborPtr *) ((EURLibor7MPtr *) x));
}
static void *_p_Euribor7MPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *)(IborIndexPtr *)(EuriborPtr *) ((Euribor7MPtr *) x));
}
static void *_p_Bbsw5MPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *)(IborIndexPtr *)(BbswPtr *) ((Bbsw5MPtr *) x));
}
static void *_p_Euribor365_2WPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *)(IborIndexPtr *)(Euribor365Ptr *) ((Euribor365_2WPtr *) x));
}
static void *_p_EURLiborSWPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *)(IborIndexPtr *)(EURLiborPtr *) ((EURLiborSWPtr *) x));
}
static void *_p_EuriborSWPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *)(IborIndexPtr *)(EuriborPtr *) ((EuriborSWPtr *) x));
}
static void *_p_Euribor365_1MPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *)(IborIndexPtr *)(Euribor365Ptr *) ((Euribor365_1MPtr *) x));
}
static void *_p_JPYLiborPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *)(IborIndexPtr *) ((JPYLiborPtr *) x));
}
static void *_p_GBPLiborPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *)(IborIndexPtr *) ((GBPLiborPtr *) x));
}
static void *_p_EURLiborPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *)(IborIndexPtr *) ((EURLiborPtr *) x));
}
static void *_p_DKKLiborPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *)(IborIndexPtr *) ((DKKLiborPtr *) x));
}
static void *_p_CHFLiborPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *)(IborIndexPtr *) ((CHFLiborPtr *) x));
}
static void *_p_CADLiborPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *)(IborIndexPtr *) ((CADLiborPtr *) x));
}
static void *_p_AUDLiborPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *)(IborIndexPtr *) ((AUDLiborPtr *) x));
}
static void *_p_LiborPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *)(IborIndexPtr *) ((LiborPtr *) x));
}
static void *_p_EuriborPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *)(IborIndexPtr *) ((EuriborPtr *) x));
}
static void *_p_Bkbm4MPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *)(IborIndexPtr *)(BkbmPtr *) ((Bkbm4MPtr *) x));
}
static void *_p_NZDLiborPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *)(IborIndexPtr *) ((NZDLiborPtr *) x));
}
static void *_p_SEKLiborPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *)(IborIndexPtr *) ((SEKLiborPtr *) x));
}
static void *_p_TiborPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *)(IborIndexPtr *) ((TiborPtr *) x));
}
static void *_p_TRLiborPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *)(IborIndexPtr *) ((TRLiborPtr *) x));
}
static void *_p_USDLiborPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *)(IborIndexPtr *) ((USDLiborPtr *) x));
}
static void *_p_ZiborPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *)(IborIndexPtr *) ((ZiborPtr *) x));
}
static void *_p_Bbsw6MPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *)(IborIndexPtr *)(BbswPtr *) ((Bbsw6MPtr *) x));
}
static void *_p_EURLibor8MPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *)(IborIndexPtr *)(EURLiborPtr *) ((EURLibor8MPtr *) x));
}
static void *_p_Euribor8MPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *)(IborIndexPtr *)(EuriborPtr *) ((Euribor8MPtr *) x));
}
static void *_p_Euribor365_3WPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *)(IborIndexPtr *)(Euribor365Ptr *) ((Euribor365_3WPtr *) x));
}
static void *_p_BbswPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *)(IborIndexPtr *) ((BbswPtr *) x));
}
static void *_p_BkbmPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *)(IborIndexPtr *) ((BkbmPtr *) x));
}
static void *_p_Euribor365_2MPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *)(IborIndexPtr *)(Euribor365Ptr *) ((Euribor365_2MPtr *) x));
}
static void *_p_Bkbm5MPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *)(IborIndexPtr *)(BkbmPtr *) ((Bkbm5MPtr *) x));
}
static void *_p_EURLibor10MPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *)(IborIndexPtr *)(EURLiborPtr *) ((EURLibor10MPtr *) x));
}
static void *_p_Euribor10MPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *)(IborIndexPtr *)(EuriborPtr *) ((Euribor10MPtr *) x));
}
static void *_p_EURLibor9MPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *)(IborIndexPtr *)(EURLiborPtr *) ((EURLibor9MPtr *) x));
}
static void *_p_Euribor9MPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *)(IborIndexPtr *)(EuriborPtr *) ((Euribor9MPtr *) x));
}
static void *_p_EURLibor2WPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *)(IborIndexPtr *)(EURLiborPtr *) ((EURLibor2WPtr *) x));
}
static void *_p_Euribor2WPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *)(IborIndexPtr *)(EuriborPtr *) ((Euribor2WPtr *) x));
}
static void *_p_Euribor365_3MPtrTo_p_boost__shared_ptrT_Index_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Index > *) (InterestRateIndexPtr *)(IborIndexPtr *)(Euribor365Ptr *) ((Euribor365_3MPtr *) x));
}
static void *_p_FixedRateBondForwardPtrTo_p_ForwardPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((ForwardPtr *)  ((FixedRateBondForwardPtr *) x));
}
static void *_p_CustomRegionTo_p_Region(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Region *)  ((CustomRegion *) x));
}
static void *_p_DividendTo_p_CashFlow(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((CashFlow *)  ((Dividend *) x));
}
static void *_p_Bbsw1MPtrTo_p_BbswPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((BbswPtr *)  ((Bbsw1MPtr *) x));
}
static void *_p_Bbsw3MPtrTo_p_BbswPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((BbswPtr *)  ((Bbsw3MPtr *) x));
}
static void *_p_Bbsw5MPtrTo_p_BbswPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((BbswPtr *)  ((Bbsw5MPtr *) x));
}
static void *_p_Bbsw2MPtrTo_p_BbswPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((BbswPtr *)  ((Bbsw2MPtr *) x));
}
static void *_p_Bbsw4MPtrTo_p_BbswPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((BbswPtr *)  ((Bbsw4MPtr *) x));
}
static void *_p_Bbsw6MPtrTo_p_BbswPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((BbswPtr *)  ((Bbsw6MPtr *) x));
}
static void *_p_Bkbm4MPtrTo_p_BkbmPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((BkbmPtr *)  ((Bkbm4MPtr *) x));
}
static void *_p_Bkbm6MPtrTo_p_BkbmPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((BkbmPtr *)  ((Bkbm6MPtr *) x));
}
static void *_p_Bkbm1MPtrTo_p_BkbmPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((BkbmPtr *)  ((Bkbm1MPtr *) x));
}
static void *_p_Bkbm3MPtrTo_p_BkbmPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((BkbmPtr *)  ((Bkbm3MPtr *) x));
}
static void *_p_Bkbm5MPtrTo_p_BkbmPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((BkbmPtr *)  ((Bkbm5MPtr *) x));
}
static void *_p_Bkbm2MPtrTo_p_BkbmPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((BkbmPtr *)  ((Bkbm2MPtr *) x));
}
static void *_p_RelinkableHandleT_OptionletVolatilityStructure_tTo_p_HandleT_OptionletVolatilityStructure_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Handle< OptionletVolatilityStructure > *)  ((RelinkableHandle< OptionletVolatilityStructure > *) x));
}
static void *_p_RelinkableHandleT_SwaptionVolatilityStructure_tTo_p_HandleT_SwaptionVolatilityStructure_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Handle< SwaptionVolatilityStructure > *)  ((RelinkableHandle< SwaptionVolatilityStructure > *) x));
}
static void *_p_RelinkableHandleT_BlackVolTermStructure_tTo_p_HandleT_BlackVolTermStructure_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Handle< BlackVolTermStructure > *)  ((RelinkableHandle< BlackVolTermStructure > *) x));
}
static void *_p_ConstantSwaptionVolatilityPtrTo_p_boost__shared_ptrT_SwaptionVolatilityStructure_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< SwaptionVolatilityStructure > *)  ((ConstantSwaptionVolatilityPtr *) x));
}
static void *_p_SwaptionVolCube1PtrTo_p_boost__shared_ptrT_SwaptionVolatilityStructure_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< SwaptionVolatilityStructure > *)  ((SwaptionVolCube1Ptr *) x));
}
static void *_p_SwaptionVolatilityMatrixPtrTo_p_boost__shared_ptrT_SwaptionVolatilityStructure_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< SwaptionVolatilityStructure > *)  ((SwaptionVolatilityMatrixPtr *) x));
}
static void *_p_SwaptionVolCube2PtrTo_p_boost__shared_ptrT_SwaptionVolatilityStructure_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< SwaptionVolatilityStructure > *)  ((SwaptionVolCube2Ptr *) x));
}
static void *_p_LocalConstantVolPtrTo_p_boost__shared_ptrT_LocalVolTermStructure_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< LocalVolTermStructure > *)  ((LocalConstantVolPtr *) x));
}
static void *_p_LocalVolSurfacePtrTo_p_boost__shared_ptrT_LocalVolTermStructure_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< LocalVolTermStructure > *)  ((LocalVolSurfacePtr *) x));
}
static void *_p_BlackVarianceCurvePtrTo_p_boost__shared_ptrT_BlackVolTermStructure_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< BlackVolTermStructure > *)  ((BlackVarianceCurvePtr *) x));
}
static void *_p_BlackConstantVolPtrTo_p_boost__shared_ptrT_BlackVolTermStructure_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< BlackVolTermStructure > *)  ((BlackConstantVolPtr *) x));
}
static void *_p_BlackVarianceSurfacePtrTo_p_boost__shared_ptrT_BlackVolTermStructure_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< BlackVolTermStructure > *)  ((BlackVarianceSurfacePtr *) x));
}
static void *_p_RelinkableHandleT_CapFloorTermVolatilityStructure_tTo_p_HandleT_CapFloorTermVolatilityStructure_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Handle< CapFloorTermVolatilityStructure > *)  ((RelinkableHandle< CapFloorTermVolatilityStructure > *) x));
}
static void *_p_RelinkableHandleT_DefaultProbabilityTermStructure_tTo_p_HandleT_DefaultProbabilityTermStructure_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Handle< DefaultProbabilityTermStructure > *)  ((RelinkableHandle< DefaultProbabilityTermStructure > *) x));
}
static void *_p_RelinkableHandleT_LocalVolTermStructure_tTo_p_HandleT_LocalVolTermStructure_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Handle< LocalVolTermStructure > *)  ((RelinkableHandle< LocalVolTermStructure > *) x));
}
static void *_p_RelinkableHandleT_YieldTermStructure_tTo_p_HandleT_YieldTermStructure_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Handle< YieldTermStructure > *)  ((RelinkableHandle< YieldTermStructure > *) x));
}
static void *_p_PiecewiseLinearForwardPtrTo_p_boost__shared_ptrT_YieldTermStructure_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< YieldTermStructure > *)  ((PiecewiseLinearForwardPtr *) x));
}
static void *_p_PiecewiseFlatForwardPtrTo_p_boost__shared_ptrT_YieldTermStructure_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< YieldTermStructure > *)  ((PiecewiseFlatForwardPtr *) x));
}
static void *_p_FlatForwardPtrTo_p_boost__shared_ptrT_YieldTermStructure_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< YieldTermStructure > *)  ((FlatForwardPtr *) x));
}
static void *_p_PiecewiseLogCubicDiscountPtrTo_p_boost__shared_ptrT_YieldTermStructure_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< YieldTermStructure > *)  ((PiecewiseLogCubicDiscountPtr *) x));
}
static void *_p_PiecewiseCubicZeroPtrTo_p_boost__shared_ptrT_YieldTermStructure_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< YieldTermStructure > *)  ((PiecewiseCubicZeroPtr *) x));
}
static void *_p_PiecewiseLinearZeroPtrTo_p_boost__shared_ptrT_YieldTermStructure_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< YieldTermStructure > *)  ((PiecewiseLinearZeroPtr *) x));
}
static void *_p_ZeroCurvePtrTo_p_boost__shared_ptrT_YieldTermStructure_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< YieldTermStructure > *)  ((ZeroCurvePtr *) x));
}
static void *_p_ForwardCurvePtrTo_p_boost__shared_ptrT_YieldTermStructure_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< YieldTermStructure > *)  ((ForwardCurvePtr *) x));
}
static void *_p_FittedBondDiscountCurvePtrTo_p_boost__shared_ptrT_YieldTermStructure_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< YieldTermStructure > *)  ((FittedBondDiscountCurvePtr *) x));
}
static void *_p_DiscountCurvePtrTo_p_boost__shared_ptrT_YieldTermStructure_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< YieldTermStructure > *)  ((DiscountCurvePtr *) x));
}
static void *_p_LogLinearZeroCurvePtrTo_p_boost__shared_ptrT_YieldTermStructure_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< YieldTermStructure > *)  ((LogLinearZeroCurvePtr *) x));
}
static void *_p_CubicZeroCurvePtrTo_p_boost__shared_ptrT_YieldTermStructure_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< YieldTermStructure > *)  ((CubicZeroCurvePtr *) x));
}
static void *_p_LogCubicZeroCurvePtrTo_p_boost__shared_ptrT_YieldTermStructure_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< YieldTermStructure > *)  ((LogCubicZeroCurvePtr *) x));
}
static void *_p_ForwardFlatZeroCurvePtrTo_p_boost__shared_ptrT_YieldTermStructure_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< YieldTermStructure > *)  ((ForwardFlatZeroCurvePtr *) x));
}
static void *_p_BackwardFlatZeroCurvePtrTo_p_boost__shared_ptrT_YieldTermStructure_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< YieldTermStructure > *)  ((BackwardFlatZeroCurvePtr *) x));
}
static void *_p_MonotonicCubicZeroCurvePtrTo_p_boost__shared_ptrT_YieldTermStructure_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< YieldTermStructure > *)  ((MonotonicCubicZeroCurvePtr *) x));
}
static void *_p_SpreadedLinearZeroInterpolatedTermStructurePtrTo_p_boost__shared_ptrT_YieldTermStructure_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< YieldTermStructure > *)  ((SpreadedLinearZeroInterpolatedTermStructurePtr *) x));
}
static void *_p_ForwardSpreadedTermStructurePtrTo_p_boost__shared_ptrT_YieldTermStructure_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< YieldTermStructure > *)  ((ForwardSpreadedTermStructurePtr *) x));
}
static void *_p_ZeroSpreadedTermStructurePtrTo_p_boost__shared_ptrT_YieldTermStructure_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< YieldTermStructure > *)  ((ZeroSpreadedTermStructurePtr *) x));
}
static void *_p_ImpliedTermStructurePtrTo_p_boost__shared_ptrT_YieldTermStructure_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< YieldTermStructure > *)  ((ImpliedTermStructurePtr *) x));
}
static void *_p_RelinkableHandleT_YoYInflationTermStructure_tTo_p_HandleT_YoYInflationTermStructure_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Handle< YoYInflationTermStructure > *)  ((RelinkableHandle< YoYInflationTermStructure > *) x));
}
static void *_p_RelinkableHandleT_ZeroInflationTermStructure_tTo_p_HandleT_ZeroInflationTermStructure_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Handle< ZeroInflationTermStructure > *)  ((RelinkableHandle< ZeroInflationTermStructure > *) x));
}
static void *_p_PiecewiseZeroInflationPtrTo_p_boost__shared_ptrT_ZeroInflationTermStructure_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< ZeroInflationTermStructure > *)  ((PiecewiseZeroInflationPtr *) x));
}
static void *_p_PiecewiseYoYInflationPtrTo_p_boost__shared_ptrT_YoYInflationTermStructure_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< YoYInflationTermStructure > *)  ((PiecewiseYoYInflationPtr *) x));
}
static void *_p_RelinkableHandleT_Quote_tTo_p_HandleT_Quote_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Handle< Quote > *)  ((RelinkableHandle< Quote > *) x));
}
static void *_p_SimpleQuotePtrTo_p_boost__shared_ptrT_Quote_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Quote > *)  ((SimpleQuotePtr *) x));
}
static void *_p_RelinkableHandleT_DeltaVolQuote_tTo_p_HandleT_DeltaVolQuote_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Handle< DeltaVolQuote > *)  ((RelinkableHandle< DeltaVolQuote > *) x));
}
static void *_p_QuantLib__Thirty360To_p_DayCounter(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((DayCounter *)  ((QuantLib::Thirty360 *) x));
}
static void *_p_QuantLib__OneDayCounterTo_p_DayCounter(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((DayCounter *)  ((QuantLib::OneDayCounter *) x));
}
static void *_p_QuantLib__SimpleDayCounterTo_p_DayCounter(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((DayCounter *)  ((QuantLib::SimpleDayCounter *) x));
}
static void *_p_QuantLib__Actual360To_p_DayCounter(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((DayCounter *)  ((QuantLib::Actual360 *) x));
}
static void *_p_QuantLib__Actual365FixedTo_p_DayCounter(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((DayCounter *)  ((QuantLib::Actual365Fixed *) x));
}
static void *_p_QuantLib__Business252To_p_DayCounter(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((DayCounter *)  ((QuantLib::Business252 *) x));
}
static void *_p_QuantLib__ActualActualTo_p_DayCounter(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((DayCounter *)  ((QuantLib::ActualActual *) x));
}
static void *_p_YoYInflationTermStructureTo_p_InflationTermStructure(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InflationTermStructure *)  ((YoYInflationTermStructure *) x));
}
static void *_p_ZeroInflationTermStructureTo_p_InflationTermStructure(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((InflationTermStructure *)  ((ZeroInflationTermStructure *) x));
}
static void *_p_StochasticProcessArrayPtrTo_p_boost__shared_ptrT_StochasticProcess_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< StochasticProcess > *)  ((StochasticProcessArrayPtr *) x));
}
static void *_p_StochasticProcess1DPtrTo_p_boost__shared_ptrT_StochasticProcess_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< StochasticProcess > *)  ((StochasticProcess1DPtr *) x));
}
static void *_p_HullWhiteForwardProcessPtrTo_p_boost__shared_ptrT_StochasticProcess_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< StochasticProcess > *) (StochasticProcess1DPtr *) ((HullWhiteForwardProcessPtr *) x));
}
static void *_p_HullWhiteProcessPtrTo_p_boost__shared_ptrT_StochasticProcess_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< StochasticProcess > *) (StochasticProcess1DPtr *) ((HullWhiteProcessPtr *) x));
}
static void *_p_BatesProcessPtrTo_p_boost__shared_ptrT_StochasticProcess_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< StochasticProcess > *) (HestonProcessPtr *) ((BatesProcessPtr *) x));
}
static void *_p_HestonProcessPtrTo_p_boost__shared_ptrT_StochasticProcess_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< StochasticProcess > *)  ((HestonProcessPtr *) x));
}
static void *_p_VarianceGammaProcessPtrTo_p_boost__shared_ptrT_StochasticProcess_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< StochasticProcess > *) (StochasticProcess1DPtr *) ((VarianceGammaProcessPtr *) x));
}
static void *_p_GeometricBrownianMotionProcessPtrTo_p_boost__shared_ptrT_StochasticProcess_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< StochasticProcess > *) (StochasticProcess1DPtr *) ((GeometricBrownianMotionProcessPtr *) x));
}
static void *_p_Merton76ProcessPtrTo_p_boost__shared_ptrT_StochasticProcess_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< StochasticProcess > *) (StochasticProcess1DPtr *) ((Merton76ProcessPtr *) x));
}
static void *_p_GarmanKohlagenProcessPtrTo_p_boost__shared_ptrT_StochasticProcess_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< StochasticProcess > *) (StochasticProcess1DPtr *)(GeneralizedBlackScholesProcessPtr *) ((GarmanKohlagenProcessPtr *) x));
}
static void *_p_BlackProcessPtrTo_p_boost__shared_ptrT_StochasticProcess_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< StochasticProcess > *) (StochasticProcess1DPtr *)(GeneralizedBlackScholesProcessPtr *) ((BlackProcessPtr *) x));
}
static void *_p_BlackScholesMertonProcessPtrTo_p_boost__shared_ptrT_StochasticProcess_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< StochasticProcess > *) (StochasticProcess1DPtr *)(GeneralizedBlackScholesProcessPtr *) ((BlackScholesMertonProcessPtr *) x));
}
static void *_p_BlackScholesProcessPtrTo_p_boost__shared_ptrT_StochasticProcess_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< StochasticProcess > *) (StochasticProcess1DPtr *)(GeneralizedBlackScholesProcessPtr *) ((BlackScholesProcessPtr *) x));
}
static void *_p_GeneralizedBlackScholesProcessPtrTo_p_boost__shared_ptrT_StochasticProcess_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< StochasticProcess > *) (StochasticProcess1DPtr *) ((GeneralizedBlackScholesProcessPtr *) x));
}
static void *_p_GsrProcessPtrTo_p_boost__shared_ptrT_StochasticProcess_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< StochasticProcess > *) (StochasticProcess1DPtr *) ((GsrProcessPtr *) x));
}
static void *_p_VanillaSwapPtrTo_p_SwapPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((SwapPtr *)  ((VanillaSwapPtr *) x));
}
static void *_p_NonstandardSwapPtrTo_p_SwapPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((SwapPtr *)  ((NonstandardSwapPtr *) x));
}
static void *_p_AssetSwapPtrTo_p_SwapPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((SwapPtr *)  ((AssetSwapPtr *) x));
}
static void *_p_FloatFloatSwapPtrTo_p_SwapPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((SwapPtr *)  ((FloatFloatSwapPtr *) x));
}
static void *_p_SoftCallabilityPtrTo_p_boost__shared_ptrT_Callability_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Callability > *)  ((SoftCallabilityPtr *) x));
}
static void *_p_MultiplicativePriceSeasonalityPtrTo_p_boost__shared_ptrT_Seasonality_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Seasonality > *)  ((MultiplicativePriceSeasonalityPtr *) x));
}
static void *_p_HimalayaOptionPtrTo_p_boost__shared_ptrT_Instrument_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Instrument > *) (MultiAssetOptionPtr *) ((HimalayaOptionPtr *) x));
}
static void *_p_EverestOptionPtrTo_p_boost__shared_ptrT_Instrument_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Instrument > *) (MultiAssetOptionPtr *) ((EverestOptionPtr *) x));
}
static void *_p_BasketOptionPtrTo_p_boost__shared_ptrT_Instrument_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Instrument > *) (MultiAssetOptionPtr *) ((BasketOptionPtr *) x));
}
static void *_p_VanillaOptionPtrTo_p_boost__shared_ptrT_Instrument_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Instrument > *)  ((VanillaOptionPtr *) x));
}
static void *_p_EuropeanOptionPtrTo_p_boost__shared_ptrT_Instrument_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Instrument > *) (VanillaOptionPtr *) ((EuropeanOptionPtr *) x));
}
static void *_p_ForwardVanillaOptionPtrTo_p_boost__shared_ptrT_Instrument_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Instrument > *) (VanillaOptionPtr *) ((ForwardVanillaOptionPtr *) x));
}
static void *_p_QuantoVanillaOptionPtrTo_p_boost__shared_ptrT_Instrument_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Instrument > *) (VanillaOptionPtr *) ((QuantoVanillaOptionPtr *) x));
}
static void *_p_QuantoForwardVanillaOptionPtrTo_p_boost__shared_ptrT_Instrument_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Instrument > *) (VanillaOptionPtr *)(QuantoVanillaOptionPtr *) ((QuantoForwardVanillaOptionPtr *) x));
}
static void *_p_MultiAssetOptionPtrTo_p_boost__shared_ptrT_Instrument_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Instrument > *)  ((MultiAssetOptionPtr *) x));
}
static void *_p_DividendVanillaOptionPtrTo_p_boost__shared_ptrT_Instrument_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Instrument > *)  ((DividendVanillaOptionPtr *) x));
}
static void *_p_BarrierOptionPtrTo_p_boost__shared_ptrT_Instrument_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Instrument > *)  ((BarrierOptionPtr *) x));
}
static void *_p_ContinuousAveragingAsianOptionPtrTo_p_boost__shared_ptrT_Instrument_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Instrument > *)  ((ContinuousAveragingAsianOptionPtr *) x));
}
static void *_p_DiscreteAveragingAsianOptionPtrTo_p_boost__shared_ptrT_Instrument_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Instrument > *)  ((DiscreteAveragingAsianOptionPtr *) x));
}
static void *_p_DoubleBarrierOptionPtrTo_p_boost__shared_ptrT_Instrument_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Instrument > *)  ((DoubleBarrierOptionPtr *) x));
}
static void *_p_QuantoDoubleBarrierOptionPtrTo_p_boost__shared_ptrT_Instrument_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Instrument > *) (DoubleBarrierOptionPtr *) ((QuantoDoubleBarrierOptionPtr *) x));
}
static void *_p_SwaptionPtrTo_p_boost__shared_ptrT_Instrument_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Instrument > *)  ((SwaptionPtr *) x));
}
static void *_p_NonstandardSwaptionPtrTo_p_boost__shared_ptrT_Instrument_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Instrument > *)  ((NonstandardSwaptionPtr *) x));
}
static void *_p_FloatFloatSwaptionPtrTo_p_boost__shared_ptrT_Instrument_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Instrument > *)  ((FloatFloatSwaptionPtr *) x));
}
static void *_p_YearOnYearInflationSwapPtrTo_p_boost__shared_ptrT_Instrument_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Instrument > *)  ((YearOnYearInflationSwapPtr *) x));
}
static void *_p_ZeroCouponInflationSwapPtrTo_p_boost__shared_ptrT_Instrument_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Instrument > *)  ((ZeroCouponInflationSwapPtr *) x));
}
static void *_p_CreditDefaultSwapPtrTo_p_boost__shared_ptrT_Instrument_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Instrument > *)  ((CreditDefaultSwapPtr *) x));
}
static void *_p_SwapPtrTo_p_boost__shared_ptrT_Instrument_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Instrument > *)  ((SwapPtr *) x));
}
static void *_p_VanillaSwapPtrTo_p_boost__shared_ptrT_Instrument_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Instrument > *) (SwapPtr *) ((VanillaSwapPtr *) x));
}
static void *_p_NonstandardSwapPtrTo_p_boost__shared_ptrT_Instrument_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Instrument > *) (SwapPtr *) ((NonstandardSwapPtr *) x));
}
static void *_p_AssetSwapPtrTo_p_boost__shared_ptrT_Instrument_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Instrument > *) (SwapPtr *) ((AssetSwapPtr *) x));
}
static void *_p_FloatFloatSwapPtrTo_p_boost__shared_ptrT_Instrument_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Instrument > *) (SwapPtr *) ((FloatFloatSwapPtr *) x));
}
static void *_p_CPIBondPtrTo_p_boost__shared_ptrT_Instrument_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Instrument > *) (BondPtr *) ((CPIBondPtr *) x));
}
static void *_p_CallableFixedRateBondPtrTo_p_boost__shared_ptrT_Instrument_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Instrument > *) (BondPtr *) ((CallableFixedRateBondPtr *) x));
}
static void *_p_CmsRateBondPtrTo_p_boost__shared_ptrT_Instrument_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Instrument > *) (BondPtr *) ((CmsRateBondPtr *) x));
}
static void *_p_FloatingRateBondPtrTo_p_boost__shared_ptrT_Instrument_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Instrument > *) (BondPtr *) ((FloatingRateBondPtr *) x));
}
static void *_p_FixedRateBondPtrTo_p_boost__shared_ptrT_Instrument_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Instrument > *) (BondPtr *) ((FixedRateBondPtr *) x));
}
static void *_p_ZeroCouponBondPtrTo_p_boost__shared_ptrT_Instrument_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Instrument > *) (BondPtr *) ((ZeroCouponBondPtr *) x));
}
static void *_p_BondPtrTo_p_boost__shared_ptrT_Instrument_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Instrument > *)  ((BondPtr *) x));
}
static void *_p_ConvertibleZeroCouponBondPtrTo_p_boost__shared_ptrT_Instrument_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Instrument > *) (BondPtr *) ((ConvertibleZeroCouponBondPtr *) x));
}
static void *_p_ConvertibleFixedCouponBondPtrTo_p_boost__shared_ptrT_Instrument_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Instrument > *) (BondPtr *) ((ConvertibleFixedCouponBondPtr *) x));
}
static void *_p_ConvertibleFloatingRateBondPtrTo_p_boost__shared_ptrT_Instrument_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Instrument > *) (BondPtr *) ((ConvertibleFloatingRateBondPtr *) x));
}
static void *_p_CapPtrTo_p_boost__shared_ptrT_Instrument_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Instrument > *) (CapFloorPtr *) ((CapPtr *) x));
}
static void *_p_YoYInflationCapPtrTo_p_boost__shared_ptrT_Instrument_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Instrument > *) (YoYInflationCapFloorPtr *) ((YoYInflationCapPtr *) x));
}
static void *_p_CompositeInstrumentPtrTo_p_boost__shared_ptrT_Instrument_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Instrument > *)  ((CompositeInstrumentPtr *) x));
}
static void *_p_ForwardRateAgreementPtrTo_p_boost__shared_ptrT_Instrument_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Instrument > *)  ((ForwardRateAgreementPtr *) x));
}
static void *_p_CollarPtrTo_p_boost__shared_ptrT_Instrument_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Instrument > *) (CapFloorPtr *) ((CollarPtr *) x));
}
static void *_p_YoYInflationCollarPtrTo_p_boost__shared_ptrT_Instrument_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Instrument > *) (YoYInflationCapFloorPtr *) ((YoYInflationCollarPtr *) x));
}
static void *_p_StockPtrTo_p_boost__shared_ptrT_Instrument_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Instrument > *)  ((StockPtr *) x));
}
static void *_p_FloorPtrTo_p_boost__shared_ptrT_Instrument_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Instrument > *) (CapFloorPtr *) ((FloorPtr *) x));
}
static void *_p_CapFloorPtrTo_p_boost__shared_ptrT_Instrument_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Instrument > *)  ((CapFloorPtr *) x));
}
static void *_p_YoYInflationFloorPtrTo_p_boost__shared_ptrT_Instrument_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Instrument > *) (YoYInflationCapFloorPtr *) ((YoYInflationFloorPtr *) x));
}
static void *_p_YoYInflationCapFloorPtrTo_p_boost__shared_ptrT_Instrument_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Instrument > *)  ((YoYInflationCapFloorPtr *) x));
}
static void *_p_ForwardPtrTo_p_boost__shared_ptrT_Instrument_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Instrument > *)  ((ForwardPtr *) x));
}
static void *_p_FixedRateBondForwardPtrTo_p_boost__shared_ptrT_Instrument_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< Instrument > *) (ForwardPtr *) ((FixedRateBondForwardPtr *) x));
}
static void *_p_RiskStatisticsTo_p_Statistics(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Statistics *)  ((RiskStatistics *) x));
}
static void *_p_YoYInflationFloorPtrTo_p_YoYInflationCapFloorPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((YoYInflationCapFloorPtr *)  ((YoYInflationFloorPtr *) x));
}
static void *_p_YoYInflationCapPtrTo_p_YoYInflationCapFloorPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((YoYInflationCapFloorPtr *)  ((YoYInflationCapPtr *) x));
}
static void *_p_YoYInflationCollarPtrTo_p_YoYInflationCapFloorPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((YoYInflationCapFloorPtr *)  ((YoYInflationCollarPtr *) x));
}
static void *_p_FloorPtrTo_p_CapFloorPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((CapFloorPtr *)  ((FloorPtr *) x));
}
static void *_p_CapPtrTo_p_CapFloorPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((CapFloorPtr *)  ((CapPtr *) x));
}
static void *_p_CollarPtrTo_p_CapFloorPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((CapFloorPtr *)  ((CollarPtr *) x));
}
static void *_p_ConstantParameterTo_p_Parameter(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Parameter *)  ((ConstantParameter *) x));
}
static void *_p_NullParameterTo_p_Parameter(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Parameter *)  ((NullParameter *) x));
}
static void *_p_PiecewiseConstantParameterTo_p_Parameter(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Parameter *)  ((PiecewiseConstantParameter *) x));
}
static void *_p_ExponentialSplinesFittingTo_p_FittingMethod(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((FittingMethod *)  ((ExponentialSplinesFitting *) x));
}
static void *_p_NelsonSiegelFittingTo_p_FittingMethod(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((FittingMethod *)  ((NelsonSiegelFitting *) x));
}
static void *_p_SvenssonFittingTo_p_FittingMethod(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((FittingMethod *)  ((SvenssonFitting *) x));
}
static void *_p_CubicBSplinesFittingTo_p_FittingMethod(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((FittingMethod *)  ((CubicBSplinesFitting *) x));
}
static void *_p_SimplePolynomialFittingTo_p_FittingMethod(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((FittingMethod *)  ((SimplePolynomialFitting *) x));
}
static void *_p_DPlusDMinusTo_p_TridiagonalOperator(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((TridiagonalOperator *)  ((DPlusDMinus *) x));
}
static void *_p_DPlusTo_p_TridiagonalOperator(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((TridiagonalOperator *)  ((DPlus *) x));
}
static void *_p_DZeroTo_p_TridiagonalOperator(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((TridiagonalOperator *)  ((DZero *) x));
}
static void *_p_DMinusTo_p_TridiagonalOperator(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((TridiagonalOperator *)  ((DMinus *) x));
}
static void *_p_BatesProcessPtrTo_p_HestonProcessPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((HestonProcessPtr *)  ((BatesProcessPtr *) x));
}
static void *_p_BlackScholesProcessPtrTo_p_GeneralizedBlackScholesProcessPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((GeneralizedBlackScholesProcessPtr *)  ((BlackScholesProcessPtr *) x));
}
static void *_p_BlackScholesMertonProcessPtrTo_p_GeneralizedBlackScholesProcessPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((GeneralizedBlackScholesProcessPtr *)  ((BlackScholesMertonProcessPtr *) x));
}
static void *_p_BlackProcessPtrTo_p_GeneralizedBlackScholesProcessPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((GeneralizedBlackScholesProcessPtr *)  ((BlackProcessPtr *) x));
}
static void *_p_GarmanKohlagenProcessPtrTo_p_GeneralizedBlackScholesProcessPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((GeneralizedBlackScholesProcessPtr *)  ((GarmanKohlagenProcessPtr *) x));
}
static void *_p_CeilingTruncationTo_p_Rounding(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Rounding *)  ((CeilingTruncation *) x));
}
static void *_p_FloorTruncationTo_p_Rounding(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Rounding *)  ((FloorTruncation *) x));
}
static void *_p_UpRoundingTo_p_Rounding(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Rounding *)  ((UpRounding *) x));
}
static void *_p_DownRoundingTo_p_Rounding(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Rounding *)  ((DownRounding *) x));
}
static void *_p_ClosestRoundingTo_p_Rounding(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Rounding *)  ((ClosestRounding *) x));
}
static void *_p_LevenbergMarquardtTo_p_OptimizationMethod(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((OptimizationMethod *)  ((LevenbergMarquardt *) x));
}
static void *_p_DifferentialEvolutionTo_p_OptimizationMethod(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((OptimizationMethod *)  ((DifferentialEvolution *) x));
}
static void *_p_GaussianSimulatedAnnealingTo_p_OptimizationMethod(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((OptimizationMethod *)  ((GaussianSimulatedAnnealing *) x));
}
static void *_p_MirrorGaussianSimulatedAnnealingTo_p_OptimizationMethod(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((OptimizationMethod *)  ((MirrorGaussianSimulatedAnnealing *) x));
}
static void *_p_LogNormalSimulatedAnnealingTo_p_OptimizationMethod(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((OptimizationMethod *)  ((LogNormalSimulatedAnnealing *) x));
}
static void *_p_SimplexTo_p_OptimizationMethod(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((OptimizationMethod *)  ((Simplex *) x));
}
static void *_p_SteepestDescentTo_p_OptimizationMethod(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((OptimizationMethod *)  ((SteepestDescent *) x));
}
static void *_p_ConjugateGradientTo_p_OptimizationMethod(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((OptimizationMethod *)  ((ConjugateGradient *) x));
}
static void *_p_BFGSTo_p_OptimizationMethod(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((OptimizationMethod *)  ((BFGS *) x));
}
static void *_p_EURLibor2WPtrTo_p_EURLiborPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((EURLiborPtr *)  ((EURLibor2WPtr *) x));
}
static void *_p_EURLiborSWPtrTo_p_EURLiborPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((EURLiborPtr *)  ((EURLiborSWPtr *) x));
}
static void *_p_EURLibor1YPtrTo_p_EURLiborPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((EURLiborPtr *)  ((EURLibor1YPtr *) x));
}
static void *_p_EURLibor9MPtrTo_p_EURLiborPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((EURLiborPtr *)  ((EURLibor9MPtr *) x));
}
static void *_p_EURLibor8MPtrTo_p_EURLiborPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((EURLiborPtr *)  ((EURLibor8MPtr *) x));
}
static void *_p_EURLibor11MPtrTo_p_EURLiborPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((EURLiborPtr *)  ((EURLibor11MPtr *) x));
}
static void *_p_EURLibor7MPtrTo_p_EURLiborPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((EURLiborPtr *)  ((EURLibor7MPtr *) x));
}
static void *_p_EURLibor10MPtrTo_p_EURLiborPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((EURLiborPtr *)  ((EURLibor10MPtr *) x));
}
static void *_p_EURLibor6MPtrTo_p_EURLiborPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((EURLiborPtr *)  ((EURLibor6MPtr *) x));
}
static void *_p_EURLibor5MPtrTo_p_EURLiborPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((EURLiborPtr *)  ((EURLibor5MPtr *) x));
}
static void *_p_EURLibor4MPtrTo_p_EURLiborPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((EURLiborPtr *)  ((EURLibor4MPtr *) x));
}
static void *_p_EURLibor3MPtrTo_p_EURLiborPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((EURLiborPtr *)  ((EURLibor3MPtr *) x));
}
static void *_p_EURLibor2MPtrTo_p_EURLiborPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((EURLiborPtr *)  ((EURLibor2MPtr *) x));
}
static void *_p_EURLibor1MPtrTo_p_EURLiborPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((EURLiborPtr *)  ((EURLibor1MPtr *) x));
}
static void *_p_Euribor3WPtrTo_p_EuriborPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((EuriborPtr *)  ((Euribor3WPtr *) x));
}
static void *_p_Euribor2WPtrTo_p_EuriborPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((EuriborPtr *)  ((Euribor2WPtr *) x));
}
static void *_p_EuriborSWPtrTo_p_EuriborPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((EuriborPtr *)  ((EuriborSWPtr *) x));
}
static void *_p_Euribor1YPtrTo_p_EuriborPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((EuriborPtr *)  ((Euribor1YPtr *) x));
}
static void *_p_Euribor9MPtrTo_p_EuriborPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((EuriborPtr *)  ((Euribor9MPtr *) x));
}
static void *_p_Euribor8MPtrTo_p_EuriborPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((EuriborPtr *)  ((Euribor8MPtr *) x));
}
static void *_p_Euribor11MPtrTo_p_EuriborPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((EuriborPtr *)  ((Euribor11MPtr *) x));
}
static void *_p_Euribor7MPtrTo_p_EuriborPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((EuriborPtr *)  ((Euribor7MPtr *) x));
}
static void *_p_Euribor10MPtrTo_p_EuriborPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((EuriborPtr *)  ((Euribor10MPtr *) x));
}
static void *_p_Euribor6MPtrTo_p_EuriborPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((EuriborPtr *)  ((Euribor6MPtr *) x));
}
static void *_p_Euribor5MPtrTo_p_EuriborPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((EuriborPtr *)  ((Euribor5MPtr *) x));
}
static void *_p_Euribor4MPtrTo_p_EuriborPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((EuriborPtr *)  ((Euribor4MPtr *) x));
}
static void *_p_Euribor3MPtrTo_p_EuriborPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((EuriborPtr *)  ((Euribor3MPtr *) x));
}
static void *_p_Euribor2MPtrTo_p_EuriborPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((EuriborPtr *)  ((Euribor2MPtr *) x));
}
static void *_p_Euribor1MPtrTo_p_EuriborPtr(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((EuriborPtr *)  ((Euribor1MPtr *) x));
}
static void *_p_QuantLib__ITLCurrencyTo_p_Currency(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Currency *)  ((QuantLib::ITLCurrency *) x));
}
static void *_p_QuantLib__ISKCurrencyTo_p_Currency(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Currency *)  ((QuantLib::ISKCurrency *) x));
}
static void *_p_QuantLib__IRRCurrencyTo_p_Currency(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Currency *)  ((QuantLib::IRRCurrency *) x));
}
static void *_p_QuantLib__IQDCurrencyTo_p_Currency(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Currency *)  ((QuantLib::IQDCurrency *) x));
}
static void *_p_QuantLib__INRCurrencyTo_p_Currency(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Currency *)  ((QuantLib::INRCurrency *) x));
}
static void *_p_QuantLib__ILSCurrencyTo_p_Currency(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Currency *)  ((QuantLib::ILSCurrency *) x));
}
static void *_p_QuantLib__IDRCurrencyTo_p_Currency(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Currency *)  ((QuantLib::IDRCurrency *) x));
}
static void *_p_QuantLib__IEPCurrencyTo_p_Currency(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Currency *)  ((QuantLib::IEPCurrency *) x));
}
static void *_p_QuantLib__HUFCurrencyTo_p_Currency(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Currency *)  ((QuantLib::HUFCurrency *) x));
}
static void *_p_QuantLib__HKDCurrencyTo_p_Currency(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Currency *)  ((QuantLib::HKDCurrency *) x));
}
static void *_p_QuantLib__GRDCurrencyTo_p_Currency(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Currency *)  ((QuantLib::GRDCurrency *) x));
}
static void *_p_QuantLib__GBPCurrencyTo_p_Currency(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Currency *)  ((QuantLib::GBPCurrency *) x));
}
static void *_p_QuantLib__FRFCurrencyTo_p_Currency(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Currency *)  ((QuantLib::FRFCurrency *) x));
}
static void *_p_QuantLib__FIMCurrencyTo_p_Currency(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Currency *)  ((QuantLib::FIMCurrency *) x));
}
static void *_p_QuantLib__EURCurrencyTo_p_Currency(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Currency *)  ((QuantLib::EURCurrency *) x));
}
static void *_p_QuantLib__ESPCurrencyTo_p_Currency(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Currency *)  ((QuantLib::ESPCurrency *) x));
}
static void *_p_QuantLib__EEKCurrencyTo_p_Currency(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Currency *)  ((QuantLib::EEKCurrency *) x));
}
static void *_p_QuantLib__DKKCurrencyTo_p_Currency(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Currency *)  ((QuantLib::DKKCurrency *) x));
}
static void *_p_QuantLib__DEMCurrencyTo_p_Currency(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Currency *)  ((QuantLib::DEMCurrency *) x));
}
static void *_p_QuantLib__CZKCurrencyTo_p_Currency(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Currency *)  ((QuantLib::CZKCurrency *) x));
}
static void *_p_QuantLib__ARSCurrencyTo_p_Currency(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Currency *)  ((QuantLib::ARSCurrency *) x));
}
static void *_p_QuantLib__ATSCurrencyTo_p_Currency(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Currency *)  ((QuantLib::ATSCurrency *) x));
}
static void *_p_QuantLib__AUDCurrencyTo_p_Currency(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Currency *)  ((QuantLib::AUDCurrency *) x));
}
static void *_p_QuantLib__BDTCurrencyTo_p_Currency(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Currency *)  ((QuantLib::BDTCurrency *) x));
}
static void *_p_QuantLib__BEFCurrencyTo_p_Currency(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Currency *)  ((QuantLib::BEFCurrency *) x));
}
static void *_p_QuantLib__BGLCurrencyTo_p_Currency(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Currency *)  ((QuantLib::BGLCurrency *) x));
}
static void *_p_QuantLib__BRLCurrencyTo_p_Currency(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Currency *)  ((QuantLib::BRLCurrency *) x));
}
static void *_p_QuantLib__BYRCurrencyTo_p_Currency(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Currency *)  ((QuantLib::BYRCurrency *) x));
}
static void *_p_QuantLib__CADCurrencyTo_p_Currency(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Currency *)  ((QuantLib::CADCurrency *) x));
}
static void *_p_QuantLib__CHFCurrencyTo_p_Currency(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Currency *)  ((QuantLib::CHFCurrency *) x));
}
static void *_p_QuantLib__CLPCurrencyTo_p_Currency(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Currency *)  ((QuantLib::CLPCurrency *) x));
}
static void *_p_QuantLib__CNYCurrencyTo_p_Currency(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Currency *)  ((QuantLib::CNYCurrency *) x));
}
static void *_p_QuantLib__COPCurrencyTo_p_Currency(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Currency *)  ((QuantLib::COPCurrency *) x));
}
static void *_p_QuantLib__CYPCurrencyTo_p_Currency(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Currency *)  ((QuantLib::CYPCurrency *) x));
}
static void *_p_QuantLib__JPYCurrencyTo_p_Currency(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Currency *)  ((QuantLib::JPYCurrency *) x));
}
static void *_p_QuantLib__KRWCurrencyTo_p_Currency(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Currency *)  ((QuantLib::KRWCurrency *) x));
}
static void *_p_QuantLib__KWDCurrencyTo_p_Currency(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Currency *)  ((QuantLib::KWDCurrency *) x));
}
static void *_p_QuantLib__LTLCurrencyTo_p_Currency(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Currency *)  ((QuantLib::LTLCurrency *) x));
}
static void *_p_QuantLib__LUFCurrencyTo_p_Currency(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Currency *)  ((QuantLib::LUFCurrency *) x));
}
static void *_p_QuantLib__LVLCurrencyTo_p_Currency(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Currency *)  ((QuantLib::LVLCurrency *) x));
}
static void *_p_QuantLib__MTLCurrencyTo_p_Currency(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Currency *)  ((QuantLib::MTLCurrency *) x));
}
static void *_p_QuantLib__MXNCurrencyTo_p_Currency(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Currency *)  ((QuantLib::MXNCurrency *) x));
}
static void *_p_QuantLib__MYRCurrencyTo_p_Currency(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Currency *)  ((QuantLib::MYRCurrency *) x));
}
static void *_p_QuantLib__NLGCurrencyTo_p_Currency(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Currency *)  ((QuantLib::NLGCurrency *) x));
}
static void *_p_QuantLib__NOKCurrencyTo_p_Currency(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Currency *)  ((QuantLib::NOKCurrency *) x));
}
static void *_p_QuantLib__NPRCurrencyTo_p_Currency(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Currency *)  ((QuantLib::NPRCurrency *) x));
}
static void *_p_QuantLib__NZDCurrencyTo_p_Currency(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Currency *)  ((QuantLib::NZDCurrency *) x));
}
static void *_p_QuantLib__PEHCurrencyTo_p_Currency(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Currency *)  ((QuantLib::PEHCurrency *) x));
}
static void *_p_QuantLib__PEICurrencyTo_p_Currency(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Currency *)  ((QuantLib::PEICurrency *) x));
}
static void *_p_QuantLib__PENCurrencyTo_p_Currency(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Currency *)  ((QuantLib::PENCurrency *) x));
}
static void *_p_QuantLib__PKRCurrencyTo_p_Currency(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Currency *)  ((QuantLib::PKRCurrency *) x));
}
static void *_p_QuantLib__PLNCurrencyTo_p_Currency(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Currency *)  ((QuantLib::PLNCurrency *) x));
}
static void *_p_QuantLib__PTECurrencyTo_p_Currency(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Currency *)  ((QuantLib::PTECurrency *) x));
}
static void *_p_QuantLib__ROLCurrencyTo_p_Currency(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Currency *)  ((QuantLib::ROLCurrency *) x));
}
static void *_p_QuantLib__RONCurrencyTo_p_Currency(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Currency *)  ((QuantLib::RONCurrency *) x));
}
static void *_p_QuantLib__RUBCurrencyTo_p_Currency(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Currency *)  ((QuantLib::RUBCurrency *) x));
}
static void *_p_QuantLib__SARCurrencyTo_p_Currency(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Currency *)  ((QuantLib::SARCurrency *) x));
}
static void *_p_QuantLib__SEKCurrencyTo_p_Currency(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Currency *)  ((QuantLib::SEKCurrency *) x));
}
static void *_p_QuantLib__SGDCurrencyTo_p_Currency(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Currency *)  ((QuantLib::SGDCurrency *) x));
}
static void *_p_QuantLib__SITCurrencyTo_p_Currency(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Currency *)  ((QuantLib::SITCurrency *) x));
}
static void *_p_QuantLib__SKKCurrencyTo_p_Currency(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Currency *)  ((QuantLib::SKKCurrency *) x));
}
static void *_p_QuantLib__THBCurrencyTo_p_Currency(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Currency *)  ((QuantLib::THBCurrency *) x));
}
static void *_p_QuantLib__TRLCurrencyTo_p_Currency(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Currency *)  ((QuantLib::TRLCurrency *) x));
}
static void *_p_QuantLib__TRYCurrencyTo_p_Currency(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Currency *)  ((QuantLib::TRYCurrency *) x));
}
static void *_p_QuantLib__TTDCurrencyTo_p_Currency(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Currency *)  ((QuantLib::TTDCurrency *) x));
}
static void *_p_QuantLib__TWDCurrencyTo_p_Currency(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Currency *)  ((QuantLib::TWDCurrency *) x));
}
static void *_p_QuantLib__USDCurrencyTo_p_Currency(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Currency *)  ((QuantLib::USDCurrency *) x));
}
static void *_p_QuantLib__VEBCurrencyTo_p_Currency(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Currency *)  ((QuantLib::VEBCurrency *) x));
}
static void *_p_QuantLib__VNDCurrencyTo_p_Currency(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Currency *)  ((QuantLib::VNDCurrency *) x));
}
static void *_p_QuantLib__ZARCurrencyTo_p_Currency(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Currency *)  ((QuantLib::ZARCurrency *) x));
}
static void *_p_MCDiscreteArithmeticAPEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< PricingEngine > *)  ((MCDiscreteArithmeticAPEnginePtr *) x));
}
static void *_p_QuantoForwardEuropeanEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< PricingEngine > *)  ((QuantoForwardEuropeanEnginePtr *) x));
}
static void *_p_QuantoEuropeanEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< PricingEngine > *)  ((QuantoEuropeanEnginePtr *) x));
}
static void *_p_ForwardEuropeanEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< PricingEngine > *)  ((ForwardEuropeanEnginePtr *) x));
}
static void *_p_BinomialBarrierEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< PricingEngine > *)  ((BinomialBarrierEnginePtr *) x));
}
static void *_p_AnalyticBinaryBarrierEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< PricingEngine > *)  ((AnalyticBinaryBarrierEnginePtr *) x));
}
static void *_p_FdBlackScholesBarrierEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< PricingEngine > *)  ((FdBlackScholesBarrierEnginePtr *) x));
}
static void *_p_MCBarrierEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< PricingEngine > *)  ((MCBarrierEnginePtr *) x));
}
static void *_p_AnalyticBarrierEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< PricingEngine > *)  ((AnalyticBarrierEnginePtr *) x));
}
static void *_p_FDDividendAmericanEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< PricingEngine > *)  ((FDDividendAmericanEnginePtr *) x));
}
static void *_p_FDDividendEuropeanEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< PricingEngine > *)  ((FDDividendEuropeanEnginePtr *) x));
}
static void *_p_AnalyticDividendEuropeanEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< PricingEngine > *)  ((AnalyticDividendEuropeanEnginePtr *) x));
}
static void *_p_AnalyticDigitalAmericanKOEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< PricingEngine > *)  ((AnalyticDigitalAmericanKOEnginePtr *) x));
}
static void *_p_AnalyticDigitalAmericanEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< PricingEngine > *)  ((AnalyticDigitalAmericanEnginePtr *) x));
}
static void *_p_BjerksundStenslandApproximationEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< PricingEngine > *)  ((BjerksundStenslandApproximationEnginePtr *) x));
}
static void *_p_BaroneAdesiWhaleyApproximationEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< PricingEngine > *)  ((BaroneAdesiWhaleyApproximationEnginePtr *) x));
}
static void *_p_FDShoutEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< PricingEngine > *)  ((FDShoutEnginePtr *) x));
}
static void *_p_AnalyticEuropeanEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< PricingEngine > *)  ((AnalyticEuropeanEnginePtr *) x));
}
static void *_p_AnalyticHestonEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< PricingEngine > *)  ((AnalyticHestonEnginePtr *) x));
}
static void *_p_AnalyticPTDHestonEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< PricingEngine > *)  ((AnalyticPTDHestonEnginePtr *) x));
}
static void *_p_BatesEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< PricingEngine > *)  ((BatesEnginePtr *) x));
}
static void *_p_IntegralEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< PricingEngine > *)  ((IntegralEnginePtr *) x));
}
static void *_p_FDBermudanEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< PricingEngine > *)  ((FDBermudanEnginePtr *) x));
}
static void *_p_FDEuropeanEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< PricingEngine > *)  ((FDEuropeanEnginePtr *) x));
}
static void *_p_BinomialVanillaEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< PricingEngine > *)  ((BinomialVanillaEnginePtr *) x));
}
static void *_p_MCEuropeanEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< PricingEngine > *)  ((MCEuropeanEnginePtr *) x));
}
static void *_p_FDAmericanEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< PricingEngine > *)  ((FDAmericanEnginePtr *) x));
}
static void *_p_FdBlackScholesVanillaEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< PricingEngine > *)  ((FdBlackScholesVanillaEnginePtr *) x));
}
static void *_p_FdBatesVanillaEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< PricingEngine > *)  ((FdBatesVanillaEnginePtr *) x));
}
static void *_p_ContinuousArithmeticAsianLevyEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< PricingEngine > *)  ((ContinuousArithmeticAsianLevyEnginePtr *) x));
}
static void *_p_FdBlackScholesAsianEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< PricingEngine > *)  ((FdBlackScholesAsianEnginePtr *) x));
}
static void *_p_MCDiscreteArithmeticASEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< PricingEngine > *)  ((MCDiscreteArithmeticASEnginePtr *) x));
}
static void *_p_MCDiscreteGeometricAPEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< PricingEngine > *)  ((MCDiscreteGeometricAPEnginePtr *) x));
}
static void *_p_VarianceGammaEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< PricingEngine > *)  ((VarianceGammaEnginePtr *) x));
}
static void *_p_FFTVarianceGammaEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< PricingEngine > *)  ((FFTVarianceGammaEnginePtr *) x));
}
static void *_p_AnalyticDoubleBarrierEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< PricingEngine > *)  ((AnalyticDoubleBarrierEnginePtr *) x));
}
static void *_p_WulinYongDoubleBarrierEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< PricingEngine > *)  ((WulinYongDoubleBarrierEnginePtr *) x));
}
static void *_p_VannaVolgaDoubleBarrierEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< PricingEngine > *)  ((VannaVolgaDoubleBarrierEnginePtr *) x));
}
static void *_p_AnalyticDoubleBarrierBinaryEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< PricingEngine > *)  ((AnalyticDoubleBarrierBinaryEnginePtr *) x));
}
static void *_p_BinomialDoubleBarrierEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< PricingEngine > *)  ((BinomialDoubleBarrierEnginePtr *) x));
}
static void *_p_MCEuropeanBasketEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< PricingEngine > *)  ((MCEuropeanBasketEnginePtr *) x));
}
static void *_p_MCAmericanBasketEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< PricingEngine > *)  ((MCAmericanBasketEnginePtr *) x));
}
static void *_p_StulzEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< PricingEngine > *)  ((StulzEnginePtr *) x));
}
static void *_p_MCEverestEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< PricingEngine > *)  ((MCEverestEnginePtr *) x));
}
static void *_p_MCHimalayaEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< PricingEngine > *)  ((MCHimalayaEnginePtr *) x));
}
static void *_p_JamshidianSwaptionEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< PricingEngine > *)  ((JamshidianSwaptionEnginePtr *) x));
}
static void *_p_TreeSwaptionEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< PricingEngine > *)  ((TreeSwaptionEnginePtr *) x));
}
static void *_p_AnalyticCapFloorEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< PricingEngine > *)  ((AnalyticCapFloorEnginePtr *) x));
}
static void *_p_TreeCapFloorEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< PricingEngine > *)  ((TreeCapFloorEnginePtr *) x));
}
static void *_p_G2SwaptionEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< PricingEngine > *)  ((G2SwaptionEnginePtr *) x));
}
static void *_p_FdG2SwaptionEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< PricingEngine > *)  ((FdG2SwaptionEnginePtr *) x));
}
static void *_p_FdHullWhiteSwaptionEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< PricingEngine > *)  ((FdHullWhiteSwaptionEnginePtr *) x));
}
static void *_p_DiscountingBondEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< PricingEngine > *)  ((DiscountingBondEnginePtr *) x));
}
static void *_p_TreeCallableFixedRateBondEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< PricingEngine > *)  ((TreeCallableFixedRateBondEnginePtr *) x));
}
static void *_p_BlackCallableFixedRateBondEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< PricingEngine > *)  ((BlackCallableFixedRateBondEnginePtr *) x));
}
static void *_p_BlackCapFloorEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< PricingEngine > *)  ((BlackCapFloorEnginePtr *) x));
}
static void *_p_BachelierCapFloorEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< PricingEngine > *)  ((BachelierCapFloorEnginePtr *) x));
}
static void *_p_BinomialConvertibleEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< PricingEngine > *)  ((BinomialConvertibleEnginePtr *) x));
}
static void *_p_MidPointCdsEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< PricingEngine > *)  ((MidPointCdsEnginePtr *) x));
}
static void *_p_IntegralCdsEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< PricingEngine > *)  ((IntegralCdsEnginePtr *) x));
}
static void *_p_DiscountingSwapEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< PricingEngine > *)  ((DiscountingSwapEnginePtr *) x));
}
static void *_p_Gaussian1dSwaptionEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< PricingEngine > *)  ((Gaussian1dSwaptionEnginePtr *) x));
}
static void *_p_Gaussian1dJamshidianSwaptionEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< PricingEngine > *)  ((Gaussian1dJamshidianSwaptionEnginePtr *) x));
}
static void *_p_Gaussian1dNonstandardSwaptionEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< PricingEngine > *)  ((Gaussian1dNonstandardSwaptionEnginePtr *) x));
}
static void *_p_Gaussian1dFloatFloatSwaptionEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< PricingEngine > *)  ((Gaussian1dFloatFloatSwaptionEnginePtr *) x));
}
static void *_p_BlackSwaptionEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< PricingEngine > *)  ((BlackSwaptionEnginePtr *) x));
}
static void *_p_BachelierSwaptionEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< PricingEngine > *)  ((BachelierSwaptionEnginePtr *) x));
}
static void *_p_AnalyticDiscreteGeometricAverageStrikeAsianEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< PricingEngine > *)  ((AnalyticDiscreteGeometricAverageStrikeAsianEnginePtr *) x));
}
static void *_p_AnalyticContinuousGeometricAveragePriceAsianEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< PricingEngine > *)  ((AnalyticContinuousGeometricAveragePriceAsianEnginePtr *) x));
}
static void *_p_AnalyticDiscreteGeometricAveragePriceAsianEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((boost::shared_ptr< PricingEngine > *)  ((AnalyticDiscreteGeometricAveragePriceAsianEnginePtr *) x));
}
static swig_type_info _swigt__p_ASX = {"_p_ASX", "ASX *", 0, 0, (void*)"QuantLib::ASX", 0};
static swig_type_info _swigt__p_AUDLiborPtr = {"_p_AUDLiborPtr", "AUDLiborPtr *", 0, 0, (void*)"QuantLib::AUDLibor", 0};
static swig_type_info _swigt__p_AmericanExercisePtr = {"_p_AmericanExercisePtr", "AmericanExercisePtr *", 0, 0, (void*)"QuantLib::AmericanExercise", 0};
static swig_type_info _swigt__p_AmortizingPaymentPtr = {"_p_AmortizingPaymentPtr", "AmortizingPaymentPtr *", 0, 0, (void*)"QuantLib::AmortizingPayment", 0};
static swig_type_info _swigt__p_AnalyticBarrierEnginePtr = {"_p_AnalyticBarrierEnginePtr", "AnalyticBarrierEnginePtr *", 0, 0, (void*)"QuantLib::AnalyticBarrierEngine", 0};
static swig_type_info _swigt__p_AnalyticBinaryBarrierEnginePtr = {"_p_AnalyticBinaryBarrierEnginePtr", "AnalyticBinaryBarrierEnginePtr *", 0, 0, (void*)"QuantLib::AnalyticBinaryBarrierEngine", 0};
static swig_type_info _swigt__p_AnalyticCapFloorEnginePtr = {"_p_AnalyticCapFloorEnginePtr", "AnalyticCapFloorEnginePtr *", 0, 0, (void*)"QuantLib::AnalyticCapFloorEngine", 0};
static swig_type_info _swigt__p_AnalyticContinuousGeometricAveragePriceAsianEnginePtr = {"_p_AnalyticContinuousGeometricAveragePriceAsianEnginePtr", "AnalyticContinuousGeometricAveragePriceAsianEnginePtr *", 0, 0, (void*)"QuantLib::AnalyticContinuousGeometricAveragePriceAsianEngine", 0};
static swig_type_info _swigt__p_AnalyticDigitalAmericanEnginePtr = {"_p_AnalyticDigitalAmericanEnginePtr", "AnalyticDigitalAmericanEnginePtr *", 0, 0, (void*)"QuantLib::AnalyticDigitalAmericanEngine", 0};
static swig_type_info _swigt__p_AnalyticDigitalAmericanKOEnginePtr = {"_p_AnalyticDigitalAmericanKOEnginePtr", "AnalyticDigitalAmericanKOEnginePtr *", 0, 0, (void*)"QuantLib::AnalyticDigitalAmericanKOEngine", 0};
static swig_type_info _swigt__p_AnalyticDiscreteGeometricAveragePriceAsianEnginePtr = {"_p_AnalyticDiscreteGeometricAveragePriceAsianEnginePtr", "AnalyticDiscreteGeometricAveragePriceAsianEnginePtr *", 0, 0, (void*)"QuantLib::AnalyticDiscreteGeometricAveragePriceAsianEngine", 0};
static swig_type_info _swigt__p_AnalyticDiscreteGeometricAverageStrikeAsianEnginePtr = {"_p_AnalyticDiscreteGeometricAverageStrikeAsianEnginePtr", "AnalyticDiscreteGeometricAverageStrikeAsianEnginePtr *", 0, 0, (void*)"QuantLib::AnalyticDiscreteGeometricAverageStrikeAsianEngine", 0};
static swig_type_info _swigt__p_AnalyticDividendEuropeanEnginePtr = {"_p_AnalyticDividendEuropeanEnginePtr", "AnalyticDividendEuropeanEnginePtr *", 0, 0, (void*)"QuantLib::AnalyticDividendEuropeanEngine", 0};
static swig_type_info _swigt__p_AnalyticDoubleBarrierBinaryEnginePtr = {"_p_AnalyticDoubleBarrierBinaryEnginePtr", "AnalyticDoubleBarrierBinaryEnginePtr *", 0, 0, (void*)"QuantLib::AnalyticDoubleBarrierBinaryEngine", 0};
static swig_type_info _swigt__p_AnalyticDoubleBarrierEnginePtr = {"_p_AnalyticDoubleBarrierEnginePtr", "AnalyticDoubleBarrierEnginePtr *", 0, 0, (void*)"QuantLib::AnalyticDoubleBarrierEngine", 0};
static swig_type_info _swigt__p_AnalyticEuropeanEnginePtr = {"_p_AnalyticEuropeanEnginePtr", "AnalyticEuropeanEnginePtr *", 0, 0, (void*)"QuantLib::AnalyticEuropeanEngine", 0};
static swig_type_info _swigt__p_AnalyticHaganPricerPtr = {"_p_AnalyticHaganPricerPtr", "AnalyticHaganPricerPtr *", 0, 0, (void*)"QuantLib::AnalyticHaganPricer", 0};
static swig_type_info _swigt__p_AnalyticHestonEnginePtr = {"_p_AnalyticHestonEnginePtr", "AnalyticHestonEnginePtr *", 0, 0, (void*)"QuantLib::AnalyticHestonEngine", 0};
static swig_type_info _swigt__p_AnalyticPTDHestonEnginePtr = {"_p_AnalyticPTDHestonEnginePtr", "AnalyticPTDHestonEnginePtr *", 0, 0, (void*)"QuantLib::AnalyticPTDHestonEngine", 0};
static swig_type_info _swigt__p_AoniaPtr = {"_p_AoniaPtr", "AoniaPtr *", 0, 0, (void*)"QuantLib::Aonia", 0};
static swig_type_info _swigt__p_Array = {"_p_Array", "Array *", 0, 0, (void*)"QuantLib::Array", 0};
static swig_type_info _swigt__p_AssetOrNothingPayoffPtr = {"_p_AssetOrNothingPayoffPtr", "AssetOrNothingPayoffPtr *", 0, 0, (void*)"QuantLib::AssetOrNothingPayoff", 0};
static swig_type_info _swigt__p_AssetSwapPtr = {"_p_AssetSwapPtr", "AssetSwapPtr *", 0, 0, (void*)"QuantLib::AssetSwap", 0};
static swig_type_info _swigt__p_Average = {"_p_Average", "Average *", 0, 0, (void*)"QuantLib::Average", 0};
static swig_type_info _swigt__p_AverageBasketPayoffPtr = {"_p_AverageBasketPayoffPtr", "AverageBasketPayoffPtr *", 0, 0, (void*)"QuantLib::AverageBasketPayoff", 0};
static swig_type_info _swigt__p_BFGS = {"_p_BFGS", "BFGS *", 0, 0, (void*)"QuantLib::BFGS", 0};
static swig_type_info _swigt__p_BachelierCapFloorEnginePtr = {"_p_BachelierCapFloorEnginePtr", "BachelierCapFloorEnginePtr *", 0, 0, (void*)"QuantLib::BachelierCapFloorEngine", 0};
static swig_type_info _swigt__p_BachelierSwaptionEnginePtr = {"_p_BachelierSwaptionEnginePtr", "BachelierSwaptionEnginePtr *", 0, 0, (void*)"QuantLib::BachelierSwaptionEngine", 0};
static swig_type_info _swigt__p_BackwardFlat = {"_p_BackwardFlat", "BackwardFlat *", 0, 0, (void*)"QuantLib::BackwardFlat", 0};
static swig_type_info _swigt__p_BackwardFlatZeroCurvePtr = {"_p_BackwardFlatZeroCurvePtr", "BackwardFlatZeroCurvePtr *", 0, 0, (void*)"QuantLib::BackwardFlatZeroCurve", 0};
static swig_type_info _swigt__p_BaroneAdesiWhaleyApproximationEnginePtr = {"_p_BaroneAdesiWhaleyApproximationEnginePtr", "BaroneAdesiWhaleyApproximationEnginePtr *", 0, 0, (void*)"QuantLib::BaroneAdesiWhaleyEngine", 0};
static swig_type_info _swigt__p_Barrier = {"_p_Barrier", "Barrier *", 0, 0, (void*)"QuantLib::Barrier", 0};
static swig_type_info _swigt__p_BarrierOptionPtr = {"_p_BarrierOptionPtr", "BarrierOptionPtr *", 0, 0, (void*)"QuantLib::BarrierOption", 0};
static swig_type_info _swigt__p_BasketOptionPtr = {"_p_BasketOptionPtr", "BasketOptionPtr *", 0, 0, (void*)"QuantLib::BasketOption", 0};
static swig_type_info _swigt__p_BasketPayoffPtr = {"_p_BasketPayoffPtr", "BasketPayoffPtr *", 0, 0, (void*)"QuantLib::BasketPayoff", 0};
static swig_type_info _swigt__p_BatesEnginePtr = {"_p_BatesEnginePtr", "BatesEnginePtr *", 0, 0, (void*)"QuantLib::BatesEngine", 0};
static swig_type_info _swigt__p_BatesModelPtr = {"_p_BatesModelPtr", "BatesModelPtr *", 0, 0, (void*)"QuantLib::BatesModel", 0};
static swig_type_info _swigt__p_BatesProcessPtr = {"_p_BatesProcessPtr", "BatesProcessPtr *", 0, 0, (void*)"QuantLib::BatesProcess", 0};
static swig_type_info _swigt__p_Bbsw1MPtr = {"_p_Bbsw1MPtr", "Bbsw1MPtr *", 0, 0, (void*)"QuantLib::Bbsw1M", 0};
static swig_type_info _swigt__p_Bbsw2MPtr = {"_p_Bbsw2MPtr", "Bbsw2MPtr *", 0, 0, (void*)"QuantLib::Bbsw2M", 0};
static swig_type_info _swigt__p_Bbsw3MPtr = {"_p_Bbsw3MPtr", "Bbsw3MPtr *", 0, 0, (void*)"QuantLib::Bbsw3M", 0};
static swig_type_info _swigt__p_Bbsw4MPtr = {"_p_Bbsw4MPtr", "Bbsw4MPtr *", 0, 0, (void*)"QuantLib::Bbsw4M", 0};
static swig_type_info _swigt__p_Bbsw5MPtr = {"_p_Bbsw5MPtr", "Bbsw5MPtr *", 0, 0, (void*)"QuantLib::Bbsw5M", 0};
static swig_type_info _swigt__p_Bbsw6MPtr = {"_p_Bbsw6MPtr", "Bbsw6MPtr *", 0, 0, (void*)"QuantLib::Bbsw6M", 0};
static swig_type_info _swigt__p_BbswPtr = {"_p_BbswPtr", "BbswPtr *", 0, 0, (void*)"QuantLib::Bbsw", 0};
static swig_type_info _swigt__p_BermudanExercisePtr = {"_p_BermudanExercisePtr", "BermudanExercisePtr *", 0, 0, (void*)"QuantLib::BermudanExercise", 0};
static swig_type_info _swigt__p_BinomialBarrierEnginePtr = {"_p_BinomialBarrierEnginePtr", "BinomialBarrierEnginePtr *", 0, 0, (void*)"QuantLib::BinomialBarrierEngine", 0};
static swig_type_info _swigt__p_BinomialConvertibleEnginePtr = {"_p_BinomialConvertibleEnginePtr", "BinomialConvertibleEnginePtr *", 0, 0, (void*)"QuantLib::BinomialConvertibleEngine", 0};
static swig_type_info _swigt__p_BinomialDistribution = {"_p_BinomialDistribution", "BinomialDistribution *", 0, 0, (void*)"QuantLib::BinomialDistribution", 0};
static swig_type_info _swigt__p_BinomialDoubleBarrierEnginePtr = {"_p_BinomialDoubleBarrierEnginePtr", "BinomialDoubleBarrierEnginePtr *", 0, 0, (void*)"QuantLib::BinomialDoubleBarrierEngine", 0};
static swig_type_info _swigt__p_BinomialVanillaEnginePtr = {"_p_BinomialVanillaEnginePtr", "BinomialVanillaEnginePtr *", 0, 0, (void*)"QuantLib::BinomialVanillaEngine", 0};
static swig_type_info _swigt__p_Bisection = {"_p_Bisection", "Bisection *", 0, 0, (void*)"QuantLib::Bisection", 0};
static swig_type_info _swigt__p_BivariateCumulativeNormalDistribution = {"_p_BivariateCumulativeNormalDistribution", "BivariateCumulativeNormalDistribution *", 0, 0, (void*)"QuantLib::BivariateCumulativeNormalDistribution", 0};
static swig_type_info _swigt__p_BivariateCumulativeNormalDistributionDr78 = {"_p_BivariateCumulativeNormalDistributionDr78", "BivariateCumulativeNormalDistributionDr78 *", 0, 0, (void*)"QuantLib::BivariateCumulativeNormalDistributionDr78", 0};
static swig_type_info _swigt__p_BivariateCumulativeNormalDistributionWe04DP = {"_p_BivariateCumulativeNormalDistributionWe04DP", "BivariateCumulativeNormalDistributionWe04DP *", 0, 0, (void*)"QuantLib::BivariateCumulativeNormalDistributionWe04DP", 0};
static swig_type_info _swigt__p_BjerksundStenslandApproximationEnginePtr = {"_p_BjerksundStenslandApproximationEnginePtr", "BjerksundStenslandApproximationEnginePtr *", 0, 0, (void*)"QuantLib::BjerksundStenslandEngine", 0};
static swig_type_info _swigt__p_Bkbm1MPtr = {"_p_Bkbm1MPtr", "Bkbm1MPtr *", 0, 0, (void*)"QuantLib::Bkbm1M", 0};
static swig_type_info _swigt__p_Bkbm2MPtr = {"_p_Bkbm2MPtr", "Bkbm2MPtr *", 0, 0, (void*)"QuantLib::Bkbm2M", 0};
static swig_type_info _swigt__p_Bkbm3MPtr = {"_p_Bkbm3MPtr", "Bkbm3MPtr *", 0, 0, (void*)"QuantLib::Bkbm3M", 0};
static swig_type_info _swigt__p_Bkbm4MPtr = {"_p_Bkbm4MPtr", "Bkbm4MPtr *", 0, 0, (void*)"QuantLib::Bkbm4M", 0};
static swig_type_info _swigt__p_Bkbm5MPtr = {"_p_Bkbm5MPtr", "Bkbm5MPtr *", 0, 0, (void*)"QuantLib::Bkbm5M", 0};
static swig_type_info _swigt__p_Bkbm6MPtr = {"_p_Bkbm6MPtr", "Bkbm6MPtr *", 0, 0, (void*)"QuantLib::Bkbm6M", 0};
static swig_type_info _swigt__p_BkbmPtr = {"_p_BkbmPtr", "BkbmPtr *", 0, 0, (void*)"QuantLib::Bkbm", 0};
static swig_type_info _swigt__p_BlackCalculator = {"_p_BlackCalculator", "BlackCalculator *", 0, 0, (void*)"QuantLib::BlackCalculator", 0};
static swig_type_info _swigt__p_BlackCallableFixedRateBondEnginePtr = {"_p_BlackCallableFixedRateBondEnginePtr", "BlackCallableFixedRateBondEnginePtr *", 0, 0, (void*)"QuantLib::BlackCallableFixedRateBondEngine", 0};
static swig_type_info _swigt__p_BlackCapFloorEnginePtr = {"_p_BlackCapFloorEnginePtr", "BlackCapFloorEnginePtr *", 0, 0, (void*)"QuantLib::BlackCapFloorEngine", 0};
static swig_type_info _swigt__p_BlackConstantVolPtr = {"_p_BlackConstantVolPtr", "BlackConstantVolPtr *", 0, 0, (void*)"QuantLib::BlackConstantVol", 0};
static swig_type_info _swigt__p_BlackDeltaCalculator = {"_p_BlackDeltaCalculator", "BlackDeltaCalculator *", 0, 0, (void*)"QuantLib::BlackDeltaCalculator", 0};
static swig_type_info _swigt__p_BlackIborCouponPricerPtr = {"_p_BlackIborCouponPricerPtr", "BlackIborCouponPricerPtr *", 0, 0, (void*)"QuantLib::BlackIborCouponPricer", 0};
static swig_type_info _swigt__p_BlackKarasinskiPtr = {"_p_BlackKarasinskiPtr", "BlackKarasinskiPtr *", 0, 0, (void*)"QuantLib::BlackKarasinski", 0};
static swig_type_info _swigt__p_BlackProcessPtr = {"_p_BlackProcessPtr", "BlackProcessPtr *", 0, 0, (void*)"QuantLib::BlackProcess", 0};
static swig_type_info _swigt__p_BlackScholesMertonProcessPtr = {"_p_BlackScholesMertonProcessPtr", "BlackScholesMertonProcessPtr *", 0, 0, (void*)"QuantLib::BlackScholesMertonProcess", 0};
static swig_type_info _swigt__p_BlackScholesProcessPtr = {"_p_BlackScholesProcessPtr", "BlackScholesProcessPtr *", 0, 0, (void*)"QuantLib::BlackScholesProcess", 0};
static swig_type_info _swigt__p_BlackSwaptionEnginePtr = {"_p_BlackSwaptionEnginePtr", "BlackSwaptionEnginePtr *", 0, 0, (void*)"QuantLib::BlackSwaptionEngine", 0};
static swig_type_info _swigt__p_BlackVarianceCurvePtr = {"_p_BlackVarianceCurvePtr", "BlackVarianceCurvePtr *", 0, 0, (void*)"QuantLib::BlackVarianceCurve", 0};
static swig_type_info _swigt__p_BlackVarianceSurfacePtr = {"_p_BlackVarianceSurfacePtr", "BlackVarianceSurfacePtr *", 0, 0, (void*)"QuantLib::BlackVarianceSurface", 0};
static swig_type_info _swigt__p_BlackVolTermStructure = {"_p_BlackVolTermStructure", "BlackVolTermStructure *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_BondFunctions = {"_p_BondFunctions", "BondFunctions *", 0, 0, (void*)"QuantLib::BondFunctions", 0};
static swig_type_info _swigt__p_BondHelperPtr = {"_p_BondHelperPtr", "BondHelperPtr *", 0, 0, (void*)"QuantLib::BondHelper", 0};
static swig_type_info _swigt__p_BondPtr = {"_p_BondPtr", "BondPtr *", 0, 0, (void*)"QuantLib::Bond", 0};
static swig_type_info _swigt__p_BoundaryConstraint = {"_p_BoundaryConstraint", "BoundaryConstraint *", 0, 0, (void*)"QuantLib::BoundaryConstraint", 0};
static swig_type_info _swigt__p_BoxMullerGaussianRngT_KnuthUniformRng_t = {"_p_BoxMullerGaussianRngT_KnuthUniformRng_t", "BoxMullerGaussianRng< KnuthUniformRng > *", 0, 0, (void*)"QuantLib::BoxMullerKnuthGaussianRng", 0};
static swig_type_info _swigt__p_BoxMullerGaussianRngT_LecuyerUniformRng_t = {"_p_BoxMullerGaussianRngT_LecuyerUniformRng_t", "BoxMullerGaussianRng< LecuyerUniformRng > *", 0, 0, (void*)"QuantLib::BoxMullerLecuyerGaussianRng", 0};
static swig_type_info _swigt__p_BoxMullerGaussianRngT_MersenneTwisterUniformRng_t = {"_p_BoxMullerGaussianRngT_MersenneTwisterUniformRng_t", "BoxMullerGaussianRng< MersenneTwisterUniformRng > *", 0, 0, (void*)"QuantLib::BoxMullerMersenneTwisterGaussianRng", 0};
static swig_type_info _swigt__p_Brent = {"_p_Brent", "Brent *", 0, 0, (void*)"QuantLib::Brent", 0};
static swig_type_info _swigt__p_BrownianBridge = {"_p_BrownianBridge", "BrownianBridge *", 0, 0, (void*)"QuantLib::BrownianBridge", 0};
static swig_type_info _swigt__p_CADLiborPtr = {"_p_CADLiborPtr", "CADLiborPtr *", 0, 0, (void*)"QuantLib::CADLibor", 0};
static swig_type_info _swigt__p_CHFLiborPtr = {"_p_CHFLiborPtr", "CHFLiborPtr *", 0, 0, (void*)"QuantLib::CHFLibor", 0};
static swig_type_info _swigt__p_CLGaussianRngT_KnuthUniformRng_t = {"_p_CLGaussianRngT_KnuthUniformRng_t", "CLGaussianRng< KnuthUniformRng > *", 0, 0, (void*)"QuantLib::CentralLimitKnuthGaussianRng", 0};
static swig_type_info _swigt__p_CLGaussianRngT_LecuyerUniformRng_t = {"_p_CLGaussianRngT_LecuyerUniformRng_t", "CLGaussianRng< LecuyerUniformRng > *", 0, 0, (void*)"QuantLib::CentralLimitLecuyerGaussianRng", 0};
static swig_type_info _swigt__p_CLGaussianRngT_MersenneTwisterUniformRng_t = {"_p_CLGaussianRngT_MersenneTwisterUniformRng_t", "CLGaussianRng< MersenneTwisterUniformRng > *", 0, 0, (void*)"QuantLib::CentralLimitMersenneTwisterGaussianRng", 0};
static swig_type_info _swigt__p_CPI = {"_p_CPI", "CPI *", 0, 0, (void*)"QuantLib::CPI", 0};
static swig_type_info _swigt__p_CPIBondPtr = {"_p_CPIBondPtr", "CPIBondPtr *", 0, 0, (void*)"QuantLib::CPIBond", 0};
static swig_type_info _swigt__p_Calendar = {"_p_Calendar", "Calendar *", 0, 0, (void*)"QuantLib::Calendar", 0};
static swig_type_info _swigt__p_CalibratedModel = {"_p_CalibratedModel", "CalibratedModel *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_CalibrationHelper = {"_p_CalibrationHelper", "CalibrationHelper *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Callability = {"_p_Callability", "Callability *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_CallabilityPrice = {"_p_CallabilityPrice", "CallabilityPrice *", 0, 0, (void*)"QuantLib::CallabilityPrice", 0};
static swig_type_info _swigt__p_CallableFixedRateBondPtr = {"_p_CallableFixedRateBondPtr", "CallableFixedRateBondPtr *", 0, 0, (void*)"QuantLib::CallableFixedRateBond", 0};
static swig_type_info _swigt__p_CapFloorPtr = {"_p_CapFloorPtr", "CapFloorPtr *", 0, 0, (void*)"QuantLib::CapFloor", 0};
static swig_type_info _swigt__p_CapFloorTermVolCurvePtr = {"_p_CapFloorTermVolCurvePtr", "CapFloorTermVolCurvePtr *", 0, 0, (void*)"QuantLib::CapFloorTermVolCurve", 0};
static swig_type_info _swigt__p_CapFloorTermVolSurfacePtr = {"_p_CapFloorTermVolSurfacePtr", "CapFloorTermVolSurfacePtr *", 0, 0, (void*)"QuantLib::CapFloorTermVolSurface", 0};
static swig_type_info _swigt__p_CapFloorTermVolatilityStructure = {"_p_CapFloorTermVolatilityStructure", "CapFloorTermVolatilityStructure *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_CapHelperPtr = {"_p_CapHelperPtr", "CapHelperPtr *", 0, 0, (void*)"QuantLib::CapHelper", 0};
static swig_type_info _swigt__p_CapPtr = {"_p_CapPtr", "CapPtr *", 0, 0, (void*)"QuantLib::Cap", 0};
static swig_type_info _swigt__p_CappedFlooredCmsCouponPtr = {"_p_CappedFlooredCmsCouponPtr", "CappedFlooredCmsCouponPtr *", 0, 0, (void*)"QuantLib::CappedFlooredCmsCoupon", 0};
static swig_type_info _swigt__p_CappedFlooredCouponPtr = {"_p_CappedFlooredCouponPtr", "CappedFlooredCouponPtr *", 0, 0, (void*)"QuantLib::CappedFlooredCoupon", 0};
static swig_type_info _swigt__p_CashFlow = {"_p_CashFlow", "CashFlow *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_CashFlows = {"_p_CashFlows", "CashFlows *", 0, 0, (void*)"QuantLib::CashFlows", 0};
static swig_type_info _swigt__p_CashOrNothingPayoffPtr = {"_p_CashOrNothingPayoffPtr", "CashOrNothingPayoffPtr *", 0, 0, (void*)"QuantLib::CashOrNothingPayoff", 0};
static swig_type_info _swigt__p_CdorPtr = {"_p_CdorPtr", "CdorPtr *", 0, 0, (void*)"QuantLib::Cdor", 0};
static swig_type_info _swigt__p_CeilingTruncation = {"_p_CeilingTruncation", "CeilingTruncation *", 0, 0, (void*)"QuantLib::CeilingTruncation", 0};
static swig_type_info _swigt__p_ClosestRounding = {"_p_ClosestRounding", "ClosestRounding *", 0, 0, (void*)"QuantLib::ClosestRounding", 0};
static swig_type_info _swigt__p_CmsCouponPricerPtr = {"_p_CmsCouponPricerPtr", "CmsCouponPricerPtr *", 0, 0, (void*)"QuantLib::CmsCouponPricer", 0};
static swig_type_info _swigt__p_CmsCouponPtr = {"_p_CmsCouponPtr", "CmsCouponPtr *", 0, 0, (void*)"QuantLib::CmsCoupon", 0};
static swig_type_info _swigt__p_CmsRateBondPtr = {"_p_CmsRateBondPtr", "CmsRateBondPtr *", 0, 0, (void*)"QuantLib::CmsRateBond", 0};
static swig_type_info _swigt__p_CollarPtr = {"_p_CollarPtr", "CollarPtr *", 0, 0, (void*)"QuantLib::Collar", 0};
static swig_type_info _swigt__p_CompositeConstraint = {"_p_CompositeConstraint", "CompositeConstraint *", 0, 0, (void*)"QuantLib::CompositeConstraint", 0};
static swig_type_info _swigt__p_CompositeInstrumentPtr = {"_p_CompositeInstrumentPtr", "CompositeInstrumentPtr *", 0, 0, (void*)"QuantLib::CompositeInstrument", 0};
static swig_type_info _swigt__p_ConjugateGradient = {"_p_ConjugateGradient", "ConjugateGradient *", 0, 0, (void*)"QuantLib::ConjugateGradient", 0};
static swig_type_info _swigt__p_ConstantEstimator = {"_p_ConstantEstimator", "ConstantEstimator *", 0, 0, (void*)"QuantLib::ConstantEstimator", 0};
static swig_type_info _swigt__p_ConstantOptionletVolatilityPtr = {"_p_ConstantOptionletVolatilityPtr", "ConstantOptionletVolatilityPtr *", 0, 0, (void*)"QuantLib::ConstantOptionletVolatility", 0};
static swig_type_info _swigt__p_ConstantParameter = {"_p_ConstantParameter", "ConstantParameter *", 0, 0, (void*)"QuantLib::ConstantParameter", 0};
static swig_type_info _swigt__p_ConstantSwaptionVolatilityPtr = {"_p_ConstantSwaptionVolatilityPtr", "ConstantSwaptionVolatilityPtr *", 0, 0, (void*)"QuantLib::ConstantSwaptionVolatility", 0};
static swig_type_info _swigt__p_Constraint = {"_p_Constraint", "Constraint *", 0, 0, (void*)"QuantLib::Constraint", 0};
static swig_type_info _swigt__p_ContinuousArithmeticAsianLevyEnginePtr = {"_p_ContinuousArithmeticAsianLevyEnginePtr", "ContinuousArithmeticAsianLevyEnginePtr *", 0, 0, (void*)"QuantLib::ContinuousArithmeticAsianLevyEngine", 0};
static swig_type_info _swigt__p_ContinuousAveragingAsianOptionPtr = {"_p_ContinuousAveragingAsianOptionPtr", "ContinuousAveragingAsianOptionPtr *", 0, 0, (void*)"QuantLib::ContinuousAveragingAsianOption", 0};
static swig_type_info _swigt__p_ConvertibleFixedCouponBondPtr = {"_p_ConvertibleFixedCouponBondPtr", "ConvertibleFixedCouponBondPtr *", 0, 0, (void*)"QuantLib::ConvertibleFixedCouponBond", 0};
static swig_type_info _swigt__p_ConvertibleFloatingRateBondPtr = {"_p_ConvertibleFloatingRateBondPtr", "ConvertibleFloatingRateBondPtr *", 0, 0, (void*)"QuantLib::ConvertibleFloatingRateBond", 0};
static swig_type_info _swigt__p_ConvertibleZeroCouponBondPtr = {"_p_ConvertibleZeroCouponBondPtr", "ConvertibleZeroCouponBondPtr *", 0, 0, (void*)"QuantLib::ConvertibleZeroCouponBond", 0};
static swig_type_info _swigt__p_CouponPtr = {"_p_CouponPtr", "CouponPtr *", 0, 0, (void*)"QuantLib::Coupon", 0};
static swig_type_info _swigt__p_CreditDefaultSwapPtr = {"_p_CreditDefaultSwapPtr", "CreditDefaultSwapPtr *", 0, 0, (void*)"QuantLib::CreditDefaultSwap", 0};
static swig_type_info _swigt__p_Cubic = {"_p_Cubic", "Cubic *", 0, 0, (void*)"QuantLib::Cubic", 0};
static swig_type_info _swigt__p_CubicBSplinesFitting = {"_p_CubicBSplinesFitting", "CubicBSplinesFitting *", 0, 0, (void*)"QuantLib::CubicBSplinesFitting", 0};
static swig_type_info _swigt__p_CubicZeroCurvePtr = {"_p_CubicZeroCurvePtr", "CubicZeroCurvePtr *", 0, 0, (void*)"QuantLib::CubicZeroCurve", 0};
static swig_type_info _swigt__p_CumulativeBinomialDistribution = {"_p_CumulativeBinomialDistribution", "CumulativeBinomialDistribution *", 0, 0, (void*)"QuantLib::CumulativeBinomialDistribution", 0};
static swig_type_info _swigt__p_CumulativeChiSquareDistribution = {"_p_CumulativeChiSquareDistribution", "CumulativeChiSquareDistribution *", 0, 0, (void*)"QuantLib::CumulativeChiSquareDistribution", 0};
static swig_type_info _swigt__p_CumulativeGammaDistribution = {"_p_CumulativeGammaDistribution", "CumulativeGammaDistribution *", 0, 0, (void*)"QuantLib::CumulativeGammaDistribution", 0};
static swig_type_info _swigt__p_CumulativeNormalDistribution = {"_p_CumulativeNormalDistribution", "CumulativeNormalDistribution *", 0, 0, (void*)"QuantLib::CumulativeNormalDistribution", 0};
static swig_type_info _swigt__p_CumulativePoissonDistribution = {"_p_CumulativePoissonDistribution", "CumulativePoissonDistribution *", 0, 0, (void*)"QuantLib::CumulativePoissonDistribution", 0};
static swig_type_info _swigt__p_CumulativeStudentDistribution = {"_p_CumulativeStudentDistribution", "CumulativeStudentDistribution *", 0, 0, (void*)"QuantLib::CumulativeStudentDistribution", 0};
static swig_type_info _swigt__p_Currency = {"_p_Currency", "Currency *", 0, 0, (void*)"QuantLib::Currency", 0};
static swig_type_info _swigt__p_CustomRegion = {"_p_CustomRegion", "CustomRegion *", 0, 0, (void*)"QuantLib::CustomRegion", 0};
static swig_type_info _swigt__p_DKKLiborPtr = {"_p_DKKLiborPtr", "DKKLiborPtr *", 0, 0, (void*)"QuantLib::DKKLibor", 0};
static swig_type_info _swigt__p_DMinus = {"_p_DMinus", "DMinus *", 0, 0, (void*)"QuantLib::DMinus", 0};
static swig_type_info _swigt__p_DPlus = {"_p_DPlus", "DPlus *", 0, 0, (void*)"QuantLib::DPlus", 0};
static swig_type_info _swigt__p_DPlusDMinus = {"_p_DPlusDMinus", "DPlusDMinus *", 0, 0, (void*)"QuantLib::DPlusDMinus", 0};
static swig_type_info _swigt__p_DZero = {"_p_DZero", "DZero *", 0, 0, (void*)"QuantLib::DZero", 0};
static swig_type_info _swigt__p_Date = {"_p_Date", "Date *", 0, 0, (void*)"QuantLib::Date", 0};
static swig_type_info _swigt__p_DateGeneration = {"_p_DateGeneration", "DateGeneration *", 0, 0, (void*)"QuantLib::DateGeneration", 0};
static swig_type_info _swigt__p_DateParser = {"_p_DateParser", "DateParser *", 0, 0, (void*)"QuantLib::DateParser", 0};
static swig_type_info _swigt__p_DatedOISRateHelperPtr = {"_p_DatedOISRateHelperPtr", "DatedOISRateHelperPtr *", 0, 0, (void*)"QuantLib::DatedOISRateHelper", 0};
static swig_type_info _swigt__p_DayCounter = {"_p_DayCounter", "DayCounter *", 0, 0, (void*)"QuantLib::DayCounter", 0};
static swig_type_info _swigt__p_DefaultBoundaryCondition = {"_p_DefaultBoundaryCondition", "DefaultBoundaryCondition *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_DefaultDensity = {"_p_DefaultDensity", "DefaultDensity *", 0, 0, (void*)"QuantLib::DefaultDensity", 0};
static swig_type_info _swigt__p_DefaultDensityCurvePtr = {"_p_DefaultDensityCurvePtr", "DefaultDensityCurvePtr *", 0, 0, (void*)"QuantLib::DefaultDensityCurve", 0};
static swig_type_info _swigt__p_DefaultLexicographicalView = {"_p_DefaultLexicographicalView", "DefaultLexicographicalView *", 0, 0, (void*)"QuantLib::LexicographicalView", 0};
static swig_type_info _swigt__p_DefaultLogCubic = {"_p_DefaultLogCubic", "DefaultLogCubic *", 0, 0, (void*)"QuantLib::DefaultLogCubic", 0};
static swig_type_info _swigt__p_DefaultProbabilityHelper = {"_p_DefaultProbabilityHelper", "DefaultProbabilityHelper *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_DefaultProbabilityTermStructure = {"_p_DefaultProbabilityTermStructure", "DefaultProbabilityTermStructure *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_DeltaVolQuote = {"_p_DeltaVolQuote", "DeltaVolQuote *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_DepositRateHelperPtr = {"_p_DepositRateHelperPtr", "DepositRateHelperPtr *", 0, 0, (void*)"QuantLib::DepositRateHelper", 0};
static swig_type_info _swigt__p_DifferentialEvolution = {"_p_DifferentialEvolution", "DifferentialEvolution *", 0, 0, (void*)"QuantLib::DifferentialEvolution", 0};
static swig_type_info _swigt__p_DirichletBCPtr = {"_p_DirichletBCPtr", "DirichletBCPtr *", 0, 0, (void*)"QuantLib::DirichletBC", 0};
static swig_type_info _swigt__p_Discount = {"_p_Discount", "Discount *", 0, 0, (void*)"QuantLib::Discount", 0};
static swig_type_info _swigt__p_DiscountCurvePtr = {"_p_DiscountCurvePtr", "DiscountCurvePtr *", 0, 0, (void*)"QuantLib::DiscountCurve", 0};
static swig_type_info _swigt__p_DiscountingBondEnginePtr = {"_p_DiscountingBondEnginePtr", "DiscountingBondEnginePtr *", 0, 0, (void*)"QuantLib::DiscountingBondEngine", 0};
static swig_type_info _swigt__p_DiscountingSwapEnginePtr = {"_p_DiscountingSwapEnginePtr", "DiscountingSwapEnginePtr *", 0, 0, (void*)"QuantLib::DiscountingSwapEngine", 0};
static swig_type_info _swigt__p_DiscreteAveragingAsianOptionPtr = {"_p_DiscreteAveragingAsianOptionPtr", "DiscreteAveragingAsianOptionPtr *", 0, 0, (void*)"QuantLib::DiscreteAveragingAsianOption", 0};
static swig_type_info _swigt__p_Dividend = {"_p_Dividend", "Dividend *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_DividendVanillaOptionPtr = {"_p_DividendVanillaOptionPtr", "DividendVanillaOptionPtr *", 0, 0, (void*)"QuantLib::DividendVanillaOption", 0};
static swig_type_info _swigt__p_DoubleBarrier = {"_p_DoubleBarrier", "DoubleBarrier *", 0, 0, (void*)"QuantLib::DoubleBarrier", 0};
static swig_type_info _swigt__p_DoubleBarrierOptionPtr = {"_p_DoubleBarrierOptionPtr", "DoubleBarrierOptionPtr *", 0, 0, (void*)"QuantLib::DoubleBarrierOption", 0};
static swig_type_info _swigt__p_DownRounding = {"_p_DownRounding", "DownRounding *", 0, 0, (void*)"QuantLib::DownRounding", 0};
static swig_type_info _swigt__p_Duration = {"_p_Duration", "Duration *", 0, 0, (void*)"QuantLib::Duration", 0};
static swig_type_info _swigt__p_EUHICPPtr = {"_p_EUHICPPtr", "EUHICPPtr *", 0, 0, (void*)"QuantLib::EUHICP", 0};
static swig_type_info _swigt__p_EUHICPXTPtr = {"_p_EUHICPXTPtr", "EUHICPXTPtr *", 0, 0, (void*)"QuantLib::EUHICPXT", 0};
static swig_type_info _swigt__p_EURLibor10MPtr = {"_p_EURLibor10MPtr", "EURLibor10MPtr *", 0, 0, (void*)"QuantLib::EURLibor10M", 0};
static swig_type_info _swigt__p_EURLibor11MPtr = {"_p_EURLibor11MPtr", "EURLibor11MPtr *", 0, 0, (void*)"QuantLib::EURLibor11M", 0};
static swig_type_info _swigt__p_EURLibor1MPtr = {"_p_EURLibor1MPtr", "EURLibor1MPtr *", 0, 0, (void*)"QuantLib::EURLibor1M", 0};
static swig_type_info _swigt__p_EURLibor1YPtr = {"_p_EURLibor1YPtr", "EURLibor1YPtr *", 0, 0, (void*)"QuantLib::EURLibor1Y", 0};
static swig_type_info _swigt__p_EURLibor2MPtr = {"_p_EURLibor2MPtr", "EURLibor2MPtr *", 0, 0, (void*)"QuantLib::EURLibor2M", 0};
static swig_type_info _swigt__p_EURLibor2WPtr = {"_p_EURLibor2WPtr", "EURLibor2WPtr *", 0, 0, (void*)"QuantLib::EURLibor2W", 0};
static swig_type_info _swigt__p_EURLibor3MPtr = {"_p_EURLibor3MPtr", "EURLibor3MPtr *", 0, 0, (void*)"QuantLib::EURLibor3M", 0};
static swig_type_info _swigt__p_EURLibor4MPtr = {"_p_EURLibor4MPtr", "EURLibor4MPtr *", 0, 0, (void*)"QuantLib::EURLibor4M", 0};
static swig_type_info _swigt__p_EURLibor5MPtr = {"_p_EURLibor5MPtr", "EURLibor5MPtr *", 0, 0, (void*)"QuantLib::EURLibor5M", 0};
static swig_type_info _swigt__p_EURLibor6MPtr = {"_p_EURLibor6MPtr", "EURLibor6MPtr *", 0, 0, (void*)"QuantLib::EURLibor6M", 0};
static swig_type_info _swigt__p_EURLibor7MPtr = {"_p_EURLibor7MPtr", "EURLibor7MPtr *", 0, 0, (void*)"QuantLib::EURLibor7M", 0};
static swig_type_info _swigt__p_EURLibor8MPtr = {"_p_EURLibor8MPtr", "EURLibor8MPtr *", 0, 0, (void*)"QuantLib::EURLibor8M", 0};
static swig_type_info _swigt__p_EURLibor9MPtr = {"_p_EURLibor9MPtr", "EURLibor9MPtr *", 0, 0, (void*)"QuantLib::EURLibor9M", 0};
static swig_type_info _swigt__p_EURLiborPtr = {"_p_EURLiborPtr", "EURLiborPtr *", 0, 0, (void*)"QuantLib::EURLibor", 0};
static swig_type_info _swigt__p_EURLiborSWPtr = {"_p_EURLiborSWPtr", "EURLiborSWPtr *", 0, 0, (void*)"QuantLib::EURLiborSW", 0};
static swig_type_info _swigt__p_EndCriteria = {"_p_EndCriteria", "EndCriteria *", 0, 0, (void*)"QuantLib::EndCriteria", 0};
static swig_type_info _swigt__p_EndCriteria__Type = {"_p_EndCriteria__Type", "enum EndCriteria::Type *|EndCriteria::Type *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_EoniaPtr = {"_p_EoniaPtr", "EoniaPtr *", 0, 0, (void*)"QuantLib::Eonia", 0};
static swig_type_info _swigt__p_EurLiborSwapIfrFixPtr = {"_p_EurLiborSwapIfrFixPtr", "EurLiborSwapIfrFixPtr *", 0, 0, (void*)"QuantLib::EurLiborSwapIfrFix", 0};
static swig_type_info _swigt__p_EurLiborSwapIsdaFixAPtr = {"_p_EurLiborSwapIsdaFixAPtr", "EurLiborSwapIsdaFixAPtr *", 0, 0, (void*)"QuantLib::EurLiborSwapIsdaFixA", 0};
static swig_type_info _swigt__p_EurLiborSwapIsdaFixBPtr = {"_p_EurLiborSwapIsdaFixBPtr", "EurLiborSwapIsdaFixBPtr *", 0, 0, (void*)"QuantLib::EurLiborSwapIsdaFixB", 0};
static swig_type_info _swigt__p_Euribor10MPtr = {"_p_Euribor10MPtr", "Euribor10MPtr *", 0, 0, (void*)"QuantLib::Euribor10M", 0};
static swig_type_info _swigt__p_Euribor11MPtr = {"_p_Euribor11MPtr", "Euribor11MPtr *", 0, 0, (void*)"QuantLib::Euribor11M", 0};
static swig_type_info _swigt__p_Euribor1MPtr = {"_p_Euribor1MPtr", "Euribor1MPtr *", 0, 0, (void*)"QuantLib::Euribor1M", 0};
static swig_type_info _swigt__p_Euribor1YPtr = {"_p_Euribor1YPtr", "Euribor1YPtr *", 0, 0, (void*)"QuantLib::Euribor1Y", 0};
static swig_type_info _swigt__p_Euribor2MPtr = {"_p_Euribor2MPtr", "Euribor2MPtr *", 0, 0, (void*)"QuantLib::Euribor2M", 0};
static swig_type_info _swigt__p_Euribor2WPtr = {"_p_Euribor2WPtr", "Euribor2WPtr *", 0, 0, (void*)"QuantLib::Euribor2W", 0};
static swig_type_info _swigt__p_Euribor365Ptr = {"_p_Euribor365Ptr", "Euribor365Ptr *", 0, 0, (void*)"QuantLib::Euribor365", 0};
static swig_type_info _swigt__p_Euribor365_10MPtr = {"_p_Euribor365_10MPtr", "Euribor365_10MPtr *", 0, 0, (void*)"QuantLib::Euribor365_10M", 0};
static swig_type_info _swigt__p_Euribor365_11MPtr = {"_p_Euribor365_11MPtr", "Euribor365_11MPtr *", 0, 0, (void*)"QuantLib::Euribor365_11M", 0};
static swig_type_info _swigt__p_Euribor365_1MPtr = {"_p_Euribor365_1MPtr", "Euribor365_1MPtr *", 0, 0, (void*)"QuantLib::Euribor365_1M", 0};
static swig_type_info _swigt__p_Euribor365_1YPtr = {"_p_Euribor365_1YPtr", "Euribor365_1YPtr *", 0, 0, (void*)"QuantLib::Euribor365_1Y", 0};
static swig_type_info _swigt__p_Euribor365_2MPtr = {"_p_Euribor365_2MPtr", "Euribor365_2MPtr *", 0, 0, (void*)"QuantLib::Euribor365_2M", 0};
static swig_type_info _swigt__p_Euribor365_2WPtr = {"_p_Euribor365_2WPtr", "Euribor365_2WPtr *", 0, 0, (void*)"QuantLib::Euribor365_2W", 0};
static swig_type_info _swigt__p_Euribor365_3MPtr = {"_p_Euribor365_3MPtr", "Euribor365_3MPtr *", 0, 0, (void*)"QuantLib::Euribor365_3M", 0};
static swig_type_info _swigt__p_Euribor365_3WPtr = {"_p_Euribor365_3WPtr", "Euribor365_3WPtr *", 0, 0, (void*)"QuantLib::Euribor365_3W", 0};
static swig_type_info _swigt__p_Euribor365_4MPtr = {"_p_Euribor365_4MPtr", "Euribor365_4MPtr *", 0, 0, (void*)"QuantLib::Euribor365_4M", 0};
static swig_type_info _swigt__p_Euribor365_5MPtr = {"_p_Euribor365_5MPtr", "Euribor365_5MPtr *", 0, 0, (void*)"QuantLib::Euribor365_5M", 0};
static swig_type_info _swigt__p_Euribor365_6MPtr = {"_p_Euribor365_6MPtr", "Euribor365_6MPtr *", 0, 0, (void*)"QuantLib::Euribor365_6M", 0};
static swig_type_info _swigt__p_Euribor365_7MPtr = {"_p_Euribor365_7MPtr", "Euribor365_7MPtr *", 0, 0, (void*)"QuantLib::Euribor365_7M", 0};
static swig_type_info _swigt__p_Euribor365_8MPtr = {"_p_Euribor365_8MPtr", "Euribor365_8MPtr *", 0, 0, (void*)"QuantLib::Euribor365_8M", 0};
static swig_type_info _swigt__p_Euribor365_9MPtr = {"_p_Euribor365_9MPtr", "Euribor365_9MPtr *", 0, 0, (void*)"QuantLib::Euribor365_9M", 0};
static swig_type_info _swigt__p_Euribor365_SWPtr = {"_p_Euribor365_SWPtr", "Euribor365_SWPtr *", 0, 0, (void*)"QuantLib::Euribor365_SW", 0};
static swig_type_info _swigt__p_Euribor3MPtr = {"_p_Euribor3MPtr", "Euribor3MPtr *", 0, 0, (void*)"QuantLib::Euribor3M", 0};
static swig_type_info _swigt__p_Euribor3WPtr = {"_p_Euribor3WPtr", "Euribor3WPtr *", 0, 0, (void*)"QuantLib::Euribor3W", 0};
static swig_type_info _swigt__p_Euribor4MPtr = {"_p_Euribor4MPtr", "Euribor4MPtr *", 0, 0, (void*)"QuantLib::Euribor4M", 0};
static swig_type_info _swigt__p_Euribor5MPtr = {"_p_Euribor5MPtr", "Euribor5MPtr *", 0, 0, (void*)"QuantLib::Euribor5M", 0};
static swig_type_info _swigt__p_Euribor6MPtr = {"_p_Euribor6MPtr", "Euribor6MPtr *", 0, 0, (void*)"QuantLib::Euribor6M", 0};
static swig_type_info _swigt__p_Euribor7MPtr = {"_p_Euribor7MPtr", "Euribor7MPtr *", 0, 0, (void*)"QuantLib::Euribor7M", 0};
static swig_type_info _swigt__p_Euribor8MPtr = {"_p_Euribor8MPtr", "Euribor8MPtr *", 0, 0, (void*)"QuantLib::Euribor8M", 0};
static swig_type_info _swigt__p_Euribor9MPtr = {"_p_Euribor9MPtr", "Euribor9MPtr *", 0, 0, (void*)"QuantLib::Euribor9M", 0};
static swig_type_info _swigt__p_EuriborPtr = {"_p_EuriborPtr", "EuriborPtr *", 0, 0, (void*)"QuantLib::Euribor", 0};
static swig_type_info _swigt__p_EuriborSWPtr = {"_p_EuriborSWPtr", "EuriborSWPtr *", 0, 0, (void*)"QuantLib::EuriborSW", 0};
static swig_type_info _swigt__p_EuriborSwapIfrFixPtr = {"_p_EuriborSwapIfrFixPtr", "EuriborSwapIfrFixPtr *", 0, 0, (void*)"QuantLib::EuriborSwapIfrFix", 0};
static swig_type_info _swigt__p_EuriborSwapIsdaFixAPtr = {"_p_EuriborSwapIsdaFixAPtr", "EuriborSwapIsdaFixAPtr *", 0, 0, (void*)"QuantLib::EuriborSwapIsdaFixA", 0};
static swig_type_info _swigt__p_EuriborSwapIsdaFixBPtr = {"_p_EuriborSwapIsdaFixBPtr", "EuriborSwapIsdaFixBPtr *", 0, 0, (void*)"QuantLib::EuriborSwapIsdaFixB", 0};
static swig_type_info _swigt__p_EuropeanExercisePtr = {"_p_EuropeanExercisePtr", "EuropeanExercisePtr *", 0, 0, (void*)"QuantLib::EuropeanExercise", 0};
static swig_type_info _swigt__p_EuropeanOptionPtr = {"_p_EuropeanOptionPtr", "EuropeanOptionPtr *", 0, 0, (void*)"QuantLib::EuropeanOption", 0};
static swig_type_info _swigt__p_EverestOptionPtr = {"_p_EverestOptionPtr", "EverestOptionPtr *", 0, 0, (void*)"QuantLib::EverestOption", 0};
static swig_type_info _swigt__p_ExchangeRate = {"_p_ExchangeRate", "ExchangeRate *", 0, 0, (void*)"QuantLib::ExchangeRate", 0};
static swig_type_info _swigt__p_ExchangeRateManager = {"_p_ExchangeRateManager", "ExchangeRateManager *", 0, 0, (void*)"QuantLib::ExchangeRateManager", 0};
static swig_type_info _swigt__p_Exercise = {"_p_Exercise", "Exercise *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_ExponentialSplinesFitting = {"_p_ExponentialSplinesFitting", "ExponentialSplinesFitting *", 0, 0, (void*)"QuantLib::ExponentialSplinesFitting", 0};
static swig_type_info _swigt__p_Extrapolator = {"_p_Extrapolator", "Extrapolator *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_FDAmericanEnginePtr = {"_p_FDAmericanEnginePtr", "FDAmericanEnginePtr *", 0, 0, (void*)"QuantLib::FDAmericanEngine", 0};
static swig_type_info _swigt__p_FDBermudanEnginePtr = {"_p_FDBermudanEnginePtr", "FDBermudanEnginePtr *", 0, 0, (void*)"QuantLib::FDBermudanEngine", 0};
static swig_type_info _swigt__p_FDDividendAmericanEnginePtr = {"_p_FDDividendAmericanEnginePtr", "FDDividendAmericanEnginePtr *", 0, 0, (void*)"QuantLib::FDDividendAmericanEngine", 0};
static swig_type_info _swigt__p_FDDividendEuropeanEnginePtr = {"_p_FDDividendEuropeanEnginePtr", "FDDividendEuropeanEnginePtr *", 0, 0, (void*)"QuantLib::FDDividendEuropeanEngine", 0};
static swig_type_info _swigt__p_FDEuropeanEnginePtr = {"_p_FDEuropeanEnginePtr", "FDEuropeanEnginePtr *", 0, 0, (void*)"QuantLib::FDEuropeanEngine", 0};
static swig_type_info _swigt__p_FDShoutEnginePtr = {"_p_FDShoutEnginePtr", "FDShoutEnginePtr *", 0, 0, (void*)"QuantLib::FDShoutEngine", 0};
static swig_type_info _swigt__p_FFTVarianceGammaEnginePtr = {"_p_FFTVarianceGammaEnginePtr", "FFTVarianceGammaEnginePtr *", 0, 0, (void*)"QuantLib::FFTVarianceGammaEngine", 0};
static swig_type_info _swigt__p_FRHICPPtr = {"_p_FRHICPPtr", "FRHICPPtr *", 0, 0, (void*)"QuantLib::FRHICP", 0};
static swig_type_info _swigt__p_FalsePosition = {"_p_FalsePosition", "FalsePosition *", 0, 0, (void*)"QuantLib::FalsePosition", 0};
static swig_type_info _swigt__p_FdBatesVanillaEnginePtr = {"_p_FdBatesVanillaEnginePtr", "FdBatesVanillaEnginePtr *", 0, 0, (void*)"QuantLib::FdBatesVanillaEngine", 0};
static swig_type_info _swigt__p_FdBlackScholesAsianEnginePtr = {"_p_FdBlackScholesAsianEnginePtr", "FdBlackScholesAsianEnginePtr *", 0, 0, (void*)"QuantLib::FdBlackScholesAsianEngine", 0};
static swig_type_info _swigt__p_FdBlackScholesBarrierEnginePtr = {"_p_FdBlackScholesBarrierEnginePtr", "FdBlackScholesBarrierEnginePtr *", 0, 0, (void*)"QuantLib::FdBlackScholesBarrierEngine", 0};
static swig_type_info _swigt__p_FdBlackScholesVanillaEnginePtr = {"_p_FdBlackScholesVanillaEnginePtr", "FdBlackScholesVanillaEnginePtr *", 0, 0, (void*)"QuantLib::FdBlackScholesVanillaEngine", 0};
static swig_type_info _swigt__p_FdG2SwaptionEnginePtr = {"_p_FdG2SwaptionEnginePtr", "FdG2SwaptionEnginePtr *", 0, 0, (void*)"QuantLib::FdG2SwaptionEngine", 0};
static swig_type_info _swigt__p_FdHullWhiteSwaptionEnginePtr = {"_p_FdHullWhiteSwaptionEnginePtr", "FdHullWhiteSwaptionEnginePtr *", 0, 0, (void*)"QuantLib::FdHullWhiteSwaptionEngine", 0};
static swig_type_info _swigt__p_FdmSchemeDesc = {"_p_FdmSchemeDesc", "FdmSchemeDesc *", 0, 0, (void*)"QuantLib::FdmSchemeDesc", 0};
static swig_type_info _swigt__p_FedFundsPtr = {"_p_FedFundsPtr", "FedFundsPtr *", 0, 0, (void*)"QuantLib::FedFunds", 0};
static swig_type_info _swigt__p_FittedBondDiscountCurvePtr = {"_p_FittedBondDiscountCurvePtr", "FittedBondDiscountCurvePtr *", 0, 0, (void*)"QuantLib::FittedBondDiscountCurve", 0};
static swig_type_info _swigt__p_FittingMethod = {"_p_FittingMethod", "FittingMethod *", 0, 0, (void*)"QuantLib::FittingMethod", 0};
static swig_type_info _swigt__p_FixedDividendPtr = {"_p_FixedDividendPtr", "FixedDividendPtr *", 0, 0, (void*)"QuantLib::FixedDividend", 0};
static swig_type_info _swigt__p_FixedRateBondForwardPtr = {"_p_FixedRateBondForwardPtr", "FixedRateBondForwardPtr *", 0, 0, (void*)"QuantLib::FixedRateBondForward", 0};
static swig_type_info _swigt__p_FixedRateBondHelperPtr = {"_p_FixedRateBondHelperPtr", "FixedRateBondHelperPtr *", 0, 0, (void*)"QuantLib::FixedRateBondHelper", 0};
static swig_type_info _swigt__p_FixedRateBondPtr = {"_p_FixedRateBondPtr", "FixedRateBondPtr *", 0, 0, (void*)"QuantLib::FixedRateBond", 0};
static swig_type_info _swigt__p_FixedRateCouponPtr = {"_p_FixedRateCouponPtr", "FixedRateCouponPtr *", 0, 0, (void*)"QuantLib::FixedRateCoupon", 0};
static swig_type_info _swigt__p_FlatForwardPtr = {"_p_FlatForwardPtr", "FlatForwardPtr *", 0, 0, (void*)"QuantLib::FlatForward", 0};
static swig_type_info _swigt__p_FlatHazardRatePtr = {"_p_FlatHazardRatePtr", "FlatHazardRatePtr *", 0, 0, (void*)"QuantLib::FlatHazardRate", 0};
static swig_type_info _swigt__p_FloatFloatSwapPtr = {"_p_FloatFloatSwapPtr", "FloatFloatSwapPtr *", 0, 0, (void*)"QuantLib::FloatFloatSwap", 0};
static swig_type_info _swigt__p_FloatFloatSwaptionPtr = {"_p_FloatFloatSwaptionPtr", "FloatFloatSwaptionPtr *", 0, 0, (void*)"QuantLib::FloatFloatSwaption", 0};
static swig_type_info _swigt__p_FloatingRateBondPtr = {"_p_FloatingRateBondPtr", "FloatingRateBondPtr *", 0, 0, (void*)"QuantLib::FloatingRateBond", 0};
static swig_type_info _swigt__p_FloatingRateCouponPricer = {"_p_FloatingRateCouponPricer", "FloatingRateCouponPricer *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_FloatingRateCouponPtr = {"_p_FloatingRateCouponPtr", "FloatingRateCouponPtr *", 0, 0, (void*)"QuantLib::FloatingRateCoupon", 0};
static swig_type_info _swigt__p_FloorPtr = {"_p_FloorPtr", "FloorPtr *", 0, 0, (void*)"QuantLib::Floor", 0};
static swig_type_info _swigt__p_FloorTruncation = {"_p_FloorTruncation", "FloorTruncation *", 0, 0, (void*)"QuantLib::FloorTruncation", 0};
static swig_type_info _swigt__p_ForwardCurvePtr = {"_p_ForwardCurvePtr", "ForwardCurvePtr *", 0, 0, (void*)"QuantLib::ForwardCurve", 0};
static swig_type_info _swigt__p_ForwardEuropeanEnginePtr = {"_p_ForwardEuropeanEnginePtr", "ForwardEuropeanEnginePtr *", 0, 0, (void*)"QuantLib::ForwardEuropeanEngine", 0};
static swig_type_info _swigt__p_ForwardFlat = {"_p_ForwardFlat", "ForwardFlat *", 0, 0, (void*)"QuantLib::ForwardFlat", 0};
static swig_type_info _swigt__p_ForwardFlatZeroCurvePtr = {"_p_ForwardFlatZeroCurvePtr", "ForwardFlatZeroCurvePtr *", 0, 0, (void*)"QuantLib::ForwardFlatZeroCurve", 0};
static swig_type_info _swigt__p_ForwardPtr = {"_p_ForwardPtr", "ForwardPtr *", 0, 0, (void*)"QuantLib::Forward", 0};
static swig_type_info _swigt__p_ForwardRate = {"_p_ForwardRate", "ForwardRate *", 0, 0, (void*)"QuantLib::ForwardRate", 0};
static swig_type_info _swigt__p_ForwardRateAgreementPtr = {"_p_ForwardRateAgreementPtr", "ForwardRateAgreementPtr *", 0, 0, (void*)"QuantLib::ForwardRateAgreement", 0};
static swig_type_info _swigt__p_ForwardSpreadedTermStructurePtr = {"_p_ForwardSpreadedTermStructurePtr", "ForwardSpreadedTermStructurePtr *", 0, 0, (void*)"QuantLib::ForwardSpreadedTermStructure", 0};
static swig_type_info _swigt__p_ForwardVanillaOptionPtr = {"_p_ForwardVanillaOptionPtr", "ForwardVanillaOptionPtr *", 0, 0, (void*)"QuantLib::ForwardVanillaOption", 0};
static swig_type_info _swigt__p_FraRateHelperPtr = {"_p_FraRateHelperPtr", "FraRateHelperPtr *", 0, 0, (void*)"QuantLib::FraRateHelper", 0};
static swig_type_info _swigt__p_FractionalDividendPtr = {"_p_FractionalDividendPtr", "FractionalDividendPtr *", 0, 0, (void*)"QuantLib::FractionalDividend", 0};
static swig_type_info _swigt__p_Futures = {"_p_Futures", "Futures *", 0, 0, (void*)"QuantLib::Futures", 0};
static swig_type_info _swigt__p_FuturesRateHelperPtr = {"_p_FuturesRateHelperPtr", "FuturesRateHelperPtr *", 0, 0, (void*)"QuantLib::FuturesRateHelper", 0};
static swig_type_info _swigt__p_FxSwapRateHelperPtr = {"_p_FxSwapRateHelperPtr", "FxSwapRateHelperPtr *", 0, 0, (void*)"QuantLib::FxSwapRateHelper", 0};
static swig_type_info _swigt__p_G2Ptr = {"_p_G2Ptr", "G2Ptr *", 0, 0, (void*)"QuantLib::G2", 0};
static swig_type_info _swigt__p_G2SwaptionEnginePtr = {"_p_G2SwaptionEnginePtr", "G2SwaptionEnginePtr *", 0, 0, (void*)"QuantLib::G2SwaptionEngine", 0};
static swig_type_info _swigt__p_GBPLiborPtr = {"_p_GBPLiborPtr", "GBPLiborPtr *", 0, 0, (void*)"QuantLib::GBPLibor", 0};
static swig_type_info _swigt__p_GFunctionFactory = {"_p_GFunctionFactory", "GFunctionFactory *", 0, 0, (void*)"QuantLib::GFunctionFactory", 0};
static swig_type_info _swigt__p_GammaFunction = {"_p_GammaFunction", "GammaFunction *", 0, 0, (void*)"QuantLib::GammaFunction", 0};
static swig_type_info _swigt__p_GapPayoffPtr = {"_p_GapPayoffPtr", "GapPayoffPtr *", 0, 0, (void*)"QuantLib::GapPayoff", 0};
static swig_type_info _swigt__p_GarmanKlassSigma1 = {"_p_GarmanKlassSigma1", "GarmanKlassSigma1 *", 0, 0, (void*)"QuantLib::GarmanKlassSigma1", 0};
static swig_type_info _swigt__p_GarmanKlassSigma3 = {"_p_GarmanKlassSigma3", "GarmanKlassSigma3 *", 0, 0, (void*)"QuantLib::GarmanKlassSigma3", 0};
static swig_type_info _swigt__p_GarmanKlassSigma4 = {"_p_GarmanKlassSigma4", "GarmanKlassSigma4 *", 0, 0, (void*)"QuantLib::GarmanKlassSigma4", 0};
static swig_type_info _swigt__p_GarmanKlassSigma5 = {"_p_GarmanKlassSigma5", "GarmanKlassSigma5 *", 0, 0, (void*)"QuantLib::GarmanKlassSigma5", 0};
static swig_type_info _swigt__p_GarmanKlassSigma6 = {"_p_GarmanKlassSigma6", "GarmanKlassSigma6 *", 0, 0, (void*)"QuantLib::GarmanKlassSigma6", 0};
static swig_type_info _swigt__p_GarmanKohlagenProcessPtr = {"_p_GarmanKohlagenProcessPtr", "GarmanKohlagenProcessPtr *", 0, 0, (void*)"QuantLib::GarmanKohlagenProcess", 0};
static swig_type_info _swigt__p_GaussChebyshev2ndIntegration = {"_p_GaussChebyshev2ndIntegration", "GaussChebyshev2ndIntegration *", 0, 0, (void*)"QuantLib::GaussChebyshev2ndIntegration", 0};
static swig_type_info _swigt__p_GaussChebyshevIntegration = {"_p_GaussChebyshevIntegration", "GaussChebyshevIntegration *", 0, 0, (void*)"QuantLib::GaussChebyshevIntegration", 0};
static swig_type_info _swigt__p_GaussGegenbauerIntegration = {"_p_GaussGegenbauerIntegration", "GaussGegenbauerIntegration *", 0, 0, (void*)"QuantLib::GaussGegenbauerIntegration", 0};
static swig_type_info _swigt__p_GaussHermiteIntegration = {"_p_GaussHermiteIntegration", "GaussHermiteIntegration *", 0, 0, (void*)"QuantLib::GaussHermiteIntegration", 0};
static swig_type_info _swigt__p_GaussHyperbolicIntegration = {"_p_GaussHyperbolicIntegration", "GaussHyperbolicIntegration *", 0, 0, (void*)"QuantLib::GaussHyperbolicIntegration", 0};
static swig_type_info _swigt__p_GaussJacobiIntegration = {"_p_GaussJacobiIntegration", "GaussJacobiIntegration *", 0, 0, (void*)"QuantLib::GaussJacobiIntegration", 0};
static swig_type_info _swigt__p_GaussKronrodAdaptive = {"_p_GaussKronrodAdaptive", "GaussKronrodAdaptive *", 0, 0, (void*)"QuantLib::GaussKronrodAdaptive", 0};
static swig_type_info _swigt__p_GaussKronrodNonAdaptive = {"_p_GaussKronrodNonAdaptive", "GaussKronrodNonAdaptive *", 0, 0, (void*)"QuantLib::GaussKronrodNonAdaptive", 0};
static swig_type_info _swigt__p_GaussLaguerreIntegration = {"_p_GaussLaguerreIntegration", "GaussLaguerreIntegration *", 0, 0, (void*)"QuantLib::GaussLaguerreIntegration", 0};
static swig_type_info _swigt__p_GaussLegendreIntegration = {"_p_GaussLegendreIntegration", "GaussLegendreIntegration *", 0, 0, (void*)"QuantLib::GaussLegendreIntegration", 0};
static swig_type_info _swigt__p_GaussLobattoIntegral = {"_p_GaussLobattoIntegral", "GaussLobattoIntegral *", 0, 0, (void*)"QuantLib::GaussLobattoIntegral", 0};
static swig_type_info _swigt__p_Gaussian1dFloatFloatSwaptionEnginePtr = {"_p_Gaussian1dFloatFloatSwaptionEnginePtr", "Gaussian1dFloatFloatSwaptionEnginePtr *", 0, 0, (void*)"QuantLib::Gaussian1dFloatFloatSwaptionEngine", 0};
static swig_type_info _swigt__p_Gaussian1dJamshidianSwaptionEnginePtr = {"_p_Gaussian1dJamshidianSwaptionEnginePtr", "Gaussian1dJamshidianSwaptionEnginePtr *", 0, 0, (void*)"QuantLib::Gaussian1dJamshidianSwaptionEngine", 0};
static swig_type_info _swigt__p_Gaussian1dModel = {"_p_Gaussian1dModel", "Gaussian1dModel *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Gaussian1dNonstandardSwaptionEnginePtr = {"_p_Gaussian1dNonstandardSwaptionEnginePtr", "Gaussian1dNonstandardSwaptionEnginePtr *", 0, 0, (void*)"QuantLib::Gaussian1dNonstandardSwaptionEngine", 0};
static swig_type_info _swigt__p_Gaussian1dSwaptionEnginePtr = {"_p_Gaussian1dSwaptionEnginePtr", "Gaussian1dSwaptionEnginePtr *", 0, 0, (void*)"QuantLib::Gaussian1dSwaptionEngine", 0};
static swig_type_info _swigt__p_GaussianLowDiscrepancySequenceGenerator = {"_p_GaussianLowDiscrepancySequenceGenerator", "GaussianLowDiscrepancySequenceGenerator *", 0, 0, (void*)"QuantLib::GaussianLowDiscrepancySequenceGenerator", 0};
static swig_type_info _swigt__p_GaussianMultiPathGenerator = {"_p_GaussianMultiPathGenerator", "GaussianMultiPathGenerator *", 0, 0, (void*)"QuantLib::GaussianMultiPathGenerator", 0};
static swig_type_info _swigt__p_GaussianPathGenerator = {"_p_GaussianPathGenerator", "GaussianPathGenerator *", 0, 0, (void*)"QuantLib::GaussianPathGenerator", 0};
static swig_type_info _swigt__p_GaussianRandomGenerator = {"_p_GaussianRandomGenerator", "GaussianRandomGenerator *", 0, 0, (void*)"QuantLib::GaussianRandomGenerator", 0};
static swig_type_info _swigt__p_GaussianRandomSequenceGenerator = {"_p_GaussianRandomSequenceGenerator", "GaussianRandomSequenceGenerator *", 0, 0, (void*)"QuantLib::GaussianRandomSequenceGenerator", 0};
static swig_type_info _swigt__p_GaussianSimulatedAnnealing = {"_p_GaussianSimulatedAnnealing", "GaussianSimulatedAnnealing *", 0, 0, (void*)"QuantLib::GaussianSimulatedAnnealing", 0};
static swig_type_info _swigt__p_GaussianSobolPathGenerator = {"_p_GaussianSobolPathGenerator", "GaussianSobolPathGenerator *", 0, 0, (void*)"QuantLib::GaussianSobolPathGenerator", 0};
static swig_type_info _swigt__p_GeneralizedBlackScholesProcessPtr = {"_p_GeneralizedBlackScholesProcessPtr", "GeneralizedBlackScholesProcessPtr *", 0, 0, (void*)"QuantLib::GeneralizedBlackScholesProcess", 0};
static swig_type_info _swigt__p_GenericSequenceStatisticsT_IncrementalStatistics_t = {"_p_GenericSequenceStatisticsT_IncrementalStatistics_t", "GenericSequenceStatistics< IncrementalStatistics > *", 0, 0, (void*)"QuantLib::MultipleIncrementalStatistics", 0};
static swig_type_info _swigt__p_GenericSequenceStatisticsT_RiskStatistics_t = {"_p_GenericSequenceStatisticsT_RiskStatistics_t", "GenericSequenceStatistics< RiskStatistics > *", 0, 0, (void*)"QuantLib::SequenceStatistics", 0};
static swig_type_info _swigt__p_GenericSequenceStatisticsT_Statistics_t = {"_p_GenericSequenceStatisticsT_Statistics_t", "GenericSequenceStatistics< Statistics > *", 0, 0, (void*)"QuantLib::MultipleStatistics", 0};
static swig_type_info _swigt__p_GeometricBrownianMotionProcessPtr = {"_p_GeometricBrownianMotionProcessPtr", "GeometricBrownianMotionProcessPtr *", 0, 0, (void*)"QuantLib::GeometricBrownianMotionProcess", 0};
static swig_type_info _swigt__p_GsrProcessPtr = {"_p_GsrProcessPtr", "GsrProcessPtr *", 0, 0, (void*)"QuantLib::GsrProcess", 0};
static swig_type_info _swigt__p_GsrPtr = {"_p_GsrPtr", "GsrPtr *", 0, 0, (void*)"QuantLib::Gsr", 0};
static swig_type_info _swigt__p_HaltonRsg = {"_p_HaltonRsg", "HaltonRsg *", 0, 0, (void*)"QuantLib::HaltonRsg", 0};
static swig_type_info _swigt__p_HandleT_BlackVolTermStructure_t = {"_p_HandleT_BlackVolTermStructure_t", "Handle< BlackVolTermStructure > *", 0, 0, (void*)"QuantLib::BlackVolTermStructureHandle", 0};
static swig_type_info _swigt__p_HandleT_CalibratedModel_t = {"_p_HandleT_CalibratedModel_t", "Handle< CalibratedModel > *", 0, 0, (void*)"QuantLib::CalibratedModelHandle", 0};
static swig_type_info _swigt__p_HandleT_CapFloorTermVolatilityStructure_t = {"_p_HandleT_CapFloorTermVolatilityStructure_t", "Handle< CapFloorTermVolatilityStructure > *", 0, 0, (void*)"QuantLib::CapFloorTermVolatilityStructureHandle", 0};
static swig_type_info _swigt__p_HandleT_DefaultProbabilityTermStructure_t = {"_p_HandleT_DefaultProbabilityTermStructure_t", "Handle< DefaultProbabilityTermStructure > *", 0, 0, (void*)"QuantLib::DefaultProbabilityTermStructureHandle", 0};
static swig_type_info _swigt__p_HandleT_DeltaVolQuote_t = {"_p_HandleT_DeltaVolQuote_t", "Handle< DeltaVolQuote > *", 0, 0, (void*)"QuantLib::DeltaVolQuoteHandle", 0};
static swig_type_info _swigt__p_HandleT_LocalVolTermStructure_t = {"_p_HandleT_LocalVolTermStructure_t", "Handle< LocalVolTermStructure > *", 0, 0, (void*)"QuantLib::LocalVolTermStructureHandle", 0};
static swig_type_info _swigt__p_HandleT_OptionletVolatilityStructure_t = {"_p_HandleT_OptionletVolatilityStructure_t", "Handle< OptionletVolatilityStructure > *", 0, 0, (void*)"QuantLib::OptionletVolatilityStructureHandle", 0};
static swig_type_info _swigt__p_HandleT_Quote_t = {"_p_HandleT_Quote_t", "Handle< Quote > *", 0, 0, (void*)"QuantLib::QuoteHandle", 0};
static swig_type_info _swigt__p_HandleT_ShortRateModel_t = {"_p_HandleT_ShortRateModel_t", "Handle< ShortRateModel > *", 0, 0, (void*)"QuantLib::ShortRateModelHandle", 0};
static swig_type_info _swigt__p_HandleT_SwaptionVolatilityStructure_t = {"_p_HandleT_SwaptionVolatilityStructure_t", "Handle< SwaptionVolatilityStructure > *", 0, 0, (void*)"QuantLib::SwaptionVolatilityStructureHandle", 0};
static swig_type_info _swigt__p_HandleT_YieldTermStructure_t = {"_p_HandleT_YieldTermStructure_t", "Handle< YieldTermStructure > *", 0, 0, (void*)"QuantLib::YieldTermStructureHandle", 0};
static swig_type_info _swigt__p_HandleT_YoYInflationTermStructure_t = {"_p_HandleT_YoYInflationTermStructure_t", "Handle< YoYInflationTermStructure > *", 0, 0, (void*)"QuantLib::YoYInflationTermStructureHandle", 0};
static swig_type_info _swigt__p_HandleT_ZeroInflationTermStructure_t = {"_p_HandleT_ZeroInflationTermStructure_t", "Handle< ZeroInflationTermStructure > *", 0, 0, (void*)"QuantLib::ZeroInflationTermStructureHandle", 0};
static swig_type_info _swigt__p_HazardRate = {"_p_HazardRate", "HazardRate *", 0, 0, (void*)"QuantLib::HazardRate", 0};
static swig_type_info _swigt__p_HazardRateCurvePtr = {"_p_HazardRateCurvePtr", "HazardRateCurvePtr *", 0, 0, (void*)"QuantLib::HazardRateCurve", 0};
static swig_type_info _swigt__p_HestonModelHelperPtr = {"_p_HestonModelHelperPtr", "HestonModelHelperPtr *", 0, 0, (void*)"QuantLib::HestonModelHelper", 0};
static swig_type_info _swigt__p_HestonModelPtr = {"_p_HestonModelPtr", "HestonModelPtr *", 0, 0, (void*)"QuantLib::HestonModel", 0};
static swig_type_info _swigt__p_HestonProcessPtr = {"_p_HestonProcessPtr", "HestonProcessPtr *", 0, 0, (void*)"QuantLib::HestonProcess", 0};
static swig_type_info _swigt__p_HimalayaOptionPtr = {"_p_HimalayaOptionPtr", "HimalayaOptionPtr *", 0, 0, (void*)"QuantLib::HimalayaOption", 0};
static swig_type_info _swigt__p_HullWhiteForwardProcessPtr = {"_p_HullWhiteForwardProcessPtr", "HullWhiteForwardProcessPtr *", 0, 0, (void*)"QuantLib::HullWhiteForwardProcess", 0};
static swig_type_info _swigt__p_HullWhiteProcessPtr = {"_p_HullWhiteProcessPtr", "HullWhiteProcessPtr *", 0, 0, (void*)"QuantLib::HullWhiteProcess", 0};
static swig_type_info _swigt__p_HullWhitePtr = {"_p_HullWhitePtr", "HullWhitePtr *", 0, 0, (void*)"QuantLib::HullWhite", 0};
static swig_type_info _swigt__p_IMM = {"_p_IMM", "IMM *", 0, 0, (void*)"QuantLib::IMM", 0};
static swig_type_info _swigt__p_IborCouponPricerPtr = {"_p_IborCouponPricerPtr", "IborCouponPricerPtr *", 0, 0, (void*)"QuantLib::IborCouponPricer", 0};
static swig_type_info _swigt__p_IborCouponPtr = {"_p_IborCouponPtr", "IborCouponPtr *", 0, 0, (void*)"QuantLib::IborCoupon", 0};
static swig_type_info _swigt__p_IborIndexPtr = {"_p_IborIndexPtr", "IborIndexPtr *", 0, 0, (void*)"QuantLib::IborIndex", 0};
static swig_type_info _swigt__p_ImpliedTermStructurePtr = {"_p_ImpliedTermStructurePtr", "ImpliedTermStructurePtr *", 0, 0, (void*)"QuantLib::ImpliedTermStructure", 0};
static swig_type_info _swigt__p_IncrementalStatistics = {"_p_IncrementalStatistics", "IncrementalStatistics *", 0, 0, (void*)"QuantLib::IncrementalStatistics", 0};
static swig_type_info _swigt__p_Index = {"_p_Index", "Index *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_IndexManager = {"_p_IndexManager", "IndexManager *", 0, 0, (void*)"QuantLib::IndexManager", 0};
static swig_type_info _swigt__p_InflationIndexPtr = {"_p_InflationIndexPtr", "InflationIndexPtr *", 0, 0, (void*)"QuantLib::InflationIndex", 0};
static swig_type_info _swigt__p_InflationTermStructure = {"_p_InflationTermStructure", "InflationTermStructure *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Instrument = {"_p_Instrument", "Instrument *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_IntegralCdsEnginePtr = {"_p_IntegralCdsEnginePtr", "IntegralCdsEnginePtr *", 0, 0, (void*)"QuantLib::IntegralCdsEngine", 0};
static swig_type_info _swigt__p_IntegralEnginePtr = {"_p_IntegralEnginePtr", "IntegralEnginePtr *", 0, 0, (void*)"QuantLib::IntegralEngine", 0};
static swig_type_info _swigt__p_InterestRate = {"_p_InterestRate", "InterestRate *", 0, 0, (void*)"QuantLib::InterestRate", 0};
static swig_type_info _swigt__p_InterestRateIndexPtr = {"_p_InterestRateIndexPtr", "InterestRateIndexPtr *", 0, 0, (void*)"QuantLib::InterestRateIndex", 0};
static swig_type_info _swigt__p_IntervalPrice = {"_p_IntervalPrice", "IntervalPrice *", 0, 0, (void*)"QuantLib::IntervalPrice", 0};
static swig_type_info _swigt__p_InverseCumulativeNormal = {"_p_InverseCumulativeNormal", "InverseCumulativeNormal *", 0, 0, (void*)"QuantLib::InverseCumulativeNormal", 0};
static swig_type_info _swigt__p_InverseCumulativePoisson = {"_p_InverseCumulativePoisson", "InverseCumulativePoisson *", 0, 0, (void*)"QuantLib::InverseCumulativePoisson", 0};
static swig_type_info _swigt__p_InverseCumulativeRngT_KnuthUniformRng_InverseCumulativeNormal_t = {"_p_InverseCumulativeRngT_KnuthUniformRng_InverseCumulativeNormal_t", "InverseCumulativeRng< KnuthUniformRng,InverseCumulativeNormal > *", 0, 0, (void*)"QuantLib::InvCumulativeKnuthGaussianRng", 0};
static swig_type_info _swigt__p_InverseCumulativeRngT_KnuthUniformRng_MoroInverseCumulativeNormal_t = {"_p_InverseCumulativeRngT_KnuthUniformRng_MoroInverseCumulativeNormal_t", "InverseCumulativeRng< KnuthUniformRng,MoroInverseCumulativeNormal > *", 0, 0, (void*)"QuantLib::MoroInvCumulativeKnuthGaussianRng", 0};
static swig_type_info _swigt__p_InverseCumulativeRngT_LecuyerUniformRng_InverseCumulativeNormal_t = {"_p_InverseCumulativeRngT_LecuyerUniformRng_InverseCumulativeNormal_t", "InverseCumulativeRng< LecuyerUniformRng,InverseCumulativeNormal > *", 0, 0, (void*)"QuantLib::InvCumulativeLecuyerGaussianRng", 0};
static swig_type_info _swigt__p_InverseCumulativeRngT_LecuyerUniformRng_MoroInverseCumulativeNormal_t = {"_p_InverseCumulativeRngT_LecuyerUniformRng_MoroInverseCumulativeNormal_t", "InverseCumulativeRng< LecuyerUniformRng,MoroInverseCumulativeNormal > *", 0, 0, (void*)"QuantLib::MoroInvCumulativeLecuyerGaussianRng", 0};
static swig_type_info _swigt__p_InverseCumulativeRngT_MersenneTwisterUniformRng_InverseCumulativeNormal_t = {"_p_InverseCumulativeRngT_MersenneTwisterUniformRng_InverseCumulativeNormal_t", "InverseCumulativeRng< MersenneTwisterUniformRng,InverseCumulativeNormal > *", 0, 0, (void*)"QuantLib::InvCumulativeMersenneTwisterGaussianRng", 0};
static swig_type_info _swigt__p_InverseCumulativeRngT_MersenneTwisterUniformRng_MoroInverseCumulativeNormal_t = {"_p_InverseCumulativeRngT_MersenneTwisterUniformRng_MoroInverseCumulativeNormal_t", "InverseCumulativeRng< MersenneTwisterUniformRng,MoroInverseCumulativeNormal > *", 0, 0, (void*)"QuantLib::MoroInvCumulativeMersenneTwisterGaussianRng", 0};
static swig_type_info _swigt__p_InverseCumulativeRsgT_HaltonRsg_InverseCumulativeNormal_t = {"_p_InverseCumulativeRsgT_HaltonRsg_InverseCumulativeNormal_t", "InverseCumulativeRsg< HaltonRsg,InverseCumulativeNormal > *", 0, 0, (void*)"QuantLib::InvCumulativeHaltonGaussianRsg", 0};
static swig_type_info _swigt__p_InverseCumulativeRsgT_HaltonRsg_MoroInverseCumulativeNormal_t = {"_p_InverseCumulativeRsgT_HaltonRsg_MoroInverseCumulativeNormal_t", "InverseCumulativeRsg< HaltonRsg,MoroInverseCumulativeNormal > *", 0, 0, (void*)"QuantLib::MoroInvCumulativeHaltonGaussianRsg", 0};
static swig_type_info _swigt__p_InverseCumulativeRsgT_RandomSequenceGeneratorT_KnuthUniformRng_t_InverseCumulativeNormal_t = {"_p_InverseCumulativeRsgT_RandomSequenceGeneratorT_KnuthUniformRng_t_InverseCumulativeNormal_t", "InverseCumulativeRsg< RandomSequenceGenerator< KnuthUniformRng >,InverseCumulativeNormal > *", 0, 0, (void*)"QuantLib::InvCumulativeKnuthGaussianRsg", 0};
static swig_type_info _swigt__p_InverseCumulativeRsgT_RandomSequenceGeneratorT_KnuthUniformRng_t_MoroInverseCumulativeNormal_t = {"_p_InverseCumulativeRsgT_RandomSequenceGeneratorT_KnuthUniformRng_t_MoroInverseCumulativeNormal_t", "InverseCumulativeRsg< RandomSequenceGenerator< KnuthUniformRng >,MoroInverseCumulativeNormal > *", 0, 0, (void*)"QuantLib::MoroInvCumulativeKnuthGaussianRsg", 0};
static swig_type_info _swigt__p_InverseCumulativeRsgT_RandomSequenceGeneratorT_LecuyerUniformRng_t_InverseCumulativeNormal_t = {"_p_InverseCumulativeRsgT_RandomSequenceGeneratorT_LecuyerUniformRng_t_InverseCumulativeNormal_t", "InverseCumulativeRsg< RandomSequenceGenerator< LecuyerUniformRng >,InverseCumulativeNormal > *", 0, 0, (void*)"QuantLib::InvCumulativeLecuyerGaussianRsg", 0};
static swig_type_info _swigt__p_InverseCumulativeRsgT_RandomSequenceGeneratorT_LecuyerUniformRng_t_MoroInverseCumulativeNormal_t = {"_p_InverseCumulativeRsgT_RandomSequenceGeneratorT_LecuyerUniformRng_t_MoroInverseCumulativeNormal_t", "InverseCumulativeRsg< RandomSequenceGenerator< LecuyerUniformRng >,MoroInverseCumulativeNormal > *", 0, 0, (void*)"QuantLib::MoroInvCumulativeLecuyerGaussianRsg", 0};
static swig_type_info _swigt__p_InverseCumulativeRsgT_RandomSequenceGeneratorT_MersenneTwisterUniformRng_t_InverseCumulativeNormal_t = {"_p_InverseCumulativeRsgT_RandomSequenceGeneratorT_MersenneTwisterUniformRng_t_InverseCumulativeNormal_t", "InverseCumulativeRsg< RandomSequenceGenerator< MersenneTwisterUniformRng >,InverseCumulativeNormal > *", 0, 0, (void*)"QuantLib::InvCumulativeMersenneTwisterGaussianRsg", 0};
static swig_type_info _swigt__p_InverseCumulativeRsgT_RandomSequenceGeneratorT_MersenneTwisterUniformRng_t_MoroInverseCumulativeNormal_t = {"_p_InverseCumulativeRsgT_RandomSequenceGeneratorT_MersenneTwisterUniformRng_t_MoroInverseCumulativeNormal_t", "InverseCumulativeRsg< RandomSequenceGenerator< MersenneTwisterUniformRng >,MoroInverseCumulativeNormal > *", 0, 0, (void*)"QuantLib::MoroInvCumulativeMersenneTwisterGaussianRsg", 0};
static swig_type_info _swigt__p_InverseCumulativeRsgT_SobolRsg_InverseCumulativeNormal_t = {"_p_InverseCumulativeRsgT_SobolRsg_InverseCumulativeNormal_t", "InverseCumulativeRsg< SobolRsg,InverseCumulativeNormal > *", 0, 0, (void*)"QuantLib::InvCumulativeSobolGaussianRsg", 0};
static swig_type_info _swigt__p_InverseCumulativeRsgT_SobolRsg_MoroInverseCumulativeNormal_t = {"_p_InverseCumulativeRsgT_SobolRsg_MoroInverseCumulativeNormal_t", "InverseCumulativeRsg< SobolRsg,MoroInverseCumulativeNormal > *", 0, 0, (void*)"QuantLib::MoroInvCumulativeSobolGaussianRsg", 0};
static swig_type_info _swigt__p_InverseCumulativeStudent = {"_p_InverseCumulativeStudent", "InverseCumulativeStudent *", 0, 0, (void*)"QuantLib::InverseCumulativeStudent", 0};
static swig_type_info _swigt__p_InverseNonCentralCumulativeChiSquareDistribution = {"_p_InverseNonCentralCumulativeChiSquareDistribution", "InverseNonCentralCumulativeChiSquareDistribution *", 0, 0, (void*)"QuantLib::InverseNonCentralCumulativeChiSquareDistribution", 0};
static swig_type_info _swigt__p_JPYLiborPtr = {"_p_JPYLiborPtr", "JPYLiborPtr *", 0, 0, (void*)"QuantLib::JPYLibor", 0};
static swig_type_info _swigt__p_JamshidianSwaptionEnginePtr = {"_p_JamshidianSwaptionEnginePtr", "JamshidianSwaptionEnginePtr *", 0, 0, (void*)"QuantLib::JamshidianSwaptionEngine", 0};
static swig_type_info _swigt__p_JibarPtr = {"_p_JibarPtr", "JibarPtr *", 0, 0, (void*)"QuantLib::Jibar", 0};
static swig_type_info _swigt__p_KnuthUniformRng = {"_p_KnuthUniformRng", "KnuthUniformRng *", 0, 0, (void*)"QuantLib::KnuthUniformRng", 0};
static swig_type_info _swigt__p_LecuyerUniformRng = {"_p_LecuyerUniformRng", "LecuyerUniformRng *", 0, 0, (void*)"QuantLib::LecuyerUniformRng", 0};
static swig_type_info _swigt__p_LevenbergMarquardt = {"_p_LevenbergMarquardt", "LevenbergMarquardt *", 0, 0, (void*)"QuantLib::LevenbergMarquardt", 0};
static swig_type_info _swigt__p_LiborPtr = {"_p_LiborPtr", "LiborPtr *", 0, 0, (void*)"QuantLib::Libor", 0};
static swig_type_info _swigt__p_Linear = {"_p_Linear", "Linear *", 0, 0, (void*)"QuantLib::Linear", 0};
static swig_type_info _swigt__p_LinearTsrPricerPtr = {"_p_LinearTsrPricerPtr", "LinearTsrPricerPtr *", 0, 0, (void*)"QuantLib::LinearTsrPricer", 0};
static swig_type_info _swigt__p_LinearTsrPricer__Settings = {"_p_LinearTsrPricer__Settings", "LinearTsrPricer::Settings *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_LocalConstantVolPtr = {"_p_LocalConstantVolPtr", "LocalConstantVolPtr *", 0, 0, (void*)"QuantLib::LocalConstantVol", 0};
static swig_type_info _swigt__p_LocalVolSurfacePtr = {"_p_LocalVolSurfacePtr", "LocalVolSurfacePtr *", 0, 0, (void*)"QuantLib::LocalVolSurface", 0};
static swig_type_info _swigt__p_LocalVolTermStructure = {"_p_LocalVolTermStructure", "LocalVolTermStructure *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_LogCubicZeroCurvePtr = {"_p_LogCubicZeroCurvePtr", "LogCubicZeroCurvePtr *", 0, 0, (void*)"QuantLib::LogCubicZeroCurve", 0};
static swig_type_info _swigt__p_LogLinear = {"_p_LogLinear", "LogLinear *", 0, 0, (void*)"QuantLib::LogLinear", 0};
static swig_type_info _swigt__p_LogLinearZeroCurvePtr = {"_p_LogLinearZeroCurvePtr", "LogLinearZeroCurvePtr *", 0, 0, (void*)"QuantLib::LogLinearZeroCurve", 0};
static swig_type_info _swigt__p_LogNormalSimulatedAnnealing = {"_p_LogNormalSimulatedAnnealing", "LogNormalSimulatedAnnealing *", 0, 0, (void*)"QuantLib::LogNormalSimulatedAnnealing", 0};
static swig_type_info _swigt__p_MCAmericanBasketEnginePtr = {"_p_MCAmericanBasketEnginePtr", "MCAmericanBasketEnginePtr *", 0, 0, (void*)"QuantLib::MCAmericanBasketEngine", 0};
static swig_type_info _swigt__p_MCBarrierEnginePtr = {"_p_MCBarrierEnginePtr", "MCBarrierEnginePtr *", 0, 0, (void*)"QuantLib::MCBarrierEngine", 0};
static swig_type_info _swigt__p_MCDiscreteArithmeticAPEnginePtr = {"_p_MCDiscreteArithmeticAPEnginePtr", "MCDiscreteArithmeticAPEnginePtr *", 0, 0, (void*)"QuantLib::MCDiscreteArithmeticAPEngine", 0};
static swig_type_info _swigt__p_MCDiscreteArithmeticASEnginePtr = {"_p_MCDiscreteArithmeticASEnginePtr", "MCDiscreteArithmeticASEnginePtr *", 0, 0, (void*)"QuantLib::MCDiscreteArithmeticASEngine", 0};
static swig_type_info _swigt__p_MCDiscreteGeometricAPEnginePtr = {"_p_MCDiscreteGeometricAPEnginePtr", "MCDiscreteGeometricAPEnginePtr *", 0, 0, (void*)"QuantLib::MCDiscreteGeometricAPEngine", 0};
static swig_type_info _swigt__p_MCEuropeanBasketEnginePtr = {"_p_MCEuropeanBasketEnginePtr", "MCEuropeanBasketEnginePtr *", 0, 0, (void*)"QuantLib::MCEuropeanBasketEngine", 0};
static swig_type_info _swigt__p_MCEuropeanEnginePtr = {"_p_MCEuropeanEnginePtr", "MCEuropeanEnginePtr *", 0, 0, (void*)"QuantLib::MCEuropeanEngine", 0};
static swig_type_info _swigt__p_MCEverestEnginePtr = {"_p_MCEverestEnginePtr", "MCEverestEnginePtr *", 0, 0, (void*)"QuantLib::MCEverestEngine", 0};
static swig_type_info _swigt__p_MCHimalayaEnginePtr = {"_p_MCHimalayaEnginePtr", "MCHimalayaEnginePtr *", 0, 0, (void*)"QuantLib::MCHimalayaEngine", 0};
static swig_type_info _swigt__p_MarkovFunctionalPtr = {"_p_MarkovFunctionalPtr", "MarkovFunctionalPtr *", 0, 0, (void*)"QuantLib::MarkovFunctional", 0};
static swig_type_info _swigt__p_MarkovFunctional__ModelSettings = {"_p_MarkovFunctional__ModelSettings", "MarkovFunctional::ModelSettings *", 0, 0, (void*)"QuantLib::MarkovFunctionalSettings", 0};
static swig_type_info _swigt__p_Matrix = {"_p_Matrix", "Matrix *", 0, 0, (void*)"QuantLib::Matrix", 0};
static swig_type_info _swigt__p_MaxBasketPayoffPtr = {"_p_MaxBasketPayoffPtr", "MaxBasketPayoffPtr *", 0, 0, (void*)"QuantLib::MaxBasketPayoff", 0};
static swig_type_info _swigt__p_MersenneTwisterUniformRng = {"_p_MersenneTwisterUniformRng", "MersenneTwisterUniformRng *", 0, 0, (void*)"QuantLib::MersenneTwisterUniformRng", 0};
static swig_type_info _swigt__p_Merton76ProcessPtr = {"_p_Merton76ProcessPtr", "Merton76ProcessPtr *", 0, 0, (void*)"QuantLib::Merton76Process", 0};
static swig_type_info _swigt__p_MidPointCdsEnginePtr = {"_p_MidPointCdsEnginePtr", "MidPointCdsEnginePtr *", 0, 0, (void*)"QuantLib::MidPointCdsEngine", 0};
static swig_type_info _swigt__p_MinBasketPayoffPtr = {"_p_MinBasketPayoffPtr", "MinBasketPayoffPtr *", 0, 0, (void*)"QuantLib::MinBasketPayoff", 0};
static swig_type_info _swigt__p_MirrorGaussianSimulatedAnnealing = {"_p_MirrorGaussianSimulatedAnnealing", "MirrorGaussianSimulatedAnnealing *", 0, 0, (void*)"QuantLib::MirrorGaussianSimulatedAnnealing", 0};
static swig_type_info _swigt__p_Money = {"_p_Money", "Money *", 0, 0, (void*)"QuantLib::Money", 0};
static swig_type_info _swigt__p_MonotonicCubic = {"_p_MonotonicCubic", "MonotonicCubic *", 0, 0, (void*)"QuantLib::MonotonicCubic", 0};
static swig_type_info _swigt__p_MonotonicCubicZeroCurvePtr = {"_p_MonotonicCubicZeroCurvePtr", "MonotonicCubicZeroCurvePtr *", 0, 0, (void*)"QuantLib::MonotonicCubicZeroCurve", 0};
static swig_type_info _swigt__p_MonotonicLogCubic = {"_p_MonotonicLogCubic", "MonotonicLogCubic *", 0, 0, (void*)"QuantLib::MonotonicLogCubic", 0};
static swig_type_info _swigt__p_MoroInverseCumulativeNormal = {"_p_MoroInverseCumulativeNormal", "MoroInverseCumulativeNormal *", 0, 0, (void*)"QuantLib::MoroInverseCumulativeNormal", 0};
static swig_type_info _swigt__p_MultiAssetOptionPtr = {"_p_MultiAssetOptionPtr", "MultiAssetOptionPtr *", 0, 0, (void*)"QuantLib::MultiAssetOption", 0};
static swig_type_info _swigt__p_MultiPath = {"_p_MultiPath", "MultiPath *", 0, 0, (void*)"QuantLib::MultiPath", 0};
static swig_type_info _swigt__p_MultiplicativePriceSeasonalityPtr = {"_p_MultiplicativePriceSeasonalityPtr", "MultiplicativePriceSeasonalityPtr *", 0, 0, (void*)"QuantLib::MultiplicativePriceSeasonalityPtr", 0};
static swig_type_info _swigt__p_NZDLiborPtr = {"_p_NZDLiborPtr", "NZDLiborPtr *", 0, 0, (void*)"QuantLib::NZDLibor", 0};
static swig_type_info _swigt__p_NelsonSiegelFitting = {"_p_NelsonSiegelFitting", "NelsonSiegelFitting *", 0, 0, (void*)"QuantLib::NelsonSiegelFitting", 0};
static swig_type_info _swigt__p_NeumannBCPtr = {"_p_NeumannBCPtr", "NeumannBCPtr *", 0, 0, (void*)"QuantLib::NeumannBC", 0};
static swig_type_info _swigt__p_NoConstraint = {"_p_NoConstraint", "NoConstraint *", 0, 0, (void*)"QuantLib::NoConstraint", 0};
static swig_type_info _swigt__p_NonCentralCumulativeChiSquareDistribution = {"_p_NonCentralCumulativeChiSquareDistribution", "NonCentralCumulativeChiSquareDistribution *", 0, 0, (void*)"QuantLib::NonCentralCumulativeChiSquareDistribution", 0};
static swig_type_info _swigt__p_NonhomogeneousBoundaryConstraint = {"_p_NonhomogeneousBoundaryConstraint", "NonhomogeneousBoundaryConstraint *", 0, 0, (void*)"QuantLib::NonhomogeneousBoundaryConstraint", 0};
static swig_type_info _swigt__p_NonstandardSwapPtr = {"_p_NonstandardSwapPtr", "NonstandardSwapPtr *", 0, 0, (void*)"QuantLib::NonstandardSwap", 0};
static swig_type_info _swigt__p_NonstandardSwaptionPtr = {"_p_NonstandardSwaptionPtr", "NonstandardSwaptionPtr *", 0, 0, (void*)"QuantLib::NonstandardSwaption", 0};
static swig_type_info _swigt__p_NormalDistribution = {"_p_NormalDistribution", "NormalDistribution *", 0, 0, (void*)"QuantLib::NormalDistribution", 0};
static swig_type_info _swigt__p_NullParameter = {"_p_NullParameter", "NullParameter *", 0, 0, (void*)"QuantLib::NullParameter", 0};
static swig_type_info _swigt__p_NumericHaganPricerPtr = {"_p_NumericHaganPricerPtr", "NumericHaganPricerPtr *", 0, 0, (void*)"QuantLib::NumericHaganPricer", 0};
static swig_type_info _swigt__p_NzocrPtr = {"_p_NzocrPtr", "NzocrPtr *", 0, 0, (void*)"QuantLib::Nzocr", 0};
static swig_type_info _swigt__p_OISRateHelperPtr = {"_p_OISRateHelperPtr", "OISRateHelperPtr *", 0, 0, (void*)"QuantLib::OISRateHelper", 0};
static swig_type_info _swigt__p_Observable = {"_p_Observable", "Observable *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_OptimizationMethod = {"_p_OptimizationMethod", "OptimizationMethod *", 0, 0, (void*)"QuantLib::OptimizationMethod", 0};
static swig_type_info _swigt__p_Optimizer = {"_p_Optimizer", "Optimizer *", 0, 0, (void*)"QuantLib::Optimizer", 0};
static swig_type_info _swigt__p_Option = {"_p_Option", "Option *", 0, 0, (void*)"QuantLib::Option", 0};
static swig_type_info _swigt__p_OptionletStripper1Ptr = {"_p_OptionletStripper1Ptr", "OptionletStripper1Ptr *", 0, 0, (void*)"QuantLib::OptionletStripper1", 0};
static swig_type_info _swigt__p_OptionletVolatilityStructure = {"_p_OptionletVolatilityStructure", "OptionletVolatilityStructure *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_OvernightIndexPtr = {"_p_OvernightIndexPtr", "OvernightIndexPtr *", 0, 0, (void*)"QuantLib::OvernightIndex", 0};
static swig_type_info _swigt__p_Parameter = {"_p_Parameter", "Parameter *", 0, 0, (void*)"QuantLib::Parameter", 0};
static swig_type_info _swigt__p_ParkinsonSigma = {"_p_ParkinsonSigma", "ParkinsonSigma *", 0, 0, (void*)"QuantLib::ParkinsonSigma", 0};
static swig_type_info _swigt__p_Path = {"_p_Path", "Path *", 0, 0, (void*)"QuantLib::Path", 0};
static swig_type_info _swigt__p_Payoff = {"_p_Payoff", "Payoff *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_PercentageStrikePayoffPtr = {"_p_PercentageStrikePayoffPtr", "PercentageStrikePayoffPtr *", 0, 0, (void*)"QuantLib::PercentageStrikePayoff", 0};
static swig_type_info _swigt__p_Period = {"_p_Period", "Period *", 0, 0, (void*)"QuantLib::Period", 0};
static swig_type_info _swigt__p_PeriodParser = {"_p_PeriodParser", "PeriodParser *", 0, 0, (void*)"QuantLib::PeriodParser", 0};
static swig_type_info _swigt__p_PiecewiseConstantParameter = {"_p_PiecewiseConstantParameter", "PiecewiseConstantParameter *", 0, 0, (void*)"QuantLib::PiecewiseConstantParameter", 0};
static swig_type_info _swigt__p_PiecewiseCubicZeroPtr = {"_p_PiecewiseCubicZeroPtr", "PiecewiseCubicZeroPtr *", 0, 0, (void*)"QuantLib::PiecewiseCubicZero", 0};
static swig_type_info _swigt__p_PiecewiseFlatForwardPtr = {"_p_PiecewiseFlatForwardPtr", "PiecewiseFlatForwardPtr *", 0, 0, (void*)"QuantLib::PiecewiseFlatForward", 0};
static swig_type_info _swigt__p_PiecewiseFlatHazardRatePtr = {"_p_PiecewiseFlatHazardRatePtr", "PiecewiseFlatHazardRatePtr *", 0, 0, (void*)"QuantLib::PiecewiseFlatHazardRate", 0};
static swig_type_info _swigt__p_PiecewiseLinearForwardPtr = {"_p_PiecewiseLinearForwardPtr", "PiecewiseLinearForwardPtr *", 0, 0, (void*)"QuantLib::PiecewiseLinearForward", 0};
static swig_type_info _swigt__p_PiecewiseLinearZeroPtr = {"_p_PiecewiseLinearZeroPtr", "PiecewiseLinearZeroPtr *", 0, 0, (void*)"QuantLib::PiecewiseLinearZero", 0};
static swig_type_info _swigt__p_PiecewiseLogCubicDiscountPtr = {"_p_PiecewiseLogCubicDiscountPtr", "PiecewiseLogCubicDiscountPtr *", 0, 0, (void*)"QuantLib::PiecewiseLogCubicDiscount", 0};
static swig_type_info _swigt__p_PiecewiseTimeDependentHestonModelPtr = {"_p_PiecewiseTimeDependentHestonModelPtr", "PiecewiseTimeDependentHestonModelPtr *", 0, 0, (void*)"QuantLib::PiecewiseTimeDependentHestonModel", 0};
static swig_type_info _swigt__p_PiecewiseYoYInflationPtr = {"_p_PiecewiseYoYInflationPtr", "PiecewiseYoYInflationPtr *", 0, 0, (void*)"QuantLib::PiecewiseYoYInflation", 0};
static swig_type_info _swigt__p_PiecewiseZeroInflationPtr = {"_p_PiecewiseZeroInflationPtr", "PiecewiseZeroInflationPtr *", 0, 0, (void*)"QuantLib::PiecewiseZeroInflation", 0};
static swig_type_info _swigt__p_Pillar = {"_p_Pillar", "Pillar *", 0, 0, (void*)"QuantLib::Pillar", 0};
static swig_type_info _swigt__p_PlainVanillaPayoffPtr = {"_p_PlainVanillaPayoffPtr", "PlainVanillaPayoffPtr *", 0, 0, (void*)"QuantLib::PlainVanillaPayoff", 0};
static swig_type_info _swigt__p_PoissonDistribution = {"_p_PoissonDistribution", "PoissonDistribution *", 0, 0, (void*)"QuantLib::PoissonDistribution", 0};
static swig_type_info _swigt__p_Position = {"_p_Position", "Position *", 0, 0, (void*)"QuantLib::Position", 0};
static swig_type_info _swigt__p_PositiveConstraint = {"_p_PositiveConstraint", "PositiveConstraint *", 0, 0, (void*)"QuantLib::PositiveConstraint", 0};
static swig_type_info _swigt__p_PricingEngine = {"_p_PricingEngine", "PricingEngine *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_ProbabilityBoltzmannDownhill = {"_p_ProbabilityBoltzmannDownhill", "ProbabilityBoltzmannDownhill *", 0, 0, (void*)"QuantLib::ProbabilityBoltzmannDownhill", 0};
static swig_type_info _swigt__p_Protection = {"_p_Protection", "Protection *", 0, 0, (void*)"QuantLib::Protection", 0};
static swig_type_info _swigt__p_QuantLib__ARSCurrency = {"_p_QuantLib__ARSCurrency", "QuantLib::ARSCurrency *", 0, 0, (void*)"QuantLib::ARSCurrency", 0};
static swig_type_info _swigt__p_QuantLib__ATSCurrency = {"_p_QuantLib__ATSCurrency", "QuantLib::ATSCurrency *", 0, 0, (void*)"QuantLib::ATSCurrency", 0};
static swig_type_info _swigt__p_QuantLib__AUDCurrency = {"_p_QuantLib__AUDCurrency", "QuantLib::AUDCurrency *", 0, 0, (void*)"QuantLib::AUDCurrency", 0};
static swig_type_info _swigt__p_QuantLib__Actual360 = {"_p_QuantLib__Actual360", "QuantLib::Actual360 *", 0, 0, (void*)"QuantLib::Actual360", 0};
static swig_type_info _swigt__p_QuantLib__Actual365Fixed = {"_p_QuantLib__Actual365Fixed", "QuantLib::Actual365Fixed *", 0, 0, (void*)"QuantLib::Actual365Fixed", 0};
static swig_type_info _swigt__p_QuantLib__ActualActual = {"_p_QuantLib__ActualActual", "QuantLib::ActualActual *", 0, 0, (void*)"QuantLib::ActualActual", 0};
static swig_type_info _swigt__p_QuantLib__Argentina = {"_p_QuantLib__Argentina", "QuantLib::Argentina *", 0, 0, (void*)"QuantLib::Argentina", 0};
static swig_type_info _swigt__p_QuantLib__Australia = {"_p_QuantLib__Australia", "QuantLib::Australia *", 0, 0, (void*)"QuantLib::Australia", 0};
static swig_type_info _swigt__p_QuantLib__BDTCurrency = {"_p_QuantLib__BDTCurrency", "QuantLib::BDTCurrency *", 0, 0, (void*)"QuantLib::BDTCurrency", 0};
static swig_type_info _swigt__p_QuantLib__BEFCurrency = {"_p_QuantLib__BEFCurrency", "QuantLib::BEFCurrency *", 0, 0, (void*)"QuantLib::BEFCurrency", 0};
static swig_type_info _swigt__p_QuantLib__BGLCurrency = {"_p_QuantLib__BGLCurrency", "QuantLib::BGLCurrency *", 0, 0, (void*)"QuantLib::BGLCurrency", 0};
static swig_type_info _swigt__p_QuantLib__BRLCurrency = {"_p_QuantLib__BRLCurrency", "QuantLib::BRLCurrency *", 0, 0, (void*)"QuantLib::BRLCurrency", 0};
static swig_type_info _swigt__p_QuantLib__BYRCurrency = {"_p_QuantLib__BYRCurrency", "QuantLib::BYRCurrency *", 0, 0, (void*)"QuantLib::BYRCurrency", 0};
static swig_type_info _swigt__p_QuantLib__BespokeCalendar = {"_p_QuantLib__BespokeCalendar", "QuantLib::BespokeCalendar *", 0, 0, (void*)"QuantLib::BespokeCalendar", 0};
static swig_type_info _swigt__p_QuantLib__Brazil = {"_p_QuantLib__Brazil", "QuantLib::Brazil *", 0, 0, (void*)"QuantLib::Brazil", 0};
static swig_type_info _swigt__p_QuantLib__Business252 = {"_p_QuantLib__Business252", "QuantLib::Business252 *", 0, 0, (void*)"QuantLib::Business252", 0};
static swig_type_info _swigt__p_QuantLib__CADCurrency = {"_p_QuantLib__CADCurrency", "QuantLib::CADCurrency *", 0, 0, (void*)"QuantLib::CADCurrency", 0};
static swig_type_info _swigt__p_QuantLib__CHFCurrency = {"_p_QuantLib__CHFCurrency", "QuantLib::CHFCurrency *", 0, 0, (void*)"QuantLib::CHFCurrency", 0};
static swig_type_info _swigt__p_QuantLib__CLPCurrency = {"_p_QuantLib__CLPCurrency", "QuantLib::CLPCurrency *", 0, 0, (void*)"QuantLib::CLPCurrency", 0};
static swig_type_info _swigt__p_QuantLib__CNYCurrency = {"_p_QuantLib__CNYCurrency", "QuantLib::CNYCurrency *", 0, 0, (void*)"QuantLib::CNYCurrency", 0};
static swig_type_info _swigt__p_QuantLib__COPCurrency = {"_p_QuantLib__COPCurrency", "QuantLib::COPCurrency *", 0, 0, (void*)"QuantLib::COPCurrency", 0};
static swig_type_info _swigt__p_QuantLib__CYPCurrency = {"_p_QuantLib__CYPCurrency", "QuantLib::CYPCurrency *", 0, 0, (void*)"QuantLib::CYPCurrency", 0};
static swig_type_info _swigt__p_QuantLib__CZKCurrency = {"_p_QuantLib__CZKCurrency", "QuantLib::CZKCurrency *", 0, 0, (void*)"QuantLib::CZKCurrency", 0};
static swig_type_info _swigt__p_QuantLib__Canada = {"_p_QuantLib__Canada", "QuantLib::Canada *", 0, 0, (void*)"QuantLib::Canada", 0};
static swig_type_info _swigt__p_QuantLib__China = {"_p_QuantLib__China", "QuantLib::China *", 0, 0, (void*)"QuantLib::China", 0};
static swig_type_info _swigt__p_QuantLib__CzechRepublic = {"_p_QuantLib__CzechRepublic", "QuantLib::CzechRepublic *", 0, 0, (void*)"QuantLib::CzechRepublic", 0};
static swig_type_info _swigt__p_QuantLib__DEMCurrency = {"_p_QuantLib__DEMCurrency", "QuantLib::DEMCurrency *", 0, 0, (void*)"QuantLib::DEMCurrency", 0};
static swig_type_info _swigt__p_QuantLib__DKKCurrency = {"_p_QuantLib__DKKCurrency", "QuantLib::DKKCurrency *", 0, 0, (void*)"QuantLib::DKKCurrency", 0};
static swig_type_info _swigt__p_QuantLib__Denmark = {"_p_QuantLib__Denmark", "QuantLib::Denmark *", 0, 0, (void*)"QuantLib::Denmark", 0};
static swig_type_info _swigt__p_QuantLib__EEKCurrency = {"_p_QuantLib__EEKCurrency", "QuantLib::EEKCurrency *", 0, 0, (void*)"QuantLib::EEKCurrency", 0};
static swig_type_info _swigt__p_QuantLib__ESPCurrency = {"_p_QuantLib__ESPCurrency", "QuantLib::ESPCurrency *", 0, 0, (void*)"QuantLib::ESPCurrency", 0};
static swig_type_info _swigt__p_QuantLib__EURCurrency = {"_p_QuantLib__EURCurrency", "QuantLib::EURCurrency *", 0, 0, (void*)"QuantLib::EURCurrency", 0};
static swig_type_info _swigt__p_QuantLib__FIMCurrency = {"_p_QuantLib__FIMCurrency", "QuantLib::FIMCurrency *", 0, 0, (void*)"QuantLib::FIMCurrency", 0};
static swig_type_info _swigt__p_QuantLib__FRFCurrency = {"_p_QuantLib__FRFCurrency", "QuantLib::FRFCurrency *", 0, 0, (void*)"QuantLib::FRFCurrency", 0};
static swig_type_info _swigt__p_QuantLib__Finland = {"_p_QuantLib__Finland", "QuantLib::Finland *", 0, 0, (void*)"QuantLib::Finland", 0};
static swig_type_info _swigt__p_QuantLib__GBPCurrency = {"_p_QuantLib__GBPCurrency", "QuantLib::GBPCurrency *", 0, 0, (void*)"QuantLib::GBPCurrency", 0};
static swig_type_info _swigt__p_QuantLib__GRDCurrency = {"_p_QuantLib__GRDCurrency", "QuantLib::GRDCurrency *", 0, 0, (void*)"QuantLib::GRDCurrency", 0};
static swig_type_info _swigt__p_QuantLib__Germany = {"_p_QuantLib__Germany", "QuantLib::Germany *", 0, 0, (void*)"QuantLib::Germany", 0};
static swig_type_info _swigt__p_QuantLib__HKDCurrency = {"_p_QuantLib__HKDCurrency", "QuantLib::HKDCurrency *", 0, 0, (void*)"QuantLib::HKDCurrency", 0};
static swig_type_info _swigt__p_QuantLib__HUFCurrency = {"_p_QuantLib__HUFCurrency", "QuantLib::HUFCurrency *", 0, 0, (void*)"QuantLib::HUFCurrency", 0};
static swig_type_info _swigt__p_QuantLib__HongKong = {"_p_QuantLib__HongKong", "QuantLib::HongKong *", 0, 0, (void*)"QuantLib::HongKong", 0};
static swig_type_info _swigt__p_QuantLib__Hungary = {"_p_QuantLib__Hungary", "QuantLib::Hungary *", 0, 0, (void*)"QuantLib::Hungary", 0};
static swig_type_info _swigt__p_QuantLib__IDRCurrency = {"_p_QuantLib__IDRCurrency", "QuantLib::IDRCurrency *", 0, 0, (void*)"QuantLib::IDRCurrency", 0};
static swig_type_info _swigt__p_QuantLib__IEPCurrency = {"_p_QuantLib__IEPCurrency", "QuantLib::IEPCurrency *", 0, 0, (void*)"QuantLib::IEPCurrency", 0};
static swig_type_info _swigt__p_QuantLib__ILSCurrency = {"_p_QuantLib__ILSCurrency", "QuantLib::ILSCurrency *", 0, 0, (void*)"QuantLib::ILSCurrency", 0};
static swig_type_info _swigt__p_QuantLib__INRCurrency = {"_p_QuantLib__INRCurrency", "QuantLib::INRCurrency *", 0, 0, (void*)"QuantLib::INRCurrency", 0};
static swig_type_info _swigt__p_QuantLib__IQDCurrency = {"_p_QuantLib__IQDCurrency", "QuantLib::IQDCurrency *", 0, 0, (void*)"QuantLib::IQDCurrency", 0};
static swig_type_info _swigt__p_QuantLib__IRRCurrency = {"_p_QuantLib__IRRCurrency", "QuantLib::IRRCurrency *", 0, 0, (void*)"QuantLib::IRRCurrency", 0};
static swig_type_info _swigt__p_QuantLib__ISKCurrency = {"_p_QuantLib__ISKCurrency", "QuantLib::ISKCurrency *", 0, 0, (void*)"QuantLib::ISKCurrency", 0};
static swig_type_info _swigt__p_QuantLib__ITLCurrency = {"_p_QuantLib__ITLCurrency", "QuantLib::ITLCurrency *", 0, 0, (void*)"QuantLib::ITLCurrency", 0};
static swig_type_info _swigt__p_QuantLib__Iceland = {"_p_QuantLib__Iceland", "QuantLib::Iceland *", 0, 0, (void*)"QuantLib::Iceland", 0};
static swig_type_info _swigt__p_QuantLib__India = {"_p_QuantLib__India", "QuantLib::India *", 0, 0, (void*)"QuantLib::India", 0};
static swig_type_info _swigt__p_QuantLib__Indonesia = {"_p_QuantLib__Indonesia", "QuantLib::Indonesia *", 0, 0, (void*)"QuantLib::Indonesia", 0};
static swig_type_info _swigt__p_QuantLib__Israel = {"_p_QuantLib__Israel", "QuantLib::Israel *", 0, 0, (void*)"QuantLib::Israel", 0};
static swig_type_info _swigt__p_QuantLib__Italy = {"_p_QuantLib__Italy", "QuantLib::Italy *", 0, 0, (void*)"QuantLib::Italy", 0};
static swig_type_info _swigt__p_QuantLib__JPYCurrency = {"_p_QuantLib__JPYCurrency", "QuantLib::JPYCurrency *", 0, 0, (void*)"QuantLib::JPYCurrency", 0};
static swig_type_info _swigt__p_QuantLib__Japan = {"_p_QuantLib__Japan", "QuantLib::Japan *", 0, 0, (void*)"QuantLib::Japan", 0};
static swig_type_info _swigt__p_QuantLib__JointCalendar = {"_p_QuantLib__JointCalendar", "QuantLib::JointCalendar *", 0, 0, (void*)"QuantLib::JointCalendar", 0};
static swig_type_info _swigt__p_QuantLib__KRWCurrency = {"_p_QuantLib__KRWCurrency", "QuantLib::KRWCurrency *", 0, 0, (void*)"QuantLib::KRWCurrency", 0};
static swig_type_info _swigt__p_QuantLib__KWDCurrency = {"_p_QuantLib__KWDCurrency", "QuantLib::KWDCurrency *", 0, 0, (void*)"QuantLib::KWDCurrency", 0};
static swig_type_info _swigt__p_QuantLib__LTLCurrency = {"_p_QuantLib__LTLCurrency", "QuantLib::LTLCurrency *", 0, 0, (void*)"QuantLib::LTLCurrency", 0};
static swig_type_info _swigt__p_QuantLib__LUFCurrency = {"_p_QuantLib__LUFCurrency", "QuantLib::LUFCurrency *", 0, 0, (void*)"QuantLib::LUFCurrency", 0};
static swig_type_info _swigt__p_QuantLib__LVLCurrency = {"_p_QuantLib__LVLCurrency", "QuantLib::LVLCurrency *", 0, 0, (void*)"QuantLib::LVLCurrency", 0};
static swig_type_info _swigt__p_QuantLib__MTLCurrency = {"_p_QuantLib__MTLCurrency", "QuantLib::MTLCurrency *", 0, 0, (void*)"QuantLib::MTLCurrency", 0};
static swig_type_info _swigt__p_QuantLib__MXNCurrency = {"_p_QuantLib__MXNCurrency", "QuantLib::MXNCurrency *", 0, 0, (void*)"QuantLib::MXNCurrency", 0};
static swig_type_info _swigt__p_QuantLib__MYRCurrency = {"_p_QuantLib__MYRCurrency", "QuantLib::MYRCurrency *", 0, 0, (void*)"QuantLib::MYRCurrency", 0};
static swig_type_info _swigt__p_QuantLib__Mexico = {"_p_QuantLib__Mexico", "QuantLib::Mexico *", 0, 0, (void*)"QuantLib::Mexico", 0};
static swig_type_info _swigt__p_QuantLib__NLGCurrency = {"_p_QuantLib__NLGCurrency", "QuantLib::NLGCurrency *", 0, 0, (void*)"QuantLib::NLGCurrency", 0};
static swig_type_info _swigt__p_QuantLib__NOKCurrency = {"_p_QuantLib__NOKCurrency", "QuantLib::NOKCurrency *", 0, 0, (void*)"QuantLib::NOKCurrency", 0};
static swig_type_info _swigt__p_QuantLib__NPRCurrency = {"_p_QuantLib__NPRCurrency", "QuantLib::NPRCurrency *", 0, 0, (void*)"QuantLib::NPRCurrency", 0};
static swig_type_info _swigt__p_QuantLib__NZDCurrency = {"_p_QuantLib__NZDCurrency", "QuantLib::NZDCurrency *", 0, 0, (void*)"QuantLib::NZDCurrency", 0};
static swig_type_info _swigt__p_QuantLib__NewZealand = {"_p_QuantLib__NewZealand", "QuantLib::NewZealand *", 0, 0, (void*)"QuantLib::NewZealand", 0};
static swig_type_info _swigt__p_QuantLib__Norway = {"_p_QuantLib__Norway", "QuantLib::Norway *", 0, 0, (void*)"QuantLib::Norway", 0};
static swig_type_info _swigt__p_QuantLib__NullCalendar = {"_p_QuantLib__NullCalendar", "QuantLib::NullCalendar *", 0, 0, (void*)"QuantLib::NullCalendar", 0};
static swig_type_info _swigt__p_QuantLib__OneDayCounter = {"_p_QuantLib__OneDayCounter", "QuantLib::OneDayCounter *", 0, 0, (void*)"QuantLib::OneDayCounter", 0};
static swig_type_info _swigt__p_QuantLib__PEHCurrency = {"_p_QuantLib__PEHCurrency", "QuantLib::PEHCurrency *", 0, 0, (void*)"QuantLib::PEHCurrency", 0};
static swig_type_info _swigt__p_QuantLib__PEICurrency = {"_p_QuantLib__PEICurrency", "QuantLib::PEICurrency *", 0, 0, (void*)"QuantLib::PEICurrency", 0};
static swig_type_info _swigt__p_QuantLib__PENCurrency = {"_p_QuantLib__PENCurrency", "QuantLib::PENCurrency *", 0, 0, (void*)"QuantLib::PENCurrency", 0};
static swig_type_info _swigt__p_QuantLib__PKRCurrency = {"_p_QuantLib__PKRCurrency", "QuantLib::PKRCurrency *", 0, 0, (void*)"QuantLib::PKRCurrency", 0};
static swig_type_info _swigt__p_QuantLib__PLNCurrency = {"_p_QuantLib__PLNCurrency", "QuantLib::PLNCurrency *", 0, 0, (void*)"QuantLib::PLNCurrency", 0};
static swig_type_info _swigt__p_QuantLib__PTECurrency = {"_p_QuantLib__PTECurrency", "QuantLib::PTECurrency *", 0, 0, (void*)"QuantLib::PTECurrency", 0};
static swig_type_info _swigt__p_QuantLib__Poland = {"_p_QuantLib__Poland", "QuantLib::Poland *", 0, 0, (void*)"QuantLib::Poland", 0};
static swig_type_info _swigt__p_QuantLib__ROLCurrency = {"_p_QuantLib__ROLCurrency", "QuantLib::ROLCurrency *", 0, 0, (void*)"QuantLib::ROLCurrency", 0};
static swig_type_info _swigt__p_QuantLib__RONCurrency = {"_p_QuantLib__RONCurrency", "QuantLib::RONCurrency *", 0, 0, (void*)"QuantLib::RONCurrency", 0};
static swig_type_info _swigt__p_QuantLib__RUBCurrency = {"_p_QuantLib__RUBCurrency", "QuantLib::RUBCurrency *", 0, 0, (void*)"QuantLib::RUBCurrency", 0};
static swig_type_info _swigt__p_QuantLib__Romania = {"_p_QuantLib__Romania", "QuantLib::Romania *", 0, 0, (void*)"QuantLib::Romania", 0};
static swig_type_info _swigt__p_QuantLib__Russia = {"_p_QuantLib__Russia", "QuantLib::Russia *", 0, 0, (void*)"QuantLib::Russia", 0};
static swig_type_info _swigt__p_QuantLib__SARCurrency = {"_p_QuantLib__SARCurrency", "QuantLib::SARCurrency *", 0, 0, (void*)"QuantLib::SARCurrency", 0};
static swig_type_info _swigt__p_QuantLib__SEKCurrency = {"_p_QuantLib__SEKCurrency", "QuantLib::SEKCurrency *", 0, 0, (void*)"QuantLib::SEKCurrency", 0};
static swig_type_info _swigt__p_QuantLib__SGDCurrency = {"_p_QuantLib__SGDCurrency", "QuantLib::SGDCurrency *", 0, 0, (void*)"QuantLib::SGDCurrency", 0};
static swig_type_info _swigt__p_QuantLib__SITCurrency = {"_p_QuantLib__SITCurrency", "QuantLib::SITCurrency *", 0, 0, (void*)"QuantLib::SITCurrency", 0};
static swig_type_info _swigt__p_QuantLib__SKKCurrency = {"_p_QuantLib__SKKCurrency", "QuantLib::SKKCurrency *", 0, 0, (void*)"QuantLib::SKKCurrency", 0};
static swig_type_info _swigt__p_QuantLib__SaudiArabia = {"_p_QuantLib__SaudiArabia", "QuantLib::SaudiArabia *", 0, 0, (void*)"QuantLib::SaudiArabia", 0};
static swig_type_info _swigt__p_QuantLib__SimpleDayCounter = {"_p_QuantLib__SimpleDayCounter", "QuantLib::SimpleDayCounter *", 0, 0, (void*)"QuantLib::SimpleDayCounter", 0};
static swig_type_info _swigt__p_QuantLib__Singapore = {"_p_QuantLib__Singapore", "QuantLib::Singapore *", 0, 0, (void*)"QuantLib::Singapore", 0};
static swig_type_info _swigt__p_QuantLib__Slovakia = {"_p_QuantLib__Slovakia", "QuantLib::Slovakia *", 0, 0, (void*)"QuantLib::Slovakia", 0};
static swig_type_info _swigt__p_QuantLib__SouthAfrica = {"_p_QuantLib__SouthAfrica", "QuantLib::SouthAfrica *", 0, 0, (void*)"QuantLib::SouthAfrica", 0};
static swig_type_info _swigt__p_QuantLib__SouthKorea = {"_p_QuantLib__SouthKorea", "QuantLib::SouthKorea *", 0, 0, (void*)"QuantLib::SouthKorea", 0};
static swig_type_info _swigt__p_QuantLib__Sweden = {"_p_QuantLib__Sweden", "QuantLib::Sweden *", 0, 0, (void*)"QuantLib::Sweden", 0};
static swig_type_info _swigt__p_QuantLib__Switzerland = {"_p_QuantLib__Switzerland", "QuantLib::Switzerland *", 0, 0, (void*)"QuantLib::Switzerland", 0};
static swig_type_info _swigt__p_QuantLib__TARGET = {"_p_QuantLib__TARGET", "QuantLib::TARGET *", 0, 0, (void*)"QuantLib::TARGET", 0};
static swig_type_info _swigt__p_QuantLib__THBCurrency = {"_p_QuantLib__THBCurrency", "QuantLib::THBCurrency *", 0, 0, (void*)"QuantLib::THBCurrency", 0};
static swig_type_info _swigt__p_QuantLib__TRLCurrency = {"_p_QuantLib__TRLCurrency", "QuantLib::TRLCurrency *", 0, 0, (void*)"QuantLib::TRLCurrency", 0};
static swig_type_info _swigt__p_QuantLib__TRYCurrency = {"_p_QuantLib__TRYCurrency", "QuantLib::TRYCurrency *", 0, 0, (void*)"QuantLib::TRYCurrency", 0};
static swig_type_info _swigt__p_QuantLib__TTDCurrency = {"_p_QuantLib__TTDCurrency", "QuantLib::TTDCurrency *", 0, 0, (void*)"QuantLib::TTDCurrency", 0};
static swig_type_info _swigt__p_QuantLib__TWDCurrency = {"_p_QuantLib__TWDCurrency", "QuantLib::TWDCurrency *", 0, 0, (void*)"QuantLib::TWDCurrency", 0};
static swig_type_info _swigt__p_QuantLib__Taiwan = {"_p_QuantLib__Taiwan", "QuantLib::Taiwan *", 0, 0, (void*)"QuantLib::Taiwan", 0};
static swig_type_info _swigt__p_QuantLib__Thirty360 = {"_p_QuantLib__Thirty360", "QuantLib::Thirty360 *", 0, 0, (void*)"QuantLib::Thirty360", 0};
static swig_type_info _swigt__p_QuantLib__Turkey = {"_p_QuantLib__Turkey", "QuantLib::Turkey *", 0, 0, (void*)"QuantLib::Turkey", 0};
static swig_type_info _swigt__p_QuantLib__USDCurrency = {"_p_QuantLib__USDCurrency", "QuantLib::USDCurrency *", 0, 0, (void*)"QuantLib::USDCurrency", 0};
static swig_type_info _swigt__p_QuantLib__Ukraine = {"_p_QuantLib__Ukraine", "QuantLib::Ukraine *", 0, 0, (void*)"QuantLib::Ukraine", 0};
static swig_type_info _swigt__p_QuantLib__UnitedKingdom = {"_p_QuantLib__UnitedKingdom", "QuantLib::UnitedKingdom *", 0, 0, (void*)"QuantLib::UnitedKingdom", 0};
static swig_type_info _swigt__p_QuantLib__UnitedStates = {"_p_QuantLib__UnitedStates", "QuantLib::UnitedStates *", 0, 0, (void*)"QuantLib::UnitedStates", 0};
static swig_type_info _swigt__p_QuantLib__VEBCurrency = {"_p_QuantLib__VEBCurrency", "QuantLib::VEBCurrency *", 0, 0, (void*)"QuantLib::VEBCurrency", 0};
static swig_type_info _swigt__p_QuantLib__VNDCurrency = {"_p_QuantLib__VNDCurrency", "QuantLib::VNDCurrency *", 0, 0, (void*)"QuantLib::VNDCurrency", 0};
static swig_type_info _swigt__p_QuantLib__WeekendsOnly = {"_p_QuantLib__WeekendsOnly", "QuantLib::WeekendsOnly *", 0, 0, (void*)"QuantLib::WeekendsOnly", 0};
static swig_type_info _swigt__p_QuantLib__ZARCurrency = {"_p_QuantLib__ZARCurrency", "QuantLib::ZARCurrency *", 0, 0, (void*)"QuantLib::ZARCurrency", 0};
static swig_type_info _swigt__p_QuantoDoubleBarrierOptionPtr = {"_p_QuantoDoubleBarrierOptionPtr", "QuantoDoubleBarrierOptionPtr *", 0, 0, (void*)"QuantLib::QuantoDoubleBarrierOption", 0};
static swig_type_info _swigt__p_QuantoEuropeanEnginePtr = {"_p_QuantoEuropeanEnginePtr", "QuantoEuropeanEnginePtr *", 0, 0, (void*)"QuantLib::QuantoEuropeanEngine", 0};
static swig_type_info _swigt__p_QuantoForwardEuropeanEnginePtr = {"_p_QuantoForwardEuropeanEnginePtr", "QuantoForwardEuropeanEnginePtr *", 0, 0, (void*)"QuantLib::QuantoForwardEuropeanEngine", 0};
static swig_type_info _swigt__p_QuantoForwardVanillaOptionPtr = {"_p_QuantoForwardVanillaOptionPtr", "QuantoForwardVanillaOptionPtr *", 0, 0, (void*)"QuantLib::QuantoForwardVanillaOption", 0};
static swig_type_info _swigt__p_QuantoVanillaOptionPtr = {"_p_QuantoVanillaOptionPtr", "QuantoVanillaOptionPtr *", 0, 0, (void*)"QuantLib::QuantoVanillaOption", 0};
static swig_type_info _swigt__p_Quote = {"_p_Quote", "Quote *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_RandomSequenceGeneratorT_KnuthUniformRng_t = {"_p_RandomSequenceGeneratorT_KnuthUniformRng_t", "RandomSequenceGenerator< KnuthUniformRng > *", 0, 0, (void*)"QuantLib::KnuthUniformRsg", 0};
static swig_type_info _swigt__p_RandomSequenceGeneratorT_LecuyerUniformRng_t = {"_p_RandomSequenceGeneratorT_LecuyerUniformRng_t", "RandomSequenceGenerator< LecuyerUniformRng > *", 0, 0, (void*)"QuantLib::LecuyerUniformRsg", 0};
static swig_type_info _swigt__p_RandomSequenceGeneratorT_MersenneTwisterUniformRng_t = {"_p_RandomSequenceGeneratorT_MersenneTwisterUniformRng_t", "RandomSequenceGenerator< MersenneTwisterUniformRng > *", 0, 0, (void*)"QuantLib::MersenneTwisterUniformRsg", 0};
static swig_type_info _swigt__p_RateHelper = {"_p_RateHelper", "RateHelper *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_RealTimeSeries = {"_p_RealTimeSeries", "RealTimeSeries *|VolatilityTimeSeries *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_ReannealingTrivial = {"_p_ReannealingTrivial", "ReannealingTrivial *", 0, 0, (void*)"QuantLib::ReannealingTrivial", 0};
static swig_type_info _swigt__p_RebatedExercisePtr = {"_p_RebatedExercisePtr", "RebatedExercisePtr *", 0, 0, (void*)"QuantLib::RebatedExercise", 0};
static swig_type_info _swigt__p_RedemptionPtr = {"_p_RedemptionPtr", "RedemptionPtr *", 0, 0, (void*)"QuantLib::Redemption", 0};
static swig_type_info _swigt__p_Region = {"_p_Region", "Region *", 0, 0, (void*)"QuantLib::Region", 0};
static swig_type_info _swigt__p_RelinkableHandleT_BlackVolTermStructure_t = {"_p_RelinkableHandleT_BlackVolTermStructure_t", "RelinkableHandle< BlackVolTermStructure > *", 0, 0, (void*)"QuantLib::RelinkableBlackVolTermStructureHandle", 0};
static swig_type_info _swigt__p_RelinkableHandleT_CalibratedModel_t = {"_p_RelinkableHandleT_CalibratedModel_t", "RelinkableHandle< CalibratedModel > *", 0, 0, (void*)"QuantLib::RelinkableCalibratedModelHandle", 0};
static swig_type_info _swigt__p_RelinkableHandleT_CapFloorTermVolatilityStructure_t = {"_p_RelinkableHandleT_CapFloorTermVolatilityStructure_t", "RelinkableHandle< CapFloorTermVolatilityStructure > *", 0, 0, (void*)"QuantLib::RelinkableCapFloorTermVolatilityStructureHandle", 0};
static swig_type_info _swigt__p_RelinkableHandleT_DefaultProbabilityTermStructure_t = {"_p_RelinkableHandleT_DefaultProbabilityTermStructure_t", "RelinkableHandle< DefaultProbabilityTermStructure > *", 0, 0, (void*)"QuantLib::RelinkableDefaultProbabilityTermStructureHandle", 0};
static swig_type_info _swigt__p_RelinkableHandleT_DeltaVolQuote_t = {"_p_RelinkableHandleT_DeltaVolQuote_t", "RelinkableHandle< DeltaVolQuote > *", 0, 0, (void*)"QuantLib::RelinkableDeltaVolQuoteHandle", 0};
static swig_type_info _swigt__p_RelinkableHandleT_LocalVolTermStructure_t = {"_p_RelinkableHandleT_LocalVolTermStructure_t", "RelinkableHandle< LocalVolTermStructure > *", 0, 0, (void*)"QuantLib::RelinkableLocalVolTermStructureHandle", 0};
static swig_type_info _swigt__p_RelinkableHandleT_OptionletVolatilityStructure_t = {"_p_RelinkableHandleT_OptionletVolatilityStructure_t", "RelinkableHandle< OptionletVolatilityStructure > *", 0, 0, (void*)"QuantLib::RelinkableOptionletVolatilityStructureHandle", 0};
static swig_type_info _swigt__p_RelinkableHandleT_Quote_t = {"_p_RelinkableHandleT_Quote_t", "RelinkableHandle< Quote > *", 0, 0, (void*)"QuantLib::RelinkableQuoteHandle", 0};
static swig_type_info _swigt__p_RelinkableHandleT_ShortRateModel_t = {"_p_RelinkableHandleT_ShortRateModel_t", "RelinkableHandle< ShortRateModel > *", 0, 0, (void*)"QuantLib::RelinkableShortRateModelHandle", 0};
static swig_type_info _swigt__p_RelinkableHandleT_SwaptionVolatilityStructure_t = {"_p_RelinkableHandleT_SwaptionVolatilityStructure_t", "RelinkableHandle< SwaptionVolatilityStructure > *", 0, 0, (void*)"QuantLib::RelinkableSwaptionVolatilityStructureHandle", 0};
static swig_type_info _swigt__p_RelinkableHandleT_YieldTermStructure_t = {"_p_RelinkableHandleT_YieldTermStructure_t", "RelinkableHandle< YieldTermStructure > *", 0, 0, (void*)"QuantLib::RelinkableYieldTermStructureHandle", 0};
static swig_type_info _swigt__p_RelinkableHandleT_YoYInflationTermStructure_t = {"_p_RelinkableHandleT_YoYInflationTermStructure_t", "RelinkableHandle< YoYInflationTermStructure > *", 0, 0, (void*)"QuantLib::RelinkableYoYInflationTermStructureHandle", 0};
static swig_type_info _swigt__p_RelinkableHandleT_ZeroInflationTermStructure_t = {"_p_RelinkableHandleT_ZeroInflationTermStructure_t", "RelinkableHandle< ZeroInflationTermStructure > *", 0, 0, (void*)"QuantLib::RelinkableZeroInflationTermStructureHandle", 0};
static swig_type_info _swigt__p_Ridder = {"_p_Ridder", "Ridder *", 0, 0, (void*)"QuantLib::Ridder", 0};
static swig_type_info _swigt__p_RiskStatistics = {"_p_RiskStatistics", "RiskStatistics *", 0, 0, (void*)"QuantLib::RiskStatistics", 0};
static swig_type_info _swigt__p_Rounding = {"_p_Rounding", "Rounding *", 0, 0, (void*)"QuantLib::Rounding", 0};
static swig_type_info _swigt__p_SEKLiborPtr = {"_p_SEKLiborPtr", "SEKLiborPtr *", 0, 0, (void*)"QuantLib::SEKLibor", 0};
static swig_type_info _swigt__p_SVD = {"_p_SVD", "SVD *", 0, 0, (void*)"QuantLib::SVD", 0};
static swig_type_info _swigt__p_SafeBackwardFlatInterpolation = {"_p_SafeBackwardFlatInterpolation", "SafeBackwardFlatInterpolation *", 0, 0, (void*)"QuantLib::BackwardFlatInterpolation", 0};
static swig_type_info _swigt__p_SafeBicubicSpline = {"_p_SafeBicubicSpline", "SafeBicubicSpline *", 0, 0, (void*)"QuantLib::BicubicSpline", 0};
static swig_type_info _swigt__p_SafeBilinearInterpolation = {"_p_SafeBilinearInterpolation", "SafeBilinearInterpolation *", 0, 0, (void*)"QuantLib::BilinearInterpolation", 0};
static swig_type_info _swigt__p_SafeCubicNaturalSpline = {"_p_SafeCubicNaturalSpline", "SafeCubicNaturalSpline *", 0, 0, (void*)"QuantLib::CubicNaturalSpline", 0};
static swig_type_info _swigt__p_SafeForwardFlatInterpolation = {"_p_SafeForwardFlatInterpolation", "SafeForwardFlatInterpolation *", 0, 0, (void*)"QuantLib::ForwardFlatInterpolation", 0};
static swig_type_info _swigt__p_SafeFritschButlandCubic = {"_p_SafeFritschButlandCubic", "SafeFritschButlandCubic *", 0, 0, (void*)"QuantLib::FritschButlandCubic", 0};
static swig_type_info _swigt__p_SafeFritschButlandLogCubic = {"_p_SafeFritschButlandLogCubic", "SafeFritschButlandLogCubic *", 0, 0, (void*)"QuantLib::FritschButlandLogCubic", 0};
static swig_type_info _swigt__p_SafeKrugerCubic = {"_p_SafeKrugerCubic", "SafeKrugerCubic *", 0, 0, (void*)"QuantLib::KrugerCubic", 0};
static swig_type_info _swigt__p_SafeKrugerLogCubic = {"_p_SafeKrugerLogCubic", "SafeKrugerLogCubic *", 0, 0, (void*)"QuantLib::KrugerLogCubic", 0};
static swig_type_info _swigt__p_SafeLinearInterpolation = {"_p_SafeLinearInterpolation", "SafeLinearInterpolation *", 0, 0, (void*)"QuantLib::LinearInterpolation", 0};
static swig_type_info _swigt__p_SafeLogCubicNaturalSpline = {"_p_SafeLogCubicNaturalSpline", "SafeLogCubicNaturalSpline *", 0, 0, (void*)"QuantLib::LogCubicNaturalSpline", 0};
static swig_type_info _swigt__p_SafeLogLinearInterpolation = {"_p_SafeLogLinearInterpolation", "SafeLogLinearInterpolation *", 0, 0, (void*)"QuantLib::LogLinearInterpolation", 0};
static swig_type_info _swigt__p_SafeLogParabolic = {"_p_SafeLogParabolic", "SafeLogParabolic *", 0, 0, (void*)"QuantLib::LogParabolic", 0};
static swig_type_info _swigt__p_SafeMonotonicCubicNaturalSpline = {"_p_SafeMonotonicCubicNaturalSpline", "SafeMonotonicCubicNaturalSpline *", 0, 0, (void*)"QuantLib::MonotonicCubicNaturalSpline", 0};
static swig_type_info _swigt__p_SafeMonotonicLogCubicNaturalSpline = {"_p_SafeMonotonicLogCubicNaturalSpline", "SafeMonotonicLogCubicNaturalSpline *", 0, 0, (void*)"QuantLib::MonotonicLogCubicNaturalSpline", 0};
static swig_type_info _swigt__p_SafeMonotonicLogParabolic = {"_p_SafeMonotonicLogParabolic", "SafeMonotonicLogParabolic *", 0, 0, (void*)"QuantLib::MonotonicLogParabolic", 0};
static swig_type_info _swigt__p_SafeMonotonicParabolic = {"_p_SafeMonotonicParabolic", "SafeMonotonicParabolic *", 0, 0, (void*)"QuantLib::MonotonicParabolic", 0};
static swig_type_info _swigt__p_SafeParabolic = {"_p_SafeParabolic", "SafeParabolic *", 0, 0, (void*)"QuantLib::Parabolic", 0};
static swig_type_info _swigt__p_SalvagingAlgorithm = {"_p_SalvagingAlgorithm", "SalvagingAlgorithm *", 0, 0, (void*)"QuantLib::SalvagingAlgorithm", 0};
static swig_type_info _swigt__p_SampleT_Array_t = {"_p_SampleT_Array_t", "Sample< Array > *", 0, 0, (void*)"QuantLib::SampleArray", 0};
static swig_type_info _swigt__p_SampleT_MultiPath_t = {"_p_SampleT_MultiPath_t", "Sample< MultiPath > *", 0, 0, (void*)"QuantLib::SampleMultiPath", 0};
static swig_type_info _swigt__p_SampleT_Path_t = {"_p_SampleT_Path_t", "Sample< Path > *", 0, 0, (void*)"QuantLib::SamplePath", 0};
static swig_type_info _swigt__p_SampleT_double_t = {"_p_SampleT_double_t", "Sample< Real > *|Sample< double > *", 0, 0, (void*)"QuantLib::SampleNumber", 0};
static swig_type_info _swigt__p_SampleT_std__vectorT_double_t_t = {"_p_SampleT_std__vectorT_double_t_t", "Sample< std::vector< double > > *|Sample< std::vector< Real > > *", 0, 0, (void*)"QuantLib::SampleRealVector", 0};
static swig_type_info _swigt__p_SampledCurve = {"_p_SampledCurve", "SampledCurve *", 0, 0, (void*)"QuantLib::SampledCurve", 0};
static swig_type_info _swigt__p_SamplerGaussian = {"_p_SamplerGaussian", "SamplerGaussian *", 0, 0, (void*)"QuantLib::SamplerGaussian", 0};
static swig_type_info _swigt__p_SamplerLogNormal = {"_p_SamplerLogNormal", "SamplerLogNormal *", 0, 0, (void*)"QuantLib::SamplerLogNormal", 0};
static swig_type_info _swigt__p_SamplerMirrorGaussian = {"_p_SamplerMirrorGaussian", "SamplerMirrorGaussian *", 0, 0, (void*)"QuantLib::SamplerMirrorGaussian", 0};
static swig_type_info _swigt__p_Schedule = {"_p_Schedule", "Schedule *", 0, 0, (void*)"QuantLib::Schedule", 0};
static swig_type_info _swigt__p_Seasonality = {"_p_Seasonality", "Seasonality *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Secant = {"_p_Secant", "Secant *", 0, 0, (void*)"QuantLib::Secant", 0};
static swig_type_info _swigt__p_SegmentIntegral = {"_p_SegmentIntegral", "SegmentIntegral *", 0, 0, (void*)"QuantLib::SegmentIntegral", 0};
static swig_type_info _swigt__p_Settings = {"_p_Settings", "Settings *", 0, 0, (void*)"QuantLib::Settings", 0};
static swig_type_info _swigt__p_Settlement = {"_p_Settlement", "Settlement *", 0, 0, (void*)"QuantLib::Settlement", 0};
static swig_type_info _swigt__p_ShortRateModel = {"_p_ShortRateModel", "ShortRateModel *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_SimpleCashFlowPtr = {"_p_SimpleCashFlowPtr", "SimpleCashFlowPtr *", 0, 0, (void*)"QuantLib::SimpleCashFlow", 0};
static swig_type_info _swigt__p_SimplePolynomialFitting = {"_p_SimplePolynomialFitting", "SimplePolynomialFitting *", 0, 0, (void*)"QuantLib::SimplePolynomialFitting", 0};
static swig_type_info _swigt__p_SimpleQuotePtr = {"_p_SimpleQuotePtr", "SimpleQuotePtr *", 0, 0, (void*)"QuantLib::SimpleQuote", 0};
static swig_type_info _swigt__p_Simplex = {"_p_Simplex", "Simplex *", 0, 0, (void*)"QuantLib::Simplex", 0};
static swig_type_info _swigt__p_SimpsonIntegral = {"_p_SimpsonIntegral", "SimpsonIntegral *", 0, 0, (void*)"QuantLib::SimpsonIntegral", 0};
static swig_type_info _swigt__p_SobolBrownianBridgeRsg = {"_p_SobolBrownianBridgeRsg", "SobolBrownianBridgeRsg *", 0, 0, (void*)"QuantLib::SobolBrownianBridgeRsg", 0};
static swig_type_info _swigt__p_SobolRsg = {"_p_SobolRsg", "SobolRsg *", 0, 0, (void*)"QuantLib::SobolRsg", 0};
static swig_type_info _swigt__p_SoftCallabilityPtr = {"_p_SoftCallabilityPtr", "SoftCallabilityPtr *", 0, 0, (void*)"QuantLib::SoftCallability", 0};
static swig_type_info _swigt__p_SoniaPtr = {"_p_SoniaPtr", "SoniaPtr *", 0, 0, (void*)"QuantLib::Sonia", 0};
static swig_type_info _swigt__p_SpreadCdsHelperPtr = {"_p_SpreadCdsHelperPtr", "SpreadCdsHelperPtr *", 0, 0, (void*)"QuantLib::SpreadCdsHelper", 0};
static swig_type_info _swigt__p_SpreadedLinearZeroInterpolatedTermStructurePtr = {"_p_SpreadedLinearZeroInterpolatedTermStructurePtr", "SpreadedLinearZeroInterpolatedTermStructurePtr *", 0, 0, (void*)"QuantLib::SpreadedLinearZeroInterpolatedTermStructure", 0};
static swig_type_info _swigt__p_Statistics = {"_p_Statistics", "Statistics *", 0, 0, (void*)"QuantLib::Statistics", 0};
static swig_type_info _swigt__p_SteepestDescent = {"_p_SteepestDescent", "SteepestDescent *", 0, 0, (void*)"QuantLib::SteepestDescent", 0};
static swig_type_info _swigt__p_StochasticProcess = {"_p_StochasticProcess", "StochasticProcess *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_StochasticProcess1DPtr = {"_p_StochasticProcess1DPtr", "StochasticProcess1DPtr *", 0, 0, (void*)"QuantLib::StochasticProcess1D", 0};
static swig_type_info _swigt__p_StochasticProcessArrayPtr = {"_p_StochasticProcessArrayPtr", "StochasticProcessArrayPtr *", 0, 0, (void*)"QuantLib::StochasticProcessArray", 0};
static swig_type_info _swigt__p_StockPtr = {"_p_StockPtr", "StockPtr *", 0, 0, (void*)"QuantLib::Stock", 0};
static swig_type_info _swigt__p_StrippedOptionletAdapterPtr = {"_p_StrippedOptionletAdapterPtr", "StrippedOptionletAdapterPtr *", 0, 0, (void*)"QuantLib::StrippedOptionletAdapter", 0};
static swig_type_info _swigt__p_StrippedOptionletBase = {"_p_StrippedOptionletBase", "StrippedOptionletBase *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_StudentDistribution = {"_p_StudentDistribution", "StudentDistribution *", 0, 0, (void*)"QuantLib::StudentDistribution", 0};
static swig_type_info _swigt__p_StulzEnginePtr = {"_p_StulzEnginePtr", "StulzEnginePtr *", 0, 0, (void*)"QuantLib::StulzEngine", 0};
static swig_type_info _swigt__p_SuperSharePayoffPtr = {"_p_SuperSharePayoffPtr", "SuperSharePayoffPtr *", 0, 0, (void*)"QuantLib::SuperSharePayoff", 0};
static swig_type_info _swigt__p_SvenssonFitting = {"_p_SvenssonFitting", "SvenssonFitting *", 0, 0, (void*)"QuantLib::SvenssonFitting", 0};
static swig_type_info _swigt__p_SwapIndexPtr = {"_p_SwapIndexPtr", "SwapIndexPtr *", 0, 0, (void*)"QuantLib::SwapIndex", 0};
static swig_type_info _swigt__p_SwapPtr = {"_p_SwapPtr", "SwapPtr *", 0, 0, (void*)"QuantLib::Swap", 0};
static swig_type_info _swigt__p_SwapRateHelperPtr = {"_p_SwapRateHelperPtr", "SwapRateHelperPtr *", 0, 0, (void*)"QuantLib::SwapRateHelper", 0};
static swig_type_info _swigt__p_SwaptionHelperPtr = {"_p_SwaptionHelperPtr", "SwaptionHelperPtr *", 0, 0, (void*)"QuantLib::SwaptionHelper", 0};
static swig_type_info _swigt__p_SwaptionPtr = {"_p_SwaptionPtr", "SwaptionPtr *", 0, 0, (void*)"QuantLib::Swaption", 0};
static swig_type_info _swigt__p_SwaptionVolCube1Ptr = {"_p_SwaptionVolCube1Ptr", "SwaptionVolCube1Ptr *", 0, 0, (void*)"QuantLib::SwaptionVolCube1", 0};
static swig_type_info _swigt__p_SwaptionVolCube2Ptr = {"_p_SwaptionVolCube2Ptr", "SwaptionVolCube2Ptr *", 0, 0, (void*)"QuantLib::SwaptionVolCube2", 0};
static swig_type_info _swigt__p_SwaptionVolatilityMatrixPtr = {"_p_SwaptionVolatilityMatrixPtr", "SwaptionVolatilityMatrixPtr *", 0, 0, (void*)"QuantLib::SwaptionVolatilityMatrix", 0};
static swig_type_info _swigt__p_SwaptionVolatilityStructure = {"_p_SwaptionVolatilityStructure", "SwaptionVolatilityStructure *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_TRLiborPtr = {"_p_TRLiborPtr", "TRLiborPtr *", 0, 0, (void*)"QuantLib::TRLibor", 0};
static swig_type_info _swigt__p_TemperatureExponential = {"_p_TemperatureExponential", "TemperatureExponential *", 0, 0, (void*)"QuantLib::TemperatureExponential", 0};
static swig_type_info _swigt__p_TiborPtr = {"_p_TiborPtr", "TiborPtr *", 0, 0, (void*)"QuantLib::Tibor", 0};
static swig_type_info _swigt__p_TimeBasket = {"_p_TimeBasket", "TimeBasket *", 0, 0, (void*)"QuantLib::TimeBasket", 0};
static swig_type_info _swigt__p_TimeGrid = {"_p_TimeGrid", "TimeGrid *", 0, 0, (void*)"QuantLib::TimeGrid", 0};
static swig_type_info _swigt__p_TimeSeriesT_IntervalPrice_std__mapT_Date_IntervalPrice_t_t = {"_p_TimeSeriesT_IntervalPrice_std__mapT_Date_IntervalPrice_t_t", "TimeSeries< IntervalPrice > *|TimeSeries< IntervalPrice,std::map< Date,IntervalPrice > > *", 0, 0, (void*)"QuantLib::IntervalPriceTimeSeries", 0};
static swig_type_info _swigt__p_TimeSeriesT_double_std__mapT_Date_double_t_t = {"_p_TimeSeriesT_double_std__mapT_Date_double_t_t", "TimeSeries< double,std::map< Date,double > > *|TimeSeries< Volatility > *|TimeSeries< Real > *|TimeSeries< double > *", 0, 0, (void*)"QuantLib::RealTimeSeries", 0};
static swig_type_info _swigt__p_TrapezoidIntegralT_Default_t = {"_p_TrapezoidIntegralT_Default_t", "TrapezoidIntegral< Default > *", 0, 0, (void*)"QuantLib::TrapezoidIntegralDefault", 0};
static swig_type_info _swigt__p_TrapezoidIntegralT_MidPoint_t = {"_p_TrapezoidIntegralT_MidPoint_t", "TrapezoidIntegral< MidPoint > *", 0, 0, (void*)"QuantLib::TrapezoidIntegralMidPoint", 0};
static swig_type_info _swigt__p_TreeCallableFixedRateBondEnginePtr = {"_p_TreeCallableFixedRateBondEnginePtr", "TreeCallableFixedRateBondEnginePtr *", 0, 0, (void*)"QuantLib::TreeCallableFixedRateBondEngine", 0};
static swig_type_info _swigt__p_TreeCapFloorEnginePtr = {"_p_TreeCapFloorEnginePtr", "TreeCapFloorEnginePtr *", 0, 0, (void*)"QuantLib::TreeCapFloorEngine", 0};
static swig_type_info _swigt__p_TreeSwaptionEnginePtr = {"_p_TreeSwaptionEnginePtr", "TreeSwaptionEnginePtr *", 0, 0, (void*)"QuantLib::TreeSwaptionEngine", 0};
static swig_type_info _swigt__p_TridiagonalOperator = {"_p_TridiagonalOperator", "TridiagonalOperator *", 0, 0, (void*)"QuantLib::TridiagonalOperator", 0};
static swig_type_info _swigt__p_UKRPIPtr = {"_p_UKRPIPtr", "UKRPIPtr *", 0, 0, (void*)"QuantLib::UKRPI", 0};
static swig_type_info _swigt__p_USCPIPtr = {"_p_USCPIPtr", "USCPIPtr *", 0, 0, (void*)"QuantLib::USCPI", 0};
static swig_type_info _swigt__p_USDLiborPtr = {"_p_USDLiborPtr", "USDLiborPtr *", 0, 0, (void*)"QuantLib::USDLibor", 0};
static swig_type_info _swigt__p_UniformLowDiscrepancySequenceGenerator = {"_p_UniformLowDiscrepancySequenceGenerator", "UniformLowDiscrepancySequenceGenerator *", 0, 0, (void*)"QuantLib::UniformLowDiscrepancySequenceGenerator", 0};
static swig_type_info _swigt__p_UniformRandomGenerator = {"_p_UniformRandomGenerator", "UniformRandomGenerator *", 0, 0, (void*)"QuantLib::UniformRandomGenerator", 0};
static swig_type_info _swigt__p_UniformRandomSequenceGenerator = {"_p_UniformRandomSequenceGenerator", "UniformRandomSequenceGenerator *", 0, 0, (void*)"QuantLib::UniformRandomSequenceGenerator", 0};
static swig_type_info _swigt__p_UpRounding = {"_p_UpRounding", "UpRounding *", 0, 0, (void*)"QuantLib::UpRounding", 0};
static swig_type_info _swigt__p_UpfrontCdsHelperPtr = {"_p_UpfrontCdsHelperPtr", "UpfrontCdsHelperPtr *", 0, 0, (void*)"QuantLib::UpfrontCdsHelper", 0};
static swig_type_info _swigt__p_VanillaOptionPtr = {"_p_VanillaOptionPtr", "VanillaOptionPtr *", 0, 0, (void*)"QuantLib::VanillaOption", 0};
static swig_type_info _swigt__p_VanillaSwapPtr = {"_p_VanillaSwapPtr", "VanillaSwapPtr *", 0, 0, (void*)"QuantLib::VanillaSwap", 0};
static swig_type_info _swigt__p_VannaVolgaDoubleBarrierEnginePtr = {"_p_VannaVolgaDoubleBarrierEnginePtr", "VannaVolgaDoubleBarrierEnginePtr *", 0, 0, (void*)"QuantLib::VannaVolgaDoubleBarrierEngine", 0};
static swig_type_info _swigt__p_VarianceGammaEnginePtr = {"_p_VarianceGammaEnginePtr", "VarianceGammaEnginePtr *", 0, 0, (void*)"QuantLib::VarianceGammaEngine", 0};
static swig_type_info _swigt__p_VarianceGammaProcessPtr = {"_p_VarianceGammaProcessPtr", "VarianceGammaProcessPtr *", 0, 0, (void*)"QuantLib::VarianceGammaProcess", 0};
static swig_type_info _swigt__p_VasicekPtr = {"_p_VasicekPtr", "VasicekPtr *", 0, 0, (void*)"QuantLib::Vasicek", 0};
static swig_type_info _swigt__p_WulinYongDoubleBarrierEnginePtr = {"_p_WulinYongDoubleBarrierEnginePtr", "WulinYongDoubleBarrierEnginePtr *", 0, 0, (void*)"QuantLib::WulinYongDoubleBarrierEngine", 0};
static swig_type_info _swigt__p_YYEUHICPPtr = {"_p_YYEUHICPPtr", "YYEUHICPPtr *", 0, 0, (void*)"QuantLib::YYEUHICP", 0};
static swig_type_info _swigt__p_YYEUHICPXTPtr = {"_p_YYEUHICPXTPtr", "YYEUHICPXTPtr *", 0, 0, (void*)"QuantLib::YYEUHICPXT", 0};
static swig_type_info _swigt__p_YYFRHICPPtr = {"_p_YYFRHICPPtr", "YYFRHICPPtr *", 0, 0, (void*)"QuantLib::YYFRHICP", 0};
static swig_type_info _swigt__p_YYUKRPIPtr = {"_p_YYUKRPIPtr", "YYUKRPIPtr *", 0, 0, (void*)"QuantLib::YYUKRPI", 0};
static swig_type_info _swigt__p_YYUSCPIPtr = {"_p_YYUSCPIPtr", "YYUSCPIPtr *", 0, 0, (void*)"QuantLib::YYUSCPI", 0};
static swig_type_info _swigt__p_YYZACPIPtr = {"_p_YYZACPIPtr", "YYZACPIPtr *", 0, 0, (void*)"QuantLib::YYZACPI", 0};
static swig_type_info _swigt__p_YearOnYearInflationSwapHelperPtr = {"_p_YearOnYearInflationSwapHelperPtr", "YearOnYearInflationSwapHelperPtr *", 0, 0, (void*)"QuantLib::YearOnYearInflationSwapHelper", 0};
static swig_type_info _swigt__p_YearOnYearInflationSwapPtr = {"_p_YearOnYearInflationSwapPtr", "YearOnYearInflationSwapPtr *", 0, 0, (void*)"QuantLib::YearOnYearInflationSwap", 0};
static swig_type_info _swigt__p_YieldTermStructure = {"_p_YieldTermStructure", "YieldTermStructure *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_YoYHelper = {"_p_YoYHelper", "YoYHelper *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_YoYInflationCapFloorPtr = {"_p_YoYInflationCapFloorPtr", "YoYInflationCapFloorPtr *", 0, 0, (void*)"QuantLib::YoYInflationCapFloor", 0};
static swig_type_info _swigt__p_YoYInflationCapPtr = {"_p_YoYInflationCapPtr", "YoYInflationCapPtr *", 0, 0, (void*)"QuantLib::YoYInflationCap", 0};
static swig_type_info _swigt__p_YoYInflationCollarPtr = {"_p_YoYInflationCollarPtr", "YoYInflationCollarPtr *", 0, 0, (void*)"QuantLib::YoYInflationCollar", 0};
static swig_type_info _swigt__p_YoYInflationFloorPtr = {"_p_YoYInflationFloorPtr", "YoYInflationFloorPtr *", 0, 0, (void*)"QuantLib::YoYInflationFloor", 0};
static swig_type_info _swigt__p_YoYInflationIndexPtr = {"_p_YoYInflationIndexPtr", "YoYInflationIndexPtr *", 0, 0, (void*)"QuantLib::YoYInflationIndex", 0};
static swig_type_info _swigt__p_YoYInflationTermStructure = {"_p_YoYInflationTermStructure", "YoYInflationTermStructure *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_ZACPIPtr = {"_p_ZACPIPtr", "ZACPIPtr *", 0, 0, (void*)"QuantLib::ZACPI", 0};
static swig_type_info _swigt__p_ZeroCouponBondPtr = {"_p_ZeroCouponBondPtr", "ZeroCouponBondPtr *", 0, 0, (void*)"QuantLib::ZeroCouponBond", 0};
static swig_type_info _swigt__p_ZeroCouponInflationSwapHelperPtr = {"_p_ZeroCouponInflationSwapHelperPtr", "ZeroCouponInflationSwapHelperPtr *", 0, 0, (void*)"QuantLib::ZeroCouponInflationSwapHelper", 0};
static swig_type_info _swigt__p_ZeroCouponInflationSwapPtr = {"_p_ZeroCouponInflationSwapPtr", "ZeroCouponInflationSwapPtr *", 0, 0, (void*)"QuantLib::ZeroCouponInflationSwap", 0};
static swig_type_info _swigt__p_ZeroCurvePtr = {"_p_ZeroCurvePtr", "ZeroCurvePtr *", 0, 0, (void*)"QuantLib::ZeroCurve", 0};
static swig_type_info _swigt__p_ZeroHelper = {"_p_ZeroHelper", "ZeroHelper *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_ZeroInflationIndexPtr = {"_p_ZeroInflationIndexPtr", "ZeroInflationIndexPtr *", 0, 0, (void*)"QuantLib::ZeroInflationIndex", 0};
static swig_type_info _swigt__p_ZeroInflationTermStructure = {"_p_ZeroInflationTermStructure", "ZeroInflationTermStructure *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_ZeroSpreadedTermStructurePtr = {"_p_ZeroSpreadedTermStructurePtr", "ZeroSpreadedTermStructurePtr *", 0, 0, (void*)"QuantLib::ZeroSpreadedTermStructure", 0};
static swig_type_info _swigt__p_ZeroYield = {"_p_ZeroYield", "ZeroYield *", 0, 0, (void*)"QuantLib::ZeroYield", 0};
static swig_type_info _swigt__p_ZiborPtr = {"_p_ZiborPtr", "ZiborPtr *", 0, 0, (void*)"QuantLib::Zibor", 0};
static swig_type_info _swigt__p_boost__shared_ptrT_BlackVolTermStructure_t = {"_p_boost__shared_ptrT_BlackVolTermStructure_t", "boost::shared_ptr< BlackVolTermStructure > *", 0, 0, (void*)"QuantLib::BlackVolTermStructure", 0};
static swig_type_info _swigt__p_boost__shared_ptrT_CalibratedModel_t = {"_p_boost__shared_ptrT_CalibratedModel_t", "boost::shared_ptr< CalibratedModel > *", 0, 0, (void*)"QuantLib::CalibratedModel", 0};
static swig_type_info _swigt__p_boost__shared_ptrT_CalibrationHelper_t = {"_p_boost__shared_ptrT_CalibrationHelper_t", "boost::shared_ptr< CalibrationHelper > *", 0, 0, (void*)"QuantLib::CalibrationHelper", 0};
static swig_type_info _swigt__p_boost__shared_ptrT_Callability_t = {"_p_boost__shared_ptrT_Callability_t", "boost::shared_ptr< Callability > *", 0, 0, (void*)"QuantLib::Callability", 0};
static swig_type_info _swigt__p_boost__shared_ptrT_CapFloorTermVolatilityStructure_t = {"_p_boost__shared_ptrT_CapFloorTermVolatilityStructure_t", "boost::shared_ptr< CapFloorTermVolatilityStructure > *", 0, 0, (void*)"QuantLib::CapFloorTermVolatilityStructure", 0};
static swig_type_info _swigt__p_boost__shared_ptrT_CashFlow_t = {"_p_boost__shared_ptrT_CashFlow_t", "boost::shared_ptr< CashFlow > *", 0, 0, (void*)"QuantLib::CashFlow", 0};
static swig_type_info _swigt__p_boost__shared_ptrT_DefaultBoundaryCondition_t = {"_p_boost__shared_ptrT_DefaultBoundaryCondition_t", "boost::shared_ptr< DefaultBoundaryCondition > *", 0, 0, (void*)"QuantLib::BoundaryCondition", 0};
static swig_type_info _swigt__p_boost__shared_ptrT_DefaultProbabilityHelper_t = {"_p_boost__shared_ptrT_DefaultProbabilityHelper_t", "boost::shared_ptr< DefaultProbabilityHelper > *", 0, 0, (void*)"QuantLib::DefaultProbabilityHelper", 0};
static swig_type_info _swigt__p_boost__shared_ptrT_DefaultProbabilityTermStructure_t = {"_p_boost__shared_ptrT_DefaultProbabilityTermStructure_t", "boost::shared_ptr< DefaultProbabilityTermStructure > *", 0, 0, (void*)"QuantLib::DefaultProbabilityTermStructure", 0};
static swig_type_info _swigt__p_boost__shared_ptrT_DeltaVolQuote_t = {"_p_boost__shared_ptrT_DeltaVolQuote_t", "boost::shared_ptr< DeltaVolQuote > *", 0, 0, (void*)"QuantLib::DeltaVolQuote", 0};
static swig_type_info _swigt__p_boost__shared_ptrT_Dividend_t = {"_p_boost__shared_ptrT_Dividend_t", "boost::shared_ptr< Dividend > *", 0, 0, (void*)"QuantLib::Dividend", 0};
static swig_type_info _swigt__p_boost__shared_ptrT_EndCriteria_t = {"_p_boost__shared_ptrT_EndCriteria_t", "boost::shared_ptr< EndCriteria > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_boost__shared_ptrT_Exercise_t = {"_p_boost__shared_ptrT_Exercise_t", "boost::shared_ptr< Exercise > *", 0, 0, (void*)"QuantLib::Exercise", 0};
static swig_type_info _swigt__p_boost__shared_ptrT_FloatingRateCouponPricer_t = {"_p_boost__shared_ptrT_FloatingRateCouponPricer_t", "boost::shared_ptr< FloatingRateCouponPricer > *", 0, 0, (void*)"QuantLib::FloatingRateCouponPricer", 0};
static swig_type_info _swigt__p_boost__shared_ptrT_Gaussian1dModel_t = {"_p_boost__shared_ptrT_Gaussian1dModel_t", "boost::shared_ptr< Gaussian1dModel > *", 0, 0, (void*)"QuantLib::Gaussian1dModel", 0};
static swig_type_info _swigt__p_boost__shared_ptrT_IborIndex_t = {"_p_boost__shared_ptrT_IborIndex_t", "boost::shared_ptr< IborIndex > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_boost__shared_ptrT_Index_t = {"_p_boost__shared_ptrT_Index_t", "boost::shared_ptr< Index > *", 0, 0, (void*)"QuantLib::Index", 0};
static swig_type_info _swigt__p_boost__shared_ptrT_Instrument_t = {"_p_boost__shared_ptrT_Instrument_t", "boost::shared_ptr< Instrument > *", 0, 0, (void*)"QuantLib::Instrument", 0};
static swig_type_info _swigt__p_boost__shared_ptrT_LocalVolTermStructure_t = {"_p_boost__shared_ptrT_LocalVolTermStructure_t", "boost::shared_ptr< LocalVolTermStructure > *", 0, 0, (void*)"QuantLib::LocalVolTermStructure", 0};
static swig_type_info _swigt__p_boost__shared_ptrT_Observable_t = {"_p_boost__shared_ptrT_Observable_t", "boost::shared_ptr< Observable > *", 0, 0, (void*)"QuantLib::Observable", 0};
static swig_type_info _swigt__p_boost__shared_ptrT_OptimizationMethod_t = {"_p_boost__shared_ptrT_OptimizationMethod_t", "boost::shared_ptr< OptimizationMethod > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_boost__shared_ptrT_OptionletVolatilityStructure_t = {"_p_boost__shared_ptrT_OptionletVolatilityStructure_t", "boost::shared_ptr< OptionletVolatilityStructure > *", 0, 0, (void*)"QuantLib::OptionletVolatilityStructure", 0};
static swig_type_info _swigt__p_boost__shared_ptrT_Payoff_t = {"_p_boost__shared_ptrT_Payoff_t", "boost::shared_ptr< Payoff > *", 0, 0, (void*)"QuantLib::Payoff", 0};
static swig_type_info _swigt__p_boost__shared_ptrT_PricingEngine_t = {"_p_boost__shared_ptrT_PricingEngine_t", "boost::shared_ptr< PricingEngine > *", 0, 0, (void*)"QuantLib::PricingEngine", 0};
static swig_type_info _swigt__p_boost__shared_ptrT_Quote_t = {"_p_boost__shared_ptrT_Quote_t", "boost::shared_ptr< Quote > *", 0, 0, (void*)"QuantLib::Quote", 0};
static swig_type_info _swigt__p_boost__shared_ptrT_RateHelper_t = {"_p_boost__shared_ptrT_RateHelper_t", "boost::shared_ptr< RateHelper > *", 0, 0, (void*)"QuantLib::RateHelper", 0};
static swig_type_info _swigt__p_boost__shared_ptrT_Seasonality_t = {"_p_boost__shared_ptrT_Seasonality_t", "boost::shared_ptr< Seasonality > *", 0, 0, (void*)"QuantLib::Seasonality", 0};
static swig_type_info _swigt__p_boost__shared_ptrT_ShortRateModel_t = {"_p_boost__shared_ptrT_ShortRateModel_t", "boost::shared_ptr< ShortRateModel > *", 0, 0, (void*)"QuantLib::ShortRateModel", 0};
static swig_type_info _swigt__p_boost__shared_ptrT_StochasticProcess_t = {"_p_boost__shared_ptrT_StochasticProcess_t", "boost::shared_ptr< StochasticProcess > *", 0, 0, (void*)"QuantLib::StochasticProcess", 0};
static swig_type_info _swigt__p_boost__shared_ptrT_StrippedOptionletBase_t = {"_p_boost__shared_ptrT_StrippedOptionletBase_t", "boost::shared_ptr< StrippedOptionletBase > *", 0, 0, (void*)"QuantLib::StrippedOptionletBase", 0};
static swig_type_info _swigt__p_boost__shared_ptrT_SwapIndex_t = {"_p_boost__shared_ptrT_SwapIndex_t", "boost::shared_ptr< SwapIndex > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_boost__shared_ptrT_SwaptionVolatilityStructure_t = {"_p_boost__shared_ptrT_SwaptionVolatilityStructure_t", "boost::shared_ptr< SwaptionVolatilityStructure > *", 0, 0, (void*)"QuantLib::SwaptionVolatilityStructure", 0};
static swig_type_info _swigt__p_boost__shared_ptrT_YieldTermStructure_t = {"_p_boost__shared_ptrT_YieldTermStructure_t", "boost::shared_ptr< YieldTermStructure > *", 0, 0, (void*)"QuantLib::YieldTermStructure", 0};
static swig_type_info _swigt__p_boost__shared_ptrT_YoYHelper_t = {"_p_boost__shared_ptrT_YoYHelper_t", "boost::shared_ptr< YoYHelper > *", 0, 0, (void*)"QuantLib::YoYHelper", 0};
static swig_type_info _swigt__p_boost__shared_ptrT_YoYInflationTermStructure_t = {"_p_boost__shared_ptrT_YoYInflationTermStructure_t", "boost::shared_ptr< YoYInflationTermStructure > *", 0, 0, (void*)"QuantLib::YoYInflationTermStructure", 0};
static swig_type_info _swigt__p_boost__shared_ptrT_ZeroHelper_t = {"_p_boost__shared_ptrT_ZeroHelper_t", "boost::shared_ptr< ZeroHelper > *", 0, 0, (void*)"QuantLib::ZeroHelper", 0};
static swig_type_info _swigt__p_boost__shared_ptrT_ZeroInflationTermStructure_t = {"_p_boost__shared_ptrT_ZeroInflationTermStructure_t", "boost::shared_ptr< ZeroInflationTermStructure > *", 0, 0, (void*)"QuantLib::ZeroInflationTermStructure", 0};
static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_double = {"_p_double", "Rate *|Time *|double *|Spread *|Decimal *|DiscountFactor *|Real *|Probability *|Volatility *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_doubleOrNull = {"_p_doubleOrNull", "doubleOrNull *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_int = {"_p_int", "int *|Hour *|Year *|Minute *|Day *|Integer *|Second *|Millisecond *|Microsecond *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_intOrNull = {"_p_intOrNull", "intOrNull *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_long = {"_p_long", "long *|BigInteger *", 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__out_of_range = {"_p_std__out_of_range", "std::out_of_range *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__pairT_Date_double_t = {"_p_std__pairT_Date_double_t", "std::pair< Date,double > *", 0, 0, (void*)"QuantLib::NodePair", 0};
static swig_type_info _swigt__p_std__size_t = {"_p_std__size_t", "Size *|std::size_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__vectorT_Date_t = {"_p_std__vectorT_Date_t", "std::vector< Date > *", 0, 0, (void*)"QuantLib::DateVector", 0};
static swig_type_info _swigt__p_std__vectorT_HandleT_Quote_t_t = {"_p_std__vectorT_HandleT_Quote_t_t", "std::vector< Handle< Quote > > *", 0, 0, (void*)"QuantLib::QuoteHandleVector", 0};
static swig_type_info _swigt__p_std__vectorT_InterestRate_t = {"_p_std__vectorT_InterestRate_t", "std::vector< InterestRate > *", 0, 0, (void*)"QuantLib::InterestRateVector", 0};
static swig_type_info _swigt__p_std__vectorT_IntervalPrice_t = {"_p_std__vectorT_IntervalPrice_t", "std::vector< IntervalPrice > *", 0, 0, (void*)"QuantLib::IntervalPriceVector", 0};
static swig_type_info _swigt__p_std__vectorT_Period_t = {"_p_std__vectorT_Period_t", "std::vector< Period > *", 0, 0, (void*)"QuantLib::PeriodVector", 0};
static swig_type_info _swigt__p_std__vectorT_RelinkableHandleT_Quote_t_t = {"_p_std__vectorT_RelinkableHandleT_Quote_t_t", "std::vector< RelinkableHandle< Quote > > *", 0, 0, (void*)"QuantLib::RelinkableQuoteHandleVector", 0};
static swig_type_info _swigt__p_std__vectorT_bool_t = {"_p_std__vectorT_bool_t", "std::vector< bool > *", 0, 0, (void*)"QuantLib::BoolVector", 0};
static swig_type_info _swigt__p_std__vectorT_boost__shared_ptrT_CalibrationHelper_t_t = {"_p_std__vectorT_boost__shared_ptrT_CalibrationHelper_t_t", "std::vector< boost::shared_ptr< CalibrationHelper > > *", 0, 0, (void*)"QuantLib::CalibrationHelperVector", 0};
static swig_type_info _swigt__p_std__vectorT_boost__shared_ptrT_Callability_t_t = {"_p_std__vectorT_boost__shared_ptrT_Callability_t_t", "std::vector< boost::shared_ptr< Callability > > *", 0, 0, (void*)"QuantLib::CallabilitySchedule", 0};
static swig_type_info _swigt__p_std__vectorT_boost__shared_ptrT_CashFlow_t_t = {"_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t", "std::vector< boost::shared_ptr< CashFlow > > *|Leg *", 0, 0, (void*)"QuantLib::Leg", 0};
static swig_type_info _swigt__p_std__vectorT_boost__shared_ptrT_DefaultProbabilityHelper_t_t = {"_p_std__vectorT_boost__shared_ptrT_DefaultProbabilityHelper_t_t", "std::vector< boost::shared_ptr< DefaultProbabilityHelper > > *", 0, 0, (void*)"QuantLib::DefaultProbabilityHelperVector", 0};
static swig_type_info _swigt__p_std__vectorT_boost__shared_ptrT_Dividend_t_t = {"_p_std__vectorT_boost__shared_ptrT_Dividend_t_t", "std::vector< boost::shared_ptr< Dividend > > *", 0, 0, (void*)"QuantLib::DividendSchedule", 0};
static swig_type_info _swigt__p_std__vectorT_boost__shared_ptrT_Instrument_t_t = {"_p_std__vectorT_boost__shared_ptrT_Instrument_t_t", "std::vector< boost::shared_ptr< Instrument > > *", 0, 0, (void*)"QuantLib::InstrumentVector", 0};
static swig_type_info _swigt__p_std__vectorT_boost__shared_ptrT_Quote_t_t = {"_p_std__vectorT_boost__shared_ptrT_Quote_t_t", "std::vector< boost::shared_ptr< Quote > > *", 0, 0, (void*)"QuantLib::QuoteVector", 0};
static swig_type_info _swigt__p_std__vectorT_boost__shared_ptrT_RateHelper_t_t = {"_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t", "std::vector< boost::shared_ptr< RateHelper > > *", 0, 0, (void*)"QuantLib::RateHelperVector", 0};
static swig_type_info _swigt__p_std__vectorT_boost__shared_ptrT_StochasticProcess_t_t = {"_p_std__vectorT_boost__shared_ptrT_StochasticProcess_t_t", "std::vector< boost::shared_ptr< StochasticProcess > > *", 0, 0, (void*)"QuantLib::StochasticProcessVector", 0};
static swig_type_info _swigt__p_std__vectorT_boost__shared_ptrT_YoYHelper_t_t = {"_p_std__vectorT_boost__shared_ptrT_YoYHelper_t_t", "std::vector< boost::shared_ptr< YoYHelper > > *", 0, 0, (void*)"QuantLib::YoYHelperVector", 0};
static swig_type_info _swigt__p_std__vectorT_boost__shared_ptrT_ZeroHelper_t_t = {"_p_std__vectorT_boost__shared_ptrT_ZeroHelper_t_t", "std::vector< boost::shared_ptr< ZeroHelper > > *", 0, 0, (void*)"QuantLib::ZeroHelperVector", 0};
static swig_type_info _swigt__p_std__vectorT_double_t = {"_p_std__vectorT_double_t", "std::vector< Rate > *|std::vector< Time > *|std::vector< Spread > *|std::vector< DiscountFactor > *|std::vector< Volatility > *|std::vector< Real > *|std::vector< double > *", 0, 0, (void*)"QuantLib::DoubleVector", 0};
static swig_type_info _swigt__p_std__vectorT_int_t = {"_p_std__vectorT_int_t", "std::vector< int > *", 0, 0, (void*)"QuantLib::IntVector", 0};
static swig_type_info _swigt__p_std__vectorT_std__pairT_Date_double_t_t = {"_p_std__vectorT_std__pairT_Date_double_t_t", "std::vector< std::pair< Date,double > > *", 0, 0, (void*)"QuantLib::NodeVector", 0};
static swig_type_info _swigt__p_std__vectorT_std__string_t = {"_p_std__vectorT_std__string_t", "std::vector< std::string > *", 0, 0, (void*)"QuantLib::StrVector", 0};
static swig_type_info _swigt__p_std__vectorT_std__vectorT_HandleT_Quote_t_t_t = {"_p_std__vectorT_std__vectorT_HandleT_Quote_t_t_t", "std::vector< std::vector< Handle< Quote > > > *", 0, 0, (void*)"QuantLib::QuoteHandleVectorVector", 0};
static swig_type_info _swigt__p_std__vectorT_std__vectorT_RelinkableHandleT_Quote_t_t_t = {"_p_std__vectorT_std__vectorT_RelinkableHandleT_Quote_t_t_t", "std::vector< std::vector< RelinkableHandle< Quote > > > *", 0, 0, (void*)"QuantLib::RelinkableQuoteHandleVectorVector", 0};
static swig_type_info _swigt__p_std__vectorT_std__vectorT_boost__shared_ptrT_Quote_t_t_t = {"_p_std__vectorT_std__vectorT_boost__shared_ptrT_Quote_t_t_t", "std::vector< std::vector< boost::shared_ptr< Quote > > > *", 0, 0, (void*)"QuantLib::QuoteVectorVector", 0};
static swig_type_info _swigt__p_std__vectorT_std__vectorT_double_t_t = {"_p_std__vectorT_std__vectorT_double_t_t", "std::vector< std::vector< double > > *|std::vector< std::vector< Real > > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__vectorT_unsigned_int_t = {"_p_std__vectorT_unsigned_int_t", "std::vector< Natural > *|std::vector< unsigned int > *", 0, 0, (void*)"QuantLib::UnsignedIntVector", 0};
static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "unsigned int *|Natural *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_unsigned_long = {"_p_unsigned_long", "BigNatural *|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_ASX,
  &_swigt__p_AUDLiborPtr,
  &_swigt__p_AmericanExercisePtr,
  &_swigt__p_AmortizingPaymentPtr,
  &_swigt__p_AnalyticBarrierEnginePtr,
  &_swigt__p_AnalyticBinaryBarrierEnginePtr,
  &_swigt__p_AnalyticCapFloorEnginePtr,
  &_swigt__p_AnalyticContinuousGeometricAveragePriceAsianEnginePtr,
  &_swigt__p_AnalyticDigitalAmericanEnginePtr,
  &_swigt__p_AnalyticDigitalAmericanKOEnginePtr,
  &_swigt__p_AnalyticDiscreteGeometricAveragePriceAsianEnginePtr,
  &_swigt__p_AnalyticDiscreteGeometricAverageStrikeAsianEnginePtr,
  &_swigt__p_AnalyticDividendEuropeanEnginePtr,
  &_swigt__p_AnalyticDoubleBarrierBinaryEnginePtr,
  &_swigt__p_AnalyticDoubleBarrierEnginePtr,
  &_swigt__p_AnalyticEuropeanEnginePtr,
  &_swigt__p_AnalyticHaganPricerPtr,
  &_swigt__p_AnalyticHestonEnginePtr,
  &_swigt__p_AnalyticPTDHestonEnginePtr,
  &_swigt__p_AoniaPtr,
  &_swigt__p_Array,
  &_swigt__p_AssetOrNothingPayoffPtr,
  &_swigt__p_AssetSwapPtr,
  &_swigt__p_Average,
  &_swigt__p_AverageBasketPayoffPtr,
  &_swigt__p_BFGS,
  &_swigt__p_BachelierCapFloorEnginePtr,
  &_swigt__p_BachelierSwaptionEnginePtr,
  &_swigt__p_BackwardFlat,
  &_swigt__p_BackwardFlatZeroCurvePtr,
  &_swigt__p_BaroneAdesiWhaleyApproximationEnginePtr,
  &_swigt__p_Barrier,
  &_swigt__p_BarrierOptionPtr,
  &_swigt__p_BasketOptionPtr,
  &_swigt__p_BasketPayoffPtr,
  &_swigt__p_BatesEnginePtr,
  &_swigt__p_BatesModelPtr,
  &_swigt__p_BatesProcessPtr,
  &_swigt__p_Bbsw1MPtr,
  &_swigt__p_Bbsw2MPtr,
  &_swigt__p_Bbsw3MPtr,
  &_swigt__p_Bbsw4MPtr,
  &_swigt__p_Bbsw5MPtr,
  &_swigt__p_Bbsw6MPtr,
  &_swigt__p_BbswPtr,
  &_swigt__p_BermudanExercisePtr,
  &_swigt__p_BinomialBarrierEnginePtr,
  &_swigt__p_BinomialConvertibleEnginePtr,
  &_swigt__p_BinomialDistribution,
  &_swigt__p_BinomialDoubleBarrierEnginePtr,
  &_swigt__p_BinomialVanillaEnginePtr,
  &_swigt__p_Bisection,
  &_swigt__p_BivariateCumulativeNormalDistribution,
  &_swigt__p_BivariateCumulativeNormalDistributionDr78,
  &_swigt__p_BivariateCumulativeNormalDistributionWe04DP,
  &_swigt__p_BjerksundStenslandApproximationEnginePtr,
  &_swigt__p_Bkbm1MPtr,
  &_swigt__p_Bkbm2MPtr,
  &_swigt__p_Bkbm3MPtr,
  &_swigt__p_Bkbm4MPtr,
  &_swigt__p_Bkbm5MPtr,
  &_swigt__p_Bkbm6MPtr,
  &_swigt__p_BkbmPtr,
  &_swigt__p_BlackCalculator,
  &_swigt__p_BlackCallableFixedRateBondEnginePtr,
  &_swigt__p_BlackCapFloorEnginePtr,
  &_swigt__p_BlackConstantVolPtr,
  &_swigt__p_BlackDeltaCalculator,
  &_swigt__p_BlackIborCouponPricerPtr,
  &_swigt__p_BlackKarasinskiPtr,
  &_swigt__p_BlackProcessPtr,
  &_swigt__p_BlackScholesMertonProcessPtr,
  &_swigt__p_BlackScholesProcessPtr,
  &_swigt__p_BlackSwaptionEnginePtr,
  &_swigt__p_BlackVarianceCurvePtr,
  &_swigt__p_BlackVarianceSurfacePtr,
  &_swigt__p_BlackVolTermStructure,
  &_swigt__p_BondFunctions,
  &_swigt__p_BondHelperPtr,
  &_swigt__p_BondPtr,
  &_swigt__p_BoundaryConstraint,
  &_swigt__p_BoxMullerGaussianRngT_KnuthUniformRng_t,
  &_swigt__p_BoxMullerGaussianRngT_LecuyerUniformRng_t,
  &_swigt__p_BoxMullerGaussianRngT_MersenneTwisterUniformRng_t,
  &_swigt__p_Brent,
  &_swigt__p_BrownianBridge,
  &_swigt__p_CADLiborPtr,
  &_swigt__p_CHFLiborPtr,
  &_swigt__p_CLGaussianRngT_KnuthUniformRng_t,
  &_swigt__p_CLGaussianRngT_LecuyerUniformRng_t,
  &_swigt__p_CLGaussianRngT_MersenneTwisterUniformRng_t,
  &_swigt__p_CPI,
  &_swigt__p_CPIBondPtr,
  &_swigt__p_Calendar,
  &_swigt__p_CalibratedModel,
  &_swigt__p_CalibrationHelper,
  &_swigt__p_Callability,
  &_swigt__p_CallabilityPrice,
  &_swigt__p_CallableFixedRateBondPtr,
  &_swigt__p_CapFloorPtr,
  &_swigt__p_CapFloorTermVolCurvePtr,
  &_swigt__p_CapFloorTermVolSurfacePtr,
  &_swigt__p_CapFloorTermVolatilityStructure,
  &_swigt__p_CapHelperPtr,
  &_swigt__p_CapPtr,
  &_swigt__p_CappedFlooredCmsCouponPtr,
  &_swigt__p_CappedFlooredCouponPtr,
  &_swigt__p_CashFlow,
  &_swigt__p_CashFlows,
  &_swigt__p_CashOrNothingPayoffPtr,
  &_swigt__p_CdorPtr,
  &_swigt__p_CeilingTruncation,
  &_swigt__p_ClosestRounding,
  &_swigt__p_CmsCouponPricerPtr,
  &_swigt__p_CmsCouponPtr,
  &_swigt__p_CmsRateBondPtr,
  &_swigt__p_CollarPtr,
  &_swigt__p_CompositeConstraint,
  &_swigt__p_CompositeInstrumentPtr,
  &_swigt__p_ConjugateGradient,
  &_swigt__p_ConstantEstimator,
  &_swigt__p_ConstantOptionletVolatilityPtr,
  &_swigt__p_ConstantParameter,
  &_swigt__p_ConstantSwaptionVolatilityPtr,
  &_swigt__p_Constraint,
  &_swigt__p_ContinuousArithmeticAsianLevyEnginePtr,
  &_swigt__p_ContinuousAveragingAsianOptionPtr,
  &_swigt__p_ConvertibleFixedCouponBondPtr,
  &_swigt__p_ConvertibleFloatingRateBondPtr,
  &_swigt__p_ConvertibleZeroCouponBondPtr,
  &_swigt__p_CouponPtr,
  &_swigt__p_CreditDefaultSwapPtr,
  &_swigt__p_Cubic,
  &_swigt__p_CubicBSplinesFitting,
  &_swigt__p_CubicZeroCurvePtr,
  &_swigt__p_CumulativeBinomialDistribution,
  &_swigt__p_CumulativeChiSquareDistribution,
  &_swigt__p_CumulativeGammaDistribution,
  &_swigt__p_CumulativeNormalDistribution,
  &_swigt__p_CumulativePoissonDistribution,
  &_swigt__p_CumulativeStudentDistribution,
  &_swigt__p_Currency,
  &_swigt__p_CustomRegion,
  &_swigt__p_DKKLiborPtr,
  &_swigt__p_DMinus,
  &_swigt__p_DPlus,
  &_swigt__p_DPlusDMinus,
  &_swigt__p_DZero,
  &_swigt__p_Date,
  &_swigt__p_DateGeneration,
  &_swigt__p_DateParser,
  &_swigt__p_DatedOISRateHelperPtr,
  &_swigt__p_DayCounter,
  &_swigt__p_DefaultBoundaryCondition,
  &_swigt__p_DefaultDensity,
  &_swigt__p_DefaultDensityCurvePtr,
  &_swigt__p_DefaultLexicographicalView,
  &_swigt__p_DefaultLogCubic,
  &_swigt__p_DefaultProbabilityHelper,
  &_swigt__p_DefaultProbabilityTermStructure,
  &_swigt__p_DeltaVolQuote,
  &_swigt__p_DepositRateHelperPtr,
  &_swigt__p_DifferentialEvolution,
  &_swigt__p_DirichletBCPtr,
  &_swigt__p_Discount,
  &_swigt__p_DiscountCurvePtr,
  &_swigt__p_DiscountingBondEnginePtr,
  &_swigt__p_DiscountingSwapEnginePtr,
  &_swigt__p_DiscreteAveragingAsianOptionPtr,
  &_swigt__p_Dividend,
  &_swigt__p_DividendVanillaOptionPtr,
  &_swigt__p_DoubleBarrier,
  &_swigt__p_DoubleBarrierOptionPtr,
  &_swigt__p_DownRounding,
  &_swigt__p_Duration,
  &_swigt__p_EUHICPPtr,
  &_swigt__p_EUHICPXTPtr,
  &_swigt__p_EURLibor10MPtr,
  &_swigt__p_EURLibor11MPtr,
  &_swigt__p_EURLibor1MPtr,
  &_swigt__p_EURLibor1YPtr,
  &_swigt__p_EURLibor2MPtr,
  &_swigt__p_EURLibor2WPtr,
  &_swigt__p_EURLibor3MPtr,
  &_swigt__p_EURLibor4MPtr,
  &_swigt__p_EURLibor5MPtr,
  &_swigt__p_EURLibor6MPtr,
  &_swigt__p_EURLibor7MPtr,
  &_swigt__p_EURLibor8MPtr,
  &_swigt__p_EURLibor9MPtr,
  &_swigt__p_EURLiborPtr,
  &_swigt__p_EURLiborSWPtr,
  &_swigt__p_EndCriteria,
  &_swigt__p_EndCriteria__Type,
  &_swigt__p_EoniaPtr,
  &_swigt__p_EurLiborSwapIfrFixPtr,
  &_swigt__p_EurLiborSwapIsdaFixAPtr,
  &_swigt__p_EurLiborSwapIsdaFixBPtr,
  &_swigt__p_Euribor10MPtr,
  &_swigt__p_Euribor11MPtr,
  &_swigt__p_Euribor1MPtr,
  &_swigt__p_Euribor1YPtr,
  &_swigt__p_Euribor2MPtr,
  &_swigt__p_Euribor2WPtr,
  &_swigt__p_Euribor365Ptr,
  &_swigt__p_Euribor365_10MPtr,
  &_swigt__p_Euribor365_11MPtr,
  &_swigt__p_Euribor365_1MPtr,
  &_swigt__p_Euribor365_1YPtr,
  &_swigt__p_Euribor365_2MPtr,
  &_swigt__p_Euribor365_2WPtr,
  &_swigt__p_Euribor365_3MPtr,
  &_swigt__p_Euribor365_3WPtr,
  &_swigt__p_Euribor365_4MPtr,
  &_swigt__p_Euribor365_5MPtr,
  &_swigt__p_Euribor365_6MPtr,
  &_swigt__p_Euribor365_7MPtr,
  &_swigt__p_Euribor365_8MPtr,
  &_swigt__p_Euribor365_9MPtr,
  &_swigt__p_Euribor365_SWPtr,
  &_swigt__p_Euribor3MPtr,
  &_swigt__p_Euribor3WPtr,
  &_swigt__p_Euribor4MPtr,
  &_swigt__p_Euribor5MPtr,
  &_swigt__p_Euribor6MPtr,
  &_swigt__p_Euribor7MPtr,
  &_swigt__p_Euribor8MPtr,
  &_swigt__p_Euribor9MPtr,
  &_swigt__p_EuriborPtr,
  &_swigt__p_EuriborSWPtr,
  &_swigt__p_EuriborSwapIfrFixPtr,
  &_swigt__p_EuriborSwapIsdaFixAPtr,
  &_swigt__p_EuriborSwapIsdaFixBPtr,
  &_swigt__p_EuropeanExercisePtr,
  &_swigt__p_EuropeanOptionPtr,
  &_swigt__p_EverestOptionPtr,
  &_swigt__p_ExchangeRate,
  &_swigt__p_ExchangeRateManager,
  &_swigt__p_Exercise,
  &_swigt__p_ExponentialSplinesFitting,
  &_swigt__p_Extrapolator,
  &_swigt__p_FDAmericanEnginePtr,
  &_swigt__p_FDBermudanEnginePtr,
  &_swigt__p_FDDividendAmericanEnginePtr,
  &_swigt__p_FDDividendEuropeanEnginePtr,
  &_swigt__p_FDEuropeanEnginePtr,
  &_swigt__p_FDShoutEnginePtr,
  &_swigt__p_FFTVarianceGammaEnginePtr,
  &_swigt__p_FRHICPPtr,
  &_swigt__p_FalsePosition,
  &_swigt__p_FdBatesVanillaEnginePtr,
  &_swigt__p_FdBlackScholesAsianEnginePtr,
  &_swigt__p_FdBlackScholesBarrierEnginePtr,
  &_swigt__p_FdBlackScholesVanillaEnginePtr,
  &_swigt__p_FdG2SwaptionEnginePtr,
  &_swigt__p_FdHullWhiteSwaptionEnginePtr,
  &_swigt__p_FdmSchemeDesc,
  &_swigt__p_FedFundsPtr,
  &_swigt__p_FittedBondDiscountCurvePtr,
  &_swigt__p_FittingMethod,
  &_swigt__p_FixedDividendPtr,
  &_swigt__p_FixedRateBondForwardPtr,
  &_swigt__p_FixedRateBondHelperPtr,
  &_swigt__p_FixedRateBondPtr,
  &_swigt__p_FixedRateCouponPtr,
  &_swigt__p_FlatForwardPtr,
  &_swigt__p_FlatHazardRatePtr,
  &_swigt__p_FloatFloatSwapPtr,
  &_swigt__p_FloatFloatSwaptionPtr,
  &_swigt__p_FloatingRateBondPtr,
  &_swigt__p_FloatingRateCouponPricer,
  &_swigt__p_FloatingRateCouponPtr,
  &_swigt__p_FloorPtr,
  &_swigt__p_FloorTruncation,
  &_swigt__p_ForwardCurvePtr,
  &_swigt__p_ForwardEuropeanEnginePtr,
  &_swigt__p_ForwardFlat,
  &_swigt__p_ForwardFlatZeroCurvePtr,
  &_swigt__p_ForwardPtr,
  &_swigt__p_ForwardRate,
  &_swigt__p_ForwardRateAgreementPtr,
  &_swigt__p_ForwardSpreadedTermStructurePtr,
  &_swigt__p_ForwardVanillaOptionPtr,
  &_swigt__p_FraRateHelperPtr,
  &_swigt__p_FractionalDividendPtr,
  &_swigt__p_Futures,
  &_swigt__p_FuturesRateHelperPtr,
  &_swigt__p_FxSwapRateHelperPtr,
  &_swigt__p_G2Ptr,
  &_swigt__p_G2SwaptionEnginePtr,
  &_swigt__p_GBPLiborPtr,
  &_swigt__p_GFunctionFactory,
  &_swigt__p_GammaFunction,
  &_swigt__p_GapPayoffPtr,
  &_swigt__p_GarmanKlassSigma1,
  &_swigt__p_GarmanKlassSigma3,
  &_swigt__p_GarmanKlassSigma4,
  &_swigt__p_GarmanKlassSigma5,
  &_swigt__p_GarmanKlassSigma6,
  &_swigt__p_GarmanKohlagenProcessPtr,
  &_swigt__p_GaussChebyshev2ndIntegration,
  &_swigt__p_GaussChebyshevIntegration,
  &_swigt__p_GaussGegenbauerIntegration,
  &_swigt__p_GaussHermiteIntegration,
  &_swigt__p_GaussHyperbolicIntegration,
  &_swigt__p_GaussJacobiIntegration,
  &_swigt__p_GaussKronrodAdaptive,
  &_swigt__p_GaussKronrodNonAdaptive,
  &_swigt__p_GaussLaguerreIntegration,
  &_swigt__p_GaussLegendreIntegration,
  &_swigt__p_GaussLobattoIntegral,
  &_swigt__p_Gaussian1dFloatFloatSwaptionEnginePtr,
  &_swigt__p_Gaussian1dJamshidianSwaptionEnginePtr,
  &_swigt__p_Gaussian1dModel,
  &_swigt__p_Gaussian1dNonstandardSwaptionEnginePtr,
  &_swigt__p_Gaussian1dSwaptionEnginePtr,
  &_swigt__p_GaussianLowDiscrepancySequenceGenerator,
  &_swigt__p_GaussianMultiPathGenerator,
  &_swigt__p_GaussianPathGenerator,
  &_swigt__p_GaussianRandomGenerator,
  &_swigt__p_GaussianRandomSequenceGenerator,
  &_swigt__p_GaussianSimulatedAnnealing,
  &_swigt__p_GaussianSobolPathGenerator,
  &_swigt__p_GeneralizedBlackScholesProcessPtr,
  &_swigt__p_GenericSequenceStatisticsT_IncrementalStatistics_t,
  &_swigt__p_GenericSequenceStatisticsT_RiskStatistics_t,
  &_swigt__p_GenericSequenceStatisticsT_Statistics_t,
  &_swigt__p_GeometricBrownianMotionProcessPtr,
  &_swigt__p_GsrProcessPtr,
  &_swigt__p_GsrPtr,
  &_swigt__p_HaltonRsg,
  &_swigt__p_HandleT_BlackVolTermStructure_t,
  &_swigt__p_HandleT_CalibratedModel_t,
  &_swigt__p_HandleT_CapFloorTermVolatilityStructure_t,
  &_swigt__p_HandleT_DefaultProbabilityTermStructure_t,
  &_swigt__p_HandleT_DeltaVolQuote_t,
  &_swigt__p_HandleT_LocalVolTermStructure_t,
  &_swigt__p_HandleT_OptionletVolatilityStructure_t,
  &_swigt__p_HandleT_Quote_t,
  &_swigt__p_HandleT_ShortRateModel_t,
  &_swigt__p_HandleT_SwaptionVolatilityStructure_t,
  &_swigt__p_HandleT_YieldTermStructure_t,
  &_swigt__p_HandleT_YoYInflationTermStructure_t,
  &_swigt__p_HandleT_ZeroInflationTermStructure_t,
  &_swigt__p_HazardRate,
  &_swigt__p_HazardRateCurvePtr,
  &_swigt__p_HestonModelHelperPtr,
  &_swigt__p_HestonModelPtr,
  &_swigt__p_HestonProcessPtr,
  &_swigt__p_HimalayaOptionPtr,
  &_swigt__p_HullWhiteForwardProcessPtr,
  &_swigt__p_HullWhiteProcessPtr,
  &_swigt__p_HullWhitePtr,
  &_swigt__p_IMM,
  &_swigt__p_IborCouponPricerPtr,
  &_swigt__p_IborCouponPtr,
  &_swigt__p_IborIndexPtr,
  &_swigt__p_ImpliedTermStructurePtr,
  &_swigt__p_IncrementalStatistics,
  &_swigt__p_Index,
  &_swigt__p_IndexManager,
  &_swigt__p_InflationIndexPtr,
  &_swigt__p_InflationTermStructure,
  &_swigt__p_Instrument,
  &_swigt__p_IntegralCdsEnginePtr,
  &_swigt__p_IntegralEnginePtr,
  &_swigt__p_InterestRate,
  &_swigt__p_InterestRateIndexPtr,
  &_swigt__p_IntervalPrice,
  &_swigt__p_InverseCumulativeNormal,
  &_swigt__p_InverseCumulativePoisson,
  &_swigt__p_InverseCumulativeRngT_KnuthUniformRng_InverseCumulativeNormal_t,
  &_swigt__p_InverseCumulativeRngT_KnuthUniformRng_MoroInverseCumulativeNormal_t,
  &_swigt__p_InverseCumulativeRngT_LecuyerUniformRng_InverseCumulativeNormal_t,
  &_swigt__p_InverseCumulativeRngT_LecuyerUniformRng_MoroInverseCumulativeNormal_t,
  &_swigt__p_InverseCumulativeRngT_MersenneTwisterUniformRng_InverseCumulativeNormal_t,
  &_swigt__p_InverseCumulativeRngT_MersenneTwisterUniformRng_MoroInverseCumulativeNormal_t,
  &_swigt__p_InverseCumulativeRsgT_HaltonRsg_InverseCumulativeNormal_t,
  &_swigt__p_InverseCumulativeRsgT_HaltonRsg_MoroInverseCumulativeNormal_t,
  &_swigt__p_InverseCumulativeRsgT_RandomSequenceGeneratorT_KnuthUniformRng_t_InverseCumulativeNormal_t,
  &_swigt__p_InverseCumulativeRsgT_RandomSequenceGeneratorT_KnuthUniformRng_t_MoroInverseCumulativeNormal_t,
  &_swigt__p_InverseCumulativeRsgT_RandomSequenceGeneratorT_LecuyerUniformRng_t_InverseCumulativeNormal_t,
  &_swigt__p_InverseCumulativeRsgT_RandomSequenceGeneratorT_LecuyerUniformRng_t_MoroInverseCumulativeNormal_t,
  &_swigt__p_InverseCumulativeRsgT_RandomSequenceGeneratorT_MersenneTwisterUniformRng_t_InverseCumulativeNormal_t,
  &_swigt__p_InverseCumulativeRsgT_RandomSequenceGeneratorT_MersenneTwisterUniformRng_t_MoroInverseCumulativeNormal_t,
  &_swigt__p_InverseCumulativeRsgT_SobolRsg_InverseCumulativeNormal_t,
  &_swigt__p_InverseCumulativeRsgT_SobolRsg_MoroInverseCumulativeNormal_t,
  &_swigt__p_InverseCumulativeStudent,
  &_swigt__p_InverseNonCentralCumulativeChiSquareDistribution,
  &_swigt__p_JPYLiborPtr,
  &_swigt__p_JamshidianSwaptionEnginePtr,
  &_swigt__p_JibarPtr,
  &_swigt__p_KnuthUniformRng,
  &_swigt__p_LecuyerUniformRng,
  &_swigt__p_LevenbergMarquardt,
  &_swigt__p_LiborPtr,
  &_swigt__p_Linear,
  &_swigt__p_LinearTsrPricerPtr,
  &_swigt__p_LinearTsrPricer__Settings,
  &_swigt__p_LocalConstantVolPtr,
  &_swigt__p_LocalVolSurfacePtr,
  &_swigt__p_LocalVolTermStructure,
  &_swigt__p_LogCubicZeroCurvePtr,
  &_swigt__p_LogLinear,
  &_swigt__p_LogLinearZeroCurvePtr,
  &_swigt__p_LogNormalSimulatedAnnealing,
  &_swigt__p_MCAmericanBasketEnginePtr,
  &_swigt__p_MCBarrierEnginePtr,
  &_swigt__p_MCDiscreteArithmeticAPEnginePtr,
  &_swigt__p_MCDiscreteArithmeticASEnginePtr,
  &_swigt__p_MCDiscreteGeometricAPEnginePtr,
  &_swigt__p_MCEuropeanBasketEnginePtr,
  &_swigt__p_MCEuropeanEnginePtr,
  &_swigt__p_MCEverestEnginePtr,
  &_swigt__p_MCHimalayaEnginePtr,
  &_swigt__p_MarkovFunctionalPtr,
  &_swigt__p_MarkovFunctional__ModelSettings,
  &_swigt__p_Matrix,
  &_swigt__p_MaxBasketPayoffPtr,
  &_swigt__p_MersenneTwisterUniformRng,
  &_swigt__p_Merton76ProcessPtr,
  &_swigt__p_MidPointCdsEnginePtr,
  &_swigt__p_MinBasketPayoffPtr,
  &_swigt__p_MirrorGaussianSimulatedAnnealing,
  &_swigt__p_Money,
  &_swigt__p_MonotonicCubic,
  &_swigt__p_MonotonicCubicZeroCurvePtr,
  &_swigt__p_MonotonicLogCubic,
  &_swigt__p_MoroInverseCumulativeNormal,
  &_swigt__p_MultiAssetOptionPtr,
  &_swigt__p_MultiPath,
  &_swigt__p_MultiplicativePriceSeasonalityPtr,
  &_swigt__p_NZDLiborPtr,
  &_swigt__p_NelsonSiegelFitting,
  &_swigt__p_NeumannBCPtr,
  &_swigt__p_NoConstraint,
  &_swigt__p_NonCentralCumulativeChiSquareDistribution,
  &_swigt__p_NonhomogeneousBoundaryConstraint,
  &_swigt__p_NonstandardSwapPtr,
  &_swigt__p_NonstandardSwaptionPtr,
  &_swigt__p_NormalDistribution,
  &_swigt__p_NullParameter,
  &_swigt__p_NumericHaganPricerPtr,
  &_swigt__p_NzocrPtr,
  &_swigt__p_OISRateHelperPtr,
  &_swigt__p_Observable,
  &_swigt__p_OptimizationMethod,
  &_swigt__p_Optimizer,
  &_swigt__p_Option,
  &_swigt__p_OptionletStripper1Ptr,
  &_swigt__p_OptionletVolatilityStructure,
  &_swigt__p_OvernightIndexPtr,
  &_swigt__p_Parameter,
  &_swigt__p_ParkinsonSigma,
  &_swigt__p_Path,
  &_swigt__p_Payoff,
  &_swigt__p_PercentageStrikePayoffPtr,
  &_swigt__p_Period,
  &_swigt__p_PeriodParser,
  &_swigt__p_PiecewiseConstantParameter,
  &_swigt__p_PiecewiseCubicZeroPtr,
  &_swigt__p_PiecewiseFlatForwardPtr,
  &_swigt__p_PiecewiseFlatHazardRatePtr,
  &_swigt__p_PiecewiseLinearForwardPtr,
  &_swigt__p_PiecewiseLinearZeroPtr,
  &_swigt__p_PiecewiseLogCubicDiscountPtr,
  &_swigt__p_PiecewiseTimeDependentHestonModelPtr,
  &_swigt__p_PiecewiseYoYInflationPtr,
  &_swigt__p_PiecewiseZeroInflationPtr,
  &_swigt__p_Pillar,
  &_swigt__p_PlainVanillaPayoffPtr,
  &_swigt__p_PoissonDistribution,
  &_swigt__p_Position,
  &_swigt__p_PositiveConstraint,
  &_swigt__p_PricingEngine,
  &_swigt__p_ProbabilityBoltzmannDownhill,
  &_swigt__p_Protection,
  &_swigt__p_QuantLib__ARSCurrency,
  &_swigt__p_QuantLib__ATSCurrency,
  &_swigt__p_QuantLib__AUDCurrency,
  &_swigt__p_QuantLib__Actual360,
  &_swigt__p_QuantLib__Actual365Fixed,
  &_swigt__p_QuantLib__ActualActual,
  &_swigt__p_QuantLib__Argentina,
  &_swigt__p_QuantLib__Australia,
  &_swigt__p_QuantLib__BDTCurrency,
  &_swigt__p_QuantLib__BEFCurrency,
  &_swigt__p_QuantLib__BGLCurrency,
  &_swigt__p_QuantLib__BRLCurrency,
  &_swigt__p_QuantLib__BYRCurrency,
  &_swigt__p_QuantLib__BespokeCalendar,
  &_swigt__p_QuantLib__Brazil,
  &_swigt__p_QuantLib__Business252,
  &_swigt__p_QuantLib__CADCurrency,
  &_swigt__p_QuantLib__CHFCurrency,
  &_swigt__p_QuantLib__CLPCurrency,
  &_swigt__p_QuantLib__CNYCurrency,
  &_swigt__p_QuantLib__COPCurrency,
  &_swigt__p_QuantLib__CYPCurrency,
  &_swigt__p_QuantLib__CZKCurrency,
  &_swigt__p_QuantLib__Canada,
  &_swigt__p_QuantLib__China,
  &_swigt__p_QuantLib__CzechRepublic,
  &_swigt__p_QuantLib__DEMCurrency,
  &_swigt__p_QuantLib__DKKCurrency,
  &_swigt__p_QuantLib__Denmark,
  &_swigt__p_QuantLib__EEKCurrency,
  &_swigt__p_QuantLib__ESPCurrency,
  &_swigt__p_QuantLib__EURCurrency,
  &_swigt__p_QuantLib__FIMCurrency,
  &_swigt__p_QuantLib__FRFCurrency,
  &_swigt__p_QuantLib__Finland,
  &_swigt__p_QuantLib__GBPCurrency,
  &_swigt__p_QuantLib__GRDCurrency,
  &_swigt__p_QuantLib__Germany,
  &_swigt__p_QuantLib__HKDCurrency,
  &_swigt__p_QuantLib__HUFCurrency,
  &_swigt__p_QuantLib__HongKong,
  &_swigt__p_QuantLib__Hungary,
  &_swigt__p_QuantLib__IDRCurrency,
  &_swigt__p_QuantLib__IEPCurrency,
  &_swigt__p_QuantLib__ILSCurrency,
  &_swigt__p_QuantLib__INRCurrency,
  &_swigt__p_QuantLib__IQDCurrency,
  &_swigt__p_QuantLib__IRRCurrency,
  &_swigt__p_QuantLib__ISKCurrency,
  &_swigt__p_QuantLib__ITLCurrency,
  &_swigt__p_QuantLib__Iceland,
  &_swigt__p_QuantLib__India,
  &_swigt__p_QuantLib__Indonesia,
  &_swigt__p_QuantLib__Israel,
  &_swigt__p_QuantLib__Italy,
  &_swigt__p_QuantLib__JPYCurrency,
  &_swigt__p_QuantLib__Japan,
  &_swigt__p_QuantLib__JointCalendar,
  &_swigt__p_QuantLib__KRWCurrency,
  &_swigt__p_QuantLib__KWDCurrency,
  &_swigt__p_QuantLib__LTLCurrency,
  &_swigt__p_QuantLib__LUFCurrency,
  &_swigt__p_QuantLib__LVLCurrency,
  &_swigt__p_QuantLib__MTLCurrency,
  &_swigt__p_QuantLib__MXNCurrency,
  &_swigt__p_QuantLib__MYRCurrency,
  &_swigt__p_QuantLib__Mexico,
  &_swigt__p_QuantLib__NLGCurrency,
  &_swigt__p_QuantLib__NOKCurrency,
  &_swigt__p_QuantLib__NPRCurrency,
  &_swigt__p_QuantLib__NZDCurrency,
  &_swigt__p_QuantLib__NewZealand,
  &_swigt__p_QuantLib__Norway,
  &_swigt__p_QuantLib__NullCalendar,
  &_swigt__p_QuantLib__OneDayCounter,
  &_swigt__p_QuantLib__PEHCurrency,
  &_swigt__p_QuantLib__PEICurrency,
  &_swigt__p_QuantLib__PENCurrency,
  &_swigt__p_QuantLib__PKRCurrency,
  &_swigt__p_QuantLib__PLNCurrency,
  &_swigt__p_QuantLib__PTECurrency,
  &_swigt__p_QuantLib__Poland,
  &_swigt__p_QuantLib__ROLCurrency,
  &_swigt__p_QuantLib__RONCurrency,
  &_swigt__p_QuantLib__RUBCurrency,
  &_swigt__p_QuantLib__Romania,
  &_swigt__p_QuantLib__Russia,
  &_swigt__p_QuantLib__SARCurrency,
  &_swigt__p_QuantLib__SEKCurrency,
  &_swigt__p_QuantLib__SGDCurrency,
  &_swigt__p_QuantLib__SITCurrency,
  &_swigt__p_QuantLib__SKKCurrency,
  &_swigt__p_QuantLib__SaudiArabia,
  &_swigt__p_QuantLib__SimpleDayCounter,
  &_swigt__p_QuantLib__Singapore,
  &_swigt__p_QuantLib__Slovakia,
  &_swigt__p_QuantLib__SouthAfrica,
  &_swigt__p_QuantLib__SouthKorea,
  &_swigt__p_QuantLib__Sweden,
  &_swigt__p_QuantLib__Switzerland,
  &_swigt__p_QuantLib__TARGET,
  &_swigt__p_QuantLib__THBCurrency,
  &_swigt__p_QuantLib__TRLCurrency,
  &_swigt__p_QuantLib__TRYCurrency,
  &_swigt__p_QuantLib__TTDCurrency,
  &_swigt__p_QuantLib__TWDCurrency,
  &_swigt__p_QuantLib__Taiwan,
  &_swigt__p_QuantLib__Thirty360,
  &_swigt__p_QuantLib__Turkey,
  &_swigt__p_QuantLib__USDCurrency,
  &_swigt__p_QuantLib__Ukraine,
  &_swigt__p_QuantLib__UnitedKingdom,
  &_swigt__p_QuantLib__UnitedStates,
  &_swigt__p_QuantLib__VEBCurrency,
  &_swigt__p_QuantLib__VNDCurrency,
  &_swigt__p_QuantLib__WeekendsOnly,
  &_swigt__p_QuantLib__ZARCurrency,
  &_swigt__p_QuantoDoubleBarrierOptionPtr,
  &_swigt__p_QuantoEuropeanEnginePtr,
  &_swigt__p_QuantoForwardEuropeanEnginePtr,
  &_swigt__p_QuantoForwardVanillaOptionPtr,
  &_swigt__p_QuantoVanillaOptionPtr,
  &_swigt__p_Quote,
  &_swigt__p_RandomSequenceGeneratorT_KnuthUniformRng_t,
  &_swigt__p_RandomSequenceGeneratorT_LecuyerUniformRng_t,
  &_swigt__p_RandomSequenceGeneratorT_MersenneTwisterUniformRng_t,
  &_swigt__p_RateHelper,
  &_swigt__p_RealTimeSeries,
  &_swigt__p_ReannealingTrivial,
  &_swigt__p_RebatedExercisePtr,
  &_swigt__p_RedemptionPtr,
  &_swigt__p_Region,
  &_swigt__p_RelinkableHandleT_BlackVolTermStructure_t,
  &_swigt__p_RelinkableHandleT_CalibratedModel_t,
  &_swigt__p_RelinkableHandleT_CapFloorTermVolatilityStructure_t,
  &_swigt__p_RelinkableHandleT_DefaultProbabilityTermStructure_t,
  &_swigt__p_RelinkableHandleT_DeltaVolQuote_t,
  &_swigt__p_RelinkableHandleT_LocalVolTermStructure_t,
  &_swigt__p_RelinkableHandleT_OptionletVolatilityStructure_t,
  &_swigt__p_RelinkableHandleT_Quote_t,
  &_swigt__p_RelinkableHandleT_ShortRateModel_t,
  &_swigt__p_RelinkableHandleT_SwaptionVolatilityStructure_t,
  &_swigt__p_RelinkableHandleT_YieldTermStructure_t,
  &_swigt__p_RelinkableHandleT_YoYInflationTermStructure_t,
  &_swigt__p_RelinkableHandleT_ZeroInflationTermStructure_t,
  &_swigt__p_Ridder,
  &_swigt__p_RiskStatistics,
  &_swigt__p_Rounding,
  &_swigt__p_SEKLiborPtr,
  &_swigt__p_SVD,
  &_swigt__p_SafeBackwardFlatInterpolation,
  &_swigt__p_SafeBicubicSpline,
  &_swigt__p_SafeBilinearInterpolation,
  &_swigt__p_SafeCubicNaturalSpline,
  &_swigt__p_SafeForwardFlatInterpolation,
  &_swigt__p_SafeFritschButlandCubic,
  &_swigt__p_SafeFritschButlandLogCubic,
  &_swigt__p_SafeKrugerCubic,
  &_swigt__p_SafeKrugerLogCubic,
  &_swigt__p_SafeLinearInterpolation,
  &_swigt__p_SafeLogCubicNaturalSpline,
  &_swigt__p_SafeLogLinearInterpolation,
  &_swigt__p_SafeLogParabolic,
  &_swigt__p_SafeMonotonicCubicNaturalSpline,
  &_swigt__p_SafeMonotonicLogCubicNaturalSpline,
  &_swigt__p_SafeMonotonicLogParabolic,
  &_swigt__p_SafeMonotonicParabolic,
  &_swigt__p_SafeParabolic,
  &_swigt__p_SalvagingAlgorithm,
  &_swigt__p_SampleT_Array_t,
  &_swigt__p_SampleT_MultiPath_t,
  &_swigt__p_SampleT_Path_t,
  &_swigt__p_SampleT_double_t,
  &_swigt__p_SampleT_std__vectorT_double_t_t,
  &_swigt__p_SampledCurve,
  &_swigt__p_SamplerGaussian,
  &_swigt__p_SamplerLogNormal,
  &_swigt__p_SamplerMirrorGaussian,
  &_swigt__p_Schedule,
  &_swigt__p_Seasonality,
  &_swigt__p_Secant,
  &_swigt__p_SegmentIntegral,
  &_swigt__p_Settings,
  &_swigt__p_Settlement,
  &_swigt__p_ShortRateModel,
  &_swigt__p_SimpleCashFlowPtr,
  &_swigt__p_SimplePolynomialFitting,
  &_swigt__p_SimpleQuotePtr,
  &_swigt__p_Simplex,
  &_swigt__p_SimpsonIntegral,
  &_swigt__p_SobolBrownianBridgeRsg,
  &_swigt__p_SobolRsg,
  &_swigt__p_SoftCallabilityPtr,
  &_swigt__p_SoniaPtr,
  &_swigt__p_SpreadCdsHelperPtr,
  &_swigt__p_SpreadedLinearZeroInterpolatedTermStructurePtr,
  &_swigt__p_Statistics,
  &_swigt__p_SteepestDescent,
  &_swigt__p_StochasticProcess,
  &_swigt__p_StochasticProcess1DPtr,
  &_swigt__p_StochasticProcessArrayPtr,
  &_swigt__p_StockPtr,
  &_swigt__p_StrippedOptionletAdapterPtr,
  &_swigt__p_StrippedOptionletBase,
  &_swigt__p_StudentDistribution,
  &_swigt__p_StulzEnginePtr,
  &_swigt__p_SuperSharePayoffPtr,
  &_swigt__p_SvenssonFitting,
  &_swigt__p_SwapIndexPtr,
  &_swigt__p_SwapPtr,
  &_swigt__p_SwapRateHelperPtr,
  &_swigt__p_SwaptionHelperPtr,
  &_swigt__p_SwaptionPtr,
  &_swigt__p_SwaptionVolCube1Ptr,
  &_swigt__p_SwaptionVolCube2Ptr,
  &_swigt__p_SwaptionVolatilityMatrixPtr,
  &_swigt__p_SwaptionVolatilityStructure,
  &_swigt__p_TRLiborPtr,
  &_swigt__p_TemperatureExponential,
  &_swigt__p_TiborPtr,
  &_swigt__p_TimeBasket,
  &_swigt__p_TimeGrid,
  &_swigt__p_TimeSeriesT_IntervalPrice_std__mapT_Date_IntervalPrice_t_t,
  &_swigt__p_TimeSeriesT_double_std__mapT_Date_double_t_t,
  &_swigt__p_TrapezoidIntegralT_Default_t,
  &_swigt__p_TrapezoidIntegralT_MidPoint_t,
  &_swigt__p_TreeCallableFixedRateBondEnginePtr,
  &_swigt__p_TreeCapFloorEnginePtr,
  &_swigt__p_TreeSwaptionEnginePtr,
  &_swigt__p_TridiagonalOperator,
  &_swigt__p_UKRPIPtr,
  &_swigt__p_USCPIPtr,
  &_swigt__p_USDLiborPtr,
  &_swigt__p_UniformLowDiscrepancySequenceGenerator,
  &_swigt__p_UniformRandomGenerator,
  &_swigt__p_UniformRandomSequenceGenerator,
  &_swigt__p_UpRounding,
  &_swigt__p_UpfrontCdsHelperPtr,
  &_swigt__p_VanillaOptionPtr,
  &_swigt__p_VanillaSwapPtr,
  &_swigt__p_VannaVolgaDoubleBarrierEnginePtr,
  &_swigt__p_VarianceGammaEnginePtr,
  &_swigt__p_VarianceGammaProcessPtr,
  &_swigt__p_VasicekPtr,
  &_swigt__p_WulinYongDoubleBarrierEnginePtr,
  &_swigt__p_YYEUHICPPtr,
  &_swigt__p_YYEUHICPXTPtr,
  &_swigt__p_YYFRHICPPtr,
  &_swigt__p_YYUKRPIPtr,
  &_swigt__p_YYUSCPIPtr,
  &_swigt__p_YYZACPIPtr,
  &_swigt__p_YearOnYearInflationSwapHelperPtr,
  &_swigt__p_YearOnYearInflationSwapPtr,
  &_swigt__p_YieldTermStructure,
  &_swigt__p_YoYHelper,
  &_swigt__p_YoYInflationCapFloorPtr,
  &_swigt__p_YoYInflationCapPtr,
  &_swigt__p_YoYInflationCollarPtr,
  &_swigt__p_YoYInflationFloorPtr,
  &_swigt__p_YoYInflationIndexPtr,
  &_swigt__p_YoYInflationTermStructure,
  &_swigt__p_ZACPIPtr,
  &_swigt__p_ZeroCouponBondPtr,
  &_swigt__p_ZeroCouponInflationSwapHelperPtr,
  &_swigt__p_ZeroCouponInflationSwapPtr,
  &_swigt__p_ZeroCurvePtr,
  &_swigt__p_ZeroHelper,
  &_swigt__p_ZeroInflationIndexPtr,
  &_swigt__p_ZeroInflationTermStructure,
  &_swigt__p_ZeroSpreadedTermStructurePtr,
  &_swigt__p_ZeroYield,
  &_swigt__p_ZiborPtr,
  &_swigt__p_boost__shared_ptrT_BlackVolTermStructure_t,
  &_swigt__p_boost__shared_ptrT_CalibratedModel_t,
  &_swigt__p_boost__shared_ptrT_CalibrationHelper_t,
  &_swigt__p_boost__shared_ptrT_Callability_t,
  &_swigt__p_boost__shared_ptrT_CapFloorTermVolatilityStructure_t,
  &_swigt__p_boost__shared_ptrT_CashFlow_t,
  &_swigt__p_boost__shared_ptrT_DefaultBoundaryCondition_t,
  &_swigt__p_boost__shared_ptrT_DefaultProbabilityHelper_t,
  &_swigt__p_boost__shared_ptrT_DefaultProbabilityTermStructure_t,
  &_swigt__p_boost__shared_ptrT_DeltaVolQuote_t,
  &_swigt__p_boost__shared_ptrT_Dividend_t,
  &_swigt__p_boost__shared_ptrT_EndCriteria_t,
  &_swigt__p_boost__shared_ptrT_Exercise_t,
  &_swigt__p_boost__shared_ptrT_FloatingRateCouponPricer_t,
  &_swigt__p_boost__shared_ptrT_Gaussian1dModel_t,
  &_swigt__p_boost__shared_ptrT_IborIndex_t,
  &_swigt__p_boost__shared_ptrT_Index_t,
  &_swigt__p_boost__shared_ptrT_Instrument_t,
  &_swigt__p_boost__shared_ptrT_LocalVolTermStructure_t,
  &_swigt__p_boost__shared_ptrT_Observable_t,
  &_swigt__p_boost__shared_ptrT_OptimizationMethod_t,
  &_swigt__p_boost__shared_ptrT_OptionletVolatilityStructure_t,
  &_swigt__p_boost__shared_ptrT_Payoff_t,
  &_swigt__p_boost__shared_ptrT_PricingEngine_t,
  &_swigt__p_boost__shared_ptrT_Quote_t,
  &_swigt__p_boost__shared_ptrT_RateHelper_t,
  &_swigt__p_boost__shared_ptrT_Seasonality_t,
  &_swigt__p_boost__shared_ptrT_ShortRateModel_t,
  &_swigt__p_boost__shared_ptrT_StochasticProcess_t,
  &_swigt__p_boost__shared_ptrT_StrippedOptionletBase_t,
  &_swigt__p_boost__shared_ptrT_SwapIndex_t,
  &_swigt__p_boost__shared_ptrT_SwaptionVolatilityStructure_t,
  &_swigt__p_boost__shared_ptrT_YieldTermStructure_t,
  &_swigt__p_boost__shared_ptrT_YoYHelper_t,
  &_swigt__p_boost__shared_ptrT_YoYInflationTermStructure_t,
  &_swigt__p_boost__shared_ptrT_ZeroHelper_t,
  &_swigt__p_boost__shared_ptrT_ZeroInflationTermStructure_t,
  &_swigt__p_char,
  &_swigt__p_double,
  &_swigt__p_doubleOrNull,
  &_swigt__p_int,
  &_swigt__p_intOrNull,
  &_swigt__p_long,
  &_swigt__p_size_type,
  &_swigt__p_std__out_of_range,
  &_swigt__p_std__pairT_Date_double_t,
  &_swigt__p_std__size_t,
  &_swigt__p_std__vectorT_Date_t,
  &_swigt__p_std__vectorT_HandleT_Quote_t_t,
  &_swigt__p_std__vectorT_InterestRate_t,
  &_swigt__p_std__vectorT_IntervalPrice_t,
  &_swigt__p_std__vectorT_Period_t,
  &_swigt__p_std__vectorT_RelinkableHandleT_Quote_t_t,
  &_swigt__p_std__vectorT_bool_t,
  &_swigt__p_std__vectorT_boost__shared_ptrT_CalibrationHelper_t_t,
  &_swigt__p_std__vectorT_boost__shared_ptrT_Callability_t_t,
  &_swigt__p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,
  &_swigt__p_std__vectorT_boost__shared_ptrT_DefaultProbabilityHelper_t_t,
  &_swigt__p_std__vectorT_boost__shared_ptrT_Dividend_t_t,
  &_swigt__p_std__vectorT_boost__shared_ptrT_Instrument_t_t,
  &_swigt__p_std__vectorT_boost__shared_ptrT_Quote_t_t,
  &_swigt__p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,
  &_swigt__p_std__vectorT_boost__shared_ptrT_StochasticProcess_t_t,
  &_swigt__p_std__vectorT_boost__shared_ptrT_YoYHelper_t_t,
  &_swigt__p_std__vectorT_boost__shared_ptrT_ZeroHelper_t_t,
  &_swigt__p_std__vectorT_double_t,
  &_swigt__p_std__vectorT_int_t,
  &_swigt__p_std__vectorT_std__pairT_Date_double_t_t,
  &_swigt__p_std__vectorT_std__string_t,
  &_swigt__p_std__vectorT_std__vectorT_HandleT_Quote_t_t_t,
  &_swigt__p_std__vectorT_std__vectorT_RelinkableHandleT_Quote_t_t_t,
  &_swigt__p_std__vectorT_std__vectorT_boost__shared_ptrT_Quote_t_t_t,
  &_swigt__p_std__vectorT_std__vectorT_double_t_t,
  &_swigt__p_std__vectorT_unsigned_int_t,
  &_swigt__p_unsigned_int,
  &_swigt__p_unsigned_long,
  &_swigt__p_value_type,
};

static swig_cast_info _swigc__p_ASX[] = {  {&_swigt__p_ASX, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_AUDLiborPtr[] = {  {&_swigt__p_AUDLiborPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_AmericanExercisePtr[] = {  {&_swigt__p_AmericanExercisePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_AmortizingPaymentPtr[] = {  {&_swigt__p_AmortizingPaymentPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_AnalyticBarrierEnginePtr[] = {  {&_swigt__p_AnalyticBarrierEnginePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_AnalyticBinaryBarrierEnginePtr[] = {  {&_swigt__p_AnalyticBinaryBarrierEnginePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_AnalyticCapFloorEnginePtr[] = {  {&_swigt__p_AnalyticCapFloorEnginePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_AnalyticContinuousGeometricAveragePriceAsianEnginePtr[] = {  {&_swigt__p_AnalyticContinuousGeometricAveragePriceAsianEnginePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_AnalyticDigitalAmericanEnginePtr[] = {  {&_swigt__p_AnalyticDigitalAmericanEnginePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_AnalyticDigitalAmericanKOEnginePtr[] = {  {&_swigt__p_AnalyticDigitalAmericanKOEnginePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_AnalyticDiscreteGeometricAveragePriceAsianEnginePtr[] = {  {&_swigt__p_AnalyticDiscreteGeometricAveragePriceAsianEnginePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_AnalyticDiscreteGeometricAverageStrikeAsianEnginePtr[] = {  {&_swigt__p_AnalyticDiscreteGeometricAverageStrikeAsianEnginePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_AnalyticDividendEuropeanEnginePtr[] = {  {&_swigt__p_AnalyticDividendEuropeanEnginePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_AnalyticDoubleBarrierBinaryEnginePtr[] = {  {&_swigt__p_AnalyticDoubleBarrierBinaryEnginePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_AnalyticDoubleBarrierEnginePtr[] = {  {&_swigt__p_AnalyticDoubleBarrierEnginePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_AnalyticEuropeanEnginePtr[] = {  {&_swigt__p_AnalyticEuropeanEnginePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_AnalyticHaganPricerPtr[] = {  {&_swigt__p_AnalyticHaganPricerPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_AnalyticHestonEnginePtr[] = {  {&_swigt__p_AnalyticHestonEnginePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_AnalyticPTDHestonEnginePtr[] = {  {&_swigt__p_AnalyticPTDHestonEnginePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_AoniaPtr[] = {  {&_swigt__p_AoniaPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Array[] = {  {&_swigt__p_Array, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_AssetOrNothingPayoffPtr[] = {  {&_swigt__p_AssetOrNothingPayoffPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_AssetSwapPtr[] = {  {&_swigt__p_AssetSwapPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Average[] = {  {&_swigt__p_Average, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_AverageBasketPayoffPtr[] = {  {&_swigt__p_AverageBasketPayoffPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_BFGS[] = {  {&_swigt__p_BFGS, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_BachelierCapFloorEnginePtr[] = {  {&_swigt__p_BachelierCapFloorEnginePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_BachelierSwaptionEnginePtr[] = {  {&_swigt__p_BachelierSwaptionEnginePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_BackwardFlat[] = {  {&_swigt__p_BackwardFlat, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_BackwardFlatZeroCurvePtr[] = {  {&_swigt__p_BackwardFlatZeroCurvePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_BaroneAdesiWhaleyApproximationEnginePtr[] = {  {&_swigt__p_BaroneAdesiWhaleyApproximationEnginePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Barrier[] = {  {&_swigt__p_Barrier, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_BarrierOptionPtr[] = {  {&_swigt__p_BarrierOptionPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_BasketOptionPtr[] = {  {&_swigt__p_BasketOptionPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_BasketPayoffPtr[] = {  {&_swigt__p_BasketPayoffPtr, 0, 0, 0},  {&_swigt__p_MinBasketPayoffPtr, _p_MinBasketPayoffPtrTo_p_BasketPayoffPtr, 0, 0},  {&_swigt__p_MaxBasketPayoffPtr, _p_MaxBasketPayoffPtrTo_p_BasketPayoffPtr, 0, 0},  {&_swigt__p_AverageBasketPayoffPtr, _p_AverageBasketPayoffPtrTo_p_BasketPayoffPtr, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_BatesEnginePtr[] = {  {&_swigt__p_BatesEnginePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_BatesModelPtr[] = {  {&_swigt__p_BatesModelPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_BatesProcessPtr[] = {  {&_swigt__p_BatesProcessPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Bbsw1MPtr[] = {  {&_swigt__p_Bbsw1MPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Bbsw2MPtr[] = {  {&_swigt__p_Bbsw2MPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Bbsw3MPtr[] = {  {&_swigt__p_Bbsw3MPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Bbsw4MPtr[] = {  {&_swigt__p_Bbsw4MPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Bbsw5MPtr[] = {  {&_swigt__p_Bbsw5MPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Bbsw6MPtr[] = {  {&_swigt__p_Bbsw6MPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_BbswPtr[] = {  {&_swigt__p_Bbsw1MPtr, _p_Bbsw1MPtrTo_p_BbswPtr, 0, 0},  {&_swigt__p_Bbsw3MPtr, _p_Bbsw3MPtrTo_p_BbswPtr, 0, 0},  {&_swigt__p_Bbsw5MPtr, _p_Bbsw5MPtrTo_p_BbswPtr, 0, 0},  {&_swigt__p_Bbsw2MPtr, _p_Bbsw2MPtrTo_p_BbswPtr, 0, 0},  {&_swigt__p_Bbsw4MPtr, _p_Bbsw4MPtrTo_p_BbswPtr, 0, 0},  {&_swigt__p_BbswPtr, 0, 0, 0},  {&_swigt__p_Bbsw6MPtr, _p_Bbsw6MPtrTo_p_BbswPtr, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_BermudanExercisePtr[] = {  {&_swigt__p_BermudanExercisePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_BinomialBarrierEnginePtr[] = {  {&_swigt__p_BinomialBarrierEnginePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_BinomialConvertibleEnginePtr[] = {  {&_swigt__p_BinomialConvertibleEnginePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_BinomialDistribution[] = {  {&_swigt__p_BinomialDistribution, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_BinomialDoubleBarrierEnginePtr[] = {  {&_swigt__p_BinomialDoubleBarrierEnginePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_BinomialVanillaEnginePtr[] = {  {&_swigt__p_BinomialVanillaEnginePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Bisection[] = {  {&_swigt__p_Bisection, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_BivariateCumulativeNormalDistribution[] = {  {&_swigt__p_BivariateCumulativeNormalDistribution, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_BivariateCumulativeNormalDistributionDr78[] = {  {&_swigt__p_BivariateCumulativeNormalDistributionDr78, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_BivariateCumulativeNormalDistributionWe04DP[] = {  {&_swigt__p_BivariateCumulativeNormalDistributionWe04DP, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_BjerksundStenslandApproximationEnginePtr[] = {  {&_swigt__p_BjerksundStenslandApproximationEnginePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Bkbm1MPtr[] = {  {&_swigt__p_Bkbm1MPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Bkbm2MPtr[] = {  {&_swigt__p_Bkbm2MPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Bkbm3MPtr[] = {  {&_swigt__p_Bkbm3MPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Bkbm4MPtr[] = {  {&_swigt__p_Bkbm4MPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Bkbm5MPtr[] = {  {&_swigt__p_Bkbm5MPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Bkbm6MPtr[] = {  {&_swigt__p_Bkbm6MPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_BkbmPtr[] = {  {&_swigt__p_Bkbm4MPtr, _p_Bkbm4MPtrTo_p_BkbmPtr, 0, 0},  {&_swigt__p_Bkbm6MPtr, _p_Bkbm6MPtrTo_p_BkbmPtr, 0, 0},  {&_swigt__p_BkbmPtr, 0, 0, 0},  {&_swigt__p_Bkbm1MPtr, _p_Bkbm1MPtrTo_p_BkbmPtr, 0, 0},  {&_swigt__p_Bkbm3MPtr, _p_Bkbm3MPtrTo_p_BkbmPtr, 0, 0},  {&_swigt__p_Bkbm5MPtr, _p_Bkbm5MPtrTo_p_BkbmPtr, 0, 0},  {&_swigt__p_Bkbm2MPtr, _p_Bkbm2MPtrTo_p_BkbmPtr, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_BlackCalculator[] = {  {&_swigt__p_BlackCalculator, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_BlackCallableFixedRateBondEnginePtr[] = {  {&_swigt__p_BlackCallableFixedRateBondEnginePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_BlackCapFloorEnginePtr[] = {  {&_swigt__p_BlackCapFloorEnginePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_BlackConstantVolPtr[] = {  {&_swigt__p_BlackConstantVolPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_BlackDeltaCalculator[] = {  {&_swigt__p_BlackDeltaCalculator, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_BlackIborCouponPricerPtr[] = {  {&_swigt__p_BlackIborCouponPricerPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_BlackKarasinskiPtr[] = {  {&_swigt__p_BlackKarasinskiPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_BlackProcessPtr[] = {  {&_swigt__p_BlackProcessPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_BlackScholesMertonProcessPtr[] = {  {&_swigt__p_BlackScholesMertonProcessPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_BlackScholesProcessPtr[] = {  {&_swigt__p_BlackScholesProcessPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_BlackSwaptionEnginePtr[] = {  {&_swigt__p_BlackSwaptionEnginePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_BlackVarianceCurvePtr[] = {  {&_swigt__p_BlackVarianceCurvePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_BlackVarianceSurfacePtr[] = {  {&_swigt__p_BlackVarianceSurfacePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_BlackVolTermStructure[] = {  {&_swigt__p_BlackVolTermStructure, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_BondFunctions[] = {  {&_swigt__p_BondFunctions, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_BondHelperPtr[] = {  {&_swigt__p_BondHelperPtr, 0, 0, 0},  {&_swigt__p_FixedRateBondHelperPtr, _p_FixedRateBondHelperPtrTo_p_BondHelperPtr, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_BondPtr[] = {  {&_swigt__p_BondPtr, 0, 0, 0},  {&_swigt__p_ZeroCouponBondPtr, _p_ZeroCouponBondPtrTo_p_BondPtr, 0, 0},  {&_swigt__p_FixedRateBondPtr, _p_FixedRateBondPtrTo_p_BondPtr, 0, 0},  {&_swigt__p_FloatingRateBondPtr, _p_FloatingRateBondPtrTo_p_BondPtr, 0, 0},  {&_swigt__p_CmsRateBondPtr, _p_CmsRateBondPtrTo_p_BondPtr, 0, 0},  {&_swigt__p_CallableFixedRateBondPtr, _p_CallableFixedRateBondPtrTo_p_BondPtr, 0, 0},  {&_swigt__p_CPIBondPtr, _p_CPIBondPtrTo_p_BondPtr, 0, 0},  {&_swigt__p_ConvertibleZeroCouponBondPtr, _p_ConvertibleZeroCouponBondPtrTo_p_BondPtr, 0, 0},  {&_swigt__p_ConvertibleFixedCouponBondPtr, _p_ConvertibleFixedCouponBondPtrTo_p_BondPtr, 0, 0},  {&_swigt__p_ConvertibleFloatingRateBondPtr, _p_ConvertibleFloatingRateBondPtrTo_p_BondPtr, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_BoundaryConstraint[] = {  {&_swigt__p_BoundaryConstraint, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_BoxMullerGaussianRngT_KnuthUniformRng_t[] = {  {&_swigt__p_BoxMullerGaussianRngT_KnuthUniformRng_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_BoxMullerGaussianRngT_LecuyerUniformRng_t[] = {  {&_swigt__p_BoxMullerGaussianRngT_LecuyerUniformRng_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_BoxMullerGaussianRngT_MersenneTwisterUniformRng_t[] = {  {&_swigt__p_BoxMullerGaussianRngT_MersenneTwisterUniformRng_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Brent[] = {  {&_swigt__p_Brent, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_BrownianBridge[] = {  {&_swigt__p_BrownianBridge, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_CADLiborPtr[] = {  {&_swigt__p_CADLiborPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_CHFLiborPtr[] = {  {&_swigt__p_CHFLiborPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_CLGaussianRngT_KnuthUniformRng_t[] = {  {&_swigt__p_CLGaussianRngT_KnuthUniformRng_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_CLGaussianRngT_LecuyerUniformRng_t[] = {  {&_swigt__p_CLGaussianRngT_LecuyerUniformRng_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_CLGaussianRngT_MersenneTwisterUniformRng_t[] = {  {&_swigt__p_CLGaussianRngT_MersenneTwisterUniformRng_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_CPI[] = {  {&_swigt__p_CPI, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_CPIBondPtr[] = {  {&_swigt__p_CPIBondPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Calendar[] = {  {&_swigt__p_QuantLib__Russia, _p_QuantLib__RussiaTo_p_Calendar, 0, 0},  {&_swigt__p_QuantLib__NewZealand, _p_QuantLib__NewZealandTo_p_Calendar, 0, 0},  {&_swigt__p_QuantLib__Germany, _p_QuantLib__GermanyTo_p_Calendar, 0, 0},  {&_swigt__p_QuantLib__WeekendsOnly, _p_QuantLib__WeekendsOnlyTo_p_Calendar, 0, 0},  {&_swigt__p_QuantLib__Taiwan, _p_QuantLib__TaiwanTo_p_Calendar, 0, 0},  {&_swigt__p_QuantLib__Hungary, _p_QuantLib__HungaryTo_p_Calendar, 0, 0},  {&_swigt__p_QuantLib__Australia, _p_QuantLib__AustraliaTo_p_Calendar, 0, 0},  {&_swigt__p_QuantLib__Switzerland, _p_QuantLib__SwitzerlandTo_p_Calendar, 0, 0},  {&_swigt__p_QuantLib__Iceland, _p_QuantLib__IcelandTo_p_Calendar, 0, 0},  {&_swigt__p_QuantLib__Turkey, _p_QuantLib__TurkeyTo_p_Calendar, 0, 0},  {&_swigt__p_QuantLib__Norway, _p_QuantLib__NorwayTo_p_Calendar, 0, 0},  {&_swigt__p_QuantLib__Japan, _p_QuantLib__JapanTo_p_Calendar, 0, 0},  {&_swigt__p_QuantLib__CzechRepublic, _p_QuantLib__CzechRepublicTo_p_Calendar, 0, 0},  {&_swigt__p_QuantLib__Sweden, _p_QuantLib__SwedenTo_p_Calendar, 0, 0},  {&_swigt__p_QuantLib__Israel, _p_QuantLib__IsraelTo_p_Calendar, 0, 0},  {&_swigt__p_QuantLib__Indonesia, _p_QuantLib__IndonesiaTo_p_Calendar, 0, 0},  {&_swigt__p_QuantLib__SaudiArabia, _p_QuantLib__SaudiArabiaTo_p_Calendar, 0, 0},  {&_swigt__p_QuantLib__Canada, _p_QuantLib__CanadaTo_p_Calendar, 0, 0},  {&_swigt__p_QuantLib__Poland, _p_QuantLib__PolandTo_p_Calendar, 0, 0},  {&_swigt__p_QuantLib__NullCalendar, _p_QuantLib__NullCalendarTo_p_Calendar, 0, 0},  {&_swigt__p_QuantLib__JointCalendar, _p_QuantLib__JointCalendarTo_p_Calendar, 0, 0},  {&_swigt__p_QuantLib__BespokeCalendar, _p_QuantLib__BespokeCalendarTo_p_Calendar, 0, 0},  {&_swigt__p_Calendar, 0, 0, 0},  {&_swigt__p_QuantLib__SouthKorea, _p_QuantLib__SouthKoreaTo_p_Calendar, 0, 0},  {&_swigt__p_QuantLib__Brazil, _p_QuantLib__BrazilTo_p_Calendar, 0, 0},  {&_swigt__p_QuantLib__UnitedKingdom, _p_QuantLib__UnitedKingdomTo_p_Calendar, 0, 0},  {&_swigt__p_QuantLib__Singapore, _p_QuantLib__SingaporeTo_p_Calendar, 0, 0},  {&_swigt__p_QuantLib__Mexico, _p_QuantLib__MexicoTo_p_Calendar, 0, 0},  {&_swigt__p_QuantLib__China, _p_QuantLib__ChinaTo_p_Calendar, 0, 0},  {&_swigt__p_QuantLib__SouthAfrica, _p_QuantLib__SouthAfricaTo_p_Calendar, 0, 0},  {&_swigt__p_QuantLib__Argentina, _p_QuantLib__ArgentinaTo_p_Calendar, 0, 0},  {&_swigt__p_QuantLib__Romania, _p_QuantLib__RomaniaTo_p_Calendar, 0, 0},  {&_swigt__p_QuantLib__Slovakia, _p_QuantLib__SlovakiaTo_p_Calendar, 0, 0},  {&_swigt__p_QuantLib__Ukraine, _p_QuantLib__UkraineTo_p_Calendar, 0, 0},  {&_swigt__p_QuantLib__Finland, _p_QuantLib__FinlandTo_p_Calendar, 0, 0},  {&_swigt__p_QuantLib__UnitedStates, _p_QuantLib__UnitedStatesTo_p_Calendar, 0, 0},  {&_swigt__p_QuantLib__Italy, _p_QuantLib__ItalyTo_p_Calendar, 0, 0},  {&_swigt__p_QuantLib__Denmark, _p_QuantLib__DenmarkTo_p_Calendar, 0, 0},  {&_swigt__p_QuantLib__India, _p_QuantLib__IndiaTo_p_Calendar, 0, 0},  {&_swigt__p_QuantLib__TARGET, _p_QuantLib__TARGETTo_p_Calendar, 0, 0},  {&_swigt__p_QuantLib__HongKong, _p_QuantLib__HongKongTo_p_Calendar, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_CalibratedModel[] = {  {&_swigt__p_CalibratedModel, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_CalibrationHelper[] = {  {&_swigt__p_CalibrationHelper, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Callability[] = {  {&_swigt__p_Callability, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_CallabilityPrice[] = {  {&_swigt__p_CallabilityPrice, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_CallableFixedRateBondPtr[] = {  {&_swigt__p_CallableFixedRateBondPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_CapFloorPtr[] = {  {&_swigt__p_CapFloorPtr, 0, 0, 0},  {&_swigt__p_FloorPtr, _p_FloorPtrTo_p_CapFloorPtr, 0, 0},  {&_swigt__p_CollarPtr, _p_CollarPtrTo_p_CapFloorPtr, 0, 0},  {&_swigt__p_CapPtr, _p_CapPtrTo_p_CapFloorPtr, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_CapFloorTermVolCurvePtr[] = {  {&_swigt__p_CapFloorTermVolCurvePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_CapFloorTermVolSurfacePtr[] = {  {&_swigt__p_CapFloorTermVolSurfacePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_CapFloorTermVolatilityStructure[] = {  {&_swigt__p_CapFloorTermVolatilityStructure, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_CapHelperPtr[] = {  {&_swigt__p_CapHelperPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_CapPtr[] = {  {&_swigt__p_CapPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_CappedFlooredCmsCouponPtr[] = {  {&_swigt__p_CappedFlooredCmsCouponPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_CappedFlooredCouponPtr[] = {  {&_swigt__p_CappedFlooredCouponPtr, 0, 0, 0},  {&_swigt__p_CappedFlooredCmsCouponPtr, _p_CappedFlooredCmsCouponPtrTo_p_CappedFlooredCouponPtr, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_CashFlow[] = {  {&_swigt__p_CashFlow, 0, 0, 0},  {&_swigt__p_Dividend, _p_DividendTo_p_CashFlow, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_CashFlows[] = {  {&_swigt__p_CashFlows, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_CashOrNothingPayoffPtr[] = {  {&_swigt__p_CashOrNothingPayoffPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_CdorPtr[] = {  {&_swigt__p_CdorPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_CeilingTruncation[] = {  {&_swigt__p_CeilingTruncation, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_ClosestRounding[] = {  {&_swigt__p_ClosestRounding, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_CmsCouponPricerPtr[] = {  {&_swigt__p_CmsCouponPricerPtr, 0, 0, 0},  {&_swigt__p_AnalyticHaganPricerPtr, _p_AnalyticHaganPricerPtrTo_p_CmsCouponPricerPtr, 0, 0},  {&_swigt__p_NumericHaganPricerPtr, _p_NumericHaganPricerPtrTo_p_CmsCouponPricerPtr, 0, 0},  {&_swigt__p_LinearTsrPricerPtr, _p_LinearTsrPricerPtrTo_p_CmsCouponPricerPtr, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_CmsCouponPtr[] = {  {&_swigt__p_CmsCouponPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_CmsRateBondPtr[] = {  {&_swigt__p_CmsRateBondPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_CollarPtr[] = {  {&_swigt__p_CollarPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_CompositeConstraint[] = {  {&_swigt__p_CompositeConstraint, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_CompositeInstrumentPtr[] = {  {&_swigt__p_CompositeInstrumentPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_ConjugateGradient[] = {  {&_swigt__p_ConjugateGradient, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_ConstantEstimator[] = {  {&_swigt__p_ConstantEstimator, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_ConstantOptionletVolatilityPtr[] = {  {&_swigt__p_ConstantOptionletVolatilityPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_ConstantParameter[] = {  {&_swigt__p_ConstantParameter, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_ConstantSwaptionVolatilityPtr[] = {  {&_swigt__p_ConstantSwaptionVolatilityPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Constraint[] = {  {&_swigt__p_Constraint, 0, 0, 0},  {&_swigt__p_BoundaryConstraint, _p_BoundaryConstraintTo_p_Constraint, 0, 0},  {&_swigt__p_NoConstraint, _p_NoConstraintTo_p_Constraint, 0, 0},  {&_swigt__p_PositiveConstraint, _p_PositiveConstraintTo_p_Constraint, 0, 0},  {&_swigt__p_CompositeConstraint, _p_CompositeConstraintTo_p_Constraint, 0, 0},  {&_swigt__p_NonhomogeneousBoundaryConstraint, _p_NonhomogeneousBoundaryConstraintTo_p_Constraint, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_ContinuousArithmeticAsianLevyEnginePtr[] = {  {&_swigt__p_ContinuousArithmeticAsianLevyEnginePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_ContinuousAveragingAsianOptionPtr[] = {  {&_swigt__p_ContinuousAveragingAsianOptionPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_ConvertibleFixedCouponBondPtr[] = {  {&_swigt__p_ConvertibleFixedCouponBondPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_ConvertibleFloatingRateBondPtr[] = {  {&_swigt__p_ConvertibleFloatingRateBondPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_ConvertibleZeroCouponBondPtr[] = {  {&_swigt__p_ConvertibleZeroCouponBondPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_CouponPtr[] = {  {&_swigt__p_CouponPtr, 0, 0, 0},  {&_swigt__p_FixedRateCouponPtr, _p_FixedRateCouponPtrTo_p_CouponPtr, 0, 0},  {&_swigt__p_FloatingRateCouponPtr, _p_FloatingRateCouponPtrTo_p_CouponPtr, 0, 0},  {&_swigt__p_CappedFlooredCouponPtr, _p_CappedFlooredCouponPtrTo_p_CouponPtr, 0, 0},  {&_swigt__p_CappedFlooredCmsCouponPtr, _p_CappedFlooredCmsCouponPtrTo_p_CouponPtr, 0, 0},  {&_swigt__p_IborCouponPtr, _p_IborCouponPtrTo_p_CouponPtr, 0, 0},  {&_swigt__p_CmsCouponPtr, _p_CmsCouponPtrTo_p_CouponPtr, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_CreditDefaultSwapPtr[] = {  {&_swigt__p_CreditDefaultSwapPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Cubic[] = {  {&_swigt__p_Cubic, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_CubicBSplinesFitting[] = {  {&_swigt__p_CubicBSplinesFitting, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_CubicZeroCurvePtr[] = {  {&_swigt__p_CubicZeroCurvePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_CumulativeBinomialDistribution[] = {  {&_swigt__p_CumulativeBinomialDistribution, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_CumulativeChiSquareDistribution[] = {  {&_swigt__p_CumulativeChiSquareDistribution, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_CumulativeGammaDistribution[] = {  {&_swigt__p_CumulativeGammaDistribution, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_CumulativeNormalDistribution[] = {  {&_swigt__p_CumulativeNormalDistribution, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_CumulativePoissonDistribution[] = {  {&_swigt__p_CumulativePoissonDistribution, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_CumulativeStudentDistribution[] = {  {&_swigt__p_CumulativeStudentDistribution, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Currency[] = {  {&_swigt__p_QuantLib__FRFCurrency, _p_QuantLib__FRFCurrencyTo_p_Currency, 0, 0},  {&_swigt__p_QuantLib__GBPCurrency, _p_QuantLib__GBPCurrencyTo_p_Currency, 0, 0},  {&_swigt__p_QuantLib__GRDCurrency, _p_QuantLib__GRDCurrencyTo_p_Currency, 0, 0},  {&_swigt__p_QuantLib__HKDCurrency, _p_QuantLib__HKDCurrencyTo_p_Currency, 0, 0},  {&_swigt__p_QuantLib__HUFCurrency, _p_QuantLib__HUFCurrencyTo_p_Currency, 0, 0},  {&_swigt__p_QuantLib__IEPCurrency, _p_QuantLib__IEPCurrencyTo_p_Currency, 0, 0},  {&_swigt__p_QuantLib__IDRCurrency, _p_QuantLib__IDRCurrencyTo_p_Currency, 0, 0},  {&_swigt__p_QuantLib__ILSCurrency, _p_QuantLib__ILSCurrencyTo_p_Currency, 0, 0},  {&_swigt__p_QuantLib__INRCurrency, _p_QuantLib__INRCurrencyTo_p_Currency, 0, 0},  {&_swigt__p_QuantLib__IQDCurrency, _p_QuantLib__IQDCurrencyTo_p_Currency, 0, 0},  {&_swigt__p_QuantLib__IRRCurrency, _p_QuantLib__IRRCurrencyTo_p_Currency, 0, 0},  {&_swigt__p_QuantLib__ISKCurrency, _p_QuantLib__ISKCurrencyTo_p_Currency, 0, 0},  {&_swigt__p_QuantLib__ITLCurrency, _p_QuantLib__ITLCurrencyTo_p_Currency, 0, 0},  {&_swigt__p_QuantLib__FIMCurrency, _p_QuantLib__FIMCurrencyTo_p_Currency, 0, 0},  {&_swigt__p_QuantLib__EURCurrency, _p_QuantLib__EURCurrencyTo_p_Currency, 0, 0},  {&_swigt__p_QuantLib__ESPCurrency, _p_QuantLib__ESPCurrencyTo_p_Currency, 0, 0},  {&_swigt__p_QuantLib__EEKCurrency, _p_QuantLib__EEKCurrencyTo_p_Currency, 0, 0},  {&_swigt__p_QuantLib__DKKCurrency, _p_QuantLib__DKKCurrencyTo_p_Currency, 0, 0},  {&_swigt__p_QuantLib__DEMCurrency, _p_QuantLib__DEMCurrencyTo_p_Currency, 0, 0},  {&_swigt__p_QuantLib__CZKCurrency, _p_QuantLib__CZKCurrencyTo_p_Currency, 0, 0},  {&_swigt__p_Currency, 0, 0, 0},  {&_swigt__p_QuantLib__COPCurrency, _p_QuantLib__COPCurrencyTo_p_Currency, 0, 0},  {&_swigt__p_QuantLib__CNYCurrency, _p_QuantLib__CNYCurrencyTo_p_Currency, 0, 0},  {&_swigt__p_QuantLib__CLPCurrency, _p_QuantLib__CLPCurrencyTo_p_Currency, 0, 0},  {&_swigt__p_QuantLib__CHFCurrency, _p_QuantLib__CHFCurrencyTo_p_Currency, 0, 0},  {&_swigt__p_QuantLib__CADCurrency, _p_QuantLib__CADCurrencyTo_p_Currency, 0, 0},  {&_swigt__p_QuantLib__BYRCurrency, _p_QuantLib__BYRCurrencyTo_p_Currency, 0, 0},  {&_swigt__p_QuantLib__BRLCurrency, _p_QuantLib__BRLCurrencyTo_p_Currency, 0, 0},  {&_swigt__p_QuantLib__BGLCurrency, _p_QuantLib__BGLCurrencyTo_p_Currency, 0, 0},  {&_swigt__p_QuantLib__BEFCurrency, _p_QuantLib__BEFCurrencyTo_p_Currency, 0, 0},  {&_swigt__p_QuantLib__BDTCurrency, _p_QuantLib__BDTCurrencyTo_p_Currency, 0, 0},  {&_swigt__p_QuantLib__AUDCurrency, _p_QuantLib__AUDCurrencyTo_p_Currency, 0, 0},  {&_swigt__p_QuantLib__ATSCurrency, _p_QuantLib__ATSCurrencyTo_p_Currency, 0, 0},  {&_swigt__p_QuantLib__ARSCurrency, _p_QuantLib__ARSCurrencyTo_p_Currency, 0, 0},  {&_swigt__p_QuantLib__CYPCurrency, _p_QuantLib__CYPCurrencyTo_p_Currency, 0, 0},  {&_swigt__p_QuantLib__JPYCurrency, _p_QuantLib__JPYCurrencyTo_p_Currency, 0, 0},  {&_swigt__p_QuantLib__KRWCurrency, _p_QuantLib__KRWCurrencyTo_p_Currency, 0, 0},  {&_swigt__p_QuantLib__KWDCurrency, _p_QuantLib__KWDCurrencyTo_p_Currency, 0, 0},  {&_swigt__p_QuantLib__LTLCurrency, _p_QuantLib__LTLCurrencyTo_p_Currency, 0, 0},  {&_swigt__p_QuantLib__LUFCurrency, _p_QuantLib__LUFCurrencyTo_p_Currency, 0, 0},  {&_swigt__p_QuantLib__LVLCurrency, _p_QuantLib__LVLCurrencyTo_p_Currency, 0, 0},  {&_swigt__p_QuantLib__MTLCurrency, _p_QuantLib__MTLCurrencyTo_p_Currency, 0, 0},  {&_swigt__p_QuantLib__MXNCurrency, _p_QuantLib__MXNCurrencyTo_p_Currency, 0, 0},  {&_swigt__p_QuantLib__MYRCurrency, _p_QuantLib__MYRCurrencyTo_p_Currency, 0, 0},  {&_swigt__p_QuantLib__NLGCurrency, _p_QuantLib__NLGCurrencyTo_p_Currency, 0, 0},  {&_swigt__p_QuantLib__NOKCurrency, _p_QuantLib__NOKCurrencyTo_p_Currency, 0, 0},  {&_swigt__p_QuantLib__NPRCurrency, _p_QuantLib__NPRCurrencyTo_p_Currency, 0, 0},  {&_swigt__p_QuantLib__NZDCurrency, _p_QuantLib__NZDCurrencyTo_p_Currency, 0, 0},  {&_swigt__p_QuantLib__PEHCurrency, _p_QuantLib__PEHCurrencyTo_p_Currency, 0, 0},  {&_swigt__p_QuantLib__PEICurrency, _p_QuantLib__PEICurrencyTo_p_Currency, 0, 0},  {&_swigt__p_QuantLib__PENCurrency, _p_QuantLib__PENCurrencyTo_p_Currency, 0, 0},  {&_swigt__p_QuantLib__PKRCurrency, _p_QuantLib__PKRCurrencyTo_p_Currency, 0, 0},  {&_swigt__p_QuantLib__PLNCurrency, _p_QuantLib__PLNCurrencyTo_p_Currency, 0, 0},  {&_swigt__p_QuantLib__PTECurrency, _p_QuantLib__PTECurrencyTo_p_Currency, 0, 0},  {&_swigt__p_QuantLib__ROLCurrency, _p_QuantLib__ROLCurrencyTo_p_Currency, 0, 0},  {&_swigt__p_QuantLib__RONCurrency, _p_QuantLib__RONCurrencyTo_p_Currency, 0, 0},  {&_swigt__p_QuantLib__RUBCurrency, _p_QuantLib__RUBCurrencyTo_p_Currency, 0, 0},  {&_swigt__p_QuantLib__SARCurrency, _p_QuantLib__SARCurrencyTo_p_Currency, 0, 0},  {&_swigt__p_QuantLib__SEKCurrency, _p_QuantLib__SEKCurrencyTo_p_Currency, 0, 0},  {&_swigt__p_QuantLib__SGDCurrency, _p_QuantLib__SGDCurrencyTo_p_Currency, 0, 0},  {&_swigt__p_QuantLib__SITCurrency, _p_QuantLib__SITCurrencyTo_p_Currency, 0, 0},  {&_swigt__p_QuantLib__SKKCurrency, _p_QuantLib__SKKCurrencyTo_p_Currency, 0, 0},  {&_swigt__p_QuantLib__THBCurrency, _p_QuantLib__THBCurrencyTo_p_Currency, 0, 0},  {&_swigt__p_QuantLib__TRLCurrency, _p_QuantLib__TRLCurrencyTo_p_Currency, 0, 0},  {&_swigt__p_QuantLib__TRYCurrency, _p_QuantLib__TRYCurrencyTo_p_Currency, 0, 0},  {&_swigt__p_QuantLib__TTDCurrency, _p_QuantLib__TTDCurrencyTo_p_Currency, 0, 0},  {&_swigt__p_QuantLib__TWDCurrency, _p_QuantLib__TWDCurrencyTo_p_Currency, 0, 0},  {&_swigt__p_QuantLib__USDCurrency, _p_QuantLib__USDCurrencyTo_p_Currency, 0, 0},  {&_swigt__p_QuantLib__VEBCurrency, _p_QuantLib__VEBCurrencyTo_p_Currency, 0, 0},  {&_swigt__p_QuantLib__VNDCurrency, _p_QuantLib__VNDCurrencyTo_p_Currency, 0, 0},  {&_swigt__p_QuantLib__ZARCurrency, _p_QuantLib__ZARCurrencyTo_p_Currency, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_CustomRegion[] = {  {&_swigt__p_CustomRegion, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_DKKLiborPtr[] = {  {&_swigt__p_DKKLiborPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_DMinus[] = {  {&_swigt__p_DMinus, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_DPlus[] = {  {&_swigt__p_DPlus, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_DPlusDMinus[] = {  {&_swigt__p_DPlusDMinus, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_DZero[] = {  {&_swigt__p_DZero, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Date[] = {  {&_swigt__p_Date, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_DateGeneration[] = {  {&_swigt__p_DateGeneration, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_DateParser[] = {  {&_swigt__p_DateParser, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_DatedOISRateHelperPtr[] = {  {&_swigt__p_DatedOISRateHelperPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_DayCounter[] = {  {&_swigt__p_DayCounter, 0, 0, 0},  {&_swigt__p_QuantLib__Thirty360, _p_QuantLib__Thirty360To_p_DayCounter, 0, 0},  {&_swigt__p_QuantLib__OneDayCounter, _p_QuantLib__OneDayCounterTo_p_DayCounter, 0, 0},  {&_swigt__p_QuantLib__SimpleDayCounter, _p_QuantLib__SimpleDayCounterTo_p_DayCounter, 0, 0},  {&_swigt__p_QuantLib__Actual360, _p_QuantLib__Actual360To_p_DayCounter, 0, 0},  {&_swigt__p_QuantLib__Actual365Fixed, _p_QuantLib__Actual365FixedTo_p_DayCounter, 0, 0},  {&_swigt__p_QuantLib__Business252, _p_QuantLib__Business252To_p_DayCounter, 0, 0},  {&_swigt__p_QuantLib__ActualActual, _p_QuantLib__ActualActualTo_p_DayCounter, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_DefaultBoundaryCondition[] = {  {&_swigt__p_DefaultBoundaryCondition, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_DefaultDensity[] = {  {&_swigt__p_DefaultDensity, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_DefaultDensityCurvePtr[] = {  {&_swigt__p_DefaultDensityCurvePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_DefaultLexicographicalView[] = {  {&_swigt__p_DefaultLexicographicalView, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_DefaultLogCubic[] = {  {&_swigt__p_DefaultLogCubic, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_DefaultProbabilityHelper[] = {  {&_swigt__p_DefaultProbabilityHelper, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_DefaultProbabilityTermStructure[] = {  {&_swigt__p_DefaultProbabilityTermStructure, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_DeltaVolQuote[] = {  {&_swigt__p_DeltaVolQuote, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_DepositRateHelperPtr[] = {  {&_swigt__p_DepositRateHelperPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_DifferentialEvolution[] = {  {&_swigt__p_DifferentialEvolution, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_DirichletBCPtr[] = {  {&_swigt__p_DirichletBCPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Discount[] = {  {&_swigt__p_Discount, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_DiscountCurvePtr[] = {  {&_swigt__p_DiscountCurvePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_DiscountingBondEnginePtr[] = {  {&_swigt__p_DiscountingBondEnginePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_DiscountingSwapEnginePtr[] = {  {&_swigt__p_DiscountingSwapEnginePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_DiscreteAveragingAsianOptionPtr[] = {  {&_swigt__p_DiscreteAveragingAsianOptionPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Dividend[] = {  {&_swigt__p_Dividend, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_DividendVanillaOptionPtr[] = {  {&_swigt__p_DividendVanillaOptionPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_DoubleBarrier[] = {  {&_swigt__p_DoubleBarrier, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_DoubleBarrierOptionPtr[] = {  {&_swigt__p_DoubleBarrierOptionPtr, 0, 0, 0},  {&_swigt__p_QuantoDoubleBarrierOptionPtr, _p_QuantoDoubleBarrierOptionPtrTo_p_DoubleBarrierOptionPtr, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_DownRounding[] = {  {&_swigt__p_DownRounding, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Duration[] = {  {&_swigt__p_Duration, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_EUHICPPtr[] = {  {&_swigt__p_EUHICPPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_EUHICPXTPtr[] = {  {&_swigt__p_EUHICPXTPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_EURLibor10MPtr[] = {  {&_swigt__p_EURLibor10MPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_EURLibor11MPtr[] = {  {&_swigt__p_EURLibor11MPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_EURLibor1MPtr[] = {  {&_swigt__p_EURLibor1MPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_EURLibor1YPtr[] = {  {&_swigt__p_EURLibor1YPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_EURLibor2MPtr[] = {  {&_swigt__p_EURLibor2MPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_EURLibor2WPtr[] = {  {&_swigt__p_EURLibor2WPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_EURLibor3MPtr[] = {  {&_swigt__p_EURLibor3MPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_EURLibor4MPtr[] = {  {&_swigt__p_EURLibor4MPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_EURLibor5MPtr[] = {  {&_swigt__p_EURLibor5MPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_EURLibor6MPtr[] = {  {&_swigt__p_EURLibor6MPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_EURLibor7MPtr[] = {  {&_swigt__p_EURLibor7MPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_EURLibor8MPtr[] = {  {&_swigt__p_EURLibor8MPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_EURLibor9MPtr[] = {  {&_swigt__p_EURLibor9MPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_EURLiborPtr[] = {  {&_swigt__p_EURLibor2WPtr, _p_EURLibor2WPtrTo_p_EURLiborPtr, 0, 0},  {&_swigt__p_EURLiborSWPtr, _p_EURLiborSWPtrTo_p_EURLiborPtr, 0, 0},  {&_swigt__p_EURLibor1YPtr, _p_EURLibor1YPtrTo_p_EURLiborPtr, 0, 0},  {&_swigt__p_EURLibor9MPtr, _p_EURLibor9MPtrTo_p_EURLiborPtr, 0, 0},  {&_swigt__p_EURLibor8MPtr, _p_EURLibor8MPtrTo_p_EURLiborPtr, 0, 0},  {&_swigt__p_EURLibor11MPtr, _p_EURLibor11MPtrTo_p_EURLiborPtr, 0, 0},  {&_swigt__p_EURLibor7MPtr, _p_EURLibor7MPtrTo_p_EURLiborPtr, 0, 0},  {&_swigt__p_EURLibor10MPtr, _p_EURLibor10MPtrTo_p_EURLiborPtr, 0, 0},  {&_swigt__p_EURLibor6MPtr, _p_EURLibor6MPtrTo_p_EURLiborPtr, 0, 0},  {&_swigt__p_EURLibor5MPtr, _p_EURLibor5MPtrTo_p_EURLiborPtr, 0, 0},  {&_swigt__p_EURLibor4MPtr, _p_EURLibor4MPtrTo_p_EURLiborPtr, 0, 0},  {&_swigt__p_EURLibor3MPtr, _p_EURLibor3MPtrTo_p_EURLiborPtr, 0, 0},  {&_swigt__p_EURLibor2MPtr, _p_EURLibor2MPtrTo_p_EURLiborPtr, 0, 0},  {&_swigt__p_EURLibor1MPtr, _p_EURLibor1MPtrTo_p_EURLiborPtr, 0, 0},  {&_swigt__p_EURLiborPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_EURLiborSWPtr[] = {  {&_swigt__p_EURLiborSWPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_EndCriteria[] = {  {&_swigt__p_EndCriteria, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_EndCriteria__Type[] = {  {&_swigt__p_EndCriteria__Type, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_EoniaPtr[] = {  {&_swigt__p_EoniaPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_EurLiborSwapIfrFixPtr[] = {  {&_swigt__p_EurLiborSwapIfrFixPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_EurLiborSwapIsdaFixAPtr[] = {  {&_swigt__p_EurLiborSwapIsdaFixAPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_EurLiborSwapIsdaFixBPtr[] = {  {&_swigt__p_EurLiborSwapIsdaFixBPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Euribor10MPtr[] = {  {&_swigt__p_Euribor10MPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Euribor11MPtr[] = {  {&_swigt__p_Euribor11MPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Euribor1MPtr[] = {  {&_swigt__p_Euribor1MPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Euribor1YPtr[] = {  {&_swigt__p_Euribor1YPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Euribor2MPtr[] = {  {&_swigt__p_Euribor2MPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Euribor2WPtr[] = {  {&_swigt__p_Euribor2WPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Euribor365Ptr[] = {  {&_swigt__p_Euribor365_1YPtr, _p_Euribor365_1YPtrTo_p_Euribor365Ptr, 0, 0},  {&_swigt__p_Euribor365_9MPtr, _p_Euribor365_9MPtrTo_p_Euribor365Ptr, 0, 0},  {&_swigt__p_Euribor365_8MPtr, _p_Euribor365_8MPtrTo_p_Euribor365Ptr, 0, 0},  {&_swigt__p_Euribor365_7MPtr, _p_Euribor365_7MPtrTo_p_Euribor365Ptr, 0, 0},  {&_swigt__p_Euribor365_6MPtr, _p_Euribor365_6MPtrTo_p_Euribor365Ptr, 0, 0},  {&_swigt__p_Euribor365_5MPtr, _p_Euribor365_5MPtrTo_p_Euribor365Ptr, 0, 0},  {&_swigt__p_Euribor365_4MPtr, _p_Euribor365_4MPtrTo_p_Euribor365Ptr, 0, 0},  {&_swigt__p_Euribor365_3MPtr, _p_Euribor365_3MPtrTo_p_Euribor365Ptr, 0, 0},  {&_swigt__p_Euribor365_2MPtr, _p_Euribor365_2MPtrTo_p_Euribor365Ptr, 0, 0},  {&_swigt__p_Euribor365_1MPtr, _p_Euribor365_1MPtrTo_p_Euribor365Ptr, 0, 0},  {&_swigt__p_Euribor365Ptr, 0, 0, 0},  {&_swigt__p_Euribor365_11MPtr, _p_Euribor365_11MPtrTo_p_Euribor365Ptr, 0, 0},  {&_swigt__p_Euribor365_10MPtr, _p_Euribor365_10MPtrTo_p_Euribor365Ptr, 0, 0},  {&_swigt__p_Euribor365_3WPtr, _p_Euribor365_3WPtrTo_p_Euribor365Ptr, 0, 0},  {&_swigt__p_Euribor365_2WPtr, _p_Euribor365_2WPtrTo_p_Euribor365Ptr, 0, 0},  {&_swigt__p_Euribor365_SWPtr, _p_Euribor365_SWPtrTo_p_Euribor365Ptr, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Euribor365_10MPtr[] = {  {&_swigt__p_Euribor365_10MPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Euribor365_11MPtr[] = {  {&_swigt__p_Euribor365_11MPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Euribor365_1MPtr[] = {  {&_swigt__p_Euribor365_1MPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Euribor365_1YPtr[] = {  {&_swigt__p_Euribor365_1YPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Euribor365_2MPtr[] = {  {&_swigt__p_Euribor365_2MPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Euribor365_2WPtr[] = {  {&_swigt__p_Euribor365_2WPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Euribor365_3MPtr[] = {  {&_swigt__p_Euribor365_3MPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Euribor365_3WPtr[] = {  {&_swigt__p_Euribor365_3WPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Euribor365_4MPtr[] = {  {&_swigt__p_Euribor365_4MPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Euribor365_5MPtr[] = {  {&_swigt__p_Euribor365_5MPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Euribor365_6MPtr[] = {  {&_swigt__p_Euribor365_6MPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Euribor365_7MPtr[] = {  {&_swigt__p_Euribor365_7MPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Euribor365_8MPtr[] = {  {&_swigt__p_Euribor365_8MPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Euribor365_9MPtr[] = {  {&_swigt__p_Euribor365_9MPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Euribor365_SWPtr[] = {  {&_swigt__p_Euribor365_SWPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Euribor3MPtr[] = {  {&_swigt__p_Euribor3MPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Euribor3WPtr[] = {  {&_swigt__p_Euribor3WPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Euribor4MPtr[] = {  {&_swigt__p_Euribor4MPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Euribor5MPtr[] = {  {&_swigt__p_Euribor5MPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Euribor6MPtr[] = {  {&_swigt__p_Euribor6MPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Euribor7MPtr[] = {  {&_swigt__p_Euribor7MPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Euribor8MPtr[] = {  {&_swigt__p_Euribor8MPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Euribor9MPtr[] = {  {&_swigt__p_Euribor9MPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_EuriborPtr[] = {  {&_swigt__p_Euribor3WPtr, _p_Euribor3WPtrTo_p_EuriborPtr, 0, 0},  {&_swigt__p_Euribor2WPtr, _p_Euribor2WPtrTo_p_EuriborPtr, 0, 0},  {&_swigt__p_EuriborSWPtr, _p_EuriborSWPtrTo_p_EuriborPtr, 0, 0},  {&_swigt__p_Euribor1YPtr, _p_Euribor1YPtrTo_p_EuriborPtr, 0, 0},  {&_swigt__p_Euribor9MPtr, _p_Euribor9MPtrTo_p_EuriborPtr, 0, 0},  {&_swigt__p_Euribor8MPtr, _p_Euribor8MPtrTo_p_EuriborPtr, 0, 0},  {&_swigt__p_Euribor11MPtr, _p_Euribor11MPtrTo_p_EuriborPtr, 0, 0},  {&_swigt__p_Euribor7MPtr, _p_Euribor7MPtrTo_p_EuriborPtr, 0, 0},  {&_swigt__p_Euribor10MPtr, _p_Euribor10MPtrTo_p_EuriborPtr, 0, 0},  {&_swigt__p_Euribor6MPtr, _p_Euribor6MPtrTo_p_EuriborPtr, 0, 0},  {&_swigt__p_Euribor5MPtr, _p_Euribor5MPtrTo_p_EuriborPtr, 0, 0},  {&_swigt__p_Euribor4MPtr, _p_Euribor4MPtrTo_p_EuriborPtr, 0, 0},  {&_swigt__p_Euribor3MPtr, _p_Euribor3MPtrTo_p_EuriborPtr, 0, 0},  {&_swigt__p_Euribor2MPtr, _p_Euribor2MPtrTo_p_EuriborPtr, 0, 0},  {&_swigt__p_Euribor1MPtr, _p_Euribor1MPtrTo_p_EuriborPtr, 0, 0},  {&_swigt__p_EuriborPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_EuriborSWPtr[] = {  {&_swigt__p_EuriborSWPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_EuriborSwapIfrFixPtr[] = {  {&_swigt__p_EuriborSwapIfrFixPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_EuriborSwapIsdaFixAPtr[] = {  {&_swigt__p_EuriborSwapIsdaFixAPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_EuriborSwapIsdaFixBPtr[] = {  {&_swigt__p_EuriborSwapIsdaFixBPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_EuropeanExercisePtr[] = {  {&_swigt__p_EuropeanExercisePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_EuropeanOptionPtr[] = {  {&_swigt__p_EuropeanOptionPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_EverestOptionPtr[] = {  {&_swigt__p_EverestOptionPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_ExchangeRate[] = {  {&_swigt__p_ExchangeRate, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_ExchangeRateManager[] = {  {&_swigt__p_ExchangeRateManager, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Exercise[] = {  {&_swigt__p_Exercise, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_ExponentialSplinesFitting[] = {  {&_swigt__p_ExponentialSplinesFitting, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Extrapolator[] = {  {&_swigt__p_YieldTermStructure, _p_YieldTermStructureTo_p_Extrapolator, 0, 0},  {&_swigt__p_BlackVolTermStructure, _p_BlackVolTermStructureTo_p_Extrapolator, 0, 0},  {&_swigt__p_LocalVolTermStructure, _p_LocalVolTermStructureTo_p_Extrapolator, 0, 0},  {&_swigt__p_OptionletVolatilityStructure, _p_OptionletVolatilityStructureTo_p_Extrapolator, 0, 0},  {&_swigt__p_SwaptionVolatilityStructure, _p_SwaptionVolatilityStructureTo_p_Extrapolator, 0, 0},  {&_swigt__p_InflationTermStructure, _p_InflationTermStructureTo_p_Extrapolator, 0, 0},  {&_swigt__p_YoYInflationTermStructure, _p_YoYInflationTermStructureTo_p_Extrapolator, 0, 0},  {&_swigt__p_ZeroInflationTermStructure, _p_ZeroInflationTermStructureTo_p_Extrapolator, 0, 0},  {&_swigt__p_DefaultProbabilityTermStructure, _p_DefaultProbabilityTermStructureTo_p_Extrapolator, 0, 0},  {&_swigt__p_CapFloorTermVolatilityStructure, _p_CapFloorTermVolatilityStructureTo_p_Extrapolator, 0, 0},  {&_swigt__p_Extrapolator, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_FDAmericanEnginePtr[] = {  {&_swigt__p_FDAmericanEnginePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_FDBermudanEnginePtr[] = {  {&_swigt__p_FDBermudanEnginePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_FDDividendAmericanEnginePtr[] = {  {&_swigt__p_FDDividendAmericanEnginePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_FDDividendEuropeanEnginePtr[] = {  {&_swigt__p_FDDividendEuropeanEnginePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_FDEuropeanEnginePtr[] = {  {&_swigt__p_FDEuropeanEnginePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_FDShoutEnginePtr[] = {  {&_swigt__p_FDShoutEnginePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_FFTVarianceGammaEnginePtr[] = {  {&_swigt__p_FFTVarianceGammaEnginePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_FRHICPPtr[] = {  {&_swigt__p_FRHICPPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_FalsePosition[] = {  {&_swigt__p_FalsePosition, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_FdBatesVanillaEnginePtr[] = {  {&_swigt__p_FdBatesVanillaEnginePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_FdBlackScholesAsianEnginePtr[] = {  {&_swigt__p_FdBlackScholesAsianEnginePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_FdBlackScholesBarrierEnginePtr[] = {  {&_swigt__p_FdBlackScholesBarrierEnginePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_FdBlackScholesVanillaEnginePtr[] = {  {&_swigt__p_FdBlackScholesVanillaEnginePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_FdG2SwaptionEnginePtr[] = {  {&_swigt__p_FdG2SwaptionEnginePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_FdHullWhiteSwaptionEnginePtr[] = {  {&_swigt__p_FdHullWhiteSwaptionEnginePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_FdmSchemeDesc[] = {  {&_swigt__p_FdmSchemeDesc, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_FedFundsPtr[] = {  {&_swigt__p_FedFundsPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_FittedBondDiscountCurvePtr[] = {  {&_swigt__p_FittedBondDiscountCurvePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_FittingMethod[] = {  {&_swigt__p_ExponentialSplinesFitting, _p_ExponentialSplinesFittingTo_p_FittingMethod, 0, 0},  {&_swigt__p_NelsonSiegelFitting, _p_NelsonSiegelFittingTo_p_FittingMethod, 0, 0},  {&_swigt__p_SvenssonFitting, _p_SvenssonFittingTo_p_FittingMethod, 0, 0},  {&_swigt__p_CubicBSplinesFitting, _p_CubicBSplinesFittingTo_p_FittingMethod, 0, 0},  {&_swigt__p_SimplePolynomialFitting, _p_SimplePolynomialFittingTo_p_FittingMethod, 0, 0},  {&_swigt__p_FittingMethod, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_FixedDividendPtr[] = {  {&_swigt__p_FixedDividendPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_FixedRateBondForwardPtr[] = {  {&_swigt__p_FixedRateBondForwardPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_FixedRateBondHelperPtr[] = {  {&_swigt__p_FixedRateBondHelperPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_FixedRateBondPtr[] = {  {&_swigt__p_FixedRateBondPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_FixedRateCouponPtr[] = {  {&_swigt__p_FixedRateCouponPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_FlatForwardPtr[] = {  {&_swigt__p_FlatForwardPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_FlatHazardRatePtr[] = {  {&_swigt__p_FlatHazardRatePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_FloatFloatSwapPtr[] = {  {&_swigt__p_FloatFloatSwapPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_FloatFloatSwaptionPtr[] = {  {&_swigt__p_FloatFloatSwaptionPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_FloatingRateBondPtr[] = {  {&_swigt__p_FloatingRateBondPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_FloatingRateCouponPricer[] = {  {&_swigt__p_FloatingRateCouponPricer, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_FloatingRateCouponPtr[] = {  {&_swigt__p_FloatingRateCouponPtr, 0, 0, 0},  {&_swigt__p_CappedFlooredCouponPtr, _p_CappedFlooredCouponPtrTo_p_FloatingRateCouponPtr, 0, 0},  {&_swigt__p_CappedFlooredCmsCouponPtr, _p_CappedFlooredCmsCouponPtrTo_p_FloatingRateCouponPtr, 0, 0},  {&_swigt__p_IborCouponPtr, _p_IborCouponPtrTo_p_FloatingRateCouponPtr, 0, 0},  {&_swigt__p_CmsCouponPtr, _p_CmsCouponPtrTo_p_FloatingRateCouponPtr, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_FloorPtr[] = {  {&_swigt__p_FloorPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_FloorTruncation[] = {  {&_swigt__p_FloorTruncation, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_ForwardCurvePtr[] = {  {&_swigt__p_ForwardCurvePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_ForwardEuropeanEnginePtr[] = {  {&_swigt__p_ForwardEuropeanEnginePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_ForwardFlat[] = {  {&_swigt__p_ForwardFlat, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_ForwardFlatZeroCurvePtr[] = {  {&_swigt__p_ForwardFlatZeroCurvePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_ForwardPtr[] = {  {&_swigt__p_ForwardPtr, 0, 0, 0},  {&_swigt__p_FixedRateBondForwardPtr, _p_FixedRateBondForwardPtrTo_p_ForwardPtr, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_ForwardRate[] = {  {&_swigt__p_ForwardRate, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_ForwardRateAgreementPtr[] = {  {&_swigt__p_ForwardRateAgreementPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_ForwardSpreadedTermStructurePtr[] = {  {&_swigt__p_ForwardSpreadedTermStructurePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_ForwardVanillaOptionPtr[] = {  {&_swigt__p_ForwardVanillaOptionPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_FraRateHelperPtr[] = {  {&_swigt__p_FraRateHelperPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_FractionalDividendPtr[] = {  {&_swigt__p_FractionalDividendPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Futures[] = {  {&_swigt__p_Futures, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_FuturesRateHelperPtr[] = {  {&_swigt__p_FuturesRateHelperPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_FxSwapRateHelperPtr[] = {  {&_swigt__p_FxSwapRateHelperPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_G2Ptr[] = {  {&_swigt__p_G2Ptr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_G2SwaptionEnginePtr[] = {  {&_swigt__p_G2SwaptionEnginePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GBPLiborPtr[] = {  {&_swigt__p_GBPLiborPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GFunctionFactory[] = {  {&_swigt__p_GFunctionFactory, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GammaFunction[] = {  {&_swigt__p_GammaFunction, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GapPayoffPtr[] = {  {&_swigt__p_GapPayoffPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GarmanKlassSigma1[] = {  {&_swigt__p_GarmanKlassSigma1, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GarmanKlassSigma3[] = {  {&_swigt__p_GarmanKlassSigma3, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GarmanKlassSigma4[] = {  {&_swigt__p_GarmanKlassSigma4, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GarmanKlassSigma5[] = {  {&_swigt__p_GarmanKlassSigma5, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GarmanKlassSigma6[] = {  {&_swigt__p_GarmanKlassSigma6, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GarmanKohlagenProcessPtr[] = {  {&_swigt__p_GarmanKohlagenProcessPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GaussChebyshev2ndIntegration[] = {  {&_swigt__p_GaussChebyshev2ndIntegration, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GaussChebyshevIntegration[] = {  {&_swigt__p_GaussChebyshevIntegration, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GaussGegenbauerIntegration[] = {  {&_swigt__p_GaussGegenbauerIntegration, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GaussHermiteIntegration[] = {  {&_swigt__p_GaussHermiteIntegration, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GaussHyperbolicIntegration[] = {  {&_swigt__p_GaussHyperbolicIntegration, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GaussJacobiIntegration[] = {  {&_swigt__p_GaussJacobiIntegration, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GaussKronrodAdaptive[] = {  {&_swigt__p_GaussKronrodAdaptive, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GaussKronrodNonAdaptive[] = {  {&_swigt__p_GaussKronrodNonAdaptive, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GaussLaguerreIntegration[] = {  {&_swigt__p_GaussLaguerreIntegration, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GaussLegendreIntegration[] = {  {&_swigt__p_GaussLegendreIntegration, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GaussLobattoIntegral[] = {  {&_swigt__p_GaussLobattoIntegral, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Gaussian1dFloatFloatSwaptionEnginePtr[] = {  {&_swigt__p_Gaussian1dFloatFloatSwaptionEnginePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Gaussian1dJamshidianSwaptionEnginePtr[] = {  {&_swigt__p_Gaussian1dJamshidianSwaptionEnginePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Gaussian1dModel[] = {  {&_swigt__p_Gaussian1dModel, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Gaussian1dNonstandardSwaptionEnginePtr[] = {  {&_swigt__p_Gaussian1dNonstandardSwaptionEnginePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Gaussian1dSwaptionEnginePtr[] = {  {&_swigt__p_Gaussian1dSwaptionEnginePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GaussianLowDiscrepancySequenceGenerator[] = {  {&_swigt__p_GaussianLowDiscrepancySequenceGenerator, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GaussianMultiPathGenerator[] = {  {&_swigt__p_GaussianMultiPathGenerator, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GaussianPathGenerator[] = {  {&_swigt__p_GaussianPathGenerator, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GaussianRandomGenerator[] = {  {&_swigt__p_GaussianRandomGenerator, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GaussianRandomSequenceGenerator[] = {  {&_swigt__p_GaussianRandomSequenceGenerator, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GaussianSimulatedAnnealing[] = {  {&_swigt__p_GaussianSimulatedAnnealing, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GaussianSobolPathGenerator[] = {  {&_swigt__p_GaussianSobolPathGenerator, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GeneralizedBlackScholesProcessPtr[] = {  {&_swigt__p_GeneralizedBlackScholesProcessPtr, 0, 0, 0},  {&_swigt__p_BlackScholesProcessPtr, _p_BlackScholesProcessPtrTo_p_GeneralizedBlackScholesProcessPtr, 0, 0},  {&_swigt__p_BlackScholesMertonProcessPtr, _p_BlackScholesMertonProcessPtrTo_p_GeneralizedBlackScholesProcessPtr, 0, 0},  {&_swigt__p_BlackProcessPtr, _p_BlackProcessPtrTo_p_GeneralizedBlackScholesProcessPtr, 0, 0},  {&_swigt__p_GarmanKohlagenProcessPtr, _p_GarmanKohlagenProcessPtrTo_p_GeneralizedBlackScholesProcessPtr, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GenericSequenceStatisticsT_IncrementalStatistics_t[] = {  {&_swigt__p_GenericSequenceStatisticsT_IncrementalStatistics_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GenericSequenceStatisticsT_RiskStatistics_t[] = {  {&_swigt__p_GenericSequenceStatisticsT_RiskStatistics_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GenericSequenceStatisticsT_Statistics_t[] = {  {&_swigt__p_GenericSequenceStatisticsT_Statistics_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GeometricBrownianMotionProcessPtr[] = {  {&_swigt__p_GeometricBrownianMotionProcessPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GsrProcessPtr[] = {  {&_swigt__p_GsrProcessPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GsrPtr[] = {  {&_swigt__p_GsrPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_HaltonRsg[] = {  {&_swigt__p_HaltonRsg, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_HandleT_BlackVolTermStructure_t[] = {  {&_swigt__p_HandleT_BlackVolTermStructure_t, 0, 0, 0},  {&_swigt__p_RelinkableHandleT_BlackVolTermStructure_t, _p_RelinkableHandleT_BlackVolTermStructure_tTo_p_HandleT_BlackVolTermStructure_t, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_HandleT_CalibratedModel_t[] = {  {&_swigt__p_HandleT_CalibratedModel_t, 0, 0, 0},  {&_swigt__p_RelinkableHandleT_CalibratedModel_t, _p_RelinkableHandleT_CalibratedModel_tTo_p_HandleT_CalibratedModel_t, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_HandleT_CapFloorTermVolatilityStructure_t[] = {  {&_swigt__p_HandleT_CapFloorTermVolatilityStructure_t, 0, 0, 0},  {&_swigt__p_RelinkableHandleT_CapFloorTermVolatilityStructure_t, _p_RelinkableHandleT_CapFloorTermVolatilityStructure_tTo_p_HandleT_CapFloorTermVolatilityStructure_t, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_HandleT_DefaultProbabilityTermStructure_t[] = {  {&_swigt__p_HandleT_DefaultProbabilityTermStructure_t, 0, 0, 0},  {&_swigt__p_RelinkableHandleT_DefaultProbabilityTermStructure_t, _p_RelinkableHandleT_DefaultProbabilityTermStructure_tTo_p_HandleT_DefaultProbabilityTermStructure_t, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_HandleT_DeltaVolQuote_t[] = {  {&_swigt__p_HandleT_DeltaVolQuote_t, 0, 0, 0},  {&_swigt__p_RelinkableHandleT_DeltaVolQuote_t, _p_RelinkableHandleT_DeltaVolQuote_tTo_p_HandleT_DeltaVolQuote_t, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_HandleT_LocalVolTermStructure_t[] = {  {&_swigt__p_HandleT_LocalVolTermStructure_t, 0, 0, 0},  {&_swigt__p_RelinkableHandleT_LocalVolTermStructure_t, _p_RelinkableHandleT_LocalVolTermStructure_tTo_p_HandleT_LocalVolTermStructure_t, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_HandleT_OptionletVolatilityStructure_t[] = {  {&_swigt__p_HandleT_OptionletVolatilityStructure_t, 0, 0, 0},  {&_swigt__p_RelinkableHandleT_OptionletVolatilityStructure_t, _p_RelinkableHandleT_OptionletVolatilityStructure_tTo_p_HandleT_OptionletVolatilityStructure_t, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_HandleT_Quote_t[] = {  {&_swigt__p_HandleT_Quote_t, 0, 0, 0},  {&_swigt__p_RelinkableHandleT_Quote_t, _p_RelinkableHandleT_Quote_tTo_p_HandleT_Quote_t, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_HandleT_ShortRateModel_t[] = {  {&_swigt__p_HandleT_ShortRateModel_t, 0, 0, 0},  {&_swigt__p_RelinkableHandleT_ShortRateModel_t, _p_RelinkableHandleT_ShortRateModel_tTo_p_HandleT_ShortRateModel_t, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_HandleT_SwaptionVolatilityStructure_t[] = {  {&_swigt__p_HandleT_SwaptionVolatilityStructure_t, 0, 0, 0},  {&_swigt__p_RelinkableHandleT_SwaptionVolatilityStructure_t, _p_RelinkableHandleT_SwaptionVolatilityStructure_tTo_p_HandleT_SwaptionVolatilityStructure_t, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_HandleT_YieldTermStructure_t[] = {  {&_swigt__p_HandleT_YieldTermStructure_t, 0, 0, 0},  {&_swigt__p_RelinkableHandleT_YieldTermStructure_t, _p_RelinkableHandleT_YieldTermStructure_tTo_p_HandleT_YieldTermStructure_t, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_HandleT_YoYInflationTermStructure_t[] = {  {&_swigt__p_HandleT_YoYInflationTermStructure_t, 0, 0, 0},  {&_swigt__p_RelinkableHandleT_YoYInflationTermStructure_t, _p_RelinkableHandleT_YoYInflationTermStructure_tTo_p_HandleT_YoYInflationTermStructure_t, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_HandleT_ZeroInflationTermStructure_t[] = {  {&_swigt__p_HandleT_ZeroInflationTermStructure_t, 0, 0, 0},  {&_swigt__p_RelinkableHandleT_ZeroInflationTermStructure_t, _p_RelinkableHandleT_ZeroInflationTermStructure_tTo_p_HandleT_ZeroInflationTermStructure_t, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_HazardRate[] = {  {&_swigt__p_HazardRate, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_HazardRateCurvePtr[] = {  {&_swigt__p_HazardRateCurvePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_HestonModelHelperPtr[] = {  {&_swigt__p_HestonModelHelperPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_HestonModelPtr[] = {  {&_swigt__p_HestonModelPtr, 0, 0, 0},  {&_swigt__p_BatesModelPtr, _p_BatesModelPtrTo_p_HestonModelPtr, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_HestonProcessPtr[] = {  {&_swigt__p_HestonProcessPtr, 0, 0, 0},  {&_swigt__p_BatesProcessPtr, _p_BatesProcessPtrTo_p_HestonProcessPtr, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_HimalayaOptionPtr[] = {  {&_swigt__p_HimalayaOptionPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_HullWhiteForwardProcessPtr[] = {  {&_swigt__p_HullWhiteForwardProcessPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_HullWhiteProcessPtr[] = {  {&_swigt__p_HullWhiteProcessPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_HullWhitePtr[] = {  {&_swigt__p_HullWhitePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_IMM[] = {  {&_swigt__p_IMM, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_IborCouponPricerPtr[] = {  {&_swigt__p_IborCouponPricerPtr, 0, 0, 0},  {&_swigt__p_BlackIborCouponPricerPtr, _p_BlackIborCouponPricerPtrTo_p_IborCouponPricerPtr, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_IborCouponPtr[] = {  {&_swigt__p_IborCouponPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_IborIndexPtr[] = {  {&_swigt__p_Bkbm6MPtr, _p_Bkbm6MPtrTo_p_IborIndexPtr, 0, 0},  {&_swigt__p_EURLibor1MPtr, _p_EURLibor1MPtrTo_p_IborIndexPtr, 0, 0},  {&_swigt__p_Euribor1MPtr, _p_Euribor1MPtrTo_p_IborIndexPtr, 0, 0},  {&_swigt__p_EURLibor11MPtr, _p_EURLibor11MPtrTo_p_IborIndexPtr, 0, 0},  {&_swigt__p_Euribor11MPtr, _p_Euribor11MPtrTo_p_IborIndexPtr, 0, 0},  {&_swigt__p_Euribor365Ptr, _p_Euribor365PtrTo_p_IborIndexPtr, 0, 0},  {&_swigt__p_FedFundsPtr, _p_FedFundsPtrTo_p_IborIndexPtr, 0, 0},  {&_swigt__p_CdorPtr, _p_CdorPtrTo_p_IborIndexPtr, 0, 0},  {&_swigt__p_Euribor3WPtr, _p_Euribor3WPtrTo_p_IborIndexPtr, 0, 0},  {&_swigt__p_Euribor365_4MPtr, _p_Euribor365_4MPtrTo_p_IborIndexPtr, 0, 0},  {&_swigt__p_Euribor2MPtr, _p_Euribor2MPtrTo_p_IborIndexPtr, 0, 0},  {&_swigt__p_EURLibor2MPtr, _p_EURLibor2MPtrTo_p_IborIndexPtr, 0, 0},  {&_swigt__p_Euribor365_1YPtr, _p_Euribor365_1YPtrTo_p_IborIndexPtr, 0, 0},  {&_swigt__p_JibarPtr, _p_JibarPtrTo_p_IborIndexPtr, 0, 0},  {&_swigt__p_Euribor365_5MPtr, _p_Euribor365_5MPtrTo_p_IborIndexPtr, 0, 0},  {&_swigt__p_EURLibor3MPtr, _p_EURLibor3MPtrTo_p_IborIndexPtr, 0, 0},  {&_swigt__p_Euribor3MPtr, _p_Euribor3MPtrTo_p_IborIndexPtr, 0, 0},  {&_swigt__p_Bbsw1MPtr, _p_Bbsw1MPtrTo_p_IborIndexPtr, 0, 0},  {&_swigt__p_Euribor365_10MPtr, _p_Euribor365_10MPtrTo_p_IborIndexPtr, 0, 0},  {&_swigt__p_IborIndexPtr, 0, 0, 0},  {&_swigt__p_OvernightIndexPtr, _p_OvernightIndexPtrTo_p_IborIndexPtr, 0, 0},  {&_swigt__p_Euribor365_6MPtr, _p_Euribor365_6MPtrTo_p_IborIndexPtr, 0, 0},  {&_swigt__p_Euribor4MPtr, _p_Euribor4MPtrTo_p_IborIndexPtr, 0, 0},  {&_swigt__p_EURLibor4MPtr, _p_EURLibor4MPtrTo_p_IborIndexPtr, 0, 0},  {&_swigt__p_Bbsw2MPtr, _p_Bbsw2MPtrTo_p_IborIndexPtr, 0, 0},  {&_swigt__p_Euribor365_11MPtr, _p_Euribor365_11MPtrTo_p_IborIndexPtr, 0, 0},  {&_swigt__p_Euribor365_7MPtr, _p_Euribor365_7MPtrTo_p_IborIndexPtr, 0, 0},  {&_swigt__p_Euribor1YPtr, _p_Euribor1YPtrTo_p_IborIndexPtr, 0, 0},  {&_swigt__p_EURLibor1YPtr, _p_EURLibor1YPtrTo_p_IborIndexPtr, 0, 0},  {&_swigt__p_Bkbm1MPtr, _p_Bkbm1MPtrTo_p_IborIndexPtr, 0, 0},  {&_swigt__p_Euribor5MPtr, _p_Euribor5MPtrTo_p_IborIndexPtr, 0, 0},  {&_swigt__p_EURLibor5MPtr, _p_EURLibor5MPtrTo_p_IborIndexPtr, 0, 0},  {&_swigt__p_Bbsw3MPtr, _p_Bbsw3MPtrTo_p_IborIndexPtr, 0, 0},  {&_swigt__p_NzocrPtr, _p_NzocrPtrTo_p_IborIndexPtr, 0, 0},  {&_swigt__p_Euribor365_SWPtr, _p_Euribor365_SWPtrTo_p_IborIndexPtr, 0, 0},  {&_swigt__p_SoniaPtr, _p_SoniaPtrTo_p_IborIndexPtr, 0, 0},  {&_swigt__p_AoniaPtr, _p_AoniaPtrTo_p_IborIndexPtr, 0, 0},  {&_swigt__p_EoniaPtr, _p_EoniaPtrTo_p_IborIndexPtr, 0, 0},  {&_swigt__p_Euribor365_8MPtr, _p_Euribor365_8MPtrTo_p_IborIndexPtr, 0, 0},  {&_swigt__p_Bkbm2MPtr, _p_Bkbm2MPtrTo_p_IborIndexPtr, 0, 0},  {&_swigt__p_EURLibor6MPtr, _p_EURLibor6MPtrTo_p_IborIndexPtr, 0, 0},  {&_swigt__p_Euribor6MPtr, _p_Euribor6MPtrTo_p_IborIndexPtr, 0, 0},  {&_swigt__p_Bbsw4MPtr, _p_Bbsw4MPtrTo_p_IborIndexPtr, 0, 0},  {&_swigt__p_Euribor365_9MPtr, _p_Euribor365_9MPtrTo_p_IborIndexPtr, 0, 0},  {&_swigt__p_Bkbm3MPtr, _p_Bkbm3MPtrTo_p_IborIndexPtr, 0, 0},  {&_swigt__p_EURLibor7MPtr, _p_EURLibor7MPtrTo_p_IborIndexPtr, 0, 0},  {&_swigt__p_Euribor7MPtr, _p_Euribor7MPtrTo_p_IborIndexPtr, 0, 0},  {&_swigt__p_Bbsw5MPtr, _p_Bbsw5MPtrTo_p_IborIndexPtr, 0, 0},  {&_swigt__p_Euribor365_2WPtr, _p_Euribor365_2WPtrTo_p_IborIndexPtr, 0, 0},  {&_swigt__p_EURLiborSWPtr, _p_EURLiborSWPtrTo_p_IborIndexPtr, 0, 0},  {&_swigt__p_EuriborSWPtr, _p_EuriborSWPtrTo_p_IborIndexPtr, 0, 0},  {&_swigt__p_Euribor365_1MPtr, _p_Euribor365_1MPtrTo_p_IborIndexPtr, 0, 0},  {&_swigt__p_GBPLiborPtr, _p_GBPLiborPtrTo_p_IborIndexPtr, 0, 0},  {&_swigt__p_EURLiborPtr, _p_EURLiborPtrTo_p_IborIndexPtr, 0, 0},  {&_swigt__p_DKKLiborPtr, _p_DKKLiborPtrTo_p_IborIndexPtr, 0, 0},  {&_swigt__p_CHFLiborPtr, _p_CHFLiborPtrTo_p_IborIndexPtr, 0, 0},  {&_swigt__p_CADLiborPtr, _p_CADLiborPtrTo_p_IborIndexPtr, 0, 0},  {&_swigt__p_AUDLiborPtr, _p_AUDLiborPtrTo_p_IborIndexPtr, 0, 0},  {&_swigt__p_LiborPtr, _p_LiborPtrTo_p_IborIndexPtr, 0, 0},  {&_swigt__p_EuriborPtr, _p_EuriborPtrTo_p_IborIndexPtr, 0, 0},  {&_swigt__p_TRLiborPtr, _p_TRLiborPtrTo_p_IborIndexPtr, 0, 0},  {&_swigt__p_USDLiborPtr, _p_USDLiborPtrTo_p_IborIndexPtr, 0, 0},  {&_swigt__p_ZiborPtr, _p_ZiborPtrTo_p_IborIndexPtr, 0, 0},  {&_swigt__p_JPYLiborPtr, _p_JPYLiborPtrTo_p_IborIndexPtr, 0, 0},  {&_swigt__p_NZDLiborPtr, _p_NZDLiborPtrTo_p_IborIndexPtr, 0, 0},  {&_swigt__p_SEKLiborPtr, _p_SEKLiborPtrTo_p_IborIndexPtr, 0, 0},  {&_swigt__p_TiborPtr, _p_TiborPtrTo_p_IborIndexPtr, 0, 0},  {&_swigt__p_Bkbm4MPtr, _p_Bkbm4MPtrTo_p_IborIndexPtr, 0, 0},  {&_swigt__p_EURLibor8MPtr, _p_EURLibor8MPtrTo_p_IborIndexPtr, 0, 0},  {&_swigt__p_Euribor8MPtr, _p_Euribor8MPtrTo_p_IborIndexPtr, 0, 0},  {&_swigt__p_Bbsw6MPtr, _p_Bbsw6MPtrTo_p_IborIndexPtr, 0, 0},  {&_swigt__p_Euribor365_3WPtr, _p_Euribor365_3WPtrTo_p_IborIndexPtr, 0, 0},  {&_swigt__p_BbswPtr, _p_BbswPtrTo_p_IborIndexPtr, 0, 0},  {&_swigt__p_BkbmPtr, _p_BkbmPtrTo_p_IborIndexPtr, 0, 0},  {&_swigt__p_Euribor365_2MPtr, _p_Euribor365_2MPtrTo_p_IborIndexPtr, 0, 0},  {&_swigt__p_Bkbm5MPtr, _p_Bkbm5MPtrTo_p_IborIndexPtr, 0, 0},  {&_swigt__p_EURLibor10MPtr, _p_EURLibor10MPtrTo_p_IborIndexPtr, 0, 0},  {&_swigt__p_Euribor10MPtr, _p_Euribor10MPtrTo_p_IborIndexPtr, 0, 0},  {&_swigt__p_EURLibor9MPtr, _p_EURLibor9MPtrTo_p_IborIndexPtr, 0, 0},  {&_swigt__p_Euribor9MPtr, _p_Euribor9MPtrTo_p_IborIndexPtr, 0, 0},  {&_swigt__p_EURLibor2WPtr, _p_EURLibor2WPtrTo_p_IborIndexPtr, 0, 0},  {&_swigt__p_Euribor2WPtr, _p_Euribor2WPtrTo_p_IborIndexPtr, 0, 0},  {&_swigt__p_Euribor365_3MPtr, _p_Euribor365_3MPtrTo_p_IborIndexPtr, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_ImpliedTermStructurePtr[] = {  {&_swigt__p_ImpliedTermStructurePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_IncrementalStatistics[] = {  {&_swigt__p_IncrementalStatistics, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Index[] = {  {&_swigt__p_Index, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_IndexManager[] = {  {&_swigt__p_IndexManager, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_InflationIndexPtr[] = {  {&_swigt__p_YYFRHICPPtr, _p_YYFRHICPPtrTo_p_InflationIndexPtr, 0, 0},  {&_swigt__p_YYEUHICPPtr, _p_YYEUHICPPtrTo_p_InflationIndexPtr, 0, 0},  {&_swigt__p_FRHICPPtr, _p_FRHICPPtrTo_p_InflationIndexPtr, 0, 0},  {&_swigt__p_EUHICPPtr, _p_EUHICPPtrTo_p_InflationIndexPtr, 0, 0},  {&_swigt__p_YYUKRPIPtr, _p_YYUKRPIPtrTo_p_InflationIndexPtr, 0, 0},  {&_swigt__p_UKRPIPtr, _p_UKRPIPtrTo_p_InflationIndexPtr, 0, 0},  {&_swigt__p_YoYInflationIndexPtr, _p_YoYInflationIndexPtrTo_p_InflationIndexPtr, 0, 0},  {&_swigt__p_ZeroInflationIndexPtr, _p_ZeroInflationIndexPtrTo_p_InflationIndexPtr, 0, 0},  {&_swigt__p_InflationIndexPtr, 0, 0, 0},  {&_swigt__p_YYEUHICPXTPtr, _p_YYEUHICPXTPtrTo_p_InflationIndexPtr, 0, 0},  {&_swigt__p_EUHICPXTPtr, _p_EUHICPXTPtrTo_p_InflationIndexPtr, 0, 0},  {&_swigt__p_YYUSCPIPtr, _p_YYUSCPIPtrTo_p_InflationIndexPtr, 0, 0},  {&_swigt__p_ZACPIPtr, _p_ZACPIPtrTo_p_InflationIndexPtr, 0, 0},  {&_swigt__p_USCPIPtr, _p_USCPIPtrTo_p_InflationIndexPtr, 0, 0},  {&_swigt__p_YYZACPIPtr, _p_YYZACPIPtrTo_p_InflationIndexPtr, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_InflationTermStructure[] = {  {&_swigt__p_InflationTermStructure, 0, 0, 0},  {&_swigt__p_YoYInflationTermStructure, _p_YoYInflationTermStructureTo_p_InflationTermStructure, 0, 0},  {&_swigt__p_ZeroInflationTermStructure, _p_ZeroInflationTermStructureTo_p_InflationTermStructure, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Instrument[] = {  {&_swigt__p_Instrument, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_IntegralCdsEnginePtr[] = {  {&_swigt__p_IntegralCdsEnginePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_IntegralEnginePtr[] = {  {&_swigt__p_IntegralEnginePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_InterestRate[] = {  {&_swigt__p_InterestRate, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_InterestRateIndexPtr[] = {  {&_swigt__p_Bkbm6MPtr, _p_Bkbm6MPtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_EURLibor1MPtr, _p_EURLibor1MPtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_Euribor1MPtr, _p_Euribor1MPtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_EURLibor11MPtr, _p_EURLibor11MPtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_Euribor11MPtr, _p_Euribor11MPtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_Euribor365Ptr, _p_Euribor365PtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_FedFundsPtr, _p_FedFundsPtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_CdorPtr, _p_CdorPtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_Euribor3WPtr, _p_Euribor3WPtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_Euribor365_4MPtr, _p_Euribor365_4MPtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_Euribor2MPtr, _p_Euribor2MPtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_EURLibor2MPtr, _p_EURLibor2MPtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_Euribor365_1YPtr, _p_Euribor365_1YPtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_JibarPtr, _p_JibarPtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_Euribor365_5MPtr, _p_Euribor365_5MPtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_EURLibor3MPtr, _p_EURLibor3MPtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_Euribor3MPtr, _p_Euribor3MPtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_Bbsw1MPtr, _p_Bbsw1MPtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_Euribor365_10MPtr, _p_Euribor365_10MPtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_IborIndexPtr, _p_IborIndexPtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_OvernightIndexPtr, _p_OvernightIndexPtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_InterestRateIndexPtr, 0, 0, 0},  {&_swigt__p_SwapIndexPtr, _p_SwapIndexPtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_Euribor365_6MPtr, _p_Euribor365_6MPtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_EurLiborSwapIsdaFixBPtr, _p_EurLiborSwapIsdaFixBPtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_EuriborSwapIsdaFixBPtr, _p_EuriborSwapIsdaFixBPtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_Euribor4MPtr, _p_Euribor4MPtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_EURLibor4MPtr, _p_EURLibor4MPtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_Bbsw2MPtr, _p_Bbsw2MPtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_Euribor365_11MPtr, _p_Euribor365_11MPtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_EurLiborSwapIfrFixPtr, _p_EurLiborSwapIfrFixPtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_EuriborSwapIfrFixPtr, _p_EuriborSwapIfrFixPtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_Euribor365_7MPtr, _p_Euribor365_7MPtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_Euribor1YPtr, _p_Euribor1YPtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_EURLibor1YPtr, _p_EURLibor1YPtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_Bkbm1MPtr, _p_Bkbm1MPtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_Euribor5MPtr, _p_Euribor5MPtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_EURLibor5MPtr, _p_EURLibor5MPtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_Bbsw3MPtr, _p_Bbsw3MPtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_NzocrPtr, _p_NzocrPtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_Euribor365_SWPtr, _p_Euribor365_SWPtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_SoniaPtr, _p_SoniaPtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_EoniaPtr, _p_EoniaPtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_AoniaPtr, _p_AoniaPtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_EuriborSwapIsdaFixAPtr, _p_EuriborSwapIsdaFixAPtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_EurLiborSwapIsdaFixAPtr, _p_EurLiborSwapIsdaFixAPtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_Euribor365_8MPtr, _p_Euribor365_8MPtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_Bkbm2MPtr, _p_Bkbm2MPtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_EURLibor6MPtr, _p_EURLibor6MPtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_Euribor6MPtr, _p_Euribor6MPtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_Bbsw4MPtr, _p_Bbsw4MPtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_Euribor365_9MPtr, _p_Euribor365_9MPtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_Bkbm3MPtr, _p_Bkbm3MPtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_EURLibor7MPtr, _p_EURLibor7MPtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_Euribor7MPtr, _p_Euribor7MPtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_Bbsw5MPtr, _p_Bbsw5MPtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_Euribor365_2WPtr, _p_Euribor365_2WPtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_EURLiborSWPtr, _p_EURLiborSWPtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_EuriborSWPtr, _p_EuriborSWPtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_Euribor365_1MPtr, _p_Euribor365_1MPtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_CADLiborPtr, _p_CADLiborPtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_AUDLiborPtr, _p_AUDLiborPtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_LiborPtr, _p_LiborPtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_EuriborPtr, _p_EuriborPtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_TRLiborPtr, _p_TRLiborPtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_USDLiborPtr, _p_USDLiborPtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_ZiborPtr, _p_ZiborPtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_CHFLiborPtr, _p_CHFLiborPtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_DKKLiborPtr, _p_DKKLiborPtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_EURLiborPtr, _p_EURLiborPtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_GBPLiborPtr, _p_GBPLiborPtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_JPYLiborPtr, _p_JPYLiborPtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_NZDLiborPtr, _p_NZDLiborPtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_SEKLiborPtr, _p_SEKLiborPtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_TiborPtr, _p_TiborPtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_Bkbm4MPtr, _p_Bkbm4MPtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_Euribor8MPtr, _p_Euribor8MPtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_EURLibor8MPtr, _p_EURLibor8MPtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_Bbsw6MPtr, _p_Bbsw6MPtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_Euribor365_3WPtr, _p_Euribor365_3WPtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_BbswPtr, _p_BbswPtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_BkbmPtr, _p_BkbmPtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_Euribor365_2MPtr, _p_Euribor365_2MPtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_Bkbm5MPtr, _p_Bkbm5MPtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_Euribor10MPtr, _p_Euribor10MPtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_EURLibor10MPtr, _p_EURLibor10MPtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_Euribor9MPtr, _p_Euribor9MPtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_EURLibor9MPtr, _p_EURLibor9MPtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_Euribor2WPtr, _p_Euribor2WPtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_Euribor365_3MPtr, _p_Euribor365_3MPtrTo_p_InterestRateIndexPtr, 0, 0},  {&_swigt__p_EURLibor2WPtr, _p_EURLibor2WPtrTo_p_InterestRateIndexPtr, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_IntervalPrice[] = {  {&_swigt__p_IntervalPrice, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_InverseCumulativeNormal[] = {  {&_swigt__p_InverseCumulativeNormal, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_InverseCumulativePoisson[] = {  {&_swigt__p_InverseCumulativePoisson, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_InverseCumulativeRngT_KnuthUniformRng_InverseCumulativeNormal_t[] = {  {&_swigt__p_InverseCumulativeRngT_KnuthUniformRng_InverseCumulativeNormal_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_InverseCumulativeRngT_KnuthUniformRng_MoroInverseCumulativeNormal_t[] = {  {&_swigt__p_InverseCumulativeRngT_KnuthUniformRng_MoroInverseCumulativeNormal_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_InverseCumulativeRngT_LecuyerUniformRng_InverseCumulativeNormal_t[] = {  {&_swigt__p_InverseCumulativeRngT_LecuyerUniformRng_InverseCumulativeNormal_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_InverseCumulativeRngT_LecuyerUniformRng_MoroInverseCumulativeNormal_t[] = {  {&_swigt__p_InverseCumulativeRngT_LecuyerUniformRng_MoroInverseCumulativeNormal_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_InverseCumulativeRngT_MersenneTwisterUniformRng_InverseCumulativeNormal_t[] = {  {&_swigt__p_InverseCumulativeRngT_MersenneTwisterUniformRng_InverseCumulativeNormal_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_InverseCumulativeRngT_MersenneTwisterUniformRng_MoroInverseCumulativeNormal_t[] = {  {&_swigt__p_InverseCumulativeRngT_MersenneTwisterUniformRng_MoroInverseCumulativeNormal_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_InverseCumulativeRsgT_HaltonRsg_InverseCumulativeNormal_t[] = {  {&_swigt__p_InverseCumulativeRsgT_HaltonRsg_InverseCumulativeNormal_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_InverseCumulativeRsgT_HaltonRsg_MoroInverseCumulativeNormal_t[] = {  {&_swigt__p_InverseCumulativeRsgT_HaltonRsg_MoroInverseCumulativeNormal_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_InverseCumulativeRsgT_RandomSequenceGeneratorT_KnuthUniformRng_t_InverseCumulativeNormal_t[] = {  {&_swigt__p_InverseCumulativeRsgT_RandomSequenceGeneratorT_KnuthUniformRng_t_InverseCumulativeNormal_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_InverseCumulativeRsgT_RandomSequenceGeneratorT_KnuthUniformRng_t_MoroInverseCumulativeNormal_t[] = {  {&_swigt__p_InverseCumulativeRsgT_RandomSequenceGeneratorT_KnuthUniformRng_t_MoroInverseCumulativeNormal_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_InverseCumulativeRsgT_RandomSequenceGeneratorT_LecuyerUniformRng_t_InverseCumulativeNormal_t[] = {  {&_swigt__p_InverseCumulativeRsgT_RandomSequenceGeneratorT_LecuyerUniformRng_t_InverseCumulativeNormal_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_InverseCumulativeRsgT_RandomSequenceGeneratorT_LecuyerUniformRng_t_MoroInverseCumulativeNormal_t[] = {  {&_swigt__p_InverseCumulativeRsgT_RandomSequenceGeneratorT_LecuyerUniformRng_t_MoroInverseCumulativeNormal_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_InverseCumulativeRsgT_RandomSequenceGeneratorT_MersenneTwisterUniformRng_t_InverseCumulativeNormal_t[] = {  {&_swigt__p_InverseCumulativeRsgT_RandomSequenceGeneratorT_MersenneTwisterUniformRng_t_InverseCumulativeNormal_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_InverseCumulativeRsgT_RandomSequenceGeneratorT_MersenneTwisterUniformRng_t_MoroInverseCumulativeNormal_t[] = {  {&_swigt__p_InverseCumulativeRsgT_RandomSequenceGeneratorT_MersenneTwisterUniformRng_t_MoroInverseCumulativeNormal_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_InverseCumulativeRsgT_SobolRsg_InverseCumulativeNormal_t[] = {  {&_swigt__p_InverseCumulativeRsgT_SobolRsg_InverseCumulativeNormal_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_InverseCumulativeRsgT_SobolRsg_MoroInverseCumulativeNormal_t[] = {  {&_swigt__p_InverseCumulativeRsgT_SobolRsg_MoroInverseCumulativeNormal_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_InverseCumulativeStudent[] = {  {&_swigt__p_InverseCumulativeStudent, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_InverseNonCentralCumulativeChiSquareDistribution[] = {  {&_swigt__p_InverseNonCentralCumulativeChiSquareDistribution, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_JPYLiborPtr[] = {  {&_swigt__p_JPYLiborPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_JamshidianSwaptionEnginePtr[] = {  {&_swigt__p_JamshidianSwaptionEnginePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_JibarPtr[] = {  {&_swigt__p_JibarPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_KnuthUniformRng[] = {  {&_swigt__p_KnuthUniformRng, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_LecuyerUniformRng[] = {  {&_swigt__p_LecuyerUniformRng, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_LevenbergMarquardt[] = {  {&_swigt__p_LevenbergMarquardt, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_LiborPtr[] = {  {&_swigt__p_LiborPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Linear[] = {  {&_swigt__p_Linear, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_LinearTsrPricerPtr[] = {  {&_swigt__p_LinearTsrPricerPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_LinearTsrPricer__Settings[] = {  {&_swigt__p_LinearTsrPricer__Settings, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_LocalConstantVolPtr[] = {  {&_swigt__p_LocalConstantVolPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_LocalVolSurfacePtr[] = {  {&_swigt__p_LocalVolSurfacePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_LocalVolTermStructure[] = {  {&_swigt__p_LocalVolTermStructure, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_LogCubicZeroCurvePtr[] = {  {&_swigt__p_LogCubicZeroCurvePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_LogLinear[] = {  {&_swigt__p_LogLinear, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_LogLinearZeroCurvePtr[] = {  {&_swigt__p_LogLinearZeroCurvePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_LogNormalSimulatedAnnealing[] = {  {&_swigt__p_LogNormalSimulatedAnnealing, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_MCAmericanBasketEnginePtr[] = {  {&_swigt__p_MCAmericanBasketEnginePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_MCBarrierEnginePtr[] = {  {&_swigt__p_MCBarrierEnginePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_MCDiscreteArithmeticAPEnginePtr[] = {  {&_swigt__p_MCDiscreteArithmeticAPEnginePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_MCDiscreteArithmeticASEnginePtr[] = {  {&_swigt__p_MCDiscreteArithmeticASEnginePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_MCDiscreteGeometricAPEnginePtr[] = {  {&_swigt__p_MCDiscreteGeometricAPEnginePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_MCEuropeanBasketEnginePtr[] = {  {&_swigt__p_MCEuropeanBasketEnginePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_MCEuropeanEnginePtr[] = {  {&_swigt__p_MCEuropeanEnginePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_MCEverestEnginePtr[] = {  {&_swigt__p_MCEverestEnginePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_MCHimalayaEnginePtr[] = {  {&_swigt__p_MCHimalayaEnginePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_MarkovFunctionalPtr[] = {  {&_swigt__p_MarkovFunctionalPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_MarkovFunctional__ModelSettings[] = {  {&_swigt__p_MarkovFunctional__ModelSettings, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Matrix[] = {  {&_swigt__p_Matrix, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_MaxBasketPayoffPtr[] = {  {&_swigt__p_MaxBasketPayoffPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_MersenneTwisterUniformRng[] = {  {&_swigt__p_MersenneTwisterUniformRng, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Merton76ProcessPtr[] = {  {&_swigt__p_Merton76ProcessPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_MidPointCdsEnginePtr[] = {  {&_swigt__p_MidPointCdsEnginePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_MinBasketPayoffPtr[] = {  {&_swigt__p_MinBasketPayoffPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_MirrorGaussianSimulatedAnnealing[] = {  {&_swigt__p_MirrorGaussianSimulatedAnnealing, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Money[] = {  {&_swigt__p_Money, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_MonotonicCubic[] = {  {&_swigt__p_MonotonicCubic, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_MonotonicCubicZeroCurvePtr[] = {  {&_swigt__p_MonotonicCubicZeroCurvePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_MonotonicLogCubic[] = {  {&_swigt__p_MonotonicLogCubic, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_MoroInverseCumulativeNormal[] = {  {&_swigt__p_MoroInverseCumulativeNormal, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_MultiAssetOptionPtr[] = {  {&_swigt__p_MultiAssetOptionPtr, 0, 0, 0},  {&_swigt__p_BasketOptionPtr, _p_BasketOptionPtrTo_p_MultiAssetOptionPtr, 0, 0},  {&_swigt__p_EverestOptionPtr, _p_EverestOptionPtrTo_p_MultiAssetOptionPtr, 0, 0},  {&_swigt__p_HimalayaOptionPtr, _p_HimalayaOptionPtrTo_p_MultiAssetOptionPtr, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_MultiPath[] = {  {&_swigt__p_MultiPath, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_MultiplicativePriceSeasonalityPtr[] = {  {&_swigt__p_MultiplicativePriceSeasonalityPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_NZDLiborPtr[] = {  {&_swigt__p_NZDLiborPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_NelsonSiegelFitting[] = {  {&_swigt__p_NelsonSiegelFitting, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_NeumannBCPtr[] = {  {&_swigt__p_NeumannBCPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_NoConstraint[] = {  {&_swigt__p_NoConstraint, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_NonCentralCumulativeChiSquareDistribution[] = {  {&_swigt__p_NonCentralCumulativeChiSquareDistribution, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_NonhomogeneousBoundaryConstraint[] = {  {&_swigt__p_NonhomogeneousBoundaryConstraint, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_NonstandardSwapPtr[] = {  {&_swigt__p_NonstandardSwapPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_NonstandardSwaptionPtr[] = {  {&_swigt__p_NonstandardSwaptionPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_NormalDistribution[] = {  {&_swigt__p_NormalDistribution, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_NullParameter[] = {  {&_swigt__p_NullParameter, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_NumericHaganPricerPtr[] = {  {&_swigt__p_NumericHaganPricerPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_NzocrPtr[] = {  {&_swigt__p_NzocrPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_OISRateHelperPtr[] = {  {&_swigt__p_OISRateHelperPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Observable[] = {  {&_swigt__p_Observable, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_OptimizationMethod[] = {  {&_swigt__p_LevenbergMarquardt, _p_LevenbergMarquardtTo_p_OptimizationMethod, 0, 0},  {&_swigt__p_DifferentialEvolution, _p_DifferentialEvolutionTo_p_OptimizationMethod, 0, 0},  {&_swigt__p_GaussianSimulatedAnnealing, _p_GaussianSimulatedAnnealingTo_p_OptimizationMethod, 0, 0},  {&_swigt__p_MirrorGaussianSimulatedAnnealing, _p_MirrorGaussianSimulatedAnnealingTo_p_OptimizationMethod, 0, 0},  {&_swigt__p_LogNormalSimulatedAnnealing, _p_LogNormalSimulatedAnnealingTo_p_OptimizationMethod, 0, 0},  {&_swigt__p_OptimizationMethod, 0, 0, 0},  {&_swigt__p_Simplex, _p_SimplexTo_p_OptimizationMethod, 0, 0},  {&_swigt__p_SteepestDescent, _p_SteepestDescentTo_p_OptimizationMethod, 0, 0},  {&_swigt__p_BFGS, _p_BFGSTo_p_OptimizationMethod, 0, 0},  {&_swigt__p_ConjugateGradient, _p_ConjugateGradientTo_p_OptimizationMethod, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Optimizer[] = {  {&_swigt__p_Optimizer, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Option[] = {  {&_swigt__p_Option, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_OptionletStripper1Ptr[] = {  {&_swigt__p_OptionletStripper1Ptr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_OptionletVolatilityStructure[] = {  {&_swigt__p_OptionletVolatilityStructure, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_OvernightIndexPtr[] = {  {&_swigt__p_FedFundsPtr, _p_FedFundsPtrTo_p_OvernightIndexPtr, 0, 0},  {&_swigt__p_AoniaPtr, _p_AoniaPtrTo_p_OvernightIndexPtr, 0, 0},  {&_swigt__p_EoniaPtr, _p_EoniaPtrTo_p_OvernightIndexPtr, 0, 0},  {&_swigt__p_SoniaPtr, _p_SoniaPtrTo_p_OvernightIndexPtr, 0, 0},  {&_swigt__p_OvernightIndexPtr, 0, 0, 0},  {&_swigt__p_NzocrPtr, _p_NzocrPtrTo_p_OvernightIndexPtr, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Parameter[] = {  {&_swigt__p_Parameter, 0, 0, 0},  {&_swigt__p_ConstantParameter, _p_ConstantParameterTo_p_Parameter, 0, 0},  {&_swigt__p_NullParameter, _p_NullParameterTo_p_Parameter, 0, 0},  {&_swigt__p_PiecewiseConstantParameter, _p_PiecewiseConstantParameterTo_p_Parameter, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_ParkinsonSigma[] = {  {&_swigt__p_ParkinsonSigma, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Path[] = {  {&_swigt__p_Path, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Payoff[] = {  {&_swigt__p_Payoff, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_PercentageStrikePayoffPtr[] = {  {&_swigt__p_PercentageStrikePayoffPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Period[] = {  {&_swigt__p_Period, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_PeriodParser[] = {  {&_swigt__p_PeriodParser, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_PiecewiseConstantParameter[] = {  {&_swigt__p_PiecewiseConstantParameter, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_PiecewiseCubicZeroPtr[] = {  {&_swigt__p_PiecewiseCubicZeroPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_PiecewiseFlatForwardPtr[] = {  {&_swigt__p_PiecewiseFlatForwardPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_PiecewiseFlatHazardRatePtr[] = {  {&_swigt__p_PiecewiseFlatHazardRatePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_PiecewiseLinearForwardPtr[] = {  {&_swigt__p_PiecewiseLinearForwardPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_PiecewiseLinearZeroPtr[] = {  {&_swigt__p_PiecewiseLinearZeroPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_PiecewiseLogCubicDiscountPtr[] = {  {&_swigt__p_PiecewiseLogCubicDiscountPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_PiecewiseTimeDependentHestonModelPtr[] = {  {&_swigt__p_PiecewiseTimeDependentHestonModelPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_PiecewiseYoYInflationPtr[] = {  {&_swigt__p_PiecewiseYoYInflationPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_PiecewiseZeroInflationPtr[] = {  {&_swigt__p_PiecewiseZeroInflationPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Pillar[] = {  {&_swigt__p_Pillar, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_PlainVanillaPayoffPtr[] = {  {&_swigt__p_PlainVanillaPayoffPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_PoissonDistribution[] = {  {&_swigt__p_PoissonDistribution, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Position[] = {  {&_swigt__p_Position, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_PositiveConstraint[] = {  {&_swigt__p_PositiveConstraint, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_PricingEngine[] = {  {&_swigt__p_PricingEngine, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_ProbabilityBoltzmannDownhill[] = {  {&_swigt__p_ProbabilityBoltzmannDownhill, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Protection[] = {  {&_swigt__p_Protection, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__ARSCurrency[] = {  {&_swigt__p_QuantLib__ARSCurrency, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__ATSCurrency[] = {  {&_swigt__p_QuantLib__ATSCurrency, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__AUDCurrency[] = {  {&_swigt__p_QuantLib__AUDCurrency, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__Actual360[] = {  {&_swigt__p_QuantLib__Actual360, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__Actual365Fixed[] = {  {&_swigt__p_QuantLib__Actual365Fixed, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__ActualActual[] = {  {&_swigt__p_QuantLib__ActualActual, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__Argentina[] = {  {&_swigt__p_QuantLib__Argentina, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__Australia[] = {  {&_swigt__p_QuantLib__Australia, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__BDTCurrency[] = {  {&_swigt__p_QuantLib__BDTCurrency, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__BEFCurrency[] = {  {&_swigt__p_QuantLib__BEFCurrency, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__BGLCurrency[] = {  {&_swigt__p_QuantLib__BGLCurrency, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__BRLCurrency[] = {  {&_swigt__p_QuantLib__BRLCurrency, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__BYRCurrency[] = {  {&_swigt__p_QuantLib__BYRCurrency, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__BespokeCalendar[] = {  {&_swigt__p_QuantLib__BespokeCalendar, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__Brazil[] = {  {&_swigt__p_QuantLib__Brazil, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__Business252[] = {  {&_swigt__p_QuantLib__Business252, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__CADCurrency[] = {  {&_swigt__p_QuantLib__CADCurrency, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__CHFCurrency[] = {  {&_swigt__p_QuantLib__CHFCurrency, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__CLPCurrency[] = {  {&_swigt__p_QuantLib__CLPCurrency, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__CNYCurrency[] = {  {&_swigt__p_QuantLib__CNYCurrency, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__COPCurrency[] = {  {&_swigt__p_QuantLib__COPCurrency, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__CYPCurrency[] = {  {&_swigt__p_QuantLib__CYPCurrency, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__CZKCurrency[] = {  {&_swigt__p_QuantLib__CZKCurrency, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__Canada[] = {  {&_swigt__p_QuantLib__Canada, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__China[] = {  {&_swigt__p_QuantLib__China, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__CzechRepublic[] = {  {&_swigt__p_QuantLib__CzechRepublic, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__DEMCurrency[] = {  {&_swigt__p_QuantLib__DEMCurrency, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__DKKCurrency[] = {  {&_swigt__p_QuantLib__DKKCurrency, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__Denmark[] = {  {&_swigt__p_QuantLib__Denmark, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__EEKCurrency[] = {  {&_swigt__p_QuantLib__EEKCurrency, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__ESPCurrency[] = {  {&_swigt__p_QuantLib__ESPCurrency, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__EURCurrency[] = {  {&_swigt__p_QuantLib__EURCurrency, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__FIMCurrency[] = {  {&_swigt__p_QuantLib__FIMCurrency, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__FRFCurrency[] = {  {&_swigt__p_QuantLib__FRFCurrency, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__Finland[] = {  {&_swigt__p_QuantLib__Finland, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__GBPCurrency[] = {  {&_swigt__p_QuantLib__GBPCurrency, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__GRDCurrency[] = {  {&_swigt__p_QuantLib__GRDCurrency, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__Germany[] = {  {&_swigt__p_QuantLib__Germany, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__HKDCurrency[] = {  {&_swigt__p_QuantLib__HKDCurrency, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__HUFCurrency[] = {  {&_swigt__p_QuantLib__HUFCurrency, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__HongKong[] = {  {&_swigt__p_QuantLib__HongKong, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__Hungary[] = {  {&_swigt__p_QuantLib__Hungary, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__IDRCurrency[] = {  {&_swigt__p_QuantLib__IDRCurrency, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__IEPCurrency[] = {  {&_swigt__p_QuantLib__IEPCurrency, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__ILSCurrency[] = {  {&_swigt__p_QuantLib__ILSCurrency, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__INRCurrency[] = {  {&_swigt__p_QuantLib__INRCurrency, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__IQDCurrency[] = {  {&_swigt__p_QuantLib__IQDCurrency, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__IRRCurrency[] = {  {&_swigt__p_QuantLib__IRRCurrency, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__ISKCurrency[] = {  {&_swigt__p_QuantLib__ISKCurrency, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__ITLCurrency[] = {  {&_swigt__p_QuantLib__ITLCurrency, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__Iceland[] = {  {&_swigt__p_QuantLib__Iceland, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__India[] = {  {&_swigt__p_QuantLib__India, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__Indonesia[] = {  {&_swigt__p_QuantLib__Indonesia, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__Israel[] = {  {&_swigt__p_QuantLib__Israel, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__Italy[] = {  {&_swigt__p_QuantLib__Italy, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__JPYCurrency[] = {  {&_swigt__p_QuantLib__JPYCurrency, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__Japan[] = {  {&_swigt__p_QuantLib__Japan, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__JointCalendar[] = {  {&_swigt__p_QuantLib__JointCalendar, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__KRWCurrency[] = {  {&_swigt__p_QuantLib__KRWCurrency, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__KWDCurrency[] = {  {&_swigt__p_QuantLib__KWDCurrency, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__LTLCurrency[] = {  {&_swigt__p_QuantLib__LTLCurrency, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__LUFCurrency[] = {  {&_swigt__p_QuantLib__LUFCurrency, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__LVLCurrency[] = {  {&_swigt__p_QuantLib__LVLCurrency, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__MTLCurrency[] = {  {&_swigt__p_QuantLib__MTLCurrency, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__MXNCurrency[] = {  {&_swigt__p_QuantLib__MXNCurrency, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__MYRCurrency[] = {  {&_swigt__p_QuantLib__MYRCurrency, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__Mexico[] = {  {&_swigt__p_QuantLib__Mexico, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__NLGCurrency[] = {  {&_swigt__p_QuantLib__NLGCurrency, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__NOKCurrency[] = {  {&_swigt__p_QuantLib__NOKCurrency, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__NPRCurrency[] = {  {&_swigt__p_QuantLib__NPRCurrency, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__NZDCurrency[] = {  {&_swigt__p_QuantLib__NZDCurrency, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__NewZealand[] = {  {&_swigt__p_QuantLib__NewZealand, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__Norway[] = {  {&_swigt__p_QuantLib__Norway, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__NullCalendar[] = {  {&_swigt__p_QuantLib__NullCalendar, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__OneDayCounter[] = {  {&_swigt__p_QuantLib__OneDayCounter, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__PEHCurrency[] = {  {&_swigt__p_QuantLib__PEHCurrency, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__PEICurrency[] = {  {&_swigt__p_QuantLib__PEICurrency, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__PENCurrency[] = {  {&_swigt__p_QuantLib__PENCurrency, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__PKRCurrency[] = {  {&_swigt__p_QuantLib__PKRCurrency, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__PLNCurrency[] = {  {&_swigt__p_QuantLib__PLNCurrency, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__PTECurrency[] = {  {&_swigt__p_QuantLib__PTECurrency, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__Poland[] = {  {&_swigt__p_QuantLib__Poland, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__ROLCurrency[] = {  {&_swigt__p_QuantLib__ROLCurrency, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__RONCurrency[] = {  {&_swigt__p_QuantLib__RONCurrency, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__RUBCurrency[] = {  {&_swigt__p_QuantLib__RUBCurrency, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__Romania[] = {  {&_swigt__p_QuantLib__Romania, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__Russia[] = {  {&_swigt__p_QuantLib__Russia, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__SARCurrency[] = {  {&_swigt__p_QuantLib__SARCurrency, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__SEKCurrency[] = {  {&_swigt__p_QuantLib__SEKCurrency, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__SGDCurrency[] = {  {&_swigt__p_QuantLib__SGDCurrency, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__SITCurrency[] = {  {&_swigt__p_QuantLib__SITCurrency, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__SKKCurrency[] = {  {&_swigt__p_QuantLib__SKKCurrency, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__SaudiArabia[] = {  {&_swigt__p_QuantLib__SaudiArabia, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__SimpleDayCounter[] = {  {&_swigt__p_QuantLib__SimpleDayCounter, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__Singapore[] = {  {&_swigt__p_QuantLib__Singapore, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__Slovakia[] = {  {&_swigt__p_QuantLib__Slovakia, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__SouthAfrica[] = {  {&_swigt__p_QuantLib__SouthAfrica, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__SouthKorea[] = {  {&_swigt__p_QuantLib__SouthKorea, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__Sweden[] = {  {&_swigt__p_QuantLib__Sweden, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__Switzerland[] = {  {&_swigt__p_QuantLib__Switzerland, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__TARGET[] = {  {&_swigt__p_QuantLib__TARGET, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__THBCurrency[] = {  {&_swigt__p_QuantLib__THBCurrency, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__TRLCurrency[] = {  {&_swigt__p_QuantLib__TRLCurrency, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__TRYCurrency[] = {  {&_swigt__p_QuantLib__TRYCurrency, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__TTDCurrency[] = {  {&_swigt__p_QuantLib__TTDCurrency, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__TWDCurrency[] = {  {&_swigt__p_QuantLib__TWDCurrency, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__Taiwan[] = {  {&_swigt__p_QuantLib__Taiwan, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__Thirty360[] = {  {&_swigt__p_QuantLib__Thirty360, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__Turkey[] = {  {&_swigt__p_QuantLib__Turkey, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__USDCurrency[] = {  {&_swigt__p_QuantLib__USDCurrency, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__Ukraine[] = {  {&_swigt__p_QuantLib__Ukraine, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__UnitedKingdom[] = {  {&_swigt__p_QuantLib__UnitedKingdom, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__UnitedStates[] = {  {&_swigt__p_QuantLib__UnitedStates, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__VEBCurrency[] = {  {&_swigt__p_QuantLib__VEBCurrency, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__VNDCurrency[] = {  {&_swigt__p_QuantLib__VNDCurrency, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__WeekendsOnly[] = {  {&_swigt__p_QuantLib__WeekendsOnly, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantLib__ZARCurrency[] = {  {&_swigt__p_QuantLib__ZARCurrency, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantoDoubleBarrierOptionPtr[] = {  {&_swigt__p_QuantoDoubleBarrierOptionPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantoEuropeanEnginePtr[] = {  {&_swigt__p_QuantoEuropeanEnginePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantoForwardEuropeanEnginePtr[] = {  {&_swigt__p_QuantoForwardEuropeanEnginePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantoForwardVanillaOptionPtr[] = {  {&_swigt__p_QuantoForwardVanillaOptionPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_QuantoVanillaOptionPtr[] = {  {&_swigt__p_QuantoVanillaOptionPtr, 0, 0, 0},  {&_swigt__p_QuantoForwardVanillaOptionPtr, _p_QuantoForwardVanillaOptionPtrTo_p_QuantoVanillaOptionPtr, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Quote[] = {  {&_swigt__p_Quote, 0, 0, 0},  {&_swigt__p_DeltaVolQuote, _p_DeltaVolQuoteTo_p_Quote, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_RandomSequenceGeneratorT_KnuthUniformRng_t[] = {  {&_swigt__p_RandomSequenceGeneratorT_KnuthUniformRng_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_RandomSequenceGeneratorT_LecuyerUniformRng_t[] = {  {&_swigt__p_RandomSequenceGeneratorT_LecuyerUniformRng_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_RandomSequenceGeneratorT_MersenneTwisterUniformRng_t[] = {  {&_swigt__p_RandomSequenceGeneratorT_MersenneTwisterUniformRng_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_RateHelper[] = {  {&_swigt__p_RateHelper, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_RealTimeSeries[] = {  {&_swigt__p_RealTimeSeries, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_ReannealingTrivial[] = {  {&_swigt__p_ReannealingTrivial, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_RebatedExercisePtr[] = {  {&_swigt__p_RebatedExercisePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_RedemptionPtr[] = {  {&_swigt__p_RedemptionPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Region[] = {  {&_swigt__p_Region, 0, 0, 0},  {&_swigt__p_CustomRegion, _p_CustomRegionTo_p_Region, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_RelinkableHandleT_BlackVolTermStructure_t[] = {  {&_swigt__p_RelinkableHandleT_BlackVolTermStructure_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_RelinkableHandleT_CalibratedModel_t[] = {  {&_swigt__p_RelinkableHandleT_CalibratedModel_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_RelinkableHandleT_CapFloorTermVolatilityStructure_t[] = {  {&_swigt__p_RelinkableHandleT_CapFloorTermVolatilityStructure_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_RelinkableHandleT_DefaultProbabilityTermStructure_t[] = {  {&_swigt__p_RelinkableHandleT_DefaultProbabilityTermStructure_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_RelinkableHandleT_DeltaVolQuote_t[] = {  {&_swigt__p_RelinkableHandleT_DeltaVolQuote_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_RelinkableHandleT_LocalVolTermStructure_t[] = {  {&_swigt__p_RelinkableHandleT_LocalVolTermStructure_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_RelinkableHandleT_OptionletVolatilityStructure_t[] = {  {&_swigt__p_RelinkableHandleT_OptionletVolatilityStructure_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_RelinkableHandleT_Quote_t[] = {  {&_swigt__p_RelinkableHandleT_Quote_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_RelinkableHandleT_ShortRateModel_t[] = {  {&_swigt__p_RelinkableHandleT_ShortRateModel_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_RelinkableHandleT_SwaptionVolatilityStructure_t[] = {  {&_swigt__p_RelinkableHandleT_SwaptionVolatilityStructure_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_RelinkableHandleT_YieldTermStructure_t[] = {  {&_swigt__p_RelinkableHandleT_YieldTermStructure_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_RelinkableHandleT_YoYInflationTermStructure_t[] = {  {&_swigt__p_RelinkableHandleT_YoYInflationTermStructure_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_RelinkableHandleT_ZeroInflationTermStructure_t[] = {  {&_swigt__p_RelinkableHandleT_ZeroInflationTermStructure_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Ridder[] = {  {&_swigt__p_Ridder, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_RiskStatistics[] = {  {&_swigt__p_RiskStatistics, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Rounding[] = {  {&_swigt__p_CeilingTruncation, _p_CeilingTruncationTo_p_Rounding, 0, 0},  {&_swigt__p_FloorTruncation, _p_FloorTruncationTo_p_Rounding, 0, 0},  {&_swigt__p_Rounding, 0, 0, 0},  {&_swigt__p_UpRounding, _p_UpRoundingTo_p_Rounding, 0, 0},  {&_swigt__p_DownRounding, _p_DownRoundingTo_p_Rounding, 0, 0},  {&_swigt__p_ClosestRounding, _p_ClosestRoundingTo_p_Rounding, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_SEKLiborPtr[] = {  {&_swigt__p_SEKLiborPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_SVD[] = {  {&_swigt__p_SVD, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_SafeBackwardFlatInterpolation[] = {  {&_swigt__p_SafeBackwardFlatInterpolation, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_SafeBicubicSpline[] = {  {&_swigt__p_SafeBicubicSpline, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_SafeBilinearInterpolation[] = {  {&_swigt__p_SafeBilinearInterpolation, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_SafeCubicNaturalSpline[] = {  {&_swigt__p_SafeCubicNaturalSpline, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_SafeForwardFlatInterpolation[] = {  {&_swigt__p_SafeForwardFlatInterpolation, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_SafeFritschButlandCubic[] = {  {&_swigt__p_SafeFritschButlandCubic, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_SafeFritschButlandLogCubic[] = {  {&_swigt__p_SafeFritschButlandLogCubic, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_SafeKrugerCubic[] = {  {&_swigt__p_SafeKrugerCubic, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_SafeKrugerLogCubic[] = {  {&_swigt__p_SafeKrugerLogCubic, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_SafeLinearInterpolation[] = {  {&_swigt__p_SafeLinearInterpolation, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_SafeLogCubicNaturalSpline[] = {  {&_swigt__p_SafeLogCubicNaturalSpline, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_SafeLogLinearInterpolation[] = {  {&_swigt__p_SafeLogLinearInterpolation, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_SafeLogParabolic[] = {  {&_swigt__p_SafeLogParabolic, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_SafeMonotonicCubicNaturalSpline[] = {  {&_swigt__p_SafeMonotonicCubicNaturalSpline, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_SafeMonotonicLogCubicNaturalSpline[] = {  {&_swigt__p_SafeMonotonicLogCubicNaturalSpline, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_SafeMonotonicLogParabolic[] = {  {&_swigt__p_SafeMonotonicLogParabolic, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_SafeMonotonicParabolic[] = {  {&_swigt__p_SafeMonotonicParabolic, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_SafeParabolic[] = {  {&_swigt__p_SafeParabolic, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_SalvagingAlgorithm[] = {  {&_swigt__p_SalvagingAlgorithm, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_SampleT_Array_t[] = {  {&_swigt__p_SampleT_Array_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_SampleT_MultiPath_t[] = {  {&_swigt__p_SampleT_MultiPath_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_SampleT_Path_t[] = {  {&_swigt__p_SampleT_Path_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_SampleT_double_t[] = {  {&_swigt__p_SampleT_double_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_SampleT_std__vectorT_double_t_t[] = {  {&_swigt__p_SampleT_std__vectorT_double_t_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_SampledCurve[] = {  {&_swigt__p_SampledCurve, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_SamplerGaussian[] = {  {&_swigt__p_SamplerGaussian, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_SamplerLogNormal[] = {  {&_swigt__p_SamplerLogNormal, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_SamplerMirrorGaussian[] = {  {&_swigt__p_SamplerMirrorGaussian, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Schedule[] = {  {&_swigt__p_Schedule, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Seasonality[] = {  {&_swigt__p_Seasonality, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Secant[] = {  {&_swigt__p_Secant, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_SegmentIntegral[] = {  {&_swigt__p_SegmentIntegral, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Settings[] = {  {&_swigt__p_Settings, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Settlement[] = {  {&_swigt__p_Settlement, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_ShortRateModel[] = {  {&_swigt__p_ShortRateModel, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_SimpleCashFlowPtr[] = {  {&_swigt__p_SimpleCashFlowPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_SimplePolynomialFitting[] = {  {&_swigt__p_SimplePolynomialFitting, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_SimpleQuotePtr[] = {  {&_swigt__p_SimpleQuotePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Simplex[] = {  {&_swigt__p_Simplex, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_SimpsonIntegral[] = {  {&_swigt__p_SimpsonIntegral, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_SobolBrownianBridgeRsg[] = {  {&_swigt__p_SobolBrownianBridgeRsg, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_SobolRsg[] = {  {&_swigt__p_SobolRsg, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_SoftCallabilityPtr[] = {  {&_swigt__p_SoftCallabilityPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_SoniaPtr[] = {  {&_swigt__p_SoniaPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_SpreadCdsHelperPtr[] = {  {&_swigt__p_SpreadCdsHelperPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_SpreadedLinearZeroInterpolatedTermStructurePtr[] = {  {&_swigt__p_SpreadedLinearZeroInterpolatedTermStructurePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Statistics[] = {  {&_swigt__p_Statistics, 0, 0, 0},  {&_swigt__p_RiskStatistics, _p_RiskStatisticsTo_p_Statistics, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_SteepestDescent[] = {  {&_swigt__p_SteepestDescent, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_StochasticProcess[] = {  {&_swigt__p_StochasticProcess, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_StochasticProcess1DPtr[] = {  {&_swigt__p_GeneralizedBlackScholesProcessPtr, _p_GeneralizedBlackScholesProcessPtrTo_p_StochasticProcess1DPtr, 0, 0},  {&_swigt__p_BlackScholesProcessPtr, _p_BlackScholesProcessPtrTo_p_StochasticProcess1DPtr, 0, 0},  {&_swigt__p_BlackScholesMertonProcessPtr, _p_BlackScholesMertonProcessPtrTo_p_StochasticProcess1DPtr, 0, 0},  {&_swigt__p_BlackProcessPtr, _p_BlackProcessPtrTo_p_StochasticProcess1DPtr, 0, 0},  {&_swigt__p_GarmanKohlagenProcessPtr, _p_GarmanKohlagenProcessPtrTo_p_StochasticProcess1DPtr, 0, 0},  {&_swigt__p_Merton76ProcessPtr, _p_Merton76ProcessPtrTo_p_StochasticProcess1DPtr, 0, 0},  {&_swigt__p_GeometricBrownianMotionProcessPtr, _p_GeometricBrownianMotionProcessPtrTo_p_StochasticProcess1DPtr, 0, 0},  {&_swigt__p_VarianceGammaProcessPtr, _p_VarianceGammaProcessPtrTo_p_StochasticProcess1DPtr, 0, 0},  {&_swigt__p_HullWhiteProcessPtr, _p_HullWhiteProcessPtrTo_p_StochasticProcess1DPtr, 0, 0},  {&_swigt__p_HullWhiteForwardProcessPtr, _p_HullWhiteForwardProcessPtrTo_p_StochasticProcess1DPtr, 0, 0},  {&_swigt__p_GsrProcessPtr, _p_GsrProcessPtrTo_p_StochasticProcess1DPtr, 0, 0},  {&_swigt__p_StochasticProcess1DPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_StochasticProcessArrayPtr[] = {  {&_swigt__p_StochasticProcessArrayPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_StockPtr[] = {  {&_swigt__p_StockPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_StrippedOptionletAdapterPtr[] = {  {&_swigt__p_StrippedOptionletAdapterPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_StrippedOptionletBase[] = {  {&_swigt__p_StrippedOptionletBase, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_StudentDistribution[] = {  {&_swigt__p_StudentDistribution, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_StulzEnginePtr[] = {  {&_swigt__p_StulzEnginePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_SuperSharePayoffPtr[] = {  {&_swigt__p_SuperSharePayoffPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_SvenssonFitting[] = {  {&_swigt__p_SvenssonFitting, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_SwapIndexPtr[] = {  {&_swigt__p_EuriborSwapIsdaFixAPtr, _p_EuriborSwapIsdaFixAPtrTo_p_SwapIndexPtr, 0, 0},  {&_swigt__p_EurLiborSwapIsdaFixAPtr, _p_EurLiborSwapIsdaFixAPtrTo_p_SwapIndexPtr, 0, 0},  {&_swigt__p_EuriborSwapIsdaFixBPtr, _p_EuriborSwapIsdaFixBPtrTo_p_SwapIndexPtr, 0, 0},  {&_swigt__p_EurLiborSwapIsdaFixBPtr, _p_EurLiborSwapIsdaFixBPtrTo_p_SwapIndexPtr, 0, 0},  {&_swigt__p_EuriborSwapIfrFixPtr, _p_EuriborSwapIfrFixPtrTo_p_SwapIndexPtr, 0, 0},  {&_swigt__p_EurLiborSwapIfrFixPtr, _p_EurLiborSwapIfrFixPtrTo_p_SwapIndexPtr, 0, 0},  {&_swigt__p_SwapIndexPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_SwapPtr[] = {  {&_swigt__p_SwapPtr, 0, 0, 0},  {&_swigt__p_VanillaSwapPtr, _p_VanillaSwapPtrTo_p_SwapPtr, 0, 0},  {&_swigt__p_NonstandardSwapPtr, _p_NonstandardSwapPtrTo_p_SwapPtr, 0, 0},  {&_swigt__p_AssetSwapPtr, _p_AssetSwapPtrTo_p_SwapPtr, 0, 0},  {&_swigt__p_FloatFloatSwapPtr, _p_FloatFloatSwapPtrTo_p_SwapPtr, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_SwapRateHelperPtr[] = {  {&_swigt__p_SwapRateHelperPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_SwaptionHelperPtr[] = {  {&_swigt__p_SwaptionHelperPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_SwaptionPtr[] = {  {&_swigt__p_SwaptionPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_SwaptionVolCube1Ptr[] = {  {&_swigt__p_SwaptionVolCube1Ptr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_SwaptionVolCube2Ptr[] = {  {&_swigt__p_SwaptionVolCube2Ptr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_SwaptionVolatilityMatrixPtr[] = {  {&_swigt__p_SwaptionVolatilityMatrixPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_SwaptionVolatilityStructure[] = {  {&_swigt__p_SwaptionVolatilityStructure, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_TRLiborPtr[] = {  {&_swigt__p_TRLiborPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_TemperatureExponential[] = {  {&_swigt__p_TemperatureExponential, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_TiborPtr[] = {  {&_swigt__p_TiborPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_TimeBasket[] = {  {&_swigt__p_TimeBasket, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_TimeGrid[] = {  {&_swigt__p_TimeGrid, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_TimeSeriesT_IntervalPrice_std__mapT_Date_IntervalPrice_t_t[] = {  {&_swigt__p_TimeSeriesT_IntervalPrice_std__mapT_Date_IntervalPrice_t_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_TimeSeriesT_double_std__mapT_Date_double_t_t[] = {  {&_swigt__p_TimeSeriesT_double_std__mapT_Date_double_t_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_TrapezoidIntegralT_Default_t[] = {  {&_swigt__p_TrapezoidIntegralT_Default_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_TrapezoidIntegralT_MidPoint_t[] = {  {&_swigt__p_TrapezoidIntegralT_MidPoint_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_TreeCallableFixedRateBondEnginePtr[] = {  {&_swigt__p_TreeCallableFixedRateBondEnginePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_TreeCapFloorEnginePtr[] = {  {&_swigt__p_TreeCapFloorEnginePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_TreeSwaptionEnginePtr[] = {  {&_swigt__p_TreeSwaptionEnginePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_TridiagonalOperator[] = {  {&_swigt__p_DPlusDMinus, _p_DPlusDMinusTo_p_TridiagonalOperator, 0, 0},  {&_swigt__p_DMinus, _p_DMinusTo_p_TridiagonalOperator, 0, 0},  {&_swigt__p_DPlus, _p_DPlusTo_p_TridiagonalOperator, 0, 0},  {&_swigt__p_TridiagonalOperator, 0, 0, 0},  {&_swigt__p_DZero, _p_DZeroTo_p_TridiagonalOperator, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_UKRPIPtr[] = {  {&_swigt__p_UKRPIPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_USCPIPtr[] = {  {&_swigt__p_USCPIPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_USDLiborPtr[] = {  {&_swigt__p_USDLiborPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_UniformLowDiscrepancySequenceGenerator[] = {  {&_swigt__p_UniformLowDiscrepancySequenceGenerator, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_UniformRandomGenerator[] = {  {&_swigt__p_UniformRandomGenerator, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_UniformRandomSequenceGenerator[] = {  {&_swigt__p_UniformRandomSequenceGenerator, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_UpRounding[] = {  {&_swigt__p_UpRounding, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_UpfrontCdsHelperPtr[] = {  {&_swigt__p_UpfrontCdsHelperPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_VanillaOptionPtr[] = {  {&_swigt__p_VanillaOptionPtr, 0, 0, 0},  {&_swigt__p_EuropeanOptionPtr, _p_EuropeanOptionPtrTo_p_VanillaOptionPtr, 0, 0},  {&_swigt__p_ForwardVanillaOptionPtr, _p_ForwardVanillaOptionPtrTo_p_VanillaOptionPtr, 0, 0},  {&_swigt__p_QuantoVanillaOptionPtr, _p_QuantoVanillaOptionPtrTo_p_VanillaOptionPtr, 0, 0},  {&_swigt__p_QuantoForwardVanillaOptionPtr, _p_QuantoForwardVanillaOptionPtrTo_p_VanillaOptionPtr, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_VanillaSwapPtr[] = {  {&_swigt__p_VanillaSwapPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_VannaVolgaDoubleBarrierEnginePtr[] = {  {&_swigt__p_VannaVolgaDoubleBarrierEnginePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_VarianceGammaEnginePtr[] = {  {&_swigt__p_VarianceGammaEnginePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_VarianceGammaProcessPtr[] = {  {&_swigt__p_VarianceGammaProcessPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_VasicekPtr[] = {  {&_swigt__p_VasicekPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_WulinYongDoubleBarrierEnginePtr[] = {  {&_swigt__p_WulinYongDoubleBarrierEnginePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_YYEUHICPPtr[] = {  {&_swigt__p_YYEUHICPPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_YYEUHICPXTPtr[] = {  {&_swigt__p_YYEUHICPXTPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_YYFRHICPPtr[] = {  {&_swigt__p_YYFRHICPPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_YYUKRPIPtr[] = {  {&_swigt__p_YYUKRPIPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_YYUSCPIPtr[] = {  {&_swigt__p_YYUSCPIPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_YYZACPIPtr[] = {  {&_swigt__p_YYZACPIPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_YearOnYearInflationSwapHelperPtr[] = {  {&_swigt__p_YearOnYearInflationSwapHelperPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_YearOnYearInflationSwapPtr[] = {  {&_swigt__p_YearOnYearInflationSwapPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_YieldTermStructure[] = {  {&_swigt__p_YieldTermStructure, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_YoYHelper[] = {  {&_swigt__p_YoYHelper, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_YoYInflationCapFloorPtr[] = {  {&_swigt__p_YoYInflationCapFloorPtr, 0, 0, 0},  {&_swigt__p_YoYInflationFloorPtr, _p_YoYInflationFloorPtrTo_p_YoYInflationCapFloorPtr, 0, 0},  {&_swigt__p_YoYInflationCapPtr, _p_YoYInflationCapPtrTo_p_YoYInflationCapFloorPtr, 0, 0},  {&_swigt__p_YoYInflationCollarPtr, _p_YoYInflationCollarPtrTo_p_YoYInflationCapFloorPtr, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_YoYInflationCapPtr[] = {  {&_swigt__p_YoYInflationCapPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_YoYInflationCollarPtr[] = {  {&_swigt__p_YoYInflationCollarPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_YoYInflationFloorPtr[] = {  {&_swigt__p_YoYInflationFloorPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_YoYInflationIndexPtr[] = {  {&_swigt__p_YYEUHICPXTPtr, _p_YYEUHICPXTPtrTo_p_YoYInflationIndexPtr, 0, 0},  {&_swigt__p_YoYInflationIndexPtr, 0, 0, 0},  {&_swigt__p_YYUSCPIPtr, _p_YYUSCPIPtrTo_p_YoYInflationIndexPtr, 0, 0},  {&_swigt__p_YYZACPIPtr, _p_YYZACPIPtrTo_p_YoYInflationIndexPtr, 0, 0},  {&_swigt__p_YYEUHICPPtr, _p_YYEUHICPPtrTo_p_YoYInflationIndexPtr, 0, 0},  {&_swigt__p_YYFRHICPPtr, _p_YYFRHICPPtrTo_p_YoYInflationIndexPtr, 0, 0},  {&_swigt__p_YYUKRPIPtr, _p_YYUKRPIPtrTo_p_YoYInflationIndexPtr, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_YoYInflationTermStructure[] = {  {&_swigt__p_YoYInflationTermStructure, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_ZACPIPtr[] = {  {&_swigt__p_ZACPIPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_ZeroCouponBondPtr[] = {  {&_swigt__p_ZeroCouponBondPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_ZeroCouponInflationSwapHelperPtr[] = {  {&_swigt__p_ZeroCouponInflationSwapHelperPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_ZeroCouponInflationSwapPtr[] = {  {&_swigt__p_ZeroCouponInflationSwapPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_ZeroCurvePtr[] = {  {&_swigt__p_ZeroCurvePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_ZeroHelper[] = {  {&_swigt__p_ZeroHelper, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_ZeroInflationIndexPtr[] = {  {&_swigt__p_EUHICPXTPtr, _p_EUHICPXTPtrTo_p_ZeroInflationIndexPtr, 0, 0},  {&_swigt__p_ZeroInflationIndexPtr, 0, 0, 0},  {&_swigt__p_USCPIPtr, _p_USCPIPtrTo_p_ZeroInflationIndexPtr, 0, 0},  {&_swigt__p_ZACPIPtr, _p_ZACPIPtrTo_p_ZeroInflationIndexPtr, 0, 0},  {&_swigt__p_EUHICPPtr, _p_EUHICPPtrTo_p_ZeroInflationIndexPtr, 0, 0},  {&_swigt__p_FRHICPPtr, _p_FRHICPPtrTo_p_ZeroInflationIndexPtr, 0, 0},  {&_swigt__p_UKRPIPtr, _p_UKRPIPtrTo_p_ZeroInflationIndexPtr, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_ZeroInflationTermStructure[] = {  {&_swigt__p_ZeroInflationTermStructure, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_ZeroSpreadedTermStructurePtr[] = {  {&_swigt__p_ZeroSpreadedTermStructurePtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_ZeroYield[] = {  {&_swigt__p_ZeroYield, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_ZiborPtr[] = {  {&_swigt__p_ZiborPtr, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_boost__shared_ptrT_BlackVolTermStructure_t[] = {  {&_swigt__p_BlackVarianceCurvePtr, _p_BlackVarianceCurvePtrTo_p_boost__shared_ptrT_BlackVolTermStructure_t, 0, 0},  {&_swigt__p_boost__shared_ptrT_BlackVolTermStructure_t, 0, 0, 0},  {&_swigt__p_BlackConstantVolPtr, _p_BlackConstantVolPtrTo_p_boost__shared_ptrT_BlackVolTermStructure_t, 0, 0},  {&_swigt__p_BlackVarianceSurfacePtr, _p_BlackVarianceSurfacePtrTo_p_boost__shared_ptrT_BlackVolTermStructure_t, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_boost__shared_ptrT_CalibratedModel_t[] = {  {&_swigt__p_boost__shared_ptrT_CalibratedModel_t, 0, 0, 0},  {&_swigt__p_HestonModelPtr, _p_HestonModelPtrTo_p_boost__shared_ptrT_CalibratedModel_t, 0, 0},  {&_swigt__p_BatesModelPtr, _p_BatesModelPtrTo_p_boost__shared_ptrT_CalibratedModel_t, 0, 0},  {&_swigt__p_PiecewiseTimeDependentHestonModelPtr, _p_PiecewiseTimeDependentHestonModelPtrTo_p_boost__shared_ptrT_CalibratedModel_t, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_boost__shared_ptrT_CalibrationHelper_t[] = {  {&_swigt__p_SwaptionHelperPtr, _p_SwaptionHelperPtrTo_p_boost__shared_ptrT_CalibrationHelper_t, 0, 0},  {&_swigt__p_CapHelperPtr, _p_CapHelperPtrTo_p_boost__shared_ptrT_CalibrationHelper_t, 0, 0},  {&_swigt__p_HestonModelHelperPtr, _p_HestonModelHelperPtrTo_p_boost__shared_ptrT_CalibrationHelper_t, 0, 0},  {&_swigt__p_boost__shared_ptrT_CalibrationHelper_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_boost__shared_ptrT_Callability_t[] = {  {&_swigt__p_boost__shared_ptrT_Callability_t, 0, 0, 0},  {&_swigt__p_SoftCallabilityPtr, _p_SoftCallabilityPtrTo_p_boost__shared_ptrT_Callability_t, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_boost__shared_ptrT_CapFloorTermVolatilityStructure_t[] = {  {&_swigt__p_CapFloorTermVolCurvePtr, _p_CapFloorTermVolCurvePtrTo_p_boost__shared_ptrT_CapFloorTermVolatilityStructure_t, 0, 0},  {&_swigt__p_boost__shared_ptrT_CapFloorTermVolatilityStructure_t, 0, 0, 0},  {&_swigt__p_CapFloorTermVolSurfacePtr, _p_CapFloorTermVolSurfacePtrTo_p_boost__shared_ptrT_CapFloorTermVolatilityStructure_t, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_boost__shared_ptrT_CashFlow_t[] = {  {&_swigt__p_boost__shared_ptrT_CashFlow_t, 0, 0, 0},  {&_swigt__p_CouponPtr, _p_CouponPtrTo_p_boost__shared_ptrT_CashFlow_t, 0, 0},  {&_swigt__p_FixedRateCouponPtr, _p_FixedRateCouponPtrTo_p_boost__shared_ptrT_CashFlow_t, 0, 0},  {&_swigt__p_FloatingRateCouponPtr, _p_FloatingRateCouponPtrTo_p_boost__shared_ptrT_CashFlow_t, 0, 0},  {&_swigt__p_CappedFlooredCouponPtr, _p_CappedFlooredCouponPtrTo_p_boost__shared_ptrT_CashFlow_t, 0, 0},  {&_swigt__p_CappedFlooredCmsCouponPtr, _p_CappedFlooredCmsCouponPtrTo_p_boost__shared_ptrT_CashFlow_t, 0, 0},  {&_swigt__p_IborCouponPtr, _p_IborCouponPtrTo_p_boost__shared_ptrT_CashFlow_t, 0, 0},  {&_swigt__p_CmsCouponPtr, _p_CmsCouponPtrTo_p_boost__shared_ptrT_CashFlow_t, 0, 0},  {&_swigt__p_RedemptionPtr, _p_RedemptionPtrTo_p_boost__shared_ptrT_CashFlow_t, 0, 0},  {&_swigt__p_AmortizingPaymentPtr, _p_AmortizingPaymentPtrTo_p_boost__shared_ptrT_CashFlow_t, 0, 0},  {&_swigt__p_SimpleCashFlowPtr, _p_SimpleCashFlowPtrTo_p_boost__shared_ptrT_CashFlow_t, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_boost__shared_ptrT_DefaultBoundaryCondition_t[] = {  {&_swigt__p_DirichletBCPtr, _p_DirichletBCPtrTo_p_boost__shared_ptrT_DefaultBoundaryCondition_t, 0, 0},  {&_swigt__p_boost__shared_ptrT_DefaultBoundaryCondition_t, 0, 0, 0},  {&_swigt__p_NeumannBCPtr, _p_NeumannBCPtrTo_p_boost__shared_ptrT_DefaultBoundaryCondition_t, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_boost__shared_ptrT_DefaultProbabilityHelper_t[] = {  {&_swigt__p_SpreadCdsHelperPtr, _p_SpreadCdsHelperPtrTo_p_boost__shared_ptrT_DefaultProbabilityHelper_t, 0, 0},  {&_swigt__p_UpfrontCdsHelperPtr, _p_UpfrontCdsHelperPtrTo_p_boost__shared_ptrT_DefaultProbabilityHelper_t, 0, 0},  {&_swigt__p_boost__shared_ptrT_DefaultProbabilityHelper_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_boost__shared_ptrT_DefaultProbabilityTermStructure_t[] = {  {&_swigt__p_HazardRateCurvePtr, _p_HazardRateCurvePtrTo_p_boost__shared_ptrT_DefaultProbabilityTermStructure_t, 0, 0},  {&_swigt__p_DefaultDensityCurvePtr, _p_DefaultDensityCurvePtrTo_p_boost__shared_ptrT_DefaultProbabilityTermStructure_t, 0, 0},  {&_swigt__p_FlatHazardRatePtr, _p_FlatHazardRatePtrTo_p_boost__shared_ptrT_DefaultProbabilityTermStructure_t, 0, 0},  {&_swigt__p_PiecewiseFlatHazardRatePtr, _p_PiecewiseFlatHazardRatePtrTo_p_boost__shared_ptrT_DefaultProbabilityTermStructure_t, 0, 0},  {&_swigt__p_boost__shared_ptrT_DefaultProbabilityTermStructure_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_boost__shared_ptrT_DeltaVolQuote_t[] = {  {&_swigt__p_boost__shared_ptrT_DeltaVolQuote_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_boost__shared_ptrT_Dividend_t[] = {  {&_swigt__p_boost__shared_ptrT_Dividend_t, 0, 0, 0},  {&_swigt__p_FixedDividendPtr, _p_FixedDividendPtrTo_p_boost__shared_ptrT_Dividend_t, 0, 0},  {&_swigt__p_FractionalDividendPtr, _p_FractionalDividendPtrTo_p_boost__shared_ptrT_Dividend_t, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_boost__shared_ptrT_EndCriteria_t[] = {  {&_swigt__p_boost__shared_ptrT_EndCriteria_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_boost__shared_ptrT_Exercise_t[] = {  {&_swigt__p_boost__shared_ptrT_Exercise_t, 0, 0, 0},  {&_swigt__p_EuropeanExercisePtr, _p_EuropeanExercisePtrTo_p_boost__shared_ptrT_Exercise_t, 0, 0},  {&_swigt__p_AmericanExercisePtr, _p_AmericanExercisePtrTo_p_boost__shared_ptrT_Exercise_t, 0, 0},  {&_swigt__p_BermudanExercisePtr, _p_BermudanExercisePtrTo_p_boost__shared_ptrT_Exercise_t, 0, 0},  {&_swigt__p_RebatedExercisePtr, _p_RebatedExercisePtrTo_p_boost__shared_ptrT_Exercise_t, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_boost__shared_ptrT_FloatingRateCouponPricer_t[] = {  {&_swigt__p_boost__shared_ptrT_FloatingRateCouponPricer_t, 0, 0, 0},  {&_swigt__p_IborCouponPricerPtr, _p_IborCouponPricerPtrTo_p_boost__shared_ptrT_FloatingRateCouponPricer_t, 0, 0},  {&_swigt__p_BlackIborCouponPricerPtr, _p_BlackIborCouponPricerPtrTo_p_boost__shared_ptrT_FloatingRateCouponPricer_t, 0, 0},  {&_swigt__p_CmsCouponPricerPtr, _p_CmsCouponPricerPtrTo_p_boost__shared_ptrT_FloatingRateCouponPricer_t, 0, 0},  {&_swigt__p_AnalyticHaganPricerPtr, _p_AnalyticHaganPricerPtrTo_p_boost__shared_ptrT_FloatingRateCouponPricer_t, 0, 0},  {&_swigt__p_NumericHaganPricerPtr, _p_NumericHaganPricerPtrTo_p_boost__shared_ptrT_FloatingRateCouponPricer_t, 0, 0},  {&_swigt__p_LinearTsrPricerPtr, _p_LinearTsrPricerPtrTo_p_boost__shared_ptrT_FloatingRateCouponPricer_t, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_boost__shared_ptrT_Gaussian1dModel_t[] = {  {&_swigt__p_MarkovFunctionalPtr, _p_MarkovFunctionalPtrTo_p_boost__shared_ptrT_Gaussian1dModel_t, 0, 0},  {&_swigt__p_boost__shared_ptrT_Gaussian1dModel_t, 0, 0, 0},  {&_swigt__p_GsrPtr, _p_GsrPtrTo_p_boost__shared_ptrT_Gaussian1dModel_t, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_boost__shared_ptrT_IborIndex_t[] = {  {&_swigt__p_boost__shared_ptrT_IborIndex_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_boost__shared_ptrT_Index_t[] = {  {&_swigt__p_Bkbm6MPtr, _p_Bkbm6MPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_EURLibor1MPtr, _p_EURLibor1MPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_Euribor1MPtr, _p_Euribor1MPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_EURLibor11MPtr, _p_EURLibor11MPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_Euribor11MPtr, _p_Euribor11MPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_Euribor365Ptr, _p_Euribor365PtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_FedFundsPtr, _p_FedFundsPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_YYUKRPIPtr, _p_YYUKRPIPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_UKRPIPtr, _p_UKRPIPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_boost__shared_ptrT_Index_t, 0, 0, 0},  {&_swigt__p_CdorPtr, _p_CdorPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_Euribor3WPtr, _p_Euribor3WPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_Euribor365_4MPtr, _p_Euribor365_4MPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_EURLibor2MPtr, _p_EURLibor2MPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_Euribor2MPtr, _p_Euribor2MPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_Euribor365_1YPtr, _p_Euribor365_1YPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_JibarPtr, _p_JibarPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_Euribor365_5MPtr, _p_Euribor365_5MPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_EURLibor3MPtr, _p_EURLibor3MPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_Euribor3MPtr, _p_Euribor3MPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_Bbsw1MPtr, _p_Bbsw1MPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_Euribor365_10MPtr, _p_Euribor365_10MPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_IborIndexPtr, _p_IborIndexPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_OvernightIndexPtr, _p_OvernightIndexPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_SwapIndexPtr, _p_SwapIndexPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_InterestRateIndexPtr, _p_InterestRateIndexPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_InflationIndexPtr, _p_InflationIndexPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_ZeroInflationIndexPtr, _p_ZeroInflationIndexPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_YoYInflationIndexPtr, _p_YoYInflationIndexPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_Euribor365_6MPtr, _p_Euribor365_6MPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_EurLiborSwapIsdaFixBPtr, _p_EurLiborSwapIsdaFixBPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_EuriborSwapIsdaFixBPtr, _p_EuriborSwapIsdaFixBPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_EUHICPXTPtr, _p_EUHICPXTPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_YYEUHICPXTPtr, _p_YYEUHICPXTPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_Euribor4MPtr, _p_Euribor4MPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_EURLibor4MPtr, _p_EURLibor4MPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_Bbsw2MPtr, _p_Bbsw2MPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_Euribor365_11MPtr, _p_Euribor365_11MPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_USCPIPtr, _p_USCPIPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_ZACPIPtr, _p_ZACPIPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_YYUSCPIPtr, _p_YYUSCPIPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_YYZACPIPtr, _p_YYZACPIPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_EurLiborSwapIfrFixPtr, _p_EurLiborSwapIfrFixPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_EuriborSwapIfrFixPtr, _p_EuriborSwapIfrFixPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_Euribor365_7MPtr, _p_Euribor365_7MPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_Euribor1YPtr, _p_Euribor1YPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_EURLibor1YPtr, _p_EURLibor1YPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_Bkbm1MPtr, _p_Bkbm1MPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_Euribor5MPtr, _p_Euribor5MPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_EURLibor5MPtr, _p_EURLibor5MPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_Bbsw3MPtr, _p_Bbsw3MPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_NzocrPtr, _p_NzocrPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_Euribor365_SWPtr, _p_Euribor365_SWPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_SoniaPtr, _p_SoniaPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_EoniaPtr, _p_EoniaPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_AoniaPtr, _p_AoniaPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_EurLiborSwapIsdaFixAPtr, _p_EurLiborSwapIsdaFixAPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_EuriborSwapIsdaFixAPtr, _p_EuriborSwapIsdaFixAPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_Euribor365_8MPtr, _p_Euribor365_8MPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_Bkbm2MPtr, _p_Bkbm2MPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_EURLibor6MPtr, _p_EURLibor6MPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_Euribor6MPtr, _p_Euribor6MPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_Bbsw4MPtr, _p_Bbsw4MPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_EUHICPPtr, _p_EUHICPPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_FRHICPPtr, _p_FRHICPPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_YYEUHICPPtr, _p_YYEUHICPPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_YYFRHICPPtr, _p_YYFRHICPPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_Euribor365_9MPtr, _p_Euribor365_9MPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_Bkbm3MPtr, _p_Bkbm3MPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_EURLibor7MPtr, _p_EURLibor7MPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_Euribor7MPtr, _p_Euribor7MPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_Bbsw5MPtr, _p_Bbsw5MPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_Euribor365_2WPtr, _p_Euribor365_2WPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_EURLiborSWPtr, _p_EURLiborSWPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_EuriborSWPtr, _p_EuriborSWPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_Euribor365_1MPtr, _p_Euribor365_1MPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_LiborPtr, _p_LiborPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_EuriborPtr, _p_EuriborPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_TRLiborPtr, _p_TRLiborPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_USDLiborPtr, _p_USDLiborPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_ZiborPtr, _p_ZiborPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_AUDLiborPtr, _p_AUDLiborPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_CADLiborPtr, _p_CADLiborPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_CHFLiborPtr, _p_CHFLiborPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_DKKLiborPtr, _p_DKKLiborPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_EURLiborPtr, _p_EURLiborPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_GBPLiborPtr, _p_GBPLiborPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_JPYLiborPtr, _p_JPYLiborPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_NZDLiborPtr, _p_NZDLiborPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_SEKLiborPtr, _p_SEKLiborPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_TiborPtr, _p_TiborPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_Bkbm4MPtr, _p_Bkbm4MPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_Euribor8MPtr, _p_Euribor8MPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_EURLibor8MPtr, _p_EURLibor8MPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_Bbsw6MPtr, _p_Bbsw6MPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_Euribor365_3WPtr, _p_Euribor365_3WPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_BbswPtr, _p_BbswPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_BkbmPtr, _p_BkbmPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_Euribor365_2MPtr, _p_Euribor365_2MPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_Bkbm5MPtr, _p_Bkbm5MPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_Euribor10MPtr, _p_Euribor10MPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_EURLibor10MPtr, _p_EURLibor10MPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_Euribor9MPtr, _p_Euribor9MPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_EURLibor9MPtr, _p_EURLibor9MPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_Euribor2WPtr, _p_Euribor2WPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_Euribor365_3MPtr, _p_Euribor365_3MPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},  {&_swigt__p_EURLibor2WPtr, _p_EURLibor2WPtrTo_p_boost__shared_ptrT_Index_t, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_boost__shared_ptrT_Instrument_t[] = {  {&_swigt__p_DiscreteAveragingAsianOptionPtr, _p_DiscreteAveragingAsianOptionPtrTo_p_boost__shared_ptrT_Instrument_t, 0, 0},  {&_swigt__p_ContinuousAveragingAsianOptionPtr, _p_ContinuousAveragingAsianOptionPtrTo_p_boost__shared_ptrT_Instrument_t, 0, 0},  {&_swigt__p_BarrierOptionPtr, _p_BarrierOptionPtrTo_p_boost__shared_ptrT_Instrument_t, 0, 0},  {&_swigt__p_DividendVanillaOptionPtr, _p_DividendVanillaOptionPtrTo_p_boost__shared_ptrT_Instrument_t, 0, 0},  {&_swigt__p_MultiAssetOptionPtr, _p_MultiAssetOptionPtrTo_p_boost__shared_ptrT_Instrument_t, 0, 0},  {&_swigt__p_FloatFloatSwaptionPtr, _p_FloatFloatSwaptionPtrTo_p_boost__shared_ptrT_Instrument_t, 0, 0},  {&_swigt__p_NonstandardSwaptionPtr, _p_NonstandardSwaptionPtrTo_p_boost__shared_ptrT_Instrument_t, 0, 0},  {&_swigt__p_SwaptionPtr, _p_SwaptionPtrTo_p_boost__shared_ptrT_Instrument_t, 0, 0},  {&_swigt__p_QuantoDoubleBarrierOptionPtr, _p_QuantoDoubleBarrierOptionPtrTo_p_boost__shared_ptrT_Instrument_t, 0, 0},  {&_swigt__p_DoubleBarrierOptionPtr, _p_DoubleBarrierOptionPtrTo_p_boost__shared_ptrT_Instrument_t, 0, 0},  {&_swigt__p_HimalayaOptionPtr, _p_HimalayaOptionPtrTo_p_boost__shared_ptrT_Instrument_t, 0, 0},  {&_swigt__p_EverestOptionPtr, _p_EverestOptionPtrTo_p_boost__shared_ptrT_Instrument_t, 0, 0},  {&_swigt__p_BasketOptionPtr, _p_BasketOptionPtrTo_p_boost__shared_ptrT_Instrument_t, 0, 0},  {&_swigt__p_VanillaOptionPtr, _p_VanillaOptionPtrTo_p_boost__shared_ptrT_Instrument_t, 0, 0},  {&_swigt__p_EuropeanOptionPtr, _p_EuropeanOptionPtrTo_p_boost__shared_ptrT_Instrument_t, 0, 0},  {&_swigt__p_ForwardVanillaOptionPtr, _p_ForwardVanillaOptionPtrTo_p_boost__shared_ptrT_Instrument_t, 0, 0},  {&_swigt__p_QuantoVanillaOptionPtr, _p_QuantoVanillaOptionPtrTo_p_boost__shared_ptrT_Instrument_t, 0, 0},  {&_swigt__p_QuantoForwardVanillaOptionPtr, _p_QuantoForwardVanillaOptionPtrTo_p_boost__shared_ptrT_Instrument_t, 0, 0},  {&_swigt__p_YearOnYearInflationSwapPtr, _p_YearOnYearInflationSwapPtrTo_p_boost__shared_ptrT_Instrument_t, 0, 0},  {&_swigt__p_ZeroCouponInflationSwapPtr, _p_ZeroCouponInflationSwapPtrTo_p_boost__shared_ptrT_Instrument_t, 0, 0},  {&_swigt__p_CreditDefaultSwapPtr, _p_CreditDefaultSwapPtrTo_p_boost__shared_ptrT_Instrument_t, 0, 0},  {&_swigt__p_SwapPtr, _p_SwapPtrTo_p_boost__shared_ptrT_Instrument_t, 0, 0},  {&_swigt__p_VanillaSwapPtr, _p_VanillaSwapPtrTo_p_boost__shared_ptrT_Instrument_t, 0, 0},  {&_swigt__p_NonstandardSwapPtr, _p_NonstandardSwapPtrTo_p_boost__shared_ptrT_Instrument_t, 0, 0},  {&_swigt__p_AssetSwapPtr, _p_AssetSwapPtrTo_p_boost__shared_ptrT_Instrument_t, 0, 0},  {&_swigt__p_FloatFloatSwapPtr, _p_FloatFloatSwapPtrTo_p_boost__shared_ptrT_Instrument_t, 0, 0},  {&_swigt__p_CPIBondPtr, _p_CPIBondPtrTo_p_boost__shared_ptrT_Instrument_t, 0, 0},  {&_swigt__p_CallableFixedRateBondPtr, _p_CallableFixedRateBondPtrTo_p_boost__shared_ptrT_Instrument_t, 0, 0},  {&_swigt__p_CmsRateBondPtr, _p_CmsRateBondPtrTo_p_boost__shared_ptrT_Instrument_t, 0, 0},  {&_swigt__p_FloatingRateBondPtr, _p_FloatingRateBondPtrTo_p_boost__shared_ptrT_Instrument_t, 0, 0},  {&_swigt__p_FixedRateBondPtr, _p_FixedRateBondPtrTo_p_boost__shared_ptrT_Instrument_t, 0, 0},  {&_swigt__p_ZeroCouponBondPtr, _p_ZeroCouponBondPtrTo_p_boost__shared_ptrT_Instrument_t, 0, 0},  {&_swigt__p_BondPtr, _p_BondPtrTo_p_boost__shared_ptrT_Instrument_t, 0, 0},  {&_swigt__p_ConvertibleZeroCouponBondPtr, _p_ConvertibleZeroCouponBondPtrTo_p_boost__shared_ptrT_Instrument_t, 0, 0},  {&_swigt__p_ConvertibleFixedCouponBondPtr, _p_ConvertibleFixedCouponBondPtrTo_p_boost__shared_ptrT_Instrument_t, 0, 0},  {&_swigt__p_ConvertibleFloatingRateBondPtr, _p_ConvertibleFloatingRateBondPtrTo_p_boost__shared_ptrT_Instrument_t, 0, 0},  {&_swigt__p_boost__shared_ptrT_Instrument_t, 0, 0, 0},  {&_swigt__p_YoYInflationCapPtr, _p_YoYInflationCapPtrTo_p_boost__shared_ptrT_Instrument_t, 0, 0},  {&_swigt__p_CompositeInstrumentPtr, _p_CompositeInstrumentPtrTo_p_boost__shared_ptrT_Instrument_t, 0, 0},  {&_swigt__p_ForwardRateAgreementPtr, _p_ForwardRateAgreementPtrTo_p_boost__shared_ptrT_Instrument_t, 0, 0},  {&_swigt__p_CapPtr, _p_CapPtrTo_p_boost__shared_ptrT_Instrument_t, 0, 0},  {&_swigt__p_CollarPtr, _p_CollarPtrTo_p_boost__shared_ptrT_Instrument_t, 0, 0},  {&_swigt__p_YoYInflationCollarPtr, _p_YoYInflationCollarPtrTo_p_boost__shared_ptrT_Instrument_t, 0, 0},  {&_swigt__p_StockPtr, _p_StockPtrTo_p_boost__shared_ptrT_Instrument_t, 0, 0},  {&_swigt__p_FloorPtr, _p_FloorPtrTo_p_boost__shared_ptrT_Instrument_t, 0, 0},  {&_swigt__p_CapFloorPtr, _p_CapFloorPtrTo_p_boost__shared_ptrT_Instrument_t, 0, 0},  {&_swigt__p_YoYInflationFloorPtr, _p_YoYInflationFloorPtrTo_p_boost__shared_ptrT_Instrument_t, 0, 0},  {&_swigt__p_YoYInflationCapFloorPtr, _p_YoYInflationCapFloorPtrTo_p_boost__shared_ptrT_Instrument_t, 0, 0},  {&_swigt__p_ForwardPtr, _p_ForwardPtrTo_p_boost__shared_ptrT_Instrument_t, 0, 0},  {&_swigt__p_FixedRateBondForwardPtr, _p_FixedRateBondForwardPtrTo_p_boost__shared_ptrT_Instrument_t, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_boost__shared_ptrT_LocalVolTermStructure_t[] = {  {&_swigt__p_boost__shared_ptrT_LocalVolTermStructure_t, 0, 0, 0},  {&_swigt__p_LocalConstantVolPtr, _p_LocalConstantVolPtrTo_p_boost__shared_ptrT_LocalVolTermStructure_t, 0, 0},  {&_swigt__p_LocalVolSurfacePtr, _p_LocalVolSurfacePtrTo_p_boost__shared_ptrT_LocalVolTermStructure_t, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_boost__shared_ptrT_Observable_t[] = {  {&_swigt__p_boost__shared_ptrT_Observable_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_boost__shared_ptrT_OptimizationMethod_t[] = {  {&_swigt__p_boost__shared_ptrT_OptimizationMethod_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_boost__shared_ptrT_OptionletVolatilityStructure_t[] = {  {&_swigt__p_boost__shared_ptrT_OptionletVolatilityStructure_t, 0, 0, 0},  {&_swigt__p_StrippedOptionletAdapterPtr, _p_StrippedOptionletAdapterPtrTo_p_boost__shared_ptrT_OptionletVolatilityStructure_t, 0, 0},  {&_swigt__p_ConstantOptionletVolatilityPtr, _p_ConstantOptionletVolatilityPtrTo_p_boost__shared_ptrT_OptionletVolatilityStructure_t, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_boost__shared_ptrT_Payoff_t[] = {  {&_swigt__p_boost__shared_ptrT_Payoff_t, 0, 0, 0},  {&_swigt__p_PlainVanillaPayoffPtr, _p_PlainVanillaPayoffPtrTo_p_boost__shared_ptrT_Payoff_t, 0, 0},  {&_swigt__p_PercentageStrikePayoffPtr, _p_PercentageStrikePayoffPtrTo_p_boost__shared_ptrT_Payoff_t, 0, 0},  {&_swigt__p_CashOrNothingPayoffPtr, _p_CashOrNothingPayoffPtrTo_p_boost__shared_ptrT_Payoff_t, 0, 0},  {&_swigt__p_AssetOrNothingPayoffPtr, _p_AssetOrNothingPayoffPtrTo_p_boost__shared_ptrT_Payoff_t, 0, 0},  {&_swigt__p_SuperSharePayoffPtr, _p_SuperSharePayoffPtrTo_p_boost__shared_ptrT_Payoff_t, 0, 0},  {&_swigt__p_GapPayoffPtr, _p_GapPayoffPtrTo_p_boost__shared_ptrT_Payoff_t, 0, 0},  {&_swigt__p_BasketPayoffPtr, _p_BasketPayoffPtrTo_p_boost__shared_ptrT_Payoff_t, 0, 0},  {&_swigt__p_MinBasketPayoffPtr, _p_MinBasketPayoffPtrTo_p_boost__shared_ptrT_Payoff_t, 0, 0},  {&_swigt__p_MaxBasketPayoffPtr, _p_MaxBasketPayoffPtrTo_p_boost__shared_ptrT_Payoff_t, 0, 0},  {&_swigt__p_AverageBasketPayoffPtr, _p_AverageBasketPayoffPtrTo_p_boost__shared_ptrT_Payoff_t, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_boost__shared_ptrT_PricingEngine_t[] = {  {&_swigt__p_AnalyticDigitalAmericanKOEnginePtr, _p_AnalyticDigitalAmericanKOEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t, 0, 0},  {&_swigt__p_AnalyticDividendEuropeanEnginePtr, _p_AnalyticDividendEuropeanEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t, 0, 0},  {&_swigt__p_FDDividendEuropeanEnginePtr, _p_FDDividendEuropeanEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t, 0, 0},  {&_swigt__p_FDDividendAmericanEnginePtr, _p_FDDividendAmericanEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t, 0, 0},  {&_swigt__p_AnalyticBarrierEnginePtr, _p_AnalyticBarrierEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t, 0, 0},  {&_swigt__p_MCBarrierEnginePtr, _p_MCBarrierEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t, 0, 0},  {&_swigt__p_FdBlackScholesBarrierEnginePtr, _p_FdBlackScholesBarrierEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t, 0, 0},  {&_swigt__p_AnalyticBinaryBarrierEnginePtr, _p_AnalyticBinaryBarrierEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t, 0, 0},  {&_swigt__p_BinomialBarrierEnginePtr, _p_BinomialBarrierEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t, 0, 0},  {&_swigt__p_ForwardEuropeanEnginePtr, _p_ForwardEuropeanEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t, 0, 0},  {&_swigt__p_QuantoEuropeanEnginePtr, _p_QuantoEuropeanEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t, 0, 0},  {&_swigt__p_QuantoForwardEuropeanEnginePtr, _p_QuantoForwardEuropeanEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t, 0, 0},  {&_swigt__p_MCDiscreteArithmeticAPEnginePtr, _p_MCDiscreteArithmeticAPEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t, 0, 0},  {&_swigt__p_AnalyticDigitalAmericanEnginePtr, _p_AnalyticDigitalAmericanEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t, 0, 0},  {&_swigt__p_BjerksundStenslandApproximationEnginePtr, _p_BjerksundStenslandApproximationEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t, 0, 0},  {&_swigt__p_BaroneAdesiWhaleyApproximationEnginePtr, _p_BaroneAdesiWhaleyApproximationEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t, 0, 0},  {&_swigt__p_FDShoutEnginePtr, _p_FDShoutEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t, 0, 0},  {&_swigt__p_AnalyticEuropeanEnginePtr, _p_AnalyticEuropeanEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t, 0, 0},  {&_swigt__p_AnalyticHestonEnginePtr, _p_AnalyticHestonEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t, 0, 0},  {&_swigt__p_AnalyticPTDHestonEnginePtr, _p_AnalyticPTDHestonEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t, 0, 0},  {&_swigt__p_MCDiscreteGeometricAPEnginePtr, _p_MCDiscreteGeometricAPEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t, 0, 0},  {&_swigt__p_MCDiscreteArithmeticASEnginePtr, _p_MCDiscreteArithmeticASEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t, 0, 0},  {&_swigt__p_FdBlackScholesAsianEnginePtr, _p_FdBlackScholesAsianEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t, 0, 0},  {&_swigt__p_ContinuousArithmeticAsianLevyEnginePtr, _p_ContinuousArithmeticAsianLevyEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t, 0, 0},  {&_swigt__p_FdBatesVanillaEnginePtr, _p_FdBatesVanillaEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t, 0, 0},  {&_swigt__p_FdBlackScholesVanillaEnginePtr, _p_FdBlackScholesVanillaEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t, 0, 0},  {&_swigt__p_FDAmericanEnginePtr, _p_FDAmericanEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t, 0, 0},  {&_swigt__p_MCEuropeanEnginePtr, _p_MCEuropeanEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t, 0, 0},  {&_swigt__p_BinomialVanillaEnginePtr, _p_BinomialVanillaEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t, 0, 0},  {&_swigt__p_FDEuropeanEnginePtr, _p_FDEuropeanEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t, 0, 0},  {&_swigt__p_FDBermudanEnginePtr, _p_FDBermudanEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t, 0, 0},  {&_swigt__p_IntegralEnginePtr, _p_IntegralEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t, 0, 0},  {&_swigt__p_BatesEnginePtr, _p_BatesEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t, 0, 0},  {&_swigt__p_VarianceGammaEnginePtr, _p_VarianceGammaEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t, 0, 0},  {&_swigt__p_FFTVarianceGammaEnginePtr, _p_FFTVarianceGammaEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t, 0, 0},  {&_swigt__p_AnalyticDoubleBarrierEnginePtr, _p_AnalyticDoubleBarrierEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t, 0, 0},  {&_swigt__p_WulinYongDoubleBarrierEnginePtr, _p_WulinYongDoubleBarrierEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t, 0, 0},  {&_swigt__p_VannaVolgaDoubleBarrierEnginePtr, _p_VannaVolgaDoubleBarrierEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t, 0, 0},  {&_swigt__p_AnalyticDoubleBarrierBinaryEnginePtr, _p_AnalyticDoubleBarrierBinaryEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t, 0, 0},  {&_swigt__p_BinomialDoubleBarrierEnginePtr, _p_BinomialDoubleBarrierEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t, 0, 0},  {&_swigt__p_MCEuropeanBasketEnginePtr, _p_MCEuropeanBasketEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t, 0, 0},  {&_swigt__p_MCAmericanBasketEnginePtr, _p_MCAmericanBasketEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t, 0, 0},  {&_swigt__p_StulzEnginePtr, _p_StulzEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t, 0, 0},  {&_swigt__p_MCEverestEnginePtr, _p_MCEverestEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t, 0, 0},  {&_swigt__p_MCHimalayaEnginePtr, _p_MCHimalayaEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t, 0, 0},  {&_swigt__p_JamshidianSwaptionEnginePtr, _p_JamshidianSwaptionEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t, 0, 0},  {&_swigt__p_TreeSwaptionEnginePtr, _p_TreeSwaptionEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t, 0, 0},  {&_swigt__p_AnalyticCapFloorEnginePtr, _p_AnalyticCapFloorEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t, 0, 0},  {&_swigt__p_TreeCapFloorEnginePtr, _p_TreeCapFloorEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t, 0, 0},  {&_swigt__p_G2SwaptionEnginePtr, _p_G2SwaptionEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t, 0, 0},  {&_swigt__p_FdG2SwaptionEnginePtr, _p_FdG2SwaptionEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t, 0, 0},  {&_swigt__p_FdHullWhiteSwaptionEnginePtr, _p_FdHullWhiteSwaptionEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t, 0, 0},  {&_swigt__p_DiscountingBondEnginePtr, _p_DiscountingBondEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t, 0, 0},  {&_swigt__p_TreeCallableFixedRateBondEnginePtr, _p_TreeCallableFixedRateBondEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t, 0, 0},  {&_swigt__p_BlackCallableFixedRateBondEnginePtr, _p_BlackCallableFixedRateBondEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t, 0, 0},  {&_swigt__p_BlackCapFloorEnginePtr, _p_BlackCapFloorEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t, 0, 0},  {&_swigt__p_BachelierCapFloorEnginePtr, _p_BachelierCapFloorEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t, 0, 0},  {&_swigt__p_BinomialConvertibleEnginePtr, _p_BinomialConvertibleEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t, 0, 0},  {&_swigt__p_MidPointCdsEnginePtr, _p_MidPointCdsEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t, 0, 0},  {&_swigt__p_IntegralCdsEnginePtr, _p_IntegralCdsEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t, 0, 0},  {&_swigt__p_DiscountingSwapEnginePtr, _p_DiscountingSwapEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t, 0, 0},  {&_swigt__p_Gaussian1dSwaptionEnginePtr, _p_Gaussian1dSwaptionEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t, 0, 0},  {&_swigt__p_Gaussian1dJamshidianSwaptionEnginePtr, _p_Gaussian1dJamshidianSwaptionEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t, 0, 0},  {&_swigt__p_Gaussian1dNonstandardSwaptionEnginePtr, _p_Gaussian1dNonstandardSwaptionEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t, 0, 0},  {&_swigt__p_Gaussian1dFloatFloatSwaptionEnginePtr, _p_Gaussian1dFloatFloatSwaptionEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t, 0, 0},  {&_swigt__p_BlackSwaptionEnginePtr, _p_BlackSwaptionEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t, 0, 0},  {&_swigt__p_BachelierSwaptionEnginePtr, _p_BachelierSwaptionEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t, 0, 0},  {&_swigt__p_AnalyticContinuousGeometricAveragePriceAsianEnginePtr, _p_AnalyticContinuousGeometricAveragePriceAsianEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t, 0, 0},  {&_swigt__p_boost__shared_ptrT_PricingEngine_t, 0, 0, 0},  {&_swigt__p_AnalyticDiscreteGeometricAverageStrikeAsianEnginePtr, _p_AnalyticDiscreteGeometricAverageStrikeAsianEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t, 0, 0},  {&_swigt__p_AnalyticDiscreteGeometricAveragePriceAsianEnginePtr, _p_AnalyticDiscreteGeometricAveragePriceAsianEnginePtrTo_p_boost__shared_ptrT_PricingEngine_t, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_boost__shared_ptrT_Quote_t[] = {  {&_swigt__p_SimpleQuotePtr, _p_SimpleQuotePtrTo_p_boost__shared_ptrT_Quote_t, 0, 0},  {&_swigt__p_boost__shared_ptrT_Quote_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_boost__shared_ptrT_RateHelper_t[] = {  {&_swigt__p_DepositRateHelperPtr, _p_DepositRateHelperPtrTo_p_boost__shared_ptrT_RateHelper_t, 0, 0},  {&_swigt__p_FraRateHelperPtr, _p_FraRateHelperPtrTo_p_boost__shared_ptrT_RateHelper_t, 0, 0},  {&_swigt__p_FuturesRateHelperPtr, _p_FuturesRateHelperPtrTo_p_boost__shared_ptrT_RateHelper_t, 0, 0},  {&_swigt__p_SwapRateHelperPtr, _p_SwapRateHelperPtrTo_p_boost__shared_ptrT_RateHelper_t, 0, 0},  {&_swigt__p_BondHelperPtr, _p_BondHelperPtrTo_p_boost__shared_ptrT_RateHelper_t, 0, 0},  {&_swigt__p_FixedRateBondHelperPtr, _p_FixedRateBondHelperPtrTo_p_boost__shared_ptrT_RateHelper_t, 0, 0},  {&_swigt__p_OISRateHelperPtr, _p_OISRateHelperPtrTo_p_boost__shared_ptrT_RateHelper_t, 0, 0},  {&_swigt__p_DatedOISRateHelperPtr, _p_DatedOISRateHelperPtrTo_p_boost__shared_ptrT_RateHelper_t, 0, 0},  {&_swigt__p_FxSwapRateHelperPtr, _p_FxSwapRateHelperPtrTo_p_boost__shared_ptrT_RateHelper_t, 0, 0},  {&_swigt__p_boost__shared_ptrT_RateHelper_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_boost__shared_ptrT_Seasonality_t[] = {  {&_swigt__p_boost__shared_ptrT_Seasonality_t, 0, 0, 0},  {&_swigt__p_MultiplicativePriceSeasonalityPtr, _p_MultiplicativePriceSeasonalityPtrTo_p_boost__shared_ptrT_Seasonality_t, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_boost__shared_ptrT_ShortRateModel_t[] = {  {&_swigt__p_G2Ptr, _p_G2PtrTo_p_boost__shared_ptrT_ShortRateModel_t, 0, 0},  {&_swigt__p_BlackKarasinskiPtr, _p_BlackKarasinskiPtrTo_p_boost__shared_ptrT_ShortRateModel_t, 0, 0},  {&_swigt__p_VasicekPtr, _p_VasicekPtrTo_p_boost__shared_ptrT_ShortRateModel_t, 0, 0},  {&_swigt__p_boost__shared_ptrT_ShortRateModel_t, 0, 0, 0},  {&_swigt__p_HullWhitePtr, _p_HullWhitePtrTo_p_boost__shared_ptrT_ShortRateModel_t, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_boost__shared_ptrT_StochasticProcess_t[] = {  {&_swigt__p_boost__shared_ptrT_StochasticProcess_t, 0, 0, 0},  {&_swigt__p_StochasticProcessArrayPtr, _p_StochasticProcessArrayPtrTo_p_boost__shared_ptrT_StochasticProcess_t, 0, 0},  {&_swigt__p_StochasticProcess1DPtr, _p_StochasticProcess1DPtrTo_p_boost__shared_ptrT_StochasticProcess_t, 0, 0},  {&_swigt__p_GsrProcessPtr, _p_GsrProcessPtrTo_p_boost__shared_ptrT_StochasticProcess_t, 0, 0},  {&_swigt__p_HullWhiteForwardProcessPtr, _p_HullWhiteForwardProcessPtrTo_p_boost__shared_ptrT_StochasticProcess_t, 0, 0},  {&_swigt__p_HullWhiteProcessPtr, _p_HullWhiteProcessPtrTo_p_boost__shared_ptrT_StochasticProcess_t, 0, 0},  {&_swigt__p_VarianceGammaProcessPtr, _p_VarianceGammaProcessPtrTo_p_boost__shared_ptrT_StochasticProcess_t, 0, 0},  {&_swigt__p_GeometricBrownianMotionProcessPtr, _p_GeometricBrownianMotionProcessPtrTo_p_boost__shared_ptrT_StochasticProcess_t, 0, 0},  {&_swigt__p_Merton76ProcessPtr, _p_Merton76ProcessPtrTo_p_boost__shared_ptrT_StochasticProcess_t, 0, 0},  {&_swigt__p_GarmanKohlagenProcessPtr, _p_GarmanKohlagenProcessPtrTo_p_boost__shared_ptrT_StochasticProcess_t, 0, 0},  {&_swigt__p_BlackProcessPtr, _p_BlackProcessPtrTo_p_boost__shared_ptrT_StochasticProcess_t, 0, 0},  {&_swigt__p_BlackScholesMertonProcessPtr, _p_BlackScholesMertonProcessPtrTo_p_boost__shared_ptrT_StochasticProcess_t, 0, 0},  {&_swigt__p_BlackScholesProcessPtr, _p_BlackScholesProcessPtrTo_p_boost__shared_ptrT_StochasticProcess_t, 0, 0},  {&_swigt__p_GeneralizedBlackScholesProcessPtr, _p_GeneralizedBlackScholesProcessPtrTo_p_boost__shared_ptrT_StochasticProcess_t, 0, 0},  {&_swigt__p_HestonProcessPtr, _p_HestonProcessPtrTo_p_boost__shared_ptrT_StochasticProcess_t, 0, 0},  {&_swigt__p_BatesProcessPtr, _p_BatesProcessPtrTo_p_boost__shared_ptrT_StochasticProcess_t, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_boost__shared_ptrT_StrippedOptionletBase_t[] = {  {&_swigt__p_boost__shared_ptrT_StrippedOptionletBase_t, 0, 0, 0},  {&_swigt__p_OptionletStripper1Ptr, _p_OptionletStripper1PtrTo_p_boost__shared_ptrT_StrippedOptionletBase_t, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_boost__shared_ptrT_SwapIndex_t[] = {  {&_swigt__p_boost__shared_ptrT_SwapIndex_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_boost__shared_ptrT_SwaptionVolatilityStructure_t[] = {  {&_swigt__p_boost__shared_ptrT_SwaptionVolatilityStructure_t, 0, 0, 0},  {&_swigt__p_ConstantSwaptionVolatilityPtr, _p_ConstantSwaptionVolatilityPtrTo_p_boost__shared_ptrT_SwaptionVolatilityStructure_t, 0, 0},  {&_swigt__p_SwaptionVolCube1Ptr, _p_SwaptionVolCube1PtrTo_p_boost__shared_ptrT_SwaptionVolatilityStructure_t, 0, 0},  {&_swigt__p_SwaptionVolatilityMatrixPtr, _p_SwaptionVolatilityMatrixPtrTo_p_boost__shared_ptrT_SwaptionVolatilityStructure_t, 0, 0},  {&_swigt__p_SwaptionVolCube2Ptr, _p_SwaptionVolCube2PtrTo_p_boost__shared_ptrT_SwaptionVolatilityStructure_t, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_boost__shared_ptrT_YieldTermStructure_t[] = {  {&_swigt__p_boost__shared_ptrT_YieldTermStructure_t, 0, 0, 0},  {&_swigt__p_PiecewiseLinearForwardPtr, _p_PiecewiseLinearForwardPtrTo_p_boost__shared_ptrT_YieldTermStructure_t, 0, 0},  {&_swigt__p_PiecewiseFlatForwardPtr, _p_PiecewiseFlatForwardPtrTo_p_boost__shared_ptrT_YieldTermStructure_t, 0, 0},  {&_swigt__p_FlatForwardPtr, _p_FlatForwardPtrTo_p_boost__shared_ptrT_YieldTermStructure_t, 0, 0},  {&_swigt__p_PiecewiseLogCubicDiscountPtr, _p_PiecewiseLogCubicDiscountPtrTo_p_boost__shared_ptrT_YieldTermStructure_t, 0, 0},  {&_swigt__p_PiecewiseCubicZeroPtr, _p_PiecewiseCubicZeroPtrTo_p_boost__shared_ptrT_YieldTermStructure_t, 0, 0},  {&_swigt__p_PiecewiseLinearZeroPtr, _p_PiecewiseLinearZeroPtrTo_p_boost__shared_ptrT_YieldTermStructure_t, 0, 0},  {&_swigt__p_ZeroCurvePtr, _p_ZeroCurvePtrTo_p_boost__shared_ptrT_YieldTermStructure_t, 0, 0},  {&_swigt__p_ForwardCurvePtr, _p_ForwardCurvePtrTo_p_boost__shared_ptrT_YieldTermStructure_t, 0, 0},  {&_swigt__p_FittedBondDiscountCurvePtr, _p_FittedBondDiscountCurvePtrTo_p_boost__shared_ptrT_YieldTermStructure_t, 0, 0},  {&_swigt__p_DiscountCurvePtr, _p_DiscountCurvePtrTo_p_boost__shared_ptrT_YieldTermStructure_t, 0, 0},  {&_swigt__p_LogLinearZeroCurvePtr, _p_LogLinearZeroCurvePtrTo_p_boost__shared_ptrT_YieldTermStructure_t, 0, 0},  {&_swigt__p_CubicZeroCurvePtr, _p_CubicZeroCurvePtrTo_p_boost__shared_ptrT_YieldTermStructure_t, 0, 0},  {&_swigt__p_LogCubicZeroCurvePtr, _p_LogCubicZeroCurvePtrTo_p_boost__shared_ptrT_YieldTermStructure_t, 0, 0},  {&_swigt__p_ForwardFlatZeroCurvePtr, _p_ForwardFlatZeroCurvePtrTo_p_boost__shared_ptrT_YieldTermStructure_t, 0, 0},  {&_swigt__p_BackwardFlatZeroCurvePtr, _p_BackwardFlatZeroCurvePtrTo_p_boost__shared_ptrT_YieldTermStructure_t, 0, 0},  {&_swigt__p_MonotonicCubicZeroCurvePtr, _p_MonotonicCubicZeroCurvePtrTo_p_boost__shared_ptrT_YieldTermStructure_t, 0, 0},  {&_swigt__p_SpreadedLinearZeroInterpolatedTermStructurePtr, _p_SpreadedLinearZeroInterpolatedTermStructurePtrTo_p_boost__shared_ptrT_YieldTermStructure_t, 0, 0},  {&_swigt__p_ForwardSpreadedTermStructurePtr, _p_ForwardSpreadedTermStructurePtrTo_p_boost__shared_ptrT_YieldTermStructure_t, 0, 0},  {&_swigt__p_ZeroSpreadedTermStructurePtr, _p_ZeroSpreadedTermStructurePtrTo_p_boost__shared_ptrT_YieldTermStructure_t, 0, 0},  {&_swigt__p_ImpliedTermStructurePtr, _p_ImpliedTermStructurePtrTo_p_boost__shared_ptrT_YieldTermStructure_t, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_boost__shared_ptrT_YoYHelper_t[] = {  {&_swigt__p_YearOnYearInflationSwapHelperPtr, _p_YearOnYearInflationSwapHelperPtrTo_p_boost__shared_ptrT_YoYHelper_t, 0, 0},  {&_swigt__p_boost__shared_ptrT_YoYHelper_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_boost__shared_ptrT_YoYInflationTermStructure_t[] = {  {&_swigt__p_PiecewiseYoYInflationPtr, _p_PiecewiseYoYInflationPtrTo_p_boost__shared_ptrT_YoYInflationTermStructure_t, 0, 0},  {&_swigt__p_boost__shared_ptrT_YoYInflationTermStructure_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_boost__shared_ptrT_ZeroHelper_t[] = {  {&_swigt__p_ZeroCouponInflationSwapHelperPtr, _p_ZeroCouponInflationSwapHelperPtrTo_p_boost__shared_ptrT_ZeroHelper_t, 0, 0},  {&_swigt__p_boost__shared_ptrT_ZeroHelper_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_boost__shared_ptrT_ZeroInflationTermStructure_t[] = {  {&_swigt__p_PiecewiseZeroInflationPtr, _p_PiecewiseZeroInflationPtrTo_p_boost__shared_ptrT_ZeroInflationTermStructure_t, 0, 0},  {&_swigt__p_boost__shared_ptrT_ZeroInflationTermStructure_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_char[] = {  {&_swigt__p_char, 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_doubleOrNull[] = {  {&_swigt__p_doubleOrNull, 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_intOrNull[] = {  {&_swigt__p_intOrNull, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_long[] = {  {&_swigt__p_long, 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__out_of_range[] = {  {&_swigt__p_std__out_of_range, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__pairT_Date_double_t[] = {  {&_swigt__p_std__pairT_Date_double_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__size_t[] = {  {&_swigt__p_std__size_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__vectorT_Date_t[] = {  {&_swigt__p_std__vectorT_Date_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__vectorT_HandleT_Quote_t_t[] = {  {&_swigt__p_std__vectorT_HandleT_Quote_t_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__vectorT_InterestRate_t[] = {  {&_swigt__p_std__vectorT_InterestRate_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__vectorT_IntervalPrice_t[] = {  {&_swigt__p_std__vectorT_IntervalPrice_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__vectorT_Period_t[] = {  {&_swigt__p_std__vectorT_Period_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__vectorT_RelinkableHandleT_Quote_t_t[] = {  {&_swigt__p_std__vectorT_RelinkableHandleT_Quote_t_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__vectorT_bool_t[] = {  {&_swigt__p_std__vectorT_bool_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__vectorT_boost__shared_ptrT_CalibrationHelper_t_t[] = {  {&_swigt__p_std__vectorT_boost__shared_ptrT_CalibrationHelper_t_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__vectorT_boost__shared_ptrT_Callability_t_t[] = {  {&_swigt__p_std__vectorT_boost__shared_ptrT_Callability_t_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__vectorT_boost__shared_ptrT_CashFlow_t_t[] = {  {&_swigt__p_std__vectorT_boost__shared_ptrT_CashFlow_t_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__vectorT_boost__shared_ptrT_DefaultProbabilityHelper_t_t[] = {  {&_swigt__p_std__vectorT_boost__shared_ptrT_DefaultProbabilityHelper_t_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__vectorT_boost__shared_ptrT_Dividend_t_t[] = {  {&_swigt__p_std__vectorT_boost__shared_ptrT_Dividend_t_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__vectorT_boost__shared_ptrT_Instrument_t_t[] = {  {&_swigt__p_std__vectorT_boost__shared_ptrT_Instrument_t_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__vectorT_boost__shared_ptrT_Quote_t_t[] = {  {&_swigt__p_std__vectorT_boost__shared_ptrT_Quote_t_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__vectorT_boost__shared_ptrT_RateHelper_t_t[] = {  {&_swigt__p_std__vectorT_boost__shared_ptrT_RateHelper_t_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__vectorT_boost__shared_ptrT_StochasticProcess_t_t[] = {  {&_swigt__p_std__vectorT_boost__shared_ptrT_StochasticProcess_t_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__vectorT_boost__shared_ptrT_YoYHelper_t_t[] = {  {&_swigt__p_std__vectorT_boost__shared_ptrT_YoYHelper_t_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__vectorT_boost__shared_ptrT_ZeroHelper_t_t[] = {  {&_swigt__p_std__vectorT_boost__shared_ptrT_ZeroHelper_t_t, 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_std__vectorT_int_t[] = {  {&_swigt__p_std__vectorT_int_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__vectorT_std__pairT_Date_double_t_t[] = {  {&_swigt__p_std__vectorT_std__pairT_Date_double_t_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__vectorT_std__string_t[] = {  {&_swigt__p_std__vectorT_std__string_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__vectorT_std__vectorT_HandleT_Quote_t_t_t[] = {  {&_swigt__p_std__vectorT_std__vectorT_HandleT_Quote_t_t_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__vectorT_std__vectorT_RelinkableHandleT_Quote_t_t_t[] = {  {&_swigt__p_std__vectorT_std__vectorT_RelinkableHandleT_Quote_t_t_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__vectorT_std__vectorT_boost__shared_ptrT_Quote_t_t_t[] = {  {&_swigt__p_std__vectorT_std__vectorT_boost__shared_ptrT_Quote_t_t_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__vectorT_std__vectorT_double_t_t[] = {  {&_swigt__p_std__vectorT_std__vectorT_double_t_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__vectorT_unsigned_int_t[] = {  {&_swigt__p_std__vectorT_unsigned_int_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_unsigned_int[] = {  {&_swigt__p_unsigned_int, 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_ASX,
  _swigc__p_AUDLiborPtr,
  _swigc__p_AmericanExercisePtr,
  _swigc__p_AmortizingPaymentPtr,
  _swigc__p_AnalyticBarrierEnginePtr,
  _swigc__p_AnalyticBinaryBarrierEnginePtr,
  _swigc__p_AnalyticCapFloorEnginePtr,
  _swigc__p_AnalyticContinuousGeometricAveragePriceAsianEnginePtr,
  _swigc__p_AnalyticDigitalAmericanEnginePtr,
  _swigc__p_AnalyticDigitalAmericanKOEnginePtr,
  _swigc__p_AnalyticDiscreteGeometricAveragePriceAsianEnginePtr,
  _swigc__p_AnalyticDiscreteGeometricAverageStrikeAsianEnginePtr,
  _swigc__p_AnalyticDividendEuropeanEnginePtr,
  _swigc__p_AnalyticDoubleBarrierBinaryEnginePtr,
  _swigc__p_AnalyticDoubleBarrierEnginePtr,
  _swigc__p_AnalyticEuropeanEnginePtr,
  _swigc__p_AnalyticHaganPricerPtr,
  _swigc__p_AnalyticHestonEnginePtr,
  _swigc__p_AnalyticPTDHestonEnginePtr,
  _swigc__p_AoniaPtr,
  _swigc__p_Array,
  _swigc__p_AssetOrNothingPayoffPtr,
  _swigc__p_AssetSwapPtr,
  _swigc__p_Average,
  _swigc__p_AverageBasketPayoffPtr,
  _swigc__p_BFGS,
  _swigc__p_BachelierCapFloorEnginePtr,
  _swigc__p_BachelierSwaptionEnginePtr,
  _swigc__p_BackwardFlat,
  _swigc__p_BackwardFlatZeroCurvePtr,
  _swigc__p_BaroneAdesiWhaleyApproximationEnginePtr,
  _swigc__p_Barrier,
  _swigc__p_BarrierOptionPtr,
  _swigc__p_BasketOptionPtr,
  _swigc__p_BasketPayoffPtr,
  _swigc__p_BatesEnginePtr,
  _swigc__p_BatesModelPtr,
  _swigc__p_BatesProcessPtr,
  _swigc__p_Bbsw1MPtr,
  _swigc__p_Bbsw2MPtr,
  _swigc__p_Bbsw3MPtr,
  _swigc__p_Bbsw4MPtr,
  _swigc__p_Bbsw5MPtr,
  _swigc__p_Bbsw6MPtr,
  _swigc__p_BbswPtr,
  _swigc__p_BermudanExercisePtr,
  _swigc__p_BinomialBarrierEnginePtr,
  _swigc__p_BinomialConvertibleEnginePtr,
  _swigc__p_BinomialDistribution,
  _swigc__p_BinomialDoubleBarrierEnginePtr,
  _swigc__p_BinomialVanillaEnginePtr,
  _swigc__p_Bisection,
  _swigc__p_BivariateCumulativeNormalDistribution,
  _swigc__p_BivariateCumulativeNormalDistributionDr78,
  _swigc__p_BivariateCumulativeNormalDistributionWe04DP,
  _swigc__p_BjerksundStenslandApproximationEnginePtr,
  _swigc__p_Bkbm1MPtr,
  _swigc__p_Bkbm2MPtr,
  _swigc__p_Bkbm3MPtr,
  _swigc__p_Bkbm4MPtr,
  _swigc__p_Bkbm5MPtr,
  _swigc__p_Bkbm6MPtr,
  _swigc__p_BkbmPtr,
  _swigc__p_BlackCalculator,
  _swigc__p_BlackCallableFixedRateBondEnginePtr,
  _swigc__p_BlackCapFloorEnginePtr,
  _swigc__p_BlackConstantVolPtr,
  _swigc__p_BlackDeltaCalculator,
  _swigc__p_BlackIborCouponPricerPtr,
  _swigc__p_BlackKarasinskiPtr,
  _swigc__p_BlackProcessPtr,
  _swigc__p_BlackScholesMertonProcessPtr,
  _swigc__p_BlackScholesProcessPtr,
  _swigc__p_BlackSwaptionEnginePtr,
  _swigc__p_BlackVarianceCurvePtr,
  _swigc__p_BlackVarianceSurfacePtr,
  _swigc__p_BlackVolTermStructure,
  _swigc__p_BondFunctions,
  _swigc__p_BondHelperPtr,
  _swigc__p_BondPtr,
  _swigc__p_BoundaryConstraint,
  _swigc__p_BoxMullerGaussianRngT_KnuthUniformRng_t,
  _swigc__p_BoxMullerGaussianRngT_LecuyerUniformRng_t,
  _swigc__p_BoxMullerGaussianRngT_MersenneTwisterUniformRng_t,
  _swigc__p_Brent,
  _swigc__p_BrownianBridge,
  _swigc__p_CADLiborPtr,
  _swigc__p_CHFLiborPtr,
  _swigc__p_CLGaussianRngT_KnuthUniformRng_t,
  _swigc__p_CLGaussianRngT_LecuyerUniformRng_t,
  _swigc__p_CLGaussianRngT_MersenneTwisterUniformRng_t,
  _swigc__p_CPI,
  _swigc__p_CPIBondPtr,
  _swigc__p_Calendar,
  _swigc__p_CalibratedModel,
  _swigc__p_CalibrationHelper,
  _swigc__p_Callability,
  _swigc__p_CallabilityPrice,
  _swigc__p_CallableFixedRateBondPtr,
  _swigc__p_CapFloorPtr,
  _swigc__p_CapFloorTermVolCurvePtr,
  _swigc__p_CapFloorTermVolSurfacePtr,
  _swigc__p_CapFloorTermVolatilityStructure,
  _swigc__p_CapHelperPtr,
  _swigc__p_CapPtr,
  _swigc__p_CappedFlooredCmsCouponPtr,
  _swigc__p_CappedFlooredCouponPtr,
  _swigc__p_CashFlow,
  _swigc__p_CashFlows,
  _swigc__p_CashOrNothingPayoffPtr,
  _swigc__p_CdorPtr,
  _swigc__p_CeilingTruncation,
  _swigc__p_ClosestRounding,
  _swigc__p_CmsCouponPricerPtr,
  _swigc__p_CmsCouponPtr,
  _swigc__p_CmsRateBondPtr,
  _swigc__p_CollarPtr,
  _swigc__p_CompositeConstraint,
  _swigc__p_CompositeInstrumentPtr,
  _swigc__p_ConjugateGradient,
  _swigc__p_ConstantEstimator,
  _swigc__p_ConstantOptionletVolatilityPtr,
  _swigc__p_ConstantParameter,
  _swigc__p_ConstantSwaptionVolatilityPtr,
  _swigc__p_Constraint,
  _swigc__p_ContinuousArithmeticAsianLevyEnginePtr,
  _swigc__p_ContinuousAveragingAsianOptionPtr,
  _swigc__p_ConvertibleFixedCouponBondPtr,
  _swigc__p_ConvertibleFloatingRateBondPtr,
  _swigc__p_ConvertibleZeroCouponBondPtr,
  _swigc__p_CouponPtr,
  _swigc__p_CreditDefaultSwapPtr,
  _swigc__p_Cubic,
  _swigc__p_CubicBSplinesFitting,
  _swigc__p_CubicZeroCurvePtr,
  _swigc__p_CumulativeBinomialDistribution,
  _swigc__p_CumulativeChiSquareDistribution,
  _swigc__p_CumulativeGammaDistribution,
  _swigc__p_CumulativeNormalDistribution,
  _swigc__p_CumulativePoissonDistribution,
  _swigc__p_CumulativeStudentDistribution,
  _swigc__p_Currency,
  _swigc__p_CustomRegion,
  _swigc__p_DKKLiborPtr,
  _swigc__p_DMinus,
  _swigc__p_DPlus,
  _swigc__p_DPlusDMinus,
  _swigc__p_DZero,
  _swigc__p_Date,
  _swigc__p_DateGeneration,
  _swigc__p_DateParser,
  _swigc__p_DatedOISRateHelperPtr,
  _swigc__p_DayCounter,
  _swigc__p_DefaultBoundaryCondition,
  _swigc__p_DefaultDensity,
  _swigc__p_DefaultDensityCurvePtr,
  _swigc__p_DefaultLexicographicalView,
  _swigc__p_DefaultLogCubic,
  _swigc__p_DefaultProbabilityHelper,
  _swigc__p_DefaultProbabilityTermStructure,
  _swigc__p_DeltaVolQuote,
  _swigc__p_DepositRateHelperPtr,
  _swigc__p_DifferentialEvolution,
  _swigc__p_DirichletBCPtr,
  _swigc__p_Discount,
  _swigc__p_DiscountCurvePtr,
  _swigc__p_DiscountingBondEnginePtr,
  _swigc__p_DiscountingSwapEnginePtr,
  _swigc__p_DiscreteAveragingAsianOptionPtr,
  _swigc__p_Dividend,
  _swigc__p_DividendVanillaOptionPtr,
  _swigc__p_DoubleBarrier,
  _swigc__p_DoubleBarrierOptionPtr,
  _swigc__p_DownRounding,
  _swigc__p_Duration,
  _swigc__p_EUHICPPtr,
  _swigc__p_EUHICPXTPtr,
  _swigc__p_EURLibor10MPtr,
  _swigc__p_EURLibor11MPtr,
  _swigc__p_EURLibor1MPtr,
  _swigc__p_EURLibor1YPtr,
  _swigc__p_EURLibor2MPtr,
  _swigc__p_EURLibor2WPtr,
  _swigc__p_EURLibor3MPtr,
  _swigc__p_EURLibor4MPtr,
  _swigc__p_EURLibor5MPtr,
  _swigc__p_EURLibor6MPtr,
  _swigc__p_EURLibor7MPtr,
  _swigc__p_EURLibor8MPtr,
  _swigc__p_EURLibor9MPtr,
  _swigc__p_EURLiborPtr,
  _swigc__p_EURLiborSWPtr,
  _swigc__p_EndCriteria,
  _swigc__p_EndCriteria__Type,
  _swigc__p_EoniaPtr,
  _swigc__p_EurLiborSwapIfrFixPtr,
  _swigc__p_EurLiborSwapIsdaFixAPtr,
  _swigc__p_EurLiborSwapIsdaFixBPtr,
  _swigc__p_Euribor10MPtr,
  _swigc__p_Euribor11MPtr,
  _swigc__p_Euribor1MPtr,
  _swigc__p_Euribor1YPtr,
  _swigc__p_Euribor2MPtr,
  _swigc__p_Euribor2WPtr,
  _swigc__p_Euribor365Ptr,
  _swigc__p_Euribor365_10MPtr,
  _swigc__p_Euribor365_11MPtr,
  _swigc__p_Euribor365_1MPtr,
  _swigc__p_Euribor365_1YPtr,
  _swigc__p_Euribor365_2MPtr,
  _swigc__p_Euribor365_2WPtr,
  _swigc__p_Euribor365_3MPtr,
  _swigc__p_Euribor365_3WPtr,
  _swigc__p_Euribor365_4MPtr,
  _swigc__p_Euribor365_5MPtr,
  _swigc__p_Euribor365_6MPtr,
  _swigc__p_Euribor365_7MPtr,
  _swigc__p_Euribor365_8MPtr,
  _swigc__p_Euribor365_9MPtr,
  _swigc__p_Euribor365_SWPtr,
  _swigc__p_Euribor3MPtr,
  _swigc__p_Euribor3WPtr,
  _swigc__p_Euribor4MPtr,
  _swigc__p_Euribor5MPtr,
  _swigc__p_Euribor6MPtr,
  _swigc__p_Euribor7MPtr,
  _swigc__p_Euribor8MPtr,
  _swigc__p_Euribor9MPtr,
  _swigc__p_EuriborPtr,
  _swigc__p_EuriborSWPtr,
  _swigc__p_EuriborSwapIfrFixPtr,
  _swigc__p_EuriborSwapIsdaFixAPtr,
  _swigc__p_EuriborSwapIsdaFixBPtr,
  _swigc__p_EuropeanExercisePtr,
  _swigc__p_EuropeanOptionPtr,
  _swigc__p_EverestOptionPtr,
  _swigc__p_ExchangeRate,
  _swigc__p_ExchangeRateManager,
  _swigc__p_Exercise,
  _swigc__p_ExponentialSplinesFitting,
  _swigc__p_Extrapolator,
  _swigc__p_FDAmericanEnginePtr,
  _swigc__p_FDBermudanEnginePtr,
  _swigc__p_FDDividendAmericanEnginePtr,
  _swigc__p_FDDividendEuropeanEnginePtr,
  _swigc__p_FDEuropeanEnginePtr,
  _swigc__p_FDShoutEnginePtr,
  _swigc__p_FFTVarianceGammaEnginePtr,
  _swigc__p_FRHICPPtr,
  _swigc__p_FalsePosition,
  _swigc__p_FdBatesVanillaEnginePtr,
  _swigc__p_FdBlackScholesAsianEnginePtr,
  _swigc__p_FdBlackScholesBarrierEnginePtr,
  _swigc__p_FdBlackScholesVanillaEnginePtr,
  _swigc__p_FdG2SwaptionEnginePtr,
  _swigc__p_FdHullWhiteSwaptionEnginePtr,
  _swigc__p_FdmSchemeDesc,
  _swigc__p_FedFundsPtr,
  _swigc__p_FittedBondDiscountCurvePtr,
  _swigc__p_FittingMethod,
  _swigc__p_FixedDividendPtr,
  _swigc__p_FixedRateBondForwardPtr,
  _swigc__p_FixedRateBondHelperPtr,
  _swigc__p_FixedRateBondPtr,
  _swigc__p_FixedRateCouponPtr,
  _swigc__p_FlatForwardPtr,
  _swigc__p_FlatHazardRatePtr,
  _swigc__p_FloatFloatSwapPtr,
  _swigc__p_FloatFloatSwaptionPtr,
  _swigc__p_FloatingRateBondPtr,
  _swigc__p_FloatingRateCouponPricer,
  _swigc__p_FloatingRateCouponPtr,
  _swigc__p_FloorPtr,
  _swigc__p_FloorTruncation,
  _swigc__p_ForwardCurvePtr,
  _swigc__p_ForwardEuropeanEnginePtr,
  _swigc__p_ForwardFlat,
  _swigc__p_ForwardFlatZeroCurvePtr,
  _swigc__p_ForwardPtr,
  _swigc__p_ForwardRate,
  _swigc__p_ForwardRateAgreementPtr,
  _swigc__p_ForwardSpreadedTermStructurePtr,
  _swigc__p_ForwardVanillaOptionPtr,
  _swigc__p_FraRateHelperPtr,
  _swigc__p_FractionalDividendPtr,
  _swigc__p_Futures,
  _swigc__p_FuturesRateHelperPtr,
  _swigc__p_FxSwapRateHelperPtr,
  _swigc__p_G2Ptr,
  _swigc__p_G2SwaptionEnginePtr,
  _swigc__p_GBPLiborPtr,
  _swigc__p_GFunctionFactory,
  _swigc__p_GammaFunction,
  _swigc__p_GapPayoffPtr,
  _swigc__p_GarmanKlassSigma1,
  _swigc__p_GarmanKlassSigma3,
  _swigc__p_GarmanKlassSigma4,
  _swigc__p_GarmanKlassSigma5,
  _swigc__p_GarmanKlassSigma6,
  _swigc__p_GarmanKohlagenProcessPtr,
  _swigc__p_GaussChebyshev2ndIntegration,
  _swigc__p_GaussChebyshevIntegration,
  _swigc__p_GaussGegenbauerIntegration,
  _swigc__p_GaussHermiteIntegration,
  _swigc__p_GaussHyperbolicIntegration,
  _swigc__p_GaussJacobiIntegration,
  _swigc__p_GaussKronrodAdaptive,
  _swigc__p_GaussKronrodNonAdaptive,
  _swigc__p_GaussLaguerreIntegration,
  _swigc__p_GaussLegendreIntegration,
  _swigc__p_GaussLobattoIntegral,
  _swigc__p_Gaussian1dFloatFloatSwaptionEnginePtr,
  _swigc__p_Gaussian1dJamshidianSwaptionEnginePtr,
  _swigc__p_Gaussian1dModel,
  _swigc__p_Gaussian1dNonstandardSwaptionEnginePtr,
  _swigc__p_Gaussian1dSwaptionEnginePtr,
  _swigc__p_GaussianLowDiscrepancySequenceGenerator,
  _swigc__p_GaussianMultiPathGenerator,
  _swigc__p_GaussianPathGenerator,
  _swigc__p_GaussianRandomGenerator,
  _swigc__p_GaussianRandomSequenceGenerator,
  _swigc__p_GaussianSimulatedAnnealing,
  _swigc__p_GaussianSobolPathGenerator,
  _swigc__p_GeneralizedBlackScholesProcessPtr,
  _swigc__p_GenericSequenceStatisticsT_IncrementalStatistics_t,
  _swigc__p_GenericSequenceStatisticsT_RiskStatistics_t,
  _swigc__p_GenericSequenceStatisticsT_Statistics_t,
  _swigc__p_GeometricBrownianMotionProcessPtr,
  _swigc__p_GsrProcessPtr,
  _swigc__p_GsrPtr,
  _swigc__p_HaltonRsg,
  _swigc__p_HandleT_BlackVolTermStructure_t,
  _swigc__p_HandleT_CalibratedModel_t,
  _swigc__p_HandleT_CapFloorTermVolatilityStructure_t,
  _swigc__p_HandleT_DefaultProbabilityTermStructure_t,
  _swigc__p_HandleT_DeltaVolQuote_t,
  _swigc__p_HandleT_LocalVolTermStructure_t,
  _swigc__p_HandleT_OptionletVolatilityStructure_t,
  _swigc__p_HandleT_Quote_t,
  _swigc__p_HandleT_ShortRateModel_t,
  _swigc__p_HandleT_SwaptionVolatilityStructure_t,
  _swigc__p_HandleT_YieldTermStructure_t,
  _swigc__p_HandleT_YoYInflationTermStructure_t,
  _swigc__p_HandleT_ZeroInflationTermStructure_t,
  _swigc__p_HazardRate,
  _swigc__p_HazardRateCurvePtr,
  _swigc__p_HestonModelHelperPtr,
  _swigc__p_HestonModelPtr,
  _swigc__p_HestonProcessPtr,
  _swigc__p_HimalayaOptionPtr,
  _swigc__p_HullWhiteForwardProcessPtr,
  _swigc__p_HullWhiteProcessPtr,
  _swigc__p_HullWhitePtr,
  _swigc__p_IMM,
  _swigc__p_IborCouponPricerPtr,
  _swigc__p_IborCouponPtr,
  _swigc__p_IborIndexPtr,
  _swigc__p_ImpliedTermStructurePtr,
  _swigc__p_IncrementalStatistics,
  _swigc__p_Index,
  _swigc__p_IndexManager,
  _swigc__p_InflationIndexPtr,
  _swigc__p_InflationTermStructure,
  _swigc__p_Instrument,
  _swigc__p_IntegralCdsEnginePtr,
  _swigc__p_IntegralEnginePtr,
  _swigc__p_InterestRate,
  _swigc__p_InterestRateIndexPtr,
  _swigc__p_IntervalPrice,
  _swigc__p_InverseCumulativeNormal,
  _swigc__p_InverseCumulativePoisson,
  _swigc__p_InverseCumulativeRngT_KnuthUniformRng_InverseCumulativeNormal_t,
  _swigc__p_InverseCumulativeRngT_KnuthUniformRng_MoroInverseCumulativeNormal_t,
  _swigc__p_InverseCumulativeRngT_LecuyerUniformRng_InverseCumulativeNormal_t,
  _swigc__p_InverseCumulativeRngT_LecuyerUniformRng_MoroInverseCumulativeNormal_t,
  _swigc__p_InverseCumulativeRngT_MersenneTwisterUniformRng_InverseCumulativeNormal_t,
  _swigc__p_InverseCumulativeRngT_MersenneTwisterUniformRng_MoroInverseCumulativeNormal_t,
  _swigc__p_InverseCumulativeRsgT_HaltonRsg_InverseCumulativeNormal_t,
  _swigc__p_InverseCumulativeRsgT_HaltonRsg_MoroInverseCumulativeNormal_t,
  _swigc__p_InverseCumulativeRsgT_RandomSequenceGeneratorT_KnuthUniformRng_t_InverseCumulativeNormal_t,
  _swigc__p_InverseCumulativeRsgT_RandomSequenceGeneratorT_KnuthUniformRng_t_MoroInverseCumulativeNormal_t,
  _swigc__p_InverseCumulativeRsgT_RandomSequenceGeneratorT_LecuyerUniformRng_t_InverseCumulativeNormal_t,
  _swigc__p_InverseCumulativeRsgT_RandomSequenceGeneratorT_LecuyerUniformRng_t_MoroInverseCumulativeNormal_t,
  _swigc__p_InverseCumulativeRsgT_RandomSequenceGeneratorT_MersenneTwisterUniformRng_t_InverseCumulativeNormal_t,
  _swigc__p_InverseCumulativeRsgT_RandomSequenceGeneratorT_MersenneTwisterUniformRng_t_MoroInverseCumulativeNormal_t,
  _swigc__p_InverseCumulativeRsgT_SobolRsg_InverseCumulativeNormal_t,
  _swigc__p_InverseCumulativeRsgT_SobolRsg_MoroInverseCumulativeNormal_t,
  _swigc__p_InverseCumulativeStudent,
  _swigc__p_InverseNonCentralCumulativeChiSquareDistribution,
  _swigc__p_JPYLiborPtr,
  _swigc__p_JamshidianSwaptionEnginePtr,
  _swigc__p_JibarPtr,
  _swigc__p_KnuthUniformRng,
  _swigc__p_LecuyerUniformRng,
  _swigc__p_LevenbergMarquardt,
  _swigc__p_LiborPtr,
  _swigc__p_Linear,
  _swigc__p_LinearTsrPricerPtr,
  _swigc__p_LinearTsrPricer__Settings,
  _swigc__p_LocalConstantVolPtr,
  _swigc__p_LocalVolSurfacePtr,
  _swigc__p_LocalVolTermStructure,
  _swigc__p_LogCubicZeroCurvePtr,
  _swigc__p_LogLinear,
  _swigc__p_LogLinearZeroCurvePtr,
  _swigc__p_LogNormalSimulatedAnnealing,
  _swigc__p_MCAmericanBasketEnginePtr,
  _swigc__p_MCBarrierEnginePtr,
  _swigc__p_MCDiscreteArithmeticAPEnginePtr,
  _swigc__p_MCDiscreteArithmeticASEnginePtr,
  _swigc__p_MCDiscreteGeometricAPEnginePtr,
  _swigc__p_MCEuropeanBasketEnginePtr,
  _swigc__p_MCEuropeanEnginePtr,
  _swigc__p_MCEverestEnginePtr,
  _swigc__p_MCHimalayaEnginePtr,
  _swigc__p_MarkovFunctionalPtr,
  _swigc__p_MarkovFunctional__ModelSettings,
  _swigc__p_Matrix,
  _swigc__p_MaxBasketPayoffPtr,
  _swigc__p_MersenneTwisterUniformRng,
  _swigc__p_Merton76ProcessPtr,
  _swigc__p_MidPointCdsEnginePtr,
  _swigc__p_MinBasketPayoffPtr,
  _swigc__p_MirrorGaussianSimulatedAnnealing,
  _swigc__p_Money,
  _swigc__p_MonotonicCubic,
  _swigc__p_MonotonicCubicZeroCurvePtr,
  _swigc__p_MonotonicLogCubic,
  _swigc__p_MoroInverseCumulativeNormal,
  _swigc__p_MultiAssetOptionPtr,
  _swigc__p_MultiPath,
  _swigc__p_MultiplicativePriceSeasonalityPtr,
  _swigc__p_NZDLiborPtr,
  _swigc__p_NelsonSiegelFitting,
  _swigc__p_NeumannBCPtr,
  _swigc__p_NoConstraint,
  _swigc__p_NonCentralCumulativeChiSquareDistribution,
  _swigc__p_NonhomogeneousBoundaryConstraint,
  _swigc__p_NonstandardSwapPtr,
  _swigc__p_NonstandardSwaptionPtr,
  _swigc__p_NormalDistribution,
  _swigc__p_NullParameter,
  _swigc__p_NumericHaganPricerPtr,
  _swigc__p_NzocrPtr,
  _swigc__p_OISRateHelperPtr,
  _swigc__p_Observable,
  _swigc__p_OptimizationMethod,
  _swigc__p_Optimizer,
  _swigc__p_Option,
  _swigc__p_OptionletStripper1Ptr,
  _swigc__p_OptionletVolatilityStructure,
  _swigc__p_OvernightIndexPtr,
  _swigc__p_Parameter,
  _swigc__p_ParkinsonSigma,
  _swigc__p_Path,
  _swigc__p_Payoff,
  _swigc__p_PercentageStrikePayoffPtr,
  _swigc__p_Period,
  _swigc__p_PeriodParser,
  _swigc__p_PiecewiseConstantParameter,
  _swigc__p_PiecewiseCubicZeroPtr,
  _swigc__p_PiecewiseFlatForwardPtr,
  _swigc__p_PiecewiseFlatHazardRatePtr,
  _swigc__p_PiecewiseLinearForwardPtr,
  _swigc__p_PiecewiseLinearZeroPtr,
  _swigc__p_PiecewiseLogCubicDiscountPtr,
  _swigc__p_PiecewiseTimeDependentHestonModelPtr,
  _swigc__p_PiecewiseYoYInflationPtr,
  _swigc__p_PiecewiseZeroInflationPtr,
  _swigc__p_Pillar,
  _swigc__p_PlainVanillaPayoffPtr,
  _swigc__p_PoissonDistribution,
  _swigc__p_Position,
  _swigc__p_PositiveConstraint,
  _swigc__p_PricingEngine,
  _swigc__p_ProbabilityBoltzmannDownhill,
  _swigc__p_Protection,
  _swigc__p_QuantLib__ARSCurrency,
  _swigc__p_QuantLib__ATSCurrency,
  _swigc__p_QuantLib__AUDCurrency,
  _swigc__p_QuantLib__Actual360,
  _swigc__p_QuantLib__Actual365Fixed,
  _swigc__p_QuantLib__ActualActual,
  _swigc__p_QuantLib__Argentina,
  _swigc__p_QuantLib__Australia,
  _swigc__p_QuantLib__BDTCurrency,
  _swigc__p_QuantLib__BEFCurrency,
  _swigc__p_QuantLib__BGLCurrency,
  _swigc__p_QuantLib__BRLCurrency,
  _swigc__p_QuantLib__BYRCurrency,
  _swigc__p_QuantLib__BespokeCalendar,
  _swigc__p_QuantLib__Brazil,
  _swigc__p_QuantLib__Business252,
  _swigc__p_QuantLib__CADCurrency,
  _swigc__p_QuantLib__CHFCurrency,
  _swigc__p_QuantLib__CLPCurrency,
  _swigc__p_QuantLib__CNYCurrency,
  _swigc__p_QuantLib__COPCurrency,
  _swigc__p_QuantLib__CYPCurrency,
  _swigc__p_QuantLib__CZKCurrency,
  _swigc__p_QuantLib__Canada,
  _swigc__p_QuantLib__China,
  _swigc__p_QuantLib__CzechRepublic,
  _swigc__p_QuantLib__DEMCurrency,
  _swigc__p_QuantLib__DKKCurrency,
  _swigc__p_QuantLib__Denmark,
  _swigc__p_QuantLib__EEKCurrency,
  _swigc__p_QuantLib__ESPCurrency,
  _swigc__p_QuantLib__EURCurrency,
  _swigc__p_QuantLib__FIMCurrency,
  _swigc__p_QuantLib__FRFCurrency,
  _swigc__p_QuantLib__Finland,
  _swigc__p_QuantLib__GBPCurrency,
  _swigc__p_QuantLib__GRDCurrency,
  _swigc__p_QuantLib__Germany,
  _swigc__p_QuantLib__HKDCurrency,
  _swigc__p_QuantLib__HUFCurrency,
  _swigc__p_QuantLib__HongKong,
  _swigc__p_QuantLib__Hungary,
  _swigc__p_QuantLib__IDRCurrency,
  _swigc__p_QuantLib__IEPCurrency,
  _swigc__p_QuantLib__ILSCurrency,
  _swigc__p_QuantLib__INRCurrency,
  _swigc__p_QuantLib__IQDCurrency,
  _swigc__p_QuantLib__IRRCurrency,
  _swigc__p_QuantLib__ISKCurrency,
  _swigc__p_QuantLib__ITLCurrency,
  _swigc__p_QuantLib__Iceland,
  _swigc__p_QuantLib__India,
  _swigc__p_QuantLib__Indonesia,
  _swigc__p_QuantLib__Israel,
  _swigc__p_QuantLib__Italy,
  _swigc__p_QuantLib__JPYCurrency,
  _swigc__p_QuantLib__Japan,
  _swigc__p_QuantLib__JointCalendar,
  _swigc__p_QuantLib__KRWCurrency,
  _swigc__p_QuantLib__KWDCurrency,
  _swigc__p_QuantLib__LTLCurrency,
  _swigc__p_QuantLib__LUFCurrency,
  _swigc__p_QuantLib__LVLCurrency,
  _swigc__p_QuantLib__MTLCurrency,
  _swigc__p_QuantLib__MXNCurrency,
  _swigc__p_QuantLib__MYRCurrency,
  _swigc__p_QuantLib__Mexico,
  _swigc__p_QuantLib__NLGCurrency,
  _swigc__p_QuantLib__NOKCurrency,
  _swigc__p_QuantLib__NPRCurrency,
  _swigc__p_QuantLib__NZDCurrency,
  _swigc__p_QuantLib__NewZealand,
  _swigc__p_QuantLib__Norway,
  _swigc__p_QuantLib__NullCalendar,
  _swigc__p_QuantLib__OneDayCounter,
  _swigc__p_QuantLib__PEHCurrency,
  _swigc__p_QuantLib__PEICurrency,
  _swigc__p_QuantLib__PENCurrency,
  _swigc__p_QuantLib__PKRCurrency,
  _swigc__p_QuantLib__PLNCurrency,
  _swigc__p_QuantLib__PTECurrency,
  _swigc__p_QuantLib__Poland,
  _swigc__p_QuantLib__ROLCurrency,
  _swigc__p_QuantLib__RONCurrency,
  _swigc__p_QuantLib__RUBCurrency,
  _swigc__p_QuantLib__Romania,
  _swigc__p_QuantLib__Russia,
  _swigc__p_QuantLib__SARCurrency,
  _swigc__p_QuantLib__SEKCurrency,
  _swigc__p_QuantLib__SGDCurrency,
  _swigc__p_QuantLib__SITCurrency,
  _swigc__p_QuantLib__SKKCurrency,
  _swigc__p_QuantLib__SaudiArabia,
  _swigc__p_QuantLib__SimpleDayCounter,
  _swigc__p_QuantLib__Singapore,
  _swigc__p_QuantLib__Slovakia,
  _swigc__p_QuantLib__SouthAfrica,
  _swigc__p_QuantLib__SouthKorea,
  _swigc__p_QuantLib__Sweden,
  _swigc__p_QuantLib__Switzerland,
  _swigc__p_QuantLib__TARGET,
  _swigc__p_QuantLib__THBCurrency,
  _swigc__p_QuantLib__TRLCurrency,
  _swigc__p_QuantLib__TRYCurrency,
  _swigc__p_QuantLib__TTDCurrency,
  _swigc__p_QuantLib__TWDCurrency,
  _swigc__p_QuantLib__Taiwan,
  _swigc__p_QuantLib__Thirty360,
  _swigc__p_QuantLib__Turkey,
  _swigc__p_QuantLib__USDCurrency,
  _swigc__p_QuantLib__Ukraine,
  _swigc__p_QuantLib__UnitedKingdom,
  _swigc__p_QuantLib__UnitedStates,
  _swigc__p_QuantLib__VEBCurrency,
  _swigc__p_QuantLib__VNDCurrency,
  _swigc__p_QuantLib__WeekendsOnly,
  _swigc__p_QuantLib__ZARCurrency,
  _swigc__p_QuantoDoubleBarrierOptionPtr,
  _swigc__p_QuantoEuropeanEnginePtr,
  _swigc__p_QuantoForwardEuropeanEnginePtr,
  _swigc__p_QuantoForwardVanillaOptionPtr,
  _swigc__p_QuantoVanillaOptionPtr,
  _swigc__p_Quote,
  _swigc__p_RandomSequenceGeneratorT_KnuthUniformRng_t,
  _swigc__p_RandomSequenceGeneratorT_LecuyerUniformRng_t,
  _swigc__p_RandomSequenceGeneratorT_MersenneTwisterUniformRng_t,
  _swigc__p_RateHelper,
  _swigc__p_RealTimeSeries,
  _swigc__p_ReannealingTrivial,
  _swigc__p_RebatedExercisePtr,
  _swigc__p_RedemptionPtr,
  _swigc__p_Region,
  _swigc__p_RelinkableHandleT_BlackVolTermStructure_t,
  _swigc__p_RelinkableHandleT_CalibratedModel_t,
  _swigc__p_RelinkableHandleT_CapFloorTermVolatilityStructure_t,
  _swigc__p_RelinkableHandleT_DefaultProbabilityTermStructure_t,
  _swigc__p_RelinkableHandleT_DeltaVolQuote_t,
  _swigc__p_RelinkableHandleT_LocalVolTermStructure_t,
  _swigc__p_RelinkableHandleT_OptionletVolatilityStructure_t,
  _swigc__p_RelinkableHandleT_Quote_t,
  _swigc__p_RelinkableHandleT_ShortRateModel_t,
  _swigc__p_RelinkableHandleT_SwaptionVolatilityStructure_t,
  _swigc__p_RelinkableHandleT_YieldTermStructure_t,
  _swigc__p_RelinkableHandleT_YoYInflationTermStructure_t,
  _swigc__p_RelinkableHandleT_ZeroInflationTermStructure_t,
  _swigc__p_Ridder,
  _swigc__p_RiskStatistics,
  _swigc__p_Rounding,
  _swigc__p_SEKLiborPtr,
  _swigc__p_SVD,
  _swigc__p_SafeBackwardFlatInterpolation,
  _swigc__p_SafeBicubicSpline,
  _swigc__p_SafeBilinearInterpolation,
  _swigc__p_SafeCubicNaturalSpline,
  _swigc__p_SafeForwardFlatInterpolation,
  _swigc__p_SafeFritschButlandCubic,
  _swigc__p_SafeFritschButlandLogCubic,
  _swigc__p_SafeKrugerCubic,
  _swigc__p_SafeKrugerLogCubic,
  _swigc__p_SafeLinearInterpolation,
  _swigc__p_SafeLogCubicNaturalSpline,
  _swigc__p_SafeLogLinearInterpolation,
  _swigc__p_SafeLogParabolic,
  _swigc__p_SafeMonotonicCubicNaturalSpline,
  _swigc__p_SafeMonotonicLogCubicNaturalSpline,
  _swigc__p_SafeMonotonicLogParabolic,
  _swigc__p_SafeMonotonicParabolic,
  _swigc__p_SafeParabolic,
  _swigc__p_SalvagingAlgorithm,
  _swigc__p_SampleT_Array_t,
  _swigc__p_SampleT_MultiPath_t,
  _swigc__p_SampleT_Path_t,
  _swigc__p_SampleT_double_t,
  _swigc__p_SampleT_std__vectorT_double_t_t,
  _swigc__p_SampledCurve,
  _swigc__p_SamplerGaussian,
  _swigc__p_SamplerLogNormal,
  _swigc__p_SamplerMirrorGaussian,
  _swigc__p_Schedule,
  _swigc__p_Seasonality,
  _swigc__p_Secant,
  _swigc__p_SegmentIntegral,
  _swigc__p_Settings,
  _swigc__p_Settlement,
  _swigc__p_ShortRateModel,
  _swigc__p_SimpleCashFlowPtr,
  _swigc__p_SimplePolynomialFitting,
  _swigc__p_SimpleQuotePtr,
  _swigc__p_Simplex,
  _swigc__p_SimpsonIntegral,
  _swigc__p_SobolBrownianBridgeRsg,
  _swigc__p_SobolRsg,
  _swigc__p_SoftCallabilityPtr,
  _swigc__p_SoniaPtr,
  _swigc__p_SpreadCdsHelperPtr,
  _swigc__p_SpreadedLinearZeroInterpolatedTermStructurePtr,
  _swigc__p_Statistics,
  _swigc__p_SteepestDescent,
  _swigc__p_StochasticProcess,
  _swigc__p_StochasticProcess1DPtr,
  _swigc__p_StochasticProcessArrayPtr,
  _swigc__p_StockPtr,
  _swigc__p_StrippedOptionletAdapterPtr,
  _swigc__p_StrippedOptionletBase,
  _swigc__p_StudentDistribution,
  _swigc__p_StulzEnginePtr,
  _swigc__p_SuperSharePayoffPtr,
  _swigc__p_SvenssonFitting,
  _swigc__p_SwapIndexPtr,
  _swigc__p_SwapPtr,
  _swigc__p_SwapRateHelperPtr,
  _swigc__p_SwaptionHelperPtr,
  _swigc__p_SwaptionPtr,
  _swigc__p_SwaptionVolCube1Ptr,
  _swigc__p_SwaptionVolCube2Ptr,
  _swigc__p_SwaptionVolatilityMatrixPtr,
  _swigc__p_SwaptionVolatilityStructure,
  _swigc__p_TRLiborPtr,
  _swigc__p_TemperatureExponential,
  _swigc__p_TiborPtr,
  _swigc__p_TimeBasket,
  _swigc__p_TimeGrid,
  _swigc__p_TimeSeriesT_IntervalPrice_std__mapT_Date_IntervalPrice_t_t,
  _swigc__p_TimeSeriesT_double_std__mapT_Date_double_t_t,
  _swigc__p_TrapezoidIntegralT_Default_t,
  _swigc__p_TrapezoidIntegralT_MidPoint_t,
  _swigc__p_TreeCallableFixedRateBondEnginePtr,
  _swigc__p_TreeCapFloorEnginePtr,
  _swigc__p_TreeSwaptionEnginePtr,
  _swigc__p_TridiagonalOperator,
  _swigc__p_UKRPIPtr,
  _swigc__p_USCPIPtr,
  _swigc__p_USDLiborPtr,
  _swigc__p_UniformLowDiscrepancySequenceGenerator,
  _swigc__p_UniformRandomGenerator,
  _swigc__p_UniformRandomSequenceGenerator,
  _swigc__p_UpRounding,
  _swigc__p_UpfrontCdsHelperPtr,
  _swigc__p_VanillaOptionPtr,
  _swigc__p_VanillaSwapPtr,
  _swigc__p_VannaVolgaDoubleBarrierEnginePtr,
  _swigc__p_VarianceGammaEnginePtr,
  _swigc__p_VarianceGammaProcessPtr,
  _swigc__p_VasicekPtr,
  _swigc__p_WulinYongDoubleBarrierEnginePtr,
  _swigc__p_YYEUHICPPtr,
  _swigc__p_YYEUHICPXTPtr,
  _swigc__p_YYFRHICPPtr,
  _swigc__p_YYUKRPIPtr,
  _swigc__p_YYUSCPIPtr,
  _swigc__p_YYZACPIPtr,
  _swigc__p_YearOnYearInflationSwapHelperPtr,
  _swigc__p_YearOnYearInflationSwapPtr,
  _swigc__p_YieldTermStructure,
  _swigc__p_YoYHelper,
  _swigc__p_YoYInflationCapFloorPtr,
  _swigc__p_YoYInflationCapPtr,
  _swigc__p_YoYInflationCollarPtr,
  _swigc__p_YoYInflationFloorPtr,
  _swigc__p_YoYInflationIndexPtr,
  _swigc__p_YoYInflationTermStructure,
  _swigc__p_ZACPIPtr,
  _swigc__p_ZeroCouponBondPtr,
  _swigc__p_ZeroCouponInflationSwapHelperPtr,
  _swigc__p_ZeroCouponInflationSwapPtr,
  _swigc__p_ZeroCurvePtr,
  _swigc__p_ZeroHelper,
  _swigc__p_ZeroInflationIndexPtr,
  _swigc__p_ZeroInflationTermStructure,
  _swigc__p_ZeroSpreadedTermStructurePtr,
  _swigc__p_ZeroYield,
  _swigc__p_ZiborPtr,
  _swigc__p_boost__shared_ptrT_BlackVolTermStructure_t,
  _swigc__p_boost__shared_ptrT_CalibratedModel_t,
  _swigc__p_boost__shared_ptrT_CalibrationHelper_t,
  _swigc__p_boost__shared_ptrT_Callability_t,
  _swigc__p_boost__shared_ptrT_CapFloorTermVolatilityStructure_t,
  _swigc__p_boost__shared_ptrT_CashFlow_t,
  _swigc__p_boost__shared_ptrT_DefaultBoundaryCondition_t,
  _swigc__p_boost__shared_ptrT_DefaultProbabilityHelper_t,
  _swigc__p_boost__shared_ptrT_DefaultProbabilityTermStructure_t,
  _swigc__p_boost__shared_ptrT_DeltaVolQuote_t,
  _swigc__p_boost__shared_ptrT_Dividend_t,
  _swigc__p_boost__shared_ptrT_EndCriteria_t,
  _swigc__p_boost__shared_ptrT_Exercise_t,
  _swigc__p_boost__shared_ptrT_FloatingRateCouponPricer_t,
  _swigc__p_boost__shared_ptrT_Gaussian1dModel_t,
  _swigc__p_boost__shared_ptrT_IborIndex_t,
  _swigc__p_boost__shared_ptrT_Index_t,
  _swigc__p_boost__shared_ptrT_Instrument_t,
  _swigc__p_boost__shared_ptrT_LocalVolTermStructure_t,
  _swigc__p_boost__shared_ptrT_Observable_t,
  _swigc__p_boost__shared_ptrT_OptimizationMethod_t,
  _swigc__p_boost__shared_ptrT_OptionletVolatilityStructure_t,
  _swigc__p_boost__shared_ptrT_Payoff_t,
  _swigc__p_boost__shared_ptrT_PricingEngine_t,
  _swigc__p_boost__shared_ptrT_Quote_t,
  _swigc__p_boost__shared_ptrT_RateHelper_t,
  _swigc__p_boost__shared_ptrT_Seasonality_t,
  _swigc__p_boost__shared_ptrT_ShortRateModel_t,
  _swigc__p_boost__shared_ptrT_StochasticProcess_t,
  _swigc__p_boost__shared_ptrT_StrippedOptionletBase_t,
  _swigc__p_boost__shared_ptrT_SwapIndex_t,
  _swigc__p_boost__shared_ptrT_SwaptionVolatilityStructure_t,
  _swigc__p_boost__shared_ptrT_YieldTermStructure_t,
  _swigc__p_boost__shared_ptrT_YoYHelper_t,
  _swigc__p_boost__shared_ptrT_YoYInflationTermStructure_t,
  _swigc__p_boost__shared_ptrT_ZeroHelper_t,
  _swigc__p_boost__shared_ptrT_ZeroInflationTermStructure_t,
  _swigc__p_char,
  _swigc__p_double,
  _swigc__p_doubleOrNull,
  _swigc__p_int,
  _swigc__p_intOrNull,
  _swigc__p_long,
  _swigc__p_size_type,
  _swigc__p_std__out_of_range,
  _swigc__p_std__pairT_Date_double_t,
  _swigc__p_std__size_t,
  _swigc__p_std__vectorT_Date_t,
  _swigc__p_std__vectorT_HandleT_Quote_t_t,
  _swigc__p_std__vectorT_InterestRate_t,
  _swigc__p_std__vectorT_IntervalPrice_t,
  _swigc__p_std__vectorT_Period_t,
  _swigc__p_std__vectorT_RelinkableHandleT_Quote_t_t,
  _swigc__p_std__vectorT_bool_t,
  _swigc__p_std__vectorT_boost__shared_ptrT_CalibrationHelper_t_t,
  _swigc__p_std__vectorT_boost__shared_ptrT_Callability_t_t,
  _swigc__p_std__vectorT_boost__shared_ptrT_CashFlow_t_t,
  _swigc__p_std__vectorT_boost__shared_ptrT_DefaultProbabilityHelper_t_t,
  _swigc__p_std__vectorT_boost__shared_ptrT_Dividend_t_t,
  _swigc__p_std__vectorT_boost__shared_ptrT_Instrument_t_t,
  _swigc__p_std__vectorT_boost__shared_ptrT_Quote_t_t,
  _swigc__p_std__vectorT_boost__shared_ptrT_RateHelper_t_t,
  _swigc__p_std__vectorT_boost__shared_ptrT_StochasticProcess_t_t,
  _swigc__p_std__vectorT_boost__shared_ptrT_YoYHelper_t_t,
  _swigc__p_std__vectorT_boost__shared_ptrT_ZeroHelper_t_t,
  _swigc__p_std__vectorT_double_t,
  _swigc__p_std__vectorT_int_t,
  _swigc__p_std__vectorT_std__pairT_Date_double_t_t,
  _swigc__p_std__vectorT_std__string_t,
  _swigc__p_std__vectorT_std__vectorT_HandleT_Quote_t_t_t,
  _swigc__p_std__vectorT_std__vectorT_RelinkableHandleT_Quote_t_t_t,
  _swigc__p_std__vectorT_std__vectorT_boost__shared_ptrT_Quote_t_t_t,
  _swigc__p_std__vectorT_std__vectorT_double_t_t,
  _swigc__p_std__vectorT_unsigned_int_t,
  _swigc__p_unsigned_int,
  _swigc__p_unsigned_long,
  _swigc__p_value_type,
};


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

static swig_constant_info swig_constants[] = {
{0,0,0,0,0,0}
};
#ifdef __cplusplus
}
#endif
static swig_variable_info swig_variables[] = {
{0,0,0,0}
};
static swig_command_info swig_commands[] = {
{"QuantLibc::Period_length", _wrap_Period_length},
{"QuantLibc::Period_units", _wrap_Period_units},
{"QuantLibc::Period_frequency", _wrap_Period_frequency},
{"QuantLibc::new_Period", _wrap_new_Period},
{"QuantLibc::Period_to_string", _wrap_Period_to_string},
{"QuantLibc::Period___repr__", _wrap_Period___repr__},
{"QuantLibc::delete_Period", _wrap_delete_Period},
{"QuantLibc::new_PeriodVector", _wrap_new_PeriodVector},
{"QuantLibc::PeriodVector_size", _wrap_PeriodVector_size},
{"QuantLibc::PeriodVector_empty", _wrap_PeriodVector_empty},
{"QuantLibc::PeriodVector_clear", _wrap_PeriodVector_clear},
{"QuantLibc::PeriodVector_push", _wrap_PeriodVector_push},
{"QuantLibc::PeriodVector_pop", _wrap_PeriodVector_pop},
{"QuantLibc::PeriodVector_get", _wrap_PeriodVector_get},
{"QuantLibc::PeriodVector_set", _wrap_PeriodVector_set},
{"QuantLibc::delete_PeriodVector", _wrap_delete_PeriodVector},
{"QuantLibc::Date_weekday", _wrap_Date_weekday},
{"QuantLibc::Date_dayOfMonth", _wrap_Date_dayOfMonth},
{"QuantLibc::Date_dayOfYear", _wrap_Date_dayOfYear},
{"QuantLibc::Date_month", _wrap_Date_month},
{"QuantLibc::Date_year", _wrap_Date_year},
{"QuantLibc::Date_hours", _wrap_Date_hours},
{"QuantLibc::Date_minutes", _wrap_Date_minutes},
{"QuantLibc::Date_seconds", _wrap_Date_seconds},
{"QuantLibc::Date_milliseconds", _wrap_Date_milliseconds},
{"QuantLibc::Date_microseconds", _wrap_Date_microseconds},
{"QuantLibc::Date_fractionOfDay", _wrap_Date_fractionOfDay},
{"QuantLibc::Date_fractionOfSecond", _wrap_Date_fractionOfSecond},
{"QuantLibc::Date_serialNumber", _wrap_Date_serialNumber},
{"QuantLibc::Date_isLeap", _wrap_Date_isLeap},
{"QuantLibc::Date_minDate", _wrap_Date_minDate},
{"QuantLibc::Date_maxDate", _wrap_Date_maxDate},
{"QuantLibc::Date_todaysDate", _wrap_Date_todaysDate},
{"QuantLibc::Date_localDateTime", _wrap_Date_localDateTime},
{"QuantLibc::Date_universalDateTime", _wrap_Date_universalDateTime},
{"QuantLibc::Date_endOfMonth", _wrap_Date_endOfMonth},
{"QuantLibc::Date_isEndOfMonth", _wrap_Date_isEndOfMonth},
{"QuantLibc::Date_nextWeekday", _wrap_Date_nextWeekday},
{"QuantLibc::Date_nthWeekday", _wrap_Date_nthWeekday},
{"QuantLibc::new_Date", _wrap_new_Date},
{"QuantLibc::Date_weekdayNumber", _wrap_Date_weekdayNumber},
{"QuantLibc::Date_to_string", _wrap_Date_to_string},
{"QuantLibc::Date___repr__", _wrap_Date___repr__},
{"QuantLibc::Date_ISO", _wrap_Date_ISO},
{"QuantLibc::delete_Date", _wrap_delete_Date},
{"QuantLibc::DateParser_parseFormatted", _wrap_DateParser_parseFormatted},
{"QuantLibc::DateParser_parseISO", _wrap_DateParser_parseISO},
{"QuantLibc::DateParser_parse", _wrap_DateParser_parse},
{"QuantLibc::new_DateParser", _wrap_new_DateParser},
{"QuantLibc::delete_DateParser", _wrap_delete_DateParser},
{"QuantLibc::PeriodParser_parse", _wrap_PeriodParser_parse},
{"QuantLibc::new_PeriodParser", _wrap_new_PeriodParser},
{"QuantLibc::delete_PeriodParser", _wrap_delete_PeriodParser},
{"QuantLibc::new_DateVector", _wrap_new_DateVector},
{"QuantLibc::DateVector_size", _wrap_DateVector_size},
{"QuantLibc::DateVector_empty", _wrap_DateVector_empty},
{"QuantLibc::DateVector_clear", _wrap_DateVector_clear},
{"QuantLibc::DateVector_push", _wrap_DateVector_push},
{"QuantLibc::DateVector_pop", _wrap_DateVector_pop},
{"QuantLibc::DateVector_get", _wrap_DateVector_get},
{"QuantLibc::DateVector_set", _wrap_DateVector_set},
{"QuantLibc::delete_DateVector", _wrap_delete_DateVector},
{"QuantLibc::IMM_isIMMdate", _wrap_IMM_isIMMdate},
{"QuantLibc::IMM_isIMMcode", _wrap_IMM_isIMMcode},
{"QuantLibc::IMM_code", _wrap_IMM_code},
{"QuantLibc::IMM_date", _wrap_IMM_date},
{"QuantLibc::IMM_nextDate", _wrap_IMM_nextDate},
{"QuantLibc::IMM_nextCode", _wrap_IMM_nextCode},
{"QuantLibc::new_IMM", _wrap_new_IMM},
{"QuantLibc::delete_IMM", _wrap_delete_IMM},
{"QuantLibc::ASX_isASXdate", _wrap_ASX_isASXdate},
{"QuantLibc::ASX_isASXcode", _wrap_ASX_isASXcode},
{"QuantLibc::ASX_code", _wrap_ASX_code},
{"QuantLibc::ASX_date", _wrap_ASX_date},
{"QuantLibc::ASX_nextDate", _wrap_ASX_nextDate},
{"QuantLibc::ASX_nextCode", _wrap_ASX_nextCode},
{"QuantLibc::new_ASX", _wrap_new_ASX},
{"QuantLibc::delete_ASX", _wrap_delete_ASX},
{"QuantLibc::new_IntVector", _wrap_new_IntVector},
{"QuantLibc::IntVector_size", _wrap_IntVector_size},
{"QuantLibc::IntVector_empty", _wrap_IntVector_empty},
{"QuantLibc::IntVector_clear", _wrap_IntVector_clear},
{"QuantLibc::IntVector_push", _wrap_IntVector_push},
{"QuantLibc::IntVector_pop", _wrap_IntVector_pop},
{"QuantLibc::IntVector_get", _wrap_IntVector_get},
{"QuantLibc::IntVector_set", _wrap_IntVector_set},
{"QuantLibc::delete_IntVector", _wrap_delete_IntVector},
{"QuantLibc::new_UnsignedIntVector", _wrap_new_UnsignedIntVector},
{"QuantLibc::UnsignedIntVector_size", _wrap_UnsignedIntVector_size},
{"QuantLibc::UnsignedIntVector_empty", _wrap_UnsignedIntVector_empty},
{"QuantLibc::UnsignedIntVector_clear", _wrap_UnsignedIntVector_clear},
{"QuantLibc::UnsignedIntVector_push", _wrap_UnsignedIntVector_push},
{"QuantLibc::UnsignedIntVector_pop", _wrap_UnsignedIntVector_pop},
{"QuantLibc::UnsignedIntVector_get", _wrap_UnsignedIntVector_get},
{"QuantLibc::UnsignedIntVector_set", _wrap_UnsignedIntVector_set},
{"QuantLibc::delete_UnsignedIntVector", _wrap_delete_UnsignedIntVector},
{"QuantLibc::new_DoubleVector", _wrap_new_DoubleVector},
{"QuantLibc::DoubleVector_size", _wrap_DoubleVector_size},
{"QuantLibc::DoubleVector_empty", _wrap_DoubleVector_empty},
{"QuantLibc::DoubleVector_clear", _wrap_DoubleVector_clear},
{"QuantLibc::DoubleVector_push", _wrap_DoubleVector_push},
{"QuantLibc::DoubleVector_pop", _wrap_DoubleVector_pop},
{"QuantLibc::DoubleVector_get", _wrap_DoubleVector_get},
{"QuantLibc::DoubleVector_set", _wrap_DoubleVector_set},
{"QuantLibc::delete_DoubleVector", _wrap_delete_DoubleVector},
{"QuantLibc::new_StrVector", _wrap_new_StrVector},
{"QuantLibc::StrVector_size", _wrap_StrVector_size},
{"QuantLibc::StrVector_empty", _wrap_StrVector_empty},
{"QuantLibc::StrVector_clear", _wrap_StrVector_clear},
{"QuantLibc::StrVector_push", _wrap_StrVector_push},
{"QuantLibc::StrVector_pop", _wrap_StrVector_pop},
{"QuantLibc::StrVector_get", _wrap_StrVector_get},
{"QuantLibc::StrVector_set", _wrap_StrVector_set},
{"QuantLibc::delete_StrVector", _wrap_delete_StrVector},
{"QuantLibc::new_BoolVector", _wrap_new_BoolVector},
{"QuantLibc::BoolVector_size", _wrap_BoolVector_size},
{"QuantLibc::BoolVector_empty", _wrap_BoolVector_empty},
{"QuantLibc::BoolVector_clear", _wrap_BoolVector_clear},
{"QuantLibc::BoolVector_push", _wrap_BoolVector_push},
{"QuantLibc::BoolVector_pop", _wrap_BoolVector_pop},
{"QuantLibc::BoolVector_get", _wrap_BoolVector_get},
{"QuantLibc::BoolVector_set", _wrap_BoolVector_set},
{"QuantLibc::delete_BoolVector", _wrap_delete_BoolVector},
{"QuantLibc::new_NodePair", _wrap_new_NodePair},
{"QuantLibc::NodePair_first_set", _wrap_NodePair_first_set},
{"QuantLibc::NodePair_first_get", _wrap_NodePair_first_get},
{"QuantLibc::NodePair_second_set", _wrap_NodePair_second_set},
{"QuantLibc::NodePair_second_get", _wrap_NodePair_second_get},
{"QuantLibc::delete_NodePair", _wrap_delete_NodePair},
{"QuantLibc::new_NodeVector", _wrap_new_NodeVector},
{"QuantLibc::NodeVector_size", _wrap_NodeVector_size},
{"QuantLibc::NodeVector_empty", _wrap_NodeVector_empty},
{"QuantLibc::NodeVector_clear", _wrap_NodeVector_clear},
{"QuantLibc::NodeVector_push", _wrap_NodeVector_push},
{"QuantLibc::NodeVector_pop", _wrap_NodeVector_pop},
{"QuantLibc::NodeVector_get", _wrap_NodeVector_get},
{"QuantLibc::NodeVector_set", _wrap_NodeVector_set},
{"QuantLibc::delete_NodeVector", _wrap_delete_NodeVector},
{"QuantLibc::Exercise___deref__", _wrap_Exercise___deref__},
{"QuantLibc::Exercise_isNull", _wrap_Exercise_isNull},
{"QuantLibc::Exercise_exerciseType", _wrap_Exercise_exerciseType},
{"QuantLibc::new_Exercise", _wrap_new_Exercise},
{"QuantLibc::delete_Exercise", _wrap_delete_Exercise},
{"QuantLibc::Exercise_type", _wrap_Exercise_type},
{"QuantLibc::Exercise_dates", _wrap_Exercise_dates},
{"QuantLibc::Exercise_lastDate", _wrap_Exercise_lastDate},
{"QuantLibc::new_EuropeanExercise", _wrap_new_EuropeanExercise},
{"QuantLibc::delete_EuropeanExercise", _wrap_delete_EuropeanExercise},
{"QuantLibc::new_AmericanExercise", _wrap_new_AmericanExercise},
{"QuantLibc::delete_AmericanExercise", _wrap_delete_AmericanExercise},
{"QuantLibc::new_BermudanExercise", _wrap_new_BermudanExercise},
{"QuantLibc::delete_BermudanExercise", _wrap_delete_BermudanExercise},
{"QuantLibc::new_RebatedExercise", _wrap_new_RebatedExercise},
{"QuantLibc::delete_RebatedExercise", _wrap_delete_RebatedExercise},
{"QuantLibc::Observable___deref__", _wrap_Observable___deref__},
{"QuantLibc::Observable_isNull", _wrap_Observable_isNull},
{"QuantLibc::new_Observable", _wrap_new_Observable},
{"QuantLibc::delete_Observable", _wrap_delete_Observable},
{"QuantLibc::new_Array", _wrap_new_Array},
{"QuantLibc::Array_size", _wrap_Array_size},
{"QuantLibc::Array_to_string", _wrap_Array_to_string},
{"QuantLibc::Array_get", _wrap_Array_get},
{"QuantLibc::Array_set", _wrap_Array_set},
{"QuantLibc::delete_Array", _wrap_delete_Array},
{"QuantLibc::LexicographicalView_xSize", _wrap_LexicographicalView_xSize},
{"QuantLibc::LexicographicalView_ySize", _wrap_LexicographicalView_ySize},
{"QuantLibc::new_LexicographicalView", _wrap_new_LexicographicalView},
{"QuantLibc::LexicographicalView_to_string", _wrap_LexicographicalView_to_string},
{"QuantLibc::delete_LexicographicalView", _wrap_delete_LexicographicalView},
{"QuantLibc::new_Matrix", _wrap_new_Matrix},
{"QuantLibc::Matrix_rows", _wrap_Matrix_rows},
{"QuantLibc::Matrix_columns", _wrap_Matrix_columns},
{"QuantLibc::Matrix_to_string", _wrap_Matrix_to_string},
{"QuantLibc::Matrix_get", _wrap_Matrix_get},
{"QuantLibc::Matrix_set", _wrap_Matrix_set},
{"QuantLibc::delete_Matrix", _wrap_delete_Matrix},
{"QuantLibc::new_SalvagingAlgorithm", _wrap_new_SalvagingAlgorithm},
{"QuantLibc::delete_SalvagingAlgorithm", _wrap_delete_SalvagingAlgorithm},
{"QuantLibc::transpose", _wrap_transpose},
{"QuantLibc::outerProduct", _wrap_outerProduct},
{"QuantLibc::pseudoSqrt", _wrap_pseudoSqrt},
{"QuantLibc::new_SVD", _wrap_new_SVD},
{"QuantLibc::SVD_U", _wrap_SVD_U},
{"QuantLibc::SVD_V", _wrap_SVD_V},
{"QuantLibc::SVD_S", _wrap_SVD_S},
{"QuantLibc::SVD_singularValues", _wrap_SVD_singularValues},
{"QuantLibc::delete_SVD", _wrap_delete_SVD},
{"QuantLibc::Quote___deref__", _wrap_Quote___deref__},
{"QuantLibc::Quote_isNull", _wrap_Quote_isNull},
{"QuantLibc::Quote_asObservable", _wrap_Quote_asObservable},
{"QuantLibc::new_Quote", _wrap_new_Quote},
{"QuantLibc::delete_Quote", _wrap_delete_Quote},
{"QuantLibc::Quote_value", _wrap_Quote_value},
{"QuantLibc::new_QuoteHandle", _wrap_new_QuoteHandle},
{"QuantLibc::QuoteHandle___deref__", _wrap_QuoteHandle___deref__},
{"QuantLibc::QuoteHandle_empty", _wrap_QuoteHandle_empty},
{"QuantLibc::QuoteHandle_asObservable", _wrap_QuoteHandle_asObservable},
{"QuantLibc::delete_QuoteHandle", _wrap_delete_QuoteHandle},
{"QuantLibc::QuoteHandle_value", _wrap_QuoteHandle_value},
{"QuantLibc::new_RelinkableQuoteHandle", _wrap_new_RelinkableQuoteHandle},
{"QuantLibc::RelinkableQuoteHandle_linkTo", _wrap_RelinkableQuoteHandle_linkTo},
{"QuantLibc::delete_RelinkableQuoteHandle", _wrap_delete_RelinkableQuoteHandle},
{"QuantLibc::new_SimpleQuote", _wrap_new_SimpleQuote},
{"QuantLibc::SimpleQuote_setValue", _wrap_SimpleQuote_setValue},
{"QuantLibc::delete_SimpleQuote", _wrap_delete_SimpleQuote},
{"QuantLibc::new_QuoteVector", _wrap_new_QuoteVector},
{"QuantLibc::QuoteVector_size", _wrap_QuoteVector_size},
{"QuantLibc::QuoteVector_empty", _wrap_QuoteVector_empty},
{"QuantLibc::QuoteVector_clear", _wrap_QuoteVector_clear},
{"QuantLibc::QuoteVector_push", _wrap_QuoteVector_push},
{"QuantLibc::QuoteVector_pop", _wrap_QuoteVector_pop},
{"QuantLibc::QuoteVector_get", _wrap_QuoteVector_get},
{"QuantLibc::QuoteVector_set", _wrap_QuoteVector_set},
{"QuantLibc::delete_QuoteVector", _wrap_delete_QuoteVector},
{"QuantLibc::new_QuoteVectorVector", _wrap_new_QuoteVectorVector},
{"QuantLibc::QuoteVectorVector_size", _wrap_QuoteVectorVector_size},
{"QuantLibc::QuoteVectorVector_empty", _wrap_QuoteVectorVector_empty},
{"QuantLibc::QuoteVectorVector_clear", _wrap_QuoteVectorVector_clear},
{"QuantLibc::QuoteVectorVector_push", _wrap_QuoteVectorVector_push},
{"QuantLibc::QuoteVectorVector_pop", _wrap_QuoteVectorVector_pop},
{"QuantLibc::QuoteVectorVector_get", _wrap_QuoteVectorVector_get},
{"QuantLibc::QuoteVectorVector_set", _wrap_QuoteVectorVector_set},
{"QuantLibc::delete_QuoteVectorVector", _wrap_delete_QuoteVectorVector},
{"QuantLibc::new_QuoteHandleVector", _wrap_new_QuoteHandleVector},
{"QuantLibc::QuoteHandleVector_size", _wrap_QuoteHandleVector_size},
{"QuantLibc::QuoteHandleVector_empty", _wrap_QuoteHandleVector_empty},
{"QuantLibc::QuoteHandleVector_clear", _wrap_QuoteHandleVector_clear},
{"QuantLibc::QuoteHandleVector_push", _wrap_QuoteHandleVector_push},
{"QuantLibc::QuoteHandleVector_pop", _wrap_QuoteHandleVector_pop},
{"QuantLibc::QuoteHandleVector_get", _wrap_QuoteHandleVector_get},
{"QuantLibc::QuoteHandleVector_set", _wrap_QuoteHandleVector_set},
{"QuantLibc::delete_QuoteHandleVector", _wrap_delete_QuoteHandleVector},
{"QuantLibc::new_QuoteHandleVectorVector", _wrap_new_QuoteHandleVectorVector},
{"QuantLibc::QuoteHandleVectorVector_size", _wrap_QuoteHandleVectorVector_size},
{"QuantLibc::QuoteHandleVectorVector_empty", _wrap_QuoteHandleVectorVector_empty},
{"QuantLibc::QuoteHandleVectorVector_clear", _wrap_QuoteHandleVectorVector_clear},
{"QuantLibc::QuoteHandleVectorVector_push", _wrap_QuoteHandleVectorVector_push},
{"QuantLibc::QuoteHandleVectorVector_pop", _wrap_QuoteHandleVectorVector_pop},
{"QuantLibc::QuoteHandleVectorVector_get", _wrap_QuoteHandleVectorVector_get},
{"QuantLibc::QuoteHandleVectorVector_set", _wrap_QuoteHandleVectorVector_set},
{"QuantLibc::delete_QuoteHandleVectorVector", _wrap_delete_QuoteHandleVectorVector},
{"QuantLibc::new_RelinkableQuoteHandleVector", _wrap_new_RelinkableQuoteHandleVector},
{"QuantLibc::RelinkableQuoteHandleVector_size", _wrap_RelinkableQuoteHandleVector_size},
{"QuantLibc::RelinkableQuoteHandleVector_empty", _wrap_RelinkableQuoteHandleVector_empty},
{"QuantLibc::RelinkableQuoteHandleVector_clear", _wrap_RelinkableQuoteHandleVector_clear},
{"QuantLibc::RelinkableQuoteHandleVector_push", _wrap_RelinkableQuoteHandleVector_push},
{"QuantLibc::RelinkableQuoteHandleVector_pop", _wrap_RelinkableQuoteHandleVector_pop},
{"QuantLibc::RelinkableQuoteHandleVector_get", _wrap_RelinkableQuoteHandleVector_get},
{"QuantLibc::RelinkableQuoteHandleVector_set", _wrap_RelinkableQuoteHandleVector_set},
{"QuantLibc::delete_RelinkableQuoteHandleVector", _wrap_delete_RelinkableQuoteHandleVector},
{"QuantLibc::new_RelinkableQuoteHandleVectorVector", _wrap_new_RelinkableQuoteHandleVectorVector},
{"QuantLibc::RelinkableQuoteHandleVectorVector_size", _wrap_RelinkableQuoteHandleVectorVector_size},
{"QuantLibc::RelinkableQuoteHandleVectorVector_empty", _wrap_RelinkableQuoteHandleVectorVector_empty},
{"QuantLibc::RelinkableQuoteHandleVectorVector_clear", _wrap_RelinkableQuoteHandleVectorVector_clear},
{"QuantLibc::RelinkableQuoteHandleVectorVector_push", _wrap_RelinkableQuoteHandleVectorVector_push},
{"QuantLibc::RelinkableQuoteHandleVectorVector_pop", _wrap_RelinkableQuoteHandleVectorVector_pop},
{"QuantLibc::RelinkableQuoteHandleVectorVector_get", _wrap_RelinkableQuoteHandleVectorVector_get},
{"QuantLibc::RelinkableQuoteHandleVectorVector_set", _wrap_RelinkableQuoteHandleVectorVector_set},
{"QuantLibc::delete_RelinkableQuoteHandleVectorVector", _wrap_delete_RelinkableQuoteHandleVectorVector},
{"QuantLibc::Calendar_isWeekend", _wrap_Calendar_isWeekend},
{"QuantLibc::Calendar_endOfMonth", _wrap_Calendar_endOfMonth},
{"QuantLibc::Calendar_isBusinessDay", _wrap_Calendar_isBusinessDay},
{"QuantLibc::Calendar_isHoliday", _wrap_Calendar_isHoliday},
{"QuantLibc::Calendar_isEndOfMonth", _wrap_Calendar_isEndOfMonth},
{"QuantLibc::Calendar_addHoliday", _wrap_Calendar_addHoliday},
{"QuantLibc::Calendar_removeHoliday", _wrap_Calendar_removeHoliday},
{"QuantLibc::Calendar_adjust", _wrap_Calendar_adjust},
{"QuantLibc::Calendar_advance", _wrap_Calendar_advance},
{"QuantLibc::Calendar_businessDaysBetween", _wrap_Calendar_businessDaysBetween},
{"QuantLibc::Calendar_name", _wrap_Calendar_name},
{"QuantLibc::delete_Calendar", _wrap_delete_Calendar},
{"QuantLibc::new_Argentina", _wrap_new_Argentina},
{"QuantLibc::delete_Argentina", _wrap_delete_Argentina},
{"QuantLibc::new_Australia", _wrap_new_Australia},
{"QuantLibc::delete_Australia", _wrap_delete_Australia},
{"QuantLibc::new_Brazil", _wrap_new_Brazil},
{"QuantLibc::delete_Brazil", _wrap_delete_Brazil},
{"QuantLibc::new_Canada", _wrap_new_Canada},
{"QuantLibc::delete_Canada", _wrap_delete_Canada},
{"QuantLibc::new_China", _wrap_new_China},
{"QuantLibc::delete_China", _wrap_delete_China},
{"QuantLibc::new_CzechRepublic", _wrap_new_CzechRepublic},
{"QuantLibc::delete_CzechRepublic", _wrap_delete_CzechRepublic},
{"QuantLibc::new_Denmark", _wrap_new_Denmark},
{"QuantLibc::delete_Denmark", _wrap_delete_Denmark},
{"QuantLibc::new_Finland", _wrap_new_Finland},
{"QuantLibc::delete_Finland", _wrap_delete_Finland},
{"QuantLibc::new_Germany", _wrap_new_Germany},
{"QuantLibc::delete_Germany", _wrap_delete_Germany},
{"QuantLibc::new_HongKong", _wrap_new_HongKong},
{"QuantLibc::delete_HongKong", _wrap_delete_HongKong},
{"QuantLibc::new_Hungary", _wrap_new_Hungary},
{"QuantLibc::delete_Hungary", _wrap_delete_Hungary},
{"QuantLibc::new_Iceland", _wrap_new_Iceland},
{"QuantLibc::delete_Iceland", _wrap_delete_Iceland},
{"QuantLibc::new_India", _wrap_new_India},
{"QuantLibc::delete_India", _wrap_delete_India},
{"QuantLibc::new_Indonesia", _wrap_new_Indonesia},
{"QuantLibc::delete_Indonesia", _wrap_delete_Indonesia},
{"QuantLibc::new_Israel", _wrap_new_Israel},
{"QuantLibc::delete_Israel", _wrap_delete_Israel},
{"QuantLibc::new_Italy", _wrap_new_Italy},
{"QuantLibc::delete_Italy", _wrap_delete_Italy},
{"QuantLibc::new_Japan", _wrap_new_Japan},
{"QuantLibc::delete_Japan", _wrap_delete_Japan},
{"QuantLibc::new_Mexico", _wrap_new_Mexico},
{"QuantLibc::delete_Mexico", _wrap_delete_Mexico},
{"QuantLibc::new_NewZealand", _wrap_new_NewZealand},
{"QuantLibc::delete_NewZealand", _wrap_delete_NewZealand},
{"QuantLibc::new_Norway", _wrap_new_Norway},
{"QuantLibc::delete_Norway", _wrap_delete_Norway},
{"QuantLibc::new_Poland", _wrap_new_Poland},
{"QuantLibc::delete_Poland", _wrap_delete_Poland},
{"QuantLibc::new_Russia", _wrap_new_Russia},
{"QuantLibc::delete_Russia", _wrap_delete_Russia},
{"QuantLibc::new_Romania", _wrap_new_Romania},
{"QuantLibc::delete_Romania", _wrap_delete_Romania},
{"QuantLibc::new_SaudiArabia", _wrap_new_SaudiArabia},
{"QuantLibc::delete_SaudiArabia", _wrap_delete_SaudiArabia},
{"QuantLibc::new_Singapore", _wrap_new_Singapore},
{"QuantLibc::delete_Singapore", _wrap_delete_Singapore},
{"QuantLibc::new_Slovakia", _wrap_new_Slovakia},
{"QuantLibc::delete_Slovakia", _wrap_delete_Slovakia},
{"QuantLibc::new_SouthAfrica", _wrap_new_SouthAfrica},
{"QuantLibc::delete_SouthAfrica", _wrap_delete_SouthAfrica},
{"QuantLibc::new_SouthKorea", _wrap_new_SouthKorea},
{"QuantLibc::delete_SouthKorea", _wrap_delete_SouthKorea},
{"QuantLibc::new_Sweden", _wrap_new_Sweden},
{"QuantLibc::delete_Sweden", _wrap_delete_Sweden},
{"QuantLibc::new_Switzerland", _wrap_new_Switzerland},
{"QuantLibc::delete_Switzerland", _wrap_delete_Switzerland},
{"QuantLibc::new_Taiwan", _wrap_new_Taiwan},
{"QuantLibc::delete_Taiwan", _wrap_delete_Taiwan},
{"QuantLibc::new_TARGET", _wrap_new_TARGET},
{"QuantLibc::delete_TARGET", _wrap_delete_TARGET},
{"QuantLibc::new_Turkey", _wrap_new_Turkey},
{"QuantLibc::delete_Turkey", _wrap_delete_Turkey},
{"QuantLibc::new_Ukraine", _wrap_new_Ukraine},
{"QuantLibc::delete_Ukraine", _wrap_delete_Ukraine},
{"QuantLibc::new_UnitedKingdom", _wrap_new_UnitedKingdom},
{"QuantLibc::delete_UnitedKingdom", _wrap_delete_UnitedKingdom},
{"QuantLibc::new_UnitedStates", _wrap_new_UnitedStates},
{"QuantLibc::delete_UnitedStates", _wrap_delete_UnitedStates},
{"QuantLibc::new_NullCalendar", _wrap_new_NullCalendar},
{"QuantLibc::delete_NullCalendar", _wrap_delete_NullCalendar},
{"QuantLibc::new_WeekendsOnly", _wrap_new_WeekendsOnly},
{"QuantLibc::delete_WeekendsOnly", _wrap_delete_WeekendsOnly},
{"QuantLibc::new_JointCalendar", _wrap_new_JointCalendar},
{"QuantLibc::delete_JointCalendar", _wrap_delete_JointCalendar},
{"QuantLibc::new_BespokeCalendar", _wrap_new_BespokeCalendar},
{"QuantLibc::BespokeCalendar_addWeekend", _wrap_BespokeCalendar_addWeekend},
{"QuantLibc::delete_BespokeCalendar", _wrap_delete_BespokeCalendar},
{"QuantLibc::nullInt", _wrap_nullInt},
{"QuantLibc::nullDouble", _wrap_nullDouble},
{"QuantLibc::DayCounter_dayCount", _wrap_DayCounter_dayCount},
{"QuantLibc::DayCounter_yearFraction", _wrap_DayCounter_yearFraction},
{"QuantLibc::DayCounter_name", _wrap_DayCounter_name},
{"QuantLibc::delete_DayCounter", _wrap_delete_DayCounter},
{"QuantLibc::new_Actual360", _wrap_new_Actual360},
{"QuantLibc::delete_Actual360", _wrap_delete_Actual360},
{"QuantLibc::new_Actual365Fixed", _wrap_new_Actual365Fixed},
{"QuantLibc::delete_Actual365Fixed", _wrap_delete_Actual365Fixed},
{"QuantLibc::new_Thirty360", _wrap_new_Thirty360},
{"QuantLibc::delete_Thirty360", _wrap_delete_Thirty360},
{"QuantLibc::new_ActualActual", _wrap_new_ActualActual},
{"QuantLibc::delete_ActualActual", _wrap_delete_ActualActual},
{"QuantLibc::new_OneDayCounter", _wrap_new_OneDayCounter},
{"QuantLibc::delete_OneDayCounter", _wrap_delete_OneDayCounter},
{"QuantLibc::new_SimpleDayCounter", _wrap_new_SimpleDayCounter},
{"QuantLibc::delete_SimpleDayCounter", _wrap_delete_SimpleDayCounter},
{"QuantLibc::new_Business252", _wrap_new_Business252},
{"QuantLibc::delete_Business252", _wrap_delete_Business252},
{"QuantLibc::Actual365NoLeap", _wrap_Actual365NoLeap},
{"QuantLibc::new_InterestRate", _wrap_new_InterestRate},
{"QuantLibc::InterestRate_rate", _wrap_InterestRate_rate},
{"QuantLibc::InterestRate_dayCounter", _wrap_InterestRate_dayCounter},
{"QuantLibc::InterestRate_compounding", _wrap_InterestRate_compounding},
{"QuantLibc::InterestRate_frequency", _wrap_InterestRate_frequency},
{"QuantLibc::InterestRate_discountFactor", _wrap_InterestRate_discountFactor},
{"QuantLibc::InterestRate_compoundFactor", _wrap_InterestRate_compoundFactor},
{"QuantLibc::InterestRate_impliedRate", _wrap_InterestRate_impliedRate},
{"QuantLibc::InterestRate_equivalentRate", _wrap_InterestRate_equivalentRate},
{"QuantLibc::InterestRate_to_string", _wrap_InterestRate_to_string},
{"QuantLibc::delete_InterestRate", _wrap_delete_InterestRate},
{"QuantLibc::new_InterestRateVector", _wrap_new_InterestRateVector},
{"QuantLibc::InterestRateVector_size", _wrap_InterestRateVector_size},
{"QuantLibc::InterestRateVector_empty", _wrap_InterestRateVector_empty},
{"QuantLibc::InterestRateVector_clear", _wrap_InterestRateVector_clear},
{"QuantLibc::InterestRateVector_push", _wrap_InterestRateVector_push},
{"QuantLibc::InterestRateVector_pop", _wrap_InterestRateVector_pop},
{"QuantLibc::InterestRateVector_get", _wrap_InterestRateVector_get},
{"QuantLibc::InterestRateVector_set", _wrap_InterestRateVector_set},
{"QuantLibc::delete_InterestRateVector", _wrap_delete_InterestRateVector},
{"QuantLibc::new_Rounding", _wrap_new_Rounding},
{"QuantLibc::Rounding_apply", _wrap_Rounding_apply},
{"QuantLibc::delete_Rounding", _wrap_delete_Rounding},
{"QuantLibc::new_UpRounding", _wrap_new_UpRounding},
{"QuantLibc::delete_UpRounding", _wrap_delete_UpRounding},
{"QuantLibc::new_DownRounding", _wrap_new_DownRounding},
{"QuantLibc::delete_DownRounding", _wrap_delete_DownRounding},
{"QuantLibc::new_ClosestRounding", _wrap_new_ClosestRounding},
{"QuantLibc::delete_ClosestRounding", _wrap_delete_ClosestRounding},
{"QuantLibc::new_CeilingTruncation", _wrap_new_CeilingTruncation},
{"QuantLibc::delete_CeilingTruncation", _wrap_delete_CeilingTruncation},
{"QuantLibc::new_FloorTruncation", _wrap_new_FloorTruncation},
{"QuantLibc::delete_FloorTruncation", _wrap_delete_FloorTruncation},
{"QuantLibc::Currency_name", _wrap_Currency_name},
{"QuantLibc::Currency_code", _wrap_Currency_code},
{"QuantLibc::Currency_numericCode", _wrap_Currency_numericCode},
{"QuantLibc::Currency_symbol", _wrap_Currency_symbol},
{"QuantLibc::Currency_fractionSymbol", _wrap_Currency_fractionSymbol},
{"QuantLibc::Currency_fractionsPerUnit", _wrap_Currency_fractionsPerUnit},
{"QuantLibc::Currency_rounding", _wrap_Currency_rounding},
{"QuantLibc::Currency_format", _wrap_Currency_format},
{"QuantLibc::Currency_empty", _wrap_Currency_empty},
{"QuantLibc::Currency_triangulationCurrency", _wrap_Currency_triangulationCurrency},
{"QuantLibc::new_Currency", _wrap_new_Currency},
{"QuantLibc::delete_Currency", _wrap_delete_Currency},
{"QuantLibc::new_ARSCurrency", _wrap_new_ARSCurrency},
{"QuantLibc::delete_ARSCurrency", _wrap_delete_ARSCurrency},
{"QuantLibc::new_ATSCurrency", _wrap_new_ATSCurrency},
{"QuantLibc::delete_ATSCurrency", _wrap_delete_ATSCurrency},
{"QuantLibc::new_AUDCurrency", _wrap_new_AUDCurrency},
{"QuantLibc::delete_AUDCurrency", _wrap_delete_AUDCurrency},
{"QuantLibc::new_BDTCurrency", _wrap_new_BDTCurrency},
{"QuantLibc::delete_BDTCurrency", _wrap_delete_BDTCurrency},
{"QuantLibc::new_BEFCurrency", _wrap_new_BEFCurrency},
{"QuantLibc::delete_BEFCurrency", _wrap_delete_BEFCurrency},
{"QuantLibc::new_BGLCurrency", _wrap_new_BGLCurrency},
{"QuantLibc::delete_BGLCurrency", _wrap_delete_BGLCurrency},
{"QuantLibc::new_BRLCurrency", _wrap_new_BRLCurrency},
{"QuantLibc::delete_BRLCurrency", _wrap_delete_BRLCurrency},
{"QuantLibc::new_BYRCurrency", _wrap_new_BYRCurrency},
{"QuantLibc::delete_BYRCurrency", _wrap_delete_BYRCurrency},
{"QuantLibc::new_CADCurrency", _wrap_new_CADCurrency},
{"QuantLibc::delete_CADCurrency", _wrap_delete_CADCurrency},
{"QuantLibc::new_CHFCurrency", _wrap_new_CHFCurrency},
{"QuantLibc::delete_CHFCurrency", _wrap_delete_CHFCurrency},
{"QuantLibc::new_CLPCurrency", _wrap_new_CLPCurrency},
{"QuantLibc::delete_CLPCurrency", _wrap_delete_CLPCurrency},
{"QuantLibc::new_CNYCurrency", _wrap_new_CNYCurrency},
{"QuantLibc::delete_CNYCurrency", _wrap_delete_CNYCurrency},
{"QuantLibc::new_COPCurrency", _wrap_new_COPCurrency},
{"QuantLibc::delete_COPCurrency", _wrap_delete_COPCurrency},
{"QuantLibc::new_CYPCurrency", _wrap_new_CYPCurrency},
{"QuantLibc::delete_CYPCurrency", _wrap_delete_CYPCurrency},
{"QuantLibc::new_CZKCurrency", _wrap_new_CZKCurrency},
{"QuantLibc::delete_CZKCurrency", _wrap_delete_CZKCurrency},
{"QuantLibc::new_DEMCurrency", _wrap_new_DEMCurrency},
{"QuantLibc::delete_DEMCurrency", _wrap_delete_DEMCurrency},
{"QuantLibc::new_DKKCurrency", _wrap_new_DKKCurrency},
{"QuantLibc::delete_DKKCurrency", _wrap_delete_DKKCurrency},
{"QuantLibc::new_EEKCurrency", _wrap_new_EEKCurrency},
{"QuantLibc::delete_EEKCurrency", _wrap_delete_EEKCurrency},
{"QuantLibc::new_ESPCurrency", _wrap_new_ESPCurrency},
{"QuantLibc::delete_ESPCurrency", _wrap_delete_ESPCurrency},
{"QuantLibc::new_EURCurrency", _wrap_new_EURCurrency},
{"QuantLibc::delete_EURCurrency", _wrap_delete_EURCurrency},
{"QuantLibc::new_FIMCurrency", _wrap_new_FIMCurrency},
{"QuantLibc::delete_FIMCurrency", _wrap_delete_FIMCurrency},
{"QuantLibc::new_FRFCurrency", _wrap_new_FRFCurrency},
{"QuantLibc::delete_FRFCurrency", _wrap_delete_FRFCurrency},
{"QuantLibc::new_GBPCurrency", _wrap_new_GBPCurrency},
{"QuantLibc::delete_GBPCurrency", _wrap_delete_GBPCurrency},
{"QuantLibc::new_GRDCurrency", _wrap_new_GRDCurrency},
{"QuantLibc::delete_GRDCurrency", _wrap_delete_GRDCurrency},
{"QuantLibc::new_HKDCurrency", _wrap_new_HKDCurrency},
{"QuantLibc::delete_HKDCurrency", _wrap_delete_HKDCurrency},
{"QuantLibc::new_HUFCurrency", _wrap_new_HUFCurrency},
{"QuantLibc::delete_HUFCurrency", _wrap_delete_HUFCurrency},
{"QuantLibc::new_IEPCurrency", _wrap_new_IEPCurrency},
{"QuantLibc::delete_IEPCurrency", _wrap_delete_IEPCurrency},
{"QuantLibc::new_IDRCurrency", _wrap_new_IDRCurrency},
{"QuantLibc::delete_IDRCurrency", _wrap_delete_IDRCurrency},
{"QuantLibc::new_ILSCurrency", _wrap_new_ILSCurrency},
{"QuantLibc::delete_ILSCurrency", _wrap_delete_ILSCurrency},
{"QuantLibc::new_INRCurrency", _wrap_new_INRCurrency},
{"QuantLibc::delete_INRCurrency", _wrap_delete_INRCurrency},
{"QuantLibc::new_IQDCurrency", _wrap_new_IQDCurrency},
{"QuantLibc::delete_IQDCurrency", _wrap_delete_IQDCurrency},
{"QuantLibc::new_IRRCurrency", _wrap_new_IRRCurrency},
{"QuantLibc::delete_IRRCurrency", _wrap_delete_IRRCurrency},
{"QuantLibc::new_ISKCurrency", _wrap_new_ISKCurrency},
{"QuantLibc::delete_ISKCurrency", _wrap_delete_ISKCurrency},
{"QuantLibc::new_ITLCurrency", _wrap_new_ITLCurrency},
{"QuantLibc::delete_ITLCurrency", _wrap_delete_ITLCurrency},
{"QuantLibc::new_JPYCurrency", _wrap_new_JPYCurrency},
{"QuantLibc::delete_JPYCurrency", _wrap_delete_JPYCurrency},
{"QuantLibc::new_KRWCurrency", _wrap_new_KRWCurrency},
{"QuantLibc::delete_KRWCurrency", _wrap_delete_KRWCurrency},
{"QuantLibc::new_KWDCurrency", _wrap_new_KWDCurrency},
{"QuantLibc::delete_KWDCurrency", _wrap_delete_KWDCurrency},
{"QuantLibc::new_LTLCurrency", _wrap_new_LTLCurrency},
{"QuantLibc::delete_LTLCurrency", _wrap_delete_LTLCurrency},
{"QuantLibc::new_LUFCurrency", _wrap_new_LUFCurrency},
{"QuantLibc::delete_LUFCurrency", _wrap_delete_LUFCurrency},
{"QuantLibc::new_LVLCurrency", _wrap_new_LVLCurrency},
{"QuantLibc::delete_LVLCurrency", _wrap_delete_LVLCurrency},
{"QuantLibc::new_MTLCurrency", _wrap_new_MTLCurrency},
{"QuantLibc::delete_MTLCurrency", _wrap_delete_MTLCurrency},
{"QuantLibc::new_MXNCurrency", _wrap_new_MXNCurrency},
{"QuantLibc::delete_MXNCurrency", _wrap_delete_MXNCurrency},
{"QuantLibc::new_MYRCurrency", _wrap_new_MYRCurrency},
{"QuantLibc::delete_MYRCurrency", _wrap_delete_MYRCurrency},
{"QuantLibc::new_NLGCurrency", _wrap_new_NLGCurrency},
{"QuantLibc::delete_NLGCurrency", _wrap_delete_NLGCurrency},
{"QuantLibc::new_NOKCurrency", _wrap_new_NOKCurrency},
{"QuantLibc::delete_NOKCurrency", _wrap_delete_NOKCurrency},
{"QuantLibc::new_NPRCurrency", _wrap_new_NPRCurrency},
{"QuantLibc::delete_NPRCurrency", _wrap_delete_NPRCurrency},
{"QuantLibc::new_NZDCurrency", _wrap_new_NZDCurrency},
{"QuantLibc::delete_NZDCurrency", _wrap_delete_NZDCurrency},
{"QuantLibc::new_PEHCurrency", _wrap_new_PEHCurrency},
{"QuantLibc::delete_PEHCurrency", _wrap_delete_PEHCurrency},
{"QuantLibc::new_PEICurrency", _wrap_new_PEICurrency},
{"QuantLibc::delete_PEICurrency", _wrap_delete_PEICurrency},
{"QuantLibc::new_PENCurrency", _wrap_new_PENCurrency},
{"QuantLibc::delete_PENCurrency", _wrap_delete_PENCurrency},
{"QuantLibc::new_PKRCurrency", _wrap_new_PKRCurrency},
{"QuantLibc::delete_PKRCurrency", _wrap_delete_PKRCurrency},
{"QuantLibc::new_PLNCurrency", _wrap_new_PLNCurrency},
{"QuantLibc::delete_PLNCurrency", _wrap_delete_PLNCurrency},
{"QuantLibc::new_PTECurrency", _wrap_new_PTECurrency},
{"QuantLibc::delete_PTECurrency", _wrap_delete_PTECurrency},
{"QuantLibc::new_ROLCurrency", _wrap_new_ROLCurrency},
{"QuantLibc::delete_ROLCurrency", _wrap_delete_ROLCurrency},
{"QuantLibc::new_RONCurrency", _wrap_new_RONCurrency},
{"QuantLibc::delete_RONCurrency", _wrap_delete_RONCurrency},
{"QuantLibc::new_RUBCurrency", _wrap_new_RUBCurrency},
{"QuantLibc::delete_RUBCurrency", _wrap_delete_RUBCurrency},
{"QuantLibc::new_SARCurrency", _wrap_new_SARCurrency},
{"QuantLibc::delete_SARCurrency", _wrap_delete_SARCurrency},
{"QuantLibc::new_SEKCurrency", _wrap_new_SEKCurrency},
{"QuantLibc::delete_SEKCurrency", _wrap_delete_SEKCurrency},
{"QuantLibc::new_SGDCurrency", _wrap_new_SGDCurrency},
{"QuantLibc::delete_SGDCurrency", _wrap_delete_SGDCurrency},
{"QuantLibc::new_SITCurrency", _wrap_new_SITCurrency},
{"QuantLibc::delete_SITCurrency", _wrap_delete_SITCurrency},
{"QuantLibc::new_SKKCurrency", _wrap_new_SKKCurrency},
{"QuantLibc::delete_SKKCurrency", _wrap_delete_SKKCurrency},
{"QuantLibc::new_THBCurrency", _wrap_new_THBCurrency},
{"QuantLibc::delete_THBCurrency", _wrap_delete_THBCurrency},
{"QuantLibc::new_TRLCurrency", _wrap_new_TRLCurrency},
{"QuantLibc::delete_TRLCurrency", _wrap_delete_TRLCurrency},
{"QuantLibc::new_TRYCurrency", _wrap_new_TRYCurrency},
{"QuantLibc::delete_TRYCurrency", _wrap_delete_TRYCurrency},
{"QuantLibc::new_TTDCurrency", _wrap_new_TTDCurrency},
{"QuantLibc::delete_TTDCurrency", _wrap_delete_TTDCurrency},
{"QuantLibc::new_TWDCurrency", _wrap_new_TWDCurrency},
{"QuantLibc::delete_TWDCurrency", _wrap_delete_TWDCurrency},
{"QuantLibc::new_USDCurrency", _wrap_new_USDCurrency},
{"QuantLibc::delete_USDCurrency", _wrap_delete_USDCurrency},
{"QuantLibc::new_VEBCurrency", _wrap_new_VEBCurrency},
{"QuantLibc::delete_VEBCurrency", _wrap_delete_VEBCurrency},
{"QuantLibc::new_VNDCurrency", _wrap_new_VNDCurrency},
{"QuantLibc::delete_VNDCurrency", _wrap_delete_VNDCurrency},
{"QuantLibc::new_ZARCurrency", _wrap_new_ZARCurrency},
{"QuantLibc::delete_ZARCurrency", _wrap_delete_ZARCurrency},
{"QuantLibc::new_LinearInterpolation", _wrap_new_LinearInterpolation},
{"QuantLibc::LinearInterpolation_call", _wrap_LinearInterpolation_call},
{"QuantLibc::delete_LinearInterpolation", _wrap_delete_LinearInterpolation},
{"QuantLibc::new_LogLinearInterpolation", _wrap_new_LogLinearInterpolation},
{"QuantLibc::LogLinearInterpolation_call", _wrap_LogLinearInterpolation_call},
{"QuantLibc::delete_LogLinearInterpolation", _wrap_delete_LogLinearInterpolation},
{"QuantLibc::new_BackwardFlatInterpolation", _wrap_new_BackwardFlatInterpolation},
{"QuantLibc::BackwardFlatInterpolation_call", _wrap_BackwardFlatInterpolation_call},
{"QuantLibc::delete_BackwardFlatInterpolation", _wrap_delete_BackwardFlatInterpolation},
{"QuantLibc::new_ForwardFlatInterpolation", _wrap_new_ForwardFlatInterpolation},
{"QuantLibc::ForwardFlatInterpolation_call", _wrap_ForwardFlatInterpolation_call},
{"QuantLibc::delete_ForwardFlatInterpolation", _wrap_delete_ForwardFlatInterpolation},
{"QuantLibc::new_CubicNaturalSpline", _wrap_new_CubicNaturalSpline},
{"QuantLibc::CubicNaturalSpline_call", _wrap_CubicNaturalSpline_call},
{"QuantLibc::CubicNaturalSpline_derivative", _wrap_CubicNaturalSpline_derivative},
{"QuantLibc::CubicNaturalSpline_secondDerivative", _wrap_CubicNaturalSpline_secondDerivative},
{"QuantLibc::CubicNaturalSpline_primitive", _wrap_CubicNaturalSpline_primitive},
{"QuantLibc::delete_CubicNaturalSpline", _wrap_delete_CubicNaturalSpline},
{"QuantLibc::new_LogCubicNaturalSpline", _wrap_new_LogCubicNaturalSpline},
{"QuantLibc::LogCubicNaturalSpline_call", _wrap_LogCubicNaturalSpline_call},
{"QuantLibc::LogCubicNaturalSpline_derivative", _wrap_LogCubicNaturalSpline_derivative},
{"QuantLibc::LogCubicNaturalSpline_secondDerivative", _wrap_LogCubicNaturalSpline_secondDerivative},
{"QuantLibc::LogCubicNaturalSpline_primitive", _wrap_LogCubicNaturalSpline_primitive},
{"QuantLibc::delete_LogCubicNaturalSpline", _wrap_delete_LogCubicNaturalSpline},
{"QuantLibc::new_MonotonicCubicNaturalSpline", _wrap_new_MonotonicCubicNaturalSpline},
{"QuantLibc::MonotonicCubicNaturalSpline_call", _wrap_MonotonicCubicNaturalSpline_call},
{"QuantLibc::MonotonicCubicNaturalSpline_derivative", _wrap_MonotonicCubicNaturalSpline_derivative},
{"QuantLibc::MonotonicCubicNaturalSpline_secondDerivative", _wrap_MonotonicCubicNaturalSpline_secondDerivative},
{"QuantLibc::MonotonicCubicNaturalSpline_primitive", _wrap_MonotonicCubicNaturalSpline_primitive},
{"QuantLibc::delete_MonotonicCubicNaturalSpline", _wrap_delete_MonotonicCubicNaturalSpline},
{"QuantLibc::new_MonotonicLogCubicNaturalSpline", _wrap_new_MonotonicLogCubicNaturalSpline},
{"QuantLibc::MonotonicLogCubicNaturalSpline_call", _wrap_MonotonicLogCubicNaturalSpline_call},
{"QuantLibc::MonotonicLogCubicNaturalSpline_derivative", _wrap_MonotonicLogCubicNaturalSpline_derivative},
{"QuantLibc::MonotonicLogCubicNaturalSpline_secondDerivative", _wrap_MonotonicLogCubicNaturalSpline_secondDerivative},
{"QuantLibc::MonotonicLogCubicNaturalSpline_primitive", _wrap_MonotonicLogCubicNaturalSpline_primitive},
{"QuantLibc::delete_MonotonicLogCubicNaturalSpline", _wrap_delete_MonotonicLogCubicNaturalSpline},
{"QuantLibc::new_KrugerCubic", _wrap_new_KrugerCubic},
{"QuantLibc::KrugerCubic_call", _wrap_KrugerCubic_call},
{"QuantLibc::KrugerCubic_derivative", _wrap_KrugerCubic_derivative},
{"QuantLibc::KrugerCubic_secondDerivative", _wrap_KrugerCubic_secondDerivative},
{"QuantLibc::KrugerCubic_primitive", _wrap_KrugerCubic_primitive},
{"QuantLibc::delete_KrugerCubic", _wrap_delete_KrugerCubic},
{"QuantLibc::new_KrugerLogCubic", _wrap_new_KrugerLogCubic},
{"QuantLibc::KrugerLogCubic_call", _wrap_KrugerLogCubic_call},
{"QuantLibc::KrugerLogCubic_derivative", _wrap_KrugerLogCubic_derivative},
{"QuantLibc::KrugerLogCubic_secondDerivative", _wrap_KrugerLogCubic_secondDerivative},
{"QuantLibc::KrugerLogCubic_primitive", _wrap_KrugerLogCubic_primitive},
{"QuantLibc::delete_KrugerLogCubic", _wrap_delete_KrugerLogCubic},
{"QuantLibc::new_FritschButlandCubic", _wrap_new_FritschButlandCubic},
{"QuantLibc::FritschButlandCubic_call", _wrap_FritschButlandCubic_call},
{"QuantLibc::FritschButlandCubic_derivative", _wrap_FritschButlandCubic_derivative},
{"QuantLibc::FritschButlandCubic_secondDerivative", _wrap_FritschButlandCubic_secondDerivative},
{"QuantLibc::FritschButlandCubic_primitive", _wrap_FritschButlandCubic_primitive},
{"QuantLibc::delete_FritschButlandCubic", _wrap_delete_FritschButlandCubic},
{"QuantLibc::new_FritschButlandLogCubic", _wrap_new_FritschButlandLogCubic},
{"QuantLibc::FritschButlandLogCubic_call", _wrap_FritschButlandLogCubic_call},
{"QuantLibc::FritschButlandLogCubic_derivative", _wrap_FritschButlandLogCubic_derivative},
{"QuantLibc::FritschButlandLogCubic_secondDerivative", _wrap_FritschButlandLogCubic_secondDerivative},
{"QuantLibc::FritschButlandLogCubic_primitive", _wrap_FritschButlandLogCubic_primitive},
{"QuantLibc::delete_FritschButlandLogCubic", _wrap_delete_FritschButlandLogCubic},
{"QuantLibc::new_Parabolic", _wrap_new_Parabolic},
{"QuantLibc::Parabolic_call", _wrap_Parabolic_call},
{"QuantLibc::Parabolic_derivative", _wrap_Parabolic_derivative},
{"QuantLibc::Parabolic_secondDerivative", _wrap_Parabolic_secondDerivative},
{"QuantLibc::Parabolic_primitive", _wrap_Parabolic_primitive},
{"QuantLibc::delete_Parabolic", _wrap_delete_Parabolic},
{"QuantLibc::new_LogParabolic", _wrap_new_LogParabolic},
{"QuantLibc::LogParabolic_call", _wrap_LogParabolic_call},
{"QuantLibc::LogParabolic_derivative", _wrap_LogParabolic_derivative},
{"QuantLibc::LogParabolic_secondDerivative", _wrap_LogParabolic_secondDerivative},
{"QuantLibc::LogParabolic_primitive", _wrap_LogParabolic_primitive},
{"QuantLibc::delete_LogParabolic", _wrap_delete_LogParabolic},
{"QuantLibc::new_MonotonicParabolic", _wrap_new_MonotonicParabolic},
{"QuantLibc::MonotonicParabolic_call", _wrap_MonotonicParabolic_call},
{"QuantLibc::MonotonicParabolic_derivative", _wrap_MonotonicParabolic_derivative},
{"QuantLibc::MonotonicParabolic_secondDerivative", _wrap_MonotonicParabolic_secondDerivative},
{"QuantLibc::MonotonicParabolic_primitive", _wrap_MonotonicParabolic_primitive},
{"QuantLibc::delete_MonotonicParabolic", _wrap_delete_MonotonicParabolic},
{"QuantLibc::new_MonotonicLogParabolic", _wrap_new_MonotonicLogParabolic},
{"QuantLibc::MonotonicLogParabolic_call", _wrap_MonotonicLogParabolic_call},
{"QuantLibc::MonotonicLogParabolic_derivative", _wrap_MonotonicLogParabolic_derivative},
{"QuantLibc::MonotonicLogParabolic_secondDerivative", _wrap_MonotonicLogParabolic_secondDerivative},
{"QuantLibc::MonotonicLogParabolic_primitive", _wrap_MonotonicLogParabolic_primitive},
{"QuantLibc::delete_MonotonicLogParabolic", _wrap_delete_MonotonicLogParabolic},
{"QuantLibc::new_BilinearInterpolation", _wrap_new_BilinearInterpolation},
{"QuantLibc::BilinearInterpolation_call", _wrap_BilinearInterpolation_call},
{"QuantLibc::delete_BilinearInterpolation", _wrap_delete_BilinearInterpolation},
{"QuantLibc::new_BicubicSpline", _wrap_new_BicubicSpline},
{"QuantLibc::BicubicSpline_call", _wrap_BicubicSpline_call},
{"QuantLibc::delete_BicubicSpline", _wrap_delete_BicubicSpline},
{"QuantLibc::new_BackwardFlat", _wrap_new_BackwardFlat},
{"QuantLibc::delete_BackwardFlat", _wrap_delete_BackwardFlat},
{"QuantLibc::new_ForwardFlat", _wrap_new_ForwardFlat},
{"QuantLibc::delete_ForwardFlat", _wrap_delete_ForwardFlat},
{"QuantLibc::new_Linear", _wrap_new_Linear},
{"QuantLibc::delete_Linear", _wrap_delete_Linear},
{"QuantLibc::new_LogLinear", _wrap_new_LogLinear},
{"QuantLibc::delete_LogLinear", _wrap_delete_LogLinear},
{"QuantLibc::new_Cubic", _wrap_new_Cubic},
{"QuantLibc::delete_Cubic", _wrap_delete_Cubic},
{"QuantLibc::new_MonotonicCubic", _wrap_new_MonotonicCubic},
{"QuantLibc::delete_MonotonicCubic", _wrap_delete_MonotonicCubic},
{"QuantLibc::new_DefaultLogCubic", _wrap_new_DefaultLogCubic},
{"QuantLibc::delete_DefaultLogCubic", _wrap_delete_DefaultLogCubic},
{"QuantLibc::new_MonotonicLogCubic", _wrap_new_MonotonicLogCubic},
{"QuantLibc::delete_MonotonicLogCubic", _wrap_delete_MonotonicLogCubic},
{"QuantLibc::YieldTermStructure___deref__", _wrap_YieldTermStructure___deref__},
{"QuantLibc::YieldTermStructure_isNull", _wrap_YieldTermStructure_isNull},
{"QuantLibc::YieldTermStructure_asObservable", _wrap_YieldTermStructure_asObservable},
{"QuantLibc::new_YieldTermStructure", _wrap_new_YieldTermStructure},
{"QuantLibc::delete_YieldTermStructure", _wrap_delete_YieldTermStructure},
{"QuantLibc::YieldTermStructure_dayCounter", _wrap_YieldTermStructure_dayCounter},
{"QuantLibc::YieldTermStructure_calendar", _wrap_YieldTermStructure_calendar},
{"QuantLibc::YieldTermStructure_referenceDate", _wrap_YieldTermStructure_referenceDate},
{"QuantLibc::YieldTermStructure_maxDate", _wrap_YieldTermStructure_maxDate},
{"QuantLibc::YieldTermStructure_maxTime", _wrap_YieldTermStructure_maxTime},
{"QuantLibc::YieldTermStructure_discount", _wrap_YieldTermStructure_discount},
{"QuantLibc::YieldTermStructure_zeroRate", _wrap_YieldTermStructure_zeroRate},
{"QuantLibc::YieldTermStructure_forwardRate", _wrap_YieldTermStructure_forwardRate},
{"QuantLibc::YieldTermStructure_enableExtrapolation", _wrap_YieldTermStructure_enableExtrapolation},
{"QuantLibc::YieldTermStructure_disableExtrapolation", _wrap_YieldTermStructure_disableExtrapolation},
{"QuantLibc::YieldTermStructure_allowsExtrapolation", _wrap_YieldTermStructure_allowsExtrapolation},
{"QuantLibc::new_YieldTermStructureHandle", _wrap_new_YieldTermStructureHandle},
{"QuantLibc::YieldTermStructureHandle___deref__", _wrap_YieldTermStructureHandle___deref__},
{"QuantLibc::YieldTermStructureHandle_empty", _wrap_YieldTermStructureHandle_empty},
{"QuantLibc::YieldTermStructureHandle_asObservable", _wrap_YieldTermStructureHandle_asObservable},
{"QuantLibc::delete_YieldTermStructureHandle", _wrap_delete_YieldTermStructureHandle},
{"QuantLibc::YieldTermStructureHandle_dayCounter", _wrap_YieldTermStructureHandle_dayCounter},
{"QuantLibc::YieldTermStructureHandle_calendar", _wrap_YieldTermStructureHandle_calendar},
{"QuantLibc::YieldTermStructureHandle_referenceDate", _wrap_YieldTermStructureHandle_referenceDate},
{"QuantLibc::YieldTermStructureHandle_maxDate", _wrap_YieldTermStructureHandle_maxDate},
{"QuantLibc::YieldTermStructureHandle_maxTime", _wrap_YieldTermStructureHandle_maxTime},
{"QuantLibc::YieldTermStructureHandle_discount", _wrap_YieldTermStructureHandle_discount},
{"QuantLibc::YieldTermStructureHandle_zeroRate", _wrap_YieldTermStructureHandle_zeroRate},
{"QuantLibc::YieldTermStructureHandle_forwardRate", _wrap_YieldTermStructureHandle_forwardRate},
{"QuantLibc::YieldTermStructureHandle_enableExtrapolation", _wrap_YieldTermStructureHandle_enableExtrapolation},
{"QuantLibc::YieldTermStructureHandle_disableExtrapolation", _wrap_YieldTermStructureHandle_disableExtrapolation},
{"QuantLibc::YieldTermStructureHandle_allowsExtrapolation", _wrap_YieldTermStructureHandle_allowsExtrapolation},
{"QuantLibc::new_RelinkableYieldTermStructureHandle", _wrap_new_RelinkableYieldTermStructureHandle},
{"QuantLibc::RelinkableYieldTermStructureHandle_linkTo", _wrap_RelinkableYieldTermStructureHandle_linkTo},
{"QuantLibc::delete_RelinkableYieldTermStructureHandle", _wrap_delete_RelinkableYieldTermStructureHandle},
{"QuantLibc::new_ImpliedTermStructure", _wrap_new_ImpliedTermStructure},
{"QuantLibc::delete_ImpliedTermStructure", _wrap_delete_ImpliedTermStructure},
{"QuantLibc::new_ZeroSpreadedTermStructure", _wrap_new_ZeroSpreadedTermStructure},
{"QuantLibc::delete_ZeroSpreadedTermStructure", _wrap_delete_ZeroSpreadedTermStructure},
{"QuantLibc::new_ForwardSpreadedTermStructure", _wrap_new_ForwardSpreadedTermStructure},
{"QuantLibc::delete_ForwardSpreadedTermStructure", _wrap_delete_ForwardSpreadedTermStructure},
{"QuantLibc::new_SpreadedLinearZeroInterpolatedTermStructure", _wrap_new_SpreadedLinearZeroInterpolatedTermStructure},
{"QuantLibc::delete_SpreadedLinearZeroInterpolatedTermStructure", _wrap_delete_SpreadedLinearZeroInterpolatedTermStructure},
{"QuantLibc::new_FlatForward", _wrap_new_FlatForward},
{"QuantLibc::delete_FlatForward", _wrap_delete_FlatForward},
{"QuantLibc::new_RealTimeSeries", _wrap_new_RealTimeSeries},
{"QuantLibc::RealTimeSeries_dates", _wrap_RealTimeSeries_dates},
{"QuantLibc::RealTimeSeries_values", _wrap_RealTimeSeries_values},
{"QuantLibc::RealTimeSeries_size", _wrap_RealTimeSeries_size},
{"QuantLibc::delete_RealTimeSeries", _wrap_delete_RealTimeSeries},
{"QuantLibc::new_IntervalPriceTimeSeries", _wrap_new_IntervalPriceTimeSeries},
{"QuantLibc::IntervalPriceTimeSeries_dates", _wrap_IntervalPriceTimeSeries_dates},
{"QuantLibc::IntervalPriceTimeSeries_values", _wrap_IntervalPriceTimeSeries_values},
{"QuantLibc::IntervalPriceTimeSeries_size", _wrap_IntervalPriceTimeSeries_size},
{"QuantLibc::delete_IntervalPriceTimeSeries", _wrap_delete_IntervalPriceTimeSeries},
{"QuantLibc::new_IntervalPriceVector", _wrap_new_IntervalPriceVector},
{"QuantLibc::IntervalPriceVector_size", _wrap_IntervalPriceVector_size},
{"QuantLibc::IntervalPriceVector_empty", _wrap_IntervalPriceVector_empty},
{"QuantLibc::IntervalPriceVector_clear", _wrap_IntervalPriceVector_clear},
{"QuantLibc::IntervalPriceVector_push", _wrap_IntervalPriceVector_push},
{"QuantLibc::IntervalPriceVector_pop", _wrap_IntervalPriceVector_pop},
{"QuantLibc::IntervalPriceVector_get", _wrap_IntervalPriceVector_get},
{"QuantLibc::IntervalPriceVector_set", _wrap_IntervalPriceVector_set},
{"QuantLibc::delete_IntervalPriceVector", _wrap_delete_IntervalPriceVector},
{"QuantLibc::new_IntervalPrice", _wrap_new_IntervalPrice},
{"QuantLibc::IntervalPrice_setValue", _wrap_IntervalPrice_setValue},
{"QuantLibc::IntervalPrice_setValues", _wrap_IntervalPrice_setValues},
{"QuantLibc::IntervalPrice_value", _wrap_IntervalPrice_value},
{"QuantLibc::IntervalPrice_open", _wrap_IntervalPrice_open},
{"QuantLibc::IntervalPrice_close", _wrap_IntervalPrice_close},
{"QuantLibc::IntervalPrice_high", _wrap_IntervalPrice_high},
{"QuantLibc::IntervalPrice_low", _wrap_IntervalPrice_low},
{"QuantLibc::IntervalPrice_makeSeries", _wrap_IntervalPrice_makeSeries},
{"QuantLibc::IntervalPrice_extractValues", _wrap_IntervalPrice_extractValues},
{"QuantLibc::IntervalPrice_extractComponent", _wrap_IntervalPrice_extractComponent},
{"QuantLibc::delete_IntervalPrice", _wrap_delete_IntervalPrice},
{"QuantLibc::IndexManager_instance", _wrap_IndexManager_instance},
{"QuantLibc::IndexManager_setHistory", _wrap_IndexManager_setHistory},
{"QuantLibc::IndexManager_getHistory", _wrap_IndexManager_getHistory},
{"QuantLibc::IndexManager_hasHistory", _wrap_IndexManager_hasHistory},
{"QuantLibc::IndexManager_histories", _wrap_IndexManager_histories},
{"QuantLibc::IndexManager_clearHistory", _wrap_IndexManager_clearHistory},
{"QuantLibc::IndexManager_clearHistories", _wrap_IndexManager_clearHistories},
{"QuantLibc::delete_IndexManager", _wrap_delete_IndexManager},
{"QuantLibc::Index___deref__", _wrap_Index___deref__},
{"QuantLibc::Index_isNull", _wrap_Index_isNull},
{"QuantLibc::Index_addFixings", _wrap_Index_addFixings},
{"QuantLibc::Index_asObservable", _wrap_Index_asObservable},
{"QuantLibc::new_Index", _wrap_new_Index},
{"QuantLibc::delete_Index", _wrap_delete_Index},
{"QuantLibc::Index_name", _wrap_Index_name},
{"QuantLibc::Index_fixingCalendar", _wrap_Index_fixingCalendar},
{"QuantLibc::Index_isValidFixingDate", _wrap_Index_isValidFixingDate},
{"QuantLibc::Index_fixing", _wrap_Index_fixing},
{"QuantLibc::Index_addFixing", _wrap_Index_addFixing},
{"QuantLibc::InterestRateIndex_familyName", _wrap_InterestRateIndex_familyName},
{"QuantLibc::InterestRateIndex_tenor", _wrap_InterestRateIndex_tenor},
{"QuantLibc::InterestRateIndex_fixingDays", _wrap_InterestRateIndex_fixingDays},
{"QuantLibc::InterestRateIndex_fixingDate", _wrap_InterestRateIndex_fixingDate},
{"QuantLibc::InterestRateIndex_currency", _wrap_InterestRateIndex_currency},
{"QuantLibc::InterestRateIndex_dayCounter", _wrap_InterestRateIndex_dayCounter},
{"QuantLibc::InterestRateIndex_maturityDate", _wrap_InterestRateIndex_maturityDate},
{"QuantLibc::InterestRateIndex_valueDate", _wrap_InterestRateIndex_valueDate},
{"QuantLibc::delete_InterestRateIndex", _wrap_delete_InterestRateIndex},
{"QuantLibc::new_IborIndex", _wrap_new_IborIndex},
{"QuantLibc::IborIndex_businessDayConvention", _wrap_IborIndex_businessDayConvention},
{"QuantLibc::IborIndex_endOfMonth", _wrap_IborIndex_endOfMonth},
{"QuantLibc::IborIndex_forwardingTermStructure", _wrap_IborIndex_forwardingTermStructure},
{"QuantLibc::IborIndex_clone", _wrap_IborIndex_clone},
{"QuantLibc::delete_IborIndex", _wrap_delete_IborIndex},
{"QuantLibc::as_iborindex", _wrap_as_iborindex},
{"QuantLibc::new_OvernightIndex", _wrap_new_OvernightIndex},
{"QuantLibc::delete_OvernightIndex", _wrap_delete_OvernightIndex},
{"QuantLibc::new_Libor", _wrap_new_Libor},
{"QuantLibc::delete_Libor", _wrap_delete_Libor},
{"QuantLibc::new_SwapIndex", _wrap_new_SwapIndex},
{"QuantLibc::SwapIndex_fixedLegTenor", _wrap_SwapIndex_fixedLegTenor},
{"QuantLibc::SwapIndex_fixedLegConvention", _wrap_SwapIndex_fixedLegConvention},
{"QuantLibc::SwapIndex_iborIndex", _wrap_SwapIndex_iborIndex},
{"QuantLibc::SwapIndex_forwardingTermStructure", _wrap_SwapIndex_forwardingTermStructure},
{"QuantLibc::delete_SwapIndex", _wrap_delete_SwapIndex},
{"QuantLibc::new_AUDLibor", _wrap_new_AUDLibor},
{"QuantLibc::delete_AUDLibor", _wrap_delete_AUDLibor},
{"QuantLibc::new_CADLibor", _wrap_new_CADLibor},
{"QuantLibc::delete_CADLibor", _wrap_delete_CADLibor},
{"QuantLibc::new_Cdor", _wrap_new_Cdor},
{"QuantLibc::delete_Cdor", _wrap_delete_Cdor},
{"QuantLibc::new_CHFLibor", _wrap_new_CHFLibor},
{"QuantLibc::delete_CHFLibor", _wrap_delete_CHFLibor},
{"QuantLibc::new_DKKLibor", _wrap_new_DKKLibor},
{"QuantLibc::delete_DKKLibor", _wrap_delete_DKKLibor},
{"QuantLibc::new_Bbsw", _wrap_new_Bbsw},
{"QuantLibc::delete_Bbsw", _wrap_delete_Bbsw},
{"QuantLibc::new_Bbsw1M", _wrap_new_Bbsw1M},
{"QuantLibc::delete_Bbsw1M", _wrap_delete_Bbsw1M},
{"QuantLibc::new_Bbsw2M", _wrap_new_Bbsw2M},
{"QuantLibc::delete_Bbsw2M", _wrap_delete_Bbsw2M},
{"QuantLibc::new_Bbsw3M", _wrap_new_Bbsw3M},
{"QuantLibc::delete_Bbsw3M", _wrap_delete_Bbsw3M},
{"QuantLibc::new_Bbsw4M", _wrap_new_Bbsw4M},
{"QuantLibc::delete_Bbsw4M", _wrap_delete_Bbsw4M},
{"QuantLibc::new_Bbsw5M", _wrap_new_Bbsw5M},
{"QuantLibc::delete_Bbsw5M", _wrap_delete_Bbsw5M},
{"QuantLibc::new_Bbsw6M", _wrap_new_Bbsw6M},
{"QuantLibc::delete_Bbsw6M", _wrap_delete_Bbsw6M},
{"QuantLibc::new_Bkbm", _wrap_new_Bkbm},
{"QuantLibc::delete_Bkbm", _wrap_delete_Bkbm},
{"QuantLibc::new_Bkbm1M", _wrap_new_Bkbm1M},
{"QuantLibc::delete_Bkbm1M", _wrap_delete_Bkbm1M},
{"QuantLibc::new_Bkbm2M", _wrap_new_Bkbm2M},
{"QuantLibc::delete_Bkbm2M", _wrap_delete_Bkbm2M},
{"QuantLibc::new_Bkbm3M", _wrap_new_Bkbm3M},
{"QuantLibc::delete_Bkbm3M", _wrap_delete_Bkbm3M},
{"QuantLibc::new_Bkbm4M", _wrap_new_Bkbm4M},
{"QuantLibc::delete_Bkbm4M", _wrap_delete_Bkbm4M},
{"QuantLibc::new_Bkbm5M", _wrap_new_Bkbm5M},
{"QuantLibc::delete_Bkbm5M", _wrap_delete_Bkbm5M},
{"QuantLibc::new_Bkbm6M", _wrap_new_Bkbm6M},
{"QuantLibc::delete_Bkbm6M", _wrap_delete_Bkbm6M},
{"QuantLibc::new_Euribor", _wrap_new_Euribor},
{"QuantLibc::delete_Euribor", _wrap_delete_Euribor},
{"QuantLibc::new_EuriborSW", _wrap_new_EuriborSW},
{"QuantLibc::delete_EuriborSW", _wrap_delete_EuriborSW},
{"QuantLibc::new_Euribor2W", _wrap_new_Euribor2W},
{"QuantLibc::delete_Euribor2W", _wrap_delete_Euribor2W},
{"QuantLibc::new_Euribor3W", _wrap_new_Euribor3W},
{"QuantLibc::delete_Euribor3W", _wrap_delete_Euribor3W},
{"QuantLibc::new_Euribor1M", _wrap_new_Euribor1M},
{"QuantLibc::delete_Euribor1M", _wrap_delete_Euribor1M},
{"QuantLibc::new_Euribor2M", _wrap_new_Euribor2M},
{"QuantLibc::delete_Euribor2M", _wrap_delete_Euribor2M},
{"QuantLibc::new_Euribor3M", _wrap_new_Euribor3M},
{"QuantLibc::delete_Euribor3M", _wrap_delete_Euribor3M},
{"QuantLibc::new_Euribor4M", _wrap_new_Euribor4M},
{"QuantLibc::delete_Euribor4M", _wrap_delete_Euribor4M},
{"QuantLibc::new_Euribor5M", _wrap_new_Euribor5M},
{"QuantLibc::delete_Euribor5M", _wrap_delete_Euribor5M},
{"QuantLibc::new_Euribor6M", _wrap_new_Euribor6M},
{"QuantLibc::delete_Euribor6M", _wrap_delete_Euribor6M},
{"QuantLibc::new_Euribor7M", _wrap_new_Euribor7M},
{"QuantLibc::delete_Euribor7M", _wrap_delete_Euribor7M},
{"QuantLibc::new_Euribor8M", _wrap_new_Euribor8M},
{"QuantLibc::delete_Euribor8M", _wrap_delete_Euribor8M},
{"QuantLibc::new_Euribor9M", _wrap_new_Euribor9M},
{"QuantLibc::delete_Euribor9M", _wrap_delete_Euribor9M},
{"QuantLibc::new_Euribor10M", _wrap_new_Euribor10M},
{"QuantLibc::delete_Euribor10M", _wrap_delete_Euribor10M},
{"QuantLibc::new_Euribor11M", _wrap_new_Euribor11M},
{"QuantLibc::delete_Euribor11M", _wrap_delete_Euribor11M},
{"QuantLibc::new_Euribor1Y", _wrap_new_Euribor1Y},
{"QuantLibc::delete_Euribor1Y", _wrap_delete_Euribor1Y},
{"QuantLibc::new_Euribor365", _wrap_new_Euribor365},
{"QuantLibc::delete_Euribor365", _wrap_delete_Euribor365},
{"QuantLibc::new_Euribor365_SW", _wrap_new_Euribor365_SW},
{"QuantLibc::delete_Euribor365_SW", _wrap_delete_Euribor365_SW},
{"QuantLibc::new_Euribor365_2W", _wrap_new_Euribor365_2W},
{"QuantLibc::delete_Euribor365_2W", _wrap_delete_Euribor365_2W},
{"QuantLibc::new_Euribor365_3W", _wrap_new_Euribor365_3W},
{"QuantLibc::delete_Euribor365_3W", _wrap_delete_Euribor365_3W},
{"QuantLibc::new_Euribor365_1M", _wrap_new_Euribor365_1M},
{"QuantLibc::delete_Euribor365_1M", _wrap_delete_Euribor365_1M},
{"QuantLibc::new_Euribor365_2M", _wrap_new_Euribor365_2M},
{"QuantLibc::delete_Euribor365_2M", _wrap_delete_Euribor365_2M},
{"QuantLibc::new_Euribor365_3M", _wrap_new_Euribor365_3M},
{"QuantLibc::delete_Euribor365_3M", _wrap_delete_Euribor365_3M},
{"QuantLibc::new_Euribor365_4M", _wrap_new_Euribor365_4M},
{"QuantLibc::delete_Euribor365_4M", _wrap_delete_Euribor365_4M},
{"QuantLibc::new_Euribor365_5M", _wrap_new_Euribor365_5M},
{"QuantLibc::delete_Euribor365_5M", _wrap_delete_Euribor365_5M},
{"QuantLibc::new_Euribor365_6M", _wrap_new_Euribor365_6M},
{"QuantLibc::delete_Euribor365_6M", _wrap_delete_Euribor365_6M},
{"QuantLibc::new_Euribor365_7M", _wrap_new_Euribor365_7M},
{"QuantLibc::delete_Euribor365_7M", _wrap_delete_Euribor365_7M},
{"QuantLibc::new_Euribor365_8M", _wrap_new_Euribor365_8M},
{"QuantLibc::delete_Euribor365_8M", _wrap_delete_Euribor365_8M},
{"QuantLibc::new_Euribor365_9M", _wrap_new_Euribor365_9M},
{"QuantLibc::delete_Euribor365_9M", _wrap_delete_Euribor365_9M},
{"QuantLibc::new_Euribor365_10M", _wrap_new_Euribor365_10M},
{"QuantLibc::delete_Euribor365_10M", _wrap_delete_Euribor365_10M},
{"QuantLibc::new_Euribor365_11M", _wrap_new_Euribor365_11M},
{"QuantLibc::delete_Euribor365_11M", _wrap_delete_Euribor365_11M},
{"QuantLibc::new_Euribor365_1Y", _wrap_new_Euribor365_1Y},
{"QuantLibc::delete_Euribor365_1Y", _wrap_delete_Euribor365_1Y},
{"QuantLibc::new_EURLibor", _wrap_new_EURLibor},
{"QuantLibc::delete_EURLibor", _wrap_delete_EURLibor},
{"QuantLibc::new_EURLiborSW", _wrap_new_EURLiborSW},
{"QuantLibc::delete_EURLiborSW", _wrap_delete_EURLiborSW},
{"QuantLibc::new_EURLibor2W", _wrap_new_EURLibor2W},
{"QuantLibc::delete_EURLibor2W", _wrap_delete_EURLibor2W},
{"QuantLibc::new_EURLibor1M", _wrap_new_EURLibor1M},
{"QuantLibc::delete_EURLibor1M", _wrap_delete_EURLibor1M},
{"QuantLibc::new_EURLibor2M", _wrap_new_EURLibor2M},
{"QuantLibc::delete_EURLibor2M", _wrap_delete_EURLibor2M},
{"QuantLibc::new_EURLibor3M", _wrap_new_EURLibor3M},
{"QuantLibc::delete_EURLibor3M", _wrap_delete_EURLibor3M},
{"QuantLibc::new_EURLibor4M", _wrap_new_EURLibor4M},
{"QuantLibc::delete_EURLibor4M", _wrap_delete_EURLibor4M},
{"QuantLibc::new_EURLibor5M", _wrap_new_EURLibor5M},
{"QuantLibc::delete_EURLibor5M", _wrap_delete_EURLibor5M},
{"QuantLibc::new_EURLibor6M", _wrap_new_EURLibor6M},
{"QuantLibc::delete_EURLibor6M", _wrap_delete_EURLibor6M},
{"QuantLibc::new_EURLibor7M", _wrap_new_EURLibor7M},
{"QuantLibc::delete_EURLibor7M", _wrap_delete_EURLibor7M},
{"QuantLibc::new_EURLibor8M", _wrap_new_EURLibor8M},
{"QuantLibc::delete_EURLibor8M", _wrap_delete_EURLibor8M},
{"QuantLibc::new_EURLibor9M", _wrap_new_EURLibor9M},
{"QuantLibc::delete_EURLibor9M", _wrap_delete_EURLibor9M},
{"QuantLibc::new_EURLibor10M", _wrap_new_EURLibor10M},
{"QuantLibc::delete_EURLibor10M", _wrap_delete_EURLibor10M},
{"QuantLibc::new_EURLibor11M", _wrap_new_EURLibor11M},
{"QuantLibc::delete_EURLibor11M", _wrap_delete_EURLibor11M},
{"QuantLibc::new_EURLibor1Y", _wrap_new_EURLibor1Y},
{"QuantLibc::delete_EURLibor1Y", _wrap_delete_EURLibor1Y},
{"QuantLibc::new_GBPLibor", _wrap_new_GBPLibor},
{"QuantLibc::delete_GBPLibor", _wrap_delete_GBPLibor},
{"QuantLibc::new_Jibar", _wrap_new_Jibar},
{"QuantLibc::delete_Jibar", _wrap_delete_Jibar},
{"QuantLibc::new_JPYLibor", _wrap_new_JPYLibor},
{"QuantLibc::delete_JPYLibor", _wrap_delete_JPYLibor},
{"QuantLibc::new_NZDLibor", _wrap_new_NZDLibor},
{"QuantLibc::delete_NZDLibor", _wrap_delete_NZDLibor},
{"QuantLibc::new_SEKLibor", _wrap_new_SEKLibor},
{"QuantLibc::delete_SEKLibor", _wrap_delete_SEKLibor},
{"QuantLibc::new_Tibor", _wrap_new_Tibor},
{"QuantLibc::delete_Tibor", _wrap_delete_Tibor},
{"QuantLibc::new_TRLibor", _wrap_new_TRLibor},
{"QuantLibc::delete_TRLibor", _wrap_delete_TRLibor},
{"QuantLibc::new_USDLibor", _wrap_new_USDLibor},
{"QuantLibc::delete_USDLibor", _wrap_delete_USDLibor},
{"QuantLibc::new_Zibor", _wrap_new_Zibor},
{"QuantLibc::delete_Zibor", _wrap_delete_Zibor},
{"QuantLibc::new_Aonia", _wrap_new_Aonia},
{"QuantLibc::delete_Aonia", _wrap_delete_Aonia},
{"QuantLibc::new_Eonia", _wrap_new_Eonia},
{"QuantLibc::delete_Eonia", _wrap_delete_Eonia},
{"QuantLibc::new_Sonia", _wrap_new_Sonia},
{"QuantLibc::delete_Sonia", _wrap_delete_Sonia},
{"QuantLibc::new_FedFunds", _wrap_new_FedFunds},
{"QuantLibc::delete_FedFunds", _wrap_delete_FedFunds},
{"QuantLibc::new_Nzocr", _wrap_new_Nzocr},
{"QuantLibc::delete_Nzocr", _wrap_delete_Nzocr},
{"QuantLibc::new_EuriborSwapIsdaFixA", _wrap_new_EuriborSwapIsdaFixA},
{"QuantLibc::delete_EuriborSwapIsdaFixA", _wrap_delete_EuriborSwapIsdaFixA},
{"QuantLibc::new_EuriborSwapIsdaFixB", _wrap_new_EuriborSwapIsdaFixB},
{"QuantLibc::delete_EuriborSwapIsdaFixB", _wrap_delete_EuriborSwapIsdaFixB},
{"QuantLibc::new_EuriborSwapIfrFix", _wrap_new_EuriborSwapIfrFix},
{"QuantLibc::delete_EuriborSwapIfrFix", _wrap_delete_EuriborSwapIfrFix},
{"QuantLibc::new_EurLiborSwapIsdaFixA", _wrap_new_EurLiborSwapIsdaFixA},
{"QuantLibc::delete_EurLiborSwapIsdaFixA", _wrap_delete_EurLiborSwapIsdaFixA},
{"QuantLibc::new_EurLiborSwapIsdaFixB", _wrap_new_EurLiborSwapIsdaFixB},
{"QuantLibc::delete_EurLiborSwapIsdaFixB", _wrap_delete_EurLiborSwapIsdaFixB},
{"QuantLibc::new_EurLiborSwapIfrFix", _wrap_new_EurLiborSwapIfrFix},
{"QuantLibc::delete_EurLiborSwapIfrFix", _wrap_delete_EurLiborSwapIfrFix},
{"QuantLibc::Brent_setMaxEvaluations", _wrap_Brent_setMaxEvaluations},
{"QuantLibc::Brent_setLowerBound", _wrap_Brent_setLowerBound},
{"QuantLibc::Brent_setUpperBound", _wrap_Brent_setUpperBound},
{"QuantLibc::new_Brent", _wrap_new_Brent},
{"QuantLibc::delete_Brent", _wrap_delete_Brent},
{"QuantLibc::Bisection_setMaxEvaluations", _wrap_Bisection_setMaxEvaluations},
{"QuantLibc::Bisection_setLowerBound", _wrap_Bisection_setLowerBound},
{"QuantLibc::Bisection_setUpperBound", _wrap_Bisection_setUpperBound},
{"QuantLibc::new_Bisection", _wrap_new_Bisection},
{"QuantLibc::delete_Bisection", _wrap_delete_Bisection},
{"QuantLibc::FalsePosition_setMaxEvaluations", _wrap_FalsePosition_setMaxEvaluations},
{"QuantLibc::FalsePosition_setLowerBound", _wrap_FalsePosition_setLowerBound},
{"QuantLibc::FalsePosition_setUpperBound", _wrap_FalsePosition_setUpperBound},
{"QuantLibc::new_FalsePosition", _wrap_new_FalsePosition},
{"QuantLibc::delete_FalsePosition", _wrap_delete_FalsePosition},
{"QuantLibc::Ridder_setMaxEvaluations", _wrap_Ridder_setMaxEvaluations},
{"QuantLibc::Ridder_setLowerBound", _wrap_Ridder_setLowerBound},
{"QuantLibc::Ridder_setUpperBound", _wrap_Ridder_setUpperBound},
{"QuantLibc::new_Ridder", _wrap_new_Ridder},
{"QuantLibc::delete_Ridder", _wrap_delete_Ridder},
{"QuantLibc::Secant_setMaxEvaluations", _wrap_Secant_setMaxEvaluations},
{"QuantLibc::Secant_setLowerBound", _wrap_Secant_setLowerBound},
{"QuantLibc::Secant_setUpperBound", _wrap_Secant_setUpperBound},
{"QuantLibc::new_Secant", _wrap_new_Secant},
{"QuantLibc::delete_Secant", _wrap_delete_Secant},
{"QuantLibc::delete_Constraint", _wrap_delete_Constraint},
{"QuantLibc::new_BoundaryConstraint", _wrap_new_BoundaryConstraint},
{"QuantLibc::delete_BoundaryConstraint", _wrap_delete_BoundaryConstraint},
{"QuantLibc::new_NoConstraint", _wrap_new_NoConstraint},
{"QuantLibc::delete_NoConstraint", _wrap_delete_NoConstraint},
{"QuantLibc::new_PositiveConstraint", _wrap_new_PositiveConstraint},
{"QuantLibc::delete_PositiveConstraint", _wrap_delete_PositiveConstraint},
{"QuantLibc::new_CompositeConstraint", _wrap_new_CompositeConstraint},
{"QuantLibc::delete_CompositeConstraint", _wrap_delete_CompositeConstraint},
{"QuantLibc::new_NonhomogeneousBoundaryConstraint", _wrap_new_NonhomogeneousBoundaryConstraint},
{"QuantLibc::delete_NonhomogeneousBoundaryConstraint", _wrap_delete_NonhomogeneousBoundaryConstraint},
{"QuantLibc::new_EndCriteria", _wrap_new_EndCriteria},
{"QuantLibc::EndCriteria_call", _wrap_EndCriteria_call},
{"QuantLibc::delete_EndCriteria", _wrap_delete_EndCriteria},
{"QuantLibc::delete_OptimizationMethod", _wrap_delete_OptimizationMethod},
{"QuantLibc::new_ConjugateGradient", _wrap_new_ConjugateGradient},
{"QuantLibc::delete_ConjugateGradient", _wrap_delete_ConjugateGradient},
{"QuantLibc::new_Simplex", _wrap_new_Simplex},
{"QuantLibc::delete_Simplex", _wrap_delete_Simplex},
{"QuantLibc::new_SteepestDescent", _wrap_new_SteepestDescent},
{"QuantLibc::delete_SteepestDescent", _wrap_delete_SteepestDescent},
{"QuantLibc::new_BFGS", _wrap_new_BFGS},
{"QuantLibc::delete_BFGS", _wrap_delete_BFGS},
{"QuantLibc::new_LevenbergMarquardt", _wrap_new_LevenbergMarquardt},
{"QuantLibc::delete_LevenbergMarquardt", _wrap_delete_LevenbergMarquardt},
{"QuantLibc::new_DifferentialEvolution", _wrap_new_DifferentialEvolution},
{"QuantLibc::delete_DifferentialEvolution", _wrap_delete_DifferentialEvolution},
{"QuantLibc::new_SamplerGaussian", _wrap_new_SamplerGaussian},
{"QuantLibc::delete_SamplerGaussian", _wrap_delete_SamplerGaussian},
{"QuantLibc::new_SamplerLogNormal", _wrap_new_SamplerLogNormal},
{"QuantLibc::delete_SamplerLogNormal", _wrap_delete_SamplerLogNormal},
{"QuantLibc::new_SamplerMirrorGaussian", _wrap_new_SamplerMirrorGaussian},
{"QuantLibc::delete_SamplerMirrorGaussian", _wrap_delete_SamplerMirrorGaussian},
{"QuantLibc::new_ProbabilityBoltzmannDownhill", _wrap_new_ProbabilityBoltzmannDownhill},
{"QuantLibc::delete_ProbabilityBoltzmannDownhill", _wrap_delete_ProbabilityBoltzmannDownhill},
{"QuantLibc::new_TemperatureExponential", _wrap_new_TemperatureExponential},
{"QuantLibc::delete_TemperatureExponential", _wrap_delete_TemperatureExponential},
{"QuantLibc::new_ReannealingTrivial", _wrap_new_ReannealingTrivial},
{"QuantLibc::delete_ReannealingTrivial", _wrap_delete_ReannealingTrivial},
{"QuantLibc::new_GaussianSimulatedAnnealing", _wrap_new_GaussianSimulatedAnnealing},
{"QuantLibc::delete_GaussianSimulatedAnnealing", _wrap_delete_GaussianSimulatedAnnealing},
{"QuantLibc::new_MirrorGaussianSimulatedAnnealing", _wrap_new_MirrorGaussianSimulatedAnnealing},
{"QuantLibc::delete_MirrorGaussianSimulatedAnnealing", _wrap_delete_MirrorGaussianSimulatedAnnealing},
{"QuantLibc::new_LogNormalSimulatedAnnealing", _wrap_new_LogNormalSimulatedAnnealing},
{"QuantLibc::delete_LogNormalSimulatedAnnealing", _wrap_delete_LogNormalSimulatedAnnealing},
{"QuantLibc::new_Optimizer", _wrap_new_Optimizer},
{"QuantLibc::delete_Optimizer", _wrap_delete_Optimizer},
{"QuantLibc::BlackVolTermStructure___deref__", _wrap_BlackVolTermStructure___deref__},
{"QuantLibc::BlackVolTermStructure_isNull", _wrap_BlackVolTermStructure_isNull},
{"QuantLibc::BlackVolTermStructure_asObservable", _wrap_BlackVolTermStructure_asObservable},
{"QuantLibc::new_BlackVolTermStructure", _wrap_new_BlackVolTermStructure},
{"QuantLibc::delete_BlackVolTermStructure", _wrap_delete_BlackVolTermStructure},
{"QuantLibc::BlackVolTermStructure_referenceDate", _wrap_BlackVolTermStructure_referenceDate},
{"QuantLibc::BlackVolTermStructure_dayCounter", _wrap_BlackVolTermStructure_dayCounter},
{"QuantLibc::BlackVolTermStructure_calendar", _wrap_BlackVolTermStructure_calendar},
{"QuantLibc::BlackVolTermStructure_maxDate", _wrap_BlackVolTermStructure_maxDate},
{"QuantLibc::BlackVolTermStructure_maxTime", _wrap_BlackVolTermStructure_maxTime},
{"QuantLibc::BlackVolTermStructure_minStrike", _wrap_BlackVolTermStructure_minStrike},
{"QuantLibc::BlackVolTermStructure_maxStrike", _wrap_BlackVolTermStructure_maxStrike},
{"QuantLibc::BlackVolTermStructure_blackVol", _wrap_BlackVolTermStructure_blackVol},
{"QuantLibc::BlackVolTermStructure_blackVariance", _wrap_BlackVolTermStructure_blackVariance},
{"QuantLibc::BlackVolTermStructure_blackForwardVol", _wrap_BlackVolTermStructure_blackForwardVol},
{"QuantLibc::BlackVolTermStructure_blackForwardVariance", _wrap_BlackVolTermStructure_blackForwardVariance},
{"QuantLibc::BlackVolTermStructure_enableExtrapolation", _wrap_BlackVolTermStructure_enableExtrapolation},
{"QuantLibc::BlackVolTermStructure_disableExtrapolation", _wrap_BlackVolTermStructure_disableExtrapolation},
{"QuantLibc::BlackVolTermStructure_allowsExtrapolation", _wrap_BlackVolTermStructure_allowsExtrapolation},
{"QuantLibc::new_BlackVolTermStructureHandle", _wrap_new_BlackVolTermStructureHandle},
{"QuantLibc::BlackVolTermStructureHandle___deref__", _wrap_BlackVolTermStructureHandle___deref__},
{"QuantLibc::BlackVolTermStructureHandle_empty", _wrap_BlackVolTermStructureHandle_empty},
{"QuantLibc::BlackVolTermStructureHandle_asObservable", _wrap_BlackVolTermStructureHandle_asObservable},
{"QuantLibc::delete_BlackVolTermStructureHandle", _wrap_delete_BlackVolTermStructureHandle},
{"QuantLibc::BlackVolTermStructureHandle_referenceDate", _wrap_BlackVolTermStructureHandle_referenceDate},
{"QuantLibc::BlackVolTermStructureHandle_dayCounter", _wrap_BlackVolTermStructureHandle_dayCounter},
{"QuantLibc::BlackVolTermStructureHandle_calendar", _wrap_BlackVolTermStructureHandle_calendar},
{"QuantLibc::BlackVolTermStructureHandle_maxDate", _wrap_BlackVolTermStructureHandle_maxDate},
{"QuantLibc::BlackVolTermStructureHandle_maxTime", _wrap_BlackVolTermStructureHandle_maxTime},
{"QuantLibc::BlackVolTermStructureHandle_minStrike", _wrap_BlackVolTermStructureHandle_minStrike},
{"QuantLibc::BlackVolTermStructureHandle_maxStrike", _wrap_BlackVolTermStructureHandle_maxStrike},
{"QuantLibc::BlackVolTermStructureHandle_blackVol", _wrap_BlackVolTermStructureHandle_blackVol},
{"QuantLibc::BlackVolTermStructureHandle_blackVariance", _wrap_BlackVolTermStructureHandle_blackVariance},
{"QuantLibc::BlackVolTermStructureHandle_blackForwardVol", _wrap_BlackVolTermStructureHandle_blackForwardVol},
{"QuantLibc::BlackVolTermStructureHandle_blackForwardVariance", _wrap_BlackVolTermStructureHandle_blackForwardVariance},
{"QuantLibc::BlackVolTermStructureHandle_enableExtrapolation", _wrap_BlackVolTermStructureHandle_enableExtrapolation},
{"QuantLibc::BlackVolTermStructureHandle_disableExtrapolation", _wrap_BlackVolTermStructureHandle_disableExtrapolation},
{"QuantLibc::BlackVolTermStructureHandle_allowsExtrapolation", _wrap_BlackVolTermStructureHandle_allowsExtrapolation},
{"QuantLibc::new_RelinkableBlackVolTermStructureHandle", _wrap_new_RelinkableBlackVolTermStructureHandle},
{"QuantLibc::RelinkableBlackVolTermStructureHandle_linkTo", _wrap_RelinkableBlackVolTermStructureHandle_linkTo},
{"QuantLibc::delete_RelinkableBlackVolTermStructureHandle", _wrap_delete_RelinkableBlackVolTermStructureHandle},
{"QuantLibc::LocalVolTermStructure___deref__", _wrap_LocalVolTermStructure___deref__},
{"QuantLibc::LocalVolTermStructure_isNull", _wrap_LocalVolTermStructure_isNull},
{"QuantLibc::LocalVolTermStructure_asObservable", _wrap_LocalVolTermStructure_asObservable},
{"QuantLibc::new_LocalVolTermStructure", _wrap_new_LocalVolTermStructure},
{"QuantLibc::delete_LocalVolTermStructure", _wrap_delete_LocalVolTermStructure},
{"QuantLibc::LocalVolTermStructure_referenceDate", _wrap_LocalVolTermStructure_referenceDate},
{"QuantLibc::LocalVolTermStructure_dayCounter", _wrap_LocalVolTermStructure_dayCounter},
{"QuantLibc::LocalVolTermStructure_calendar", _wrap_LocalVolTermStructure_calendar},
{"QuantLibc::LocalVolTermStructure_maxDate", _wrap_LocalVolTermStructure_maxDate},
{"QuantLibc::LocalVolTermStructure_maxTime", _wrap_LocalVolTermStructure_maxTime},
{"QuantLibc::LocalVolTermStructure_minStrike", _wrap_LocalVolTermStructure_minStrike},
{"QuantLibc::LocalVolTermStructure_maxStrike", _wrap_LocalVolTermStructure_maxStrike},
{"QuantLibc::LocalVolTermStructure_localVol", _wrap_LocalVolTermStructure_localVol},
{"QuantLibc::LocalVolTermStructure_enableExtrapolation", _wrap_LocalVolTermStructure_enableExtrapolation},
{"QuantLibc::LocalVolTermStructure_disableExtrapolation", _wrap_LocalVolTermStructure_disableExtrapolation},
{"QuantLibc::LocalVolTermStructure_allowsExtrapolation", _wrap_LocalVolTermStructure_allowsExtrapolation},
{"QuantLibc::new_LocalVolTermStructureHandle", _wrap_new_LocalVolTermStructureHandle},
{"QuantLibc::LocalVolTermStructureHandle___deref__", _wrap_LocalVolTermStructureHandle___deref__},
{"QuantLibc::LocalVolTermStructureHandle_empty", _wrap_LocalVolTermStructureHandle_empty},
{"QuantLibc::LocalVolTermStructureHandle_asObservable", _wrap_LocalVolTermStructureHandle_asObservable},
{"QuantLibc::delete_LocalVolTermStructureHandle", _wrap_delete_LocalVolTermStructureHandle},
{"QuantLibc::LocalVolTermStructureHandle_referenceDate", _wrap_LocalVolTermStructureHandle_referenceDate},
{"QuantLibc::LocalVolTermStructureHandle_dayCounter", _wrap_LocalVolTermStructureHandle_dayCounter},
{"QuantLibc::LocalVolTermStructureHandle_calendar", _wrap_LocalVolTermStructureHandle_calendar},
{"QuantLibc::LocalVolTermStructureHandle_maxDate", _wrap_LocalVolTermStructureHandle_maxDate},
{"QuantLibc::LocalVolTermStructureHandle_maxTime", _wrap_LocalVolTermStructureHandle_maxTime},
{"QuantLibc::LocalVolTermStructureHandle_minStrike", _wrap_LocalVolTermStructureHandle_minStrike},
{"QuantLibc::LocalVolTermStructureHandle_maxStrike", _wrap_LocalVolTermStructureHandle_maxStrike},
{"QuantLibc::LocalVolTermStructureHandle_localVol", _wrap_LocalVolTermStructureHandle_localVol},
{"QuantLibc::LocalVolTermStructureHandle_enableExtrapolation", _wrap_LocalVolTermStructureHandle_enableExtrapolation},
{"QuantLibc::LocalVolTermStructureHandle_disableExtrapolation", _wrap_LocalVolTermStructureHandle_disableExtrapolation},
{"QuantLibc::LocalVolTermStructureHandle_allowsExtrapolation", _wrap_LocalVolTermStructureHandle_allowsExtrapolation},
{"QuantLibc::new_RelinkableLocalVolTermStructureHandle", _wrap_new_RelinkableLocalVolTermStructureHandle},
{"QuantLibc::RelinkableLocalVolTermStructureHandle_linkTo", _wrap_RelinkableLocalVolTermStructureHandle_linkTo},
{"QuantLibc::delete_RelinkableLocalVolTermStructureHandle", _wrap_delete_RelinkableLocalVolTermStructureHandle},
{"QuantLibc::OptionletVolatilityStructure___deref__", _wrap_OptionletVolatilityStructure___deref__},
{"QuantLibc::OptionletVolatilityStructure_isNull", _wrap_OptionletVolatilityStructure_isNull},
{"QuantLibc::OptionletVolatilityStructure_asObservable", _wrap_OptionletVolatilityStructure_asObservable},
{"QuantLibc::new_OptionletVolatilityStructure", _wrap_new_OptionletVolatilityStructure},
{"QuantLibc::delete_OptionletVolatilityStructure", _wrap_delete_OptionletVolatilityStructure},
{"QuantLibc::OptionletVolatilityStructure_referenceDate", _wrap_OptionletVolatilityStructure_referenceDate},
{"QuantLibc::OptionletVolatilityStructure_dayCounter", _wrap_OptionletVolatilityStructure_dayCounter},
{"QuantLibc::OptionletVolatilityStructure_calendar", _wrap_OptionletVolatilityStructure_calendar},
{"QuantLibc::OptionletVolatilityStructure_maxDate", _wrap_OptionletVolatilityStructure_maxDate},
{"QuantLibc::OptionletVolatilityStructure_maxTime", _wrap_OptionletVolatilityStructure_maxTime},
{"QuantLibc::OptionletVolatilityStructure_minStrike", _wrap_OptionletVolatilityStructure_minStrike},
{"QuantLibc::OptionletVolatilityStructure_maxStrike", _wrap_OptionletVolatilityStructure_maxStrike},
{"QuantLibc::OptionletVolatilityStructure_volatility", _wrap_OptionletVolatilityStructure_volatility},
{"QuantLibc::OptionletVolatilityStructure_blackVariance", _wrap_OptionletVolatilityStructure_blackVariance},
{"QuantLibc::OptionletVolatilityStructure_enableExtrapolation", _wrap_OptionletVolatilityStructure_enableExtrapolation},
{"QuantLibc::OptionletVolatilityStructure_disableExtrapolation", _wrap_OptionletVolatilityStructure_disableExtrapolation},
{"QuantLibc::OptionletVolatilityStructure_allowsExtrapolation", _wrap_OptionletVolatilityStructure_allowsExtrapolation},
{"QuantLibc::new_OptionletVolatilityStructureHandle", _wrap_new_OptionletVolatilityStructureHandle},
{"QuantLibc::OptionletVolatilityStructureHandle___deref__", _wrap_OptionletVolatilityStructureHandle___deref__},
{"QuantLibc::OptionletVolatilityStructureHandle_empty", _wrap_OptionletVolatilityStructureHandle_empty},
{"QuantLibc::OptionletVolatilityStructureHandle_asObservable", _wrap_OptionletVolatilityStructureHandle_asObservable},
{"QuantLibc::delete_OptionletVolatilityStructureHandle", _wrap_delete_OptionletVolatilityStructureHandle},
{"QuantLibc::OptionletVolatilityStructureHandle_referenceDate", _wrap_OptionletVolatilityStructureHandle_referenceDate},
{"QuantLibc::OptionletVolatilityStructureHandle_dayCounter", _wrap_OptionletVolatilityStructureHandle_dayCounter},
{"QuantLibc::OptionletVolatilityStructureHandle_calendar", _wrap_OptionletVolatilityStructureHandle_calendar},
{"QuantLibc::OptionletVolatilityStructureHandle_maxDate", _wrap_OptionletVolatilityStructureHandle_maxDate},
{"QuantLibc::OptionletVolatilityStructureHandle_maxTime", _wrap_OptionletVolatilityStructureHandle_maxTime},
{"QuantLibc::OptionletVolatilityStructureHandle_minStrike", _wrap_OptionletVolatilityStructureHandle_minStrike},
{"QuantLibc::OptionletVolatilityStructureHandle_maxStrike", _wrap_OptionletVolatilityStructureHandle_maxStrike},
{"QuantLibc::OptionletVolatilityStructureHandle_volatility", _wrap_OptionletVolatilityStructureHandle_volatility},
{"QuantLibc::OptionletVolatilityStructureHandle_blackVariance", _wrap_OptionletVolatilityStructureHandle_blackVariance},
{"QuantLibc::OptionletVolatilityStructureHandle_enableExtrapolation", _wrap_OptionletVolatilityStructureHandle_enableExtrapolation},
{"QuantLibc::OptionletVolatilityStructureHandle_disableExtrapolation", _wrap_OptionletVolatilityStructureHandle_disableExtrapolation},
{"QuantLibc::OptionletVolatilityStructureHandle_allowsExtrapolation", _wrap_OptionletVolatilityStructureHandle_allowsExtrapolation},
{"QuantLibc::new_RelinkableOptionletVolatilityStructureHandle", _wrap_new_RelinkableOptionletVolatilityStructureHandle},
{"QuantLibc::RelinkableOptionletVolatilityStructureHandle_linkTo", _wrap_RelinkableOptionletVolatilityStructureHandle_linkTo},
{"QuantLibc::delete_RelinkableOptionletVolatilityStructureHandle", _wrap_delete_RelinkableOptionletVolatilityStructureHandle},
{"QuantLibc::SwaptionVolatilityStructure___deref__", _wrap_SwaptionVolatilityStructure___deref__},
{"QuantLibc::SwaptionVolatilityStructure_isNull", _wrap_SwaptionVolatilityStructure_isNull},
{"QuantLibc::SwaptionVolatilityStructure_asObservable", _wrap_SwaptionVolatilityStructure_asObservable},
{"QuantLibc::new_SwaptionVolatilityStructure", _wrap_new_SwaptionVolatilityStructure},
{"QuantLibc::delete_SwaptionVolatilityStructure", _wrap_delete_SwaptionVolatilityStructure},
{"QuantLibc::SwaptionVolatilityStructure_referenceDate", _wrap_SwaptionVolatilityStructure_referenceDate},
{"QuantLibc::SwaptionVolatilityStructure_dayCounter", _wrap_SwaptionVolatilityStructure_dayCounter},
{"QuantLibc::SwaptionVolatilityStructure_calendar", _wrap_SwaptionVolatilityStructure_calendar},
{"QuantLibc::SwaptionVolatilityStructure_maxSwapTenor", _wrap_SwaptionVolatilityStructure_maxSwapTenor},
{"QuantLibc::SwaptionVolatilityStructure_maxSwapLength", _wrap_SwaptionVolatilityStructure_maxSwapLength},
{"QuantLibc::SwaptionVolatilityStructure_minStrike", _wrap_SwaptionVolatilityStructure_minStrike},
{"QuantLibc::SwaptionVolatilityStructure_maxStrike", _wrap_SwaptionVolatilityStructure_maxStrike},
{"QuantLibc::SwaptionVolatilityStructure_volatility", _wrap_SwaptionVolatilityStructure_volatility},
{"QuantLibc::SwaptionVolatilityStructure_blackVariance", _wrap_SwaptionVolatilityStructure_blackVariance},
{"QuantLibc::SwaptionVolatilityStructure_optionDateFromTenor", _wrap_SwaptionVolatilityStructure_optionDateFromTenor},
{"QuantLibc::SwaptionVolatilityStructure_enableExtrapolation", _wrap_SwaptionVolatilityStructure_enableExtrapolation},
{"QuantLibc::SwaptionVolatilityStructure_disableExtrapolation", _wrap_SwaptionVolatilityStructure_disableExtrapolation},
{"QuantLibc::SwaptionVolatilityStructure_allowsExtrapolation", _wrap_SwaptionVolatilityStructure_allowsExtrapolation},
{"QuantLibc::new_SwaptionVolatilityStructureHandle", _wrap_new_SwaptionVolatilityStructureHandle},
{"QuantLibc::SwaptionVolatilityStructureHandle___deref__", _wrap_SwaptionVolatilityStructureHandle___deref__},
{"QuantLibc::SwaptionVolatilityStructureHandle_empty", _wrap_SwaptionVolatilityStructureHandle_empty},
{"QuantLibc::SwaptionVolatilityStructureHandle_asObservable", _wrap_SwaptionVolatilityStructureHandle_asObservable},
{"QuantLibc::delete_SwaptionVolatilityStructureHandle", _wrap_delete_SwaptionVolatilityStructureHandle},
{"QuantLibc::SwaptionVolatilityStructureHandle_referenceDate", _wrap_SwaptionVolatilityStructureHandle_referenceDate},
{"QuantLibc::SwaptionVolatilityStructureHandle_dayCounter", _wrap_SwaptionVolatilityStructureHandle_dayCounter},
{"QuantLibc::SwaptionVolatilityStructureHandle_calendar", _wrap_SwaptionVolatilityStructureHandle_calendar},
{"QuantLibc::SwaptionVolatilityStructureHandle_maxSwapTenor", _wrap_SwaptionVolatilityStructureHandle_maxSwapTenor},
{"QuantLibc::SwaptionVolatilityStructureHandle_maxSwapLength", _wrap_SwaptionVolatilityStructureHandle_maxSwapLength},
{"QuantLibc::SwaptionVolatilityStructureHandle_minStrike", _wrap_SwaptionVolatilityStructureHandle_minStrike},
{"QuantLibc::SwaptionVolatilityStructureHandle_maxStrike", _wrap_SwaptionVolatilityStructureHandle_maxStrike},
{"QuantLibc::SwaptionVolatilityStructureHandle_volatility", _wrap_SwaptionVolatilityStructureHandle_volatility},
{"QuantLibc::SwaptionVolatilityStructureHandle_blackVariance", _wrap_SwaptionVolatilityStructureHandle_blackVariance},
{"QuantLibc::SwaptionVolatilityStructureHandle_optionDateFromTenor", _wrap_SwaptionVolatilityStructureHandle_optionDateFromTenor},
{"QuantLibc::SwaptionVolatilityStructureHandle_enableExtrapolation", _wrap_SwaptionVolatilityStructureHandle_enableExtrapolation},
{"QuantLibc::SwaptionVolatilityStructureHandle_disableExtrapolation", _wrap_SwaptionVolatilityStructureHandle_disableExtrapolation},
{"QuantLibc::SwaptionVolatilityStructureHandle_allowsExtrapolation", _wrap_SwaptionVolatilityStructureHandle_allowsExtrapolation},
{"QuantLibc::new_RelinkableSwaptionVolatilityStructureHandle", _wrap_new_RelinkableSwaptionVolatilityStructureHandle},
{"QuantLibc::RelinkableSwaptionVolatilityStructureHandle_linkTo", _wrap_RelinkableSwaptionVolatilityStructureHandle_linkTo},
{"QuantLibc::delete_RelinkableSwaptionVolatilityStructureHandle", _wrap_delete_RelinkableSwaptionVolatilityStructureHandle},
{"QuantLibc::new_BlackConstantVol", _wrap_new_BlackConstantVol},
{"QuantLibc::delete_BlackConstantVol", _wrap_delete_BlackConstantVol},
{"QuantLibc::new_BlackVarianceCurve", _wrap_new_BlackVarianceCurve},
{"QuantLibc::delete_BlackVarianceCurve", _wrap_delete_BlackVarianceCurve},
{"QuantLibc::new_BlackVarianceSurface", _wrap_new_BlackVarianceSurface},
{"QuantLibc::BlackVarianceSurface_setInterpolation", _wrap_BlackVarianceSurface_setInterpolation},
{"QuantLibc::delete_BlackVarianceSurface", _wrap_delete_BlackVarianceSurface},
{"QuantLibc::new_LocalConstantVol", _wrap_new_LocalConstantVol},
{"QuantLibc::delete_LocalConstantVol", _wrap_delete_LocalConstantVol},
{"QuantLibc::new_LocalVolSurface", _wrap_new_LocalVolSurface},
{"QuantLibc::delete_LocalVolSurface", _wrap_delete_LocalVolSurface},
{"QuantLibc::new_ConstantOptionletVolatility", _wrap_new_ConstantOptionletVolatility},
{"QuantLibc::delete_ConstantOptionletVolatility", _wrap_delete_ConstantOptionletVolatility},
{"QuantLibc::new_ConstantSwaptionVolatility", _wrap_new_ConstantSwaptionVolatility},
{"QuantLibc::delete_ConstantSwaptionVolatility", _wrap_delete_ConstantSwaptionVolatility},
{"QuantLibc::new_SwaptionVolatilityMatrix", _wrap_new_SwaptionVolatilityMatrix},
{"QuantLibc::delete_SwaptionVolatilityMatrix", _wrap_delete_SwaptionVolatilityMatrix},
{"QuantLibc::new_SwaptionVolCube1", _wrap_new_SwaptionVolCube1},
{"QuantLibc::SwaptionVolCube1_sparseSabrParameters", _wrap_SwaptionVolCube1_sparseSabrParameters},
{"QuantLibc::SwaptionVolCube1_denseSabrParameters", _wrap_SwaptionVolCube1_denseSabrParameters},
{"QuantLibc::SwaptionVolCube1_marketVolCube", _wrap_SwaptionVolCube1_marketVolCube},
{"QuantLibc::SwaptionVolCube1_volCubeAtmCalibrated", _wrap_SwaptionVolCube1_volCubeAtmCalibrated},
{"QuantLibc::delete_SwaptionVolCube1", _wrap_delete_SwaptionVolCube1},
{"QuantLibc::new_SwaptionVolCube2", _wrap_new_SwaptionVolCube2},
{"QuantLibc::delete_SwaptionVolCube2", _wrap_delete_SwaptionVolCube2},
{"QuantLibc::StochasticProcess___deref__", _wrap_StochasticProcess___deref__},
{"QuantLibc::StochasticProcess_isNull", _wrap_StochasticProcess_isNull},
{"QuantLibc::StochasticProcess_asObservable", _wrap_StochasticProcess_asObservable},
{"QuantLibc::new_StochasticProcess", _wrap_new_StochasticProcess},
{"QuantLibc::delete_StochasticProcess", _wrap_delete_StochasticProcess},
{"QuantLibc::StochasticProcess_size", _wrap_StochasticProcess_size},
{"QuantLibc::StochasticProcess_factors", _wrap_StochasticProcess_factors},
{"QuantLibc::StochasticProcess_initialValues", _wrap_StochasticProcess_initialValues},
{"QuantLibc::StochasticProcess_drift", _wrap_StochasticProcess_drift},
{"QuantLibc::StochasticProcess_diffusion", _wrap_StochasticProcess_diffusion},
{"QuantLibc::StochasticProcess_expectation", _wrap_StochasticProcess_expectation},
{"QuantLibc::StochasticProcess_stdDeviation", _wrap_StochasticProcess_stdDeviation},
{"QuantLibc::StochasticProcess_covariance", _wrap_StochasticProcess_covariance},
{"QuantLibc::StochasticProcess_evolve", _wrap_StochasticProcess_evolve},
{"QuantLibc::new_StochasticProcessVector", _wrap_new_StochasticProcessVector},
{"QuantLibc::StochasticProcessVector_size", _wrap_StochasticProcessVector_size},
{"QuantLibc::StochasticProcessVector_empty", _wrap_StochasticProcessVector_empty},
{"QuantLibc::StochasticProcessVector_clear", _wrap_StochasticProcessVector_clear},
{"QuantLibc::StochasticProcessVector_push", _wrap_StochasticProcessVector_push},
{"QuantLibc::StochasticProcessVector_pop", _wrap_StochasticProcessVector_pop},
{"QuantLibc::StochasticProcessVector_get", _wrap_StochasticProcessVector_get},
{"QuantLibc::StochasticProcessVector_set", _wrap_StochasticProcessVector_set},
{"QuantLibc::delete_StochasticProcessVector", _wrap_delete_StochasticProcessVector},
{"QuantLibc::StochasticProcess1D_x0", _wrap_StochasticProcess1D_x0},
{"QuantLibc::StochasticProcess1D_drift", _wrap_StochasticProcess1D_drift},
{"QuantLibc::StochasticProcess1D_diffusion", _wrap_StochasticProcess1D_diffusion},
{"QuantLibc::StochasticProcess1D_expectation", _wrap_StochasticProcess1D_expectation},
{"QuantLibc::StochasticProcess1D_stdDeviation", _wrap_StochasticProcess1D_stdDeviation},
{"QuantLibc::StochasticProcess1D_variance", _wrap_StochasticProcess1D_variance},
{"QuantLibc::StochasticProcess1D_evolve", _wrap_StochasticProcess1D_evolve},
{"QuantLibc::StochasticProcess1D_apply", _wrap_StochasticProcess1D_apply},
{"QuantLibc::delete_StochasticProcess1D", _wrap_delete_StochasticProcess1D},
{"QuantLibc::new_GeneralizedBlackScholesProcess", _wrap_new_GeneralizedBlackScholesProcess},
{"QuantLibc::GeneralizedBlackScholesProcess_stateVariable", _wrap_GeneralizedBlackScholesProcess_stateVariable},
{"QuantLibc::GeneralizedBlackScholesProcess_dividendYield", _wrap_GeneralizedBlackScholesProcess_dividendYield},
{"QuantLibc::GeneralizedBlackScholesProcess_riskFreeRate", _wrap_GeneralizedBlackScholesProcess_riskFreeRate},
{"QuantLibc::GeneralizedBlackScholesProcess_blackVolatility", _wrap_GeneralizedBlackScholesProcess_blackVolatility},
{"QuantLibc::delete_GeneralizedBlackScholesProcess", _wrap_delete_GeneralizedBlackScholesProcess},
{"QuantLibc::new_BlackScholesProcess", _wrap_new_BlackScholesProcess},
{"QuantLibc::delete_BlackScholesProcess", _wrap_delete_BlackScholesProcess},
{"QuantLibc::new_BlackScholesMertonProcess", _wrap_new_BlackScholesMertonProcess},
{"QuantLibc::delete_BlackScholesMertonProcess", _wrap_delete_BlackScholesMertonProcess},
{"QuantLibc::new_BlackProcess", _wrap_new_BlackProcess},
{"QuantLibc::delete_BlackProcess", _wrap_delete_BlackProcess},
{"QuantLibc::new_GarmanKohlagenProcess", _wrap_new_GarmanKohlagenProcess},
{"QuantLibc::delete_GarmanKohlagenProcess", _wrap_delete_GarmanKohlagenProcess},
{"QuantLibc::new_Merton76Process", _wrap_new_Merton76Process},
{"QuantLibc::delete_Merton76Process", _wrap_delete_Merton76Process},
{"QuantLibc::new_StochasticProcessArray", _wrap_new_StochasticProcessArray},
{"QuantLibc::delete_StochasticProcessArray", _wrap_delete_StochasticProcessArray},
{"QuantLibc::new_GeometricBrownianMotionProcess", _wrap_new_GeometricBrownianMotionProcess},
{"QuantLibc::delete_GeometricBrownianMotionProcess", _wrap_delete_GeometricBrownianMotionProcess},
{"QuantLibc::new_VarianceGammaProcess", _wrap_new_VarianceGammaProcess},
{"QuantLibc::delete_VarianceGammaProcess", _wrap_delete_VarianceGammaProcess},
{"QuantLibc::new_HestonProcess", _wrap_new_HestonProcess},
{"QuantLibc::HestonProcess_s0", _wrap_HestonProcess_s0},
{"QuantLibc::HestonProcess_dividendYield", _wrap_HestonProcess_dividendYield},
{"QuantLibc::HestonProcess_riskFreeRate", _wrap_HestonProcess_riskFreeRate},
{"QuantLibc::delete_HestonProcess", _wrap_delete_HestonProcess},
{"QuantLibc::new_BatesProcess", _wrap_new_BatesProcess},
{"QuantLibc::delete_BatesProcess", _wrap_delete_BatesProcess},
{"QuantLibc::new_HullWhiteProcess", _wrap_new_HullWhiteProcess},
{"QuantLibc::delete_HullWhiteProcess", _wrap_delete_HullWhiteProcess},
{"QuantLibc::new_HullWhiteForwardProcess", _wrap_new_HullWhiteForwardProcess},
{"QuantLibc::HullWhiteForwardProcess_alpha", _wrap_HullWhiteForwardProcess_alpha},
{"QuantLibc::HullWhiteForwardProcess_M_T", _wrap_HullWhiteForwardProcess_M_T},
{"QuantLibc::HullWhiteForwardProcess_B", _wrap_HullWhiteForwardProcess_B},
{"QuantLibc::HullWhiteForwardProcess_setForwardMeasureTime", _wrap_HullWhiteForwardProcess_setForwardMeasureTime},
{"QuantLibc::delete_HullWhiteForwardProcess", _wrap_delete_HullWhiteForwardProcess},
{"QuantLibc::new_GsrProcess", _wrap_new_GsrProcess},
{"QuantLibc::GsrProcess_sigma", _wrap_GsrProcess_sigma},
{"QuantLibc::GsrProcess_reversion", _wrap_GsrProcess_reversion},
{"QuantLibc::GsrProcess_y", _wrap_GsrProcess_y},
{"QuantLibc::GsrProcess_G", _wrap_GsrProcess_G},
{"QuantLibc::GsrProcess_setForwardMeasureTime", _wrap_GsrProcess_setForwardMeasureTime},
{"QuantLibc::delete_GsrProcess", _wrap_delete_GsrProcess},
{"QuantLibc::as_gsr_process", _wrap_as_gsr_process},
{"QuantLibc::PricingEngine___deref__", _wrap_PricingEngine___deref__},
{"QuantLibc::PricingEngine_isNull", _wrap_PricingEngine_isNull},
{"QuantLibc::new_PricingEngine", _wrap_new_PricingEngine},
{"QuantLibc::delete_PricingEngine", _wrap_delete_PricingEngine},
{"QuantLibc::Instrument___deref__", _wrap_Instrument___deref__},
{"QuantLibc::Instrument_isNull", _wrap_Instrument_isNull},
{"QuantLibc::Instrument_asObservable", _wrap_Instrument_asObservable},
{"QuantLibc::new_Instrument", _wrap_new_Instrument},
{"QuantLibc::delete_Instrument", _wrap_delete_Instrument},
{"QuantLibc::Instrument_NPV", _wrap_Instrument_NPV},
{"QuantLibc::Instrument_errorEstimate", _wrap_Instrument_errorEstimate},
{"QuantLibc::Instrument_isExpired", _wrap_Instrument_isExpired},
{"QuantLibc::Instrument_setPricingEngine", _wrap_Instrument_setPricingEngine},
{"QuantLibc::Instrument_recalculate", _wrap_Instrument_recalculate},
{"QuantLibc::Instrument_freeze", _wrap_Instrument_freeze},
{"QuantLibc::Instrument_unfreeze", _wrap_Instrument_unfreeze},
{"QuantLibc::new_InstrumentVector", _wrap_new_InstrumentVector},
{"QuantLibc::InstrumentVector_size", _wrap_InstrumentVector_size},
{"QuantLibc::InstrumentVector_empty", _wrap_InstrumentVector_empty},
{"QuantLibc::InstrumentVector_clear", _wrap_InstrumentVector_clear},
{"QuantLibc::InstrumentVector_push", _wrap_InstrumentVector_push},
{"QuantLibc::InstrumentVector_pop", _wrap_InstrumentVector_pop},
{"QuantLibc::InstrumentVector_get", _wrap_InstrumentVector_get},
{"QuantLibc::InstrumentVector_set", _wrap_InstrumentVector_set},
{"QuantLibc::delete_InstrumentVector", _wrap_delete_InstrumentVector},
{"QuantLibc::new_Stock", _wrap_new_Stock},
{"QuantLibc::delete_Stock", _wrap_delete_Stock},
{"QuantLibc::new_CompositeInstrument", _wrap_new_CompositeInstrument},
{"QuantLibc::CompositeInstrument_add", _wrap_CompositeInstrument_add},
{"QuantLibc::CompositeInstrument_subtract", _wrap_CompositeInstrument_subtract},
{"QuantLibc::delete_CompositeInstrument", _wrap_delete_CompositeInstrument},
{"QuantLibc::new_DateGeneration", _wrap_new_DateGeneration},
{"QuantLibc::delete_DateGeneration", _wrap_delete_DateGeneration},
{"QuantLibc::new_Schedule", _wrap_new_Schedule},
{"QuantLibc::Schedule_size", _wrap_Schedule_size},
{"QuantLibc::Schedule_date", _wrap_Schedule_date},
{"QuantLibc::Schedule_isRegular", _wrap_Schedule_isRegular},
{"QuantLibc::Schedule_until", _wrap_Schedule_until},
{"QuantLibc::delete_Schedule", _wrap_delete_Schedule},
{"QuantLibc::CashFlow___deref__", _wrap_CashFlow___deref__},
{"QuantLibc::CashFlow_isNull", _wrap_CashFlow_isNull},
{"QuantLibc::CashFlow_asObservable", _wrap_CashFlow_asObservable},
{"QuantLibc::new_CashFlow", _wrap_new_CashFlow},
{"QuantLibc::delete_CashFlow", _wrap_delete_CashFlow},
{"QuantLibc::CashFlow_amount", _wrap_CashFlow_amount},
{"QuantLibc::CashFlow_date", _wrap_CashFlow_date},
{"QuantLibc::new_Leg", _wrap_new_Leg},
{"QuantLibc::Leg_size", _wrap_Leg_size},
{"QuantLibc::Leg_empty", _wrap_Leg_empty},
{"QuantLibc::Leg_clear", _wrap_Leg_clear},
{"QuantLibc::Leg_push", _wrap_Leg_push},
{"QuantLibc::Leg_pop", _wrap_Leg_pop},
{"QuantLibc::Leg_get", _wrap_Leg_get},
{"QuantLibc::Leg_set", _wrap_Leg_set},
{"QuantLibc::delete_Leg", _wrap_delete_Leg},
{"QuantLibc::new_SimpleCashFlow", _wrap_new_SimpleCashFlow},
{"QuantLibc::delete_SimpleCashFlow", _wrap_delete_SimpleCashFlow},
{"QuantLibc::new_Redemption", _wrap_new_Redemption},
{"QuantLibc::delete_Redemption", _wrap_delete_Redemption},
{"QuantLibc::new_AmortizingPayment", _wrap_new_AmortizingPayment},
{"QuantLibc::delete_AmortizingPayment", _wrap_delete_AmortizingPayment},
{"QuantLibc::Coupon_nominal", _wrap_Coupon_nominal},
{"QuantLibc::Coupon_accrualStartDate", _wrap_Coupon_accrualStartDate},
{"QuantLibc::Coupon_accrualEndDate", _wrap_Coupon_accrualEndDate},
{"QuantLibc::Coupon_referencePeriodStart", _wrap_Coupon_referencePeriodStart},
{"QuantLibc::Coupon_referencePeriodEnd", _wrap_Coupon_referencePeriodEnd},
{"QuantLibc::Coupon_exCouponDate", _wrap_Coupon_exCouponDate},
{"QuantLibc::Coupon_rate", _wrap_Coupon_rate},
{"QuantLibc::Coupon_accrualPeriod", _wrap_Coupon_accrualPeriod},
{"QuantLibc::Coupon_accrualDays", _wrap_Coupon_accrualDays},
{"QuantLibc::Coupon_dayCounter", _wrap_Coupon_dayCounter},
{"QuantLibc::Coupon_accruedAmount", _wrap_Coupon_accruedAmount},
{"QuantLibc::delete_Coupon", _wrap_delete_Coupon},
{"QuantLibc::as_coupon", _wrap_as_coupon},
{"QuantLibc::new_FixedRateCoupon", _wrap_new_FixedRateCoupon},
{"QuantLibc::FixedRateCoupon_interestRate", _wrap_FixedRateCoupon_interestRate},
{"QuantLibc::delete_FixedRateCoupon", _wrap_delete_FixedRateCoupon},
{"QuantLibc::as_fixed_rate_coupon", _wrap_as_fixed_rate_coupon},
{"QuantLibc::FloatingRateCouponPricer___deref__", _wrap_FloatingRateCouponPricer___deref__},
{"QuantLibc::FloatingRateCouponPricer_isNull", _wrap_FloatingRateCouponPricer_isNull},
{"QuantLibc::new_FloatingRateCouponPricer", _wrap_new_FloatingRateCouponPricer},
{"QuantLibc::delete_FloatingRateCouponPricer", _wrap_delete_FloatingRateCouponPricer},
{"QuantLibc::setCouponPricer", _wrap_setCouponPricer},
{"QuantLibc::FloatingRateCoupon_fixingDate", _wrap_FloatingRateCoupon_fixingDate},
{"QuantLibc::FloatingRateCoupon_fixingDays", _wrap_FloatingRateCoupon_fixingDays},
{"QuantLibc::FloatingRateCoupon_isInArrears", _wrap_FloatingRateCoupon_isInArrears},
{"QuantLibc::FloatingRateCoupon_gearing", _wrap_FloatingRateCoupon_gearing},
{"QuantLibc::FloatingRateCoupon_spread", _wrap_FloatingRateCoupon_spread},
{"QuantLibc::FloatingRateCoupon_indexFixing", _wrap_FloatingRateCoupon_indexFixing},
{"QuantLibc::FloatingRateCoupon_adjustedFixing", _wrap_FloatingRateCoupon_adjustedFixing},
{"QuantLibc::FloatingRateCoupon_convexityAdjustment", _wrap_FloatingRateCoupon_convexityAdjustment},
{"QuantLibc::FloatingRateCoupon_price", _wrap_FloatingRateCoupon_price},
{"QuantLibc::FloatingRateCoupon_index", _wrap_FloatingRateCoupon_index},
{"QuantLibc::FloatingRateCoupon_setPricer", _wrap_FloatingRateCoupon_setPricer},
{"QuantLibc::delete_FloatingRateCoupon", _wrap_delete_FloatingRateCoupon},
{"QuantLibc::as_floating_rate_coupon", _wrap_as_floating_rate_coupon},
{"QuantLibc::new_CappedFlooredCoupon", _wrap_new_CappedFlooredCoupon},
{"QuantLibc::CappedFlooredCoupon_cap", _wrap_CappedFlooredCoupon_cap},
{"QuantLibc::CappedFlooredCoupon_floor", _wrap_CappedFlooredCoupon_floor},
{"QuantLibc::CappedFlooredCoupon_effectiveCap", _wrap_CappedFlooredCoupon_effectiveCap},
{"QuantLibc::CappedFlooredCoupon_effectiveFloor", _wrap_CappedFlooredCoupon_effectiveFloor},
{"QuantLibc::CappedFlooredCoupon_isCapped", _wrap_CappedFlooredCoupon_isCapped},
{"QuantLibc::CappedFlooredCoupon_isFloored", _wrap_CappedFlooredCoupon_isFloored},
{"QuantLibc::CappedFlooredCoupon_setPricer", _wrap_CappedFlooredCoupon_setPricer},
{"QuantLibc::delete_CappedFlooredCoupon", _wrap_delete_CappedFlooredCoupon},
{"QuantLibc::new_IborCoupon", _wrap_new_IborCoupon},
{"QuantLibc::delete_IborCoupon", _wrap_delete_IborCoupon},
{"QuantLibc::IborCouponPricer_capletVolatility", _wrap_IborCouponPricer_capletVolatility},
{"QuantLibc::IborCouponPricer_setCapletVolatility", _wrap_IborCouponPricer_setCapletVolatility},
{"QuantLibc::delete_IborCouponPricer", _wrap_delete_IborCouponPricer},
{"QuantLibc::new_BlackIborCouponPricer", _wrap_new_BlackIborCouponPricer},
{"QuantLibc::delete_BlackIborCouponPricer", _wrap_delete_BlackIborCouponPricer},
{"QuantLibc::new_CmsCoupon", _wrap_new_CmsCoupon},
{"QuantLibc::delete_CmsCoupon", _wrap_delete_CmsCoupon},
{"QuantLibc::CmsCouponPricer_swaptionVolatility", _wrap_CmsCouponPricer_swaptionVolatility},
{"QuantLibc::CmsCouponPricer_setSwaptionVolatility", _wrap_CmsCouponPricer_setSwaptionVolatility},
{"QuantLibc::delete_CmsCouponPricer", _wrap_delete_CmsCouponPricer},
{"QuantLibc::delete_GFunctionFactory", _wrap_delete_GFunctionFactory},
{"QuantLibc::new_AnalyticHaganPricer", _wrap_new_AnalyticHaganPricer},
{"QuantLibc::delete_AnalyticHaganPricer", _wrap_delete_AnalyticHaganPricer},
{"QuantLibc::new_NumericHaganPricer", _wrap_new_NumericHaganPricer},
{"QuantLibc::delete_NumericHaganPricer", _wrap_delete_NumericHaganPricer},
{"QuantLibc::new_CappedFlooredCmsCoupon", _wrap_new_CappedFlooredCmsCoupon},
{"QuantLibc::delete_CappedFlooredCmsCoupon", _wrap_delete_CappedFlooredCmsCoupon},
{"QuantLibc::new_LinearTsrPricer", _wrap_new_LinearTsrPricer},
{"QuantLibc::delete_LinearTsrPricer", _wrap_delete_LinearTsrPricer},
{"QuantLibc::FixedRateLeg", _wrap_FixedRateLeg},
{"QuantLibc::IborLeg", _wrap_IborLeg},
{"QuantLibc::CmsLeg", _wrap_CmsLeg},
{"QuantLibc::CmsZeroLeg", _wrap_CmsZeroLeg},
{"QuantLibc::new_Duration", _wrap_new_Duration},
{"QuantLibc::delete_Duration", _wrap_delete_Duration},
{"QuantLibc::CashFlows_startDate", _wrap_CashFlows_startDate},
{"QuantLibc::CashFlows_maturityDate", _wrap_CashFlows_maturityDate},
{"QuantLibc::CashFlows_npv", _wrap_CashFlows_npv},
{"QuantLibc::CashFlows_bps", _wrap_CashFlows_bps},
{"QuantLibc::CashFlows_atmRate", _wrap_CashFlows_atmRate},
{"QuantLibc::CashFlows_yield", _wrap_CashFlows_yield},
{"QuantLibc::CashFlows_duration", _wrap_CashFlows_duration},
{"QuantLibc::CashFlows_convexity", _wrap_CashFlows_convexity},
{"QuantLibc::CashFlows_basisPointValue", _wrap_CashFlows_basisPointValue},
{"QuantLibc::CashFlows_zSpread", _wrap_CashFlows_zSpread},
{"QuantLibc::delete_CashFlows", _wrap_delete_CashFlows},
{"QuantLibc::CalibrationHelper___deref__", _wrap_CalibrationHelper___deref__},
{"QuantLibc::CalibrationHelper_isNull", _wrap_CalibrationHelper_isNull},
{"QuantLibc::CalibrationHelper_swaptionExpiryDate", _wrap_CalibrationHelper_swaptionExpiryDate},
{"QuantLibc::CalibrationHelper_swaptionStrike", _wrap_CalibrationHelper_swaptionStrike},
{"QuantLibc::CalibrationHelper_swaptionNominal", _wrap_CalibrationHelper_swaptionNominal},
{"QuantLibc::CalibrationHelper_swaptionMaturityDate", _wrap_CalibrationHelper_swaptionMaturityDate},
{"QuantLibc::new_CalibrationHelper", _wrap_new_CalibrationHelper},
{"QuantLibc::delete_CalibrationHelper", _wrap_delete_CalibrationHelper},
{"QuantLibc::CalibrationHelper_setPricingEngine", _wrap_CalibrationHelper_setPricingEngine},
{"QuantLibc::CalibrationHelper_marketValue", _wrap_CalibrationHelper_marketValue},
{"QuantLibc::CalibrationHelper_modelValue", _wrap_CalibrationHelper_modelValue},
{"QuantLibc::CalibrationHelper_calibrationError", _wrap_CalibrationHelper_calibrationError},
{"QuantLibc::CalibrationHelper_impliedVolatility", _wrap_CalibrationHelper_impliedVolatility},
{"QuantLibc::CalibrationHelper_blackPrice", _wrap_CalibrationHelper_blackPrice},
{"QuantLibc::CalibrationHelper_volatility", _wrap_CalibrationHelper_volatility},
{"QuantLibc::CalibrationHelper_volatilityType", _wrap_CalibrationHelper_volatilityType},
{"QuantLibc::new_SwaptionHelper", _wrap_new_SwaptionHelper},
{"QuantLibc::SwaptionHelper_times", _wrap_SwaptionHelper_times},
{"QuantLibc::delete_SwaptionHelper", _wrap_delete_SwaptionHelper},
{"QuantLibc::new_CapHelper", _wrap_new_CapHelper},
{"QuantLibc::CapHelper_times", _wrap_CapHelper_times},
{"QuantLibc::delete_CapHelper", _wrap_delete_CapHelper},
{"QuantLibc::new_HestonModelHelper", _wrap_new_HestonModelHelper},
{"QuantLibc::delete_HestonModelHelper", _wrap_delete_HestonModelHelper},
{"QuantLibc::new_CalibrationHelperVector", _wrap_new_CalibrationHelperVector},
{"QuantLibc::CalibrationHelperVector_size", _wrap_CalibrationHelperVector_size},
{"QuantLibc::CalibrationHelperVector_empty", _wrap_CalibrationHelperVector_empty},
{"QuantLibc::CalibrationHelperVector_clear", _wrap_CalibrationHelperVector_clear},
{"QuantLibc::CalibrationHelperVector_push", _wrap_CalibrationHelperVector_push},
{"QuantLibc::CalibrationHelperVector_pop", _wrap_CalibrationHelperVector_pop},
{"QuantLibc::CalibrationHelperVector_get", _wrap_CalibrationHelperVector_get},
{"QuantLibc::CalibrationHelperVector_set", _wrap_CalibrationHelperVector_set},
{"QuantLibc::delete_CalibrationHelperVector", _wrap_delete_CalibrationHelperVector},
{"QuantLibc::CalibratedModel___deref__", _wrap_CalibratedModel___deref__},
{"QuantLibc::CalibratedModel_isNull", _wrap_CalibratedModel_isNull},
{"QuantLibc::CalibratedModel_asObservable", _wrap_CalibratedModel_asObservable},
{"QuantLibc::new_CalibratedModel", _wrap_new_CalibratedModel},
{"QuantLibc::delete_CalibratedModel", _wrap_delete_CalibratedModel},
{"QuantLibc::CalibratedModel_params", _wrap_CalibratedModel_params},
{"QuantLibc::CalibratedModel_calibrate", _wrap_CalibratedModel_calibrate},
{"QuantLibc::CalibratedModel_setParams", _wrap_CalibratedModel_setParams},
{"QuantLibc::CalibratedModel_value", _wrap_CalibratedModel_value},
{"QuantLibc::new_CalibratedModelHandle", _wrap_new_CalibratedModelHandle},
{"QuantLibc::CalibratedModelHandle___deref__", _wrap_CalibratedModelHandle___deref__},
{"QuantLibc::CalibratedModelHandle_empty", _wrap_CalibratedModelHandle_empty},
{"QuantLibc::CalibratedModelHandle_asObservable", _wrap_CalibratedModelHandle_asObservable},
{"QuantLibc::delete_CalibratedModelHandle", _wrap_delete_CalibratedModelHandle},
{"QuantLibc::CalibratedModelHandle_params", _wrap_CalibratedModelHandle_params},
{"QuantLibc::CalibratedModelHandle_calibrate", _wrap_CalibratedModelHandle_calibrate},
{"QuantLibc::CalibratedModelHandle_setParams", _wrap_CalibratedModelHandle_setParams},
{"QuantLibc::CalibratedModelHandle_value", _wrap_CalibratedModelHandle_value},
{"QuantLibc::new_RelinkableCalibratedModelHandle", _wrap_new_RelinkableCalibratedModelHandle},
{"QuantLibc::RelinkableCalibratedModelHandle_linkTo", _wrap_RelinkableCalibratedModelHandle_linkTo},
{"QuantLibc::delete_RelinkableCalibratedModelHandle", _wrap_delete_RelinkableCalibratedModelHandle},
{"QuantLibc::new_TimeGrid", _wrap_new_TimeGrid},
{"QuantLibc::TimeGrid_size", _wrap_TimeGrid_size},
{"QuantLibc::delete_TimeGrid", _wrap_delete_TimeGrid},
{"QuantLibc::new_Parameter", _wrap_new_Parameter},
{"QuantLibc::Parameter_params", _wrap_Parameter_params},
{"QuantLibc::Parameter_setParam", _wrap_Parameter_setParam},
{"QuantLibc::Parameter_testParams", _wrap_Parameter_testParams},
{"QuantLibc::Parameter_size", _wrap_Parameter_size},
{"QuantLibc::Parameter___call__", _wrap_Parameter___call__},
{"QuantLibc::Parameter_constraint", _wrap_Parameter_constraint},
{"QuantLibc::delete_Parameter", _wrap_delete_Parameter},
{"QuantLibc::new_ConstantParameter", _wrap_new_ConstantParameter},
{"QuantLibc::delete_ConstantParameter", _wrap_delete_ConstantParameter},
{"QuantLibc::new_NullParameter", _wrap_new_NullParameter},
{"QuantLibc::delete_NullParameter", _wrap_delete_NullParameter},
{"QuantLibc::new_PiecewiseConstantParameter", _wrap_new_PiecewiseConstantParameter},
{"QuantLibc::delete_PiecewiseConstantParameter", _wrap_delete_PiecewiseConstantParameter},
{"QuantLibc::delete_Option", _wrap_delete_Option},
{"QuantLibc::new_Barrier", _wrap_new_Barrier},
{"QuantLibc::delete_Barrier", _wrap_delete_Barrier},
{"QuantLibc::new_DoubleBarrier", _wrap_new_DoubleBarrier},
{"QuantLibc::delete_DoubleBarrier", _wrap_delete_DoubleBarrier},
{"QuantLibc::Payoff___deref__", _wrap_Payoff___deref__},
{"QuantLibc::Payoff_isNull", _wrap_Payoff_isNull},
{"QuantLibc::new_Payoff", _wrap_new_Payoff},
{"QuantLibc::delete_Payoff", _wrap_delete_Payoff},
{"QuantLibc::Payoff_call", _wrap_Payoff_call},
{"QuantLibc::new_VanillaOption", _wrap_new_VanillaOption},
{"QuantLibc::VanillaOption_priceCurve", _wrap_VanillaOption_priceCurve},
{"QuantLibc::VanillaOption_impliedVolatility", _wrap_VanillaOption_impliedVolatility},
{"QuantLibc::VanillaOption_delta", _wrap_VanillaOption_delta},
{"QuantLibc::VanillaOption_gamma", _wrap_VanillaOption_gamma},
{"QuantLibc::VanillaOption_theta", _wrap_VanillaOption_theta},
{"QuantLibc::VanillaOption_thetaPerDay", _wrap_VanillaOption_thetaPerDay},
{"QuantLibc::VanillaOption_vega", _wrap_VanillaOption_vega},
{"QuantLibc::VanillaOption_rho", _wrap_VanillaOption_rho},
{"QuantLibc::VanillaOption_dividendRho", _wrap_VanillaOption_dividendRho},
{"QuantLibc::VanillaOption_strikeSensitivity", _wrap_VanillaOption_strikeSensitivity},
{"QuantLibc::delete_VanillaOption", _wrap_delete_VanillaOption},
{"QuantLibc::new_EuropeanOption", _wrap_new_EuropeanOption},
{"QuantLibc::delete_EuropeanOption", _wrap_delete_EuropeanOption},
{"QuantLibc::new_ForwardVanillaOption", _wrap_new_ForwardVanillaOption},
{"QuantLibc::delete_ForwardVanillaOption", _wrap_delete_ForwardVanillaOption},
{"QuantLibc::new_QuantoVanillaOption", _wrap_new_QuantoVanillaOption},
{"QuantLibc::QuantoVanillaOption_qvega", _wrap_QuantoVanillaOption_qvega},
{"QuantLibc::QuantoVanillaOption_qrho", _wrap_QuantoVanillaOption_qrho},
{"QuantLibc::QuantoVanillaOption_qlambda", _wrap_QuantoVanillaOption_qlambda},
{"QuantLibc::delete_QuantoVanillaOption", _wrap_delete_QuantoVanillaOption},
{"QuantLibc::new_QuantoForwardVanillaOption", _wrap_new_QuantoForwardVanillaOption},
{"QuantLibc::delete_QuantoForwardVanillaOption", _wrap_delete_QuantoForwardVanillaOption},
{"QuantLibc::MultiAssetOption_delta", _wrap_MultiAssetOption_delta},
{"QuantLibc::MultiAssetOption_gamma", _wrap_MultiAssetOption_gamma},
{"QuantLibc::MultiAssetOption_theta", _wrap_MultiAssetOption_theta},
{"QuantLibc::MultiAssetOption_vega", _wrap_MultiAssetOption_vega},
{"QuantLibc::MultiAssetOption_rho", _wrap_MultiAssetOption_rho},
{"QuantLibc::MultiAssetOption_dividendRho", _wrap_MultiAssetOption_dividendRho},
{"QuantLibc::new_MultiAssetOption", _wrap_new_MultiAssetOption},
{"QuantLibc::delete_MultiAssetOption", _wrap_delete_MultiAssetOption},
{"QuantLibc::new_AnalyticEuropeanEngine", _wrap_new_AnalyticEuropeanEngine},
{"QuantLibc::delete_AnalyticEuropeanEngine", _wrap_delete_AnalyticEuropeanEngine},
{"QuantLibc::new_HestonModel", _wrap_new_HestonModel},
{"QuantLibc::HestonModel_theta", _wrap_HestonModel_theta},
{"QuantLibc::HestonModel_kappa", _wrap_HestonModel_kappa},
{"QuantLibc::HestonModel_sigma", _wrap_HestonModel_sigma},
{"QuantLibc::HestonModel_rho", _wrap_HestonModel_rho},
{"QuantLibc::HestonModel_v0", _wrap_HestonModel_v0},
{"QuantLibc::delete_HestonModel", _wrap_delete_HestonModel},
{"QuantLibc::new_PiecewiseTimeDependentHestonModel", _wrap_new_PiecewiseTimeDependentHestonModel},
{"QuantLibc::PiecewiseTimeDependentHestonModel_theta", _wrap_PiecewiseTimeDependentHestonModel_theta},
{"QuantLibc::PiecewiseTimeDependentHestonModel_kappa", _wrap_PiecewiseTimeDependentHestonModel_kappa},
{"QuantLibc::PiecewiseTimeDependentHestonModel_sigma", _wrap_PiecewiseTimeDependentHestonModel_sigma},
{"QuantLibc::PiecewiseTimeDependentHestonModel_rho", _wrap_PiecewiseTimeDependentHestonModel_rho},
{"QuantLibc::PiecewiseTimeDependentHestonModel_v0", _wrap_PiecewiseTimeDependentHestonModel_v0},
{"QuantLibc::PiecewiseTimeDependentHestonModel_s0", _wrap_PiecewiseTimeDependentHestonModel_s0},
{"QuantLibc::PiecewiseTimeDependentHestonModel_timeGrid", _wrap_PiecewiseTimeDependentHestonModel_timeGrid},
{"QuantLibc::PiecewiseTimeDependentHestonModel_dividendYield", _wrap_PiecewiseTimeDependentHestonModel_dividendYield},
{"QuantLibc::PiecewiseTimeDependentHestonModel_riskFreeRate", _wrap_PiecewiseTimeDependentHestonModel_riskFreeRate},
{"QuantLibc::delete_PiecewiseTimeDependentHestonModel", _wrap_delete_PiecewiseTimeDependentHestonModel},
{"QuantLibc::new_AnalyticHestonEngine", _wrap_new_AnalyticHestonEngine},
{"QuantLibc::delete_AnalyticHestonEngine", _wrap_delete_AnalyticHestonEngine},
{"QuantLibc::new_AnalyticPTDHestonEngine", _wrap_new_AnalyticPTDHestonEngine},
{"QuantLibc::delete_AnalyticPTDHestonEngine", _wrap_delete_AnalyticPTDHestonEngine},
{"QuantLibc::new_BatesModel", _wrap_new_BatesModel},
{"QuantLibc::BatesModel_nu", _wrap_BatesModel_nu},
{"QuantLibc::BatesModel_delta", _wrap_BatesModel_delta},
{"QuantLibc::BatesModel_lambda", _wrap_BatesModel_lambda},
{"QuantLibc::delete_BatesModel", _wrap_delete_BatesModel},
{"QuantLibc::new_BatesEngine", _wrap_new_BatesEngine},
{"QuantLibc::delete_BatesEngine", _wrap_delete_BatesEngine},
{"QuantLibc::new_IntegralEngine", _wrap_new_IntegralEngine},
{"QuantLibc::delete_IntegralEngine", _wrap_delete_IntegralEngine},
{"QuantLibc::new_FDBermudanEngine", _wrap_new_FDBermudanEngine},
{"QuantLibc::delete_FDBermudanEngine", _wrap_delete_FDBermudanEngine},
{"QuantLibc::new_FDEuropeanEngine", _wrap_new_FDEuropeanEngine},
{"QuantLibc::delete_FDEuropeanEngine", _wrap_delete_FDEuropeanEngine},
{"QuantLibc::new_BinomialVanillaEngine", _wrap_new_BinomialVanillaEngine},
{"QuantLibc::delete_BinomialVanillaEngine", _wrap_delete_BinomialVanillaEngine},
{"QuantLibc::new_MCEuropeanEngine", _wrap_new_MCEuropeanEngine},
{"QuantLibc::delete_MCEuropeanEngine", _wrap_delete_MCEuropeanEngine},
{"QuantLibc::new_FDAmericanEngine", _wrap_new_FDAmericanEngine},
{"QuantLibc::delete_FDAmericanEngine", _wrap_delete_FDAmericanEngine},
{"QuantLibc::new_FdBlackScholesVanillaEngine", _wrap_new_FdBlackScholesVanillaEngine},
{"QuantLibc::delete_FdBlackScholesVanillaEngine", _wrap_delete_FdBlackScholesVanillaEngine},
{"QuantLibc::new_FdBatesVanillaEngine", _wrap_new_FdBatesVanillaEngine},
{"QuantLibc::delete_FdBatesVanillaEngine", _wrap_delete_FdBatesVanillaEngine},
{"QuantLibc::new_ContinuousArithmeticAsianLevyEngine", _wrap_new_ContinuousArithmeticAsianLevyEngine},
{"QuantLibc::delete_ContinuousArithmeticAsianLevyEngine", _wrap_delete_ContinuousArithmeticAsianLevyEngine},
{"QuantLibc::new_FdBlackScholesAsianEngine", _wrap_new_FdBlackScholesAsianEngine},
{"QuantLibc::delete_FdBlackScholesAsianEngine", _wrap_delete_FdBlackScholesAsianEngine},
{"QuantLibc::new_FDShoutEngine", _wrap_new_FDShoutEngine},
{"QuantLibc::delete_FDShoutEngine", _wrap_delete_FDShoutEngine},
{"QuantLibc::new_BaroneAdesiWhaleyEngine", _wrap_new_BaroneAdesiWhaleyEngine},
{"QuantLibc::delete_BaroneAdesiWhaleyEngine", _wrap_delete_BaroneAdesiWhaleyEngine},
{"QuantLibc::new_BjerksundStenslandEngine", _wrap_new_BjerksundStenslandEngine},
{"QuantLibc::delete_BjerksundStenslandEngine", _wrap_delete_BjerksundStenslandEngine},
{"QuantLibc::new_AnalyticDigitalAmericanEngine", _wrap_new_AnalyticDigitalAmericanEngine},
{"QuantLibc::delete_AnalyticDigitalAmericanEngine", _wrap_delete_AnalyticDigitalAmericanEngine},
{"QuantLibc::new_AnalyticDigitalAmericanKOEngine", _wrap_new_AnalyticDigitalAmericanKOEngine},
{"QuantLibc::delete_AnalyticDigitalAmericanKOEngine", _wrap_delete_AnalyticDigitalAmericanKOEngine},
{"QuantLibc::new_DividendVanillaOption", _wrap_new_DividendVanillaOption},
{"QuantLibc::DividendVanillaOption_priceCurve", _wrap_DividendVanillaOption_priceCurve},
{"QuantLibc::DividendVanillaOption_impliedVolatility", _wrap_DividendVanillaOption_impliedVolatility},
{"QuantLibc::DividendVanillaOption_delta", _wrap_DividendVanillaOption_delta},
{"QuantLibc::DividendVanillaOption_gamma", _wrap_DividendVanillaOption_gamma},
{"QuantLibc::DividendVanillaOption_theta", _wrap_DividendVanillaOption_theta},
{"QuantLibc::DividendVanillaOption_thetaPerDay", _wrap_DividendVanillaOption_thetaPerDay},
{"QuantLibc::DividendVanillaOption_vega", _wrap_DividendVanillaOption_vega},
{"QuantLibc::DividendVanillaOption_rho", _wrap_DividendVanillaOption_rho},
{"QuantLibc::DividendVanillaOption_dividendRho", _wrap_DividendVanillaOption_dividendRho},
{"QuantLibc::DividendVanillaOption_strikeSensitivity", _wrap_DividendVanillaOption_strikeSensitivity},
{"QuantLibc::delete_DividendVanillaOption", _wrap_delete_DividendVanillaOption},
{"QuantLibc::new_AnalyticDividendEuropeanEngine", _wrap_new_AnalyticDividendEuropeanEngine},
{"QuantLibc::delete_AnalyticDividendEuropeanEngine", _wrap_delete_AnalyticDividendEuropeanEngine},
{"QuantLibc::new_FDDividendEuropeanEngine", _wrap_new_FDDividendEuropeanEngine},
{"QuantLibc::delete_FDDividendEuropeanEngine", _wrap_delete_FDDividendEuropeanEngine},
{"QuantLibc::new_FDDividendAmericanEngine", _wrap_new_FDDividendAmericanEngine},
{"QuantLibc::delete_FDDividendAmericanEngine", _wrap_delete_FDDividendAmericanEngine},
{"QuantLibc::new_BarrierOption", _wrap_new_BarrierOption},
{"QuantLibc::BarrierOption_priceCurve", _wrap_BarrierOption_priceCurve},
{"QuantLibc::BarrierOption_impliedVolatility", _wrap_BarrierOption_impliedVolatility},
{"QuantLibc::BarrierOption_delta", _wrap_BarrierOption_delta},
{"QuantLibc::BarrierOption_gamma", _wrap_BarrierOption_gamma},
{"QuantLibc::BarrierOption_theta", _wrap_BarrierOption_theta},
{"QuantLibc::BarrierOption_thetaPerDay", _wrap_BarrierOption_thetaPerDay},
{"QuantLibc::BarrierOption_vega", _wrap_BarrierOption_vega},
{"QuantLibc::BarrierOption_rho", _wrap_BarrierOption_rho},
{"QuantLibc::BarrierOption_dividendRho", _wrap_BarrierOption_dividendRho},
{"QuantLibc::BarrierOption_strikeSensitivity", _wrap_BarrierOption_strikeSensitivity},
{"QuantLibc::delete_BarrierOption", _wrap_delete_BarrierOption},
{"QuantLibc::new_AnalyticBarrierEngine", _wrap_new_AnalyticBarrierEngine},
{"QuantLibc::delete_AnalyticBarrierEngine", _wrap_delete_AnalyticBarrierEngine},
{"QuantLibc::new_MCBarrierEngine", _wrap_new_MCBarrierEngine},
{"QuantLibc::delete_MCBarrierEngine", _wrap_delete_MCBarrierEngine},
{"QuantLibc::new_FdmSchemeDesc", _wrap_new_FdmSchemeDesc},
{"QuantLibc::FdmSchemeDesc_type_get", _wrap_FdmSchemeDesc_type_get},
{"QuantLibc::FdmSchemeDesc_theta_get", _wrap_FdmSchemeDesc_theta_get},
{"QuantLibc::FdmSchemeDesc_mu_get", _wrap_FdmSchemeDesc_mu_get},
{"QuantLibc::FdmSchemeDesc_Douglas", _wrap_FdmSchemeDesc_Douglas},
{"QuantLibc::FdmSchemeDesc_ImplicitEuler", _wrap_FdmSchemeDesc_ImplicitEuler},
{"QuantLibc::FdmSchemeDesc_ExplicitEuler", _wrap_FdmSchemeDesc_ExplicitEuler},
{"QuantLibc::FdmSchemeDesc_CraigSneyd", _wrap_FdmSchemeDesc_CraigSneyd},
{"QuantLibc::FdmSchemeDesc_ModifiedCraigSneyd", _wrap_FdmSchemeDesc_ModifiedCraigSneyd},
{"QuantLibc::FdmSchemeDesc_Hundsdorfer", _wrap_FdmSchemeDesc_Hundsdorfer},
{"QuantLibc::FdmSchemeDesc_ModifiedHundsdorfer", _wrap_FdmSchemeDesc_ModifiedHundsdorfer},
{"QuantLibc::delete_FdmSchemeDesc", _wrap_delete_FdmSchemeDesc},
{"QuantLibc::new_FdBlackScholesBarrierEngine", _wrap_new_FdBlackScholesBarrierEngine},
{"QuantLibc::delete_FdBlackScholesBarrierEngine", _wrap_delete_FdBlackScholesBarrierEngine},
{"QuantLibc::new_AnalyticBinaryBarrierEngine", _wrap_new_AnalyticBinaryBarrierEngine},
{"QuantLibc::delete_AnalyticBinaryBarrierEngine", _wrap_delete_AnalyticBinaryBarrierEngine},
{"QuantLibc::new_BinomialBarrierEngine", _wrap_new_BinomialBarrierEngine},
{"QuantLibc::delete_BinomialBarrierEngine", _wrap_delete_BinomialBarrierEngine},
{"QuantLibc::new_ForwardEuropeanEngine", _wrap_new_ForwardEuropeanEngine},
{"QuantLibc::delete_ForwardEuropeanEngine", _wrap_delete_ForwardEuropeanEngine},
{"QuantLibc::new_QuantoEuropeanEngine", _wrap_new_QuantoEuropeanEngine},
{"QuantLibc::delete_QuantoEuropeanEngine", _wrap_delete_QuantoEuropeanEngine},
{"QuantLibc::new_QuantoForwardEuropeanEngine", _wrap_new_QuantoForwardEuropeanEngine},
{"QuantLibc::delete_QuantoForwardEuropeanEngine", _wrap_delete_QuantoForwardEuropeanEngine},
{"QuantLibc::new_BlackCalculator", _wrap_new_BlackCalculator},
{"QuantLibc::BlackCalculator_value", _wrap_BlackCalculator_value},
{"QuantLibc::BlackCalculator_deltaForward", _wrap_BlackCalculator_deltaForward},
{"QuantLibc::BlackCalculator_delta", _wrap_BlackCalculator_delta},
{"QuantLibc::BlackCalculator_elasticityForward", _wrap_BlackCalculator_elasticityForward},
{"QuantLibc::BlackCalculator_elasticity", _wrap_BlackCalculator_elasticity},
{"QuantLibc::BlackCalculator_gammaForward", _wrap_BlackCalculator_gammaForward},
{"QuantLibc::BlackCalculator_gamma", _wrap_BlackCalculator_gamma},
{"QuantLibc::BlackCalculator_theta", _wrap_BlackCalculator_theta},
{"QuantLibc::BlackCalculator_thetaPerDay", _wrap_BlackCalculator_thetaPerDay},
{"QuantLibc::BlackCalculator_vega", _wrap_BlackCalculator_vega},
{"QuantLibc::BlackCalculator_rho", _wrap_BlackCalculator_rho},
{"QuantLibc::BlackCalculator_dividendRho", _wrap_BlackCalculator_dividendRho},
{"QuantLibc::BlackCalculator_itmCashProbability", _wrap_BlackCalculator_itmCashProbability},
{"QuantLibc::BlackCalculator_itmAssetProbability", _wrap_BlackCalculator_itmAssetProbability},
{"QuantLibc::BlackCalculator_strikeSensitivity", _wrap_BlackCalculator_strikeSensitivity},
{"QuantLibc::BlackCalculator_alpha", _wrap_BlackCalculator_alpha},
{"QuantLibc::BlackCalculator_beta", _wrap_BlackCalculator_beta},
{"QuantLibc::delete_BlackCalculator", _wrap_delete_BlackCalculator},
{"QuantLibc::new_Average", _wrap_new_Average},
{"QuantLibc::delete_Average", _wrap_delete_Average},
{"QuantLibc::new_ContinuousAveragingAsianOption", _wrap_new_ContinuousAveragingAsianOption},
{"QuantLibc::ContinuousAveragingAsianOption_delta", _wrap_ContinuousAveragingAsianOption_delta},
{"QuantLibc::ContinuousAveragingAsianOption_gamma", _wrap_ContinuousAveragingAsianOption_gamma},
{"QuantLibc::ContinuousAveragingAsianOption_theta", _wrap_ContinuousAveragingAsianOption_theta},
{"QuantLibc::ContinuousAveragingAsianOption_thetaPerDay", _wrap_ContinuousAveragingAsianOption_thetaPerDay},
{"QuantLibc::ContinuousAveragingAsianOption_vega", _wrap_ContinuousAveragingAsianOption_vega},
{"QuantLibc::ContinuousAveragingAsianOption_rho", _wrap_ContinuousAveragingAsianOption_rho},
{"QuantLibc::ContinuousAveragingAsianOption_dividendRho", _wrap_ContinuousAveragingAsianOption_dividendRho},
{"QuantLibc::ContinuousAveragingAsianOption_strikeSensitivity", _wrap_ContinuousAveragingAsianOption_strikeSensitivity},
{"QuantLibc::delete_ContinuousAveragingAsianOption", _wrap_delete_ContinuousAveragingAsianOption},
{"QuantLibc::new_DiscreteAveragingAsianOption", _wrap_new_DiscreteAveragingAsianOption},
{"QuantLibc::DiscreteAveragingAsianOption_delta", _wrap_DiscreteAveragingAsianOption_delta},
{"QuantLibc::DiscreteAveragingAsianOption_gamma", _wrap_DiscreteAveragingAsianOption_gamma},
{"QuantLibc::DiscreteAveragingAsianOption_theta", _wrap_DiscreteAveragingAsianOption_theta},
{"QuantLibc::DiscreteAveragingAsianOption_thetaPerDay", _wrap_DiscreteAveragingAsianOption_thetaPerDay},
{"QuantLibc::DiscreteAveragingAsianOption_vega", _wrap_DiscreteAveragingAsianOption_vega},
{"QuantLibc::DiscreteAveragingAsianOption_rho", _wrap_DiscreteAveragingAsianOption_rho},
{"QuantLibc::DiscreteAveragingAsianOption_dividendRho", _wrap_DiscreteAveragingAsianOption_dividendRho},
{"QuantLibc::DiscreteAveragingAsianOption_strikeSensitivity", _wrap_DiscreteAveragingAsianOption_strikeSensitivity},
{"QuantLibc::delete_DiscreteAveragingAsianOption", _wrap_delete_DiscreteAveragingAsianOption},
{"QuantLibc::new_AnalyticContinuousGeometricAveragePriceAsianEngine", _wrap_new_AnalyticContinuousGeometricAveragePriceAsianEngine},
{"QuantLibc::delete_AnalyticContinuousGeometricAveragePriceAsianEngine", _wrap_delete_AnalyticContinuousGeometricAveragePriceAsianEngine},
{"QuantLibc::new_AnalyticDiscreteGeometricAveragePriceAsianEngine", _wrap_new_AnalyticDiscreteGeometricAveragePriceAsianEngine},
{"QuantLibc::delete_AnalyticDiscreteGeometricAveragePriceAsianEngine", _wrap_delete_AnalyticDiscreteGeometricAveragePriceAsianEngine},
{"QuantLibc::new_AnalyticDiscreteGeometricAverageStrikeAsianEngine", _wrap_new_AnalyticDiscreteGeometricAverageStrikeAsianEngine},
{"QuantLibc::delete_AnalyticDiscreteGeometricAverageStrikeAsianEngine", _wrap_delete_AnalyticDiscreteGeometricAverageStrikeAsianEngine},
{"QuantLibc::new_MCDiscreteArithmeticAPEngine", _wrap_new_MCDiscreteArithmeticAPEngine},
{"QuantLibc::delete_MCDiscreteArithmeticAPEngine", _wrap_delete_MCDiscreteArithmeticAPEngine},
{"QuantLibc::new_MCDiscreteArithmeticASEngine", _wrap_new_MCDiscreteArithmeticASEngine},
{"QuantLibc::delete_MCDiscreteArithmeticASEngine", _wrap_delete_MCDiscreteArithmeticASEngine},
{"QuantLibc::new_MCDiscreteGeometricAPEngine", _wrap_new_MCDiscreteGeometricAPEngine},
{"QuantLibc::delete_MCDiscreteGeometricAPEngine", _wrap_delete_MCDiscreteGeometricAPEngine},
{"QuantLibc::new_VarianceGammaEngine", _wrap_new_VarianceGammaEngine},
{"QuantLibc::delete_VarianceGammaEngine", _wrap_delete_VarianceGammaEngine},
{"QuantLibc::new_FFTVarianceGammaEngine", _wrap_new_FFTVarianceGammaEngine},
{"QuantLibc::FFTVarianceGammaEngine_precalculate", _wrap_FFTVarianceGammaEngine_precalculate},
{"QuantLibc::delete_FFTVarianceGammaEngine", _wrap_delete_FFTVarianceGammaEngine},
{"QuantLibc::new_DoubleBarrierOption", _wrap_new_DoubleBarrierOption},
{"QuantLibc::DoubleBarrierOption_delta", _wrap_DoubleBarrierOption_delta},
{"QuantLibc::DoubleBarrierOption_gamma", _wrap_DoubleBarrierOption_gamma},
{"QuantLibc::DoubleBarrierOption_theta", _wrap_DoubleBarrierOption_theta},
{"QuantLibc::DoubleBarrierOption_thetaPerDay", _wrap_DoubleBarrierOption_thetaPerDay},
{"QuantLibc::DoubleBarrierOption_vega", _wrap_DoubleBarrierOption_vega},
{"QuantLibc::DoubleBarrierOption_rho", _wrap_DoubleBarrierOption_rho},
{"QuantLibc::DoubleBarrierOption_dividendRho", _wrap_DoubleBarrierOption_dividendRho},
{"QuantLibc::DoubleBarrierOption_strikeSensitivity", _wrap_DoubleBarrierOption_strikeSensitivity},
{"QuantLibc::delete_DoubleBarrierOption", _wrap_delete_DoubleBarrierOption},
{"QuantLibc::new_QuantoDoubleBarrierOption", _wrap_new_QuantoDoubleBarrierOption},
{"QuantLibc::QuantoDoubleBarrierOption_qvega", _wrap_QuantoDoubleBarrierOption_qvega},
{"QuantLibc::QuantoDoubleBarrierOption_qrho", _wrap_QuantoDoubleBarrierOption_qrho},
{"QuantLibc::QuantoDoubleBarrierOption_qlambda", _wrap_QuantoDoubleBarrierOption_qlambda},
{"QuantLibc::delete_QuantoDoubleBarrierOption", _wrap_delete_QuantoDoubleBarrierOption},
{"QuantLibc::new_AnalyticDoubleBarrierEngine", _wrap_new_AnalyticDoubleBarrierEngine},
{"QuantLibc::delete_AnalyticDoubleBarrierEngine", _wrap_delete_AnalyticDoubleBarrierEngine},
{"QuantLibc::new_WulinYongDoubleBarrierEngine", _wrap_new_WulinYongDoubleBarrierEngine},
{"QuantLibc::delete_WulinYongDoubleBarrierEngine", _wrap_delete_WulinYongDoubleBarrierEngine},
{"QuantLibc::DeltaVolQuote___deref__", _wrap_DeltaVolQuote___deref__},
{"QuantLibc::DeltaVolQuote_isNull", _wrap_DeltaVolQuote_isNull},
{"QuantLibc::DeltaVolQuote_asObservable", _wrap_DeltaVolQuote_asObservable},
{"QuantLibc::new_DeltaVolQuote", _wrap_new_DeltaVolQuote},
{"QuantLibc::delete_DeltaVolQuote", _wrap_delete_DeltaVolQuote},
{"QuantLibc::DeltaVolQuote_value", _wrap_DeltaVolQuote_value},
{"QuantLibc::new_DeltaVolQuoteHandle", _wrap_new_DeltaVolQuoteHandle},
{"QuantLibc::DeltaVolQuoteHandle___deref__", _wrap_DeltaVolQuoteHandle___deref__},
{"QuantLibc::DeltaVolQuoteHandle_empty", _wrap_DeltaVolQuoteHandle_empty},
{"QuantLibc::DeltaVolQuoteHandle_asObservable", _wrap_DeltaVolQuoteHandle_asObservable},
{"QuantLibc::delete_DeltaVolQuoteHandle", _wrap_delete_DeltaVolQuoteHandle},
{"QuantLibc::DeltaVolQuoteHandle_value", _wrap_DeltaVolQuoteHandle_value},
{"QuantLibc::new_RelinkableDeltaVolQuoteHandle", _wrap_new_RelinkableDeltaVolQuoteHandle},
{"QuantLibc::RelinkableDeltaVolQuoteHandle_linkTo", _wrap_RelinkableDeltaVolQuoteHandle_linkTo},
{"QuantLibc::delete_RelinkableDeltaVolQuoteHandle", _wrap_delete_RelinkableDeltaVolQuoteHandle},
{"QuantLibc::new_VannaVolgaDoubleBarrierEngine", _wrap_new_VannaVolgaDoubleBarrierEngine},
{"QuantLibc::delete_VannaVolgaDoubleBarrierEngine", _wrap_delete_VannaVolgaDoubleBarrierEngine},
{"QuantLibc::new_AnalyticDoubleBarrierBinaryEngine", _wrap_new_AnalyticDoubleBarrierBinaryEngine},
{"QuantLibc::delete_AnalyticDoubleBarrierBinaryEngine", _wrap_delete_AnalyticDoubleBarrierBinaryEngine},
{"QuantLibc::new_BinomialDoubleBarrierEngine", _wrap_new_BinomialDoubleBarrierEngine},
{"QuantLibc::delete_BinomialDoubleBarrierEngine", _wrap_delete_BinomialDoubleBarrierEngine},
{"QuantLibc::new_PlainVanillaPayoff", _wrap_new_PlainVanillaPayoff},
{"QuantLibc::PlainVanillaPayoff_optionType", _wrap_PlainVanillaPayoff_optionType},
{"QuantLibc::PlainVanillaPayoff_strike", _wrap_PlainVanillaPayoff_strike},
{"QuantLibc::delete_PlainVanillaPayoff", _wrap_delete_PlainVanillaPayoff},
{"QuantLibc::new_PercentageStrikePayoff", _wrap_new_PercentageStrikePayoff},
{"QuantLibc::delete_PercentageStrikePayoff", _wrap_delete_PercentageStrikePayoff},
{"QuantLibc::new_CashOrNothingPayoff", _wrap_new_CashOrNothingPayoff},
{"QuantLibc::delete_CashOrNothingPayoff", _wrap_delete_CashOrNothingPayoff},
{"QuantLibc::new_AssetOrNothingPayoff", _wrap_new_AssetOrNothingPayoff},
{"QuantLibc::delete_AssetOrNothingPayoff", _wrap_delete_AssetOrNothingPayoff},
{"QuantLibc::new_SuperSharePayoff", _wrap_new_SuperSharePayoff},
{"QuantLibc::delete_SuperSharePayoff", _wrap_delete_SuperSharePayoff},
{"QuantLibc::new_GapPayoff", _wrap_new_GapPayoff},
{"QuantLibc::delete_GapPayoff", _wrap_delete_GapPayoff},
{"QuantLibc::new_BasketPayoff", _wrap_new_BasketPayoff},
{"QuantLibc::delete_BasketPayoff", _wrap_delete_BasketPayoff},
{"QuantLibc::new_MinBasketPayoff", _wrap_new_MinBasketPayoff},
{"QuantLibc::delete_MinBasketPayoff", _wrap_delete_MinBasketPayoff},
{"QuantLibc::new_MaxBasketPayoff", _wrap_new_MaxBasketPayoff},
{"QuantLibc::delete_MaxBasketPayoff", _wrap_delete_MaxBasketPayoff},
{"QuantLibc::new_AverageBasketPayoff", _wrap_new_AverageBasketPayoff},
{"QuantLibc::delete_AverageBasketPayoff", _wrap_delete_AverageBasketPayoff},
{"QuantLibc::new_BasketOption", _wrap_new_BasketOption},
{"QuantLibc::delete_BasketOption", _wrap_delete_BasketOption},
{"QuantLibc::new_MCEuropeanBasketEngine", _wrap_new_MCEuropeanBasketEngine},
{"QuantLibc::delete_MCEuropeanBasketEngine", _wrap_delete_MCEuropeanBasketEngine},
{"QuantLibc::new_MCAmericanBasketEngine", _wrap_new_MCAmericanBasketEngine},
{"QuantLibc::delete_MCAmericanBasketEngine", _wrap_delete_MCAmericanBasketEngine},
{"QuantLibc::new_StulzEngine", _wrap_new_StulzEngine},
{"QuantLibc::delete_StulzEngine", _wrap_delete_StulzEngine},
{"QuantLibc::new_EverestOption", _wrap_new_EverestOption},
{"QuantLibc::delete_EverestOption", _wrap_delete_EverestOption},
{"QuantLibc::new_MCEverestEngine", _wrap_new_MCEverestEngine},
{"QuantLibc::delete_MCEverestEngine", _wrap_delete_MCEverestEngine},
{"QuantLibc::new_HimalayaOption", _wrap_new_HimalayaOption},
{"QuantLibc::delete_HimalayaOption", _wrap_delete_HimalayaOption},
{"QuantLibc::new_MCHimalayaEngine", _wrap_new_MCHimalayaEngine},
{"QuantLibc::delete_MCHimalayaEngine", _wrap_delete_MCHimalayaEngine},
{"QuantLibc::blackFormula", _wrap_blackFormula},
{"QuantLibc::blackFormulaImpliedStdDev", _wrap_blackFormulaImpliedStdDev},
{"QuantLibc::blackFormulaCashItmProbability", _wrap_blackFormulaCashItmProbability},
{"QuantLibc::bachelierBlackFormula", _wrap_bachelierBlackFormula},
{"QuantLibc::bachelierBlackFormulaImpliedVol", _wrap_bachelierBlackFormulaImpliedVol},
{"QuantLibc::new_BlackDeltaCalculator", _wrap_new_BlackDeltaCalculator},
{"QuantLibc::BlackDeltaCalculator_deltaFromStrike", _wrap_BlackDeltaCalculator_deltaFromStrike},
{"QuantLibc::BlackDeltaCalculator_strikeFromDelta", _wrap_BlackDeltaCalculator_strikeFromDelta},
{"QuantLibc::BlackDeltaCalculator_atmStrike", _wrap_BlackDeltaCalculator_atmStrike},
{"QuantLibc::delete_BlackDeltaCalculator", _wrap_delete_BlackDeltaCalculator},
{"QuantLibc::new_CallabilityPrice", _wrap_new_CallabilityPrice},
{"QuantLibc::CallabilityPrice_amount", _wrap_CallabilityPrice_amount},
{"QuantLibc::CallabilityPrice_type", _wrap_CallabilityPrice_type},
{"QuantLibc::delete_CallabilityPrice", _wrap_delete_CallabilityPrice},
{"QuantLibc::Callability___deref__", _wrap_Callability___deref__},
{"QuantLibc::Callability_isNull", _wrap_Callability_isNull},
{"QuantLibc::new_Callability", _wrap_new_Callability},
{"QuantLibc::delete_Callability", _wrap_delete_Callability},
{"QuantLibc::Callability_price", _wrap_Callability_price},
{"QuantLibc::Callability_type", _wrap_Callability_type},
{"QuantLibc::Callability_date", _wrap_Callability_date},
{"QuantLibc::new_SoftCallability", _wrap_new_SoftCallability},
{"QuantLibc::delete_SoftCallability", _wrap_delete_SoftCallability},
{"QuantLibc::new_CallabilitySchedule", _wrap_new_CallabilitySchedule},
{"QuantLibc::CallabilitySchedule_size", _wrap_CallabilitySchedule_size},
{"QuantLibc::CallabilitySchedule_empty", _wrap_CallabilitySchedule_empty},
{"QuantLibc::CallabilitySchedule_clear", _wrap_CallabilitySchedule_clear},
{"QuantLibc::CallabilitySchedule_push", _wrap_CallabilitySchedule_push},
{"QuantLibc::CallabilitySchedule_pop", _wrap_CallabilitySchedule_pop},
{"QuantLibc::CallabilitySchedule_get", _wrap_CallabilitySchedule_get},
{"QuantLibc::CallabilitySchedule_set", _wrap_CallabilitySchedule_set},
{"QuantLibc::delete_CallabilitySchedule", _wrap_delete_CallabilitySchedule},
{"QuantLibc::Seasonality___deref__", _wrap_Seasonality___deref__},
{"QuantLibc::Seasonality_isNull", _wrap_Seasonality_isNull},
{"QuantLibc::new_Seasonality", _wrap_new_Seasonality},
{"QuantLibc::delete_Seasonality", _wrap_delete_Seasonality},
{"QuantLibc::Seasonality_correctZeroRate", _wrap_Seasonality_correctZeroRate},
{"QuantLibc::Seasonality_correctYoYRate", _wrap_Seasonality_correctYoYRate},
{"QuantLibc::Seasonality_isConsistent", _wrap_Seasonality_isConsistent},
{"QuantLibc::new_MultiplicativePriceSeasonalityPtr", _wrap_new_MultiplicativePriceSeasonalityPtr},
{"QuantLibc::delete_MultiplicativePriceSeasonalityPtr", _wrap_delete_MultiplicativePriceSeasonalityPtr},
{"QuantLibc::YoYInflationTermStructure___deref__", _wrap_YoYInflationTermStructure___deref__},
{"QuantLibc::YoYInflationTermStructure_isNull", _wrap_YoYInflationTermStructure_isNull},
{"QuantLibc::YoYInflationTermStructure_asObservable", _wrap_YoYInflationTermStructure_asObservable},
{"QuantLibc::new_YoYInflationTermStructure", _wrap_new_YoYInflationTermStructure},
{"QuantLibc::delete_YoYInflationTermStructure", _wrap_delete_YoYInflationTermStructure},
{"QuantLibc::YoYInflationTermStructure_yoyRate", _wrap_YoYInflationTermStructure_yoyRate},
{"QuantLibc::YoYInflationTermStructure_dayCounter", _wrap_YoYInflationTermStructure_dayCounter},
{"QuantLibc::YoYInflationTermStructure_calendar", _wrap_YoYInflationTermStructure_calendar},
{"QuantLibc::YoYInflationTermStructure_referenceDate", _wrap_YoYInflationTermStructure_referenceDate},
{"QuantLibc::YoYInflationTermStructure_maxDate", _wrap_YoYInflationTermStructure_maxDate},
{"QuantLibc::YoYInflationTermStructure_maxTime", _wrap_YoYInflationTermStructure_maxTime},
{"QuantLibc::YoYInflationTermStructure_observationLag", _wrap_YoYInflationTermStructure_observationLag},
{"QuantLibc::YoYInflationTermStructure_frequency", _wrap_YoYInflationTermStructure_frequency},
{"QuantLibc::YoYInflationTermStructure_indexIsInterpolated", _wrap_YoYInflationTermStructure_indexIsInterpolated},
{"QuantLibc::YoYInflationTermStructure_baseRate", _wrap_YoYInflationTermStructure_baseRate},
{"QuantLibc::YoYInflationTermStructure_nominalTermStructure", _wrap_YoYInflationTermStructure_nominalTermStructure},
{"QuantLibc::YoYInflationTermStructure_baseDate", _wrap_YoYInflationTermStructure_baseDate},
{"QuantLibc::YoYInflationTermStructure_setSeasonality", _wrap_YoYInflationTermStructure_setSeasonality},
{"QuantLibc::YoYInflationTermStructure_seasonality", _wrap_YoYInflationTermStructure_seasonality},
{"QuantLibc::YoYInflationTermStructure_hasSeasonality", _wrap_YoYInflationTermStructure_hasSeasonality},
{"QuantLibc::YoYInflationTermStructure_enableExtrapolation", _wrap_YoYInflationTermStructure_enableExtrapolation},
{"QuantLibc::YoYInflationTermStructure_disableExtrapolation", _wrap_YoYInflationTermStructure_disableExtrapolation},
{"QuantLibc::YoYInflationTermStructure_allowsExtrapolation", _wrap_YoYInflationTermStructure_allowsExtrapolation},
{"QuantLibc::new_YoYInflationTermStructureHandle", _wrap_new_YoYInflationTermStructureHandle},
{"QuantLibc::YoYInflationTermStructureHandle___deref__", _wrap_YoYInflationTermStructureHandle___deref__},
{"QuantLibc::YoYInflationTermStructureHandle_empty", _wrap_YoYInflationTermStructureHandle_empty},
{"QuantLibc::YoYInflationTermStructureHandle_asObservable", _wrap_YoYInflationTermStructureHandle_asObservable},
{"QuantLibc::delete_YoYInflationTermStructureHandle", _wrap_delete_YoYInflationTermStructureHandle},
{"QuantLibc::YoYInflationTermStructureHandle_yoyRate", _wrap_YoYInflationTermStructureHandle_yoyRate},
{"QuantLibc::YoYInflationTermStructureHandle_dayCounter", _wrap_YoYInflationTermStructureHandle_dayCounter},
{"QuantLibc::YoYInflationTermStructureHandle_calendar", _wrap_YoYInflationTermStructureHandle_calendar},
{"QuantLibc::YoYInflationTermStructureHandle_referenceDate", _wrap_YoYInflationTermStructureHandle_referenceDate},
{"QuantLibc::YoYInflationTermStructureHandle_maxDate", _wrap_YoYInflationTermStructureHandle_maxDate},
{"QuantLibc::YoYInflationTermStructureHandle_maxTime", _wrap_YoYInflationTermStructureHandle_maxTime},
{"QuantLibc::YoYInflationTermStructureHandle_observationLag", _wrap_YoYInflationTermStructureHandle_observationLag},
{"QuantLibc::YoYInflationTermStructureHandle_frequency", _wrap_YoYInflationTermStructureHandle_frequency},
{"QuantLibc::YoYInflationTermStructureHandle_indexIsInterpolated", _wrap_YoYInflationTermStructureHandle_indexIsInterpolated},
{"QuantLibc::YoYInflationTermStructureHandle_baseRate", _wrap_YoYInflationTermStructureHandle_baseRate},
{"QuantLibc::YoYInflationTermStructureHandle_nominalTermStructure", _wrap_YoYInflationTermStructureHandle_nominalTermStructure},
{"QuantLibc::YoYInflationTermStructureHandle_baseDate", _wrap_YoYInflationTermStructureHandle_baseDate},
{"QuantLibc::YoYInflationTermStructureHandle_setSeasonality", _wrap_YoYInflationTermStructureHandle_setSeasonality},
{"QuantLibc::YoYInflationTermStructureHandle_seasonality", _wrap_YoYInflationTermStructureHandle_seasonality},
{"QuantLibc::YoYInflationTermStructureHandle_hasSeasonality", _wrap_YoYInflationTermStructureHandle_hasSeasonality},
{"QuantLibc::YoYInflationTermStructureHandle_enableExtrapolation", _wrap_YoYInflationTermStructureHandle_enableExtrapolation},
{"QuantLibc::YoYInflationTermStructureHandle_disableExtrapolation", _wrap_YoYInflationTermStructureHandle_disableExtrapolation},
{"QuantLibc::YoYInflationTermStructureHandle_allowsExtrapolation", _wrap_YoYInflationTermStructureHandle_allowsExtrapolation},
{"QuantLibc::new_RelinkableYoYInflationTermStructureHandle", _wrap_new_RelinkableYoYInflationTermStructureHandle},
{"QuantLibc::RelinkableYoYInflationTermStructureHandle_linkTo", _wrap_RelinkableYoYInflationTermStructureHandle_linkTo},
{"QuantLibc::delete_RelinkableYoYInflationTermStructureHandle", _wrap_delete_RelinkableYoYInflationTermStructureHandle},
{"QuantLibc::ZeroInflationTermStructure___deref__", _wrap_ZeroInflationTermStructure___deref__},
{"QuantLibc::ZeroInflationTermStructure_isNull", _wrap_ZeroInflationTermStructure_isNull},
{"QuantLibc::ZeroInflationTermStructure_asObservable", _wrap_ZeroInflationTermStructure_asObservable},
{"QuantLibc::new_ZeroInflationTermStructure", _wrap_new_ZeroInflationTermStructure},
{"QuantLibc::delete_ZeroInflationTermStructure", _wrap_delete_ZeroInflationTermStructure},
{"QuantLibc::ZeroInflationTermStructure_zeroRate", _wrap_ZeroInflationTermStructure_zeroRate},
{"QuantLibc::ZeroInflationTermStructure_dayCounter", _wrap_ZeroInflationTermStructure_dayCounter},
{"QuantLibc::ZeroInflationTermStructure_calendar", _wrap_ZeroInflationTermStructure_calendar},
{"QuantLibc::ZeroInflationTermStructure_referenceDate", _wrap_ZeroInflationTermStructure_referenceDate},
{"QuantLibc::ZeroInflationTermStructure_maxDate", _wrap_ZeroInflationTermStructure_maxDate},
{"QuantLibc::ZeroInflationTermStructure_maxTime", _wrap_ZeroInflationTermStructure_maxTime},
{"QuantLibc::ZeroInflationTermStructure_observationLag", _wrap_ZeroInflationTermStructure_observationLag},
{"QuantLibc::ZeroInflationTermStructure_frequency", _wrap_ZeroInflationTermStructure_frequency},
{"QuantLibc::ZeroInflationTermStructure_indexIsInterpolated", _wrap_ZeroInflationTermStructure_indexIsInterpolated},
{"QuantLibc::ZeroInflationTermStructure_baseRate", _wrap_ZeroInflationTermStructure_baseRate},
{"QuantLibc::ZeroInflationTermStructure_nominalTermStructure", _wrap_ZeroInflationTermStructure_nominalTermStructure},
{"QuantLibc::ZeroInflationTermStructure_baseDate", _wrap_ZeroInflationTermStructure_baseDate},
{"QuantLibc::ZeroInflationTermStructure_setSeasonality", _wrap_ZeroInflationTermStructure_setSeasonality},
{"QuantLibc::ZeroInflationTermStructure_seasonality", _wrap_ZeroInflationTermStructure_seasonality},
{"QuantLibc::ZeroInflationTermStructure_hasSeasonality", _wrap_ZeroInflationTermStructure_hasSeasonality},
{"QuantLibc::ZeroInflationTermStructure_enableExtrapolation", _wrap_ZeroInflationTermStructure_enableExtrapolation},
{"QuantLibc::ZeroInflationTermStructure_disableExtrapolation", _wrap_ZeroInflationTermStructure_disableExtrapolation},
{"QuantLibc::ZeroInflationTermStructure_allowsExtrapolation", _wrap_ZeroInflationTermStructure_allowsExtrapolation},
{"QuantLibc::new_ZeroInflationTermStructureHandle", _wrap_new_ZeroInflationTermStructureHandle},
{"QuantLibc::ZeroInflationTermStructureHandle___deref__", _wrap_ZeroInflationTermStructureHandle___deref__},
{"QuantLibc::ZeroInflationTermStructureHandle_empty", _wrap_ZeroInflationTermStructureHandle_empty},
{"QuantLibc::ZeroInflationTermStructureHandle_asObservable", _wrap_ZeroInflationTermStructureHandle_asObservable},
{"QuantLibc::delete_ZeroInflationTermStructureHandle", _wrap_delete_ZeroInflationTermStructureHandle},
{"QuantLibc::ZeroInflationTermStructureHandle_zeroRate", _wrap_ZeroInflationTermStructureHandle_zeroRate},
{"QuantLibc::ZeroInflationTermStructureHandle_dayCounter", _wrap_ZeroInflationTermStructureHandle_dayCounter},
{"QuantLibc::ZeroInflationTermStructureHandle_calendar", _wrap_ZeroInflationTermStructureHandle_calendar},
{"QuantLibc::ZeroInflationTermStructureHandle_referenceDate", _wrap_ZeroInflationTermStructureHandle_referenceDate},
{"QuantLibc::ZeroInflationTermStructureHandle_maxDate", _wrap_ZeroInflationTermStructureHandle_maxDate},
{"QuantLibc::ZeroInflationTermStructureHandle_maxTime", _wrap_ZeroInflationTermStructureHandle_maxTime},
{"QuantLibc::ZeroInflationTermStructureHandle_observationLag", _wrap_ZeroInflationTermStructureHandle_observationLag},
{"QuantLibc::ZeroInflationTermStructureHandle_frequency", _wrap_ZeroInflationTermStructureHandle_frequency},
{"QuantLibc::ZeroInflationTermStructureHandle_indexIsInterpolated", _wrap_ZeroInflationTermStructureHandle_indexIsInterpolated},
{"QuantLibc::ZeroInflationTermStructureHandle_baseRate", _wrap_ZeroInflationTermStructureHandle_baseRate},
{"QuantLibc::ZeroInflationTermStructureHandle_nominalTermStructure", _wrap_ZeroInflationTermStructureHandle_nominalTermStructure},
{"QuantLibc::ZeroInflationTermStructureHandle_baseDate", _wrap_ZeroInflationTermStructureHandle_baseDate},
{"QuantLibc::ZeroInflationTermStructureHandle_setSeasonality", _wrap_ZeroInflationTermStructureHandle_setSeasonality},
{"QuantLibc::ZeroInflationTermStructureHandle_seasonality", _wrap_ZeroInflationTermStructureHandle_seasonality},
{"QuantLibc::ZeroInflationTermStructureHandle_hasSeasonality", _wrap_ZeroInflationTermStructureHandle_hasSeasonality},
{"QuantLibc::ZeroInflationTermStructureHandle_enableExtrapolation", _wrap_ZeroInflationTermStructureHandle_enableExtrapolation},
{"QuantLibc::ZeroInflationTermStructureHandle_disableExtrapolation", _wrap_ZeroInflationTermStructureHandle_disableExtrapolation},
{"QuantLibc::ZeroInflationTermStructureHandle_allowsExtrapolation", _wrap_ZeroInflationTermStructureHandle_allowsExtrapolation},
{"QuantLibc::new_RelinkableZeroInflationTermStructureHandle", _wrap_new_RelinkableZeroInflationTermStructureHandle},
{"QuantLibc::RelinkableZeroInflationTermStructureHandle_linkTo", _wrap_RelinkableZeroInflationTermStructureHandle_linkTo},
{"QuantLibc::delete_RelinkableZeroInflationTermStructureHandle", _wrap_delete_RelinkableZeroInflationTermStructureHandle},
{"QuantLibc::Region_name", _wrap_Region_name},
{"QuantLibc::Region_code", _wrap_Region_code},
{"QuantLibc::delete_Region", _wrap_delete_Region},
{"QuantLibc::new_CustomRegion", _wrap_new_CustomRegion},
{"QuantLibc::delete_CustomRegion", _wrap_delete_CustomRegion},
{"QuantLibc::InflationIndex_interpolated", _wrap_InflationIndex_interpolated},
{"QuantLibc::InflationIndex_frequency", _wrap_InflationIndex_frequency},
{"QuantLibc::InflationIndex_availabilityLag", _wrap_InflationIndex_availabilityLag},
{"QuantLibc::InflationIndex_currency", _wrap_InflationIndex_currency},
{"QuantLibc::delete_InflationIndex", _wrap_delete_InflationIndex},
{"QuantLibc::new_ZeroInflationIndex", _wrap_new_ZeroInflationIndex},
{"QuantLibc::delete_ZeroInflationIndex", _wrap_delete_ZeroInflationIndex},
{"QuantLibc::delete_YoYInflationIndex", _wrap_delete_YoYInflationIndex},
{"QuantLibc::new_EUHICP", _wrap_new_EUHICP},
{"QuantLibc::delete_EUHICP", _wrap_delete_EUHICP},
{"QuantLibc::new_EUHICPXT", _wrap_new_EUHICPXT},
{"QuantLibc::delete_EUHICPXT", _wrap_delete_EUHICPXT},
{"QuantLibc::new_FRHICP", _wrap_new_FRHICP},
{"QuantLibc::delete_FRHICP", _wrap_delete_FRHICP},
{"QuantLibc::new_UKRPI", _wrap_new_UKRPI},
{"QuantLibc::delete_UKRPI", _wrap_delete_UKRPI},
{"QuantLibc::new_USCPI", _wrap_new_USCPI},
{"QuantLibc::delete_USCPI", _wrap_delete_USCPI},
{"QuantLibc::new_ZACPI", _wrap_new_ZACPI},
{"QuantLibc::delete_ZACPI", _wrap_delete_ZACPI},
{"QuantLibc::new_YYEUHICP", _wrap_new_YYEUHICP},
{"QuantLibc::delete_YYEUHICP", _wrap_delete_YYEUHICP},
{"QuantLibc::new_YYEUHICPXT", _wrap_new_YYEUHICPXT},
{"QuantLibc::delete_YYEUHICPXT", _wrap_delete_YYEUHICPXT},
{"QuantLibc::new_YYFRHICP", _wrap_new_YYFRHICP},
{"QuantLibc::delete_YYFRHICP", _wrap_delete_YYFRHICP},
{"QuantLibc::new_YYUKRPI", _wrap_new_YYUKRPI},
{"QuantLibc::delete_YYUKRPI", _wrap_delete_YYUKRPI},
{"QuantLibc::new_YYUSCPI", _wrap_new_YYUSCPI},
{"QuantLibc::delete_YYUSCPI", _wrap_delete_YYUSCPI},
{"QuantLibc::new_YYZACPI", _wrap_new_YYZACPI},
{"QuantLibc::delete_YYZACPI", _wrap_delete_YYZACPI},
{"QuantLibc::new_CPI", _wrap_new_CPI},
{"QuantLibc::delete_CPI", _wrap_delete_CPI},
{"QuantLibc::ZeroHelper___deref__", _wrap_ZeroHelper___deref__},
{"QuantLibc::ZeroHelper_isNull", _wrap_ZeroHelper_isNull},
{"QuantLibc::new_ZeroHelper", _wrap_new_ZeroHelper},
{"QuantLibc::delete_ZeroHelper", _wrap_delete_ZeroHelper},
{"QuantLibc::YoYHelper___deref__", _wrap_YoYHelper___deref__},
{"QuantLibc::YoYHelper_isNull", _wrap_YoYHelper_isNull},
{"QuantLibc::new_YoYHelper", _wrap_new_YoYHelper},
{"QuantLibc::delete_YoYHelper", _wrap_delete_YoYHelper},
{"QuantLibc::new_ZeroHelperVector", _wrap_new_ZeroHelperVector},
{"QuantLibc::ZeroHelperVector_size", _wrap_ZeroHelperVector_size},
{"QuantLibc::ZeroHelperVector_empty", _wrap_ZeroHelperVector_empty},
{"QuantLibc::ZeroHelperVector_clear", _wrap_ZeroHelperVector_clear},
{"QuantLibc::ZeroHelperVector_push", _wrap_ZeroHelperVector_push},
{"QuantLibc::ZeroHelperVector_pop", _wrap_ZeroHelperVector_pop},
{"QuantLibc::ZeroHelperVector_get", _wrap_ZeroHelperVector_get},
{"QuantLibc::ZeroHelperVector_set", _wrap_ZeroHelperVector_set},
{"QuantLibc::delete_ZeroHelperVector", _wrap_delete_ZeroHelperVector},
{"QuantLibc::new_YoYHelperVector", _wrap_new_YoYHelperVector},
{"QuantLibc::YoYHelperVector_size", _wrap_YoYHelperVector_size},
{"QuantLibc::YoYHelperVector_empty", _wrap_YoYHelperVector_empty},
{"QuantLibc::YoYHelperVector_clear", _wrap_YoYHelperVector_clear},
{"QuantLibc::YoYHelperVector_push", _wrap_YoYHelperVector_push},
{"QuantLibc::YoYHelperVector_pop", _wrap_YoYHelperVector_pop},
{"QuantLibc::YoYHelperVector_get", _wrap_YoYHelperVector_get},
{"QuantLibc::YoYHelperVector_set", _wrap_YoYHelperVector_set},
{"QuantLibc::delete_YoYHelperVector", _wrap_delete_YoYHelperVector},
{"QuantLibc::new_ZeroCouponInflationSwapHelper", _wrap_new_ZeroCouponInflationSwapHelper},
{"QuantLibc::delete_ZeroCouponInflationSwapHelper", _wrap_delete_ZeroCouponInflationSwapHelper},
{"QuantLibc::new_YearOnYearInflationSwapHelper", _wrap_new_YearOnYearInflationSwapHelper},
{"QuantLibc::delete_YearOnYearInflationSwapHelper", _wrap_delete_YearOnYearInflationSwapHelper},
{"QuantLibc::new_PiecewiseZeroInflation", _wrap_new_PiecewiseZeroInflation},
{"QuantLibc::PiecewiseZeroInflation_dates", _wrap_PiecewiseZeroInflation_dates},
{"QuantLibc::PiecewiseZeroInflation_times", _wrap_PiecewiseZeroInflation_times},
{"QuantLibc::PiecewiseZeroInflation_nodes", _wrap_PiecewiseZeroInflation_nodes},
{"QuantLibc::delete_PiecewiseZeroInflation", _wrap_delete_PiecewiseZeroInflation},
{"QuantLibc::new_PiecewiseYoYInflation", _wrap_new_PiecewiseYoYInflation},
{"QuantLibc::PiecewiseYoYInflation_dates", _wrap_PiecewiseYoYInflation_dates},
{"QuantLibc::PiecewiseYoYInflation_times", _wrap_PiecewiseYoYInflation_times},
{"QuantLibc::PiecewiseYoYInflation_nodes", _wrap_PiecewiseYoYInflation_nodes},
{"QuantLibc::delete_PiecewiseYoYInflation", _wrap_delete_PiecewiseYoYInflation},
{"QuantLibc::inflationBaseDate", _wrap_inflationBaseDate},
{"QuantLibc::new_ZeroCouponInflationSwap", _wrap_new_ZeroCouponInflationSwap},
{"QuantLibc::ZeroCouponInflationSwap_fairRate", _wrap_ZeroCouponInflationSwap_fairRate},
{"QuantLibc::ZeroCouponInflationSwap_fixedLeg", _wrap_ZeroCouponInflationSwap_fixedLeg},
{"QuantLibc::ZeroCouponInflationSwap_inflationLeg", _wrap_ZeroCouponInflationSwap_inflationLeg},
{"QuantLibc::ZeroCouponInflationSwap_type", _wrap_ZeroCouponInflationSwap_type},
{"QuantLibc::delete_ZeroCouponInflationSwap", _wrap_delete_ZeroCouponInflationSwap},
{"QuantLibc::new_YearOnYearInflationSwap", _wrap_new_YearOnYearInflationSwap},
{"QuantLibc::YearOnYearInflationSwap_fairRate", _wrap_YearOnYearInflationSwap_fairRate},
{"QuantLibc::delete_YearOnYearInflationSwap", _wrap_delete_YearOnYearInflationSwap},
{"QuantLibc::YoYInflationCapFloor_impliedVolatility", _wrap_YoYInflationCapFloor_impliedVolatility},
{"QuantLibc::new_YoYInflationCapFloor", _wrap_new_YoYInflationCapFloor},
{"QuantLibc::delete_YoYInflationCapFloor", _wrap_delete_YoYInflationCapFloor},
{"QuantLibc::new_YoYInflationCap", _wrap_new_YoYInflationCap},
{"QuantLibc::delete_YoYInflationCap", _wrap_delete_YoYInflationCap},
{"QuantLibc::new_YoYInflationFloor", _wrap_new_YoYInflationFloor},
{"QuantLibc::delete_YoYInflationFloor", _wrap_delete_YoYInflationFloor},
{"QuantLibc::new_YoYInflationCollar", _wrap_new_YoYInflationCollar},
{"QuantLibc::delete_YoYInflationCollar", _wrap_delete_YoYInflationCollar},
{"QuantLibc::ShortRateModel___deref__", _wrap_ShortRateModel___deref__},
{"QuantLibc::ShortRateModel_isNull", _wrap_ShortRateModel_isNull},
{"QuantLibc::ShortRateModel_asObservable", _wrap_ShortRateModel_asObservable},
{"QuantLibc::new_ShortRateModel", _wrap_new_ShortRateModel},
{"QuantLibc::delete_ShortRateModel", _wrap_delete_ShortRateModel},
{"QuantLibc::ShortRateModel_params", _wrap_ShortRateModel_params},
{"QuantLibc::ShortRateModel_calibrate", _wrap_ShortRateModel_calibrate},
{"QuantLibc::ShortRateModel_value", _wrap_ShortRateModel_value},
{"QuantLibc::ShortRateModel_endCriteria", _wrap_ShortRateModel_endCriteria},
{"QuantLibc::ShortRateModel_setParams", _wrap_ShortRateModel_setParams},
{"QuantLibc::new_ShortRateModelHandle", _wrap_new_ShortRateModelHandle},
{"QuantLibc::ShortRateModelHandle___deref__", _wrap_ShortRateModelHandle___deref__},
{"QuantLibc::ShortRateModelHandle_empty", _wrap_ShortRateModelHandle_empty},
{"QuantLibc::ShortRateModelHandle_asObservable", _wrap_ShortRateModelHandle_asObservable},
{"QuantLibc::delete_ShortRateModelHandle", _wrap_delete_ShortRateModelHandle},
{"QuantLibc::ShortRateModelHandle_params", _wrap_ShortRateModelHandle_params},
{"QuantLibc::ShortRateModelHandle_calibrate", _wrap_ShortRateModelHandle_calibrate},
{"QuantLibc::ShortRateModelHandle_value", _wrap_ShortRateModelHandle_value},
{"QuantLibc::ShortRateModelHandle_endCriteria", _wrap_ShortRateModelHandle_endCriteria},
{"QuantLibc::ShortRateModelHandle_setParams", _wrap_ShortRateModelHandle_setParams},
{"QuantLibc::new_RelinkableShortRateModelHandle", _wrap_new_RelinkableShortRateModelHandle},
{"QuantLibc::RelinkableShortRateModelHandle_linkTo", _wrap_RelinkableShortRateModelHandle_linkTo},
{"QuantLibc::delete_RelinkableShortRateModelHandle", _wrap_delete_RelinkableShortRateModelHandle},
{"QuantLibc::new_Vasicek", _wrap_new_Vasicek},
{"QuantLibc::Vasicek_discount", _wrap_Vasicek_discount},
{"QuantLibc::Vasicek_discountBond", _wrap_Vasicek_discountBond},
{"QuantLibc::delete_Vasicek", _wrap_delete_Vasicek},
{"QuantLibc::new_HullWhite", _wrap_new_HullWhite},
{"QuantLibc::HullWhite_discount", _wrap_HullWhite_discount},
{"QuantLibc::HullWhite_discountBond", _wrap_HullWhite_discountBond},
{"QuantLibc::HullWhite_convexityBias", _wrap_HullWhite_convexityBias},
{"QuantLibc::delete_HullWhite", _wrap_delete_HullWhite},
{"QuantLibc::new_BlackKarasinski", _wrap_new_BlackKarasinski},
{"QuantLibc::delete_BlackKarasinski", _wrap_delete_BlackKarasinski},
{"QuantLibc::new_G2", _wrap_new_G2},
{"QuantLibc::G2_discount", _wrap_G2_discount},
{"QuantLibc::G2_discountBond", _wrap_G2_discountBond},
{"QuantLibc::delete_G2", _wrap_delete_G2},
{"QuantLibc::new_JamshidianSwaptionEngine", _wrap_new_JamshidianSwaptionEngine},
{"QuantLibc::delete_JamshidianSwaptionEngine", _wrap_delete_JamshidianSwaptionEngine},
{"QuantLibc::new_TreeSwaptionEngine", _wrap_new_TreeSwaptionEngine},
{"QuantLibc::delete_TreeSwaptionEngine", _wrap_delete_TreeSwaptionEngine},
{"QuantLibc::new_AnalyticCapFloorEngine", _wrap_new_AnalyticCapFloorEngine},
{"QuantLibc::delete_AnalyticCapFloorEngine", _wrap_delete_AnalyticCapFloorEngine},
{"QuantLibc::new_TreeCapFloorEngine", _wrap_new_TreeCapFloorEngine},
{"QuantLibc::delete_TreeCapFloorEngine", _wrap_delete_TreeCapFloorEngine},
{"QuantLibc::new_G2SwaptionEngine", _wrap_new_G2SwaptionEngine},
{"QuantLibc::delete_G2SwaptionEngine", _wrap_delete_G2SwaptionEngine},
{"QuantLibc::new_FdG2SwaptionEngine", _wrap_new_FdG2SwaptionEngine},
{"QuantLibc::delete_FdG2SwaptionEngine", _wrap_delete_FdG2SwaptionEngine},
{"QuantLibc::new_FdHullWhiteSwaptionEngine", _wrap_new_FdHullWhiteSwaptionEngine},
{"QuantLibc::delete_FdHullWhiteSwaptionEngine", _wrap_delete_FdHullWhiteSwaptionEngine},
{"QuantLibc::new_Bond", _wrap_new_Bond},
{"QuantLibc::Bond_nextCouponRate", _wrap_Bond_nextCouponRate},
{"QuantLibc::Bond_previousCouponRate", _wrap_Bond_previousCouponRate},
{"QuantLibc::Bond_settlementDays", _wrap_Bond_settlementDays},
{"QuantLibc::Bond_settlementDate", _wrap_Bond_settlementDate},
{"QuantLibc::Bond_startDate", _wrap_Bond_startDate},
{"QuantLibc::Bond_maturityDate", _wrap_Bond_maturityDate},
{"QuantLibc::Bond_issueDate", _wrap_Bond_issueDate},
{"QuantLibc::Bond_cashflows", _wrap_Bond_cashflows},
{"QuantLibc::Bond_redemptions", _wrap_Bond_redemptions},
{"QuantLibc::Bond_redemption", _wrap_Bond_redemption},
{"QuantLibc::Bond_calendar", _wrap_Bond_calendar},
{"QuantLibc::Bond_notionals", _wrap_Bond_notionals},
{"QuantLibc::Bond_notional", _wrap_Bond_notional},
{"QuantLibc::Bond_cleanPrice", _wrap_Bond_cleanPrice},
{"QuantLibc::Bond_dirtyPrice", _wrap_Bond_dirtyPrice},
{"QuantLibc::Bond_yield", _wrap_Bond_yield},
{"QuantLibc::Bond_accruedAmount", _wrap_Bond_accruedAmount},
{"QuantLibc::Bond_settlementValue", _wrap_Bond_settlementValue},
{"QuantLibc::delete_Bond", _wrap_delete_Bond},
{"QuantLibc::cleanPriceFromZSpread", _wrap_cleanPriceFromZSpread},
{"QuantLibc::new_ZeroCouponBond", _wrap_new_ZeroCouponBond},
{"QuantLibc::delete_ZeroCouponBond", _wrap_delete_ZeroCouponBond},
{"QuantLibc::new_FixedRateBond", _wrap_new_FixedRateBond},
{"QuantLibc::FixedRateBond_frequency", _wrap_FixedRateBond_frequency},
{"QuantLibc::FixedRateBond_dayCounter", _wrap_FixedRateBond_dayCounter},
{"QuantLibc::delete_FixedRateBond", _wrap_delete_FixedRateBond},
{"QuantLibc::new_FloatingRateBond", _wrap_new_FloatingRateBond},
{"QuantLibc::delete_FloatingRateBond", _wrap_delete_FloatingRateBond},
{"QuantLibc::new_CmsRateBond", _wrap_new_CmsRateBond},
{"QuantLibc::delete_CmsRateBond", _wrap_delete_CmsRateBond},
{"QuantLibc::new_DiscountingBondEngine", _wrap_new_DiscountingBondEngine},
{"QuantLibc::delete_DiscountingBondEngine", _wrap_delete_DiscountingBondEngine},
{"QuantLibc::new_CallableFixedRateBond", _wrap_new_CallableFixedRateBond},
{"QuantLibc::CallableFixedRateBond_OAS", _wrap_CallableFixedRateBond_OAS},
{"QuantLibc::CallableFixedRateBond_cleanPriceOAS", _wrap_CallableFixedRateBond_cleanPriceOAS},
{"QuantLibc::CallableFixedRateBond_effectiveDuration", _wrap_CallableFixedRateBond_effectiveDuration},
{"QuantLibc::CallableFixedRateBond_effectiveConvexity", _wrap_CallableFixedRateBond_effectiveConvexity},
{"QuantLibc::delete_CallableFixedRateBond", _wrap_delete_CallableFixedRateBond},
{"QuantLibc::new_TreeCallableFixedRateBondEngine", _wrap_new_TreeCallableFixedRateBondEngine},
{"QuantLibc::delete_TreeCallableFixedRateBondEngine", _wrap_delete_TreeCallableFixedRateBondEngine},
{"QuantLibc::new_BlackCallableFixedRateBondEngine", _wrap_new_BlackCallableFixedRateBondEngine},
{"QuantLibc::delete_BlackCallableFixedRateBondEngine", _wrap_delete_BlackCallableFixedRateBondEngine},
{"QuantLibc::new_CPIBond", _wrap_new_CPIBond},
{"QuantLibc::delete_CPIBond", _wrap_delete_CPIBond},
{"QuantLibc::BondFunctions_startDate", _wrap_BondFunctions_startDate},
{"QuantLibc::BondFunctions_maturityDate", _wrap_BondFunctions_maturityDate},
{"QuantLibc::BondFunctions_isTradable", _wrap_BondFunctions_isTradable},
{"QuantLibc::BondFunctions_previousCashFlowDate", _wrap_BondFunctions_previousCashFlowDate},
{"QuantLibc::BondFunctions_nextCashFlowDate", _wrap_BondFunctions_nextCashFlowDate},
{"QuantLibc::BondFunctions_previousCashFlowAmount", _wrap_BondFunctions_previousCashFlowAmount},
{"QuantLibc::BondFunctions_nextCashFlowAmount", _wrap_BondFunctions_nextCashFlowAmount},
{"QuantLibc::BondFunctions_previousCouponRate", _wrap_BondFunctions_previousCouponRate},
{"QuantLibc::BondFunctions_nextCouponRate", _wrap_BondFunctions_nextCouponRate},
{"QuantLibc::BondFunctions_accrualStartDate", _wrap_BondFunctions_accrualStartDate},
{"QuantLibc::BondFunctions_accrualEndDate", _wrap_BondFunctions_accrualEndDate},
{"QuantLibc::BondFunctions_accrualPeriod", _wrap_BondFunctions_accrualPeriod},
{"QuantLibc::BondFunctions_accrualDays", _wrap_BondFunctions_accrualDays},
{"QuantLibc::BondFunctions_accruedPeriod", _wrap_BondFunctions_accruedPeriod},
{"QuantLibc::BondFunctions_accruedDays", _wrap_BondFunctions_accruedDays},
{"QuantLibc::BondFunctions_accruedAmount", _wrap_BondFunctions_accruedAmount},
{"QuantLibc::BondFunctions_atmRate", _wrap_BondFunctions_atmRate},
{"QuantLibc::BondFunctions_cleanPrice", _wrap_BondFunctions_cleanPrice},
{"QuantLibc::BondFunctions_bps", _wrap_BondFunctions_bps},
{"QuantLibc::BondFunctions_yield", _wrap_BondFunctions_yield},
{"QuantLibc::BondFunctions_yieldBrent", _wrap_BondFunctions_yieldBrent},
{"QuantLibc::BondFunctions_yieldBisection", _wrap_BondFunctions_yieldBisection},
{"QuantLibc::BondFunctions_yieldFalsePosition", _wrap_BondFunctions_yieldFalsePosition},
{"QuantLibc::BondFunctions_yieldRidder", _wrap_BondFunctions_yieldRidder},
{"QuantLibc::BondFunctions_yieldSecant", _wrap_BondFunctions_yieldSecant},
{"QuantLibc::BondFunctions_duration", _wrap_BondFunctions_duration},
{"QuantLibc::BondFunctions_convexity", _wrap_BondFunctions_convexity},
{"QuantLibc::BondFunctions_basisPointValue", _wrap_BondFunctions_basisPointValue},
{"QuantLibc::BondFunctions_yieldValueBasisPoint", _wrap_BondFunctions_yieldValueBasisPoint},
{"QuantLibc::BondFunctions_zSpread", _wrap_BondFunctions_zSpread},
{"QuantLibc::new_BondFunctions", _wrap_new_BondFunctions},
{"QuantLibc::delete_BondFunctions", _wrap_delete_BondFunctions},
{"QuantLibc::CapFloor_impliedVolatility", _wrap_CapFloor_impliedVolatility},
{"QuantLibc::CapFloor_floatingLeg", _wrap_CapFloor_floatingLeg},
{"QuantLibc::CapFloor_capRates", _wrap_CapFloor_capRates},
{"QuantLibc::CapFloor_floorRates", _wrap_CapFloor_floorRates},
{"QuantLibc::CapFloor_startDate", _wrap_CapFloor_startDate},
{"QuantLibc::CapFloor_maturityDate", _wrap_CapFloor_maturityDate},
{"QuantLibc::CapFloor_atmRate", _wrap_CapFloor_atmRate},
{"QuantLibc::new_CapFloor", _wrap_new_CapFloor},
{"QuantLibc::delete_CapFloor", _wrap_delete_CapFloor},
{"QuantLibc::new_Cap", _wrap_new_Cap},
{"QuantLibc::delete_Cap", _wrap_delete_Cap},
{"QuantLibc::new_Floor", _wrap_new_Floor},
{"QuantLibc::delete_Floor", _wrap_delete_Floor},
{"QuantLibc::new_Collar", _wrap_new_Collar},
{"QuantLibc::delete_Collar", _wrap_delete_Collar},
{"QuantLibc::new_BlackCapFloorEngine", _wrap_new_BlackCapFloorEngine},
{"QuantLibc::delete_BlackCapFloorEngine", _wrap_delete_BlackCapFloorEngine},
{"QuantLibc::new_BachelierCapFloorEngine", _wrap_new_BachelierCapFloorEngine},
{"QuantLibc::delete_BachelierCapFloorEngine", _wrap_delete_BachelierCapFloorEngine},
{"QuantLibc::Dividend___deref__", _wrap_Dividend___deref__},
{"QuantLibc::Dividend_isNull", _wrap_Dividend_isNull},
{"QuantLibc::new_Dividend", _wrap_new_Dividend},
{"QuantLibc::delete_Dividend", _wrap_delete_Dividend},
{"QuantLibc::Dividend_amount", _wrap_Dividend_amount},
{"QuantLibc::Dividend_date", _wrap_Dividend_date},
{"QuantLibc::new_FixedDividend", _wrap_new_FixedDividend},
{"QuantLibc::delete_FixedDividend", _wrap_delete_FixedDividend},
{"QuantLibc::new_FractionalDividend", _wrap_new_FractionalDividend},
{"QuantLibc::delete_FractionalDividend", _wrap_delete_FractionalDividend},
{"QuantLibc::new_DividendSchedule", _wrap_new_DividendSchedule},
{"QuantLibc::DividendSchedule_size", _wrap_DividendSchedule_size},
{"QuantLibc::DividendSchedule_empty", _wrap_DividendSchedule_empty},
{"QuantLibc::DividendSchedule_clear", _wrap_DividendSchedule_clear},
{"QuantLibc::DividendSchedule_push", _wrap_DividendSchedule_push},
{"QuantLibc::DividendSchedule_pop", _wrap_DividendSchedule_pop},
{"QuantLibc::DividendSchedule_get", _wrap_DividendSchedule_get},
{"QuantLibc::DividendSchedule_set", _wrap_DividendSchedule_set},
{"QuantLibc::delete_DividendSchedule", _wrap_delete_DividendSchedule},
{"QuantLibc::new_ConvertibleZeroCouponBond", _wrap_new_ConvertibleZeroCouponBond},
{"QuantLibc::delete_ConvertibleZeroCouponBond", _wrap_delete_ConvertibleZeroCouponBond},
{"QuantLibc::new_ConvertibleFixedCouponBond", _wrap_new_ConvertibleFixedCouponBond},
{"QuantLibc::delete_ConvertibleFixedCouponBond", _wrap_delete_ConvertibleFixedCouponBond},
{"QuantLibc::new_ConvertibleFloatingRateBond", _wrap_new_ConvertibleFloatingRateBond},
{"QuantLibc::delete_ConvertibleFloatingRateBond", _wrap_delete_ConvertibleFloatingRateBond},
{"QuantLibc::new_BinomialConvertibleEngine", _wrap_new_BinomialConvertibleEngine},
{"QuantLibc::delete_BinomialConvertibleEngine", _wrap_delete_BinomialConvertibleEngine},
{"QuantLibc::DefaultProbabilityTermStructure___deref__", _wrap_DefaultProbabilityTermStructure___deref__},
{"QuantLibc::DefaultProbabilityTermStructure_isNull", _wrap_DefaultProbabilityTermStructure_isNull},
{"QuantLibc::DefaultProbabilityTermStructure_asObservable", _wrap_DefaultProbabilityTermStructure_asObservable},
{"QuantLibc::new_DefaultProbabilityTermStructure", _wrap_new_DefaultProbabilityTermStructure},
{"QuantLibc::delete_DefaultProbabilityTermStructure", _wrap_delete_DefaultProbabilityTermStructure},
{"QuantLibc::DefaultProbabilityTermStructure_dayCounter", _wrap_DefaultProbabilityTermStructure_dayCounter},
{"QuantLibc::DefaultProbabilityTermStructure_calendar", _wrap_DefaultProbabilityTermStructure_calendar},
{"QuantLibc::DefaultProbabilityTermStructure_referenceDate", _wrap_DefaultProbabilityTermStructure_referenceDate},
{"QuantLibc::DefaultProbabilityTermStructure_maxDate", _wrap_DefaultProbabilityTermStructure_maxDate},
{"QuantLibc::DefaultProbabilityTermStructure_maxTime", _wrap_DefaultProbabilityTermStructure_maxTime},
{"QuantLibc::DefaultProbabilityTermStructure_defaultProbability", _wrap_DefaultProbabilityTermStructure_defaultProbability},
{"QuantLibc::DefaultProbabilityTermStructure_survivalProbability", _wrap_DefaultProbabilityTermStructure_survivalProbability},
{"QuantLibc::DefaultProbabilityTermStructure_defaultDensity", _wrap_DefaultProbabilityTermStructure_defaultDensity},
{"QuantLibc::DefaultProbabilityTermStructure_hazardRate", _wrap_DefaultProbabilityTermStructure_hazardRate},
{"QuantLibc::DefaultProbabilityTermStructure_enableExtrapolation", _wrap_DefaultProbabilityTermStructure_enableExtrapolation},
{"QuantLibc::DefaultProbabilityTermStructure_disableExtrapolation", _wrap_DefaultProbabilityTermStructure_disableExtrapolation},
{"QuantLibc::DefaultProbabilityTermStructure_allowsExtrapolation", _wrap_DefaultProbabilityTermStructure_allowsExtrapolation},
{"QuantLibc::new_DefaultProbabilityTermStructureHandle", _wrap_new_DefaultProbabilityTermStructureHandle},
{"QuantLibc::DefaultProbabilityTermStructureHandle___deref__", _wrap_DefaultProbabilityTermStructureHandle___deref__},
{"QuantLibc::DefaultProbabilityTermStructureHandle_empty", _wrap_DefaultProbabilityTermStructureHandle_empty},
{"QuantLibc::DefaultProbabilityTermStructureHandle_asObservable", _wrap_DefaultProbabilityTermStructureHandle_asObservable},
{"QuantLibc::delete_DefaultProbabilityTermStructureHandle", _wrap_delete_DefaultProbabilityTermStructureHandle},
{"QuantLibc::DefaultProbabilityTermStructureHandle_dayCounter", _wrap_DefaultProbabilityTermStructureHandle_dayCounter},
{"QuantLibc::DefaultProbabilityTermStructureHandle_calendar", _wrap_DefaultProbabilityTermStructureHandle_calendar},
{"QuantLibc::DefaultProbabilityTermStructureHandle_referenceDate", _wrap_DefaultProbabilityTermStructureHandle_referenceDate},
{"QuantLibc::DefaultProbabilityTermStructureHandle_maxDate", _wrap_DefaultProbabilityTermStructureHandle_maxDate},
{"QuantLibc::DefaultProbabilityTermStructureHandle_maxTime", _wrap_DefaultProbabilityTermStructureHandle_maxTime},
{"QuantLibc::DefaultProbabilityTermStructureHandle_defaultProbability", _wrap_DefaultProbabilityTermStructureHandle_defaultProbability},
{"QuantLibc::DefaultProbabilityTermStructureHandle_survivalProbability", _wrap_DefaultProbabilityTermStructureHandle_survivalProbability},
{"QuantLibc::DefaultProbabilityTermStructureHandle_defaultDensity", _wrap_DefaultProbabilityTermStructureHandle_defaultDensity},
{"QuantLibc::DefaultProbabilityTermStructureHandle_hazardRate", _wrap_DefaultProbabilityTermStructureHandle_hazardRate},
{"QuantLibc::DefaultProbabilityTermStructureHandle_enableExtrapolation", _wrap_DefaultProbabilityTermStructureHandle_enableExtrapolation},
{"QuantLibc::DefaultProbabilityTermStructureHandle_disableExtrapolation", _wrap_DefaultProbabilityTermStructureHandle_disableExtrapolation},
{"QuantLibc::DefaultProbabilityTermStructureHandle_allowsExtrapolation", _wrap_DefaultProbabilityTermStructureHandle_allowsExtrapolation},
{"QuantLibc::new_RelinkableDefaultProbabilityTermStructureHandle", _wrap_new_RelinkableDefaultProbabilityTermStructureHandle},
{"QuantLibc::RelinkableDefaultProbabilityTermStructureHandle_linkTo", _wrap_RelinkableDefaultProbabilityTermStructureHandle_linkTo},
{"QuantLibc::delete_RelinkableDefaultProbabilityTermStructureHandle", _wrap_delete_RelinkableDefaultProbabilityTermStructureHandle},
{"QuantLibc::new_FlatHazardRate", _wrap_new_FlatHazardRate},
{"QuantLibc::delete_FlatHazardRate", _wrap_delete_FlatHazardRate},
{"QuantLibc::new_HazardRateCurve", _wrap_new_HazardRateCurve},
{"QuantLibc::HazardRateCurve_dates", _wrap_HazardRateCurve_dates},
{"QuantLibc::HazardRateCurve_hazardRates", _wrap_HazardRateCurve_hazardRates},
{"QuantLibc::HazardRateCurve_nodes", _wrap_HazardRateCurve_nodes},
{"QuantLibc::delete_HazardRateCurve", _wrap_delete_HazardRateCurve},
{"QuantLibc::new_DefaultDensityCurve", _wrap_new_DefaultDensityCurve},
{"QuantLibc::DefaultDensityCurve_dates", _wrap_DefaultDensityCurve_dates},
{"QuantLibc::DefaultDensityCurve_defaultDensities", _wrap_DefaultDensityCurve_defaultDensities},
{"QuantLibc::DefaultDensityCurve_nodes", _wrap_DefaultDensityCurve_nodes},
{"QuantLibc::delete_DefaultDensityCurve", _wrap_delete_DefaultDensityCurve},
{"QuantLibc::DefaultProbabilityHelper___deref__", _wrap_DefaultProbabilityHelper___deref__},
{"QuantLibc::DefaultProbabilityHelper_isNull", _wrap_DefaultProbabilityHelper_isNull},
{"QuantLibc::new_DefaultProbabilityHelper", _wrap_new_DefaultProbabilityHelper},
{"QuantLibc::delete_DefaultProbabilityHelper", _wrap_delete_DefaultProbabilityHelper},
{"QuantLibc::new_DefaultProbabilityHelperVector", _wrap_new_DefaultProbabilityHelperVector},
{"QuantLibc::DefaultProbabilityHelperVector_size", _wrap_DefaultProbabilityHelperVector_size},
{"QuantLibc::DefaultProbabilityHelperVector_empty", _wrap_DefaultProbabilityHelperVector_empty},
{"QuantLibc::DefaultProbabilityHelperVector_clear", _wrap_DefaultProbabilityHelperVector_clear},
{"QuantLibc::DefaultProbabilityHelperVector_push", _wrap_DefaultProbabilityHelperVector_push},
{"QuantLibc::DefaultProbabilityHelperVector_pop", _wrap_DefaultProbabilityHelperVector_pop},
{"QuantLibc::DefaultProbabilityHelperVector_get", _wrap_DefaultProbabilityHelperVector_get},
{"QuantLibc::DefaultProbabilityHelperVector_set", _wrap_DefaultProbabilityHelperVector_set},
{"QuantLibc::delete_DefaultProbabilityHelperVector", _wrap_delete_DefaultProbabilityHelperVector},
{"QuantLibc::new_SpreadCdsHelper", _wrap_new_SpreadCdsHelper},
{"QuantLibc::delete_SpreadCdsHelper", _wrap_delete_SpreadCdsHelper},
{"QuantLibc::new_UpfrontCdsHelper", _wrap_new_UpfrontCdsHelper},
{"QuantLibc::delete_UpfrontCdsHelper", _wrap_delete_UpfrontCdsHelper},
{"QuantLibc::new_HazardRate", _wrap_new_HazardRate},
{"QuantLibc::delete_HazardRate", _wrap_delete_HazardRate},
{"QuantLibc::new_DefaultDensity", _wrap_new_DefaultDensity},
{"QuantLibc::delete_DefaultDensity", _wrap_delete_DefaultDensity},
{"QuantLibc::new_PiecewiseFlatHazardRate", _wrap_new_PiecewiseFlatHazardRate},
{"QuantLibc::PiecewiseFlatHazardRate_dates", _wrap_PiecewiseFlatHazardRate_dates},
{"QuantLibc::PiecewiseFlatHazardRate_times", _wrap_PiecewiseFlatHazardRate_times},
{"QuantLibc::PiecewiseFlatHazardRate_nodes", _wrap_PiecewiseFlatHazardRate_nodes},
{"QuantLibc::delete_PiecewiseFlatHazardRate", _wrap_delete_PiecewiseFlatHazardRate},
{"QuantLibc::new_Protection", _wrap_new_Protection},
{"QuantLibc::delete_Protection", _wrap_delete_Protection},
{"QuantLibc::new_CreditDefaultSwap", _wrap_new_CreditDefaultSwap},
{"QuantLibc::CreditDefaultSwap_side", _wrap_CreditDefaultSwap_side},
{"QuantLibc::CreditDefaultSwap_notional", _wrap_CreditDefaultSwap_notional},
{"QuantLibc::CreditDefaultSwap_runningSpread", _wrap_CreditDefaultSwap_runningSpread},
{"QuantLibc::CreditDefaultSwap_upfront", _wrap_CreditDefaultSwap_upfront},
{"QuantLibc::CreditDefaultSwap_settlesAccrual", _wrap_CreditDefaultSwap_settlesAccrual},
{"QuantLibc::CreditDefaultSwap_paysAtDefaultTime", _wrap_CreditDefaultSwap_paysAtDefaultTime},
{"QuantLibc::CreditDefaultSwap_fairSpread", _wrap_CreditDefaultSwap_fairSpread},
{"QuantLibc::CreditDefaultSwap_fairUpfront", _wrap_CreditDefaultSwap_fairUpfront},
{"QuantLibc::CreditDefaultSwap_couponLegBPS", _wrap_CreditDefaultSwap_couponLegBPS},
{"QuantLibc::CreditDefaultSwap_couponLegNPV", _wrap_CreditDefaultSwap_couponLegNPV},
{"QuantLibc::CreditDefaultSwap_defaultLegNPV", _wrap_CreditDefaultSwap_defaultLegNPV},
{"QuantLibc::CreditDefaultSwap_upfrontBPS", _wrap_CreditDefaultSwap_upfrontBPS},
{"QuantLibc::CreditDefaultSwap_upfrontNPV", _wrap_CreditDefaultSwap_upfrontNPV},
{"QuantLibc::CreditDefaultSwap_impliedHazardRate", _wrap_CreditDefaultSwap_impliedHazardRate},
{"QuantLibc::CreditDefaultSwap_coupons", _wrap_CreditDefaultSwap_coupons},
{"QuantLibc::delete_CreditDefaultSwap", _wrap_delete_CreditDefaultSwap},
{"QuantLibc::new_MidPointCdsEngine", _wrap_new_MidPointCdsEngine},
{"QuantLibc::delete_MidPointCdsEngine", _wrap_delete_MidPointCdsEngine},
{"QuantLibc::new_IntegralCdsEngine", _wrap_new_IntegralCdsEngine},
{"QuantLibc::delete_IntegralCdsEngine", _wrap_delete_IntegralCdsEngine},
{"QuantLibc::new_DiscountCurve", _wrap_new_DiscountCurve},
{"QuantLibc::DiscountCurve_times", _wrap_DiscountCurve_times},
{"QuantLibc::DiscountCurve_data", _wrap_DiscountCurve_data},
{"QuantLibc::DiscountCurve_dates", _wrap_DiscountCurve_dates},
{"QuantLibc::DiscountCurve_discounts", _wrap_DiscountCurve_discounts},
{"QuantLibc::DiscountCurve_nodes", _wrap_DiscountCurve_nodes},
{"QuantLibc::delete_DiscountCurve", _wrap_delete_DiscountCurve},
{"QuantLibc::new_NormalDistribution", _wrap_new_NormalDistribution},
{"QuantLibc::NormalDistribution_call", _wrap_NormalDistribution_call},
{"QuantLibc::NormalDistribution_derivative", _wrap_NormalDistribution_derivative},
{"QuantLibc::delete_NormalDistribution", _wrap_delete_NormalDistribution},
{"QuantLibc::new_CumulativeNormalDistribution", _wrap_new_CumulativeNormalDistribution},
{"QuantLibc::CumulativeNormalDistribution_call", _wrap_CumulativeNormalDistribution_call},
{"QuantLibc::CumulativeNormalDistribution_derivative", _wrap_CumulativeNormalDistribution_derivative},
{"QuantLibc::delete_CumulativeNormalDistribution", _wrap_delete_CumulativeNormalDistribution},
{"QuantLibc::new_InverseCumulativeNormal", _wrap_new_InverseCumulativeNormal},
{"QuantLibc::InverseCumulativeNormal_call", _wrap_InverseCumulativeNormal_call},
{"QuantLibc::delete_InverseCumulativeNormal", _wrap_delete_InverseCumulativeNormal},
{"QuantLibc::new_MoroInverseCumulativeNormal", _wrap_new_MoroInverseCumulativeNormal},
{"QuantLibc::MoroInverseCumulativeNormal_call", _wrap_MoroInverseCumulativeNormal_call},
{"QuantLibc::delete_MoroInverseCumulativeNormal", _wrap_delete_MoroInverseCumulativeNormal},
{"QuantLibc::new_BivariateCumulativeNormalDistribution", _wrap_new_BivariateCumulativeNormalDistribution},
{"QuantLibc::BivariateCumulativeNormalDistribution_call", _wrap_BivariateCumulativeNormalDistribution_call},
{"QuantLibc::delete_BivariateCumulativeNormalDistribution", _wrap_delete_BivariateCumulativeNormalDistribution},
{"QuantLibc::new_BinomialDistribution", _wrap_new_BinomialDistribution},
{"QuantLibc::BinomialDistribution_call", _wrap_BinomialDistribution_call},
{"QuantLibc::delete_BinomialDistribution", _wrap_delete_BinomialDistribution},
{"QuantLibc::new_CumulativeBinomialDistribution", _wrap_new_CumulativeBinomialDistribution},
{"QuantLibc::CumulativeBinomialDistribution_call", _wrap_CumulativeBinomialDistribution_call},
{"QuantLibc::delete_CumulativeBinomialDistribution", _wrap_delete_CumulativeBinomialDistribution},
{"QuantLibc::new_BivariateCumulativeNormalDistributionDr78", _wrap_new_BivariateCumulativeNormalDistributionDr78},
{"QuantLibc::BivariateCumulativeNormalDistributionDr78_call", _wrap_BivariateCumulativeNormalDistributionDr78_call},
{"QuantLibc::delete_BivariateCumulativeNormalDistributionDr78", _wrap_delete_BivariateCumulativeNormalDistributionDr78},
{"QuantLibc::new_BivariateCumulativeNormalDistributionWe04DP", _wrap_new_BivariateCumulativeNormalDistributionWe04DP},
{"QuantLibc::BivariateCumulativeNormalDistributionWe04DP_call", _wrap_BivariateCumulativeNormalDistributionWe04DP_call},
{"QuantLibc::delete_BivariateCumulativeNormalDistributionWe04DP", _wrap_delete_BivariateCumulativeNormalDistributionWe04DP},
{"QuantLibc::new_CumulativeChiSquareDistribution", _wrap_new_CumulativeChiSquareDistribution},
{"QuantLibc::CumulativeChiSquareDistribution_call", _wrap_CumulativeChiSquareDistribution_call},
{"QuantLibc::delete_CumulativeChiSquareDistribution", _wrap_delete_CumulativeChiSquareDistribution},
{"QuantLibc::new_NonCentralCumulativeChiSquareDistribution", _wrap_new_NonCentralCumulativeChiSquareDistribution},
{"QuantLibc::NonCentralCumulativeChiSquareDistribution_call", _wrap_NonCentralCumulativeChiSquareDistribution_call},
{"QuantLibc::delete_NonCentralCumulativeChiSquareDistribution", _wrap_delete_NonCentralCumulativeChiSquareDistribution},
{"QuantLibc::new_InverseNonCentralCumulativeChiSquareDistribution", _wrap_new_InverseNonCentralCumulativeChiSquareDistribution},
{"QuantLibc::InverseNonCentralCumulativeChiSquareDistribution_call", _wrap_InverseNonCentralCumulativeChiSquareDistribution_call},
{"QuantLibc::delete_InverseNonCentralCumulativeChiSquareDistribution", _wrap_delete_InverseNonCentralCumulativeChiSquareDistribution},
{"QuantLibc::new_CumulativeGammaDistribution", _wrap_new_CumulativeGammaDistribution},
{"QuantLibc::CumulativeGammaDistribution_call", _wrap_CumulativeGammaDistribution_call},
{"QuantLibc::delete_CumulativeGammaDistribution", _wrap_delete_CumulativeGammaDistribution},
{"QuantLibc::GammaFunction_logValue", _wrap_GammaFunction_logValue},
{"QuantLibc::new_GammaFunction", _wrap_new_GammaFunction},
{"QuantLibc::delete_GammaFunction", _wrap_delete_GammaFunction},
{"QuantLibc::new_PoissonDistribution", _wrap_new_PoissonDistribution},
{"QuantLibc::PoissonDistribution_call", _wrap_PoissonDistribution_call},
{"QuantLibc::delete_PoissonDistribution", _wrap_delete_PoissonDistribution},
{"QuantLibc::new_CumulativePoissonDistribution", _wrap_new_CumulativePoissonDistribution},
{"QuantLibc::CumulativePoissonDistribution_call", _wrap_CumulativePoissonDistribution_call},
{"QuantLibc::delete_CumulativePoissonDistribution", _wrap_delete_CumulativePoissonDistribution},
{"QuantLibc::new_InverseCumulativePoisson", _wrap_new_InverseCumulativePoisson},
{"QuantLibc::InverseCumulativePoisson_call", _wrap_InverseCumulativePoisson_call},
{"QuantLibc::delete_InverseCumulativePoisson", _wrap_delete_InverseCumulativePoisson},
{"QuantLibc::new_StudentDistribution", _wrap_new_StudentDistribution},
{"QuantLibc::StudentDistribution_call", _wrap_StudentDistribution_call},
{"QuantLibc::delete_StudentDistribution", _wrap_delete_StudentDistribution},
{"QuantLibc::new_CumulativeStudentDistribution", _wrap_new_CumulativeStudentDistribution},
{"QuantLibc::CumulativeStudentDistribution_call", _wrap_CumulativeStudentDistribution_call},
{"QuantLibc::delete_CumulativeStudentDistribution", _wrap_delete_CumulativeStudentDistribution},
{"QuantLibc::new_InverseCumulativeStudent", _wrap_new_InverseCumulativeStudent},
{"QuantLibc::InverseCumulativeStudent_call", _wrap_InverseCumulativeStudent_call},
{"QuantLibc::delete_InverseCumulativeStudent", _wrap_delete_InverseCumulativeStudent},
{"QuantLibc::new_Money", _wrap_new_Money},
{"QuantLibc::Money_currency", _wrap_Money_currency},
{"QuantLibc::Money_value", _wrap_Money_value},
{"QuantLibc::Money_rounded", _wrap_Money_rounded},
{"QuantLibc::Money_setConversionType", _wrap_Money_setConversionType},
{"QuantLibc::Money_setBaseCurrency", _wrap_Money_setBaseCurrency},
{"QuantLibc::delete_Money", _wrap_delete_Money},
{"QuantLibc::new_ExchangeRate", _wrap_new_ExchangeRate},
{"QuantLibc::ExchangeRate_source", _wrap_ExchangeRate_source},
{"QuantLibc::ExchangeRate_target", _wrap_ExchangeRate_target},
{"QuantLibc::ExchangeRate_type", _wrap_ExchangeRate_type},
{"QuantLibc::ExchangeRate_rate", _wrap_ExchangeRate_rate},
{"QuantLibc::ExchangeRate_exchange", _wrap_ExchangeRate_exchange},
{"QuantLibc::ExchangeRate_chain", _wrap_ExchangeRate_chain},
{"QuantLibc::delete_ExchangeRate", _wrap_delete_ExchangeRate},
{"QuantLibc::ExchangeRateManager_instance", _wrap_ExchangeRateManager_instance},
{"QuantLibc::ExchangeRateManager_add", _wrap_ExchangeRateManager_add},
{"QuantLibc::ExchangeRateManager_lookup", _wrap_ExchangeRateManager_lookup},
{"QuantLibc::ExchangeRateManager_clear", _wrap_ExchangeRateManager_clear},
{"QuantLibc::delete_ExchangeRateManager", _wrap_delete_ExchangeRateManager},
{"QuantLibc::new_Futures", _wrap_new_Futures},
{"QuantLibc::delete_Futures", _wrap_delete_Futures},
{"QuantLibc::new_TimeBasket", _wrap_new_TimeBasket},
{"QuantLibc::TimeBasket_size", _wrap_TimeBasket_size},
{"QuantLibc::TimeBasket_rebin", _wrap_TimeBasket_rebin},
{"QuantLibc::delete_TimeBasket", _wrap_delete_TimeBasket},
{"QuantLibc::new_Swap", _wrap_new_Swap},
{"QuantLibc::Swap_startDate", _wrap_Swap_startDate},
{"QuantLibc::Swap_maturityDate", _wrap_Swap_maturityDate},
{"QuantLibc::Swap_leg", _wrap_Swap_leg},
{"QuantLibc::Swap_legNPV", _wrap_Swap_legNPV},
{"QuantLibc::delete_Swap", _wrap_delete_Swap},
{"QuantLibc::new_VanillaSwap", _wrap_new_VanillaSwap},
{"QuantLibc::VanillaSwap_fairRate", _wrap_VanillaSwap_fairRate},
{"QuantLibc::VanillaSwap_fairSpread", _wrap_VanillaSwap_fairSpread},
{"QuantLibc::VanillaSwap_fixedLegBPS", _wrap_VanillaSwap_fixedLegBPS},
{"QuantLibc::VanillaSwap_floatingLegBPS", _wrap_VanillaSwap_floatingLegBPS},
{"QuantLibc::VanillaSwap_fixedLegNPV", _wrap_VanillaSwap_fixedLegNPV},
{"QuantLibc::VanillaSwap_floatingLegNPV", _wrap_VanillaSwap_floatingLegNPV},
{"QuantLibc::VanillaSwap_fixedLeg", _wrap_VanillaSwap_fixedLeg},
{"QuantLibc::VanillaSwap_floatingLeg", _wrap_VanillaSwap_floatingLeg},
{"QuantLibc::VanillaSwap_nominal", _wrap_VanillaSwap_nominal},
{"QuantLibc::VanillaSwap_fixedSchedule", _wrap_VanillaSwap_fixedSchedule},
{"QuantLibc::VanillaSwap_floatingSchedule", _wrap_VanillaSwap_floatingSchedule},
{"QuantLibc::VanillaSwap_fixedRate", _wrap_VanillaSwap_fixedRate},
{"QuantLibc::VanillaSwap_spread", _wrap_VanillaSwap_spread},
{"QuantLibc::VanillaSwap_floatingDayCount", _wrap_VanillaSwap_floatingDayCount},
{"QuantLibc::VanillaSwap_fixedDayCount", _wrap_VanillaSwap_fixedDayCount},
{"QuantLibc::delete_VanillaSwap", _wrap_delete_VanillaSwap},
{"QuantLibc::new_NonstandardSwap", _wrap_new_NonstandardSwap},
{"QuantLibc::NonstandardSwap_fixedLeg", _wrap_NonstandardSwap_fixedLeg},
{"QuantLibc::NonstandardSwap_floatingLeg", _wrap_NonstandardSwap_floatingLeg},
{"QuantLibc::NonstandardSwap_fixedNominals", _wrap_NonstandardSwap_fixedNominals},
{"QuantLibc::NonstandardSwap_floatingNominals", _wrap_NonstandardSwap_floatingNominals},
{"QuantLibc::NonstandardSwap_fixedSchedule", _wrap_NonstandardSwap_fixedSchedule},
{"QuantLibc::NonstandardSwap_floatingSchedule", _wrap_NonstandardSwap_floatingSchedule},
{"QuantLibc::NonstandardSwap_fixedRate", _wrap_NonstandardSwap_fixedRate},
{"QuantLibc::NonstandardSwap_spreads", _wrap_NonstandardSwap_spreads},
{"QuantLibc::NonstandardSwap_gearings", _wrap_NonstandardSwap_gearings},
{"QuantLibc::NonstandardSwap_floatingDayCount", _wrap_NonstandardSwap_floatingDayCount},
{"QuantLibc::NonstandardSwap_fixedDayCount", _wrap_NonstandardSwap_fixedDayCount},
{"QuantLibc::delete_NonstandardSwap", _wrap_delete_NonstandardSwap},
{"QuantLibc::new_DiscountingSwapEngine", _wrap_new_DiscountingSwapEngine},
{"QuantLibc::delete_DiscountingSwapEngine", _wrap_delete_DiscountingSwapEngine},
{"QuantLibc::new_AssetSwap", _wrap_new_AssetSwap},
{"QuantLibc::AssetSwap_fairCleanPrice", _wrap_AssetSwap_fairCleanPrice},
{"QuantLibc::AssetSwap_fairSpread", _wrap_AssetSwap_fairSpread},
{"QuantLibc::delete_AssetSwap", _wrap_delete_AssetSwap},
{"QuantLibc::new_FloatFloatSwap", _wrap_new_FloatFloatSwap},
{"QuantLibc::delete_FloatFloatSwap", _wrap_delete_FloatFloatSwap},
{"QuantLibc::new_Pillar", _wrap_new_Pillar},
{"QuantLibc::delete_Pillar", _wrap_delete_Pillar},
{"QuantLibc::RateHelper___deref__", _wrap_RateHelper___deref__},
{"QuantLibc::RateHelper_isNull", _wrap_RateHelper_isNull},
{"QuantLibc::new_RateHelper", _wrap_new_RateHelper},
{"QuantLibc::delete_RateHelper", _wrap_delete_RateHelper},
{"QuantLibc::RateHelper_quote", _wrap_RateHelper_quote},
{"QuantLibc::RateHelper_latestDate", _wrap_RateHelper_latestDate},
{"QuantLibc::new_DepositRateHelper", _wrap_new_DepositRateHelper},
{"QuantLibc::delete_DepositRateHelper", _wrap_delete_DepositRateHelper},
{"QuantLibc::new_FraRateHelper", _wrap_new_FraRateHelper},
{"QuantLibc::delete_FraRateHelper", _wrap_delete_FraRateHelper},
{"QuantLibc::new_FuturesRateHelper", _wrap_new_FuturesRateHelper},
{"QuantLibc::delete_FuturesRateHelper", _wrap_delete_FuturesRateHelper},
{"QuantLibc::new_SwapRateHelper", _wrap_new_SwapRateHelper},
{"QuantLibc::SwapRateHelper_swap", _wrap_SwapRateHelper_swap},
{"QuantLibc::delete_SwapRateHelper", _wrap_delete_SwapRateHelper},
{"QuantLibc::new_BondHelper", _wrap_new_BondHelper},
{"QuantLibc::BondHelper_bond", _wrap_BondHelper_bond},
{"QuantLibc::delete_BondHelper", _wrap_delete_BondHelper},
{"QuantLibc::new_FixedRateBondHelper", _wrap_new_FixedRateBondHelper},
{"QuantLibc::FixedRateBondHelper_bond", _wrap_FixedRateBondHelper_bond},
{"QuantLibc::delete_FixedRateBondHelper", _wrap_delete_FixedRateBondHelper},
{"QuantLibc::new_OISRateHelper", _wrap_new_OISRateHelper},
{"QuantLibc::delete_OISRateHelper", _wrap_delete_OISRateHelper},
{"QuantLibc::new_DatedOISRateHelper", _wrap_new_DatedOISRateHelper},
{"QuantLibc::delete_DatedOISRateHelper", _wrap_delete_DatedOISRateHelper},
{"QuantLibc::new_FxSwapRateHelper", _wrap_new_FxSwapRateHelper},
{"QuantLibc::delete_FxSwapRateHelper", _wrap_delete_FxSwapRateHelper},
{"QuantLibc::new_RateHelperVector", _wrap_new_RateHelperVector},
{"QuantLibc::RateHelperVector_size", _wrap_RateHelperVector_size},
{"QuantLibc::RateHelperVector_empty", _wrap_RateHelperVector_empty},
{"QuantLibc::RateHelperVector_clear", _wrap_RateHelperVector_clear},
{"QuantLibc::RateHelperVector_push", _wrap_RateHelperVector_push},
{"QuantLibc::RateHelperVector_pop", _wrap_RateHelperVector_pop},
{"QuantLibc::RateHelperVector_get", _wrap_RateHelperVector_get},
{"QuantLibc::RateHelperVector_set", _wrap_RateHelperVector_set},
{"QuantLibc::delete_RateHelperVector", _wrap_delete_RateHelperVector},
{"QuantLibc::delete_FittingMethod", _wrap_delete_FittingMethod},
{"QuantLibc::FittingMethod_size", _wrap_FittingMethod_size},
{"QuantLibc::FittingMethod_solution", _wrap_FittingMethod_solution},
{"QuantLibc::FittingMethod_numberOfIterations", _wrap_FittingMethod_numberOfIterations},
{"QuantLibc::FittingMethod_minimumCostValue", _wrap_FittingMethod_minimumCostValue},
{"QuantLibc::FittingMethod_constrainAtZero", _wrap_FittingMethod_constrainAtZero},
{"QuantLibc::FittingMethod_weights", _wrap_FittingMethod_weights},
{"QuantLibc::new_FittedBondDiscountCurve", _wrap_new_FittedBondDiscountCurve},
{"QuantLibc::FittedBondDiscountCurve_fitResults", _wrap_FittedBondDiscountCurve_fitResults},
{"QuantLibc::delete_FittedBondDiscountCurve", _wrap_delete_FittedBondDiscountCurve},
{"QuantLibc::new_ExponentialSplinesFitting", _wrap_new_ExponentialSplinesFitting},
{"QuantLibc::delete_ExponentialSplinesFitting", _wrap_delete_ExponentialSplinesFitting},
{"QuantLibc::new_NelsonSiegelFitting", _wrap_new_NelsonSiegelFitting},
{"QuantLibc::delete_NelsonSiegelFitting", _wrap_delete_NelsonSiegelFitting},
{"QuantLibc::new_SvenssonFitting", _wrap_new_SvenssonFitting},
{"QuantLibc::delete_SvenssonFitting", _wrap_delete_SvenssonFitting},
{"QuantLibc::new_CubicBSplinesFitting", _wrap_new_CubicBSplinesFitting},
{"QuantLibc::CubicBSplinesFitting_basisFunction", _wrap_CubicBSplinesFitting_basisFunction},
{"QuantLibc::delete_CubicBSplinesFitting", _wrap_delete_CubicBSplinesFitting},
{"QuantLibc::new_SimplePolynomialFitting", _wrap_new_SimplePolynomialFitting},
{"QuantLibc::delete_SimplePolynomialFitting", _wrap_delete_SimplePolynomialFitting},
{"QuantLibc::new_ForwardCurve", _wrap_new_ForwardCurve},
{"QuantLibc::ForwardCurve_dates", _wrap_ForwardCurve_dates},
{"QuantLibc::ForwardCurve_forwards", _wrap_ForwardCurve_forwards},
{"QuantLibc::ForwardCurve_nodes", _wrap_ForwardCurve_nodes},
{"QuantLibc::delete_ForwardCurve", _wrap_delete_ForwardCurve},
{"QuantLibc::new_Position", _wrap_new_Position},
{"QuantLibc::delete_Position", _wrap_delete_Position},
{"QuantLibc::new_ForwardRateAgreement", _wrap_new_ForwardRateAgreement},
{"QuantLibc::ForwardRateAgreement_spotIncome", _wrap_ForwardRateAgreement_spotIncome},
{"QuantLibc::ForwardRateAgreement_spotValue", _wrap_ForwardRateAgreement_spotValue},
{"QuantLibc::ForwardRateAgreement_forwardRate", _wrap_ForwardRateAgreement_forwardRate},
{"QuantLibc::delete_ForwardRateAgreement", _wrap_delete_ForwardRateAgreement},
{"QuantLibc::Gaussian1dModel___deref__", _wrap_Gaussian1dModel___deref__},
{"QuantLibc::Gaussian1dModel_isNull", _wrap_Gaussian1dModel_isNull},
{"QuantLibc::new_Gaussian1dModel", _wrap_new_Gaussian1dModel},
{"QuantLibc::delete_Gaussian1dModel", _wrap_delete_Gaussian1dModel},
{"QuantLibc::Gaussian1dModel_stateProcess", _wrap_Gaussian1dModel_stateProcess},
{"QuantLibc::Gaussian1dModel_numeraire", _wrap_Gaussian1dModel_numeraire},
{"QuantLibc::Gaussian1dModel_zerobond", _wrap_Gaussian1dModel_zerobond},
{"QuantLibc::Gaussian1dModel_zerobondOption", _wrap_Gaussian1dModel_zerobondOption},
{"QuantLibc::Gaussian1dModel_forwardRate", _wrap_Gaussian1dModel_forwardRate},
{"QuantLibc::Gaussian1dModel_swapRate", _wrap_Gaussian1dModel_swapRate},
{"QuantLibc::Gaussian1dModel_swapAnnuity", _wrap_Gaussian1dModel_swapAnnuity},
{"QuantLibc::new_Gsr", _wrap_new_Gsr},
{"QuantLibc::Gsr_calibrateVolatilitiesIterative", _wrap_Gsr_calibrateVolatilitiesIterative},
{"QuantLibc::Gsr_calibrate", _wrap_Gsr_calibrate},
{"QuantLibc::Gsr_params", _wrap_Gsr_params},
{"QuantLibc::Gsr_value", _wrap_Gsr_value},
{"QuantLibc::Gsr_endCriteria", _wrap_Gsr_endCriteria},
{"QuantLibc::Gsr_setParams", _wrap_Gsr_setParams},
{"QuantLibc::Gsr_functionEvaluation", _wrap_Gsr_functionEvaluation},
{"QuantLibc::Gsr_reversion", _wrap_Gsr_reversion},
{"QuantLibc::Gsr_volatility", _wrap_Gsr_volatility},
{"QuantLibc::delete_Gsr", _wrap_delete_Gsr},
{"QuantLibc::new_MarkovFunctionalSettings", _wrap_new_MarkovFunctionalSettings},
{"QuantLibc::delete_MarkovFunctionalSettings", _wrap_delete_MarkovFunctionalSettings},
{"QuantLibc::new_MarkovFunctional", _wrap_new_MarkovFunctional},
{"QuantLibc::MarkovFunctional_calibrate", _wrap_MarkovFunctional_calibrate},
{"QuantLibc::MarkovFunctional_volatility", _wrap_MarkovFunctional_volatility},
{"QuantLibc::delete_MarkovFunctional", _wrap_delete_MarkovFunctional},
{"QuantLibc::new_Gaussian1dSwaptionEngine", _wrap_new_Gaussian1dSwaptionEngine},
{"QuantLibc::delete_Gaussian1dSwaptionEngine", _wrap_delete_Gaussian1dSwaptionEngine},
{"QuantLibc::new_Gaussian1dJamshidianSwaptionEngine", _wrap_new_Gaussian1dJamshidianSwaptionEngine},
{"QuantLibc::delete_Gaussian1dJamshidianSwaptionEngine", _wrap_delete_Gaussian1dJamshidianSwaptionEngine},
{"QuantLibc::new_Gaussian1dNonstandardSwaptionEngine", _wrap_new_Gaussian1dNonstandardSwaptionEngine},
{"QuantLibc::delete_Gaussian1dNonstandardSwaptionEngine", _wrap_delete_Gaussian1dNonstandardSwaptionEngine},
{"QuantLibc::new_Gaussian1dFloatFloatSwaptionEngine", _wrap_new_Gaussian1dFloatFloatSwaptionEngine},
{"QuantLibc::delete_Gaussian1dFloatFloatSwaptionEngine", _wrap_delete_Gaussian1dFloatFloatSwaptionEngine},
{"QuantLibc::new_SegmentIntegral", _wrap_new_SegmentIntegral},
{"QuantLibc::delete_SegmentIntegral", _wrap_delete_SegmentIntegral},
{"QuantLibc::new_TrapezoidIntegralDefault", _wrap_new_TrapezoidIntegralDefault},
{"QuantLibc::delete_TrapezoidIntegralDefault", _wrap_delete_TrapezoidIntegralDefault},
{"QuantLibc::new_TrapezoidIntegralMidPoint", _wrap_new_TrapezoidIntegralMidPoint},
{"QuantLibc::delete_TrapezoidIntegralMidPoint", _wrap_delete_TrapezoidIntegralMidPoint},
{"QuantLibc::new_SimpsonIntegral", _wrap_new_SimpsonIntegral},
{"QuantLibc::delete_SimpsonIntegral", _wrap_delete_SimpsonIntegral},
{"QuantLibc::new_GaussKronrodAdaptive", _wrap_new_GaussKronrodAdaptive},
{"QuantLibc::delete_GaussKronrodAdaptive", _wrap_delete_GaussKronrodAdaptive},
{"QuantLibc::new_GaussKronrodNonAdaptive", _wrap_new_GaussKronrodNonAdaptive},
{"QuantLibc::delete_GaussKronrodNonAdaptive", _wrap_delete_GaussKronrodNonAdaptive},
{"QuantLibc::new_GaussLobattoIntegral", _wrap_new_GaussLobattoIntegral},
{"QuantLibc::delete_GaussLobattoIntegral", _wrap_delete_GaussLobattoIntegral},
{"QuantLibc::new_GaussLaguerreIntegration", _wrap_new_GaussLaguerreIntegration},
{"QuantLibc::delete_GaussLaguerreIntegration", _wrap_delete_GaussLaguerreIntegration},
{"QuantLibc::new_GaussHermiteIntegration", _wrap_new_GaussHermiteIntegration},
{"QuantLibc::delete_GaussHermiteIntegration", _wrap_delete_GaussHermiteIntegration},
{"QuantLibc::new_GaussJacobiIntegration", _wrap_new_GaussJacobiIntegration},
{"QuantLibc::delete_GaussJacobiIntegration", _wrap_delete_GaussJacobiIntegration},
{"QuantLibc::new_GaussHyperbolicIntegration", _wrap_new_GaussHyperbolicIntegration},
{"QuantLibc::delete_GaussHyperbolicIntegration", _wrap_delete_GaussHyperbolicIntegration},
{"QuantLibc::new_GaussLegendreIntegration", _wrap_new_GaussLegendreIntegration},
{"QuantLibc::delete_GaussLegendreIntegration", _wrap_delete_GaussLegendreIntegration},
{"QuantLibc::new_GaussChebyshevIntegration", _wrap_new_GaussChebyshevIntegration},
{"QuantLibc::delete_GaussChebyshevIntegration", _wrap_delete_GaussChebyshevIntegration},
{"QuantLibc::new_GaussChebyshev2ndIntegration", _wrap_new_GaussChebyshev2ndIntegration},
{"QuantLibc::delete_GaussChebyshev2ndIntegration", _wrap_delete_GaussChebyshev2ndIntegration},
{"QuantLibc::new_GaussGegenbauerIntegration", _wrap_new_GaussGegenbauerIntegration},
{"QuantLibc::delete_GaussGegenbauerIntegration", _wrap_delete_GaussGegenbauerIntegration},
{"QuantLibc::SampleNumber_value", _wrap_SampleNumber_value},
{"QuantLibc::SampleNumber_weight", _wrap_SampleNumber_weight},
{"QuantLibc::delete_SampleNumber", _wrap_delete_SampleNumber},
{"QuantLibc::SampleArray_value", _wrap_SampleArray_value},
{"QuantLibc::SampleArray_weight", _wrap_SampleArray_weight},
{"QuantLibc::delete_SampleArray", _wrap_delete_SampleArray},
{"QuantLibc::SampleRealVector_value", _wrap_SampleRealVector_value},
{"QuantLibc::SampleRealVector_weight", _wrap_SampleRealVector_weight},
{"QuantLibc::delete_SampleRealVector", _wrap_delete_SampleRealVector},
{"QuantLibc::new_LecuyerUniformRng", _wrap_new_LecuyerUniformRng},
{"QuantLibc::LecuyerUniformRng_next", _wrap_LecuyerUniformRng_next},
{"QuantLibc::delete_LecuyerUniformRng", _wrap_delete_LecuyerUniformRng},
{"QuantLibc::new_KnuthUniformRng", _wrap_new_KnuthUniformRng},
{"QuantLibc::KnuthUniformRng_next", _wrap_KnuthUniformRng_next},
{"QuantLibc::delete_KnuthUniformRng", _wrap_delete_KnuthUniformRng},
{"QuantLibc::new_MersenneTwisterUniformRng", _wrap_new_MersenneTwisterUniformRng},
{"QuantLibc::MersenneTwisterUniformRng_next", _wrap_MersenneTwisterUniformRng_next},
{"QuantLibc::delete_MersenneTwisterUniformRng", _wrap_delete_MersenneTwisterUniformRng},
{"QuantLibc::new_UniformRandomGenerator", _wrap_new_UniformRandomGenerator},
{"QuantLibc::UniformRandomGenerator_next", _wrap_UniformRandomGenerator_next},
{"QuantLibc::UniformRandomGenerator_nextValue", _wrap_UniformRandomGenerator_nextValue},
{"QuantLibc::delete_UniformRandomGenerator", _wrap_delete_UniformRandomGenerator},
{"QuantLibc::new_CentralLimitLecuyerGaussianRng", _wrap_new_CentralLimitLecuyerGaussianRng},
{"QuantLibc::CentralLimitLecuyerGaussianRng_next", _wrap_CentralLimitLecuyerGaussianRng_next},
{"QuantLibc::delete_CentralLimitLecuyerGaussianRng", _wrap_delete_CentralLimitLecuyerGaussianRng},
{"QuantLibc::new_CentralLimitKnuthGaussianRng", _wrap_new_CentralLimitKnuthGaussianRng},
{"QuantLibc::CentralLimitKnuthGaussianRng_next", _wrap_CentralLimitKnuthGaussianRng_next},
{"QuantLibc::delete_CentralLimitKnuthGaussianRng", _wrap_delete_CentralLimitKnuthGaussianRng},
{"QuantLibc::new_CentralLimitMersenneTwisterGaussianRng", _wrap_new_CentralLimitMersenneTwisterGaussianRng},
{"QuantLibc::CentralLimitMersenneTwisterGaussianRng_next", _wrap_CentralLimitMersenneTwisterGaussianRng_next},
{"QuantLibc::delete_CentralLimitMersenneTwisterGaussianRng", _wrap_delete_CentralLimitMersenneTwisterGaussianRng},
{"QuantLibc::new_BoxMullerLecuyerGaussianRng", _wrap_new_BoxMullerLecuyerGaussianRng},
{"QuantLibc::BoxMullerLecuyerGaussianRng_next", _wrap_BoxMullerLecuyerGaussianRng_next},
{"QuantLibc::delete_BoxMullerLecuyerGaussianRng", _wrap_delete_BoxMullerLecuyerGaussianRng},
{"QuantLibc::new_BoxMullerKnuthGaussianRng", _wrap_new_BoxMullerKnuthGaussianRng},
{"QuantLibc::BoxMullerKnuthGaussianRng_next", _wrap_BoxMullerKnuthGaussianRng_next},
{"QuantLibc::delete_BoxMullerKnuthGaussianRng", _wrap_delete_BoxMullerKnuthGaussianRng},
{"QuantLibc::new_BoxMullerMersenneTwisterGaussianRng", _wrap_new_BoxMullerMersenneTwisterGaussianRng},
{"QuantLibc::BoxMullerMersenneTwisterGaussianRng_next", _wrap_BoxMullerMersenneTwisterGaussianRng_next},
{"QuantLibc::delete_BoxMullerMersenneTwisterGaussianRng", _wrap_delete_BoxMullerMersenneTwisterGaussianRng},
{"QuantLibc::new_MoroInvCumulativeLecuyerGaussianRng", _wrap_new_MoroInvCumulativeLecuyerGaussianRng},
{"QuantLibc::MoroInvCumulativeLecuyerGaussianRng_next", _wrap_MoroInvCumulativeLecuyerGaussianRng_next},
{"QuantLibc::delete_MoroInvCumulativeLecuyerGaussianRng", _wrap_delete_MoroInvCumulativeLecuyerGaussianRng},
{"QuantLibc::new_MoroInvCumulativeKnuthGaussianRng", _wrap_new_MoroInvCumulativeKnuthGaussianRng},
{"QuantLibc::MoroInvCumulativeKnuthGaussianRng_next", _wrap_MoroInvCumulativeKnuthGaussianRng_next},
{"QuantLibc::delete_MoroInvCumulativeKnuthGaussianRng", _wrap_delete_MoroInvCumulativeKnuthGaussianRng},
{"QuantLibc::new_MoroInvCumulativeMersenneTwisterGaussianRng", _wrap_new_MoroInvCumulativeMersenneTwisterGaussianRng},
{"QuantLibc::MoroInvCumulativeMersenneTwisterGaussianRng_next", _wrap_MoroInvCumulativeMersenneTwisterGaussianRng_next},
{"QuantLibc::delete_MoroInvCumulativeMersenneTwisterGaussianRng", _wrap_delete_MoroInvCumulativeMersenneTwisterGaussianRng},
{"QuantLibc::new_InvCumulativeLecuyerGaussianRng", _wrap_new_InvCumulativeLecuyerGaussianRng},
{"QuantLibc::InvCumulativeLecuyerGaussianRng_next", _wrap_InvCumulativeLecuyerGaussianRng_next},
{"QuantLibc::delete_InvCumulativeLecuyerGaussianRng", _wrap_delete_InvCumulativeLecuyerGaussianRng},
{"QuantLibc::new_InvCumulativeKnuthGaussianRng", _wrap_new_InvCumulativeKnuthGaussianRng},
{"QuantLibc::InvCumulativeKnuthGaussianRng_next", _wrap_InvCumulativeKnuthGaussianRng_next},
{"QuantLibc::delete_InvCumulativeKnuthGaussianRng", _wrap_delete_InvCumulativeKnuthGaussianRng},
{"QuantLibc::new_InvCumulativeMersenneTwisterGaussianRng", _wrap_new_InvCumulativeMersenneTwisterGaussianRng},
{"QuantLibc::InvCumulativeMersenneTwisterGaussianRng_next", _wrap_InvCumulativeMersenneTwisterGaussianRng_next},
{"QuantLibc::delete_InvCumulativeMersenneTwisterGaussianRng", _wrap_delete_InvCumulativeMersenneTwisterGaussianRng},
{"QuantLibc::new_GaussianRandomGenerator", _wrap_new_GaussianRandomGenerator},
{"QuantLibc::GaussianRandomGenerator_next", _wrap_GaussianRandomGenerator_next},
{"QuantLibc::GaussianRandomGenerator_nextValue", _wrap_GaussianRandomGenerator_nextValue},
{"QuantLibc::delete_GaussianRandomGenerator", _wrap_delete_GaussianRandomGenerator},
{"QuantLibc::new_HaltonRsg", _wrap_new_HaltonRsg},
{"QuantLibc::HaltonRsg_nextSequence", _wrap_HaltonRsg_nextSequence},
{"QuantLibc::HaltonRsg_lastSequence", _wrap_HaltonRsg_lastSequence},
{"QuantLibc::HaltonRsg_dimension", _wrap_HaltonRsg_dimension},
{"QuantLibc::delete_HaltonRsg", _wrap_delete_HaltonRsg},
{"QuantLibc::new_SobolRsg", _wrap_new_SobolRsg},
{"QuantLibc::SobolRsg_nextSequence", _wrap_SobolRsg_nextSequence},
{"QuantLibc::SobolRsg_lastSequence", _wrap_SobolRsg_lastSequence},
{"QuantLibc::SobolRsg_dimension", _wrap_SobolRsg_dimension},
{"QuantLibc::SobolRsg_skipTo", _wrap_SobolRsg_skipTo},
{"QuantLibc::SobolRsg_nextInt32Sequence", _wrap_SobolRsg_nextInt32Sequence},
{"QuantLibc::delete_SobolRsg", _wrap_delete_SobolRsg},
{"QuantLibc::new_SobolBrownianBridgeRsg", _wrap_new_SobolBrownianBridgeRsg},
{"QuantLibc::SobolBrownianBridgeRsg_nextSequence", _wrap_SobolBrownianBridgeRsg_nextSequence},
{"QuantLibc::SobolBrownianBridgeRsg_lastSequence", _wrap_SobolBrownianBridgeRsg_lastSequence},
{"QuantLibc::SobolBrownianBridgeRsg_dimension", _wrap_SobolBrownianBridgeRsg_dimension},
{"QuantLibc::delete_SobolBrownianBridgeRsg", _wrap_delete_SobolBrownianBridgeRsg},
{"QuantLibc::new_LecuyerUniformRsg", _wrap_new_LecuyerUniformRsg},
{"QuantLibc::LecuyerUniformRsg_nextSequence", _wrap_LecuyerUniformRsg_nextSequence},
{"QuantLibc::LecuyerUniformRsg_dimension", _wrap_LecuyerUniformRsg_dimension},
{"QuantLibc::delete_LecuyerUniformRsg", _wrap_delete_LecuyerUniformRsg},
{"QuantLibc::new_KnuthUniformRsg", _wrap_new_KnuthUniformRsg},
{"QuantLibc::KnuthUniformRsg_nextSequence", _wrap_KnuthUniformRsg_nextSequence},
{"QuantLibc::KnuthUniformRsg_dimension", _wrap_KnuthUniformRsg_dimension},
{"QuantLibc::delete_KnuthUniformRsg", _wrap_delete_KnuthUniformRsg},
{"QuantLibc::new_MersenneTwisterUniformRsg", _wrap_new_MersenneTwisterUniformRsg},
{"QuantLibc::MersenneTwisterUniformRsg_nextSequence", _wrap_MersenneTwisterUniformRsg_nextSequence},
{"QuantLibc::MersenneTwisterUniformRsg_dimension", _wrap_MersenneTwisterUniformRsg_dimension},
{"QuantLibc::delete_MersenneTwisterUniformRsg", _wrap_delete_MersenneTwisterUniformRsg},
{"QuantLibc::new_UniformRandomSequenceGenerator", _wrap_new_UniformRandomSequenceGenerator},
{"QuantLibc::UniformRandomSequenceGenerator_nextSequence", _wrap_UniformRandomSequenceGenerator_nextSequence},
{"QuantLibc::UniformRandomSequenceGenerator_dimension", _wrap_UniformRandomSequenceGenerator_dimension},
{"QuantLibc::delete_UniformRandomSequenceGenerator", _wrap_delete_UniformRandomSequenceGenerator},
{"QuantLibc::new_UniformLowDiscrepancySequenceGenerator", _wrap_new_UniformLowDiscrepancySequenceGenerator},
{"QuantLibc::UniformLowDiscrepancySequenceGenerator_nextSequence", _wrap_UniformLowDiscrepancySequenceGenerator_nextSequence},
{"QuantLibc::UniformLowDiscrepancySequenceGenerator_dimension", _wrap_UniformLowDiscrepancySequenceGenerator_dimension},
{"QuantLibc::delete_UniformLowDiscrepancySequenceGenerator", _wrap_delete_UniformLowDiscrepancySequenceGenerator},
{"QuantLibc::new_MoroInvCumulativeLecuyerGaussianRsg", _wrap_new_MoroInvCumulativeLecuyerGaussianRsg},
{"QuantLibc::MoroInvCumulativeLecuyerGaussianRsg_nextSequence", _wrap_MoroInvCumulativeLecuyerGaussianRsg_nextSequence},
{"QuantLibc::MoroInvCumulativeLecuyerGaussianRsg_dimension", _wrap_MoroInvCumulativeLecuyerGaussianRsg_dimension},
{"QuantLibc::delete_MoroInvCumulativeLecuyerGaussianRsg", _wrap_delete_MoroInvCumulativeLecuyerGaussianRsg},
{"QuantLibc::new_MoroInvCumulativeKnuthGaussianRsg", _wrap_new_MoroInvCumulativeKnuthGaussianRsg},
{"QuantLibc::MoroInvCumulativeKnuthGaussianRsg_nextSequence", _wrap_MoroInvCumulativeKnuthGaussianRsg_nextSequence},
{"QuantLibc::MoroInvCumulativeKnuthGaussianRsg_dimension", _wrap_MoroInvCumulativeKnuthGaussianRsg_dimension},
{"QuantLibc::delete_MoroInvCumulativeKnuthGaussianRsg", _wrap_delete_MoroInvCumulativeKnuthGaussianRsg},
{"QuantLibc::new_MoroInvCumulativeMersenneTwisterGaussianRsg", _wrap_new_MoroInvCumulativeMersenneTwisterGaussianRsg},
{"QuantLibc::MoroInvCumulativeMersenneTwisterGaussianRsg_nextSequence", _wrap_MoroInvCumulativeMersenneTwisterGaussianRsg_nextSequence},
{"QuantLibc::MoroInvCumulativeMersenneTwisterGaussianRsg_dimension", _wrap_MoroInvCumulativeMersenneTwisterGaussianRsg_dimension},
{"QuantLibc::delete_MoroInvCumulativeMersenneTwisterGaussianRsg", _wrap_delete_MoroInvCumulativeMersenneTwisterGaussianRsg},
{"QuantLibc::new_MoroInvCumulativeHaltonGaussianRsg", _wrap_new_MoroInvCumulativeHaltonGaussianRsg},
{"QuantLibc::MoroInvCumulativeHaltonGaussianRsg_nextSequence", _wrap_MoroInvCumulativeHaltonGaussianRsg_nextSequence},
{"QuantLibc::MoroInvCumulativeHaltonGaussianRsg_dimension", _wrap_MoroInvCumulativeHaltonGaussianRsg_dimension},
{"QuantLibc::delete_MoroInvCumulativeHaltonGaussianRsg", _wrap_delete_MoroInvCumulativeHaltonGaussianRsg},
{"QuantLibc::new_MoroInvCumulativeSobolGaussianRsg", _wrap_new_MoroInvCumulativeSobolGaussianRsg},
{"QuantLibc::MoroInvCumulativeSobolGaussianRsg_nextSequence", _wrap_MoroInvCumulativeSobolGaussianRsg_nextSequence},
{"QuantLibc::MoroInvCumulativeSobolGaussianRsg_dimension", _wrap_MoroInvCumulativeSobolGaussianRsg_dimension},
{"QuantLibc::delete_MoroInvCumulativeSobolGaussianRsg", _wrap_delete_MoroInvCumulativeSobolGaussianRsg},
{"QuantLibc::new_InvCumulativeLecuyerGaussianRsg", _wrap_new_InvCumulativeLecuyerGaussianRsg},
{"QuantLibc::InvCumulativeLecuyerGaussianRsg_nextSequence", _wrap_InvCumulativeLecuyerGaussianRsg_nextSequence},
{"QuantLibc::InvCumulativeLecuyerGaussianRsg_dimension", _wrap_InvCumulativeLecuyerGaussianRsg_dimension},
{"QuantLibc::delete_InvCumulativeLecuyerGaussianRsg", _wrap_delete_InvCumulativeLecuyerGaussianRsg},
{"QuantLibc::new_InvCumulativeKnuthGaussianRsg", _wrap_new_InvCumulativeKnuthGaussianRsg},
{"QuantLibc::InvCumulativeKnuthGaussianRsg_nextSequence", _wrap_InvCumulativeKnuthGaussianRsg_nextSequence},
{"QuantLibc::InvCumulativeKnuthGaussianRsg_dimension", _wrap_InvCumulativeKnuthGaussianRsg_dimension},
{"QuantLibc::delete_InvCumulativeKnuthGaussianRsg", _wrap_delete_InvCumulativeKnuthGaussianRsg},
{"QuantLibc::new_InvCumulativeMersenneTwisterGaussianRsg", _wrap_new_InvCumulativeMersenneTwisterGaussianRsg},
{"QuantLibc::InvCumulativeMersenneTwisterGaussianRsg_nextSequence", _wrap_InvCumulativeMersenneTwisterGaussianRsg_nextSequence},
{"QuantLibc::InvCumulativeMersenneTwisterGaussianRsg_dimension", _wrap_InvCumulativeMersenneTwisterGaussianRsg_dimension},
{"QuantLibc::delete_InvCumulativeMersenneTwisterGaussianRsg", _wrap_delete_InvCumulativeMersenneTwisterGaussianRsg},
{"QuantLibc::new_InvCumulativeHaltonGaussianRsg", _wrap_new_InvCumulativeHaltonGaussianRsg},
{"QuantLibc::InvCumulativeHaltonGaussianRsg_nextSequence", _wrap_InvCumulativeHaltonGaussianRsg_nextSequence},
{"QuantLibc::InvCumulativeHaltonGaussianRsg_dimension", _wrap_InvCumulativeHaltonGaussianRsg_dimension},
{"QuantLibc::delete_InvCumulativeHaltonGaussianRsg", _wrap_delete_InvCumulativeHaltonGaussianRsg},
{"QuantLibc::new_InvCumulativeSobolGaussianRsg", _wrap_new_InvCumulativeSobolGaussianRsg},
{"QuantLibc::InvCumulativeSobolGaussianRsg_nextSequence", _wrap_InvCumulativeSobolGaussianRsg_nextSequence},
{"QuantLibc::InvCumulativeSobolGaussianRsg_dimension", _wrap_InvCumulativeSobolGaussianRsg_dimension},
{"QuantLibc::delete_InvCumulativeSobolGaussianRsg", _wrap_delete_InvCumulativeSobolGaussianRsg},
{"QuantLibc::new_GaussianRandomSequenceGenerator", _wrap_new_GaussianRandomSequenceGenerator},
{"QuantLibc::GaussianRandomSequenceGenerator_nextSequence", _wrap_GaussianRandomSequenceGenerator_nextSequence},
{"QuantLibc::GaussianRandomSequenceGenerator_dimension", _wrap_GaussianRandomSequenceGenerator_dimension},
{"QuantLibc::delete_GaussianRandomSequenceGenerator", _wrap_delete_GaussianRandomSequenceGenerator},
{"QuantLibc::new_GaussianLowDiscrepancySequenceGenerator", _wrap_new_GaussianLowDiscrepancySequenceGenerator},
{"QuantLibc::GaussianLowDiscrepancySequenceGenerator_nextSequence", _wrap_GaussianLowDiscrepancySequenceGenerator_nextSequence},
{"QuantLibc::GaussianLowDiscrepancySequenceGenerator_dimension", _wrap_GaussianLowDiscrepancySequenceGenerator_dimension},
{"QuantLibc::delete_GaussianLowDiscrepancySequenceGenerator", _wrap_delete_GaussianLowDiscrepancySequenceGenerator},
{"QuantLibc::getCovariance", _wrap_getCovariance},
{"QuantLibc::Path_length", _wrap_Path_length},
{"QuantLibc::Path_value", _wrap_Path_value},
{"QuantLibc::Path_front", _wrap_Path_front},
{"QuantLibc::Path_back", _wrap_Path_back},
{"QuantLibc::Path_time", _wrap_Path_time},
{"QuantLibc::delete_Path", _wrap_delete_Path},
{"QuantLibc::SamplePath_value", _wrap_SamplePath_value},
{"QuantLibc::SamplePath_weight", _wrap_SamplePath_weight},
{"QuantLibc::delete_SamplePath", _wrap_delete_SamplePath},
{"QuantLibc::new_GaussianPathGenerator", _wrap_new_GaussianPathGenerator},
{"QuantLibc::GaussianPathGenerator_next", _wrap_GaussianPathGenerator_next},
{"QuantLibc::GaussianPathGenerator_antithetic", _wrap_GaussianPathGenerator_antithetic},
{"QuantLibc::delete_GaussianPathGenerator", _wrap_delete_GaussianPathGenerator},
{"QuantLibc::new_GaussianSobolPathGenerator", _wrap_new_GaussianSobolPathGenerator},
{"QuantLibc::GaussianSobolPathGenerator_next", _wrap_GaussianSobolPathGenerator_next},
{"QuantLibc::GaussianSobolPathGenerator_antithetic", _wrap_GaussianSobolPathGenerator_antithetic},
{"QuantLibc::delete_GaussianSobolPathGenerator", _wrap_delete_GaussianSobolPathGenerator},
{"QuantLibc::MultiPath_pathSize", _wrap_MultiPath_pathSize},
{"QuantLibc::MultiPath_assetNumber", _wrap_MultiPath_assetNumber},
{"QuantLibc::MultiPath_at", _wrap_MultiPath_at},
{"QuantLibc::delete_MultiPath", _wrap_delete_MultiPath},
{"QuantLibc::SampleMultiPath_value", _wrap_SampleMultiPath_value},
{"QuantLibc::SampleMultiPath_weight", _wrap_SampleMultiPath_weight},
{"QuantLibc::delete_SampleMultiPath", _wrap_delete_SampleMultiPath},
{"QuantLibc::new_GaussianMultiPathGenerator", _wrap_new_GaussianMultiPathGenerator},
{"QuantLibc::GaussianMultiPathGenerator_next", _wrap_GaussianMultiPathGenerator_next},
{"QuantLibc::GaussianMultiPathGenerator_antithetic", _wrap_GaussianMultiPathGenerator_antithetic},
{"QuantLibc::delete_GaussianMultiPathGenerator", _wrap_delete_GaussianMultiPathGenerator},
{"QuantLibc::new_BrownianBridge", _wrap_new_BrownianBridge},
{"QuantLibc::BrownianBridge_size", _wrap_BrownianBridge_size},
{"QuantLibc::BrownianBridge_times", _wrap_BrownianBridge_times},
{"QuantLibc::BrownianBridge_leftWeight", _wrap_BrownianBridge_leftWeight},
{"QuantLibc::BrownianBridge_rightWeight", _wrap_BrownianBridge_rightWeight},
{"QuantLibc::BrownianBridge_stdDeviation", _wrap_BrownianBridge_stdDeviation},
{"QuantLibc::BrownianBridge_transform", _wrap_BrownianBridge_transform},
{"QuantLibc::BrownianBridge_bridgeIndex", _wrap_BrownianBridge_bridgeIndex},
{"QuantLibc::BrownianBridge_leftIndex", _wrap_BrownianBridge_leftIndex},
{"QuantLibc::BrownianBridge_rightIndex", _wrap_BrownianBridge_rightIndex},
{"QuantLibc::delete_BrownianBridge", _wrap_delete_BrownianBridge},
{"QuantLibc::BoundaryCondition___deref__", _wrap_BoundaryCondition___deref__},
{"QuantLibc::BoundaryCondition_isNull", _wrap_BoundaryCondition_isNull},
{"QuantLibc::new_BoundaryCondition", _wrap_new_BoundaryCondition},
{"QuantLibc::delete_BoundaryCondition", _wrap_delete_BoundaryCondition},
{"QuantLibc::new_NeumannBC", _wrap_new_NeumannBC},
{"QuantLibc::delete_NeumannBC", _wrap_delete_NeumannBC},
{"QuantLibc::new_DirichletBC", _wrap_new_DirichletBC},
{"QuantLibc::delete_DirichletBC", _wrap_delete_DirichletBC},
{"QuantLibc::new_TridiagonalOperator", _wrap_new_TridiagonalOperator},
{"QuantLibc::TridiagonalOperator_solveFor", _wrap_TridiagonalOperator_solveFor},
{"QuantLibc::TridiagonalOperator_applyTo", _wrap_TridiagonalOperator_applyTo},
{"QuantLibc::TridiagonalOperator_size", _wrap_TridiagonalOperator_size},
{"QuantLibc::TridiagonalOperator_setFirstRow", _wrap_TridiagonalOperator_setFirstRow},
{"QuantLibc::TridiagonalOperator_setMidRow", _wrap_TridiagonalOperator_setMidRow},
{"QuantLibc::TridiagonalOperator_setMidRows", _wrap_TridiagonalOperator_setMidRows},
{"QuantLibc::TridiagonalOperator_setLastRow", _wrap_TridiagonalOperator_setLastRow},
{"QuantLibc::TridiagonalOperator_identity", _wrap_TridiagonalOperator_identity},
{"QuantLibc::delete_TridiagonalOperator", _wrap_delete_TridiagonalOperator},
{"QuantLibc::new_DPlus", _wrap_new_DPlus},
{"QuantLibc::delete_DPlus", _wrap_delete_DPlus},
{"QuantLibc::new_DMinus", _wrap_new_DMinus},
{"QuantLibc::delete_DMinus", _wrap_delete_DMinus},
{"QuantLibc::new_DZero", _wrap_new_DZero},
{"QuantLibc::delete_DZero", _wrap_delete_DZero},
{"QuantLibc::new_DPlusDMinus", _wrap_new_DPlusDMinus},
{"QuantLibc::delete_DPlusDMinus", _wrap_delete_DPlusDMinus},
{"QuantLibc::new_Discount", _wrap_new_Discount},
{"QuantLibc::delete_Discount", _wrap_delete_Discount},
{"QuantLibc::new_ZeroYield", _wrap_new_ZeroYield},
{"QuantLibc::delete_ZeroYield", _wrap_delete_ZeroYield},
{"QuantLibc::new_ForwardRate", _wrap_new_ForwardRate},
{"QuantLibc::delete_ForwardRate", _wrap_delete_ForwardRate},
{"QuantLibc::new_PiecewiseFlatForward", _wrap_new_PiecewiseFlatForward},
{"QuantLibc::PiecewiseFlatForward_dates", _wrap_PiecewiseFlatForward_dates},
{"QuantLibc::PiecewiseFlatForward_times", _wrap_PiecewiseFlatForward_times},
{"QuantLibc::PiecewiseFlatForward_nodes", _wrap_PiecewiseFlatForward_nodes},
{"QuantLibc::delete_PiecewiseFlatForward", _wrap_delete_PiecewiseFlatForward},
{"QuantLibc::new_PiecewiseLinearForward", _wrap_new_PiecewiseLinearForward},
{"QuantLibc::PiecewiseLinearForward_dates", _wrap_PiecewiseLinearForward_dates},
{"QuantLibc::PiecewiseLinearForward_times", _wrap_PiecewiseLinearForward_times},
{"QuantLibc::PiecewiseLinearForward_nodes", _wrap_PiecewiseLinearForward_nodes},
{"QuantLibc::delete_PiecewiseLinearForward", _wrap_delete_PiecewiseLinearForward},
{"QuantLibc::new_PiecewiseLinearZero", _wrap_new_PiecewiseLinearZero},
{"QuantLibc::PiecewiseLinearZero_dates", _wrap_PiecewiseLinearZero_dates},
{"QuantLibc::PiecewiseLinearZero_times", _wrap_PiecewiseLinearZero_times},
{"QuantLibc::PiecewiseLinearZero_nodes", _wrap_PiecewiseLinearZero_nodes},
{"QuantLibc::delete_PiecewiseLinearZero", _wrap_delete_PiecewiseLinearZero},
{"QuantLibc::new_PiecewiseCubicZero", _wrap_new_PiecewiseCubicZero},
{"QuantLibc::PiecewiseCubicZero_dates", _wrap_PiecewiseCubicZero_dates},
{"QuantLibc::PiecewiseCubicZero_times", _wrap_PiecewiseCubicZero_times},
{"QuantLibc::PiecewiseCubicZero_nodes", _wrap_PiecewiseCubicZero_nodes},
{"QuantLibc::delete_PiecewiseCubicZero", _wrap_delete_PiecewiseCubicZero},
{"QuantLibc::new_PiecewiseLogCubicDiscount", _wrap_new_PiecewiseLogCubicDiscount},
{"QuantLibc::PiecewiseLogCubicDiscount_dates", _wrap_PiecewiseLogCubicDiscount_dates},
{"QuantLibc::PiecewiseLogCubicDiscount_times", _wrap_PiecewiseLogCubicDiscount_times},
{"QuantLibc::PiecewiseLogCubicDiscount_nodes", _wrap_PiecewiseLogCubicDiscount_nodes},
{"QuantLibc::delete_PiecewiseLogCubicDiscount", _wrap_delete_PiecewiseLogCubicDiscount},
{"QuantLibc::new_SampledCurve", _wrap_new_SampledCurve},
{"QuantLibc::SampledCurve_grid", _wrap_SampledCurve_grid},
{"QuantLibc::SampledCurve_values", _wrap_SampledCurve_values},
{"QuantLibc::SampledCurve_gridValue", _wrap_SampledCurve_gridValue},
{"QuantLibc::SampledCurve_value", _wrap_SampledCurve_value},
{"QuantLibc::SampledCurve_size", _wrap_SampledCurve_size},
{"QuantLibc::SampledCurve_empty", _wrap_SampledCurve_empty},
{"QuantLibc::SampledCurve_setGrid", _wrap_SampledCurve_setGrid},
{"QuantLibc::SampledCurve_setValues", _wrap_SampledCurve_setValues},
{"QuantLibc::SampledCurve_swap", _wrap_SampledCurve_swap},
{"QuantLibc::SampledCurve_setLogGrid", _wrap_SampledCurve_setLogGrid},
{"QuantLibc::SampledCurve_regridLogGrid", _wrap_SampledCurve_regridLogGrid},
{"QuantLibc::SampledCurve_shiftGrid", _wrap_SampledCurve_shiftGrid},
{"QuantLibc::SampledCurve_scaleGrid", _wrap_SampledCurve_scaleGrid},
{"QuantLibc::SampledCurve_regrid", _wrap_SampledCurve_regrid},
{"QuantLibc::delete_SampledCurve", _wrap_delete_SampledCurve},
{"QuantLibc::Settings_instance", _wrap_Settings_instance},
{"QuantLibc::Settings_getEvaluationDate", _wrap_Settings_getEvaluationDate},
{"QuantLibc::Settings_setEvaluationDate", _wrap_Settings_setEvaluationDate},
{"QuantLibc::Settings_includeReferenceDateEvents", _wrap_Settings_includeReferenceDateEvents},
{"QuantLibc::Settings_includeTodaysCashFlows", _wrap_Settings_includeTodaysCashFlows},
{"QuantLibc::delete_Settings", _wrap_delete_Settings},
{"QuantLibc::Statistics_samples", _wrap_Statistics_samples},
{"QuantLibc::Statistics_weightSum", _wrap_Statistics_weightSum},
{"QuantLibc::Statistics_mean", _wrap_Statistics_mean},
{"QuantLibc::Statistics_variance", _wrap_Statistics_variance},
{"QuantLibc::Statistics_standardDeviation", _wrap_Statistics_standardDeviation},
{"QuantLibc::Statistics_errorEstimate", _wrap_Statistics_errorEstimate},
{"QuantLibc::Statistics_skewness", _wrap_Statistics_skewness},
{"QuantLibc::Statistics_kurtosis", _wrap_Statistics_kurtosis},
{"QuantLibc::Statistics_min", _wrap_Statistics_min},
{"QuantLibc::Statistics_max", _wrap_Statistics_max},
{"QuantLibc::Statistics_reset", _wrap_Statistics_reset},
{"QuantLibc::Statistics_add", _wrap_Statistics_add},
{"QuantLibc::new_Statistics", _wrap_new_Statistics},
{"QuantLibc::delete_Statistics", _wrap_delete_Statistics},
{"QuantLibc::IncrementalStatistics_samples", _wrap_IncrementalStatistics_samples},
{"QuantLibc::IncrementalStatistics_weightSum", _wrap_IncrementalStatistics_weightSum},
{"QuantLibc::IncrementalStatistics_mean", _wrap_IncrementalStatistics_mean},
{"QuantLibc::IncrementalStatistics_variance", _wrap_IncrementalStatistics_variance},
{"QuantLibc::IncrementalStatistics_standardDeviation", _wrap_IncrementalStatistics_standardDeviation},
{"QuantLibc::IncrementalStatistics_errorEstimate", _wrap_IncrementalStatistics_errorEstimate},
{"QuantLibc::IncrementalStatistics_skewness", _wrap_IncrementalStatistics_skewness},
{"QuantLibc::IncrementalStatistics_kurtosis", _wrap_IncrementalStatistics_kurtosis},
{"QuantLibc::IncrementalStatistics_min", _wrap_IncrementalStatistics_min},
{"QuantLibc::IncrementalStatistics_max", _wrap_IncrementalStatistics_max},
{"QuantLibc::IncrementalStatistics_reset", _wrap_IncrementalStatistics_reset},
{"QuantLibc::IncrementalStatistics_add", _wrap_IncrementalStatistics_add},
{"QuantLibc::new_IncrementalStatistics", _wrap_new_IncrementalStatistics},
{"QuantLibc::delete_IncrementalStatistics", _wrap_delete_IncrementalStatistics},
{"QuantLibc::RiskStatistics_semiVariance", _wrap_RiskStatistics_semiVariance},
{"QuantLibc::RiskStatistics_semiDeviation", _wrap_RiskStatistics_semiDeviation},
{"QuantLibc::RiskStatistics_downsideVariance", _wrap_RiskStatistics_downsideVariance},
{"QuantLibc::RiskStatistics_downsideDeviation", _wrap_RiskStatistics_downsideDeviation},
{"QuantLibc::RiskStatistics_regret", _wrap_RiskStatistics_regret},
{"QuantLibc::RiskStatistics_potentialUpside", _wrap_RiskStatistics_potentialUpside},
{"QuantLibc::RiskStatistics_valueAtRisk", _wrap_RiskStatistics_valueAtRisk},
{"QuantLibc::RiskStatistics_expectedShortfall", _wrap_RiskStatistics_expectedShortfall},
{"QuantLibc::RiskStatistics_shortfall", _wrap_RiskStatistics_shortfall},
{"QuantLibc::RiskStatistics_averageShortfall", _wrap_RiskStatistics_averageShortfall},
{"QuantLibc::new_RiskStatistics", _wrap_new_RiskStatistics},
{"QuantLibc::delete_RiskStatistics", _wrap_delete_RiskStatistics},
{"QuantLibc::new_MultipleStatistics", _wrap_new_MultipleStatistics},
{"QuantLibc::MultipleStatistics_size", _wrap_MultipleStatistics_size},
{"QuantLibc::MultipleStatistics_samples", _wrap_MultipleStatistics_samples},
{"QuantLibc::MultipleStatistics_weightSum", _wrap_MultipleStatistics_weightSum},
{"QuantLibc::MultipleStatistics_mean", _wrap_MultipleStatistics_mean},
{"QuantLibc::MultipleStatistics_variance", _wrap_MultipleStatistics_variance},
{"QuantLibc::MultipleStatistics_standardDeviation", _wrap_MultipleStatistics_standardDeviation},
{"QuantLibc::MultipleStatistics_errorEstimate", _wrap_MultipleStatistics_errorEstimate},
{"QuantLibc::MultipleStatistics_skewness", _wrap_MultipleStatistics_skewness},
{"QuantLibc::MultipleStatistics_kurtosis", _wrap_MultipleStatistics_kurtosis},
{"QuantLibc::MultipleStatistics_min", _wrap_MultipleStatistics_min},
{"QuantLibc::MultipleStatistics_max", _wrap_MultipleStatistics_max},
{"QuantLibc::MultipleStatistics_covariance", _wrap_MultipleStatistics_covariance},
{"QuantLibc::MultipleStatistics_correlation", _wrap_MultipleStatistics_correlation},
{"QuantLibc::MultipleStatistics_reset", _wrap_MultipleStatistics_reset},
{"QuantLibc::MultipleStatistics_add", _wrap_MultipleStatistics_add},
{"QuantLibc::delete_MultipleStatistics", _wrap_delete_MultipleStatistics},
{"QuantLibc::new_SequenceStatistics", _wrap_new_SequenceStatistics},
{"QuantLibc::SequenceStatistics_size", _wrap_SequenceStatistics_size},
{"QuantLibc::SequenceStatistics_samples", _wrap_SequenceStatistics_samples},
{"QuantLibc::SequenceStatistics_weightSum", _wrap_SequenceStatistics_weightSum},
{"QuantLibc::SequenceStatistics_mean", _wrap_SequenceStatistics_mean},
{"QuantLibc::SequenceStatistics_variance", _wrap_SequenceStatistics_variance},
{"QuantLibc::SequenceStatistics_standardDeviation", _wrap_SequenceStatistics_standardDeviation},
{"QuantLibc::SequenceStatistics_errorEstimate", _wrap_SequenceStatistics_errorEstimate},
{"QuantLibc::SequenceStatistics_skewness", _wrap_SequenceStatistics_skewness},
{"QuantLibc::SequenceStatistics_kurtosis", _wrap_SequenceStatistics_kurtosis},
{"QuantLibc::SequenceStatistics_min", _wrap_SequenceStatistics_min},
{"QuantLibc::SequenceStatistics_max", _wrap_SequenceStatistics_max},
{"QuantLibc::SequenceStatistics_covariance", _wrap_SequenceStatistics_covariance},
{"QuantLibc::SequenceStatistics_correlation", _wrap_SequenceStatistics_correlation},
{"QuantLibc::SequenceStatistics_reset", _wrap_SequenceStatistics_reset},
{"QuantLibc::SequenceStatistics_add", _wrap_SequenceStatistics_add},
{"QuantLibc::delete_SequenceStatistics", _wrap_delete_SequenceStatistics},
{"QuantLibc::new_MultipleIncrementalStatistics", _wrap_new_MultipleIncrementalStatistics},
{"QuantLibc::MultipleIncrementalStatistics_size", _wrap_MultipleIncrementalStatistics_size},
{"QuantLibc::MultipleIncrementalStatistics_samples", _wrap_MultipleIncrementalStatistics_samples},
{"QuantLibc::MultipleIncrementalStatistics_weightSum", _wrap_MultipleIncrementalStatistics_weightSum},
{"QuantLibc::MultipleIncrementalStatistics_mean", _wrap_MultipleIncrementalStatistics_mean},
{"QuantLibc::MultipleIncrementalStatistics_variance", _wrap_MultipleIncrementalStatistics_variance},
{"QuantLibc::MultipleIncrementalStatistics_standardDeviation", _wrap_MultipleIncrementalStatistics_standardDeviation},
{"QuantLibc::MultipleIncrementalStatistics_errorEstimate", _wrap_MultipleIncrementalStatistics_errorEstimate},
{"QuantLibc::MultipleIncrementalStatistics_skewness", _wrap_MultipleIncrementalStatistics_skewness},
{"QuantLibc::MultipleIncrementalStatistics_kurtosis", _wrap_MultipleIncrementalStatistics_kurtosis},
{"QuantLibc::MultipleIncrementalStatistics_min", _wrap_MultipleIncrementalStatistics_min},
{"QuantLibc::MultipleIncrementalStatistics_max", _wrap_MultipleIncrementalStatistics_max},
{"QuantLibc::MultipleIncrementalStatistics_covariance", _wrap_MultipleIncrementalStatistics_covariance},
{"QuantLibc::MultipleIncrementalStatistics_correlation", _wrap_MultipleIncrementalStatistics_correlation},
{"QuantLibc::MultipleIncrementalStatistics_reset", _wrap_MultipleIncrementalStatistics_reset},
{"QuantLibc::MultipleIncrementalStatistics_add", _wrap_MultipleIncrementalStatistics_add},
{"QuantLibc::delete_MultipleIncrementalStatistics", _wrap_delete_MultipleIncrementalStatistics},
{"QuantLibc::CapFloorTermVolatilityStructure___deref__", _wrap_CapFloorTermVolatilityStructure___deref__},
{"QuantLibc::CapFloorTermVolatilityStructure_isNull", _wrap_CapFloorTermVolatilityStructure_isNull},
{"QuantLibc::CapFloorTermVolatilityStructure_asObservable", _wrap_CapFloorTermVolatilityStructure_asObservable},
{"QuantLibc::new_CapFloorTermVolatilityStructure", _wrap_new_CapFloorTermVolatilityStructure},
{"QuantLibc::delete_CapFloorTermVolatilityStructure", _wrap_delete_CapFloorTermVolatilityStructure},
{"QuantLibc::CapFloorTermVolatilityStructure_volatility", _wrap_CapFloorTermVolatilityStructure_volatility},
{"QuantLibc::CapFloorTermVolatilityStructure_enableExtrapolation", _wrap_CapFloorTermVolatilityStructure_enableExtrapolation},
{"QuantLibc::CapFloorTermVolatilityStructure_disableExtrapolation", _wrap_CapFloorTermVolatilityStructure_disableExtrapolation},
{"QuantLibc::CapFloorTermVolatilityStructure_allowsExtrapolation", _wrap_CapFloorTermVolatilityStructure_allowsExtrapolation},
{"QuantLibc::new_CapFloorTermVolatilityStructureHandle", _wrap_new_CapFloorTermVolatilityStructureHandle},
{"QuantLibc::CapFloorTermVolatilityStructureHandle___deref__", _wrap_CapFloorTermVolatilityStructureHandle___deref__},
{"QuantLibc::CapFloorTermVolatilityStructureHandle_empty", _wrap_CapFloorTermVolatilityStructureHandle_empty},
{"QuantLibc::CapFloorTermVolatilityStructureHandle_asObservable", _wrap_CapFloorTermVolatilityStructureHandle_asObservable},
{"QuantLibc::delete_CapFloorTermVolatilityStructureHandle", _wrap_delete_CapFloorTermVolatilityStructureHandle},
{"QuantLibc::CapFloorTermVolatilityStructureHandle_volatility", _wrap_CapFloorTermVolatilityStructureHandle_volatility},
{"QuantLibc::CapFloorTermVolatilityStructureHandle_enableExtrapolation", _wrap_CapFloorTermVolatilityStructureHandle_enableExtrapolation},
{"QuantLibc::CapFloorTermVolatilityStructureHandle_disableExtrapolation", _wrap_CapFloorTermVolatilityStructureHandle_disableExtrapolation},
{"QuantLibc::CapFloorTermVolatilityStructureHandle_allowsExtrapolation", _wrap_CapFloorTermVolatilityStructureHandle_allowsExtrapolation},
{"QuantLibc::new_RelinkableCapFloorTermVolatilityStructureHandle", _wrap_new_RelinkableCapFloorTermVolatilityStructureHandle},
{"QuantLibc::RelinkableCapFloorTermVolatilityStructureHandle_linkTo", _wrap_RelinkableCapFloorTermVolatilityStructureHandle_linkTo},
{"QuantLibc::delete_RelinkableCapFloorTermVolatilityStructureHandle", _wrap_delete_RelinkableCapFloorTermVolatilityStructureHandle},
{"QuantLibc::new_CapFloorTermVolCurve", _wrap_new_CapFloorTermVolCurve},
{"QuantLibc::delete_CapFloorTermVolCurve", _wrap_delete_CapFloorTermVolCurve},
{"QuantLibc::new_CapFloorTermVolSurface", _wrap_new_CapFloorTermVolSurface},
{"QuantLibc::delete_CapFloorTermVolSurface", _wrap_delete_CapFloorTermVolSurface},
{"QuantLibc::StrippedOptionletBase___deref__", _wrap_StrippedOptionletBase___deref__},
{"QuantLibc::StrippedOptionletBase_isNull", _wrap_StrippedOptionletBase_isNull},
{"QuantLibc::new_StrippedOptionletBase", _wrap_new_StrippedOptionletBase},
{"QuantLibc::delete_StrippedOptionletBase", _wrap_delete_StrippedOptionletBase},
{"QuantLibc::StrippedOptionletBase_optionletStrikes", _wrap_StrippedOptionletBase_optionletStrikes},
{"QuantLibc::StrippedOptionletBase_optionletVolatilities", _wrap_StrippedOptionletBase_optionletVolatilities},
{"QuantLibc::StrippedOptionletBase_optionletFixingDates", _wrap_StrippedOptionletBase_optionletFixingDates},
{"QuantLibc::StrippedOptionletBase_optionletFixingTimes", _wrap_StrippedOptionletBase_optionletFixingTimes},
{"QuantLibc::StrippedOptionletBase_optionletMaturities", _wrap_StrippedOptionletBase_optionletMaturities},
{"QuantLibc::StrippedOptionletBase_atmOptionletRates", _wrap_StrippedOptionletBase_atmOptionletRates},
{"QuantLibc::StrippedOptionletBase_dayCounter", _wrap_StrippedOptionletBase_dayCounter},
{"QuantLibc::StrippedOptionletBase_calendar", _wrap_StrippedOptionletBase_calendar},
{"QuantLibc::StrippedOptionletBase_settlementDays", _wrap_StrippedOptionletBase_settlementDays},
{"QuantLibc::StrippedOptionletBase_businessDayConvention", _wrap_StrippedOptionletBase_businessDayConvention},
{"QuantLibc::new_OptionletStripper1", _wrap_new_OptionletStripper1},
{"QuantLibc::OptionletStripper1_capFloorPrices", _wrap_OptionletStripper1_capFloorPrices},
{"QuantLibc::OptionletStripper1_capFloorVolatilities", _wrap_OptionletStripper1_capFloorVolatilities},
{"QuantLibc::OptionletStripper1_optionletPrices", _wrap_OptionletStripper1_optionletPrices},
{"QuantLibc::OptionletStripper1_switchStrike", _wrap_OptionletStripper1_switchStrike},
{"QuantLibc::delete_OptionletStripper1", _wrap_delete_OptionletStripper1},
{"QuantLibc::new_StrippedOptionletAdapter", _wrap_new_StrippedOptionletAdapter},
{"QuantLibc::delete_StrippedOptionletAdapter", _wrap_delete_StrippedOptionletAdapter},
{"QuantLibc::new_Settlement", _wrap_new_Settlement},
{"QuantLibc::delete_Settlement", _wrap_delete_Settlement},
{"QuantLibc::new_Swaption", _wrap_new_Swaption},
{"QuantLibc::delete_Swaption", _wrap_delete_Swaption},
{"QuantLibc::new_NonstandardSwaption", _wrap_new_NonstandardSwaption},
{"QuantLibc::NonstandardSwaption_calibrationBasket", _wrap_NonstandardSwaption_calibrationBasket},
{"QuantLibc::delete_NonstandardSwaption", _wrap_delete_NonstandardSwaption},
{"QuantLibc::new_FloatFloatSwaption", _wrap_new_FloatFloatSwaption},
{"QuantLibc::FloatFloatSwaption_calibrationBasket", _wrap_FloatFloatSwaption_calibrationBasket},
{"QuantLibc::FloatFloatSwaption_underlyingValue", _wrap_FloatFloatSwaption_underlyingValue},
{"QuantLibc::delete_FloatFloatSwaption", _wrap_delete_FloatFloatSwaption},
{"QuantLibc::new_BlackSwaptionEngine", _wrap_new_BlackSwaptionEngine},
{"QuantLibc::BlackSwaptionEngine_vega", _wrap_BlackSwaptionEngine_vega},
{"QuantLibc::delete_BlackSwaptionEngine", _wrap_delete_BlackSwaptionEngine},
{"QuantLibc::new_BachelierSwaptionEngine", _wrap_new_BachelierSwaptionEngine},
{"QuantLibc::delete_BachelierSwaptionEngine", _wrap_delete_BachelierSwaptionEngine},
{"QuantLibc::enableTracing", _wrap_enableTracing},
{"QuantLibc::disableTracing", _wrap_disableTracing},
{"QuantLibc::new_ConstantEstimator", _wrap_new_ConstantEstimator},
{"QuantLibc::ConstantEstimator_calculate", _wrap_ConstantEstimator_calculate},
{"QuantLibc::delete_ConstantEstimator", _wrap_delete_ConstantEstimator},
{"QuantLibc::new_ParkinsonSigma", _wrap_new_ParkinsonSigma},
{"QuantLibc::ParkinsonSigma_calculate", _wrap_ParkinsonSigma_calculate},
{"QuantLibc::delete_ParkinsonSigma", _wrap_delete_ParkinsonSigma},
{"QuantLibc::new_GarmanKlassSigma1", _wrap_new_GarmanKlassSigma1},
{"QuantLibc::GarmanKlassSigma1_calculate", _wrap_GarmanKlassSigma1_calculate},
{"QuantLibc::delete_GarmanKlassSigma1", _wrap_delete_GarmanKlassSigma1},
{"QuantLibc::new_GarmanKlassSigma3", _wrap_new_GarmanKlassSigma3},
{"QuantLibc::GarmanKlassSigma3_calculate", _wrap_GarmanKlassSigma3_calculate},
{"QuantLibc::delete_GarmanKlassSigma3", _wrap_delete_GarmanKlassSigma3},
{"QuantLibc::new_GarmanKlassSigma4", _wrap_new_GarmanKlassSigma4},
{"QuantLibc::GarmanKlassSigma4_calculate", _wrap_GarmanKlassSigma4_calculate},
{"QuantLibc::delete_GarmanKlassSigma4", _wrap_delete_GarmanKlassSigma4},
{"QuantLibc::new_GarmanKlassSigma5", _wrap_new_GarmanKlassSigma5},
{"QuantLibc::GarmanKlassSigma5_calculate", _wrap_GarmanKlassSigma5_calculate},
{"QuantLibc::delete_GarmanKlassSigma5", _wrap_delete_GarmanKlassSigma5},
{"QuantLibc::new_GarmanKlassSigma6", _wrap_new_GarmanKlassSigma6},
{"QuantLibc::GarmanKlassSigma6_calculate", _wrap_GarmanKlassSigma6_calculate},
{"QuantLibc::delete_GarmanKlassSigma6", _wrap_delete_GarmanKlassSigma6},
{"QuantLibc::new_ZeroCurve", _wrap_new_ZeroCurve},
{"QuantLibc::ZeroCurve_times", _wrap_ZeroCurve_times},
{"QuantLibc::ZeroCurve_data", _wrap_ZeroCurve_data},
{"QuantLibc::ZeroCurve_dates", _wrap_ZeroCurve_dates},
{"QuantLibc::ZeroCurve_zeroRates", _wrap_ZeroCurve_zeroRates},
{"QuantLibc::ZeroCurve_nodes", _wrap_ZeroCurve_nodes},
{"QuantLibc::delete_ZeroCurve", _wrap_delete_ZeroCurve},
{"QuantLibc::new_LogLinearZeroCurve", _wrap_new_LogLinearZeroCurve},
{"QuantLibc::LogLinearZeroCurve_times", _wrap_LogLinearZeroCurve_times},
{"QuantLibc::LogLinearZeroCurve_data", _wrap_LogLinearZeroCurve_data},
{"QuantLibc::LogLinearZeroCurve_dates", _wrap_LogLinearZeroCurve_dates},
{"QuantLibc::LogLinearZeroCurve_zeroRates", _wrap_LogLinearZeroCurve_zeroRates},
{"QuantLibc::LogLinearZeroCurve_nodes", _wrap_LogLinearZeroCurve_nodes},
{"QuantLibc::delete_LogLinearZeroCurve", _wrap_delete_LogLinearZeroCurve},
{"QuantLibc::new_CubicZeroCurve", _wrap_new_CubicZeroCurve},
{"QuantLibc::CubicZeroCurve_times", _wrap_CubicZeroCurve_times},
{"QuantLibc::CubicZeroCurve_data", _wrap_CubicZeroCurve_data},
{"QuantLibc::CubicZeroCurve_dates", _wrap_CubicZeroCurve_dates},
{"QuantLibc::CubicZeroCurve_zeroRates", _wrap_CubicZeroCurve_zeroRates},
{"QuantLibc::CubicZeroCurve_nodes", _wrap_CubicZeroCurve_nodes},
{"QuantLibc::delete_CubicZeroCurve", _wrap_delete_CubicZeroCurve},
{"QuantLibc::new_LogCubicZeroCurve", _wrap_new_LogCubicZeroCurve},
{"QuantLibc::LogCubicZeroCurve_times", _wrap_LogCubicZeroCurve_times},
{"QuantLibc::LogCubicZeroCurve_data", _wrap_LogCubicZeroCurve_data},
{"QuantLibc::LogCubicZeroCurve_dates", _wrap_LogCubicZeroCurve_dates},
{"QuantLibc::LogCubicZeroCurve_zeroRates", _wrap_LogCubicZeroCurve_zeroRates},
{"QuantLibc::LogCubicZeroCurve_nodes", _wrap_LogCubicZeroCurve_nodes},
{"QuantLibc::delete_LogCubicZeroCurve", _wrap_delete_LogCubicZeroCurve},
{"QuantLibc::new_ForwardFlatZeroCurve", _wrap_new_ForwardFlatZeroCurve},
{"QuantLibc::ForwardFlatZeroCurve_times", _wrap_ForwardFlatZeroCurve_times},
{"QuantLibc::ForwardFlatZeroCurve_data", _wrap_ForwardFlatZeroCurve_data},
{"QuantLibc::ForwardFlatZeroCurve_dates", _wrap_ForwardFlatZeroCurve_dates},
{"QuantLibc::ForwardFlatZeroCurve_zeroRates", _wrap_ForwardFlatZeroCurve_zeroRates},
{"QuantLibc::ForwardFlatZeroCurve_nodes", _wrap_ForwardFlatZeroCurve_nodes},
{"QuantLibc::delete_ForwardFlatZeroCurve", _wrap_delete_ForwardFlatZeroCurve},
{"QuantLibc::new_BackwardFlatZeroCurve", _wrap_new_BackwardFlatZeroCurve},
{"QuantLibc::BackwardFlatZeroCurve_times", _wrap_BackwardFlatZeroCurve_times},
{"QuantLibc::BackwardFlatZeroCurve_data", _wrap_BackwardFlatZeroCurve_data},
{"QuantLibc::BackwardFlatZeroCurve_dates", _wrap_BackwardFlatZeroCurve_dates},
{"QuantLibc::BackwardFlatZeroCurve_zeroRates", _wrap_BackwardFlatZeroCurve_zeroRates},
{"QuantLibc::BackwardFlatZeroCurve_nodes", _wrap_BackwardFlatZeroCurve_nodes},
{"QuantLibc::delete_BackwardFlatZeroCurve", _wrap_delete_BackwardFlatZeroCurve},
{"QuantLibc::new_MonotonicCubicZeroCurve", _wrap_new_MonotonicCubicZeroCurve},
{"QuantLibc::MonotonicCubicZeroCurve_times", _wrap_MonotonicCubicZeroCurve_times},
{"QuantLibc::MonotonicCubicZeroCurve_data", _wrap_MonotonicCubicZeroCurve_data},
{"QuantLibc::MonotonicCubicZeroCurve_dates", _wrap_MonotonicCubicZeroCurve_dates},
{"QuantLibc::MonotonicCubicZeroCurve_zeroRates", _wrap_MonotonicCubicZeroCurve_zeroRates},
{"QuantLibc::MonotonicCubicZeroCurve_nodes", _wrap_MonotonicCubicZeroCurve_nodes},
{"QuantLibc::delete_MonotonicCubicZeroCurve", _wrap_delete_MonotonicCubicZeroCurve},
{"QuantLibc::as_zerocurve", _wrap_as_zerocurve},
{"QuantLibc::Forward_forwardValue", _wrap_Forward_forwardValue},
{"QuantLibc::Forward_impliedYield", _wrap_Forward_impliedYield},
{"QuantLibc::new_Forward", _wrap_new_Forward},
{"QuantLibc::delete_Forward", _wrap_delete_Forward},
{"QuantLibc::new_FixedRateBondForward", _wrap_new_FixedRateBondForward},
{"QuantLibc::FixedRateBondForward_forwardPrice", _wrap_FixedRateBondForward_forwardPrice},
{"QuantLibc::FixedRateBondForward_cleanForwardPrice", _wrap_FixedRateBondForward_cleanForwardPrice},
{"QuantLibc::FixedRateBondForward_spotIncome", _wrap_FixedRateBondForward_spotIncome},
{"QuantLibc::FixedRateBondForward_spotValue", _wrap_FixedRateBondForward_spotValue},
{"QuantLibc::delete_FixedRateBondForward", _wrap_delete_FixedRateBondForward},
{0,0}
};
/* -----------------------------------------------------------------------------
 * Type initialization:
 * This problem is 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 linked list. 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. So to actually build the cast linked list,
 * we find the array of casts associated with the type, and loop through it
 * adding the casts to the list. The one last 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 linked list (because the cast->type) pointer will
 *     be correct.
 * ----------------------------------------------------------------------------- */

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

#if 0
#define SWIGRUNTIME_DEBUG
#endif


SWIGRUNTIME void
SWIG_InitializeModule(void *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 %d\n", swig_module.size);
#endif
  for (i = 0; i < swig_module.size; ++i) {
    swig_type_info *type = 0;
    swig_type_info *ret;
    swig_cast_info *cast;
    
#ifdef SWIGRUNTIME_DEBUG
    printf("SWIG_InitializeModule: type %d %s\n", 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 = swig_module.cast_initial[i];
    while (cast->type) {
      /* Don't need to add information already in the list */
      ret = 0;
#ifdef SWIGRUNTIME_DEBUG
      printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
#endif
      if (swig_module.next != &swig_module) {
        ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
#ifdef SWIGRUNTIME_DEBUG
        if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
#endif
      }
      if (ret) {
        if (type == swig_module.type_initial[i]) {
#ifdef SWIGRUNTIME_DEBUG
          printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
#endif
          cast->type = ret;
          ret = 0;
        } else {
          /* Check for casting already in the list */
          swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
#ifdef SWIGRUNTIME_DEBUG
          if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
#endif
          if (!ocast) ret = 0;
        }
      }
      
      if (!ret) {
#ifdef SWIGRUNTIME_DEBUG
        printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
#endif
        if (type->cast) {
          type->cast->prev = cast;
          cast->next = type->cast;
        }
        type->cast = 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 %d %s\n", 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;
  swig_cast_info *equiv;
  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) {
      equiv = swig_module.types[i]->cast;
      while (equiv) {
        if (!equiv->converter) {
          if (equiv->type && !equiv->type->clientdata)
          SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
        }
        equiv = equiv->next;
      }
    }
  }
}

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



#if defined(__cplusplus) && ! defined(XSPROTO)
extern "C"
#endif

XS(SWIG_init) {
  dXSARGS;
  int i;
  (void)items;
  
  SWIG_InitializeModule(0);
  
  /* Install commands */
  for (i = 0; swig_commands[i].name; i++) {
    /* Casts only needed for Perl < 5.10. */
#ifdef __cplusplus
    newXS(const_cast<char*>(swig_commands[i].name), swig_commands[i].wrapper, const_cast<char*>(__FILE__));
#else
    newXS((char*)swig_commands[i].name, swig_commands[i].wrapper, (char*)__FILE__);
#endif
  }
  
  /* Install variables */
  for (i = 0; swig_variables[i].name; i++) {
    SV *sv;
    sv = get_sv(swig_variables[i].name, TRUE | 0x2 | GV_ADDMULTI);
    if (swig_variables[i].type) {
      SWIG_MakePtr(sv,(void *)1, *swig_variables[i].type,0);
    } else {
      sv_setiv(sv,(IV) 0);
    }
    swig_create_magic(sv, swig_variables[i].name, swig_variables[i].set, swig_variables[i].get); 
  }
  
  /* Install constant */
  for (i = 0; swig_constants[i].type; i++) {
    SV *sv;
    sv = get_sv(swig_constants[i].name, TRUE | 0x2 | GV_ADDMULTI);
    switch(swig_constants[i].type) {
    case SWIG_INT:
      sv_setiv(sv, (IV) swig_constants[i].lvalue);
      break;
    case SWIG_FLOAT:
      sv_setnv(sv, (double) swig_constants[i].dvalue);
      break;
    case SWIG_STRING:
      sv_setpv(sv, (const char *) swig_constants[i].pvalue);
      break;
    case SWIG_POINTER:
      SWIG_MakePtr(sv, swig_constants[i].pvalue, *(swig_constants[i].ptype),0);
      break;
    case SWIG_BINARY:
      SWIG_MakePackedObj(sv, swig_constants[i].pvalue, swig_constants[i].lvalue, *(swig_constants[i].ptype));
      break;
    default:
      break;
    }
    SvREADONLY_on(sv);
  }
  
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Sunday", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Sunday)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Monday", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Monday)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Tuesday", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Tuesday)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Wednesday", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Wednesday)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Thursday", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Thursday)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Friday", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Friday)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Saturday", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Saturday)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "January", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(January)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "February", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(February)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "March", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(March)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "April", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(April)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "May", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(May)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "June", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(June)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "July", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(July)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "August", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(August)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "September", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(September)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "October", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(October)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "November", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(November)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "December", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(December)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Days", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Days)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Weeks", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Weeks)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Months", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Months)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Years", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Years)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Hours", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Hours)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Minutes", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Minutes)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Seconds", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Seconds)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Milliseconds", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Milliseconds)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Microseconds", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Microseconds)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "NoFrequency", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(NoFrequency)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Once", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Once)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Annual", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Annual)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Semiannual", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Semiannual)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "EveryFourthMonth", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(EveryFourthMonth)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Quarterly", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Quarterly)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Bimonthly", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Bimonthly)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Monthly", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Monthly)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "EveryFourthWeek", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(EveryFourthWeek)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Biweekly", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Biweekly)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Weekly", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Weekly)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Daily", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Daily)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "OtherFrequency", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(OtherFrequency)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  SWIG_TypeClientData(SWIGTYPE_p_Period, (void*) "QuantLib::Period");
  SWIG_TypeClientData(SWIGTYPE_p_std__vectorT_Period_t, (void*) "QuantLib::PeriodVector");
  SWIG_TypeClientData(SWIGTYPE_p_Date, (void*) "QuantLib::Date");
  SWIG_TypeClientData(SWIGTYPE_p_DateParser, (void*) "QuantLib::DateParser");
  SWIG_TypeClientData(SWIGTYPE_p_PeriodParser, (void*) "QuantLib::PeriodParser");
  SWIG_TypeClientData(SWIGTYPE_p_std__vectorT_Date_t, (void*) "QuantLib::DateVector");
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "IMM_F", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(IMM::F)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "IMM_G", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(IMM::G)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "IMM_H", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(IMM::H)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "IMM_J", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(IMM::J)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "IMM_K", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(IMM::K)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "IMM_M", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(IMM::M)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "IMM_N", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(IMM::N)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "IMM_Q", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(IMM::Q)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "IMM_U", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(IMM::U)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "IMM_V", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(IMM::V)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "IMM_X", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(IMM::X)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "IMM_Z", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(IMM::Z)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  SWIG_TypeClientData(SWIGTYPE_p_IMM, (void*) "QuantLib::IMM");
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "ASX_F", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(ASX::F)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "ASX_G", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(ASX::G)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "ASX_H", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(ASX::H)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "ASX_J", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(ASX::J)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "ASX_K", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(ASX::K)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "ASX_M", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(ASX::M)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "ASX_N", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(ASX::N)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "ASX_Q", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(ASX::Q)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "ASX_U", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(ASX::U)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "ASX_V", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(ASX::V)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "ASX_X", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(ASX::X)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "ASX_Z", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(ASX::Z)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  SWIG_TypeClientData(SWIGTYPE_p_ASX, (void*) "QuantLib::ASX");
  SWIG_TypeClientData(SWIGTYPE_p_std__vectorT_int_t, (void*) "QuantLib::IntVector");
  SWIG_TypeClientData(SWIGTYPE_p_std__vectorT_unsigned_int_t, (void*) "QuantLib::UnsignedIntVector");
  SWIG_TypeClientData(SWIGTYPE_p_std__vectorT_double_t, (void*) "QuantLib::DoubleVector");
  SWIG_TypeClientData(SWIGTYPE_p_std__vectorT_std__string_t, (void*) "QuantLib::StrVector");
  SWIG_TypeClientData(SWIGTYPE_p_std__vectorT_bool_t, (void*) "QuantLib::BoolVector");
  SWIG_TypeClientData(SWIGTYPE_p_std__pairT_Date_double_t, (void*) "QuantLib::NodePair");
  SWIG_TypeClientData(SWIGTYPE_p_std__vectorT_std__pairT_Date_double_t_t, (void*) "QuantLib::NodeVector");
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Exercise_American", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Exercise::American)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Exercise_Bermudan", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Exercise::Bermudan)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Exercise_European", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Exercise::European)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  SWIG_TypeClientData(SWIGTYPE_p_boost__shared_ptrT_Exercise_t, (void*) "QuantLib::Exercise");
  SWIG_TypeClientData(SWIGTYPE_p_EuropeanExercisePtr, (void*) "QuantLib::EuropeanExercise");
  SWIG_TypeClientData(SWIGTYPE_p_AmericanExercisePtr, (void*) "QuantLib::AmericanExercise");
  SWIG_TypeClientData(SWIGTYPE_p_BermudanExercisePtr, (void*) "QuantLib::BermudanExercise");
  SWIG_TypeClientData(SWIGTYPE_p_RebatedExercisePtr, (void*) "QuantLib::RebatedExercise");
  SWIG_TypeClientData(SWIGTYPE_p_boost__shared_ptrT_Observable_t, (void*) "QuantLib::Observable");
  SWIG_TypeClientData(SWIGTYPE_p_Array, (void*) "QuantLib::Array");
  SWIG_TypeClientData(SWIGTYPE_p_DefaultLexicographicalView, (void*) "QuantLib::LexicographicalView");
  SWIG_TypeClientData(SWIGTYPE_p_Matrix, (void*) "QuantLib::Matrix");
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "SalvagingAlgorithm_None", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(SalvagingAlgorithm::None)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "SalvagingAlgorithm_Spectral", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(SalvagingAlgorithm::Spectral)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  SWIG_TypeClientData(SWIGTYPE_p_SalvagingAlgorithm, (void*) "QuantLib::SalvagingAlgorithm");
  SWIG_TypeClientData(SWIGTYPE_p_SVD, (void*) "QuantLib::SVD");
  SWIG_TypeClientData(SWIGTYPE_p_boost__shared_ptrT_Quote_t, (void*) "QuantLib::Quote");
  SWIG_TypeClientData(SWIGTYPE_p_HandleT_Quote_t, (void*) "QuantLib::QuoteHandle");
  SWIG_TypeClientData(SWIGTYPE_p_RelinkableHandleT_Quote_t, (void*) "QuantLib::RelinkableQuoteHandle");
  SWIG_TypeClientData(SWIGTYPE_p_SimpleQuotePtr, (void*) "QuantLib::SimpleQuote");
  SWIG_TypeClientData(SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Quote_t_t, (void*) "QuantLib::QuoteVector");
  SWIG_TypeClientData(SWIGTYPE_p_std__vectorT_std__vectorT_boost__shared_ptrT_Quote_t_t_t, (void*) "QuantLib::QuoteVectorVector");
  SWIG_TypeClientData(SWIGTYPE_p_std__vectorT_HandleT_Quote_t_t, (void*) "QuantLib::QuoteHandleVector");
  SWIG_TypeClientData(SWIGTYPE_p_std__vectorT_std__vectorT_HandleT_Quote_t_t_t, (void*) "QuantLib::QuoteHandleVectorVector");
  SWIG_TypeClientData(SWIGTYPE_p_std__vectorT_RelinkableHandleT_Quote_t_t, (void*) "QuantLib::RelinkableQuoteHandleVector");
  SWIG_TypeClientData(SWIGTYPE_p_std__vectorT_std__vectorT_RelinkableHandleT_Quote_t_t_t, (void*) "QuantLib::RelinkableQuoteHandleVectorVector");
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Following", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Following)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "ModifiedFollowing", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(ModifiedFollowing)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Preceding", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Preceding)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "ModifiedPreceding", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(ModifiedPreceding)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Unadjusted", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Unadjusted)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "HalfMonthModifiedFollowing", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(HalfMonthModifiedFollowing)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "JoinHolidays", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(JoinHolidays)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "JoinBusinessDays", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(JoinBusinessDays)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  SWIG_TypeClientData(SWIGTYPE_p_Calendar, (void*) "QuantLib::Calendar");
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Argentina_Merval", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(QuantLib::Argentina::Merval)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__Argentina, (void*) "QuantLib::Argentina");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__Australia, (void*) "QuantLib::Australia");
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Brazil_Settlement", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(QuantLib::Brazil::Settlement)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Brazil_Exchange", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(QuantLib::Brazil::Exchange)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__Brazil, (void*) "QuantLib::Brazil");
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Canada_Settlement", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(QuantLib::Canada::Settlement)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Canada_TSX", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(QuantLib::Canada::TSX)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__Canada, (void*) "QuantLib::Canada");
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "China_SSE", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(QuantLib::China::SSE)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "China_IB", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(QuantLib::China::IB)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__China, (void*) "QuantLib::China");
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "CzechRepublic_PSE", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(QuantLib::CzechRepublic::PSE)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__CzechRepublic, (void*) "QuantLib::CzechRepublic");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__Denmark, (void*) "QuantLib::Denmark");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__Finland, (void*) "QuantLib::Finland");
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Germany_Settlement", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(QuantLib::Germany::Settlement)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Germany_FrankfurtStockExchange", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(QuantLib::Germany::FrankfurtStockExchange)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Germany_Xetra", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(QuantLib::Germany::Xetra)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Germany_Eurex", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(QuantLib::Germany::Eurex)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__Germany, (void*) "QuantLib::Germany");
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "HongKong_HKEx", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(QuantLib::HongKong::HKEx)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__HongKong, (void*) "QuantLib::HongKong");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__Hungary, (void*) "QuantLib::Hungary");
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Iceland_ICEX", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(QuantLib::Iceland::ICEX)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__Iceland, (void*) "QuantLib::Iceland");
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "India_NSE", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(QuantLib::India::NSE)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__India, (void*) "QuantLib::India");
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Indonesia_BEJ", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(QuantLib::Indonesia::BEJ)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Indonesia_JSX", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(QuantLib::Indonesia::JSX)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__Indonesia, (void*) "QuantLib::Indonesia");
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Israel_Settlement", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(QuantLib::Israel::Settlement)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Israel_TASE", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(QuantLib::Israel::TASE)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__Israel, (void*) "QuantLib::Israel");
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Italy_Settlement", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(QuantLib::Italy::Settlement)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Italy_Exchange", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(QuantLib::Italy::Exchange)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__Italy, (void*) "QuantLib::Italy");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__Japan, (void*) "QuantLib::Japan");
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Mexico_BMV", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(QuantLib::Mexico::BMV)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__Mexico, (void*) "QuantLib::Mexico");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__NewZealand, (void*) "QuantLib::NewZealand");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__Norway, (void*) "QuantLib::Norway");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__Poland, (void*) "QuantLib::Poland");
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Russia_Settlement", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(QuantLib::Russia::Settlement)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Russia_MOEX", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(QuantLib::Russia::MOEX)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__Russia, (void*) "QuantLib::Russia");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__Romania, (void*) "QuantLib::Romania");
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "SaudiArabia_Tadawul", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(QuantLib::SaudiArabia::Tadawul)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__SaudiArabia, (void*) "QuantLib::SaudiArabia");
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Singapore_SGX", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(QuantLib::Singapore::SGX)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__Singapore, (void*) "QuantLib::Singapore");
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Slovakia_BSSE", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(QuantLib::Slovakia::BSSE)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__Slovakia, (void*) "QuantLib::Slovakia");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__SouthAfrica, (void*) "QuantLib::SouthAfrica");
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "SouthKorea_Settlement", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(QuantLib::SouthKorea::Settlement)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "SouthKorea_KRX", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(QuantLib::SouthKorea::KRX)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__SouthKorea, (void*) "QuantLib::SouthKorea");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__Sweden, (void*) "QuantLib::Sweden");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__Switzerland, (void*) "QuantLib::Switzerland");
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Taiwan_TSEC", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(QuantLib::Taiwan::TSEC)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__Taiwan, (void*) "QuantLib::Taiwan");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__TARGET, (void*) "QuantLib::TARGET");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__Turkey, (void*) "QuantLib::Turkey");
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Ukraine_USE", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(QuantLib::Ukraine::USE)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__Ukraine, (void*) "QuantLib::Ukraine");
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "UnitedKingdom_Settlement", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(QuantLib::UnitedKingdom::Settlement)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "UnitedKingdom_Exchange", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(QuantLib::UnitedKingdom::Exchange)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "UnitedKingdom_Metals", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(QuantLib::UnitedKingdom::Metals)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__UnitedKingdom, (void*) "QuantLib::UnitedKingdom");
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "UnitedStates_Settlement", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(QuantLib::UnitedStates::Settlement)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "UnitedStates_NYSE", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(QuantLib::UnitedStates::NYSE)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "UnitedStates_GovernmentBond", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(QuantLib::UnitedStates::GovernmentBond)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "UnitedStates_NERC", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(QuantLib::UnitedStates::NERC)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "UnitedStates_LiborImpact", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(QuantLib::UnitedStates::LiborImpact)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "UnitedStates_FederalReserve", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(QuantLib::UnitedStates::FederalReserve)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__UnitedStates, (void*) "QuantLib::UnitedStates");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__NullCalendar, (void*) "QuantLib::NullCalendar");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__WeekendsOnly, (void*) "QuantLib::WeekendsOnly");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__JointCalendar, (void*) "QuantLib::JointCalendar");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__BespokeCalendar, (void*) "QuantLib::BespokeCalendar");
  SWIG_TypeClientData(SWIGTYPE_p_DayCounter, (void*) "QuantLib::DayCounter");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__Actual360, (void*) "QuantLib::Actual360");
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Actual365Fixed_Standard", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(QuantLib::Actual365Fixed::Standard)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Actual365Fixed_Canadian", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(QuantLib::Actual365Fixed::Canadian)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Actual365Fixed_NoLeap", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(QuantLib::Actual365Fixed::NoLeap)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__Actual365Fixed, (void*) "QuantLib::Actual365Fixed");
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Thirty360_USA", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(QuantLib::Thirty360::USA)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Thirty360_BondBasis", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(QuantLib::Thirty360::BondBasis)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Thirty360_European", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(QuantLib::Thirty360::European)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Thirty360_EurobondBasis", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(QuantLib::Thirty360::EurobondBasis)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Thirty360_Italian", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(QuantLib::Thirty360::Italian)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__Thirty360, (void*) "QuantLib::Thirty360");
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "ActualActual_ISMA", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(QuantLib::ActualActual::ISMA)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "ActualActual_Bond", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(QuantLib::ActualActual::Bond)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "ActualActual_ISDA", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(QuantLib::ActualActual::ISDA)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "ActualActual_Historical", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(QuantLib::ActualActual::Historical)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "ActualActual_Actual365", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(QuantLib::ActualActual::Actual365)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "ActualActual_AFB", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(QuantLib::ActualActual::AFB)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "ActualActual_Euro", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(QuantLib::ActualActual::Euro)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__ActualActual, (void*) "QuantLib::ActualActual");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__OneDayCounter, (void*) "QuantLib::OneDayCounter");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__SimpleDayCounter, (void*) "QuantLib::SimpleDayCounter");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__Business252, (void*) "QuantLib::Business252");
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Simple", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Simple)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Compounded", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Compounded)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Continuous", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Continuous)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "SimpleThenCompounded", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(SimpleThenCompounded)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "CompoundedThenSimple", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(CompoundedThenSimple)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  SWIG_TypeClientData(SWIGTYPE_p_InterestRate, (void*) "QuantLib::InterestRate");
  SWIG_TypeClientData(SWIGTYPE_p_std__vectorT_InterestRate_t, (void*) "QuantLib::InterestRateVector");
  SWIG_TypeClientData(SWIGTYPE_p_Rounding, (void*) "QuantLib::Rounding");
  SWIG_TypeClientData(SWIGTYPE_p_UpRounding, (void*) "QuantLib::UpRounding");
  SWIG_TypeClientData(SWIGTYPE_p_DownRounding, (void*) "QuantLib::DownRounding");
  SWIG_TypeClientData(SWIGTYPE_p_ClosestRounding, (void*) "QuantLib::ClosestRounding");
  SWIG_TypeClientData(SWIGTYPE_p_CeilingTruncation, (void*) "QuantLib::CeilingTruncation");
  SWIG_TypeClientData(SWIGTYPE_p_FloorTruncation, (void*) "QuantLib::FloorTruncation");
  SWIG_TypeClientData(SWIGTYPE_p_Currency, (void*) "QuantLib::Currency");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__ARSCurrency, (void*) "QuantLib::ARSCurrency");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__ATSCurrency, (void*) "QuantLib::ATSCurrency");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__AUDCurrency, (void*) "QuantLib::AUDCurrency");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__BDTCurrency, (void*) "QuantLib::BDTCurrency");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__BEFCurrency, (void*) "QuantLib::BEFCurrency");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__BGLCurrency, (void*) "QuantLib::BGLCurrency");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__BRLCurrency, (void*) "QuantLib::BRLCurrency");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__BYRCurrency, (void*) "QuantLib::BYRCurrency");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__CADCurrency, (void*) "QuantLib::CADCurrency");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__CHFCurrency, (void*) "QuantLib::CHFCurrency");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__CLPCurrency, (void*) "QuantLib::CLPCurrency");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__CNYCurrency, (void*) "QuantLib::CNYCurrency");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__COPCurrency, (void*) "QuantLib::COPCurrency");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__CYPCurrency, (void*) "QuantLib::CYPCurrency");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__CZKCurrency, (void*) "QuantLib::CZKCurrency");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__DEMCurrency, (void*) "QuantLib::DEMCurrency");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__DKKCurrency, (void*) "QuantLib::DKKCurrency");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__EEKCurrency, (void*) "QuantLib::EEKCurrency");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__ESPCurrency, (void*) "QuantLib::ESPCurrency");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__EURCurrency, (void*) "QuantLib::EURCurrency");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__FIMCurrency, (void*) "QuantLib::FIMCurrency");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__FRFCurrency, (void*) "QuantLib::FRFCurrency");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__GBPCurrency, (void*) "QuantLib::GBPCurrency");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__GRDCurrency, (void*) "QuantLib::GRDCurrency");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__HKDCurrency, (void*) "QuantLib::HKDCurrency");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__HUFCurrency, (void*) "QuantLib::HUFCurrency");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__IEPCurrency, (void*) "QuantLib::IEPCurrency");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__IDRCurrency, (void*) "QuantLib::IDRCurrency");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__ILSCurrency, (void*) "QuantLib::ILSCurrency");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__INRCurrency, (void*) "QuantLib::INRCurrency");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__IQDCurrency, (void*) "QuantLib::IQDCurrency");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__IRRCurrency, (void*) "QuantLib::IRRCurrency");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__ISKCurrency, (void*) "QuantLib::ISKCurrency");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__ITLCurrency, (void*) "QuantLib::ITLCurrency");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__JPYCurrency, (void*) "QuantLib::JPYCurrency");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__KRWCurrency, (void*) "QuantLib::KRWCurrency");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__KWDCurrency, (void*) "QuantLib::KWDCurrency");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__LTLCurrency, (void*) "QuantLib::LTLCurrency");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__LUFCurrency, (void*) "QuantLib::LUFCurrency");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__LVLCurrency, (void*) "QuantLib::LVLCurrency");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__MTLCurrency, (void*) "QuantLib::MTLCurrency");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__MXNCurrency, (void*) "QuantLib::MXNCurrency");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__MYRCurrency, (void*) "QuantLib::MYRCurrency");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__NLGCurrency, (void*) "QuantLib::NLGCurrency");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__NOKCurrency, (void*) "QuantLib::NOKCurrency");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__NPRCurrency, (void*) "QuantLib::NPRCurrency");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__NZDCurrency, (void*) "QuantLib::NZDCurrency");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__PEHCurrency, (void*) "QuantLib::PEHCurrency");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__PEICurrency, (void*) "QuantLib::PEICurrency");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__PENCurrency, (void*) "QuantLib::PENCurrency");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__PKRCurrency, (void*) "QuantLib::PKRCurrency");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__PLNCurrency, (void*) "QuantLib::PLNCurrency");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__PTECurrency, (void*) "QuantLib::PTECurrency");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__ROLCurrency, (void*) "QuantLib::ROLCurrency");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__RONCurrency, (void*) "QuantLib::RONCurrency");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__RUBCurrency, (void*) "QuantLib::RUBCurrency");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__SARCurrency, (void*) "QuantLib::SARCurrency");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__SEKCurrency, (void*) "QuantLib::SEKCurrency");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__SGDCurrency, (void*) "QuantLib::SGDCurrency");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__SITCurrency, (void*) "QuantLib::SITCurrency");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__SKKCurrency, (void*) "QuantLib::SKKCurrency");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__THBCurrency, (void*) "QuantLib::THBCurrency");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__TRLCurrency, (void*) "QuantLib::TRLCurrency");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__TRYCurrency, (void*) "QuantLib::TRYCurrency");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__TTDCurrency, (void*) "QuantLib::TTDCurrency");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__TWDCurrency, (void*) "QuantLib::TWDCurrency");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__USDCurrency, (void*) "QuantLib::USDCurrency");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__VEBCurrency, (void*) "QuantLib::VEBCurrency");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__VNDCurrency, (void*) "QuantLib::VNDCurrency");
  SWIG_TypeClientData(SWIGTYPE_p_QuantLib__ZARCurrency, (void*) "QuantLib::ZARCurrency");
  SWIG_TypeClientData(SWIGTYPE_p_SafeLinearInterpolation, (void*) "QuantLib::LinearInterpolation");
  SWIG_TypeClientData(SWIGTYPE_p_SafeLogLinearInterpolation, (void*) "QuantLib::LogLinearInterpolation");
  SWIG_TypeClientData(SWIGTYPE_p_SafeBackwardFlatInterpolation, (void*) "QuantLib::BackwardFlatInterpolation");
  SWIG_TypeClientData(SWIGTYPE_p_SafeForwardFlatInterpolation, (void*) "QuantLib::ForwardFlatInterpolation");
  SWIG_TypeClientData(SWIGTYPE_p_SafeCubicNaturalSpline, (void*) "QuantLib::CubicNaturalSpline");
  SWIG_TypeClientData(SWIGTYPE_p_SafeLogCubicNaturalSpline, (void*) "QuantLib::LogCubicNaturalSpline");
  SWIG_TypeClientData(SWIGTYPE_p_SafeMonotonicCubicNaturalSpline, (void*) "QuantLib::MonotonicCubicNaturalSpline");
  SWIG_TypeClientData(SWIGTYPE_p_SafeMonotonicLogCubicNaturalSpline, (void*) "QuantLib::MonotonicLogCubicNaturalSpline");
  SWIG_TypeClientData(SWIGTYPE_p_SafeKrugerCubic, (void*) "QuantLib::KrugerCubic");
  SWIG_TypeClientData(SWIGTYPE_p_SafeKrugerLogCubic, (void*) "QuantLib::KrugerLogCubic");
  SWIG_TypeClientData(SWIGTYPE_p_SafeFritschButlandCubic, (void*) "QuantLib::FritschButlandCubic");
  SWIG_TypeClientData(SWIGTYPE_p_SafeFritschButlandLogCubic, (void*) "QuantLib::FritschButlandLogCubic");
  SWIG_TypeClientData(SWIGTYPE_p_SafeParabolic, (void*) "QuantLib::Parabolic");
  SWIG_TypeClientData(SWIGTYPE_p_SafeLogParabolic, (void*) "QuantLib::LogParabolic");
  SWIG_TypeClientData(SWIGTYPE_p_SafeMonotonicParabolic, (void*) "QuantLib::MonotonicParabolic");
  SWIG_TypeClientData(SWIGTYPE_p_SafeMonotonicLogParabolic, (void*) "QuantLib::MonotonicLogParabolic");
  SWIG_TypeClientData(SWIGTYPE_p_SafeBilinearInterpolation, (void*) "QuantLib::BilinearInterpolation");
  SWIG_TypeClientData(SWIGTYPE_p_SafeBicubicSpline, (void*) "QuantLib::BicubicSpline");
  SWIG_TypeClientData(SWIGTYPE_p_BackwardFlat, (void*) "QuantLib::BackwardFlat");
  SWIG_TypeClientData(SWIGTYPE_p_ForwardFlat, (void*) "QuantLib::ForwardFlat");
  SWIG_TypeClientData(SWIGTYPE_p_Linear, (void*) "QuantLib::Linear");
  SWIG_TypeClientData(SWIGTYPE_p_LogLinear, (void*) "QuantLib::LogLinear");
  SWIG_TypeClientData(SWIGTYPE_p_Cubic, (void*) "QuantLib::Cubic");
  SWIG_TypeClientData(SWIGTYPE_p_MonotonicCubic, (void*) "QuantLib::MonotonicCubic");
  SWIG_TypeClientData(SWIGTYPE_p_DefaultLogCubic, (void*) "QuantLib::DefaultLogCubic");
  SWIG_TypeClientData(SWIGTYPE_p_MonotonicLogCubic, (void*) "QuantLib::MonotonicLogCubic");
  SWIG_TypeClientData(SWIGTYPE_p_boost__shared_ptrT_YieldTermStructure_t, (void*) "QuantLib::YieldTermStructure");
  SWIG_TypeClientData(SWIGTYPE_p_HandleT_YieldTermStructure_t, (void*) "QuantLib::YieldTermStructureHandle");
  SWIG_TypeClientData(SWIGTYPE_p_RelinkableHandleT_YieldTermStructure_t, (void*) "QuantLib::RelinkableYieldTermStructureHandle");
  SWIG_TypeClientData(SWIGTYPE_p_ImpliedTermStructurePtr, (void*) "QuantLib::ImpliedTermStructure");
  SWIG_TypeClientData(SWIGTYPE_p_ZeroSpreadedTermStructurePtr, (void*) "QuantLib::ZeroSpreadedTermStructure");
  SWIG_TypeClientData(SWIGTYPE_p_ForwardSpreadedTermStructurePtr, (void*) "QuantLib::ForwardSpreadedTermStructure");
  SWIG_TypeClientData(SWIGTYPE_p_SpreadedLinearZeroInterpolatedTermStructurePtr, (void*) "QuantLib::SpreadedLinearZeroInterpolatedTermStructure");
  SWIG_TypeClientData(SWIGTYPE_p_FlatForwardPtr, (void*) "QuantLib::FlatForward");
  SWIG_TypeClientData(SWIGTYPE_p_TimeSeriesT_double_std__mapT_Date_double_t_t, (void*) "QuantLib::RealTimeSeries");
  SWIG_TypeClientData(SWIGTYPE_p_TimeSeriesT_IntervalPrice_std__mapT_Date_IntervalPrice_t_t, (void*) "QuantLib::IntervalPriceTimeSeries");
  SWIG_TypeClientData(SWIGTYPE_p_std__vectorT_IntervalPrice_t, (void*) "QuantLib::IntervalPriceVector");
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "IntervalPrice_Open", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(IntervalPrice::Open)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "IntervalPrice_Close", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(IntervalPrice::Close)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "IntervalPrice_High", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(IntervalPrice::High)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "IntervalPrice_Low", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(IntervalPrice::Low)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  SWIG_TypeClientData(SWIGTYPE_p_IntervalPrice, (void*) "QuantLib::IntervalPrice");
  SWIG_TypeClientData(SWIGTYPE_p_IndexManager, (void*) "QuantLib::IndexManager");
  SWIG_TypeClientData(SWIGTYPE_p_boost__shared_ptrT_Index_t, (void*) "QuantLib::Index");
  SWIG_TypeClientData(SWIGTYPE_p_InterestRateIndexPtr, (void*) "QuantLib::InterestRateIndex");
  SWIG_TypeClientData(SWIGTYPE_p_IborIndexPtr, (void*) "QuantLib::IborIndex");
  SWIG_TypeClientData(SWIGTYPE_p_OvernightIndexPtr, (void*) "QuantLib::OvernightIndex");
  SWIG_TypeClientData(SWIGTYPE_p_LiborPtr, (void*) "QuantLib::Libor");
  SWIG_TypeClientData(SWIGTYPE_p_SwapIndexPtr, (void*) "QuantLib::SwapIndex");
  SWIG_TypeClientData(SWIGTYPE_p_AUDLiborPtr, (void*) "QuantLib::AUDLibor");
  SWIG_TypeClientData(SWIGTYPE_p_CADLiborPtr, (void*) "QuantLib::CADLibor");
  SWIG_TypeClientData(SWIGTYPE_p_CdorPtr, (void*) "QuantLib::Cdor");
  SWIG_TypeClientData(SWIGTYPE_p_CHFLiborPtr, (void*) "QuantLib::CHFLibor");
  SWIG_TypeClientData(SWIGTYPE_p_DKKLiborPtr, (void*) "QuantLib::DKKLibor");
  SWIG_TypeClientData(SWIGTYPE_p_BbswPtr, (void*) "QuantLib::Bbsw");
  SWIG_TypeClientData(SWIGTYPE_p_Bbsw1MPtr, (void*) "QuantLib::Bbsw1M");
  SWIG_TypeClientData(SWIGTYPE_p_Bbsw2MPtr, (void*) "QuantLib::Bbsw2M");
  SWIG_TypeClientData(SWIGTYPE_p_Bbsw3MPtr, (void*) "QuantLib::Bbsw3M");
  SWIG_TypeClientData(SWIGTYPE_p_Bbsw4MPtr, (void*) "QuantLib::Bbsw4M");
  SWIG_TypeClientData(SWIGTYPE_p_Bbsw5MPtr, (void*) "QuantLib::Bbsw5M");
  SWIG_TypeClientData(SWIGTYPE_p_Bbsw6MPtr, (void*) "QuantLib::Bbsw6M");
  SWIG_TypeClientData(SWIGTYPE_p_BkbmPtr, (void*) "QuantLib::Bkbm");
  SWIG_TypeClientData(SWIGTYPE_p_Bkbm1MPtr, (void*) "QuantLib::Bkbm1M");
  SWIG_TypeClientData(SWIGTYPE_p_Bkbm2MPtr, (void*) "QuantLib::Bkbm2M");
  SWIG_TypeClientData(SWIGTYPE_p_Bkbm3MPtr, (void*) "QuantLib::Bkbm3M");
  SWIG_TypeClientData(SWIGTYPE_p_Bkbm4MPtr, (void*) "QuantLib::Bkbm4M");
  SWIG_TypeClientData(SWIGTYPE_p_Bkbm5MPtr, (void*) "QuantLib::Bkbm5M");
  SWIG_TypeClientData(SWIGTYPE_p_Bkbm6MPtr, (void*) "QuantLib::Bkbm6M");
  SWIG_TypeClientData(SWIGTYPE_p_EuriborPtr, (void*) "QuantLib::Euribor");
  SWIG_TypeClientData(SWIGTYPE_p_EuriborSWPtr, (void*) "QuantLib::EuriborSW");
  SWIG_TypeClientData(SWIGTYPE_p_Euribor2WPtr, (void*) "QuantLib::Euribor2W");
  SWIG_TypeClientData(SWIGTYPE_p_Euribor3WPtr, (void*) "QuantLib::Euribor3W");
  SWIG_TypeClientData(SWIGTYPE_p_Euribor1MPtr, (void*) "QuantLib::Euribor1M");
  SWIG_TypeClientData(SWIGTYPE_p_Euribor2MPtr, (void*) "QuantLib::Euribor2M");
  SWIG_TypeClientData(SWIGTYPE_p_Euribor3MPtr, (void*) "QuantLib::Euribor3M");
  SWIG_TypeClientData(SWIGTYPE_p_Euribor4MPtr, (void*) "QuantLib::Euribor4M");
  SWIG_TypeClientData(SWIGTYPE_p_Euribor5MPtr, (void*) "QuantLib::Euribor5M");
  SWIG_TypeClientData(SWIGTYPE_p_Euribor6MPtr, (void*) "QuantLib::Euribor6M");
  SWIG_TypeClientData(SWIGTYPE_p_Euribor7MPtr, (void*) "QuantLib::Euribor7M");
  SWIG_TypeClientData(SWIGTYPE_p_Euribor8MPtr, (void*) "QuantLib::Euribor8M");
  SWIG_TypeClientData(SWIGTYPE_p_Euribor9MPtr, (void*) "QuantLib::Euribor9M");
  SWIG_TypeClientData(SWIGTYPE_p_Euribor10MPtr, (void*) "QuantLib::Euribor10M");
  SWIG_TypeClientData(SWIGTYPE_p_Euribor11MPtr, (void*) "QuantLib::Euribor11M");
  SWIG_TypeClientData(SWIGTYPE_p_Euribor1YPtr, (void*) "QuantLib::Euribor1Y");
  SWIG_TypeClientData(SWIGTYPE_p_Euribor365Ptr, (void*) "QuantLib::Euribor365");
  SWIG_TypeClientData(SWIGTYPE_p_Euribor365_SWPtr, (void*) "QuantLib::Euribor365_SW");
  SWIG_TypeClientData(SWIGTYPE_p_Euribor365_2WPtr, (void*) "QuantLib::Euribor365_2W");
  SWIG_TypeClientData(SWIGTYPE_p_Euribor365_3WPtr, (void*) "QuantLib::Euribor365_3W");
  SWIG_TypeClientData(SWIGTYPE_p_Euribor365_1MPtr, (void*) "QuantLib::Euribor365_1M");
  SWIG_TypeClientData(SWIGTYPE_p_Euribor365_2MPtr, (void*) "QuantLib::Euribor365_2M");
  SWIG_TypeClientData(SWIGTYPE_p_Euribor365_3MPtr, (void*) "QuantLib::Euribor365_3M");
  SWIG_TypeClientData(SWIGTYPE_p_Euribor365_4MPtr, (void*) "QuantLib::Euribor365_4M");
  SWIG_TypeClientData(SWIGTYPE_p_Euribor365_5MPtr, (void*) "QuantLib::Euribor365_5M");
  SWIG_TypeClientData(SWIGTYPE_p_Euribor365_6MPtr, (void*) "QuantLib::Euribor365_6M");
  SWIG_TypeClientData(SWIGTYPE_p_Euribor365_7MPtr, (void*) "QuantLib::Euribor365_7M");
  SWIG_TypeClientData(SWIGTYPE_p_Euribor365_8MPtr, (void*) "QuantLib::Euribor365_8M");
  SWIG_TypeClientData(SWIGTYPE_p_Euribor365_9MPtr, (void*) "QuantLib::Euribor365_9M");
  SWIG_TypeClientData(SWIGTYPE_p_Euribor365_10MPtr, (void*) "QuantLib::Euribor365_10M");
  SWIG_TypeClientData(SWIGTYPE_p_Euribor365_11MPtr, (void*) "QuantLib::Euribor365_11M");
  SWIG_TypeClientData(SWIGTYPE_p_Euribor365_1YPtr, (void*) "QuantLib::Euribor365_1Y");
  SWIG_TypeClientData(SWIGTYPE_p_EURLiborPtr, (void*) "QuantLib::EURLibor");
  SWIG_TypeClientData(SWIGTYPE_p_EURLiborSWPtr, (void*) "QuantLib::EURLiborSW");
  SWIG_TypeClientData(SWIGTYPE_p_EURLibor2WPtr, (void*) "QuantLib::EURLibor2W");
  SWIG_TypeClientData(SWIGTYPE_p_EURLibor1MPtr, (void*) "QuantLib::EURLibor1M");
  SWIG_TypeClientData(SWIGTYPE_p_EURLibor2MPtr, (void*) "QuantLib::EURLibor2M");
  SWIG_TypeClientData(SWIGTYPE_p_EURLibor3MPtr, (void*) "QuantLib::EURLibor3M");
  SWIG_TypeClientData(SWIGTYPE_p_EURLibor4MPtr, (void*) "QuantLib::EURLibor4M");
  SWIG_TypeClientData(SWIGTYPE_p_EURLibor5MPtr, (void*) "QuantLib::EURLibor5M");
  SWIG_TypeClientData(SWIGTYPE_p_EURLibor6MPtr, (void*) "QuantLib::EURLibor6M");
  SWIG_TypeClientData(SWIGTYPE_p_EURLibor7MPtr, (void*) "QuantLib::EURLibor7M");
  SWIG_TypeClientData(SWIGTYPE_p_EURLibor8MPtr, (void*) "QuantLib::EURLibor8M");
  SWIG_TypeClientData(SWIGTYPE_p_EURLibor9MPtr, (void*) "QuantLib::EURLibor9M");
  SWIG_TypeClientData(SWIGTYPE_p_EURLibor10MPtr, (void*) "QuantLib::EURLibor10M");
  SWIG_TypeClientData(SWIGTYPE_p_EURLibor11MPtr, (void*) "QuantLib::EURLibor11M");
  SWIG_TypeClientData(SWIGTYPE_p_EURLibor1YPtr, (void*) "QuantLib::EURLibor1Y");
  SWIG_TypeClientData(SWIGTYPE_p_GBPLiborPtr, (void*) "QuantLib::GBPLibor");
  SWIG_TypeClientData(SWIGTYPE_p_JibarPtr, (void*) "QuantLib::Jibar");
  SWIG_TypeClientData(SWIGTYPE_p_JPYLiborPtr, (void*) "QuantLib::JPYLibor");
  SWIG_TypeClientData(SWIGTYPE_p_NZDLiborPtr, (void*) "QuantLib::NZDLibor");
  SWIG_TypeClientData(SWIGTYPE_p_SEKLiborPtr, (void*) "QuantLib::SEKLibor");
  SWIG_TypeClientData(SWIGTYPE_p_TiborPtr, (void*) "QuantLib::Tibor");
  SWIG_TypeClientData(SWIGTYPE_p_TRLiborPtr, (void*) "QuantLib::TRLibor");
  SWIG_TypeClientData(SWIGTYPE_p_USDLiborPtr, (void*) "QuantLib::USDLibor");
  SWIG_TypeClientData(SWIGTYPE_p_ZiborPtr, (void*) "QuantLib::Zibor");
  SWIG_TypeClientData(SWIGTYPE_p_AoniaPtr, (void*) "QuantLib::Aonia");
  SWIG_TypeClientData(SWIGTYPE_p_EoniaPtr, (void*) "QuantLib::Eonia");
  SWIG_TypeClientData(SWIGTYPE_p_SoniaPtr, (void*) "QuantLib::Sonia");
  SWIG_TypeClientData(SWIGTYPE_p_FedFundsPtr, (void*) "QuantLib::FedFunds");
  SWIG_TypeClientData(SWIGTYPE_p_NzocrPtr, (void*) "QuantLib::Nzocr");
  SWIG_TypeClientData(SWIGTYPE_p_EuriborSwapIsdaFixAPtr, (void*) "QuantLib::EuriborSwapIsdaFixA");
  SWIG_TypeClientData(SWIGTYPE_p_EuriborSwapIsdaFixBPtr, (void*) "QuantLib::EuriborSwapIsdaFixB");
  SWIG_TypeClientData(SWIGTYPE_p_EuriborSwapIfrFixPtr, (void*) "QuantLib::EuriborSwapIfrFix");
  SWIG_TypeClientData(SWIGTYPE_p_EurLiborSwapIsdaFixAPtr, (void*) "QuantLib::EurLiborSwapIsdaFixA");
  SWIG_TypeClientData(SWIGTYPE_p_EurLiborSwapIsdaFixBPtr, (void*) "QuantLib::EurLiborSwapIsdaFixB");
  SWIG_TypeClientData(SWIGTYPE_p_EurLiborSwapIfrFixPtr, (void*) "QuantLib::EurLiborSwapIfrFix");
  SWIG_TypeClientData(SWIGTYPE_p_Brent, (void*) "QuantLib::Brent");
  SWIG_TypeClientData(SWIGTYPE_p_Bisection, (void*) "QuantLib::Bisection");
  SWIG_TypeClientData(SWIGTYPE_p_FalsePosition, (void*) "QuantLib::FalsePosition");
  SWIG_TypeClientData(SWIGTYPE_p_Ridder, (void*) "QuantLib::Ridder");
  SWIG_TypeClientData(SWIGTYPE_p_Secant, (void*) "QuantLib::Secant");
  SWIG_TypeClientData(SWIGTYPE_p_Constraint, (void*) "QuantLib::Constraint");
  SWIG_TypeClientData(SWIGTYPE_p_BoundaryConstraint, (void*) "QuantLib::BoundaryConstraint");
  SWIG_TypeClientData(SWIGTYPE_p_NoConstraint, (void*) "QuantLib::NoConstraint");
  SWIG_TypeClientData(SWIGTYPE_p_PositiveConstraint, (void*) "QuantLib::PositiveConstraint");
  SWIG_TypeClientData(SWIGTYPE_p_CompositeConstraint, (void*) "QuantLib::CompositeConstraint");
  SWIG_TypeClientData(SWIGTYPE_p_NonhomogeneousBoundaryConstraint, (void*) "QuantLib::NonhomogeneousBoundaryConstraint");
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "EndCriteria_None", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(EndCriteria::None)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "EndCriteria_MaxIterations", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(EndCriteria::MaxIterations)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "EndCriteria_StationaryPoint", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(EndCriteria::StationaryPoint)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "EndCriteria_StationaryFunctionValue", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(EndCriteria::StationaryFunctionValue)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "EndCriteria_StationaryFunctionAccuracy", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(EndCriteria::StationaryFunctionAccuracy)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "EndCriteria_ZeroGradientNorm", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(EndCriteria::ZeroGradientNorm)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "EndCriteria_Unknown", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(EndCriteria::Unknown)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  SWIG_TypeClientData(SWIGTYPE_p_EndCriteria, (void*) "QuantLib::EndCriteria");
  SWIG_TypeClientData(SWIGTYPE_p_OptimizationMethod, (void*) "QuantLib::OptimizationMethod");
  SWIG_TypeClientData(SWIGTYPE_p_ConjugateGradient, (void*) "QuantLib::ConjugateGradient");
  SWIG_TypeClientData(SWIGTYPE_p_Simplex, (void*) "QuantLib::Simplex");
  SWIG_TypeClientData(SWIGTYPE_p_SteepestDescent, (void*) "QuantLib::SteepestDescent");
  SWIG_TypeClientData(SWIGTYPE_p_BFGS, (void*) "QuantLib::BFGS");
  SWIG_TypeClientData(SWIGTYPE_p_LevenbergMarquardt, (void*) "QuantLib::LevenbergMarquardt");
  SWIG_TypeClientData(SWIGTYPE_p_DifferentialEvolution, (void*) "QuantLib::DifferentialEvolution");
  SWIG_TypeClientData(SWIGTYPE_p_SamplerGaussian, (void*) "QuantLib::SamplerGaussian");
  SWIG_TypeClientData(SWIGTYPE_p_SamplerLogNormal, (void*) "QuantLib::SamplerLogNormal");
  SWIG_TypeClientData(SWIGTYPE_p_SamplerMirrorGaussian, (void*) "QuantLib::SamplerMirrorGaussian");
  SWIG_TypeClientData(SWIGTYPE_p_ProbabilityBoltzmannDownhill, (void*) "QuantLib::ProbabilityBoltzmannDownhill");
  SWIG_TypeClientData(SWIGTYPE_p_TemperatureExponential, (void*) "QuantLib::TemperatureExponential");
  SWIG_TypeClientData(SWIGTYPE_p_ReannealingTrivial, (void*) "QuantLib::ReannealingTrivial");
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "GaussianSimulatedAnnealing_NoResetScheme", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(GaussianSimulatedAnnealing::NoResetScheme)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "GaussianSimulatedAnnealing_ResetToBestPoint", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(GaussianSimulatedAnnealing::ResetToBestPoint)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "GaussianSimulatedAnnealing_ResetToOrigin", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(GaussianSimulatedAnnealing::ResetToOrigin)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  SWIG_TypeClientData(SWIGTYPE_p_GaussianSimulatedAnnealing, (void*) "QuantLib::GaussianSimulatedAnnealing");
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "MirrorGaussianSimulatedAnnealing_NoResetScheme", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(MirrorGaussianSimulatedAnnealing::NoResetScheme)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "MirrorGaussianSimulatedAnnealing_ResetToBestPoint", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(MirrorGaussianSimulatedAnnealing::ResetToBestPoint)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "MirrorGaussianSimulatedAnnealing_ResetToOrigin", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(MirrorGaussianSimulatedAnnealing::ResetToOrigin)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  SWIG_TypeClientData(SWIGTYPE_p_MirrorGaussianSimulatedAnnealing, (void*) "QuantLib::MirrorGaussianSimulatedAnnealing");
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "LogNormalSimulatedAnnealing_NoResetScheme", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(LogNormalSimulatedAnnealing::NoResetScheme)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "LogNormalSimulatedAnnealing_ResetToBestPoint", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(LogNormalSimulatedAnnealing::ResetToBestPoint)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "LogNormalSimulatedAnnealing_ResetToOrigin", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(LogNormalSimulatedAnnealing::ResetToOrigin)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  SWIG_TypeClientData(SWIGTYPE_p_LogNormalSimulatedAnnealing, (void*) "QuantLib::LogNormalSimulatedAnnealing");
  SWIG_TypeClientData(SWIGTYPE_p_Optimizer, (void*) "QuantLib::Optimizer");
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "ShiftedLognormal", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(ShiftedLognormal)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Normal", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Normal)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  SWIG_TypeClientData(SWIGTYPE_p_boost__shared_ptrT_BlackVolTermStructure_t, (void*) "QuantLib::BlackVolTermStructure");
  SWIG_TypeClientData(SWIGTYPE_p_HandleT_BlackVolTermStructure_t, (void*) "QuantLib::BlackVolTermStructureHandle");
  SWIG_TypeClientData(SWIGTYPE_p_RelinkableHandleT_BlackVolTermStructure_t, (void*) "QuantLib::RelinkableBlackVolTermStructureHandle");
  SWIG_TypeClientData(SWIGTYPE_p_boost__shared_ptrT_LocalVolTermStructure_t, (void*) "QuantLib::LocalVolTermStructure");
  SWIG_TypeClientData(SWIGTYPE_p_HandleT_LocalVolTermStructure_t, (void*) "QuantLib::LocalVolTermStructureHandle");
  SWIG_TypeClientData(SWIGTYPE_p_RelinkableHandleT_LocalVolTermStructure_t, (void*) "QuantLib::RelinkableLocalVolTermStructureHandle");
  SWIG_TypeClientData(SWIGTYPE_p_boost__shared_ptrT_OptionletVolatilityStructure_t, (void*) "QuantLib::OptionletVolatilityStructure");
  SWIG_TypeClientData(SWIGTYPE_p_HandleT_OptionletVolatilityStructure_t, (void*) "QuantLib::OptionletVolatilityStructureHandle");
  SWIG_TypeClientData(SWIGTYPE_p_RelinkableHandleT_OptionletVolatilityStructure_t, (void*) "QuantLib::RelinkableOptionletVolatilityStructureHandle");
  SWIG_TypeClientData(SWIGTYPE_p_boost__shared_ptrT_SwaptionVolatilityStructure_t, (void*) "QuantLib::SwaptionVolatilityStructure");
  SWIG_TypeClientData(SWIGTYPE_p_HandleT_SwaptionVolatilityStructure_t, (void*) "QuantLib::SwaptionVolatilityStructureHandle");
  SWIG_TypeClientData(SWIGTYPE_p_RelinkableHandleT_SwaptionVolatilityStructure_t, (void*) "QuantLib::RelinkableSwaptionVolatilityStructureHandle");
  SWIG_TypeClientData(SWIGTYPE_p_BlackConstantVolPtr, (void*) "QuantLib::BlackConstantVol");
  SWIG_TypeClientData(SWIGTYPE_p_BlackVarianceCurvePtr, (void*) "QuantLib::BlackVarianceCurve");
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "BlackVarianceSurface_ConstantExtrapolation", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(BlackVarianceSurface::ConstantExtrapolation)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "BlackVarianceSurface_InterpolatorDefaultExtrapolation", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(BlackVarianceSurface::InterpolatorDefaultExtrapolation)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  SWIG_TypeClientData(SWIGTYPE_p_BlackVarianceSurfacePtr, (void*) "QuantLib::BlackVarianceSurface");
  SWIG_TypeClientData(SWIGTYPE_p_LocalConstantVolPtr, (void*) "QuantLib::LocalConstantVol");
  SWIG_TypeClientData(SWIGTYPE_p_LocalVolSurfacePtr, (void*) "QuantLib::LocalVolSurface");
  SWIG_TypeClientData(SWIGTYPE_p_ConstantOptionletVolatilityPtr, (void*) "QuantLib::ConstantOptionletVolatility");
  SWIG_TypeClientData(SWIGTYPE_p_ConstantSwaptionVolatilityPtr, (void*) "QuantLib::ConstantSwaptionVolatility");
  SWIG_TypeClientData(SWIGTYPE_p_SwaptionVolatilityMatrixPtr, (void*) "QuantLib::SwaptionVolatilityMatrix");
  SWIG_TypeClientData(SWIGTYPE_p_SwaptionVolCube1Ptr, (void*) "QuantLib::SwaptionVolCube1");
  SWIG_TypeClientData(SWIGTYPE_p_SwaptionVolCube2Ptr, (void*) "QuantLib::SwaptionVolCube2");
  SWIG_TypeClientData(SWIGTYPE_p_boost__shared_ptrT_StochasticProcess_t, (void*) "QuantLib::StochasticProcess");
  SWIG_TypeClientData(SWIGTYPE_p_std__vectorT_boost__shared_ptrT_StochasticProcess_t_t, (void*) "QuantLib::StochasticProcessVector");
  SWIG_TypeClientData(SWIGTYPE_p_StochasticProcess1DPtr, (void*) "QuantLib::StochasticProcess1D");
  SWIG_TypeClientData(SWIGTYPE_p_GeneralizedBlackScholesProcessPtr, (void*) "QuantLib::GeneralizedBlackScholesProcess");
  SWIG_TypeClientData(SWIGTYPE_p_BlackScholesProcessPtr, (void*) "QuantLib::BlackScholesProcess");
  SWIG_TypeClientData(SWIGTYPE_p_BlackScholesMertonProcessPtr, (void*) "QuantLib::BlackScholesMertonProcess");
  SWIG_TypeClientData(SWIGTYPE_p_BlackProcessPtr, (void*) "QuantLib::BlackProcess");
  SWIG_TypeClientData(SWIGTYPE_p_GarmanKohlagenProcessPtr, (void*) "QuantLib::GarmanKohlagenProcess");
  SWIG_TypeClientData(SWIGTYPE_p_Merton76ProcessPtr, (void*) "QuantLib::Merton76Process");
  SWIG_TypeClientData(SWIGTYPE_p_StochasticProcessArrayPtr, (void*) "QuantLib::StochasticProcessArray");
  SWIG_TypeClientData(SWIGTYPE_p_GeometricBrownianMotionProcessPtr, (void*) "QuantLib::GeometricBrownianMotionProcess");
  SWIG_TypeClientData(SWIGTYPE_p_VarianceGammaProcessPtr, (void*) "QuantLib::VarianceGammaProcess");
  SWIG_TypeClientData(SWIGTYPE_p_HestonProcessPtr, (void*) "QuantLib::HestonProcess");
  SWIG_TypeClientData(SWIGTYPE_p_BatesProcessPtr, (void*) "QuantLib::BatesProcess");
  SWIG_TypeClientData(SWIGTYPE_p_HullWhiteProcessPtr, (void*) "QuantLib::HullWhiteProcess");
  SWIG_TypeClientData(SWIGTYPE_p_HullWhiteForwardProcessPtr, (void*) "QuantLib::HullWhiteForwardProcess");
  SWIG_TypeClientData(SWIGTYPE_p_GsrProcessPtr, (void*) "QuantLib::GsrProcess");
  SWIG_TypeClientData(SWIGTYPE_p_boost__shared_ptrT_PricingEngine_t, (void*) "QuantLib::PricingEngine");
  SWIG_TypeClientData(SWIGTYPE_p_boost__shared_ptrT_Instrument_t, (void*) "QuantLib::Instrument");
  SWIG_TypeClientData(SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Instrument_t_t, (void*) "QuantLib::InstrumentVector");
  SWIG_TypeClientData(SWIGTYPE_p_StockPtr, (void*) "QuantLib::Stock");
  SWIG_TypeClientData(SWIGTYPE_p_CompositeInstrumentPtr, (void*) "QuantLib::CompositeInstrument");
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "DateGeneration_Backward", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(DateGeneration::Backward)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "DateGeneration_Forward", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(DateGeneration::Forward)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "DateGeneration_Zero", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(DateGeneration::Zero)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "DateGeneration_ThirdWednesday", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(DateGeneration::ThirdWednesday)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "DateGeneration_Twentieth", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(DateGeneration::Twentieth)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "DateGeneration_TwentiethIMM", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(DateGeneration::TwentiethIMM)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "DateGeneration_OldCDS", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(DateGeneration::OldCDS)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "DateGeneration_CDS", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(DateGeneration::CDS)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "DateGeneration_CDS2015", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(DateGeneration::CDS2015)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  SWIG_TypeClientData(SWIGTYPE_p_DateGeneration, (void*) "QuantLib::DateGeneration");
  SWIG_TypeClientData(SWIGTYPE_p_Schedule, (void*) "QuantLib::Schedule");
  SWIG_TypeClientData(SWIGTYPE_p_boost__shared_ptrT_CashFlow_t, (void*) "QuantLib::CashFlow");
  SWIG_TypeClientData(SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CashFlow_t_t, (void*) "QuantLib::Leg");
  SWIG_TypeClientData(SWIGTYPE_p_SimpleCashFlowPtr, (void*) "QuantLib::SimpleCashFlow");
  SWIG_TypeClientData(SWIGTYPE_p_RedemptionPtr, (void*) "QuantLib::Redemption");
  SWIG_TypeClientData(SWIGTYPE_p_AmortizingPaymentPtr, (void*) "QuantLib::AmortizingPayment");
  SWIG_TypeClientData(SWIGTYPE_p_CouponPtr, (void*) "QuantLib::Coupon");
  SWIG_TypeClientData(SWIGTYPE_p_FixedRateCouponPtr, (void*) "QuantLib::FixedRateCoupon");
  SWIG_TypeClientData(SWIGTYPE_p_boost__shared_ptrT_FloatingRateCouponPricer_t, (void*) "QuantLib::FloatingRateCouponPricer");
  SWIG_TypeClientData(SWIGTYPE_p_FloatingRateCouponPtr, (void*) "QuantLib::FloatingRateCoupon");
  SWIG_TypeClientData(SWIGTYPE_p_CappedFlooredCouponPtr, (void*) "QuantLib::CappedFlooredCoupon");
  SWIG_TypeClientData(SWIGTYPE_p_IborCouponPtr, (void*) "QuantLib::IborCoupon");
  SWIG_TypeClientData(SWIGTYPE_p_IborCouponPricerPtr, (void*) "QuantLib::IborCouponPricer");
  SWIG_TypeClientData(SWIGTYPE_p_BlackIborCouponPricerPtr, (void*) "QuantLib::BlackIborCouponPricer");
  SWIG_TypeClientData(SWIGTYPE_p_CmsCouponPtr, (void*) "QuantLib::CmsCoupon");
  SWIG_TypeClientData(SWIGTYPE_p_CmsCouponPricerPtr, (void*) "QuantLib::CmsCouponPricer");
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "GFunctionFactory_Standard", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(GFunctionFactory::Standard)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "GFunctionFactory_ExactYield", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(GFunctionFactory::ExactYield)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "GFunctionFactory_ParallelShifts", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(GFunctionFactory::ParallelShifts)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "GFunctionFactory_NonParallelShifts", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(GFunctionFactory::NonParallelShifts)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  SWIG_TypeClientData(SWIGTYPE_p_GFunctionFactory, (void*) "QuantLib::GFunctionFactory");
  SWIG_TypeClientData(SWIGTYPE_p_AnalyticHaganPricerPtr, (void*) "QuantLib::AnalyticHaganPricer");
  SWIG_TypeClientData(SWIGTYPE_p_NumericHaganPricerPtr, (void*) "QuantLib::NumericHaganPricer");
  SWIG_TypeClientData(SWIGTYPE_p_CappedFlooredCmsCouponPtr, (void*) "QuantLib::CappedFlooredCmsCoupon");
  SWIG_TypeClientData(SWIGTYPE_p_LinearTsrPricerPtr, (void*) "QuantLib::LinearTsrPricer");
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Duration_Simple", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Duration::Simple)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Duration_Macaulay", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Duration::Macaulay)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Duration_Modified", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Duration::Modified)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  SWIG_TypeClientData(SWIGTYPE_p_Duration, (void*) "QuantLib::Duration");
  SWIG_TypeClientData(SWIGTYPE_p_CashFlows, (void*) "QuantLib::CashFlows");
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "CalibrationHelper_RelativePriceError", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(CalibrationHelper::RelativePriceError)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "CalibrationHelper_PriceError", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(CalibrationHelper::PriceError)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "CalibrationHelper_ImpliedVolError", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(CalibrationHelper::ImpliedVolError)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  SWIG_TypeClientData(SWIGTYPE_p_boost__shared_ptrT_CalibrationHelper_t, (void*) "QuantLib::CalibrationHelper");
  SWIG_TypeClientData(SWIGTYPE_p_SwaptionHelperPtr, (void*) "QuantLib::SwaptionHelper");
  SWIG_TypeClientData(SWIGTYPE_p_CapHelperPtr, (void*) "QuantLib::CapHelper");
  SWIG_TypeClientData(SWIGTYPE_p_HestonModelHelperPtr, (void*) "QuantLib::HestonModelHelper");
  SWIG_TypeClientData(SWIGTYPE_p_std__vectorT_boost__shared_ptrT_CalibrationHelper_t_t, (void*) "QuantLib::CalibrationHelperVector");
  SWIG_TypeClientData(SWIGTYPE_p_boost__shared_ptrT_CalibratedModel_t, (void*) "QuantLib::CalibratedModel");
  SWIG_TypeClientData(SWIGTYPE_p_HandleT_CalibratedModel_t, (void*) "QuantLib::CalibratedModelHandle");
  SWIG_TypeClientData(SWIGTYPE_p_RelinkableHandleT_CalibratedModel_t, (void*) "QuantLib::RelinkableCalibratedModelHandle");
  SWIG_TypeClientData(SWIGTYPE_p_TimeGrid, (void*) "QuantLib::TimeGrid");
  SWIG_TypeClientData(SWIGTYPE_p_Parameter, (void*) "QuantLib::Parameter");
  SWIG_TypeClientData(SWIGTYPE_p_ConstantParameter, (void*) "QuantLib::ConstantParameter");
  SWIG_TypeClientData(SWIGTYPE_p_NullParameter, (void*) "QuantLib::NullParameter");
  SWIG_TypeClientData(SWIGTYPE_p_PiecewiseConstantParameter, (void*) "QuantLib::PiecewiseConstantParameter");
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Option_Put", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Option::Put)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Option_Call", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Option::Call)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  SWIG_TypeClientData(SWIGTYPE_p_Option, (void*) "QuantLib::Option");
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Barrier_DownIn", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Barrier::DownIn)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Barrier_UpIn", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Barrier::UpIn)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Barrier_DownOut", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Barrier::DownOut)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Barrier_UpOut", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Barrier::UpOut)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  SWIG_TypeClientData(SWIGTYPE_p_Barrier, (void*) "QuantLib::Barrier");
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "DoubleBarrier_KnockIn", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(DoubleBarrier::KnockIn)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "DoubleBarrier_KnockOut", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(DoubleBarrier::KnockOut)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "DoubleBarrier_KIKO", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(DoubleBarrier::KIKO)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "DoubleBarrier_KOKI", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(DoubleBarrier::KOKI)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  SWIG_TypeClientData(SWIGTYPE_p_DoubleBarrier, (void*) "QuantLib::DoubleBarrier");
  SWIG_TypeClientData(SWIGTYPE_p_boost__shared_ptrT_Payoff_t, (void*) "QuantLib::Payoff");
  SWIG_TypeClientData(SWIGTYPE_p_VanillaOptionPtr, (void*) "QuantLib::VanillaOption");
  SWIG_TypeClientData(SWIGTYPE_p_EuropeanOptionPtr, (void*) "QuantLib::EuropeanOption");
  SWIG_TypeClientData(SWIGTYPE_p_ForwardVanillaOptionPtr, (void*) "QuantLib::ForwardVanillaOption");
  SWIG_TypeClientData(SWIGTYPE_p_QuantoVanillaOptionPtr, (void*) "QuantLib::QuantoVanillaOption");
  SWIG_TypeClientData(SWIGTYPE_p_QuantoForwardVanillaOptionPtr, (void*) "QuantLib::QuantoForwardVanillaOption");
  SWIG_TypeClientData(SWIGTYPE_p_MultiAssetOptionPtr, (void*) "QuantLib::MultiAssetOption");
  SWIG_TypeClientData(SWIGTYPE_p_AnalyticEuropeanEnginePtr, (void*) "QuantLib::AnalyticEuropeanEngine");
  SWIG_TypeClientData(SWIGTYPE_p_HestonModelPtr, (void*) "QuantLib::HestonModel");
  SWIG_TypeClientData(SWIGTYPE_p_PiecewiseTimeDependentHestonModelPtr, (void*) "QuantLib::PiecewiseTimeDependentHestonModel");
  SWIG_TypeClientData(SWIGTYPE_p_AnalyticHestonEnginePtr, (void*) "QuantLib::AnalyticHestonEngine");
  SWIG_TypeClientData(SWIGTYPE_p_AnalyticPTDHestonEnginePtr, (void*) "QuantLib::AnalyticPTDHestonEngine");
  SWIG_TypeClientData(SWIGTYPE_p_BatesModelPtr, (void*) "QuantLib::BatesModel");
  SWIG_TypeClientData(SWIGTYPE_p_BatesEnginePtr, (void*) "QuantLib::BatesEngine");
  SWIG_TypeClientData(SWIGTYPE_p_IntegralEnginePtr, (void*) "QuantLib::IntegralEngine");
  SWIG_TypeClientData(SWIGTYPE_p_FDBermudanEnginePtr, (void*) "QuantLib::FDBermudanEngine");
  SWIG_TypeClientData(SWIGTYPE_p_FDEuropeanEnginePtr, (void*) "QuantLib::FDEuropeanEngine");
  SWIG_TypeClientData(SWIGTYPE_p_BinomialVanillaEnginePtr, (void*) "QuantLib::BinomialVanillaEngine");
  SWIG_TypeClientData(SWIGTYPE_p_MCEuropeanEnginePtr, (void*) "QuantLib::MCEuropeanEngine");
  SWIG_TypeClientData(SWIGTYPE_p_FDAmericanEnginePtr, (void*) "QuantLib::FDAmericanEngine");
  SWIG_TypeClientData(SWIGTYPE_p_FdBlackScholesVanillaEnginePtr, (void*) "QuantLib::FdBlackScholesVanillaEngine");
  SWIG_TypeClientData(SWIGTYPE_p_FdBatesVanillaEnginePtr, (void*) "QuantLib::FdBatesVanillaEngine");
  SWIG_TypeClientData(SWIGTYPE_p_ContinuousArithmeticAsianLevyEnginePtr, (void*) "QuantLib::ContinuousArithmeticAsianLevyEngine");
  SWIG_TypeClientData(SWIGTYPE_p_FdBlackScholesAsianEnginePtr, (void*) "QuantLib::FdBlackScholesAsianEngine");
  SWIG_TypeClientData(SWIGTYPE_p_FDShoutEnginePtr, (void*) "QuantLib::FDShoutEngine");
  SWIG_TypeClientData(SWIGTYPE_p_BaroneAdesiWhaleyApproximationEnginePtr, (void*) "QuantLib::BaroneAdesiWhaleyEngine");
  SWIG_TypeClientData(SWIGTYPE_p_BjerksundStenslandApproximationEnginePtr, (void*) "QuantLib::BjerksundStenslandEngine");
  SWIG_TypeClientData(SWIGTYPE_p_AnalyticDigitalAmericanEnginePtr, (void*) "QuantLib::AnalyticDigitalAmericanEngine");
  SWIG_TypeClientData(SWIGTYPE_p_AnalyticDigitalAmericanKOEnginePtr, (void*) "QuantLib::AnalyticDigitalAmericanKOEngine");
  SWIG_TypeClientData(SWIGTYPE_p_DividendVanillaOptionPtr, (void*) "QuantLib::DividendVanillaOption");
  SWIG_TypeClientData(SWIGTYPE_p_AnalyticDividendEuropeanEnginePtr, (void*) "QuantLib::AnalyticDividendEuropeanEngine");
  SWIG_TypeClientData(SWIGTYPE_p_FDDividendEuropeanEnginePtr, (void*) "QuantLib::FDDividendEuropeanEngine");
  SWIG_TypeClientData(SWIGTYPE_p_FDDividendAmericanEnginePtr, (void*) "QuantLib::FDDividendAmericanEngine");
  SWIG_TypeClientData(SWIGTYPE_p_BarrierOptionPtr, (void*) "QuantLib::BarrierOption");
  SWIG_TypeClientData(SWIGTYPE_p_AnalyticBarrierEnginePtr, (void*) "QuantLib::AnalyticBarrierEngine");
  SWIG_TypeClientData(SWIGTYPE_p_MCBarrierEnginePtr, (void*) "QuantLib::MCBarrierEngine");
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "FdmSchemeDesc_HundsdorferType", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(FdmSchemeDesc::HundsdorferType)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "FdmSchemeDesc_DouglasType", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(FdmSchemeDesc::DouglasType)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "FdmSchemeDesc_CraigSneydType", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(FdmSchemeDesc::CraigSneydType)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "FdmSchemeDesc_ModifiedCraigSneydType", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(FdmSchemeDesc::ModifiedCraigSneydType)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "FdmSchemeDesc_ImplicitEulerType", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(FdmSchemeDesc::ImplicitEulerType)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "FdmSchemeDesc_ExplicitEulerType", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(FdmSchemeDesc::ExplicitEulerType)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  SWIG_TypeClientData(SWIGTYPE_p_FdmSchemeDesc, (void*) "QuantLib::FdmSchemeDesc");
  SWIG_TypeClientData(SWIGTYPE_p_FdBlackScholesBarrierEnginePtr, (void*) "QuantLib::FdBlackScholesBarrierEngine");
  SWIG_TypeClientData(SWIGTYPE_p_AnalyticBinaryBarrierEnginePtr, (void*) "QuantLib::AnalyticBinaryBarrierEngine");
  SWIG_TypeClientData(SWIGTYPE_p_BinomialBarrierEnginePtr, (void*) "QuantLib::BinomialBarrierEngine");
  SWIG_TypeClientData(SWIGTYPE_p_ForwardEuropeanEnginePtr, (void*) "QuantLib::ForwardEuropeanEngine");
  SWIG_TypeClientData(SWIGTYPE_p_QuantoEuropeanEnginePtr, (void*) "QuantLib::QuantoEuropeanEngine");
  SWIG_TypeClientData(SWIGTYPE_p_QuantoForwardEuropeanEnginePtr, (void*) "QuantLib::QuantoForwardEuropeanEngine");
  SWIG_TypeClientData(SWIGTYPE_p_BlackCalculator, (void*) "QuantLib::BlackCalculator");
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Average_Arithmetic", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Average::Arithmetic)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Average_Geometric", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Average::Geometric)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  SWIG_TypeClientData(SWIGTYPE_p_Average, (void*) "QuantLib::Average");
  SWIG_TypeClientData(SWIGTYPE_p_ContinuousAveragingAsianOptionPtr, (void*) "QuantLib::ContinuousAveragingAsianOption");
  SWIG_TypeClientData(SWIGTYPE_p_DiscreteAveragingAsianOptionPtr, (void*) "QuantLib::DiscreteAveragingAsianOption");
  SWIG_TypeClientData(SWIGTYPE_p_AnalyticContinuousGeometricAveragePriceAsianEnginePtr, (void*) "QuantLib::AnalyticContinuousGeometricAveragePriceAsianEngine");
  SWIG_TypeClientData(SWIGTYPE_p_AnalyticDiscreteGeometricAveragePriceAsianEnginePtr, (void*) "QuantLib::AnalyticDiscreteGeometricAveragePriceAsianEngine");
  SWIG_TypeClientData(SWIGTYPE_p_AnalyticDiscreteGeometricAverageStrikeAsianEnginePtr, (void*) "QuantLib::AnalyticDiscreteGeometricAverageStrikeAsianEngine");
  SWIG_TypeClientData(SWIGTYPE_p_MCDiscreteArithmeticAPEnginePtr, (void*) "QuantLib::MCDiscreteArithmeticAPEngine");
  SWIG_TypeClientData(SWIGTYPE_p_MCDiscreteArithmeticASEnginePtr, (void*) "QuantLib::MCDiscreteArithmeticASEngine");
  SWIG_TypeClientData(SWIGTYPE_p_MCDiscreteGeometricAPEnginePtr, (void*) "QuantLib::MCDiscreteGeometricAPEngine");
  SWIG_TypeClientData(SWIGTYPE_p_VarianceGammaEnginePtr, (void*) "QuantLib::VarianceGammaEngine");
  SWIG_TypeClientData(SWIGTYPE_p_FFTVarianceGammaEnginePtr, (void*) "QuantLib::FFTVarianceGammaEngine");
  SWIG_TypeClientData(SWIGTYPE_p_DoubleBarrierOptionPtr, (void*) "QuantLib::DoubleBarrierOption");
  SWIG_TypeClientData(SWIGTYPE_p_QuantoDoubleBarrierOptionPtr, (void*) "QuantLib::QuantoDoubleBarrierOption");
  SWIG_TypeClientData(SWIGTYPE_p_AnalyticDoubleBarrierEnginePtr, (void*) "QuantLib::AnalyticDoubleBarrierEngine");
  SWIG_TypeClientData(SWIGTYPE_p_WulinYongDoubleBarrierEnginePtr, (void*) "QuantLib::WulinYongDoubleBarrierEngine");
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "DeltaVolQuote_Spot", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(DeltaVolQuote::Spot)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "DeltaVolQuote_Fwd", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(DeltaVolQuote::Fwd)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "DeltaVolQuote_PaSpot", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(DeltaVolQuote::PaSpot)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "DeltaVolQuote_PaFwd", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(DeltaVolQuote::PaFwd)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "DeltaVolQuote_AtmNull", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(DeltaVolQuote::AtmNull)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "DeltaVolQuote_AtmSpot", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(DeltaVolQuote::AtmSpot)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "DeltaVolQuote_AtmFwd", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(DeltaVolQuote::AtmFwd)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "DeltaVolQuote_AtmDeltaNeutral", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(DeltaVolQuote::AtmDeltaNeutral)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "DeltaVolQuote_AtmVegaMax", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(DeltaVolQuote::AtmVegaMax)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "DeltaVolQuote_AtmGammaMax", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(DeltaVolQuote::AtmGammaMax)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "DeltaVolQuote_AtmPutCall50", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(DeltaVolQuote::AtmPutCall50)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  SWIG_TypeClientData(SWIGTYPE_p_boost__shared_ptrT_DeltaVolQuote_t, (void*) "QuantLib::DeltaVolQuote");
  SWIG_TypeClientData(SWIGTYPE_p_HandleT_DeltaVolQuote_t, (void*) "QuantLib::DeltaVolQuoteHandle");
  SWIG_TypeClientData(SWIGTYPE_p_RelinkableHandleT_DeltaVolQuote_t, (void*) "QuantLib::RelinkableDeltaVolQuoteHandle");
  SWIG_TypeClientData(SWIGTYPE_p_VannaVolgaDoubleBarrierEnginePtr, (void*) "QuantLib::VannaVolgaDoubleBarrierEngine");
  SWIG_TypeClientData(SWIGTYPE_p_AnalyticDoubleBarrierBinaryEnginePtr, (void*) "QuantLib::AnalyticDoubleBarrierBinaryEngine");
  SWIG_TypeClientData(SWIGTYPE_p_BinomialDoubleBarrierEnginePtr, (void*) "QuantLib::BinomialDoubleBarrierEngine");
  SWIG_TypeClientData(SWIGTYPE_p_PlainVanillaPayoffPtr, (void*) "QuantLib::PlainVanillaPayoff");
  SWIG_TypeClientData(SWIGTYPE_p_PercentageStrikePayoffPtr, (void*) "QuantLib::PercentageStrikePayoff");
  SWIG_TypeClientData(SWIGTYPE_p_CashOrNothingPayoffPtr, (void*) "QuantLib::CashOrNothingPayoff");
  SWIG_TypeClientData(SWIGTYPE_p_AssetOrNothingPayoffPtr, (void*) "QuantLib::AssetOrNothingPayoff");
  SWIG_TypeClientData(SWIGTYPE_p_SuperSharePayoffPtr, (void*) "QuantLib::SuperSharePayoff");
  SWIG_TypeClientData(SWIGTYPE_p_GapPayoffPtr, (void*) "QuantLib::GapPayoff");
  SWIG_TypeClientData(SWIGTYPE_p_BasketPayoffPtr, (void*) "QuantLib::BasketPayoff");
  SWIG_TypeClientData(SWIGTYPE_p_MinBasketPayoffPtr, (void*) "QuantLib::MinBasketPayoff");
  SWIG_TypeClientData(SWIGTYPE_p_MaxBasketPayoffPtr, (void*) "QuantLib::MaxBasketPayoff");
  SWIG_TypeClientData(SWIGTYPE_p_AverageBasketPayoffPtr, (void*) "QuantLib::AverageBasketPayoff");
  SWIG_TypeClientData(SWIGTYPE_p_BasketOptionPtr, (void*) "QuantLib::BasketOption");
  SWIG_TypeClientData(SWIGTYPE_p_MCEuropeanBasketEnginePtr, (void*) "QuantLib::MCEuropeanBasketEngine");
  SWIG_TypeClientData(SWIGTYPE_p_MCAmericanBasketEnginePtr, (void*) "QuantLib::MCAmericanBasketEngine");
  SWIG_TypeClientData(SWIGTYPE_p_StulzEnginePtr, (void*) "QuantLib::StulzEngine");
  SWIG_TypeClientData(SWIGTYPE_p_EverestOptionPtr, (void*) "QuantLib::EverestOption");
  SWIG_TypeClientData(SWIGTYPE_p_MCEverestEnginePtr, (void*) "QuantLib::MCEverestEngine");
  SWIG_TypeClientData(SWIGTYPE_p_HimalayaOptionPtr, (void*) "QuantLib::HimalayaOption");
  SWIG_TypeClientData(SWIGTYPE_p_MCHimalayaEnginePtr, (void*) "QuantLib::MCHimalayaEngine");
  SWIG_TypeClientData(SWIGTYPE_p_BlackDeltaCalculator, (void*) "QuantLib::BlackDeltaCalculator");
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "CallabilityPrice_Dirty", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(CallabilityPrice::Dirty)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "CallabilityPrice_Clean", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(CallabilityPrice::Clean)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  SWIG_TypeClientData(SWIGTYPE_p_CallabilityPrice, (void*) "QuantLib::CallabilityPrice");
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Callability_Call", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Callability::Call)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Callability_Put", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Callability::Put)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  SWIG_TypeClientData(SWIGTYPE_p_boost__shared_ptrT_Callability_t, (void*) "QuantLib::Callability");
  SWIG_TypeClientData(SWIGTYPE_p_SoftCallabilityPtr, (void*) "QuantLib::SoftCallability");
  SWIG_TypeClientData(SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Callability_t_t, (void*) "QuantLib::CallabilitySchedule");
  SWIG_TypeClientData(SWIGTYPE_p_boost__shared_ptrT_Seasonality_t, (void*) "QuantLib::Seasonality");
  SWIG_TypeClientData(SWIGTYPE_p_MultiplicativePriceSeasonalityPtr, (void*) "QuantLib::MultiplicativePriceSeasonalityPtr");
  SWIG_TypeClientData(SWIGTYPE_p_boost__shared_ptrT_YoYInflationTermStructure_t, (void*) "QuantLib::YoYInflationTermStructure");
  SWIG_TypeClientData(SWIGTYPE_p_HandleT_YoYInflationTermStructure_t, (void*) "QuantLib::YoYInflationTermStructureHandle");
  SWIG_TypeClientData(SWIGTYPE_p_RelinkableHandleT_YoYInflationTermStructure_t, (void*) "QuantLib::RelinkableYoYInflationTermStructureHandle");
  SWIG_TypeClientData(SWIGTYPE_p_boost__shared_ptrT_ZeroInflationTermStructure_t, (void*) "QuantLib::ZeroInflationTermStructure");
  SWIG_TypeClientData(SWIGTYPE_p_HandleT_ZeroInflationTermStructure_t, (void*) "QuantLib::ZeroInflationTermStructureHandle");
  SWIG_TypeClientData(SWIGTYPE_p_RelinkableHandleT_ZeroInflationTermStructure_t, (void*) "QuantLib::RelinkableZeroInflationTermStructureHandle");
  SWIG_TypeClientData(SWIGTYPE_p_Region, (void*) "QuantLib::Region");
  SWIG_TypeClientData(SWIGTYPE_p_CustomRegion, (void*) "QuantLib::CustomRegion");
  SWIG_TypeClientData(SWIGTYPE_p_InflationIndexPtr, (void*) "QuantLib::InflationIndex");
  SWIG_TypeClientData(SWIGTYPE_p_ZeroInflationIndexPtr, (void*) "QuantLib::ZeroInflationIndex");
  SWIG_TypeClientData(SWIGTYPE_p_YoYInflationIndexPtr, (void*) "QuantLib::YoYInflationIndex");
  SWIG_TypeClientData(SWIGTYPE_p_EUHICPPtr, (void*) "QuantLib::EUHICP");
  SWIG_TypeClientData(SWIGTYPE_p_EUHICPXTPtr, (void*) "QuantLib::EUHICPXT");
  SWIG_TypeClientData(SWIGTYPE_p_FRHICPPtr, (void*) "QuantLib::FRHICP");
  SWIG_TypeClientData(SWIGTYPE_p_UKRPIPtr, (void*) "QuantLib::UKRPI");
  SWIG_TypeClientData(SWIGTYPE_p_USCPIPtr, (void*) "QuantLib::USCPI");
  SWIG_TypeClientData(SWIGTYPE_p_ZACPIPtr, (void*) "QuantLib::ZACPI");
  SWIG_TypeClientData(SWIGTYPE_p_YYEUHICPPtr, (void*) "QuantLib::YYEUHICP");
  SWIG_TypeClientData(SWIGTYPE_p_YYEUHICPXTPtr, (void*) "QuantLib::YYEUHICPXT");
  SWIG_TypeClientData(SWIGTYPE_p_YYFRHICPPtr, (void*) "QuantLib::YYFRHICP");
  SWIG_TypeClientData(SWIGTYPE_p_YYUKRPIPtr, (void*) "QuantLib::YYUKRPI");
  SWIG_TypeClientData(SWIGTYPE_p_YYUSCPIPtr, (void*) "QuantLib::YYUSCPI");
  SWIG_TypeClientData(SWIGTYPE_p_YYZACPIPtr, (void*) "QuantLib::YYZACPI");
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "CPI_AsIndex", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(CPI::AsIndex)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "CPI_Flat", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(CPI::Flat)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "CPI_Linear", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(CPI::Linear)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  SWIG_TypeClientData(SWIGTYPE_p_CPI, (void*) "QuantLib::CPI");
  SWIG_TypeClientData(SWIGTYPE_p_boost__shared_ptrT_ZeroHelper_t, (void*) "QuantLib::ZeroHelper");
  SWIG_TypeClientData(SWIGTYPE_p_boost__shared_ptrT_YoYHelper_t, (void*) "QuantLib::YoYHelper");
  SWIG_TypeClientData(SWIGTYPE_p_std__vectorT_boost__shared_ptrT_ZeroHelper_t_t, (void*) "QuantLib::ZeroHelperVector");
  SWIG_TypeClientData(SWIGTYPE_p_std__vectorT_boost__shared_ptrT_YoYHelper_t_t, (void*) "QuantLib::YoYHelperVector");
  SWIG_TypeClientData(SWIGTYPE_p_ZeroCouponInflationSwapHelperPtr, (void*) "QuantLib::ZeroCouponInflationSwapHelper");
  SWIG_TypeClientData(SWIGTYPE_p_YearOnYearInflationSwapHelperPtr, (void*) "QuantLib::YearOnYearInflationSwapHelper");
  SWIG_TypeClientData(SWIGTYPE_p_PiecewiseZeroInflationPtr, (void*) "QuantLib::PiecewiseZeroInflation");
  SWIG_TypeClientData(SWIGTYPE_p_PiecewiseYoYInflationPtr, (void*) "QuantLib::PiecewiseYoYInflation");
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "ZeroCouponInflationSwap_Receiver", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(ZeroCouponInflationSwap::Receiver)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "ZeroCouponInflationSwap_Payer", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(ZeroCouponInflationSwap::Payer)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  SWIG_TypeClientData(SWIGTYPE_p_ZeroCouponInflationSwapPtr, (void*) "QuantLib::ZeroCouponInflationSwap");
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "YearOnYearInflationSwap_Receiver", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(YearOnYearInflationSwap::Receiver)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "YearOnYearInflationSwap_Payer", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(YearOnYearInflationSwap::Payer)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  SWIG_TypeClientData(SWIGTYPE_p_YearOnYearInflationSwapPtr, (void*) "QuantLib::YearOnYearInflationSwap");
  SWIG_TypeClientData(SWIGTYPE_p_YoYInflationCapFloorPtr, (void*) "QuantLib::YoYInflationCapFloor");
  SWIG_TypeClientData(SWIGTYPE_p_YoYInflationCapPtr, (void*) "QuantLib::YoYInflationCap");
  SWIG_TypeClientData(SWIGTYPE_p_YoYInflationFloorPtr, (void*) "QuantLib::YoYInflationFloor");
  SWIG_TypeClientData(SWIGTYPE_p_YoYInflationCollarPtr, (void*) "QuantLib::YoYInflationCollar");
  SWIG_TypeClientData(SWIGTYPE_p_boost__shared_ptrT_ShortRateModel_t, (void*) "QuantLib::ShortRateModel");
  SWIG_TypeClientData(SWIGTYPE_p_HandleT_ShortRateModel_t, (void*) "QuantLib::ShortRateModelHandle");
  SWIG_TypeClientData(SWIGTYPE_p_RelinkableHandleT_ShortRateModel_t, (void*) "QuantLib::RelinkableShortRateModelHandle");
  SWIG_TypeClientData(SWIGTYPE_p_VasicekPtr, (void*) "QuantLib::Vasicek");
  SWIG_TypeClientData(SWIGTYPE_p_HullWhitePtr, (void*) "QuantLib::HullWhite");
  SWIG_TypeClientData(SWIGTYPE_p_BlackKarasinskiPtr, (void*) "QuantLib::BlackKarasinski");
  SWIG_TypeClientData(SWIGTYPE_p_G2Ptr, (void*) "QuantLib::G2");
  SWIG_TypeClientData(SWIGTYPE_p_JamshidianSwaptionEnginePtr, (void*) "QuantLib::JamshidianSwaptionEngine");
  SWIG_TypeClientData(SWIGTYPE_p_TreeSwaptionEnginePtr, (void*) "QuantLib::TreeSwaptionEngine");
  SWIG_TypeClientData(SWIGTYPE_p_AnalyticCapFloorEnginePtr, (void*) "QuantLib::AnalyticCapFloorEngine");
  SWIG_TypeClientData(SWIGTYPE_p_TreeCapFloorEnginePtr, (void*) "QuantLib::TreeCapFloorEngine");
  SWIG_TypeClientData(SWIGTYPE_p_G2SwaptionEnginePtr, (void*) "QuantLib::G2SwaptionEngine");
  SWIG_TypeClientData(SWIGTYPE_p_FdG2SwaptionEnginePtr, (void*) "QuantLib::FdG2SwaptionEngine");
  SWIG_TypeClientData(SWIGTYPE_p_FdHullWhiteSwaptionEnginePtr, (void*) "QuantLib::FdHullWhiteSwaptionEngine");
  SWIG_TypeClientData(SWIGTYPE_p_BondPtr, (void*) "QuantLib::Bond");
  SWIG_TypeClientData(SWIGTYPE_p_ZeroCouponBondPtr, (void*) "QuantLib::ZeroCouponBond");
  SWIG_TypeClientData(SWIGTYPE_p_FixedRateBondPtr, (void*) "QuantLib::FixedRateBond");
  SWIG_TypeClientData(SWIGTYPE_p_FloatingRateBondPtr, (void*) "QuantLib::FloatingRateBond");
  SWIG_TypeClientData(SWIGTYPE_p_CmsRateBondPtr, (void*) "QuantLib::CmsRateBond");
  SWIG_TypeClientData(SWIGTYPE_p_DiscountingBondEnginePtr, (void*) "QuantLib::DiscountingBondEngine");
  SWIG_TypeClientData(SWIGTYPE_p_CallableFixedRateBondPtr, (void*) "QuantLib::CallableFixedRateBond");
  SWIG_TypeClientData(SWIGTYPE_p_TreeCallableFixedRateBondEnginePtr, (void*) "QuantLib::TreeCallableFixedRateBondEngine");
  SWIG_TypeClientData(SWIGTYPE_p_BlackCallableFixedRateBondEnginePtr, (void*) "QuantLib::BlackCallableFixedRateBondEngine");
  SWIG_TypeClientData(SWIGTYPE_p_CPIBondPtr, (void*) "QuantLib::CPIBond");
  SWIG_TypeClientData(SWIGTYPE_p_BondFunctions, (void*) "QuantLib::BondFunctions");
  SWIG_TypeClientData(SWIGTYPE_p_CapFloorPtr, (void*) "QuantLib::CapFloor");
  SWIG_TypeClientData(SWIGTYPE_p_CapPtr, (void*) "QuantLib::Cap");
  SWIG_TypeClientData(SWIGTYPE_p_FloorPtr, (void*) "QuantLib::Floor");
  SWIG_TypeClientData(SWIGTYPE_p_CollarPtr, (void*) "QuantLib::Collar");
  SWIG_TypeClientData(SWIGTYPE_p_BlackCapFloorEnginePtr, (void*) "QuantLib::BlackCapFloorEngine");
  SWIG_TypeClientData(SWIGTYPE_p_BachelierCapFloorEnginePtr, (void*) "QuantLib::BachelierCapFloorEngine");
  SWIG_TypeClientData(SWIGTYPE_p_boost__shared_ptrT_Dividend_t, (void*) "QuantLib::Dividend");
  SWIG_TypeClientData(SWIGTYPE_p_FixedDividendPtr, (void*) "QuantLib::FixedDividend");
  SWIG_TypeClientData(SWIGTYPE_p_FractionalDividendPtr, (void*) "QuantLib::FractionalDividend");
  SWIG_TypeClientData(SWIGTYPE_p_std__vectorT_boost__shared_ptrT_Dividend_t_t, (void*) "QuantLib::DividendSchedule");
  SWIG_TypeClientData(SWIGTYPE_p_ConvertibleZeroCouponBondPtr, (void*) "QuantLib::ConvertibleZeroCouponBond");
  SWIG_TypeClientData(SWIGTYPE_p_ConvertibleFixedCouponBondPtr, (void*) "QuantLib::ConvertibleFixedCouponBond");
  SWIG_TypeClientData(SWIGTYPE_p_ConvertibleFloatingRateBondPtr, (void*) "QuantLib::ConvertibleFloatingRateBond");
  SWIG_TypeClientData(SWIGTYPE_p_BinomialConvertibleEnginePtr, (void*) "QuantLib::BinomialConvertibleEngine");
  SWIG_TypeClientData(SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityTermStructure_t, (void*) "QuantLib::DefaultProbabilityTermStructure");
  SWIG_TypeClientData(SWIGTYPE_p_HandleT_DefaultProbabilityTermStructure_t, (void*) "QuantLib::DefaultProbabilityTermStructureHandle");
  SWIG_TypeClientData(SWIGTYPE_p_RelinkableHandleT_DefaultProbabilityTermStructure_t, (void*) "QuantLib::RelinkableDefaultProbabilityTermStructureHandle");
  SWIG_TypeClientData(SWIGTYPE_p_FlatHazardRatePtr, (void*) "QuantLib::FlatHazardRate");
  SWIG_TypeClientData(SWIGTYPE_p_HazardRateCurvePtr, (void*) "QuantLib::HazardRateCurve");
  SWIG_TypeClientData(SWIGTYPE_p_DefaultDensityCurvePtr, (void*) "QuantLib::DefaultDensityCurve");
  SWIG_TypeClientData(SWIGTYPE_p_boost__shared_ptrT_DefaultProbabilityHelper_t, (void*) "QuantLib::DefaultProbabilityHelper");
  SWIG_TypeClientData(SWIGTYPE_p_std__vectorT_boost__shared_ptrT_DefaultProbabilityHelper_t_t, (void*) "QuantLib::DefaultProbabilityHelperVector");
  SWIG_TypeClientData(SWIGTYPE_p_SpreadCdsHelperPtr, (void*) "QuantLib::SpreadCdsHelper");
  SWIG_TypeClientData(SWIGTYPE_p_UpfrontCdsHelperPtr, (void*) "QuantLib::UpfrontCdsHelper");
  SWIG_TypeClientData(SWIGTYPE_p_HazardRate, (void*) "QuantLib::HazardRate");
  SWIG_TypeClientData(SWIGTYPE_p_DefaultDensity, (void*) "QuantLib::DefaultDensity");
  SWIG_TypeClientData(SWIGTYPE_p_PiecewiseFlatHazardRatePtr, (void*) "QuantLib::PiecewiseFlatHazardRate");
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Protection_Buyer", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Protection::Buyer)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Protection_Seller", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Protection::Seller)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  SWIG_TypeClientData(SWIGTYPE_p_Protection, (void*) "QuantLib::Protection");
  SWIG_TypeClientData(SWIGTYPE_p_CreditDefaultSwapPtr, (void*) "QuantLib::CreditDefaultSwap");
  SWIG_TypeClientData(SWIGTYPE_p_MidPointCdsEnginePtr, (void*) "QuantLib::MidPointCdsEngine");
  SWIG_TypeClientData(SWIGTYPE_p_IntegralCdsEnginePtr, (void*) "QuantLib::IntegralCdsEngine");
  SWIG_TypeClientData(SWIGTYPE_p_DiscountCurvePtr, (void*) "QuantLib::DiscountCurve");
  SWIG_TypeClientData(SWIGTYPE_p_NormalDistribution, (void*) "QuantLib::NormalDistribution");
  SWIG_TypeClientData(SWIGTYPE_p_CumulativeNormalDistribution, (void*) "QuantLib::CumulativeNormalDistribution");
  SWIG_TypeClientData(SWIGTYPE_p_InverseCumulativeNormal, (void*) "QuantLib::InverseCumulativeNormal");
  SWIG_TypeClientData(SWIGTYPE_p_MoroInverseCumulativeNormal, (void*) "QuantLib::MoroInverseCumulativeNormal");
  SWIG_TypeClientData(SWIGTYPE_p_BivariateCumulativeNormalDistribution, (void*) "QuantLib::BivariateCumulativeNormalDistribution");
  SWIG_TypeClientData(SWIGTYPE_p_BinomialDistribution, (void*) "QuantLib::BinomialDistribution");
  SWIG_TypeClientData(SWIGTYPE_p_CumulativeBinomialDistribution, (void*) "QuantLib::CumulativeBinomialDistribution");
  SWIG_TypeClientData(SWIGTYPE_p_BivariateCumulativeNormalDistributionDr78, (void*) "QuantLib::BivariateCumulativeNormalDistributionDr78");
  SWIG_TypeClientData(SWIGTYPE_p_BivariateCumulativeNormalDistributionWe04DP, (void*) "QuantLib::BivariateCumulativeNormalDistributionWe04DP");
  SWIG_TypeClientData(SWIGTYPE_p_CumulativeChiSquareDistribution, (void*) "QuantLib::CumulativeChiSquareDistribution");
  SWIG_TypeClientData(SWIGTYPE_p_NonCentralCumulativeChiSquareDistribution, (void*) "QuantLib::NonCentralCumulativeChiSquareDistribution");
  SWIG_TypeClientData(SWIGTYPE_p_InverseNonCentralCumulativeChiSquareDistribution, (void*) "QuantLib::InverseNonCentralCumulativeChiSquareDistribution");
  SWIG_TypeClientData(SWIGTYPE_p_CumulativeGammaDistribution, (void*) "QuantLib::CumulativeGammaDistribution");
  SWIG_TypeClientData(SWIGTYPE_p_GammaFunction, (void*) "QuantLib::GammaFunction");
  SWIG_TypeClientData(SWIGTYPE_p_PoissonDistribution, (void*) "QuantLib::PoissonDistribution");
  SWIG_TypeClientData(SWIGTYPE_p_CumulativePoissonDistribution, (void*) "QuantLib::CumulativePoissonDistribution");
  SWIG_TypeClientData(SWIGTYPE_p_InverseCumulativePoisson, (void*) "QuantLib::InverseCumulativePoisson");
  SWIG_TypeClientData(SWIGTYPE_p_StudentDistribution, (void*) "QuantLib::StudentDistribution");
  SWIG_TypeClientData(SWIGTYPE_p_CumulativeStudentDistribution, (void*) "QuantLib::CumulativeStudentDistribution");
  SWIG_TypeClientData(SWIGTYPE_p_InverseCumulativeStudent, (void*) "QuantLib::InverseCumulativeStudent");
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Money_NoConversion", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Money::NoConversion)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Money_BaseCurrencyConversion", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Money::BaseCurrencyConversion)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Money_AutomatedConversion", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Money::AutomatedConversion)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  SWIG_TypeClientData(SWIGTYPE_p_Money, (void*) "QuantLib::Money");
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "ExchangeRate_Direct", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(ExchangeRate::Direct)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "ExchangeRate_Derived", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(ExchangeRate::Derived)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  SWIG_TypeClientData(SWIGTYPE_p_ExchangeRate, (void*) "QuantLib::ExchangeRate");
  SWIG_TypeClientData(SWIGTYPE_p_ExchangeRateManager, (void*) "QuantLib::ExchangeRateManager");
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Futures_IMM", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Futures::IMM)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Futures_ASX", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Futures::ASX)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  SWIG_TypeClientData(SWIGTYPE_p_Futures, (void*) "QuantLib::Futures");
  SWIG_TypeClientData(SWIGTYPE_p_TimeBasket, (void*) "QuantLib::TimeBasket");
  SWIG_TypeClientData(SWIGTYPE_p_SwapPtr, (void*) "QuantLib::Swap");
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "VanillaSwap_Receiver", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(VanillaSwap::Receiver)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "VanillaSwap_Payer", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(VanillaSwap::Payer)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  SWIG_TypeClientData(SWIGTYPE_p_VanillaSwapPtr, (void*) "QuantLib::VanillaSwap");
  SWIG_TypeClientData(SWIGTYPE_p_NonstandardSwapPtr, (void*) "QuantLib::NonstandardSwap");
  SWIG_TypeClientData(SWIGTYPE_p_DiscountingSwapEnginePtr, (void*) "QuantLib::DiscountingSwapEngine");
  SWIG_TypeClientData(SWIGTYPE_p_AssetSwapPtr, (void*) "QuantLib::AssetSwap");
  SWIG_TypeClientData(SWIGTYPE_p_FloatFloatSwapPtr, (void*) "QuantLib::FloatFloatSwap");
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Pillar_MaturityDate", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Pillar::MaturityDate)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Pillar_LastRelevantDate", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Pillar::LastRelevantDate)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Pillar_CustomDate", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Pillar::CustomDate)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  SWIG_TypeClientData(SWIGTYPE_p_Pillar, (void*) "QuantLib::Pillar");
  SWIG_TypeClientData(SWIGTYPE_p_boost__shared_ptrT_RateHelper_t, (void*) "QuantLib::RateHelper");
  SWIG_TypeClientData(SWIGTYPE_p_DepositRateHelperPtr, (void*) "QuantLib::DepositRateHelper");
  SWIG_TypeClientData(SWIGTYPE_p_FraRateHelperPtr, (void*) "QuantLib::FraRateHelper");
  SWIG_TypeClientData(SWIGTYPE_p_FuturesRateHelperPtr, (void*) "QuantLib::FuturesRateHelper");
  SWIG_TypeClientData(SWIGTYPE_p_SwapRateHelperPtr, (void*) "QuantLib::SwapRateHelper");
  SWIG_TypeClientData(SWIGTYPE_p_BondHelperPtr, (void*) "QuantLib::BondHelper");
  SWIG_TypeClientData(SWIGTYPE_p_FixedRateBondHelperPtr, (void*) "QuantLib::FixedRateBondHelper");
  SWIG_TypeClientData(SWIGTYPE_p_OISRateHelperPtr, (void*) "QuantLib::OISRateHelper");
  SWIG_TypeClientData(SWIGTYPE_p_DatedOISRateHelperPtr, (void*) "QuantLib::DatedOISRateHelper");
  SWIG_TypeClientData(SWIGTYPE_p_FxSwapRateHelperPtr, (void*) "QuantLib::FxSwapRateHelper");
  SWIG_TypeClientData(SWIGTYPE_p_std__vectorT_boost__shared_ptrT_RateHelper_t_t, (void*) "QuantLib::RateHelperVector");
  SWIG_TypeClientData(SWIGTYPE_p_FittingMethod, (void*) "QuantLib::FittingMethod");
  SWIG_TypeClientData(SWIGTYPE_p_FittedBondDiscountCurvePtr, (void*) "QuantLib::FittedBondDiscountCurve");
  SWIG_TypeClientData(SWIGTYPE_p_ExponentialSplinesFitting, (void*) "QuantLib::ExponentialSplinesFitting");
  SWIG_TypeClientData(SWIGTYPE_p_NelsonSiegelFitting, (void*) "QuantLib::NelsonSiegelFitting");
  SWIG_TypeClientData(SWIGTYPE_p_SvenssonFitting, (void*) "QuantLib::SvenssonFitting");
  SWIG_TypeClientData(SWIGTYPE_p_CubicBSplinesFitting, (void*) "QuantLib::CubicBSplinesFitting");
  SWIG_TypeClientData(SWIGTYPE_p_SimplePolynomialFitting, (void*) "QuantLib::SimplePolynomialFitting");
  SWIG_TypeClientData(SWIGTYPE_p_ForwardCurvePtr, (void*) "QuantLib::ForwardCurve");
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Position_Long", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Position::Long)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Position_Short", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Position::Short)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  SWIG_TypeClientData(SWIGTYPE_p_Position, (void*) "QuantLib::Position");
  SWIG_TypeClientData(SWIGTYPE_p_ForwardRateAgreementPtr, (void*) "QuantLib::ForwardRateAgreement");
  SWIG_TypeClientData(SWIGTYPE_p_boost__shared_ptrT_Gaussian1dModel_t, (void*) "QuantLib::Gaussian1dModel");
  SWIG_TypeClientData(SWIGTYPE_p_GsrPtr, (void*) "QuantLib::Gsr");
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "MarkovFunctionalSettings_AdjustNone", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(MarkovFunctional::ModelSettings::AdjustNone)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "MarkovFunctionalSettings_AdjustDigitals", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(MarkovFunctional::ModelSettings::AdjustDigitals)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "MarkovFunctionalSettings_AdjustYts", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(MarkovFunctional::ModelSettings::AdjustYts)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "MarkovFunctionalSettings_ExtrapolatePayoffFlat", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(MarkovFunctional::ModelSettings::ExtrapolatePayoffFlat)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "MarkovFunctionalSettings_NoPayoffExtrapolation", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(MarkovFunctional::ModelSettings::NoPayoffExtrapolation)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "MarkovFunctionalSettings_KahaleSmile", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(MarkovFunctional::ModelSettings::KahaleSmile)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "MarkovFunctionalSettings_SmileExponentialExtrapolation", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(MarkovFunctional::ModelSettings::SmileExponentialExtrapolation)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "MarkovFunctionalSettings_KahaleInterpolation", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(MarkovFunctional::ModelSettings::KahaleInterpolation)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "MarkovFunctionalSettings_SmileDeleteArbitragePoints", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(MarkovFunctional::ModelSettings::SmileDeleteArbitragePoints)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "MarkovFunctionalSettings_SabrSmile", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(MarkovFunctional::ModelSettings::SabrSmile)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  SWIG_TypeClientData(SWIGTYPE_p_MarkovFunctional__ModelSettings, (void*) "QuantLib::MarkovFunctionalSettings");
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "MarkovFunctional_AdjustNone", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(MarkovFunctional::ModelSettings::AdjustNone)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "MarkovFunctional_AdjustDigitals", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(MarkovFunctional::ModelSettings::AdjustDigitals)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "MarkovFunctional_AdjustYts", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(MarkovFunctional::ModelSettings::AdjustYts)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "MarkovFunctional_ExtrapolatePayoffFlat", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(MarkovFunctional::ModelSettings::ExtrapolatePayoffFlat)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "MarkovFunctional_NoPayoffExtrapolation", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(MarkovFunctional::ModelSettings::NoPayoffExtrapolation)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "MarkovFunctional_KahaleSmile", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(MarkovFunctional::ModelSettings::KahaleSmile)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "MarkovFunctional_SmileExponentialExtrapolation", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(MarkovFunctional::ModelSettings::SmileExponentialExtrapolation)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "MarkovFunctional_KahaleInterpolation", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(MarkovFunctional::ModelSettings::KahaleInterpolation)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "MarkovFunctional_SmileDeleteArbitragePoints", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(MarkovFunctional::ModelSettings::SmileDeleteArbitragePoints)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "MarkovFunctional_SabrSmile", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(MarkovFunctional::ModelSettings::SabrSmile)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  SWIG_TypeClientData(SWIGTYPE_p_MarkovFunctionalPtr, (void*) "QuantLib::MarkovFunctional");
  SWIG_TypeClientData(SWIGTYPE_p_Gaussian1dSwaptionEnginePtr, (void*) "QuantLib::Gaussian1dSwaptionEngine");
  SWIG_TypeClientData(SWIGTYPE_p_Gaussian1dJamshidianSwaptionEnginePtr, (void*) "QuantLib::Gaussian1dJamshidianSwaptionEngine");
  SWIG_TypeClientData(SWIGTYPE_p_Gaussian1dNonstandardSwaptionEnginePtr, (void*) "QuantLib::Gaussian1dNonstandardSwaptionEngine");
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Gaussian1dFloatFloatSwaptionEngine_None", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Gaussian1dFloatFloatSwaptionEngine::None)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Gaussian1dFloatFloatSwaptionEngine_Naive", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Gaussian1dFloatFloatSwaptionEngine::Naive)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Gaussian1dFloatFloatSwaptionEngine_Digital", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Gaussian1dFloatFloatSwaptionEngine::Digital)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  SWIG_TypeClientData(SWIGTYPE_p_Gaussian1dFloatFloatSwaptionEnginePtr, (void*) "QuantLib::Gaussian1dFloatFloatSwaptionEngine");
  SWIG_TypeClientData(SWIGTYPE_p_SegmentIntegral, (void*) "QuantLib::SegmentIntegral");
  SWIG_TypeClientData(SWIGTYPE_p_TrapezoidIntegralT_Default_t, (void*) "QuantLib::TrapezoidIntegralDefault");
  SWIG_TypeClientData(SWIGTYPE_p_TrapezoidIntegralT_MidPoint_t, (void*) "QuantLib::TrapezoidIntegralMidPoint");
  SWIG_TypeClientData(SWIGTYPE_p_SimpsonIntegral, (void*) "QuantLib::SimpsonIntegral");
  SWIG_TypeClientData(SWIGTYPE_p_GaussKronrodAdaptive, (void*) "QuantLib::GaussKronrodAdaptive");
  SWIG_TypeClientData(SWIGTYPE_p_GaussKronrodNonAdaptive, (void*) "QuantLib::GaussKronrodNonAdaptive");
  SWIG_TypeClientData(SWIGTYPE_p_GaussLobattoIntegral, (void*) "QuantLib::GaussLobattoIntegral");
  SWIG_TypeClientData(SWIGTYPE_p_GaussLaguerreIntegration, (void*) "QuantLib::GaussLaguerreIntegration");
  SWIG_TypeClientData(SWIGTYPE_p_GaussHermiteIntegration, (void*) "QuantLib::GaussHermiteIntegration");
  SWIG_TypeClientData(SWIGTYPE_p_GaussJacobiIntegration, (void*) "QuantLib::GaussJacobiIntegration");
  SWIG_TypeClientData(SWIGTYPE_p_GaussHyperbolicIntegration, (void*) "QuantLib::GaussHyperbolicIntegration");
  SWIG_TypeClientData(SWIGTYPE_p_GaussLegendreIntegration, (void*) "QuantLib::GaussLegendreIntegration");
  SWIG_TypeClientData(SWIGTYPE_p_GaussChebyshevIntegration, (void*) "QuantLib::GaussChebyshevIntegration");
  SWIG_TypeClientData(SWIGTYPE_p_GaussChebyshev2ndIntegration, (void*) "QuantLib::GaussChebyshev2ndIntegration");
  SWIG_TypeClientData(SWIGTYPE_p_GaussGegenbauerIntegration, (void*) "QuantLib::GaussGegenbauerIntegration");
  SWIG_TypeClientData(SWIGTYPE_p_SampleT_double_t, (void*) "QuantLib::SampleNumber");
  SWIG_TypeClientData(SWIGTYPE_p_SampleT_Array_t, (void*) "QuantLib::SampleArray");
  SWIG_TypeClientData(SWIGTYPE_p_SampleT_std__vectorT_double_t_t, (void*) "QuantLib::SampleRealVector");
  SWIG_TypeClientData(SWIGTYPE_p_LecuyerUniformRng, (void*) "QuantLib::LecuyerUniformRng");
  SWIG_TypeClientData(SWIGTYPE_p_KnuthUniformRng, (void*) "QuantLib::KnuthUniformRng");
  SWIG_TypeClientData(SWIGTYPE_p_MersenneTwisterUniformRng, (void*) "QuantLib::MersenneTwisterUniformRng");
  SWIG_TypeClientData(SWIGTYPE_p_UniformRandomGenerator, (void*) "QuantLib::UniformRandomGenerator");
  SWIG_TypeClientData(SWIGTYPE_p_CLGaussianRngT_LecuyerUniformRng_t, (void*) "QuantLib::CentralLimitLecuyerGaussianRng");
  SWIG_TypeClientData(SWIGTYPE_p_CLGaussianRngT_KnuthUniformRng_t, (void*) "QuantLib::CentralLimitKnuthGaussianRng");
  SWIG_TypeClientData(SWIGTYPE_p_CLGaussianRngT_MersenneTwisterUniformRng_t, (void*) "QuantLib::CentralLimitMersenneTwisterGaussianRng");
  SWIG_TypeClientData(SWIGTYPE_p_BoxMullerGaussianRngT_LecuyerUniformRng_t, (void*) "QuantLib::BoxMullerLecuyerGaussianRng");
  SWIG_TypeClientData(SWIGTYPE_p_BoxMullerGaussianRngT_KnuthUniformRng_t, (void*) "QuantLib::BoxMullerKnuthGaussianRng");
  SWIG_TypeClientData(SWIGTYPE_p_BoxMullerGaussianRngT_MersenneTwisterUniformRng_t, (void*) "QuantLib::BoxMullerMersenneTwisterGaussianRng");
  SWIG_TypeClientData(SWIGTYPE_p_InverseCumulativeRngT_LecuyerUniformRng_MoroInverseCumulativeNormal_t, (void*) "QuantLib::MoroInvCumulativeLecuyerGaussianRng");
  SWIG_TypeClientData(SWIGTYPE_p_InverseCumulativeRngT_KnuthUniformRng_MoroInverseCumulativeNormal_t, (void*) "QuantLib::MoroInvCumulativeKnuthGaussianRng");
  SWIG_TypeClientData(SWIGTYPE_p_InverseCumulativeRngT_MersenneTwisterUniformRng_MoroInverseCumulativeNormal_t, (void*) "QuantLib::MoroInvCumulativeMersenneTwisterGaussianRng");
  SWIG_TypeClientData(SWIGTYPE_p_InverseCumulativeRngT_LecuyerUniformRng_InverseCumulativeNormal_t, (void*) "QuantLib::InvCumulativeLecuyerGaussianRng");
  SWIG_TypeClientData(SWIGTYPE_p_InverseCumulativeRngT_KnuthUniformRng_InverseCumulativeNormal_t, (void*) "QuantLib::InvCumulativeKnuthGaussianRng");
  SWIG_TypeClientData(SWIGTYPE_p_InverseCumulativeRngT_MersenneTwisterUniformRng_InverseCumulativeNormal_t, (void*) "QuantLib::InvCumulativeMersenneTwisterGaussianRng");
  SWIG_TypeClientData(SWIGTYPE_p_GaussianRandomGenerator, (void*) "QuantLib::GaussianRandomGenerator");
  SWIG_TypeClientData(SWIGTYPE_p_HaltonRsg, (void*) "QuantLib::HaltonRsg");
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "SobolRsg_Unit", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(SobolRsg::Unit)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "SobolRsg_Jaeckel", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(SobolRsg::Jaeckel)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "SobolRsg_SobolLevitan", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(SobolRsg::SobolLevitan)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "SobolRsg_SobolLevitanLemieux", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(SobolRsg::SobolLevitanLemieux)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "SobolRsg_JoeKuoD5", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(SobolRsg::JoeKuoD5)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "SobolRsg_JoeKuoD6", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(SobolRsg::JoeKuoD6)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "SobolRsg_JoeKuoD7", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(SobolRsg::JoeKuoD7)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "SobolRsg_Kuo", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(SobolRsg::Kuo)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "SobolRsg_Kuo2", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(SobolRsg::Kuo2)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "SobolRsg_Kuo3", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(SobolRsg::Kuo3)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  SWIG_TypeClientData(SWIGTYPE_p_SobolRsg, (void*) "QuantLib::SobolRsg");
  SWIG_TypeClientData(SWIGTYPE_p_SobolBrownianBridgeRsg, (void*) "QuantLib::SobolBrownianBridgeRsg");
  SWIG_TypeClientData(SWIGTYPE_p_RandomSequenceGeneratorT_LecuyerUniformRng_t, (void*) "QuantLib::LecuyerUniformRsg");
  SWIG_TypeClientData(SWIGTYPE_p_RandomSequenceGeneratorT_KnuthUniformRng_t, (void*) "QuantLib::KnuthUniformRsg");
  SWIG_TypeClientData(SWIGTYPE_p_RandomSequenceGeneratorT_MersenneTwisterUniformRng_t, (void*) "QuantLib::MersenneTwisterUniformRsg");
  SWIG_TypeClientData(SWIGTYPE_p_UniformRandomSequenceGenerator, (void*) "QuantLib::UniformRandomSequenceGenerator");
  SWIG_TypeClientData(SWIGTYPE_p_UniformLowDiscrepancySequenceGenerator, (void*) "QuantLib::UniformLowDiscrepancySequenceGenerator");
  SWIG_TypeClientData(SWIGTYPE_p_InverseCumulativeRsgT_RandomSequenceGeneratorT_LecuyerUniformRng_t_MoroInverseCumulativeNormal_t, (void*) "QuantLib::MoroInvCumulativeLecuyerGaussianRsg");
  SWIG_TypeClientData(SWIGTYPE_p_InverseCumulativeRsgT_RandomSequenceGeneratorT_KnuthUniformRng_t_MoroInverseCumulativeNormal_t, (void*) "QuantLib::MoroInvCumulativeKnuthGaussianRsg");
  SWIG_TypeClientData(SWIGTYPE_p_InverseCumulativeRsgT_RandomSequenceGeneratorT_MersenneTwisterUniformRng_t_MoroInverseCumulativeNormal_t, (void*) "QuantLib::MoroInvCumulativeMersenneTwisterGaussianRsg");
  SWIG_TypeClientData(SWIGTYPE_p_InverseCumulativeRsgT_HaltonRsg_MoroInverseCumulativeNormal_t, (void*) "QuantLib::MoroInvCumulativeHaltonGaussianRsg");
  SWIG_TypeClientData(SWIGTYPE_p_InverseCumulativeRsgT_SobolRsg_MoroInverseCumulativeNormal_t, (void*) "QuantLib::MoroInvCumulativeSobolGaussianRsg");
  SWIG_TypeClientData(SWIGTYPE_p_InverseCumulativeRsgT_RandomSequenceGeneratorT_LecuyerUniformRng_t_InverseCumulativeNormal_t, (void*) "QuantLib::InvCumulativeLecuyerGaussianRsg");
  SWIG_TypeClientData(SWIGTYPE_p_InverseCumulativeRsgT_RandomSequenceGeneratorT_KnuthUniformRng_t_InverseCumulativeNormal_t, (void*) "QuantLib::InvCumulativeKnuthGaussianRsg");
  SWIG_TypeClientData(SWIGTYPE_p_InverseCumulativeRsgT_RandomSequenceGeneratorT_MersenneTwisterUniformRng_t_InverseCumulativeNormal_t, (void*) "QuantLib::InvCumulativeMersenneTwisterGaussianRsg");
  SWIG_TypeClientData(SWIGTYPE_p_InverseCumulativeRsgT_HaltonRsg_InverseCumulativeNormal_t, (void*) "QuantLib::InvCumulativeHaltonGaussianRsg");
  SWIG_TypeClientData(SWIGTYPE_p_InverseCumulativeRsgT_SobolRsg_InverseCumulativeNormal_t, (void*) "QuantLib::InvCumulativeSobolGaussianRsg");
  SWIG_TypeClientData(SWIGTYPE_p_GaussianRandomSequenceGenerator, (void*) "QuantLib::GaussianRandomSequenceGenerator");
  SWIG_TypeClientData(SWIGTYPE_p_GaussianLowDiscrepancySequenceGenerator, (void*) "QuantLib::GaussianLowDiscrepancySequenceGenerator");
  SWIG_TypeClientData(SWIGTYPE_p_Path, (void*) "QuantLib::Path");
  SWIG_TypeClientData(SWIGTYPE_p_SampleT_Path_t, (void*) "QuantLib::SamplePath");
  SWIG_TypeClientData(SWIGTYPE_p_GaussianPathGenerator, (void*) "QuantLib::GaussianPathGenerator");
  SWIG_TypeClientData(SWIGTYPE_p_GaussianSobolPathGenerator, (void*) "QuantLib::GaussianSobolPathGenerator");
  SWIG_TypeClientData(SWIGTYPE_p_MultiPath, (void*) "QuantLib::MultiPath");
  SWIG_TypeClientData(SWIGTYPE_p_SampleT_MultiPath_t, (void*) "QuantLib::SampleMultiPath");
  SWIG_TypeClientData(SWIGTYPE_p_GaussianMultiPathGenerator, (void*) "QuantLib::GaussianMultiPathGenerator");
  SWIG_TypeClientData(SWIGTYPE_p_BrownianBridge, (void*) "QuantLib::BrownianBridge");
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "BoundaryCondition_NoSide", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(DefaultBoundaryCondition::None)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "BoundaryCondition_Upper", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(DefaultBoundaryCondition::Upper)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "BoundaryCondition_Lower", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(DefaultBoundaryCondition::Lower)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  SWIG_TypeClientData(SWIGTYPE_p_boost__shared_ptrT_DefaultBoundaryCondition_t, (void*) "QuantLib::BoundaryCondition");
  SWIG_TypeClientData(SWIGTYPE_p_NeumannBCPtr, (void*) "QuantLib::NeumannBC");
  SWIG_TypeClientData(SWIGTYPE_p_DirichletBCPtr, (void*) "QuantLib::DirichletBC");
  SWIG_TypeClientData(SWIGTYPE_p_TridiagonalOperator, (void*) "QuantLib::TridiagonalOperator");
  SWIG_TypeClientData(SWIGTYPE_p_DPlus, (void*) "QuantLib::DPlus");
  SWIG_TypeClientData(SWIGTYPE_p_DMinus, (void*) "QuantLib::DMinus");
  SWIG_TypeClientData(SWIGTYPE_p_DZero, (void*) "QuantLib::DZero");
  SWIG_TypeClientData(SWIGTYPE_p_DPlusDMinus, (void*) "QuantLib::DPlusDMinus");
  SWIG_TypeClientData(SWIGTYPE_p_Discount, (void*) "QuantLib::Discount");
  SWIG_TypeClientData(SWIGTYPE_p_ZeroYield, (void*) "QuantLib::ZeroYield");
  SWIG_TypeClientData(SWIGTYPE_p_ForwardRate, (void*) "QuantLib::ForwardRate");
  SWIG_TypeClientData(SWIGTYPE_p_PiecewiseFlatForwardPtr, (void*) "QuantLib::PiecewiseFlatForward");
  SWIG_TypeClientData(SWIGTYPE_p_PiecewiseLinearForwardPtr, (void*) "QuantLib::PiecewiseLinearForward");
  SWIG_TypeClientData(SWIGTYPE_p_PiecewiseLinearZeroPtr, (void*) "QuantLib::PiecewiseLinearZero");
  SWIG_TypeClientData(SWIGTYPE_p_PiecewiseCubicZeroPtr, (void*) "QuantLib::PiecewiseCubicZero");
  SWIG_TypeClientData(SWIGTYPE_p_PiecewiseLogCubicDiscountPtr, (void*) "QuantLib::PiecewiseLogCubicDiscount");
  SWIG_TypeClientData(SWIGTYPE_p_SampledCurve, (void*) "QuantLib::SampledCurve");
  SWIG_TypeClientData(SWIGTYPE_p_Settings, (void*) "QuantLib::Settings");
  SWIG_TypeClientData(SWIGTYPE_p_Statistics, (void*) "QuantLib::Statistics");
  SWIG_TypeClientData(SWIGTYPE_p_IncrementalStatistics, (void*) "QuantLib::IncrementalStatistics");
  SWIG_TypeClientData(SWIGTYPE_p_RiskStatistics, (void*) "QuantLib::RiskStatistics");
  SWIG_TypeClientData(SWIGTYPE_p_GenericSequenceStatisticsT_Statistics_t, (void*) "QuantLib::MultipleStatistics");
  SWIG_TypeClientData(SWIGTYPE_p_GenericSequenceStatisticsT_RiskStatistics_t, (void*) "QuantLib::SequenceStatistics");
  SWIG_TypeClientData(SWIGTYPE_p_GenericSequenceStatisticsT_IncrementalStatistics_t, (void*) "QuantLib::MultipleIncrementalStatistics");
  SWIG_TypeClientData(SWIGTYPE_p_boost__shared_ptrT_CapFloorTermVolatilityStructure_t, (void*) "QuantLib::CapFloorTermVolatilityStructure");
  SWIG_TypeClientData(SWIGTYPE_p_HandleT_CapFloorTermVolatilityStructure_t, (void*) "QuantLib::CapFloorTermVolatilityStructureHandle");
  SWIG_TypeClientData(SWIGTYPE_p_RelinkableHandleT_CapFloorTermVolatilityStructure_t, (void*) "QuantLib::RelinkableCapFloorTermVolatilityStructureHandle");
  SWIG_TypeClientData(SWIGTYPE_p_CapFloorTermVolCurvePtr, (void*) "QuantLib::CapFloorTermVolCurve");
  SWIG_TypeClientData(SWIGTYPE_p_CapFloorTermVolSurfacePtr, (void*) "QuantLib::CapFloorTermVolSurface");
  SWIG_TypeClientData(SWIGTYPE_p_boost__shared_ptrT_StrippedOptionletBase_t, (void*) "QuantLib::StrippedOptionletBase");
  SWIG_TypeClientData(SWIGTYPE_p_OptionletStripper1Ptr, (void*) "QuantLib::OptionletStripper1");
  SWIG_TypeClientData(SWIGTYPE_p_StrippedOptionletAdapterPtr, (void*) "QuantLib::StrippedOptionletAdapter");
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Settlement_Physical", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Settlement::Physical)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/usr/local/Cellar/swig/3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Settlement_Cash", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Settlement::Cash)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  SWIG_TypeClientData(SWIGTYPE_p_Settlement, (void*) "QuantLib::Settlement");
  SWIG_TypeClientData(SWIGTYPE_p_SwaptionPtr, (void*) "QuantLib::Swaption");
  SWIG_TypeClientData(SWIGTYPE_p_NonstandardSwaptionPtr, (void*) "QuantLib::NonstandardSwaption");
  SWIG_TypeClientData(SWIGTYPE_p_FloatFloatSwaptionPtr, (void*) "QuantLib::FloatFloatSwaption");
  SWIG_TypeClientData(SWIGTYPE_p_BlackSwaptionEnginePtr, (void*) "QuantLib::BlackSwaptionEngine");
  SWIG_TypeClientData(SWIGTYPE_p_BachelierSwaptionEnginePtr, (void*) "QuantLib::BachelierSwaptionEngine");
  SWIG_TypeClientData(SWIGTYPE_p_ConstantEstimator, (void*) "QuantLib::ConstantEstimator");
  SWIG_TypeClientData(SWIGTYPE_p_ParkinsonSigma, (void*) "QuantLib::ParkinsonSigma");
  SWIG_TypeClientData(SWIGTYPE_p_GarmanKlassSigma1, (void*) "QuantLib::GarmanKlassSigma1");
  SWIG_TypeClientData(SWIGTYPE_p_GarmanKlassSigma3, (void*) "QuantLib::GarmanKlassSigma3");
  SWIG_TypeClientData(SWIGTYPE_p_GarmanKlassSigma4, (void*) "QuantLib::GarmanKlassSigma4");
  SWIG_TypeClientData(SWIGTYPE_p_GarmanKlassSigma5, (void*) "QuantLib::GarmanKlassSigma5");
  SWIG_TypeClientData(SWIGTYPE_p_GarmanKlassSigma6, (void*) "QuantLib::GarmanKlassSigma6");
  SWIG_TypeClientData(SWIGTYPE_p_ZeroCurvePtr, (void*) "QuantLib::ZeroCurve");
  SWIG_TypeClientData(SWIGTYPE_p_LogLinearZeroCurvePtr, (void*) "QuantLib::LogLinearZeroCurve");
  SWIG_TypeClientData(SWIGTYPE_p_CubicZeroCurvePtr, (void*) "QuantLib::CubicZeroCurve");
  SWIG_TypeClientData(SWIGTYPE_p_LogCubicZeroCurvePtr, (void*) "QuantLib::LogCubicZeroCurve");
  SWIG_TypeClientData(SWIGTYPE_p_ForwardFlatZeroCurvePtr, (void*) "QuantLib::ForwardFlatZeroCurve");
  SWIG_TypeClientData(SWIGTYPE_p_BackwardFlatZeroCurvePtr, (void*) "QuantLib::BackwardFlatZeroCurve");
  SWIG_TypeClientData(SWIGTYPE_p_MonotonicCubicZeroCurvePtr, (void*) "QuantLib::MonotonicCubicZeroCurve");
  SWIG_TypeClientData(SWIGTYPE_p_ForwardPtr, (void*) "QuantLib::Forward");
  SWIG_TypeClientData(SWIGTYPE_p_FixedRateBondForwardPtr, (void*) "QuantLib::FixedRateBondForward");
  ST(0) = &PL_sv_yes;
  XSRETURN(1);
}

